@ripla/godd-mcp 1.0.2-canary.4 → 1.0.2-canary.6

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/dist/godd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var mP=Object.create;var Uu=Object.defineProperty;var gP=Object.getOwnPropertyDescriptor;var yP=Object.getOwnPropertyNames;var _P=Object.getPrototypeOf,vP=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Br=(e,t)=>{for(var r in t)Uu(e,r,{get:t[r],enumerable:!0})},bP=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of yP(t))!vP.call(e,o)&&o!==r&&Uu(e,o,{get:()=>t[o],enumerable:!(n=gP(t,o))||n.enumerable});return e};var st=(e,t,r)=>(r=e!=null?mP(_P(e)):{},bP(t||!e||!e.__esModule?Uu(r,"default",{value:e,enumerable:!0}):r,e));var te,Bu,I,cr,pi=_(()=>{(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})(te||(te={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Bu||(Bu={}));I=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=e=>{switch(typeof e){case"undefined":return I.undefined;case"string":return I.string;case"number":return Number.isNaN(e)?I.nan:I.number;case"boolean":return I.boolean;case"function":return I.function;case"bigint":return I.bigint;case"symbol":return I.symbol;case"object":return Array.isArray(e)?I.array:e===null?I.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?I.promise:typeof Map<"u"&&e instanceof Map?I.map:typeof Set<"u"&&e instanceof Set?I.set:typeof Date<"u"&&e instanceof Date?I.date:I.object;default:return I.unknown}}});var $,xP,mt,qs=_(()=>{pi();$=te.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"]),xP=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),mt=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,te.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()}};mt.create=e=>new mt(e)});var wP,kr,Vu=_(()=>{qs();pi();wP=(e,t)=>{let r;switch(e.code){case $.invalid_type:e.received===I.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case $.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,te.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:r=`Unrecognized key(s) in object: ${te.joinValues(e.keys,", ")}`;break;case $.invalid_union:r="Invalid input";break;case $.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${te.joinValues(e.options)}`;break;case $.invalid_enum_value:r=`Invalid enum value. Expected ${te.joinValues(e.options)}, received '${e.received}'`;break;case $.invalid_arguments:r="Invalid function arguments";break;case $.invalid_return_type:r="Invalid function return type";break;case $.invalid_date:r="Invalid date";break;case $.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}"`:te.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case $.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 $.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 $.custom:r="Invalid input";break;case $.invalid_intersection_types:r="Intersection results could not be merged";break;case $.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case $.not_finite:r="Number must be finite";break;default:r=t.defaultError,te.assertNever(e)}return{message:r}},kr=wP});function kP(e){Hg=e}function lo(){return Hg}var Hg,Fs=_(()=>{Vu();Hg=kr});function E(e,t){let r=lo(),n=di({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===kr?void 0:kr].filter(o=>!!o)});e.common.issues.push(n)}var di,SP,Fe,Z,vn,Xe,Us,Bs,Vr,po,Hu=_(()=>{Fs();Vu();di=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}},SP=[];Fe=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 Z;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 Z;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}}},Z=Object.freeze({status:"aborted"}),vn=e=>({status:"dirty",value:e}),Xe=e=>({status:"valid",value:e}),Us=e=>e.status==="aborted",Bs=e=>e.status==="dirty",Vr=e=>e.status==="valid",po=e=>typeof Promise<"u"&&e instanceof Promise});var Gg=_(()=>{});var A,Wg=_(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(A||(A={}))});function G(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}}function Qg(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 qP(e){return new RegExp(`^${Qg(e)}$`)}function Xg(e){let t=`${Yg}T${Qg(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 FP(e,t){return!!((t==="v4"||!t)&&OP.test(e)||(t==="v6"||!t)&&DP.test(e))}function UP(e,t){if(!IP.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 BP(e,t){return!!((t==="v4"||!t)&&NP.test(e)||(t==="v6"||!t)&&jP.test(e))}function VP(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 fo(e){if(e instanceof yt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=gt.create(fo(n))}return new yt({...e._def,shape:()=>t})}else return e instanceof Tr?new Tr({...e._def,type:fo(e.element)}):e instanceof gt?gt.create(fo(e.unwrap())):e instanceof lr?lr.create(fo(e.unwrap())):e instanceof ur?ur.create(e.items.map(t=>fo(t))):e}function Wu(e,t){let r=cr(e),n=cr(t);if(e===t)return{valid:!0,data:e};if(r===I.object&&n===I.object){let o=te.objectKeys(t),i=te.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Wu(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===I.array&&n===I.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=Wu(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===I.date&&n===I.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function ey(e,t){return new In({values:e,typeName:P.ZodEnum,...G(t)})}function Jg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function ty(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=Jg(t,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Jg(t,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Gr.create()}var At,Kg,J,$P,TP,PP,CP,EP,IP,zP,RP,AP,Gu,OP,NP,DP,jP,MP,LP,Yg,ZP,Hr,bn,xn,wn,kn,ho,Sn,$n,Gr,$r,Wt,mo,Tr,yt,Tn,Sr,Vs,Pn,ur,Hs,go,yo,Gs,Cn,En,In,zn,Wr,Ot,gt,lr,Rn,An,_o,HP,fi,hi,On,GP,P,WP,ry,ny,KP,JP,oy,YP,QP,XP,eC,tC,rC,nC,oC,iC,Ku,sC,aC,cC,uC,lC,pC,dC,fC,hC,mC,gC,yC,_C,vC,bC,xC,wC,kC,SC,$C,TC,PC,CC,EC,iy=_(()=>{qs();Fs();Wg();Hu();pi();At=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}},Kg=(e,t)=>{if(Vr(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 mt(e.common.issues);return this._error=r,this._error}}};J=class{get description(){return this._def.description}_getType(t){return cr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Fe,ctx:{common:t.parent.common,data:t.data,parsedType:cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(po(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:cr(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Kg(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cr(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Vr(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=>Vr(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:cr(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(po(o)?o:Promise.resolve(o));return Kg(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:$.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 Ot({schema:this,typeName:P.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 gt.create(this,this._def)}nullable(){return lr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Tr.create(this)}promise(){return Wr.create(this,this._def)}or(t){return Tn.create([this,t],this._def)}and(t){return Pn.create(this,t,this._def)}transform(t){return new Ot({...G(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Rn({...G(this._def),innerType:this,defaultValue:r,typeName:P.ZodDefault})}brand(){return new fi({typeName:P.ZodBranded,type:this,...G(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new An({...G(this._def),innerType:this,catchValue:r,typeName:P.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return hi.create(this,t)}readonly(){return On.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$P=/^c[^\s-]{8,}$/i,TP=/^[0-9a-z]+$/,PP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,CP=/^[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,EP=/^[a-z0-9_-]{21}$/i,IP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,zP=/^[-+]?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)?)??$/,RP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,AP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",OP=/^(?:(?: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])$/,NP=/^(?:(?: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])$/,DP=/^(([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]))$/,jP=/^(([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])$/,MP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,LP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Yg="((\\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])))",ZP=new RegExp(`^${Yg}$`);Hr=class e extends J{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==I.string){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.string,received:i.parsedType}),Z}let n=new Fe,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.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),E(o,{code:$.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?E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")RP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"email",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Gu||(Gu=new RegExp(AP,"u")),Gu.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"emoji",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")CP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"uuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")EP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"nanoid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$P.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")TP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid2",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")PP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ulid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),E(o,{validation:"url",code:$.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),E(o,{validation:"regex",code:$.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),E(o,{code:$.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),E(o,{code:$.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Xg(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ZP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?qP(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?zP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"duration",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?FP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ip",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?UP(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"jwt",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?BP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cidr",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?MP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?LP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64url",code:$.invalid_string,message:i.message}),n.dirty()):te.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:$.invalid_string,...A.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...A.errToObj(t)})}url(t){return this._addCheck({kind:"url",...A.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...A.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...A.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...A.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...A.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...A.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...A.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...A.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...A.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...A.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...A.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...A.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,...A.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,...A.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...A.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...A.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...A.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...A.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...A.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...A.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...A.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...A.errToObj(r)})}nonempty(t){return this.min(1,A.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}};Hr.create=e=>new Hr({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...G(e)});bn=class e extends J{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)!==I.number){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.number,received:i.parsedType}),Z}let n,o=new Fe;for(let i of this._def.checks)i.kind==="int"?te.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.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),E(n,{code:$.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),E(n,{code:$.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?VP(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_finite,message:i.message}),o.dirty()):te.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:A.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:A.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.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"&&te.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)}};bn.create=e=>new bn({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...G(e)});xn=class e extends J{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)!==I.bigint)return this._getInvalidInput(t);let n,o=new Fe;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),E(n,{code:$.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),E(n,{code:$.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),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):te.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.bigint,received:r.parsedType}),Z}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.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:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.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}};xn.create=e=>new xn({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...G(e)});wn=class extends J{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==I.boolean){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.boolean,received:n.parsedType}),Z}return Xe(t.data)}};wn.create=e=>new wn({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...G(e)});kn=class e extends J{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==I.date){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.date,received:i.parsedType}),Z}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_date}),Z}let n=new Fe,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.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),E(o,{code:$.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):te.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:A.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:A.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}};kn.create=e=>new kn({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...G(e)});ho=class extends J{_parse(t){if(this._getType(t)!==I.symbol){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.symbol,received:n.parsedType}),Z}return Xe(t.data)}};ho.create=e=>new ho({typeName:P.ZodSymbol,...G(e)});Sn=class extends J{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.undefined,received:n.parsedType}),Z}return Xe(t.data)}};Sn.create=e=>new Sn({typeName:P.ZodUndefined,...G(e)});$n=class extends J{_parse(t){if(this._getType(t)!==I.null){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.null,received:n.parsedType}),Z}return Xe(t.data)}};$n.create=e=>new $n({typeName:P.ZodNull,...G(e)});Gr=class extends J{constructor(){super(...arguments),this._any=!0}_parse(t){return Xe(t.data)}};Gr.create=e=>new Gr({typeName:P.ZodAny,...G(e)});$r=class extends J{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Xe(t.data)}};$r.create=e=>new $r({typeName:P.ZodUnknown,...G(e)});Wt=class extends J{_parse(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.never,received:r.parsedType}),Z}};Wt.create=e=>new Wt({typeName:P.ZodNever,...G(e)});mo=class extends J{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.void,received:n.parsedType}),Z}return Xe(t.data)}};mo.create=e=>new mo({typeName:P.ZodVoid,...G(e)});Tr=class e extends J{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==I.array)return E(r,{code:$.invalid_type,expected:I.array,received:r.parsedType}),Z;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(E(r,{code:s?$.too_big:$.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&&(E(r,{code:$.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&&(E(r,{code:$.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 At(r,s,r.path,a)))).then(s=>Fe.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new At(r,s,r.path,a)));return Fe.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:A.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:A.toString(r)}})}nonempty(t){return this.min(1,t)}};Tr.create=(e,t)=>new Tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...G(t)});yt=class e extends J{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=te.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==I.object){let u=this._getOrReturnCtx(t);return E(u,{code:$.invalid_type,expected:I.object,received:u.parsedType}),Z}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Wt&&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 At(o,l,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Wt){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&&(E(o,{code:$.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 At(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=>Fe.mergeObjectSync(n,u)):Fe.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return A.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:A.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:P.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 te.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 te.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return fo(this)}partial(t){let r={};for(let n of te.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 te.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof gt;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return ey(te.objectKeys(this.shape))}};yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:Wt.create(),typeName:P.ZodObject,...G(t)});yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:Wt.create(),typeName:P.ZodObject,...G(t)});yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:Wt.create(),typeName:P.ZodObject,...G(t)});Tn=class extends J{_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 mt(a.ctx.common.issues));return E(r,{code:$.invalid_union,unionErrors:s}),Z}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 mt(c));return E(r,{code:$.invalid_union,unionErrors:a}),Z}}get options(){return this._def.options}};Tn.create=(e,t)=>new Tn({options:e,typeName:P.ZodUnion,...G(t)});Sr=e=>e instanceof Cn?Sr(e.schema):e instanceof Ot?Sr(e.innerType()):e instanceof En?[e.value]:e instanceof In?e.options:e instanceof zn?te.objectValues(e.enum):e instanceof Rn?Sr(e._def.innerType):e instanceof Sn?[void 0]:e instanceof $n?[null]:e instanceof gt?[void 0,...Sr(e.unwrap())]:e instanceof lr?[null,...Sr(e.unwrap())]:e instanceof fi||e instanceof On?Sr(e.unwrap()):e instanceof An?Sr(e._def.innerType):[],Vs=class e extends J{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.object)return E(r,{code:$.invalid_type,expected:I.object,received:r.parsedType}),Z;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}):(E(r,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Z)}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=Sr(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:P.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...G(n)})}};Pn=class extends J{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,s)=>{if(Us(i)||Us(s))return Z;let a=Wu(i.value,s.value);return a.valid?((Bs(i)||Bs(s))&&r.dirty(),{status:r.value,value:a.data}):(E(n,{code:$.invalid_intersection_types}),Z)};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}))}};Pn.create=(e,t,r)=>new Pn({left:e,right:t,typeName:P.ZodIntersection,...G(r)});ur=class e extends J{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.array)return E(n,{code:$.invalid_type,expected:I.array,received:n.parsedType}),Z;if(n.data.length<this._def.items.length)return E(n,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Z;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:$.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 At(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>Fe.mergeArray(r,s)):Fe.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ur.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ur({items:e,typeName:P.ZodTuple,rest:null,...G(t)})};Hs=class e extends J{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!==I.object)return E(n,{code:$.invalid_type,expected:I.object,received:n.parsedType}),Z;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new At(n,a,n.path,a)),value:s._parse(new At(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Fe.mergeObjectAsync(r,o):Fe.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof J?new e({keyType:t,valueType:r,typeName:P.ZodRecord,...G(n)}):new e({keyType:Hr.create(),valueType:t,typeName:P.ZodRecord,...G(r)})}},go=class extends J{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!==I.map)return E(n,{code:$.invalid_type,expected:I.map,received:n.parsedType}),Z;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new At(n,a,n.path,[u,"key"])),value:i._parse(new At(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 Z;(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 Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}}}};go.create=(e,t,r)=>new go({valueType:t,keyType:e,typeName:P.ZodMap,...G(r)});yo=class e extends J{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.set)return E(n,{code:$.invalid_type,expected:I.set,received:n.parsedType}),Z;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(E(n,{code:$.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&&(E(n,{code:$.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 Z;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 At(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:A.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:A.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};yo.create=(e,t)=>new yo({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...G(t)});Gs=class e extends J{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.function)return E(r,{code:$.invalid_type,expected:I.function,received:r.parsedType}),Z;function n(a,c){return di({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,lo(),kr].filter(u=>!!u),issueData:{code:$.invalid_arguments,argumentsError:c}})}function o(a,c){return di({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,lo(),kr].filter(u=>!!u),issueData:{code:$.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Wr){let a=this;return Xe(async function(...c){let u=new mt([]),p=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),l=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(l,i).catch(f=>{throw u.addIssue(o(l,f)),u})})}else{let a=this;return Xe(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new mt([n(c,u.error)]);let p=Reflect.apply(s,this,u.data),l=a._def.returns.safeParse(p,i);if(!l.success)throw new mt([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:ur.create(t).rest($r.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||ur.create([]).rest($r.create()),returns:r||$r.create(),typeName:P.ZodFunction,...G(n)})}},Cn=class extends J{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})}};Cn.create=(e,t)=>new Cn({getter:e,typeName:P.ZodLazy,...G(t)});En=class extends J{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return E(r,{received:r.data,code:$.invalid_literal,expected:this._def.value}),Z}return{status:"valid",value:t.data}}get value(){return this._def.value}};En.create=(e,t)=>new En({value:e,typeName:P.ZodLiteral,...G(t)});In=class e extends J{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{expected:te.joinValues(n),received:r.parsedType,code:$.invalid_type}),Z}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 E(r,{received:r.data,code:$.invalid_enum_value,options:n}),Z}return Xe(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})}};In.create=ey;zn=class extends J{_parse(t){let r=te.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==I.string&&n.parsedType!==I.number){let o=te.objectValues(r);return E(n,{expected:te.joinValues(o),received:n.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(te.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=te.objectValues(r);return E(n,{received:n.data,code:$.invalid_enum_value,options:o}),Z}return Xe(t.data)}get enum(){return this._def.values}};zn.create=(e,t)=>new zn({values:e,typeName:P.ZodNativeEnum,...G(t)});Wr=class extends J{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.promise&&r.common.async===!1)return E(r,{code:$.invalid_type,expected:I.promise,received:r.parsedType}),Z;let n=r.parsedType===I.promise?r.data:Promise.resolve(r.data);return Xe(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Wr.create=(e,t)=>new Wr({type:e,typeName:P.ZodPromise,...G(t)});Ot=class extends J{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.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=>{E(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 Z;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Z:c.status==="dirty"?vn(c.value):r.value==="dirty"?vn(c.value):c});{if(r.value==="aborted")return Z;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?Z:a.status==="dirty"?vn(a.value):r.value==="dirty"?vn(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"?Z:(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"?Z:(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(!Vr(s))return Z;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=>Vr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):Z);te.assertNever(o)}};Ot.create=(e,t,r)=>new Ot({schema:e,typeName:P.ZodEffects,effect:t,...G(r)});Ot.createWithPreprocess=(e,t,r)=>new Ot({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...G(r)});gt=class extends J{_parse(t){return this._getType(t)===I.undefined?Xe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};gt.create=(e,t)=>new gt({innerType:e,typeName:P.ZodOptional,...G(t)});lr=class extends J{_parse(t){return this._getType(t)===I.null?Xe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lr.create=(e,t)=>new lr({innerType:e,typeName:P.ZodNullable,...G(t)});Rn=class extends J{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===I.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...G(t)});An=class extends J{_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 po(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new mt(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new mt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};An.create=(e,t)=>new An({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...G(t)});_o=class extends J{_parse(t){if(this._getType(t)!==I.nan){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.nan,received:n.parsedType}),Z}return{status:"valid",value:t.data}}};_o.create=e=>new _o({typeName:P.ZodNaN,...G(e)});HP=Symbol("zod_brand"),fi=class extends J{_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}},hi=class e extends J{_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"?Z:i.status==="dirty"?(r.dirty(),vn(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"?Z: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:P.ZodPipeline})}},On=class extends J{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Vr(o)&&(o.value=Object.freeze(o.value)),o);return po(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};On.create=(e,t)=>new On({innerType:e,typeName:P.ZodReadonly,...G(t)});GP={object:yt.lazycreate};(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"})(P||(P={}));WP=(e,t={message:`Input not instance of ${e.name}`})=>ty(r=>r instanceof e,t),ry=Hr.create,ny=bn.create,KP=_o.create,JP=xn.create,oy=wn.create,YP=kn.create,QP=ho.create,XP=Sn.create,eC=$n.create,tC=Gr.create,rC=$r.create,nC=Wt.create,oC=mo.create,iC=Tr.create,Ku=yt.create,sC=yt.strictCreate,aC=Tn.create,cC=Vs.create,uC=Pn.create,lC=ur.create,pC=Hs.create,dC=go.create,fC=yo.create,hC=Gs.create,mC=Cn.create,gC=En.create,yC=In.create,_C=zn.create,vC=Wr.create,bC=Ot.create,xC=gt.create,wC=lr.create,kC=Ot.createWithPreprocess,SC=hi.create,$C=()=>ry().optional(),TC=()=>ny().optional(),PC=()=>oy().optional(),CC={string:(e=>Hr.create({...e,coerce:!0})),number:(e=>bn.create({...e,coerce:!0})),boolean:(e=>wn.create({...e,coerce:!0})),bigint:(e=>xn.create({...e,coerce:!0})),date:(e=>kn.create({...e,coerce:!0}))},EC=Z});var m={};Br(m,{BRAND:()=>HP,DIRTY:()=>vn,EMPTY_PATH:()=>SP,INVALID:()=>Z,NEVER:()=>EC,OK:()=>Xe,ParseStatus:()=>Fe,Schema:()=>J,ZodAny:()=>Gr,ZodArray:()=>Tr,ZodBigInt:()=>xn,ZodBoolean:()=>wn,ZodBranded:()=>fi,ZodCatch:()=>An,ZodDate:()=>kn,ZodDefault:()=>Rn,ZodDiscriminatedUnion:()=>Vs,ZodEffects:()=>Ot,ZodEnum:()=>In,ZodError:()=>mt,ZodFirstPartyTypeKind:()=>P,ZodFunction:()=>Gs,ZodIntersection:()=>Pn,ZodIssueCode:()=>$,ZodLazy:()=>Cn,ZodLiteral:()=>En,ZodMap:()=>go,ZodNaN:()=>_o,ZodNativeEnum:()=>zn,ZodNever:()=>Wt,ZodNull:()=>$n,ZodNullable:()=>lr,ZodNumber:()=>bn,ZodObject:()=>yt,ZodOptional:()=>gt,ZodParsedType:()=>I,ZodPipeline:()=>hi,ZodPromise:()=>Wr,ZodReadonly:()=>On,ZodRecord:()=>Hs,ZodSchema:()=>J,ZodSet:()=>yo,ZodString:()=>Hr,ZodSymbol:()=>ho,ZodTransformer:()=>Ot,ZodTuple:()=>ur,ZodType:()=>J,ZodUndefined:()=>Sn,ZodUnion:()=>Tn,ZodUnknown:()=>$r,ZodVoid:()=>mo,addIssueToContext:()=>E,any:()=>tC,array:()=>iC,bigint:()=>JP,boolean:()=>oy,coerce:()=>CC,custom:()=>ty,date:()=>YP,datetimeRegex:()=>Xg,defaultErrorMap:()=>kr,discriminatedUnion:()=>cC,effect:()=>bC,enum:()=>yC,function:()=>hC,getErrorMap:()=>lo,getParsedType:()=>cr,instanceof:()=>WP,intersection:()=>uC,isAborted:()=>Us,isAsync:()=>po,isDirty:()=>Bs,isValid:()=>Vr,late:()=>GP,lazy:()=>mC,literal:()=>gC,makeIssue:()=>di,map:()=>dC,nan:()=>KP,nativeEnum:()=>_C,never:()=>nC,null:()=>eC,nullable:()=>wC,number:()=>ny,object:()=>Ku,objectUtil:()=>Bu,oboolean:()=>PC,onumber:()=>TC,optional:()=>xC,ostring:()=>$C,pipeline:()=>SC,preprocess:()=>kC,promise:()=>vC,quotelessJson:()=>xP,record:()=>pC,set:()=>fC,setErrorMap:()=>kP,strictObject:()=>sC,string:()=>ry,symbol:()=>QP,transformer:()=>bC,tuple:()=>lC,undefined:()=>XP,union:()=>aC,unknown:()=>rC,util:()=>te,void:()=>oC});var Ws=_(()=>{Fs();Hu();Gg();pi();iy();qs()});var mi=_(()=>{Ws()});function w(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}function Pt(e){return e&&Object.assign(Ks,e),Ks}var zC,RC,Pr,Ks,vo=_(()=>{zC=Object.freeze({status:"aborted"});RC=Symbol("zod_brand"),Pr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ks={}});var oe={};Br(oe,{BIGINT_FORMAT_RANGES:()=>ay,Class:()=>Yu,NUMBER_FORMAT_RANGES:()=>ol,aborted:()=>Dn,allowsEval:()=>tl,assert:()=>jC,assertEqual:()=>AC,assertIs:()=>NC,assertNever:()=>DC,assertNotEqual:()=>OC,assignProp:()=>el,cached:()=>_i,captureStackTrace:()=>Ys,cleanEnum:()=>JC,cleanRegex:()=>bi,clone:()=>Ct,createTransparentProxy:()=>UC,defineLazy:()=>ve,esc:()=>Nn,escapeRegex:()=>Kr,extend:()=>HC,finalizeIssue:()=>Kt,floatSafeRemainder:()=>Xu,getElementAtPath:()=>MC,getEnumValues:()=>yi,getLengthableOrigin:()=>xi,getParsedType:()=>FC,getSizableOrigin:()=>cy,isObject:()=>bo,isPlainObject:()=>xo,issue:()=>il,joinValues:()=>Js,jsonStringifyReplacer:()=>Qu,merge:()=>GC,normalizeParams:()=>q,nullish:()=>vi,numKeys:()=>qC,omit:()=>VC,optionalKeys:()=>nl,partial:()=>WC,pick:()=>BC,prefixIssues:()=>pr,primitiveTypes:()=>sy,promiseAllObject:()=>LC,propertyKeyTypes:()=>rl,randomString:()=>ZC,required:()=>KC,stringifyPrimitive:()=>Qs,unwrapMessage:()=>gi});function AC(e){return e}function OC(e){return e}function NC(e){}function DC(e){throw new Error}function jC(e){}function yi(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 Js(e,t="|"){return e.map(r=>Qs(r)).join(t)}function Qu(e,t){return typeof t=="bigint"?t.toString():t}function _i(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function vi(e){return e==null}function bi(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Xu(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 ve(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 el(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function MC(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function LC(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 ZC(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Nn(e){return JSON.stringify(e)}function bo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xo(e){if(bo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(bo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function qC(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Kr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ct(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function q(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 UC(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 Qs(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function nl(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function BC(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 Ct(e,{...e._zod.def,shape:r,checks:[]})}function VC(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 Ct(e,{...e._zod.def,shape:r,checks:[]})}function HC(e,t){if(!xo(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 el(this,"shape",n),n},checks:[]};return Ct(e,r)}function GC(e,t){return Ct(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return el(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function WC(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 Ct(t,{...t._zod.def,shape:o,checks:[]})}function KC(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 Ct(t,{...t._zod.def,shape:o,checks:[]})}function Dn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function pr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function gi(e){return typeof e=="string"?e:e?.message}function Kt(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=gi(e.inst?._zod.def?.error?.(e))??gi(t?.error?.(e))??gi(r.customError?.(e))??gi(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function cy(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function xi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function il(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function JC(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Ys,tl,FC,rl,sy,ol,ay,Yu,dr=_(()=>{Ys=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};tl=_i(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});FC=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}`)}},rl=new Set(["string","number","symbol"]),sy=new Set(["string","number","bigint","boolean","symbol","undefined"]);ol={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]},ay={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Yu=class{constructor(...t){}}});function sl(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 al(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 uy,Xs,wi,cl=_(()=>{vo();dr();uy=(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,Qu,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xs=w("$ZodError",uy),wi=w("$ZodError",uy,{Parent:Error})});var ul,ll,pl,dl,fl,jn,hl,Mn,ml=_(()=>{vo();cl();dr();ul=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 Pr;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Kt(c,i,Pt())));throw Ys(a,o?.callee),a}return s.value},ll=ul(wi),pl=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=>Kt(c,i,Pt())));throw Ys(a,o?.callee),a}return s.value},dl=pl(wi),fl=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 Pr;return i.issues.length?{success:!1,error:new(e??Xs)(i.issues.map(s=>Kt(s,o,Pt())))}:{success:!0,data:i.value}},jn=fl(wi),hl=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=>Kt(s,o,Pt())))}:{success:!0,data:i.value}},Mn=hl(wi)});function vy(){return new RegExp(QC,"u")}function Ey(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 Iy(e){return new RegExp(`^${Ey(e)}$`)}function zy(e){let t=Ey({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(`^${Py}T(?:${n})$`)}var ly,py,dy,fy,hy,my,gy,yy,gl,_y,QC,by,xy,wy,ky,Sy,yl,$y,Ty,Py,Cy,Ry,Ay,Oy,Ny,Dy,jy,My,ta=_(()=>{ly=/^[cC][^\s-]{8,}$/,py=/^[0-9a-z]+$/,dy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fy=/^[0-9a-vA-V]{20}$/,hy=/^[A-Za-z0-9]{27}$/,my=/^[a-zA-Z0-9_-]{21}$/,gy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yy=/^([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})$/,gl=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)$/,_y=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,QC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";by=/^(?:(?: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])$/,xy=/^(([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})$/,wy=/^((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])$/,ky=/^(([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])$/,Sy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yl=/^[A-Za-z0-9_-]*$/,$y=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Ty=/^\+(?:[0-9]){6,14}[0-9]$/,Py="(?:(?:\\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])))",Cy=new RegExp(`^${Py}$`);Ry=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ay=/^\d+$/,Oy=/^-?\d+(?:\.\d+)?/i,Ny=/true|false/i,Dy=/null/i,jy=/^[^A-Z]*$/,My=/^[^a-z]*$/});var Ue,Ly,_l,vl,Zy,qy,Fy,Uy,By,ki,Vy,Hy,Gy,Wy,Ky,Jy,Yy,ra=_(()=>{vo();ta();dr();Ue=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Ly={number:"number",bigint:"bigint",object:"date"},_l=w("$ZodCheckLessThan",(e,t)=>{Ue.init(e,t);let r=Ly[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})}}),vl=w("$ZodCheckGreaterThan",(e,t)=>{Ue.init(e,t);let r=Ly[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})}}),Zy=w("$ZodCheckMultipleOf",(e,t)=>{Ue.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):Xu(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})}}),qy=w("$ZodCheckNumberFormat",(e,t)=>{Ue.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=ol[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=Ay)}),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})}}),Fy=w("$ZodCheckMaxLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(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=xi(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Uy=w("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(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=xi(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),By=w("$ZodCheckLengthEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(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=xi(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})}}),ki=w("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.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=()=>{})}),Vy=w("$ZodCheckRegex",(e,t)=>{ki.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})}}),Hy=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=jy),ki.init(e,t)}),Gy=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=My),ki.init(e,t)}),Wy=w("$ZodCheckIncludes",(e,t)=>{Ue.init(e,t);let r=Kr(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})}}),Ky=w("$ZodCheckStartsWith",(e,t)=>{Ue.init(e,t);let r=new RegExp(`^${Kr(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})}}),Jy=w("$ZodCheckEndsWith",(e,t)=>{Ue.init(e,t);let r=new RegExp(`.*${Kr(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})}}),Yy=w("$ZodCheckOverwrite",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var na,bl=_(()=>{na=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(`
1
+ "use strict";var mP=Object.create;var Uu=Object.defineProperty;var gP=Object.getOwnPropertyDescriptor;var yP=Object.getOwnPropertyNames;var _P=Object.getPrototypeOf,vP=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Br=(e,t)=>{for(var r in t)Uu(e,r,{get:t[r],enumerable:!0})},bP=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of yP(t))!vP.call(e,o)&&o!==r&&Uu(e,o,{get:()=>t[o],enumerable:!(n=gP(t,o))||n.enumerable});return e};var st=(e,t,r)=>(r=e!=null?mP(_P(e)):{},bP(t||!e||!e.__esModule?Uu(r,"default",{value:e,enumerable:!0}):r,e));var te,Bu,I,cr,pi=_(()=>{(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})(te||(te={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Bu||(Bu={}));I=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=e=>{switch(typeof e){case"undefined":return I.undefined;case"string":return I.string;case"number":return Number.isNaN(e)?I.nan:I.number;case"boolean":return I.boolean;case"function":return I.function;case"bigint":return I.bigint;case"symbol":return I.symbol;case"object":return Array.isArray(e)?I.array:e===null?I.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?I.promise:typeof Map<"u"&&e instanceof Map?I.map:typeof Set<"u"&&e instanceof Set?I.set:typeof Date<"u"&&e instanceof Date?I.date:I.object;default:return I.unknown}}});var $,xP,mt,qs=_(()=>{pi();$=te.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"]),xP=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),mt=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,te.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()}};mt.create=e=>new mt(e)});var wP,kr,Hu=_(()=>{qs();pi();wP=(e,t)=>{let r;switch(e.code){case $.invalid_type:e.received===I.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case $.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,te.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:r=`Unrecognized key(s) in object: ${te.joinValues(e.keys,", ")}`;break;case $.invalid_union:r="Invalid input";break;case $.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${te.joinValues(e.options)}`;break;case $.invalid_enum_value:r=`Invalid enum value. Expected ${te.joinValues(e.options)}, received '${e.received}'`;break;case $.invalid_arguments:r="Invalid function arguments";break;case $.invalid_return_type:r="Invalid function return type";break;case $.invalid_date:r="Invalid date";break;case $.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}"`:te.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case $.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 $.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 $.custom:r="Invalid input";break;case $.invalid_intersection_types:r="Intersection results could not be merged";break;case $.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case $.not_finite:r="Number must be finite";break;default:r=t.defaultError,te.assertNever(e)}return{message:r}},kr=wP});function kP(e){Vg=e}function lo(){return Vg}var Vg,Fs=_(()=>{Hu();Vg=kr});function E(e,t){let r=lo(),n=di({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===kr?void 0:kr].filter(o=>!!o)});e.common.issues.push(n)}var di,SP,Ue,Z,vn,et,Us,Bs,Hr,po,Vu=_(()=>{Fs();Hu();di=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}},SP=[];Ue=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 Z;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 Z;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}}},Z=Object.freeze({status:"aborted"}),vn=e=>({status:"dirty",value:e}),et=e=>({status:"valid",value:e}),Us=e=>e.status==="aborted",Bs=e=>e.status==="dirty",Hr=e=>e.status==="valid",po=e=>typeof Promise<"u"&&e instanceof Promise});var Gg=_(()=>{});var R,Wg=_(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(R||(R={}))});function G(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}}function Qg(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 qP(e){return new RegExp(`^${Qg(e)}$`)}function Xg(e){let t=`${Yg}T${Qg(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 FP(e,t){return!!((t==="v4"||!t)&&OP.test(e)||(t==="v6"||!t)&&DP.test(e))}function UP(e,t){if(!IP.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 BP(e,t){return!!((t==="v4"||!t)&&NP.test(e)||(t==="v6"||!t)&&jP.test(e))}function HP(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 fo(e){if(e instanceof yt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=gt.create(fo(n))}return new yt({...e._def,shape:()=>t})}else return e instanceof Tr?new Tr({...e._def,type:fo(e.element)}):e instanceof gt?gt.create(fo(e.unwrap())):e instanceof lr?lr.create(fo(e.unwrap())):e instanceof ur?ur.create(e.items.map(t=>fo(t))):e}function Wu(e,t){let r=cr(e),n=cr(t);if(e===t)return{valid:!0,data:e};if(r===I.object&&n===I.object){let o=te.objectKeys(t),i=te.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Wu(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===I.array&&n===I.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=Wu(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===I.date&&n===I.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function ey(e,t){return new In({values:e,typeName:P.ZodEnum,...G(t)})}function Jg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function ty(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=Jg(t,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Jg(t,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Gr.create()}var Rt,Kg,J,$P,TP,PP,CP,EP,IP,zP,AP,RP,Gu,OP,NP,DP,jP,MP,LP,Yg,ZP,Vr,bn,xn,wn,kn,ho,Sn,$n,Gr,$r,Wt,mo,Tr,yt,Tn,Sr,Hs,Pn,ur,Vs,go,yo,Gs,Cn,En,In,zn,Wr,Ot,gt,lr,An,Rn,_o,VP,fi,hi,On,GP,P,WP,ry,ny,KP,JP,oy,YP,QP,XP,eC,tC,rC,nC,oC,iC,Ku,sC,aC,cC,uC,lC,pC,dC,fC,hC,mC,gC,yC,_C,vC,bC,xC,wC,kC,SC,$C,TC,PC,CC,EC,iy=_(()=>{qs();Fs();Wg();Vu();pi();Rt=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}},Kg=(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 mt(e.common.issues);return this._error=r,this._error}}};J=class{get description(){return this._def.description}_getType(t){return cr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ue,ctx:{common:t.parent.common,data:t.data,parsedType:cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(po(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:cr(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Kg(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cr(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:cr(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(po(o)?o:Promise.resolve(o));return Kg(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:$.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 Ot({schema:this,typeName:P.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 gt.create(this,this._def)}nullable(){return lr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Tr.create(this)}promise(){return Wr.create(this,this._def)}or(t){return Tn.create([this,t],this._def)}and(t){return Pn.create(this,t,this._def)}transform(t){return new Ot({...G(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new An({...G(this._def),innerType:this,defaultValue:r,typeName:P.ZodDefault})}brand(){return new fi({typeName:P.ZodBranded,type:this,...G(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Rn({...G(this._def),innerType:this,catchValue:r,typeName:P.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return hi.create(this,t)}readonly(){return On.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$P=/^c[^\s-]{8,}$/i,TP=/^[0-9a-z]+$/,PP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,CP=/^[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,EP=/^[a-z0-9_-]{21}$/i,IP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,zP=/^[-+]?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)?)??$/,AP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",OP=/^(?:(?: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])$/,NP=/^(?:(?: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])$/,DP=/^(([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]))$/,jP=/^(([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])$/,MP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,LP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Yg="((\\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])))",ZP=new RegExp(`^${Yg}$`);Vr=class e extends J{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==I.string){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.string,received:i.parsedType}),Z}let n=new Ue,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.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),E(o,{code:$.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?E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")AP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"email",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Gu||(Gu=new RegExp(RP,"u")),Gu.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"emoji",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")CP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"uuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")EP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"nanoid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$P.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")TP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid2",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")PP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ulid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),E(o,{validation:"url",code:$.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),E(o,{validation:"regex",code:$.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),E(o,{code:$.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),E(o,{code:$.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Xg(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ZP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?qP(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?zP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"duration",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?FP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ip",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?UP(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"jwt",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?BP(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cidr",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?MP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?LP.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64url",code:$.invalid_string,message:i.message}),n.dirty()):te.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:$.invalid_string,...R.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...R.errToObj(t)})}url(t){return this._addCheck({kind:"url",...R.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...R.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...R.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...R.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...R.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...R.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...R.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...R.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...R.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...R.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...R.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...R.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,...R.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,...R.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...R.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...R.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...R.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...R.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...R.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...R.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...R.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...R.errToObj(r)})}nonempty(t){return this.min(1,R.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}};Vr.create=e=>new Vr({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...G(e)});bn=class e extends J{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)!==I.number){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.number,received:i.parsedType}),Z}let n,o=new Ue;for(let i of this._def.checks)i.kind==="int"?te.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.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),E(n,{code:$.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),E(n,{code:$.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?HP(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_finite,message:i.message}),o.dirty()):te.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,R.toString(r))}gt(t,r){return this.setLimit("min",t,!1,R.toString(r))}lte(t,r){return this.setLimit("max",t,!0,R.toString(r))}lt(t,r){return this.setLimit("max",t,!1,R.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:R.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:R.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:R.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.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"&&te.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)}};bn.create=e=>new bn({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...G(e)});xn=class e extends J{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)!==I.bigint)return this._getInvalidInput(t);let n,o=new Ue;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),E(n,{code:$.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),E(n,{code:$.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),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):te.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.bigint,received:r.parsedType}),Z}gte(t,r){return this.setLimit("min",t,!0,R.toString(r))}gt(t,r){return this.setLimit("min",t,!1,R.toString(r))}lte(t,r){return this.setLimit("max",t,!0,R.toString(r))}lt(t,r){return this.setLimit("max",t,!1,R.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:R.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:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:R.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}};xn.create=e=>new xn({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...G(e)});wn=class extends J{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==I.boolean){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.boolean,received:n.parsedType}),Z}return et(t.data)}};wn.create=e=>new wn({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...G(e)});kn=class e extends J{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==I.date){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.date,received:i.parsedType}),Z}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_date}),Z}let n=new Ue,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.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),E(o,{code:$.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):te.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:R.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:R.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}};kn.create=e=>new kn({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...G(e)});ho=class extends J{_parse(t){if(this._getType(t)!==I.symbol){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.symbol,received:n.parsedType}),Z}return et(t.data)}};ho.create=e=>new ho({typeName:P.ZodSymbol,...G(e)});Sn=class extends J{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.undefined,received:n.parsedType}),Z}return et(t.data)}};Sn.create=e=>new Sn({typeName:P.ZodUndefined,...G(e)});$n=class extends J{_parse(t){if(this._getType(t)!==I.null){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.null,received:n.parsedType}),Z}return et(t.data)}};$n.create=e=>new $n({typeName:P.ZodNull,...G(e)});Gr=class extends J{constructor(){super(...arguments),this._any=!0}_parse(t){return et(t.data)}};Gr.create=e=>new Gr({typeName:P.ZodAny,...G(e)});$r=class extends J{constructor(){super(...arguments),this._unknown=!0}_parse(t){return et(t.data)}};$r.create=e=>new $r({typeName:P.ZodUnknown,...G(e)});Wt=class extends J{_parse(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.never,received:r.parsedType}),Z}};Wt.create=e=>new Wt({typeName:P.ZodNever,...G(e)});mo=class extends J{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.void,received:n.parsedType}),Z}return et(t.data)}};mo.create=e=>new mo({typeName:P.ZodVoid,...G(e)});Tr=class e extends J{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==I.array)return E(r,{code:$.invalid_type,expected:I.array,received:r.parsedType}),Z;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(E(r,{code:s?$.too_big:$.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&&(E(r,{code:$.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&&(E(r,{code:$.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 Rt(r,s,r.path,a)))).then(s=>Ue.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new Rt(r,s,r.path,a)));return Ue.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:R.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:R.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:R.toString(r)}})}nonempty(t){return this.min(1,t)}};Tr.create=(e,t)=>new Tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...G(t)});yt=class e extends J{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=te.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==I.object){let u=this._getOrReturnCtx(t);return E(u,{code:$.invalid_type,expected:I.object,received:u.parsedType}),Z}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Wt&&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 Rt(o,l,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Wt){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&&(E(o,{code:$.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 Rt(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=>Ue.mergeObjectSync(n,u)):Ue.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return R.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:R.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:P.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 te.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 te.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return fo(this)}partial(t){let r={};for(let n of te.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 te.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof gt;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return ey(te.objectKeys(this.shape))}};yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:Wt.create(),typeName:P.ZodObject,...G(t)});yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:Wt.create(),typeName:P.ZodObject,...G(t)});yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:Wt.create(),typeName:P.ZodObject,...G(t)});Tn=class extends J{_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 mt(a.ctx.common.issues));return E(r,{code:$.invalid_union,unionErrors:s}),Z}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 mt(c));return E(r,{code:$.invalid_union,unionErrors:a}),Z}}get options(){return this._def.options}};Tn.create=(e,t)=>new Tn({options:e,typeName:P.ZodUnion,...G(t)});Sr=e=>e instanceof Cn?Sr(e.schema):e instanceof Ot?Sr(e.innerType()):e instanceof En?[e.value]:e instanceof In?e.options:e instanceof zn?te.objectValues(e.enum):e instanceof An?Sr(e._def.innerType):e instanceof Sn?[void 0]:e instanceof $n?[null]:e instanceof gt?[void 0,...Sr(e.unwrap())]:e instanceof lr?[null,...Sr(e.unwrap())]:e instanceof fi||e instanceof On?Sr(e.unwrap()):e instanceof Rn?Sr(e._def.innerType):[],Hs=class e extends J{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.object)return E(r,{code:$.invalid_type,expected:I.object,received:r.parsedType}),Z;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}):(E(r,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Z)}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=Sr(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:P.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...G(n)})}};Pn=class extends J{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,s)=>{if(Us(i)||Us(s))return Z;let a=Wu(i.value,s.value);return a.valid?((Bs(i)||Bs(s))&&r.dirty(),{status:r.value,value:a.data}):(E(n,{code:$.invalid_intersection_types}),Z)};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}))}};Pn.create=(e,t,r)=>new Pn({left:e,right:t,typeName:P.ZodIntersection,...G(r)});ur=class e extends J{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.array)return E(n,{code:$.invalid_type,expected:I.array,received:n.parsedType}),Z;if(n.data.length<this._def.items.length)return E(n,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Z;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:$.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 Rt(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>Ue.mergeArray(r,s)):Ue.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ur.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ur({items:e,typeName:P.ZodTuple,rest:null,...G(t)})};Vs=class e extends J{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!==I.object)return E(n,{code:$.invalid_type,expected:I.object,received:n.parsedType}),Z;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new Rt(n,a,n.path,a)),value:s._parse(new Rt(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ue.mergeObjectAsync(r,o):Ue.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof J?new e({keyType:t,valueType:r,typeName:P.ZodRecord,...G(n)}):new e({keyType:Vr.create(),valueType:t,typeName:P.ZodRecord,...G(r)})}},go=class extends J{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!==I.map)return E(n,{code:$.invalid_type,expected:I.map,received:n.parsedType}),Z;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new Rt(n,a,n.path,[u,"key"])),value:i._parse(new Rt(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 Z;(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 Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}}}};go.create=(e,t,r)=>new go({valueType:t,keyType:e,typeName:P.ZodMap,...G(r)});yo=class e extends J{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.set)return E(n,{code:$.invalid_type,expected:I.set,received:n.parsedType}),Z;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(E(n,{code:$.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&&(E(n,{code:$.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 Z;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 Rt(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:R.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:R.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};yo.create=(e,t)=>new yo({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...G(t)});Gs=class e extends J{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.function)return E(r,{code:$.invalid_type,expected:I.function,received:r.parsedType}),Z;function n(a,c){return di({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,lo(),kr].filter(u=>!!u),issueData:{code:$.invalid_arguments,argumentsError:c}})}function o(a,c){return di({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,lo(),kr].filter(u=>!!u),issueData:{code:$.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Wr){let a=this;return et(async function(...c){let u=new mt([]),p=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),l=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(l,i).catch(f=>{throw u.addIssue(o(l,f)),u})})}else{let a=this;return et(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new mt([n(c,u.error)]);let p=Reflect.apply(s,this,u.data),l=a._def.returns.safeParse(p,i);if(!l.success)throw new mt([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:ur.create(t).rest($r.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||ur.create([]).rest($r.create()),returns:r||$r.create(),typeName:P.ZodFunction,...G(n)})}},Cn=class extends J{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})}};Cn.create=(e,t)=>new Cn({getter:e,typeName:P.ZodLazy,...G(t)});En=class extends J{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return E(r,{received:r.data,code:$.invalid_literal,expected:this._def.value}),Z}return{status:"valid",value:t.data}}get value(){return this._def.value}};En.create=(e,t)=>new En({value:e,typeName:P.ZodLiteral,...G(t)});In=class e extends J{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{expected:te.joinValues(n),received:r.parsedType,code:$.invalid_type}),Z}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 E(r,{received:r.data,code:$.invalid_enum_value,options:n}),Z}return et(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})}};In.create=ey;zn=class extends J{_parse(t){let r=te.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==I.string&&n.parsedType!==I.number){let o=te.objectValues(r);return E(n,{expected:te.joinValues(o),received:n.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(te.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=te.objectValues(r);return E(n,{received:n.data,code:$.invalid_enum_value,options:o}),Z}return et(t.data)}get enum(){return this._def.values}};zn.create=(e,t)=>new zn({values:e,typeName:P.ZodNativeEnum,...G(t)});Wr=class extends J{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.promise&&r.common.async===!1)return E(r,{code:$.invalid_type,expected:I.promise,received:r.parsedType}),Z;let n=r.parsedType===I.promise?r.data:Promise.resolve(r.data);return et(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Wr.create=(e,t)=>new Wr({type:e,typeName:P.ZodPromise,...G(t)});Ot=class extends J{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.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=>{E(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 Z;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Z:c.status==="dirty"?vn(c.value):r.value==="dirty"?vn(c.value):c});{if(r.value==="aborted")return Z;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?Z:a.status==="dirty"?vn(a.value):r.value==="dirty"?vn(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"?Z:(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"?Z:(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 Z;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})):Z);te.assertNever(o)}};Ot.create=(e,t,r)=>new Ot({schema:e,typeName:P.ZodEffects,effect:t,...G(r)});Ot.createWithPreprocess=(e,t,r)=>new Ot({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...G(r)});gt=class extends J{_parse(t){return this._getType(t)===I.undefined?et(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};gt.create=(e,t)=>new gt({innerType:e,typeName:P.ZodOptional,...G(t)});lr=class extends J{_parse(t){return this._getType(t)===I.null?et(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lr.create=(e,t)=>new lr({innerType:e,typeName:P.ZodNullable,...G(t)});An=class extends J{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===I.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};An.create=(e,t)=>new An({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...G(t)});Rn=class extends J{_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 po(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new mt(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new mt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...G(t)});_o=class extends J{_parse(t){if(this._getType(t)!==I.nan){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.nan,received:n.parsedType}),Z}return{status:"valid",value:t.data}}};_o.create=e=>new _o({typeName:P.ZodNaN,...G(e)});VP=Symbol("zod_brand"),fi=class extends J{_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}},hi=class e extends J{_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"?Z:i.status==="dirty"?(r.dirty(),vn(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"?Z: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:P.ZodPipeline})}},On=class extends J{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Hr(o)&&(o.value=Object.freeze(o.value)),o);return po(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};On.create=(e,t)=>new On({innerType:e,typeName:P.ZodReadonly,...G(t)});GP={object:yt.lazycreate};(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"})(P||(P={}));WP=(e,t={message:`Input not instance of ${e.name}`})=>ty(r=>r instanceof e,t),ry=Vr.create,ny=bn.create,KP=_o.create,JP=xn.create,oy=wn.create,YP=kn.create,QP=ho.create,XP=Sn.create,eC=$n.create,tC=Gr.create,rC=$r.create,nC=Wt.create,oC=mo.create,iC=Tr.create,Ku=yt.create,sC=yt.strictCreate,aC=Tn.create,cC=Hs.create,uC=Pn.create,lC=ur.create,pC=Vs.create,dC=go.create,fC=yo.create,hC=Gs.create,mC=Cn.create,gC=En.create,yC=In.create,_C=zn.create,vC=Wr.create,bC=Ot.create,xC=gt.create,wC=lr.create,kC=Ot.createWithPreprocess,SC=hi.create,$C=()=>ry().optional(),TC=()=>ny().optional(),PC=()=>oy().optional(),CC={string:(e=>Vr.create({...e,coerce:!0})),number:(e=>bn.create({...e,coerce:!0})),boolean:(e=>wn.create({...e,coerce:!0})),bigint:(e=>xn.create({...e,coerce:!0})),date:(e=>kn.create({...e,coerce:!0}))},EC=Z});var g={};Br(g,{BRAND:()=>VP,DIRTY:()=>vn,EMPTY_PATH:()=>SP,INVALID:()=>Z,NEVER:()=>EC,OK:()=>et,ParseStatus:()=>Ue,Schema:()=>J,ZodAny:()=>Gr,ZodArray:()=>Tr,ZodBigInt:()=>xn,ZodBoolean:()=>wn,ZodBranded:()=>fi,ZodCatch:()=>Rn,ZodDate:()=>kn,ZodDefault:()=>An,ZodDiscriminatedUnion:()=>Hs,ZodEffects:()=>Ot,ZodEnum:()=>In,ZodError:()=>mt,ZodFirstPartyTypeKind:()=>P,ZodFunction:()=>Gs,ZodIntersection:()=>Pn,ZodIssueCode:()=>$,ZodLazy:()=>Cn,ZodLiteral:()=>En,ZodMap:()=>go,ZodNaN:()=>_o,ZodNativeEnum:()=>zn,ZodNever:()=>Wt,ZodNull:()=>$n,ZodNullable:()=>lr,ZodNumber:()=>bn,ZodObject:()=>yt,ZodOptional:()=>gt,ZodParsedType:()=>I,ZodPipeline:()=>hi,ZodPromise:()=>Wr,ZodReadonly:()=>On,ZodRecord:()=>Vs,ZodSchema:()=>J,ZodSet:()=>yo,ZodString:()=>Vr,ZodSymbol:()=>ho,ZodTransformer:()=>Ot,ZodTuple:()=>ur,ZodType:()=>J,ZodUndefined:()=>Sn,ZodUnion:()=>Tn,ZodUnknown:()=>$r,ZodVoid:()=>mo,addIssueToContext:()=>E,any:()=>tC,array:()=>iC,bigint:()=>JP,boolean:()=>oy,coerce:()=>CC,custom:()=>ty,date:()=>YP,datetimeRegex:()=>Xg,defaultErrorMap:()=>kr,discriminatedUnion:()=>cC,effect:()=>bC,enum:()=>yC,function:()=>hC,getErrorMap:()=>lo,getParsedType:()=>cr,instanceof:()=>WP,intersection:()=>uC,isAborted:()=>Us,isAsync:()=>po,isDirty:()=>Bs,isValid:()=>Hr,late:()=>GP,lazy:()=>mC,literal:()=>gC,makeIssue:()=>di,map:()=>dC,nan:()=>KP,nativeEnum:()=>_C,never:()=>nC,null:()=>eC,nullable:()=>wC,number:()=>ny,object:()=>Ku,objectUtil:()=>Bu,oboolean:()=>PC,onumber:()=>TC,optional:()=>xC,ostring:()=>$C,pipeline:()=>SC,preprocess:()=>kC,promise:()=>vC,quotelessJson:()=>xP,record:()=>pC,set:()=>fC,setErrorMap:()=>kP,strictObject:()=>sC,string:()=>ry,symbol:()=>QP,transformer:()=>bC,tuple:()=>lC,undefined:()=>XP,union:()=>aC,unknown:()=>rC,util:()=>te,void:()=>oC});var Ws=_(()=>{Fs();Vu();Gg();pi();iy();qs()});var mi=_(()=>{Ws()});function w(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}function Pt(e){return e&&Object.assign(Ks,e),Ks}var zC,AC,Pr,Ks,vo=_(()=>{zC=Object.freeze({status:"aborted"});AC=Symbol("zod_brand"),Pr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ks={}});var oe={};Br(oe,{BIGINT_FORMAT_RANGES:()=>ay,Class:()=>Yu,NUMBER_FORMAT_RANGES:()=>ol,aborted:()=>Dn,allowsEval:()=>tl,assert:()=>jC,assertEqual:()=>RC,assertIs:()=>NC,assertNever:()=>DC,assertNotEqual:()=>OC,assignProp:()=>el,cached:()=>_i,captureStackTrace:()=>Ys,cleanEnum:()=>JC,cleanRegex:()=>bi,clone:()=>Ct,createTransparentProxy:()=>UC,defineLazy:()=>ve,esc:()=>Nn,escapeRegex:()=>Kr,extend:()=>VC,finalizeIssue:()=>Kt,floatSafeRemainder:()=>Xu,getElementAtPath:()=>MC,getEnumValues:()=>yi,getLengthableOrigin:()=>xi,getParsedType:()=>FC,getSizableOrigin:()=>cy,isObject:()=>bo,isPlainObject:()=>xo,issue:()=>il,joinValues:()=>Js,jsonStringifyReplacer:()=>Qu,merge:()=>GC,normalizeParams:()=>q,nullish:()=>vi,numKeys:()=>qC,omit:()=>HC,optionalKeys:()=>nl,partial:()=>WC,pick:()=>BC,prefixIssues:()=>pr,primitiveTypes:()=>sy,promiseAllObject:()=>LC,propertyKeyTypes:()=>rl,randomString:()=>ZC,required:()=>KC,stringifyPrimitive:()=>Qs,unwrapMessage:()=>gi});function RC(e){return e}function OC(e){return e}function NC(e){}function DC(e){throw new Error}function jC(e){}function yi(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 Js(e,t="|"){return e.map(r=>Qs(r)).join(t)}function Qu(e,t){return typeof t=="bigint"?t.toString():t}function _i(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function vi(e){return e==null}function bi(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Xu(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 ve(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 el(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function MC(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function LC(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 ZC(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Nn(e){return JSON.stringify(e)}function bo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xo(e){if(bo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(bo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function qC(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Kr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ct(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function q(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 UC(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 Qs(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function nl(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function BC(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 Ct(e,{...e._zod.def,shape:r,checks:[]})}function HC(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 Ct(e,{...e._zod.def,shape:r,checks:[]})}function VC(e,t){if(!xo(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 el(this,"shape",n),n},checks:[]};return Ct(e,r)}function GC(e,t){return Ct(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return el(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function WC(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 Ct(t,{...t._zod.def,shape:o,checks:[]})}function KC(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 Ct(t,{...t._zod.def,shape:o,checks:[]})}function Dn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function pr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function gi(e){return typeof e=="string"?e:e?.message}function Kt(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=gi(e.inst?._zod.def?.error?.(e))??gi(t?.error?.(e))??gi(r.customError?.(e))??gi(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function cy(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function xi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function il(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function JC(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Ys,tl,FC,rl,sy,ol,ay,Yu,dr=_(()=>{Ys=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};tl=_i(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});FC=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}`)}},rl=new Set(["string","number","symbol"]),sy=new Set(["string","number","bigint","boolean","symbol","undefined"]);ol={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]},ay={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Yu=class{constructor(...t){}}});function sl(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 al(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 uy,Xs,wi,cl=_(()=>{vo();dr();uy=(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,Qu,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xs=w("$ZodError",uy),wi=w("$ZodError",uy,{Parent:Error})});var ul,ll,pl,dl,fl,jn,hl,Mn,ml=_(()=>{vo();cl();dr();ul=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 Pr;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Kt(c,i,Pt())));throw Ys(a,o?.callee),a}return s.value},ll=ul(wi),pl=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=>Kt(c,i,Pt())));throw Ys(a,o?.callee),a}return s.value},dl=pl(wi),fl=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 Pr;return i.issues.length?{success:!1,error:new(e??Xs)(i.issues.map(s=>Kt(s,o,Pt())))}:{success:!0,data:i.value}},jn=fl(wi),hl=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=>Kt(s,o,Pt())))}:{success:!0,data:i.value}},Mn=hl(wi)});function vy(){return new RegExp(QC,"u")}function Ey(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 Iy(e){return new RegExp(`^${Ey(e)}$`)}function zy(e){let t=Ey({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(`^${Py}T(?:${n})$`)}var ly,py,dy,fy,hy,my,gy,yy,gl,_y,QC,by,xy,wy,ky,Sy,yl,$y,Ty,Py,Cy,Ay,Ry,Oy,Ny,Dy,jy,My,ta=_(()=>{ly=/^[cC][^\s-]{8,}$/,py=/^[0-9a-z]+$/,dy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fy=/^[0-9a-vA-V]{20}$/,hy=/^[A-Za-z0-9]{27}$/,my=/^[a-zA-Z0-9_-]{21}$/,gy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yy=/^([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})$/,gl=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)$/,_y=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,QC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";by=/^(?:(?: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])$/,xy=/^(([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})$/,wy=/^((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])$/,ky=/^(([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])$/,Sy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yl=/^[A-Za-z0-9_-]*$/,$y=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Ty=/^\+(?:[0-9]){6,14}[0-9]$/,Py="(?:(?:\\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])))",Cy=new RegExp(`^${Py}$`);Ay=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ry=/^\d+$/,Oy=/^-?\d+(?:\.\d+)?/i,Ny=/true|false/i,Dy=/null/i,jy=/^[^A-Z]*$/,My=/^[^a-z]*$/});var Be,Ly,_l,vl,Zy,qy,Fy,Uy,By,ki,Hy,Vy,Gy,Wy,Ky,Jy,Yy,ra=_(()=>{vo();ta();dr();Be=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Ly={number:"number",bigint:"bigint",object:"date"},_l=w("$ZodCheckLessThan",(e,t)=>{Be.init(e,t);let r=Ly[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})}}),vl=w("$ZodCheckGreaterThan",(e,t)=>{Be.init(e,t);let r=Ly[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})}}),Zy=w("$ZodCheckMultipleOf",(e,t)=>{Be.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):Xu(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})}}),qy=w("$ZodCheckNumberFormat",(e,t)=>{Be.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=ol[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=Ry)}),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})}}),Fy=w("$ZodCheckMaxLength",(e,t)=>{var r;Be.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(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=xi(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Uy=w("$ZodCheckMinLength",(e,t)=>{var r;Be.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(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=xi(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),By=w("$ZodCheckLengthEquals",(e,t)=>{var r;Be.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vi(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=xi(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})}}),ki=w("$ZodCheckStringFormat",(e,t)=>{var r,n;Be.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=()=>{})}),Hy=w("$ZodCheckRegex",(e,t)=>{ki.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})}}),Vy=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=jy),ki.init(e,t)}),Gy=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=My),ki.init(e,t)}),Wy=w("$ZodCheckIncludes",(e,t)=>{Be.init(e,t);let r=Kr(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})}}),Ky=w("$ZodCheckStartsWith",(e,t)=>{Be.init(e,t);let r=new RegExp(`^${Kr(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})}}),Jy=w("$ZodCheckEndsWith",(e,t)=>{Be.init(e,t);let r=new RegExp(`.*${Kr(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})}}),Yy=w("$ZodCheckOverwrite",(e,t)=>{Be.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var na,bl=_(()=>{na=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(`
2
2
  `).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(`
3
- `))}}});var Xy,xl=_(()=>{Xy={major:4,minor:0,patch:0}});function f_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function XC(e){if(!yl.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return f_(r)}function eE(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}}function e_(e,t,r){e.issues.length&&t.issues.push(...pr(r,e.issues)),t.value[r]=e.value}function oa(e,t,r){e.issues.length&&t.issues.push(...pr(r,e.issues)),t.value[r]=e.value}function t_(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(...pr(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function r_(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=>Kt(i,n,Pt())))}),t}function wl(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(xo(e)&&xo(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=wl(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=wl(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 n_(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Dn(e))return e;let n=wl(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}function o_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function i_(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function s_(e,t,r){return Dn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}function a_(e){return e.value=Object.freeze(e.value),e}function c_(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(il(o))}}var me,Si,be,kl,Sl,$l,Tl,Pl,Cl,El,Il,zl,Rl,Al,u_,l_,p_,d_,Ol,Nl,Dl,jl,Ml,Ll,Zl,ql,ia,Fl,Ul,Bl,Vl,Hl,Gl,sa,aa,Wl,Kl,Jl,Yl,Ql,Xl,ep,tp,rp,np,op,ip,sp,ap,cp,h_=_(()=>{ra();vo();bl();ml();ta();dr();xl();dr();me=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xy;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=Dn(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 Pr;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,i.issues.length!==l&&(c||(c=Dn(i,l)))});else{if(i.issues.length===l)continue;c||(c=Dn(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 Pr;return a.then(c=>o(c,n,s))}return o(a,n,s)}}e["~standard"]={validate:o=>{try{let i=jn(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Mn(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Si=w("$ZodString",(e,t)=>{me.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ry(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}}),be=w("$ZodStringFormat",(e,t)=>{ki.init(e,t),Si.init(e,t)}),kl=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=yy),be.init(e,t)}),Sl=w("$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=gl(n))}else t.pattern??(t.pattern=gl());be.init(e,t)}),$l=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_y),be.init(e,t)}),Tl=w("$ZodURL",(e,t)=>{be.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:$y.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})}}}),Pl=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vy()),be.init(e,t)}),Cl=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=my),be.init(e,t)}),El=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ly),be.init(e,t)}),Il=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=py),be.init(e,t)}),zl=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dy),be.init(e,t)}),Rl=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fy),be.init(e,t)}),Al=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hy),be.init(e,t)}),u_=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zy(t)),be.init(e,t)}),l_=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Cy),be.init(e,t)}),p_=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Iy(t)),be.init(e,t)}),d_=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=gy),be.init(e,t)}),Ol=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=by),be.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Nl=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xy),be.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})}}}),Dl=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wy),be.init(e,t)}),jl=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ky),be.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})}}});Ml=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Sy),be.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{f_(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});Ll=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=yl),be.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{XC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Zl=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ty),be.init(e,t)});ql=w("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=r=>{eE(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ia=w("$ZodNumber",(e,t)=>{me.init(e,t),e._zod.pattern=e._zod.bag.pattern??Oy,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}}),Fl=w("$ZodNumber",(e,t)=>{qy.init(e,t),ia.init(e,t)}),Ul=w("$ZodBoolean",(e,t)=>{me.init(e,t),e._zod.pattern=Ny,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}}),Bl=w("$ZodNull",(e,t)=>{me.init(e,t),e._zod.pattern=Dy,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}}),Vl=w("$ZodUnknown",(e,t)=>{me.init(e,t),e._zod.parse=r=>r}),Hl=w("$ZodNever",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});Gl=w("$ZodArray",(e,t)=>{me.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=>e_(u,r,s))):e_(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});sa=w("$ZodObject",(e,t)=>{me.init(e,t);let r=_i(()=>{let l=Object.keys(t.shape);for(let f of l)if(!(t.shape[f]instanceof me))throw new Error(`Invalid element at key "${f}": expected a Zod schema`);let d=nl(t.shape);return{shape:t.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});ve(e._zod,"propValues",()=>{let l=t.shape,d={};for(let f in l){let h=l[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(let g of h.values)d[f].add(g)}}return d});let n=l=>{let d=new na(["shape","payload","ctx"]),f=r.value,h=v=>{let k=Nn(v);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};d.write("const input = payload.value;");let g=Object.create(null),y=0;for(let v of f.keys)g[v]=`key_${y++}`;d.write("const newResult = {}");for(let v of f.keys)if(f.optionalKeys.has(v)){let k=g[v];d.write(`const ${k} = ${h(v)};`);let C=Nn(v);d.write(`
3
+ `))}}});var Xy,xl=_(()=>{Xy={major:4,minor:0,patch:0}});function f_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function XC(e){if(!yl.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return f_(r)}function eE(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}}function e_(e,t,r){e.issues.length&&t.issues.push(...pr(r,e.issues)),t.value[r]=e.value}function oa(e,t,r){e.issues.length&&t.issues.push(...pr(r,e.issues)),t.value[r]=e.value}function t_(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(...pr(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function r_(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=>Kt(i,n,Pt())))}),t}function wl(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(xo(e)&&xo(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=wl(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=wl(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 n_(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Dn(e))return e;let n=wl(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}function o_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function i_(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function s_(e,t,r){return Dn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}function a_(e){return e.value=Object.freeze(e.value),e}function c_(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(il(o))}}var me,Si,be,kl,Sl,$l,Tl,Pl,Cl,El,Il,zl,Al,Rl,u_,l_,p_,d_,Ol,Nl,Dl,jl,Ml,Ll,Zl,ql,ia,Fl,Ul,Bl,Hl,Vl,Gl,sa,aa,Wl,Kl,Jl,Yl,Ql,Xl,ep,tp,rp,np,op,ip,sp,ap,cp,h_=_(()=>{ra();vo();bl();ml();ta();dr();xl();dr();me=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xy;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=Dn(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 Pr;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,i.issues.length!==l&&(c||(c=Dn(i,l)))});else{if(i.issues.length===l)continue;c||(c=Dn(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 Pr;return a.then(c=>o(c,n,s))}return o(a,n,s)}}e["~standard"]={validate:o=>{try{let i=jn(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Mn(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Si=w("$ZodString",(e,t)=>{me.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ay(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}}),be=w("$ZodStringFormat",(e,t)=>{ki.init(e,t),Si.init(e,t)}),kl=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=yy),be.init(e,t)}),Sl=w("$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=gl(n))}else t.pattern??(t.pattern=gl());be.init(e,t)}),$l=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_y),be.init(e,t)}),Tl=w("$ZodURL",(e,t)=>{be.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:$y.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})}}}),Pl=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vy()),be.init(e,t)}),Cl=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=my),be.init(e,t)}),El=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ly),be.init(e,t)}),Il=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=py),be.init(e,t)}),zl=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dy),be.init(e,t)}),Al=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fy),be.init(e,t)}),Rl=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hy),be.init(e,t)}),u_=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zy(t)),be.init(e,t)}),l_=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Cy),be.init(e,t)}),p_=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Iy(t)),be.init(e,t)}),d_=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=gy),be.init(e,t)}),Ol=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=by),be.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Nl=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xy),be.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})}}}),Dl=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wy),be.init(e,t)}),jl=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ky),be.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})}}});Ml=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Sy),be.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{f_(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});Ll=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=yl),be.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{XC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Zl=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ty),be.init(e,t)});ql=w("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=r=>{eE(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ia=w("$ZodNumber",(e,t)=>{me.init(e,t),e._zod.pattern=e._zod.bag.pattern??Oy,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}}),Fl=w("$ZodNumber",(e,t)=>{qy.init(e,t),ia.init(e,t)}),Ul=w("$ZodBoolean",(e,t)=>{me.init(e,t),e._zod.pattern=Ny,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}}),Bl=w("$ZodNull",(e,t)=>{me.init(e,t),e._zod.pattern=Dy,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}}),Hl=w("$ZodUnknown",(e,t)=>{me.init(e,t),e._zod.parse=r=>r}),Vl=w("$ZodNever",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});Gl=w("$ZodArray",(e,t)=>{me.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=>e_(u,r,s))):e_(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});sa=w("$ZodObject",(e,t)=>{me.init(e,t);let r=_i(()=>{let l=Object.keys(t.shape);for(let f of l)if(!(t.shape[f]instanceof me))throw new Error(`Invalid element at key "${f}": expected a Zod schema`);let d=nl(t.shape);return{shape:t.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});ve(e._zod,"propValues",()=>{let l=t.shape,d={};for(let f in l){let h=l[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(let m of h.values)d[f].add(m)}}return d});let n=l=>{let d=new na(["shape","payload","ctx"]),f=r.value,h=v=>{let k=Nn(v);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),y=0;for(let v of f.keys)m[v]=`key_${y++}`;d.write("const newResult = {}");for(let v of f.keys)if(f.optionalKeys.has(v)){let k=m[v];d.write(`const ${k} = ${h(v)};`);let C=Nn(v);d.write(`
4
4
  if (${k}.issues.length) {
5
5
  if (input[${C}] === undefined) {
6
6
  if (${C} in input) {
@@ -19,44 +19,44 @@
19
19
  } else {
20
20
  newResult[${C}] = ${k}.value;
21
21
  }
22
- `)}else{let k=g[v];d.write(`const ${k} = ${h(v)};`),d.write(`
22
+ `)}else{let k=m[v];d.write(`const ${k} = ${h(v)};`),d.write(`
23
23
  if (${k}.issues.length) payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
24
24
  ...iss,
25
25
  path: iss.path ? [${Nn(v)}, ...iss.path] : [${Nn(v)}]
26
- })));`),d.write(`newResult[${Nn(v)}] = ${k}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let b=d.compile();return(v,k)=>b(l,v,k)},o,i=bo,s=!Ks.jitless,c=s&&tl.value,u=t.catchall,p;e._zod.parse=(l,d)=>{p??(p=r.value);let f=l.value;if(!i(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;let h=[];if(s&&c&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),l=o(l,d);else{l.value={};let k=p.shape;for(let C of p.keys){let T=k[C],U=T._zod.run({value:f[C],issues:[]},d),Q=T._zod.optin==="optional"&&T._zod.optout==="optional";U instanceof Promise?h.push(U.then(Ie=>Q?t_(Ie,l,C,f):oa(Ie,l,C))):Q?t_(U,l,C,f):oa(U,l,C)}}if(!u)return h.length?Promise.all(h).then(()=>l):l;let g=[],y=p.keySet,b=u._zod,v=b.def.type;for(let k of Object.keys(f)){if(y.has(k))continue;if(v==="never"){g.push(k);continue}let C=b.run({value:f[k],issues:[]},d);C instanceof Promise?h.push(C.then(T=>oa(T,l,k))):oa(C,l,k)}return g.length&&l.issues.push({code:"unrecognized_keys",keys:g,input:f,inst:e}),h.length?Promise.all(h).then(()=>l):l}});aa=w("$ZodUnion",(e,t)=>{me.init(e,t),ve(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ve(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ve(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ve(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=>bi(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=>r_(s,r,e,n)):r_(i,r,e,n)}}),Wl=w("$ZodDiscriminatedUnion",(e,t)=>{aa.init(e,t);let r=e._zod.parse;ve(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=_i(()=>{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(!bo(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)}}),Kl=w("$ZodIntersection",(e,t)=>{me.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])=>n_(r,c,u)):n_(r,i,s)}});Jl=w("$ZodRecord",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!xo(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(...pr(c,p.issues)),r.value[c]=p.value})):(u.issues.length&&r.issues.push(...pr(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=>Kt(u,n,Pt())),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(...pr(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...pr(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Yl=w("$ZodEnum",(e,t)=>{me.init(e,t);let r=yi(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>rl.has(typeof n)).map(n=>typeof n=="string"?Kr(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}}),Ql=w("$ZodLiteral",(e,t)=>{me.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Kr(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}}),Xl=w("$ZodTransform",(e,t)=>{me.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 Pr;return r.value=o,r}}),ep=w("$ZodOptional",(e,t)=>{me.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(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)}),tp=w("$ZodNullable",(e,t)=>{me.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(r.source)}|null)$`):void 0}),ve(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)}),rp=w("$ZodDefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(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=>o_(i,t)):o_(o,t)}});np=w("$ZodPrefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(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))}),op=w("$ZodNonOptional",(e,t)=>{me.init(e,t),ve(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=>i_(i,e)):i_(o,e)}});ip=w("$ZodCatch",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(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=>Kt(s,n,Pt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Kt(i,n,Pt()))},input:r.value}),r.issues=[]),r)}}),sp=w("$ZodPipe",(e,t)=>{me.init(e,t),ve(e._zod,"values",()=>t.in._zod.values),ve(e._zod,"optin",()=>t.in._zod.optin),ve(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=>s_(i,t,n)):s_(o,t,n)}});ap=w("$ZodReadonly",(e,t)=>{me.init(e,t),ve(e._zod,"propValues",()=>t.innerType._zod.propValues),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(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(a_):a_(o)}});cp=w("$ZodCustom",(e,t)=>{Ue.init(e,t),me.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=>c_(i,r,n,e));c_(o,r,n,e)}})});function m_(){return{localeError:rE()}}var tE,rE,g_=_(()=>{dr();tE=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},rE=()=>{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 ${tE(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Qs(n.values[0])}`:`Invalid option: expected one of ${Js(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":""}: ${Js(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"}}}});var ca=_(()=>{});function y_(){return new $i}var nE,oE,$i,Jr,lp=_(()=>{nE=Symbol("ZodOutput"),oE=Symbol("ZodInput"),$i=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)}};Jr=y_()});function pp(e,t){return new e({type:"string",...q(t)})}function dp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...q(t)})}function ua(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...q(t)})}function fp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...q(t)})}function hp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q(t)})}function mp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q(t)})}function gp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q(t)})}function yp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}function _p(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...q(t)})}function vp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...q(t)})}function bp(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...q(t)})}function xp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...q(t)})}function wp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...q(t)})}function kp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...q(t)})}function Sp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...q(t)})}function $p(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...q(t)})}function Tp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...q(t)})}function Pp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q(t)})}function Cp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q(t)})}function Ep(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...q(t)})}function Ip(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...q(t)})}function zp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...q(t)})}function Rp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...q(t)})}function __(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q(t)})}function v_(e,t){return new e({type:"string",format:"date",check:"string_format",...q(t)})}function b_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...q(t)})}function x_(e,t){return new e({type:"string",format:"duration",check:"string_format",...q(t)})}function Ap(e,t){return new e({type:"number",checks:[],...q(t)})}function Op(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...q(t)})}function Np(e,t){return new e({type:"boolean",...q(t)})}function Dp(e,t){return new e({type:"null",...q(t)})}function jp(e){return new e({type:"unknown"})}function Mp(e,t){return new e({type:"never",...q(t)})}function la(e,t){return new _l({check:"less_than",...q(t),value:e,inclusive:!1})}function Ti(e,t){return new _l({check:"less_than",...q(t),value:e,inclusive:!0})}function pa(e,t){return new vl({check:"greater_than",...q(t),value:e,inclusive:!1})}function Pi(e,t){return new vl({check:"greater_than",...q(t),value:e,inclusive:!0})}function da(e,t){return new Zy({check:"multiple_of",...q(t),value:e})}function fa(e,t){return new Fy({check:"max_length",...q(t),maximum:e})}function wo(e,t){return new Uy({check:"min_length",...q(t),minimum:e})}function ha(e,t){return new By({check:"length_equals",...q(t),length:e})}function Lp(e,t){return new Vy({check:"string_format",format:"regex",...q(t),pattern:e})}function Zp(e){return new Hy({check:"string_format",format:"lowercase",...q(e)})}function qp(e){return new Gy({check:"string_format",format:"uppercase",...q(e)})}function Fp(e,t){return new Wy({check:"string_format",format:"includes",...q(t),includes:e})}function Up(e,t){return new Ky({check:"string_format",format:"starts_with",...q(t),prefix:e})}function Bp(e,t){return new Jy({check:"string_format",format:"ends_with",...q(t),suffix:e})}function Ln(e){return new Yy({check:"overwrite",tx:e})}function Vp(e){return Ln(t=>t.normalize(e))}function Hp(){return Ln(e=>e.trim())}function Gp(){return Ln(e=>e.toLowerCase())}function Wp(){return Ln(e=>e.toUpperCase())}function w_(e,t,r){return new e({type:"array",element:t,...q(r)})}function Kp(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Jp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...q(r)})}var k_=_(()=>{ra();dr()});var S_=_(()=>{});function Yp(e,t){if(e instanceof $i){let n=new ma(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 ma(t);return r.process(e),r.emit(e,t)}function Le(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 Le(o.element,r);case"object":{for(let i in o.shape)if(Le(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Le(i,r))return!0;return!1}case"intersection":return Le(o.left,r)||Le(o.right,r);case"tuple":{for(let i of o.items)if(Le(i,r))return!0;return!!(o.rest&&Le(o.rest,r))}case"record":return Le(o.keyType,r)||Le(o.valueType,r);case"map":return Le(o.keyType,r)||Le(o.valueType,r);case"set":return Le(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Le(o.innerType,r);case"lazy":return Le(o.getter(),r);case"default":return Le(o.innerType,r);case"prefault":return Le(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Le(o.in,r)||Le(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var ma,$_=_(()=>{lp();dr();ma=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Jr,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 f=a.schema;switch(o.type){case"string":{let h=f;h.type="string";let{minimum:g,maximum:y,format:b,patterns:v,contentEncoding:k}=t._zod.bag;if(typeof g=="number"&&(h.minLength=g),typeof y=="number"&&(h.maxLength=y),b&&(h.format=i[b]??b,h.format===""&&delete h.format),k&&(h.contentEncoding=k),v&&v.size>0){let C=[...v];C.length===1?h.pattern=C[0].source:C.length>1&&(a.schema.allOf=[...C.map(T=>({...this.target==="draft-7"?{type:"string"}:{},pattern:T.source}))])}break}case"number":{let h=f,{minimum:g,maximum:y,format:b,multipleOf:v,exclusiveMaximum:k,exclusiveMinimum:C}=t._zod.bag;typeof b=="string"&&b.includes("int")?h.type="integer":h.type="number",typeof C=="number"&&(h.exclusiveMinimum=C),typeof g=="number"&&(h.minimum=g,typeof C=="number"&&(C>=g?delete h.minimum:delete h.exclusiveMinimum)),typeof k=="number"&&(h.exclusiveMaximum=k),typeof y=="number"&&(h.maximum=y,typeof k=="number"&&(k<=y?delete h.maximum:delete h.exclusiveMaximum)),typeof v=="number"&&(h.multipleOf=v);break}case"boolean":{let h=f;h.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":{f.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":{f.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let h=f,{minimum:g,maximum:y}=t._zod.bag;typeof g=="number"&&(h.minItems=g),typeof y=="number"&&(h.maxItems=y),h.type="array",h.items=this.process(o.element,{...l,path:[...l.path,"items"]});break}case"object":{let h=f;h.type="object",h.properties={};let g=o.shape;for(let v in g)h.properties[v]=this.process(g[v],{...l,path:[...l.path,"properties",v]});let y=new Set(Object.keys(g)),b=new Set([...y].filter(v=>{let k=o.shape[v]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));b.size>0&&(h.required=Array.from(b)),o.catchall?._zod.def.type==="never"?h.additionalProperties=!1:o.catchall?o.catchall&&(h.additionalProperties=this.process(o.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(h.additionalProperties=!1);break}case"union":{let h=f;h.anyOf=o.options.map((g,y)=>this.process(g,{...l,path:[...l.path,"anyOf",y]}));break}case"intersection":{let h=f,g=this.process(o.left,{...l,path:[...l.path,"allOf",0]}),y=this.process(o.right,{...l,path:[...l.path,"allOf",1]}),b=k=>"allOf"in k&&Object.keys(k).length===1,v=[...b(g)?g.allOf:[g],...b(y)?y.allOf:[y]];h.allOf=v;break}case"tuple":{let h=f;h.type="array";let g=o.items.map((v,k)=>this.process(v,{...l,path:[...l.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?h.prefixItems=g:h.items=g,o.rest){let v=this.process(o.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?h.items=v:h.additionalItems=v}o.rest&&(h.items=this.process(o.rest,{...l,path:[...l.path,"items"]}));let{minimum:y,maximum:b}=t._zod.bag;typeof y=="number"&&(h.minItems=y),typeof b=="number"&&(h.maxItems=b);break}case"record":{let h=f;h.type="object",h.propertyNames=this.process(o.keyType,{...l,path:[...l.path,"propertyNames"]}),h.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 h=f,g=yi(o.entries);g.every(y=>typeof y=="number")&&(h.type="number"),g.every(y=>typeof y=="string")&&(h.type="string"),h.enum=g;break}case"literal":{let h=f,g=[];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");g.push(Number(y))}else g.push(y);if(g.length!==0)if(g.length===1){let y=g[0];h.type=y===null?"null":typeof y,h.const=y}else g.every(y=>typeof y=="number")&&(h.type="number"),g.every(y=>typeof y=="string")&&(h.type="string"),g.every(y=>typeof y=="boolean")&&(h.type="string"),g.every(y=>y===null)&&(h.type="null"),h.enum=g;break}case"file":{let h=f,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:y,maximum:b,mime:v}=t._zod.bag;y!==void 0&&(g.minLength=y),b!==void 0&&(g.maxLength=b),v?v.length===1?(g.contentMediaType=v[0],Object.assign(h,g)):h.anyOf=v.map(k=>({...g,contentMediaType:k})):Object.assign(h,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let h=this.process(o.innerType,l);f.anyOf=[h,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"success":{let h=f;h.type="boolean";break}case"default":{this.process(o.innerType,l),a.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,l),a.ref=o.innerType,this.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,l),a.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let h=f,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");h.type="string",h.pattern=g.source;break}case"pipe":{let h=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(h,l),a.ref=h;break}case"readonly":{this.process(o.innerType,l),a.ref=o.innerType,f.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 h=t._zod.innerType;this.process(h,l),a.ref=h;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"&&Le(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 g=n.external.registry.get(p[0])?.id,y=n.external.uri??(v=>v);if(g)return{ref:y(g)};let b=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=b,{defId:b,ref:`${y("__shared")}#/${l}/${b}`}}if(p[1]===o)return{ref:"#"};let f=`#/${l}/`,h=p[1].schema.id??`__schema${this.counter++}`;return{defId:h,ref:f+h}},s=p=>{if(p[1].schema.$ref)return;let l=p[1],{ref:d,defId:f}=i(p);l.def={...l.schema},f&&(l.defId=f);let h=l.schema;for(let g in h)delete h[g];h.$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>
26
+ })));`),d.write(`newResult[${Nn(v)}] = ${k}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let b=d.compile();return(v,k)=>b(l,v,k)},o,i=bo,s=!Ks.jitless,c=s&&tl.value,u=t.catchall,p;e._zod.parse=(l,d)=>{p??(p=r.value);let f=l.value;if(!i(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;let h=[];if(s&&c&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),l=o(l,d);else{l.value={};let k=p.shape;for(let C of p.keys){let T=k[C],U=T._zod.run({value:f[C],issues:[]},d),Q=T._zod.optin==="optional"&&T._zod.optout==="optional";U instanceof Promise?h.push(U.then(Ie=>Q?t_(Ie,l,C,f):oa(Ie,l,C))):Q?t_(U,l,C,f):oa(U,l,C)}}if(!u)return h.length?Promise.all(h).then(()=>l):l;let m=[],y=p.keySet,b=u._zod,v=b.def.type;for(let k of Object.keys(f)){if(y.has(k))continue;if(v==="never"){m.push(k);continue}let C=b.run({value:f[k],issues:[]},d);C instanceof Promise?h.push(C.then(T=>oa(T,l,k))):oa(C,l,k)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:f,inst:e}),h.length?Promise.all(h).then(()=>l):l}});aa=w("$ZodUnion",(e,t)=>{me.init(e,t),ve(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ve(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ve(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ve(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=>bi(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=>r_(s,r,e,n)):r_(i,r,e,n)}}),Wl=w("$ZodDiscriminatedUnion",(e,t)=>{aa.init(e,t);let r=e._zod.parse;ve(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=_i(()=>{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(!bo(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)}}),Kl=w("$ZodIntersection",(e,t)=>{me.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])=>n_(r,c,u)):n_(r,i,s)}});Jl=w("$ZodRecord",(e,t)=>{me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!xo(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(...pr(c,p.issues)),r.value[c]=p.value})):(u.issues.length&&r.issues.push(...pr(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=>Kt(u,n,Pt())),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(...pr(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...pr(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Yl=w("$ZodEnum",(e,t)=>{me.init(e,t);let r=yi(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>rl.has(typeof n)).map(n=>typeof n=="string"?Kr(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}}),Ql=w("$ZodLiteral",(e,t)=>{me.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Kr(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}}),Xl=w("$ZodTransform",(e,t)=>{me.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 Pr;return r.value=o,r}}),ep=w("$ZodOptional",(e,t)=>{me.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(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)}),tp=w("$ZodNullable",(e,t)=>{me.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(r.source)}|null)$`):void 0}),ve(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)}),rp=w("$ZodDefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(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=>o_(i,t)):o_(o,t)}});np=w("$ZodPrefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(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))}),op=w("$ZodNonOptional",(e,t)=>{me.init(e,t),ve(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=>i_(i,e)):i_(o,e)}});ip=w("$ZodCatch",(e,t)=>{me.init(e,t),e._zod.optin="optional",ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(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=>Kt(s,n,Pt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Kt(i,n,Pt()))},input:r.value}),r.issues=[]),r)}}),sp=w("$ZodPipe",(e,t)=>{me.init(e,t),ve(e._zod,"values",()=>t.in._zod.values),ve(e._zod,"optin",()=>t.in._zod.optin),ve(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=>s_(i,t,n)):s_(o,t,n)}});ap=w("$ZodReadonly",(e,t)=>{me.init(e,t),ve(e._zod,"propValues",()=>t.innerType._zod.propValues),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(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(a_):a_(o)}});cp=w("$ZodCustom",(e,t)=>{Be.init(e,t),me.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=>c_(i,r,n,e));c_(o,r,n,e)}})});function m_(){return{localeError:rE()}}var tE,rE,g_=_(()=>{dr();tE=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},rE=()=>{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 ${tE(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Qs(n.values[0])}`:`Invalid option: expected one of ${Js(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":""}: ${Js(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"}}}});var ca=_(()=>{});function y_(){return new $i}var nE,oE,$i,Jr,lp=_(()=>{nE=Symbol("ZodOutput"),oE=Symbol("ZodInput"),$i=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)}};Jr=y_()});function pp(e,t){return new e({type:"string",...q(t)})}function dp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...q(t)})}function ua(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...q(t)})}function fp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...q(t)})}function hp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q(t)})}function mp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q(t)})}function gp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q(t)})}function yp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}function _p(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...q(t)})}function vp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...q(t)})}function bp(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...q(t)})}function xp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...q(t)})}function wp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...q(t)})}function kp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...q(t)})}function Sp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...q(t)})}function $p(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...q(t)})}function Tp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...q(t)})}function Pp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q(t)})}function Cp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q(t)})}function Ep(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...q(t)})}function Ip(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...q(t)})}function zp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...q(t)})}function Ap(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...q(t)})}function __(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q(t)})}function v_(e,t){return new e({type:"string",format:"date",check:"string_format",...q(t)})}function b_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...q(t)})}function x_(e,t){return new e({type:"string",format:"duration",check:"string_format",...q(t)})}function Rp(e,t){return new e({type:"number",checks:[],...q(t)})}function Op(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...q(t)})}function Np(e,t){return new e({type:"boolean",...q(t)})}function Dp(e,t){return new e({type:"null",...q(t)})}function jp(e){return new e({type:"unknown"})}function Mp(e,t){return new e({type:"never",...q(t)})}function la(e,t){return new _l({check:"less_than",...q(t),value:e,inclusive:!1})}function Ti(e,t){return new _l({check:"less_than",...q(t),value:e,inclusive:!0})}function pa(e,t){return new vl({check:"greater_than",...q(t),value:e,inclusive:!1})}function Pi(e,t){return new vl({check:"greater_than",...q(t),value:e,inclusive:!0})}function da(e,t){return new Zy({check:"multiple_of",...q(t),value:e})}function fa(e,t){return new Fy({check:"max_length",...q(t),maximum:e})}function wo(e,t){return new Uy({check:"min_length",...q(t),minimum:e})}function ha(e,t){return new By({check:"length_equals",...q(t),length:e})}function Lp(e,t){return new Hy({check:"string_format",format:"regex",...q(t),pattern:e})}function Zp(e){return new Vy({check:"string_format",format:"lowercase",...q(e)})}function qp(e){return new Gy({check:"string_format",format:"uppercase",...q(e)})}function Fp(e,t){return new Wy({check:"string_format",format:"includes",...q(t),includes:e})}function Up(e,t){return new Ky({check:"string_format",format:"starts_with",...q(t),prefix:e})}function Bp(e,t){return new Jy({check:"string_format",format:"ends_with",...q(t),suffix:e})}function Ln(e){return new Yy({check:"overwrite",tx:e})}function Hp(e){return Ln(t=>t.normalize(e))}function Vp(){return Ln(e=>e.trim())}function Gp(){return Ln(e=>e.toLowerCase())}function Wp(){return Ln(e=>e.toUpperCase())}function w_(e,t,r){return new e({type:"array",element:t,...q(r)})}function Kp(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Jp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...q(r)})}var k_=_(()=>{ra();dr()});var S_=_(()=>{});function Yp(e,t){if(e instanceof $i){let n=new ma(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 ma(t);return r.process(e),r.emit(e,t)}function Le(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 Le(o.element,r);case"object":{for(let i in o.shape)if(Le(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Le(i,r))return!0;return!1}case"intersection":return Le(o.left,r)||Le(o.right,r);case"tuple":{for(let i of o.items)if(Le(i,r))return!0;return!!(o.rest&&Le(o.rest,r))}case"record":return Le(o.keyType,r)||Le(o.valueType,r);case"map":return Le(o.keyType,r)||Le(o.valueType,r);case"set":return Le(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Le(o.innerType,r);case"lazy":return Le(o.getter(),r);case"default":return Le(o.innerType,r);case"prefault":return Le(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Le(o.in,r)||Le(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var ma,$_=_(()=>{lp();dr();ma=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Jr,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 f=a.schema;switch(o.type){case"string":{let h=f;h.type="string";let{minimum:m,maximum:y,format:b,patterns:v,contentEncoding:k}=t._zod.bag;if(typeof m=="number"&&(h.minLength=m),typeof y=="number"&&(h.maxLength=y),b&&(h.format=i[b]??b,h.format===""&&delete h.format),k&&(h.contentEncoding=k),v&&v.size>0){let C=[...v];C.length===1?h.pattern=C[0].source:C.length>1&&(a.schema.allOf=[...C.map(T=>({...this.target==="draft-7"?{type:"string"}:{},pattern:T.source}))])}break}case"number":{let h=f,{minimum:m,maximum:y,format:b,multipleOf:v,exclusiveMaximum:k,exclusiveMinimum:C}=t._zod.bag;typeof b=="string"&&b.includes("int")?h.type="integer":h.type="number",typeof C=="number"&&(h.exclusiveMinimum=C),typeof m=="number"&&(h.minimum=m,typeof C=="number"&&(C>=m?delete h.minimum:delete h.exclusiveMinimum)),typeof k=="number"&&(h.exclusiveMaximum=k),typeof y=="number"&&(h.maximum=y,typeof k=="number"&&(k<=y?delete h.maximum:delete h.exclusiveMaximum)),typeof v=="number"&&(h.multipleOf=v);break}case"boolean":{let h=f;h.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":{f.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":{f.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let h=f,{minimum:m,maximum:y}=t._zod.bag;typeof m=="number"&&(h.minItems=m),typeof y=="number"&&(h.maxItems=y),h.type="array",h.items=this.process(o.element,{...l,path:[...l.path,"items"]});break}case"object":{let h=f;h.type="object",h.properties={};let m=o.shape;for(let v in m)h.properties[v]=this.process(m[v],{...l,path:[...l.path,"properties",v]});let y=new Set(Object.keys(m)),b=new Set([...y].filter(v=>{let k=o.shape[v]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));b.size>0&&(h.required=Array.from(b)),o.catchall?._zod.def.type==="never"?h.additionalProperties=!1:o.catchall?o.catchall&&(h.additionalProperties=this.process(o.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(h.additionalProperties=!1);break}case"union":{let h=f;h.anyOf=o.options.map((m,y)=>this.process(m,{...l,path:[...l.path,"anyOf",y]}));break}case"intersection":{let h=f,m=this.process(o.left,{...l,path:[...l.path,"allOf",0]}),y=this.process(o.right,{...l,path:[...l.path,"allOf",1]}),b=k=>"allOf"in k&&Object.keys(k).length===1,v=[...b(m)?m.allOf:[m],...b(y)?y.allOf:[y]];h.allOf=v;break}case"tuple":{let h=f;h.type="array";let m=o.items.map((v,k)=>this.process(v,{...l,path:[...l.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?h.prefixItems=m:h.items=m,o.rest){let v=this.process(o.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?h.items=v:h.additionalItems=v}o.rest&&(h.items=this.process(o.rest,{...l,path:[...l.path,"items"]}));let{minimum:y,maximum:b}=t._zod.bag;typeof y=="number"&&(h.minItems=y),typeof b=="number"&&(h.maxItems=b);break}case"record":{let h=f;h.type="object",h.propertyNames=this.process(o.keyType,{...l,path:[...l.path,"propertyNames"]}),h.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 h=f,m=yi(o.entries);m.every(y=>typeof y=="number")&&(h.type="number"),m.every(y=>typeof y=="string")&&(h.type="string"),h.enum=m;break}case"literal":{let h=f,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];h.type=y===null?"null":typeof y,h.const=y}else m.every(y=>typeof y=="number")&&(h.type="number"),m.every(y=>typeof y=="string")&&(h.type="string"),m.every(y=>typeof y=="boolean")&&(h.type="string"),m.every(y=>y===null)&&(h.type="null"),h.enum=m;break}case"file":{let h=f,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:y,maximum:b,mime:v}=t._zod.bag;y!==void 0&&(m.minLength=y),b!==void 0&&(m.maxLength=b),v?v.length===1?(m.contentMediaType=v[0],Object.assign(h,m)):h.anyOf=v.map(k=>({...m,contentMediaType:k})):Object.assign(h,m);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let h=this.process(o.innerType,l);f.anyOf=[h,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"success":{let h=f;h.type="boolean";break}case"default":{this.process(o.innerType,l),a.ref=o.innerType,f.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,l),a.ref=o.innerType,this.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,l),a.ref=o.innerType;let h;try{h=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=h;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let h=f,m=t._zod.pattern;if(!m)throw new Error("Pattern not found in template literal");h.type="string",h.pattern=m.source;break}case"pipe":{let h=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(h,l),a.ref=h;break}case"readonly":{this.process(o.innerType,l),a.ref=o.innerType,f.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 h=t._zod.innerType;this.process(h,l),a.ref=h;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"&&Le(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??(v=>v);if(m)return{ref:y(m)};let b=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=b,{defId:b,ref:`${y("__shared")}#/${l}/${b}`}}if(p[1]===o)return{ref:"#"};let f=`#/${l}/`,h=p[1].schema.id??`__schema${this.counter++}`;return{defId:h,ref:f+h}},s=p=>{if(p[1].schema.$ref)return;let l=p[1],{ref:d,defId:f}=i(p);l.def={...l.schema},f&&(l.defId=f);let h=l.schema;for(let m in h)delete h[m];h.$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>
27
27
 
28
- 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 f=n.external.registry.get(p[0])?.id;if(t!==p[0]&&f){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),f=d.def??d.schema,h={...f};if(d.ref===null)return;let g=d.ref;if(d.ref=null,g){a(g,l);let y=this.seen.get(g).schema;y.$ref&&l.target==="draft-7"?(f.allOf=f.allOf??[],f.allOf.push(y)):(Object.assign(f,y),Object.assign(f,h))}d.isParent||this.override({zodSchema:p,jsonSchema:f,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.")}}}});var T_=_(()=>{});var at=_(()=>{vo();ml();cl();h_();ra();xl();dr();ta();ca();lp();bl();S_();k_();$_();T_()});var Qp=_(()=>{at()});function Xp(e,t){let r={type:"object",get shape(){return oe.assignProp(this,"shape",{...e}),this.shape},...oe.normalizeParams(t)};return new ZE(r)}var LE,ZE,P_=_(()=>{at();at();Qp();LE=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");me.init(e,t),e.def=t,e.parse=(r,n)=>ll(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>jn(e,r,n),e.parseAsync=async(r,n)=>dl(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Mn(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)=>Ct(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e))}),ZE=w("ZodMiniObject",(e,t)=>{sa.init(e,t),LE.init(e,t),oe.defineLazy(e,"shape",()=>t.shape)})});var C_=_(()=>{});var E_=_(()=>{});var I_=_(()=>{});var z_=_(()=>{at();Qp();P_();C_();at();ca();E_();I_()});var R_=_(()=>{z_()});var ed=_(()=>{R_()});function Nt(e){return!!e._zod}function qn(e){let t=Object.values(e);if(t.length===0)return Xp({});let r=t.every(Nt),n=t.every(o=>!Nt(o));if(r)return Xp(e);if(n)return Ku(e);throw new Error("Mixed Zod versions detected in object shape.")}function Yr(e,t){return Nt(e)?jn(e,t):e.safeParse(t)}async function ga(e,t){return Nt(e)?await Mn(e,t):await e.safeParseAsync(t)}function Qr(e){if(!e)return;let t;if(Nt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function ko(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 qn(e)}}if(Nt(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 ya(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 O_(e){return e.description}function N_(e){if(Nt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function _a(e){if(Nt(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 Ci=_(()=>{mi();ed()});var td=_(()=>{at()});var Ei={};Br(Ei,{ZodISODate:()=>j_,ZodISODateTime:()=>D_,ZodISODuration:()=>L_,ZodISOTime:()=>M_,date:()=>nd,datetime:()=>rd,duration:()=>id,time:()=>od});function rd(e){return __(D_,e)}function nd(e){return v_(j_,e)}function od(e){return b_(M_,e)}function id(e){return x_(L_,e)}var D_,j_,M_,L_,sd=_(()=>{at();ad();D_=w("ZodISODateTime",(e,t)=>{u_.init(e,t),Te.init(e,t)});j_=w("ZodISODate",(e,t)=>{l_.init(e,t),Te.init(e,t)});M_=w("ZodISOTime",(e,t)=>{p_.init(e,t),Te.init(e,t)});L_=w("ZodISODuration",(e,t)=>{d_.init(e,t),Te.init(e,t)})});var Z_,K6,Ii,cd=_(()=>{at();at();Z_=(e,t)=>{Xs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>al(e,r)},flatten:{value:r=>sl(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},K6=w("ZodError",Z_),Ii=w("ZodError",Z_,{Parent:Error})});var q_,F_,U_,B_,ud=_(()=>{at();cd();q_=ul(Ii),F_=pl(Ii),U_=fl(Ii),B_=hl(Ii)});function x(e){return pp(JE,e)}function fe(e){return Ap(K_,e)}function H_(e){return Op(hI,e)}function qe(e){return Np(mI,e)}function dd(e){return Dp(gI,e)}function Pe(){return jp(yI)}function vI(e){return Mp(_I,e)}function ie(e,t){return w_(bI,e,t)}function z(e,t){let r={type:"object",get shape(){return oe.assignProp(this,"shape",{...e}),this.shape},...oe.normalizeParams(t)};return new J_(r)}function ct(e,t){return new J_({type:"object",get shape(){return oe.assignProp(this,"shape",{...e}),this.shape},catchall:Pe(),...oe.normalizeParams(t)})}function xe(e,t){return new Y_({type:"union",options:e,...oe.normalizeParams(t)})}function fd(e,t,r){return new xI({type:"union",options:t,discriminator:e,...oe.normalizeParams(r)})}function ba(e,t){return new wI({type:"intersection",left:e,right:t})}function Ce(e,t,r){return new kI({type:"record",keyType:e,valueType:t,...oe.normalizeParams(r)})}function _t(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ld({type:"enum",entries:r,...oe.normalizeParams(t)})}function N(e,t){return new SI({type:"literal",values:Array.isArray(e)?e:[e],...oe.normalizeParams(t)})}function Q_(e){return new $I({type:"transform",transform:e})}function ze(e){return new X_({type:"optional",innerType:e})}function G_(e){return new TI({type:"nullable",innerType:e})}function CI(e,t){return new PI({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function II(e,t){return new EI({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function zI(e,t){return new ev({type:"nonoptional",innerType:e,...oe.normalizeParams(t)})}function AI(e,t){return new RI({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function pd(e,t){return new OI({type:"pipe",in:e,out:t})}function DI(e){return new NI({type:"readonly",innerType:e})}function jI(e){let t=new Ue({check:"custom"});return t._zod.check=e,t}function rv(e,t){return Kp(tv,e??(()=>!0),t)}function MI(e,t={}){return Jp(tv,e,t)}function LI(e){let t=jI(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(oe.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(oe.issue(o))}},e(r.value,r)));return t}function hd(e,t){return pd(Q_(e),t)}var Re,W_,JE,Te,YE,V_,va,QE,XE,eI,tI,rI,nI,oI,iI,sI,aI,cI,uI,lI,pI,dI,fI,K_,hI,mI,gI,yI,_I,bI,J_,Y_,xI,wI,kI,ld,SI,$I,X_,TI,PI,EI,ev,RI,OI,NI,tv,ad=_(()=>{at();at();td();sd();ud();Re=w("ZodType",(e,t)=>(me.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)=>Ct(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>q_(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>U_(e,r,n),e.parseAsync=async(r,n)=>F_(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>B_(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(MI(r,n)),e.superRefine=r=>e.check(LI(r)),e.overwrite=r=>e.check(Ln(r)),e.optional=()=>ze(e),e.nullable=()=>G_(e),e.nullish=()=>ze(G_(e)),e.nonoptional=r=>zI(e,r),e.array=()=>ie(e),e.or=r=>xe([e,r]),e.and=r=>ba(e,r),e.transform=r=>pd(e,Q_(r)),e.default=r=>CI(e,r),e.prefault=r=>II(e,r),e.catch=r=>AI(e,r),e.pipe=r=>pd(e,r),e.readonly=()=>DI(e),e.describe=r=>{let n=e.clone();return Jr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Jr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Jr.get(e);let n=e.clone();return Jr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),W_=w("_ZodString",(e,t)=>{Si.init(e,t),Re.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(Lp(...n)),e.includes=(...n)=>e.check(Fp(...n)),e.startsWith=(...n)=>e.check(Up(...n)),e.endsWith=(...n)=>e.check(Bp(...n)),e.min=(...n)=>e.check(wo(...n)),e.max=(...n)=>e.check(fa(...n)),e.length=(...n)=>e.check(ha(...n)),e.nonempty=(...n)=>e.check(wo(1,...n)),e.lowercase=n=>e.check(Zp(n)),e.uppercase=n=>e.check(qp(n)),e.trim=()=>e.check(Hp()),e.normalize=(...n)=>e.check(Vp(...n)),e.toLowerCase=()=>e.check(Gp()),e.toUpperCase=()=>e.check(Wp())}),JE=w("ZodString",(e,t)=>{Si.init(e,t),W_.init(e,t),e.email=r=>e.check(dp(YE,r)),e.url=r=>e.check(yp(QE,r)),e.jwt=r=>e.check(Rp(fI,r)),e.emoji=r=>e.check(_p(XE,r)),e.guid=r=>e.check(ua(V_,r)),e.uuid=r=>e.check(fp(va,r)),e.uuidv4=r=>e.check(hp(va,r)),e.uuidv6=r=>e.check(mp(va,r)),e.uuidv7=r=>e.check(gp(va,r)),e.nanoid=r=>e.check(vp(eI,r)),e.guid=r=>e.check(ua(V_,r)),e.cuid=r=>e.check(bp(tI,r)),e.cuid2=r=>e.check(xp(rI,r)),e.ulid=r=>e.check(wp(nI,r)),e.base64=r=>e.check(Ep(lI,r)),e.base64url=r=>e.check(Ip(pI,r)),e.xid=r=>e.check(kp(oI,r)),e.ksuid=r=>e.check(Sp(iI,r)),e.ipv4=r=>e.check($p(sI,r)),e.ipv6=r=>e.check(Tp(aI,r)),e.cidrv4=r=>e.check(Pp(cI,r)),e.cidrv6=r=>e.check(Cp(uI,r)),e.e164=r=>e.check(zp(dI,r)),e.datetime=r=>e.check(rd(r)),e.date=r=>e.check(nd(r)),e.time=r=>e.check(od(r)),e.duration=r=>e.check(id(r))});Te=w("ZodStringFormat",(e,t)=>{be.init(e,t),W_.init(e,t)}),YE=w("ZodEmail",(e,t)=>{$l.init(e,t),Te.init(e,t)}),V_=w("ZodGUID",(e,t)=>{kl.init(e,t),Te.init(e,t)}),va=w("ZodUUID",(e,t)=>{Sl.init(e,t),Te.init(e,t)}),QE=w("ZodURL",(e,t)=>{Tl.init(e,t),Te.init(e,t)}),XE=w("ZodEmoji",(e,t)=>{Pl.init(e,t),Te.init(e,t)}),eI=w("ZodNanoID",(e,t)=>{Cl.init(e,t),Te.init(e,t)}),tI=w("ZodCUID",(e,t)=>{El.init(e,t),Te.init(e,t)}),rI=w("ZodCUID2",(e,t)=>{Il.init(e,t),Te.init(e,t)}),nI=w("ZodULID",(e,t)=>{zl.init(e,t),Te.init(e,t)}),oI=w("ZodXID",(e,t)=>{Rl.init(e,t),Te.init(e,t)}),iI=w("ZodKSUID",(e,t)=>{Al.init(e,t),Te.init(e,t)}),sI=w("ZodIPv4",(e,t)=>{Ol.init(e,t),Te.init(e,t)}),aI=w("ZodIPv6",(e,t)=>{Nl.init(e,t),Te.init(e,t)}),cI=w("ZodCIDRv4",(e,t)=>{Dl.init(e,t),Te.init(e,t)}),uI=w("ZodCIDRv6",(e,t)=>{jl.init(e,t),Te.init(e,t)}),lI=w("ZodBase64",(e,t)=>{Ml.init(e,t),Te.init(e,t)}),pI=w("ZodBase64URL",(e,t)=>{Ll.init(e,t),Te.init(e,t)}),dI=w("ZodE164",(e,t)=>{Zl.init(e,t),Te.init(e,t)}),fI=w("ZodJWT",(e,t)=>{ql.init(e,t),Te.init(e,t)}),K_=w("ZodNumber",(e,t)=>{ia.init(e,t),Re.init(e,t),e.gt=(n,o)=>e.check(pa(n,o)),e.gte=(n,o)=>e.check(Pi(n,o)),e.min=(n,o)=>e.check(Pi(n,o)),e.lt=(n,o)=>e.check(la(n,o)),e.lte=(n,o)=>e.check(Ti(n,o)),e.max=(n,o)=>e.check(Ti(n,o)),e.int=n=>e.check(H_(n)),e.safe=n=>e.check(H_(n)),e.positive=n=>e.check(pa(0,n)),e.nonnegative=n=>e.check(Pi(0,n)),e.negative=n=>e.check(la(0,n)),e.nonpositive=n=>e.check(Ti(0,n)),e.multipleOf=(n,o)=>e.check(da(n,o)),e.step=(n,o)=>e.check(da(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});hI=w("ZodNumberFormat",(e,t)=>{Fl.init(e,t),K_.init(e,t)});mI=w("ZodBoolean",(e,t)=>{Ul.init(e,t),Re.init(e,t)});gI=w("ZodNull",(e,t)=>{Bl.init(e,t),Re.init(e,t)});yI=w("ZodUnknown",(e,t)=>{Vl.init(e,t),Re.init(e,t)});_I=w("ZodNever",(e,t)=>{Hl.init(e,t),Re.init(e,t)});bI=w("ZodArray",(e,t)=>{Gl.init(e,t),Re.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(wo(r,n)),e.nonempty=r=>e.check(wo(1,r)),e.max=(r,n)=>e.check(fa(r,n)),e.length=(r,n)=>e.check(ha(r,n)),e.unwrap=()=>e.element});J_=w("ZodObject",(e,t)=>{sa.init(e,t),Re.init(e,t),oe.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>_t(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Pe()}),e.loose=()=>e.clone({...e._zod.def,catchall:Pe()}),e.strict=()=>e.clone({...e._zod.def,catchall:vI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>oe.extend(e,r),e.merge=r=>oe.merge(e,r),e.pick=r=>oe.pick(e,r),e.omit=r=>oe.omit(e,r),e.partial=(...r)=>oe.partial(X_,e,r[0]),e.required=(...r)=>oe.required(ev,e,r[0])});Y_=w("ZodUnion",(e,t)=>{aa.init(e,t),Re.init(e,t),e.options=t.options});xI=w("ZodDiscriminatedUnion",(e,t)=>{Y_.init(e,t),Wl.init(e,t)});wI=w("ZodIntersection",(e,t)=>{Kl.init(e,t),Re.init(e,t)});kI=w("ZodRecord",(e,t)=>{Jl.init(e,t),Re.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});ld=w("ZodEnum",(e,t)=>{Yl.init(e,t),Re.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 ld({...t,checks:[],...oe.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 ld({...t,checks:[],...oe.normalizeParams(o),entries:i})}});SI=w("ZodLiteral",(e,t)=>{Ql.init(e,t),Re.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]}})});$I=w("ZodTransform",(e,t)=>{Xl.init(e,t),Re.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(oe.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(oe.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});X_=w("ZodOptional",(e,t)=>{ep.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});TI=w("ZodNullable",(e,t)=>{tp.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});PI=w("ZodDefault",(e,t)=>{rp.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});EI=w("ZodPrefault",(e,t)=>{np.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});ev=w("ZodNonOptional",(e,t)=>{op.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType});RI=w("ZodCatch",(e,t)=>{ip.init(e,t),Re.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});OI=w("ZodPipe",(e,t)=>{sp.init(e,t),Re.init(e,t),e.in=t.in,e.out=t.out});NI=w("ZodReadonly",(e,t)=>{ap.init(e,t),Re.init(e,t)});tv=w("ZodCustom",(e,t)=>{cp.init(e,t),Re.init(e,t)})});var nv=_(()=>{});var ov=_(()=>{});var iv=_(()=>{at();ad();td();cd();ud();nv();at();g_();ca();sd();ov();Pt(m_())});var sv=_(()=>{iv()});var av=_(()=>{sv()});function Sv(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function $v(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var gd,cv,Xr,wa,Be,uv,lv,pq,FI,UI,yd,Et,zi,pv,Ve,Dt,jt,He,ka,dv,_d,fv,hv,vd,Ri,L,bd,mv,gv,dq,Sa,BI,$a,VI,Ai,So,yv,HI,GI,WI,KI,JI,YI,xd,QI,XI,wd,Ta,ez,tz,Pa,rz,Oi,Ni,nz,Di,$o,oz,ji,Ca,Ea,Ia,fq,za,Ra,Aa,_v,vv,bv,kd,xv,Mi,To,wv,iz,Oa,sz,Na,az,Sd,cz,Da,uz,lz,pz,dz,fz,hz,mz,gz,yz,_z,ja,vz,bz,Ma,$d,Td,Pd,xz,wz,kz,Cd,Sz,$z,Tz,Pz,Cz,kv,La,Ez,Za,hq,Iz,Po,zz,mq,Li,Rz,Ed,Az,Oz,Nz,Dz,jz,Mz,Lz,xa,Zz,qz,Fz,Id,zd,Uz,Bz,Vz,Hz,Gz,Wz,Kz,Jz,Yz,Qz,Xz,eR,tR,rR,nR,oR,iR,sR,qa,aR,cR,uR,Fa,lR,pR,dR,Rd,fR,gq,yq,_q,vq,bq,xq,O,md,Zi=_(()=>{av();gd="2025-11-25",cv=[gd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Xr="io.modelcontextprotocol/related-task",wa="2.0",Be=rv(e=>e!==null&&(typeof e=="object"||typeof e=="function")),uv=xe([x(),fe().int()]),lv=x(),pq=ct({ttl:xe([fe(),dd()]).optional(),pollInterval:fe().optional()}),FI=z({ttl:fe().optional()}),UI=z({taskId:x()}),yd=ct({progressToken:uv.optional(),[Xr]:UI.optional()}),Et=z({_meta:yd.optional()}),zi=Et.extend({task:FI.optional()}),pv=e=>zi.safeParse(e).success,Ve=z({method:x(),params:Et.loose().optional()}),Dt=z({_meta:yd.optional()}),jt=z({method:x(),params:Dt.loose().optional()}),He=ct({_meta:yd.optional()}),ka=xe([x(),fe().int()]),dv=z({jsonrpc:N(wa),id:ka,...Ve.shape}).strict(),_d=e=>dv.safeParse(e).success,fv=z({jsonrpc:N(wa),...jt.shape}).strict(),hv=e=>fv.safeParse(e).success,vd=z({jsonrpc:N(wa),id:ka,result:He}).strict(),Ri=e=>vd.safeParse(e).success;(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"})(L||(L={}));bd=z({jsonrpc:N(wa),id:ka.optional(),error:z({code:fe().int(),message:x(),data:Pe().optional()})}).strict(),mv=e=>bd.safeParse(e).success,gv=xe([dv,fv,vd,bd]),dq=xe([vd,bd]),Sa=He.strict(),BI=Dt.extend({requestId:ka.optional(),reason:x().optional()}),$a=jt.extend({method:N("notifications/cancelled"),params:BI}),VI=z({src:x(),mimeType:x().optional(),sizes:ie(x()).optional(),theme:_t(["light","dark"]).optional()}),Ai=z({icons:ie(VI).optional()}),So=z({name:x(),title:x().optional()}),yv=So.extend({...So.shape,...Ai.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),HI=ba(z({applyDefaults:qe().optional()}),Ce(x(),Pe())),GI=hd(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ba(z({form:HI.optional(),url:Be.optional()}),Ce(x(),Pe()).optional())),WI=ct({list:Be.optional(),cancel:Be.optional(),requests:ct({sampling:ct({createMessage:Be.optional()}).optional(),elicitation:ct({create:Be.optional()}).optional()}).optional()}),KI=ct({list:Be.optional(),cancel:Be.optional(),requests:ct({tools:ct({call:Be.optional()}).optional()}).optional()}),JI=z({experimental:Ce(x(),Be).optional(),sampling:z({context:Be.optional(),tools:Be.optional()}).optional(),elicitation:GI.optional(),roots:z({listChanged:qe().optional()}).optional(),tasks:WI.optional()}),YI=Et.extend({protocolVersion:x(),capabilities:JI,clientInfo:yv}),xd=Ve.extend({method:N("initialize"),params:YI}),QI=z({experimental:Ce(x(),Be).optional(),logging:Be.optional(),completions:Be.optional(),prompts:z({listChanged:qe().optional()}).optional(),resources:z({subscribe:qe().optional(),listChanged:qe().optional()}).optional(),tools:z({listChanged:qe().optional()}).optional(),tasks:KI.optional()}),XI=He.extend({protocolVersion:x(),capabilities:QI,serverInfo:yv,instructions:x().optional()}),wd=jt.extend({method:N("notifications/initialized"),params:Dt.optional()}),Ta=Ve.extend({method:N("ping"),params:Et.optional()}),ez=z({progress:fe(),total:ze(fe()),message:ze(x())}),tz=z({...Dt.shape,...ez.shape,progressToken:uv}),Pa=jt.extend({method:N("notifications/progress"),params:tz}),rz=Et.extend({cursor:lv.optional()}),Oi=Ve.extend({params:rz.optional()}),Ni=He.extend({nextCursor:lv.optional()}),nz=_t(["working","input_required","completed","failed","cancelled"]),Di=z({taskId:x(),status:nz,ttl:xe([fe(),dd()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:ze(fe()),statusMessage:ze(x())}),$o=He.extend({task:Di}),oz=Dt.merge(Di),ji=jt.extend({method:N("notifications/tasks/status"),params:oz}),Ca=Ve.extend({method:N("tasks/get"),params:Et.extend({taskId:x()})}),Ea=He.merge(Di),Ia=Ve.extend({method:N("tasks/result"),params:Et.extend({taskId:x()})}),fq=He.loose(),za=Oi.extend({method:N("tasks/list")}),Ra=Ni.extend({tasks:ie(Di)}),Aa=Ve.extend({method:N("tasks/cancel"),params:Et.extend({taskId:x()})}),_v=He.merge(Di),vv=z({uri:x(),mimeType:ze(x()),_meta:Ce(x(),Pe()).optional()}),bv=vv.extend({text:x()}),kd=x().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),xv=vv.extend({blob:kd}),Mi=_t(["user","assistant"]),To=z({audience:ie(Mi).optional(),priority:fe().min(0).max(1).optional(),lastModified:Ei.datetime({offset:!0}).optional()}),wv=z({...So.shape,...Ai.shape,uri:x(),description:ze(x()),mimeType:ze(x()),annotations:To.optional(),_meta:ze(ct({}))}),iz=z({...So.shape,...Ai.shape,uriTemplate:x(),description:ze(x()),mimeType:ze(x()),annotations:To.optional(),_meta:ze(ct({}))}),Oa=Oi.extend({method:N("resources/list")}),sz=Ni.extend({resources:ie(wv)}),Na=Oi.extend({method:N("resources/templates/list")}),az=Ni.extend({resourceTemplates:ie(iz)}),Sd=Et.extend({uri:x()}),cz=Sd,Da=Ve.extend({method:N("resources/read"),params:cz}),uz=He.extend({contents:ie(xe([bv,xv]))}),lz=jt.extend({method:N("notifications/resources/list_changed"),params:Dt.optional()}),pz=Sd,dz=Ve.extend({method:N("resources/subscribe"),params:pz}),fz=Sd,hz=Ve.extend({method:N("resources/unsubscribe"),params:fz}),mz=Dt.extend({uri:x()}),gz=jt.extend({method:N("notifications/resources/updated"),params:mz}),yz=z({name:x(),description:ze(x()),required:ze(qe())}),_z=z({...So.shape,...Ai.shape,description:ze(x()),arguments:ze(ie(yz)),_meta:ze(ct({}))}),ja=Oi.extend({method:N("prompts/list")}),vz=Ni.extend({prompts:ie(_z)}),bz=Et.extend({name:x(),arguments:Ce(x(),x()).optional()}),Ma=Ve.extend({method:N("prompts/get"),params:bz}),$d=z({type:N("text"),text:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),Td=z({type:N("image"),data:kd,mimeType:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),Pd=z({type:N("audio"),data:kd,mimeType:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),xz=z({type:N("tool_use"),name:x(),id:x(),input:Ce(x(),Pe()),_meta:Ce(x(),Pe()).optional()}),wz=z({type:N("resource"),resource:xe([bv,xv]),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),kz=wv.extend({type:N("resource_link")}),Cd=xe([$d,Td,Pd,kz,wz]),Sz=z({role:Mi,content:Cd}),$z=He.extend({description:x().optional(),messages:ie(Sz)}),Tz=jt.extend({method:N("notifications/prompts/list_changed"),params:Dt.optional()}),Pz=z({title:x().optional(),readOnlyHint:qe().optional(),destructiveHint:qe().optional(),idempotentHint:qe().optional(),openWorldHint:qe().optional()}),Cz=z({taskSupport:_t(["required","optional","forbidden"]).optional()}),kv=z({...So.shape,...Ai.shape,description:x().optional(),inputSchema:z({type:N("object"),properties:Ce(x(),Be).optional(),required:ie(x()).optional()}).catchall(Pe()),outputSchema:z({type:N("object"),properties:Ce(x(),Be).optional(),required:ie(x()).optional()}).catchall(Pe()).optional(),annotations:Pz.optional(),execution:Cz.optional(),_meta:Ce(x(),Pe()).optional()}),La=Oi.extend({method:N("tools/list")}),Ez=Ni.extend({tools:ie(kv)}),Za=He.extend({content:ie(Cd).default([]),structuredContent:Ce(x(),Pe()).optional(),isError:qe().optional()}),hq=Za.or(He.extend({toolResult:Pe()})),Iz=zi.extend({name:x(),arguments:Ce(x(),Pe()).optional()}),Po=Ve.extend({method:N("tools/call"),params:Iz}),zz=jt.extend({method:N("notifications/tools/list_changed"),params:Dt.optional()}),mq=z({autoRefresh:qe().default(!0),debounceMs:fe().int().nonnegative().default(300)}),Li=_t(["debug","info","notice","warning","error","critical","alert","emergency"]),Rz=Et.extend({level:Li}),Ed=Ve.extend({method:N("logging/setLevel"),params:Rz}),Az=Dt.extend({level:Li,logger:x().optional(),data:Pe()}),Oz=jt.extend({method:N("notifications/message"),params:Az}),Nz=z({name:x().optional()}),Dz=z({hints:ie(Nz).optional(),costPriority:fe().min(0).max(1).optional(),speedPriority:fe().min(0).max(1).optional(),intelligencePriority:fe().min(0).max(1).optional()}),jz=z({mode:_t(["auto","required","none"]).optional()}),Mz=z({type:N("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:ie(Cd).default([]),structuredContent:z({}).loose().optional(),isError:qe().optional(),_meta:Ce(x(),Pe()).optional()}),Lz=fd("type",[$d,Td,Pd]),xa=fd("type",[$d,Td,Pd,xz,Mz]),Zz=z({role:Mi,content:xe([xa,ie(xa)]),_meta:Ce(x(),Pe()).optional()}),qz=zi.extend({messages:ie(Zz),modelPreferences:Dz.optional(),systemPrompt:x().optional(),includeContext:_t(["none","thisServer","allServers"]).optional(),temperature:fe().optional(),maxTokens:fe().int(),stopSequences:ie(x()).optional(),metadata:Be.optional(),tools:ie(kv).optional(),toolChoice:jz.optional()}),Fz=Ve.extend({method:N("sampling/createMessage"),params:qz}),Id=He.extend({model:x(),stopReason:ze(_t(["endTurn","stopSequence","maxTokens"]).or(x())),role:Mi,content:Lz}),zd=He.extend({model:x(),stopReason:ze(_t(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:Mi,content:xe([xa,ie(xa)])}),Uz=z({type:N("boolean"),title:x().optional(),description:x().optional(),default:qe().optional()}),Bz=z({type:N("string"),title:x().optional(),description:x().optional(),minLength:fe().optional(),maxLength:fe().optional(),format:_t(["email","uri","date","date-time"]).optional(),default:x().optional()}),Vz=z({type:_t(["number","integer"]),title:x().optional(),description:x().optional(),minimum:fe().optional(),maximum:fe().optional(),default:fe().optional()}),Hz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),default:x().optional()}),Gz=z({type:N("string"),title:x().optional(),description:x().optional(),oneOf:ie(z({const:x(),title:x()})),default:x().optional()}),Wz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),enumNames:ie(x()).optional(),default:x().optional()}),Kz=xe([Hz,Gz]),Jz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:z({type:N("string"),enum:ie(x())}),default:ie(x()).optional()}),Yz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:z({anyOf:ie(z({const:x(),title:x()}))}),default:ie(x()).optional()}),Qz=xe([Jz,Yz]),Xz=xe([Wz,Kz,Qz]),eR=xe([Xz,Uz,Bz,Vz]),tR=zi.extend({mode:N("form").optional(),message:x(),requestedSchema:z({type:N("object"),properties:Ce(x(),eR),required:ie(x()).optional()})}),rR=zi.extend({mode:N("url"),message:x(),elicitationId:x(),url:x().url()}),nR=xe([tR,rR]),oR=Ve.extend({method:N("elicitation/create"),params:nR}),iR=Dt.extend({elicitationId:x()}),sR=jt.extend({method:N("notifications/elicitation/complete"),params:iR}),qa=He.extend({action:_t(["accept","decline","cancel"]),content:hd(e=>e===null?void 0:e,Ce(x(),xe([x(),fe(),qe(),ie(x())])).optional())}),aR=z({type:N("ref/resource"),uri:x()}),cR=z({type:N("ref/prompt"),name:x()}),uR=Et.extend({ref:xe([cR,aR]),argument:z({name:x(),value:x()}),context:z({arguments:Ce(x(),x()).optional()}).optional()}),Fa=Ve.extend({method:N("completion/complete"),params:uR});lR=He.extend({completion:ct({values:ie(x()).max(100),total:ze(fe().int()),hasMore:ze(qe())})}),pR=z({uri:x().startsWith("file://"),name:x().optional(),_meta:Ce(x(),Pe()).optional()}),dR=Ve.extend({method:N("roots/list"),params:Et.optional()}),Rd=He.extend({roots:ie(pR)}),fR=jt.extend({method:N("notifications/roots/list_changed"),params:Dt.optional()}),gq=xe([Ta,xd,Fa,Ed,Ma,ja,Oa,Na,Da,dz,hz,Po,La,Ca,Ia,za,Aa]),yq=xe([$a,Pa,wd,fR,ji]),_q=xe([Sa,Id,zd,qa,Rd,Ea,Ra,$o]),vq=xe([Ta,Fz,oR,dR,Ca,Ia,za,Aa]),bq=xe([$a,Pa,Oz,gz,lz,zz,Tz,ji,sR]),xq=xe([Sa,XI,lR,$z,vz,sz,az,uz,Za,Ez,Ea,Ra,$o]),O=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===L.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new md(o.elicitations,r)}return new e(t,r,n)}},md=class extends O{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(L.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}});function en(e){return e==="completed"||e==="failed"||e==="cancelled"}var Tv=_(()=>{});var Cv,Pv,Ev,Ua=_(()=>{Cv=Symbol("Let zodToJsonSchema decide on which parser to use"),Pv={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"},Ev=e=>typeof e=="string"?{...Pv,name:e}:{...Pv,...e}});var Iv,Ad=_(()=>{Ua();Iv=e=>{let t=Ev(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 Od(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function se(e,t,r,n,o){e[t]=r,Od(e,t,n,o)}var tn=_(()=>{});var Ba,Va=_(()=>{Ba=(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 Ee(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Ba(t,e.currentPath):t.join("/")}}var Mt=_(()=>{Va()});function zv(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==P.ZodAny&&(r.items=B(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&se(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&se(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(se(r,"minItems",e.exactLength.value,e.exactLength.message,t),se(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Nd=_(()=>{mi();tn();De()});function Rv(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?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Dd=_(()=>{tn()});function Av(){return{type:"boolean"}}var jd=_(()=>{});function Ha(e,t){return B(e.type._def,t)}var Ga=_(()=>{De()});var Ov,Md=_(()=>{De();Ov=(e,t)=>B(e.innerType._def,t)});function Ld(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>Ld(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 hR(e,t)}}var hR,Zd=_(()=>{tn();hR=(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":se(r,"minimum",n.value,n.message,t);break;case"max":se(r,"maximum",n.value,n.message,t);break}return r}});function Nv(e,t){return{...B(e.innerType._def,t),default:e.defaultValue()}}var qd=_(()=>{De()});function Dv(e,t){return t.effectStrategy==="input"?B(e.schema._def,t):Ee(t)}var Fd=_(()=>{De();Mt()});function jv(e){return{type:"string",enum:Array.from(e.values)}}var Ud=_(()=>{});function Mv(e,t){let r=[B(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),B(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(mR(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}var mR,Bd=_(()=>{De();mR=e=>"type"in e&&e.type==="string"?!1:"allOf"in e});function Lv(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 Vd=_(()=>{});function Wa(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":se(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":Yt(r,"email",n.message,t);break;case"format:idn-email":Yt(r,"idn-email",n.message,t);break;case"pattern:zod":ut(r,Jt.email,n.message,t);break}break;case"url":Yt(r,"uri",n.message,t);break;case"uuid":Yt(r,"uuid",n.message,t);break;case"regex":ut(r,n.regex,n.message,t);break;case"cuid":ut(r,Jt.cuid,n.message,t);break;case"cuid2":ut(r,Jt.cuid2,n.message,t);break;case"startsWith":ut(r,RegExp(`^${Gd(n.value,t)}`),n.message,t);break;case"endsWith":ut(r,RegExp(`${Gd(n.value,t)}$`),n.message,t);break;case"datetime":Yt(r,"date-time",n.message,t);break;case"date":Yt(r,"date",n.message,t);break;case"time":Yt(r,"time",n.message,t);break;case"duration":Yt(r,"duration",n.message,t);break;case"length":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{ut(r,RegExp(Gd(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Yt(r,"ipv4",n.message,t),n.version!=="v4"&&Yt(r,"ipv6",n.message,t);break}case"base64url":ut(r,Jt.base64url,n.message,t);break;case"jwt":ut(r,Jt.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&ut(r,Jt.ipv4Cidr,n.message,t),n.version!=="v4"&&ut(r,Jt.ipv6Cidr,n.message,t);break}case"emoji":ut(r,Jt.emoji(),n.message,t);break;case"ulid":{ut(r,Jt.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Yt(r,"binary",n.message,t);break}case"contentEncoding:base64":{se(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{ut(r,Jt.base64,n.message,t);break}}break}case"nanoid":ut(r,Jt.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Gd(e,t){return t.patternStrategy==="escape"?yR(e):e}function yR(e){let t="";for(let r=0;r<e.length;r++)gR.has(e[r])||(t+="\\"),t+=e[r];return t}function Yt(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}}})):se(e,"format",t,r,n)}function ut(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:Zv(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):se(e,"pattern",Zv(t,n),r,n)}function Zv(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
28
+ 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 f=n.external.registry.get(p[0])?.id;if(t!==p[0]&&f){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),f=d.def??d.schema,h={...f};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"?(f.allOf=f.allOf??[],f.allOf.push(y)):(Object.assign(f,y),Object.assign(f,h))}d.isParent||this.override({zodSchema:p,jsonSchema:f,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.")}}}});var T_=_(()=>{});var at=_(()=>{vo();ml();cl();h_();ra();xl();dr();ta();ca();lp();bl();S_();k_();$_();T_()});var Qp=_(()=>{at()});function Xp(e,t){let r={type:"object",get shape(){return oe.assignProp(this,"shape",{...e}),this.shape},...oe.normalizeParams(t)};return new ZE(r)}var LE,ZE,P_=_(()=>{at();at();Qp();LE=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");me.init(e,t),e.def=t,e.parse=(r,n)=>ll(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>jn(e,r,n),e.parseAsync=async(r,n)=>dl(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Mn(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)=>Ct(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e))}),ZE=w("ZodMiniObject",(e,t)=>{sa.init(e,t),LE.init(e,t),oe.defineLazy(e,"shape",()=>t.shape)})});var C_=_(()=>{});var E_=_(()=>{});var I_=_(()=>{});var z_=_(()=>{at();Qp();P_();C_();at();ca();E_();I_()});var A_=_(()=>{z_()});var ed=_(()=>{A_()});function Nt(e){return!!e._zod}function qn(e){let t=Object.values(e);if(t.length===0)return Xp({});let r=t.every(Nt),n=t.every(o=>!Nt(o));if(r)return Xp(e);if(n)return Ku(e);throw new Error("Mixed Zod versions detected in object shape.")}function Yr(e,t){return Nt(e)?jn(e,t):e.safeParse(t)}async function ga(e,t){return Nt(e)?await Mn(e,t):await e.safeParseAsync(t)}function Qr(e){if(!e)return;let t;if(Nt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function ko(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 qn(e)}}if(Nt(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 ya(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 O_(e){return e.description}function N_(e){if(Nt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function _a(e){if(Nt(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 Ci=_(()=>{mi();ed()});var td=_(()=>{at()});var Ei={};Br(Ei,{ZodISODate:()=>j_,ZodISODateTime:()=>D_,ZodISODuration:()=>L_,ZodISOTime:()=>M_,date:()=>nd,datetime:()=>rd,duration:()=>id,time:()=>od});function rd(e){return __(D_,e)}function nd(e){return v_(j_,e)}function od(e){return b_(M_,e)}function id(e){return x_(L_,e)}var D_,j_,M_,L_,sd=_(()=>{at();ad();D_=w("ZodISODateTime",(e,t)=>{u_.init(e,t),Te.init(e,t)});j_=w("ZodISODate",(e,t)=>{l_.init(e,t),Te.init(e,t)});M_=w("ZodISOTime",(e,t)=>{p_.init(e,t),Te.init(e,t)});L_=w("ZodISODuration",(e,t)=>{d_.init(e,t),Te.init(e,t)})});var Z_,J6,Ii,cd=_(()=>{at();at();Z_=(e,t)=>{Xs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>al(e,r)},flatten:{value:r=>sl(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},J6=w("ZodError",Z_),Ii=w("ZodError",Z_,{Parent:Error})});var q_,F_,U_,B_,ud=_(()=>{at();cd();q_=ul(Ii),F_=pl(Ii),U_=fl(Ii),B_=hl(Ii)});function x(e){return pp(JE,e)}function fe(e){return Rp(K_,e)}function V_(e){return Op(hI,e)}function Fe(e){return Np(mI,e)}function dd(e){return Dp(gI,e)}function Pe(){return jp(yI)}function vI(e){return Mp(_I,e)}function ie(e,t){return w_(bI,e,t)}function z(e,t){let r={type:"object",get shape(){return oe.assignProp(this,"shape",{...e}),this.shape},...oe.normalizeParams(t)};return new J_(r)}function ct(e,t){return new J_({type:"object",get shape(){return oe.assignProp(this,"shape",{...e}),this.shape},catchall:Pe(),...oe.normalizeParams(t)})}function xe(e,t){return new Y_({type:"union",options:e,...oe.normalizeParams(t)})}function fd(e,t,r){return new xI({type:"union",options:t,discriminator:e,...oe.normalizeParams(r)})}function ba(e,t){return new wI({type:"intersection",left:e,right:t})}function Ce(e,t,r){return new kI({type:"record",keyType:e,valueType:t,...oe.normalizeParams(r)})}function _t(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ld({type:"enum",entries:r,...oe.normalizeParams(t)})}function N(e,t){return new SI({type:"literal",values:Array.isArray(e)?e:[e],...oe.normalizeParams(t)})}function Q_(e){return new $I({type:"transform",transform:e})}function ze(e){return new X_({type:"optional",innerType:e})}function G_(e){return new TI({type:"nullable",innerType:e})}function CI(e,t){return new PI({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function II(e,t){return new EI({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function zI(e,t){return new ev({type:"nonoptional",innerType:e,...oe.normalizeParams(t)})}function RI(e,t){return new AI({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function pd(e,t){return new OI({type:"pipe",in:e,out:t})}function DI(e){return new NI({type:"readonly",innerType:e})}function jI(e){let t=new Be({check:"custom"});return t._zod.check=e,t}function rv(e,t){return Kp(tv,e??(()=>!0),t)}function MI(e,t={}){return Jp(tv,e,t)}function LI(e){let t=jI(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(oe.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(oe.issue(o))}},e(r.value,r)));return t}function hd(e,t){return pd(Q_(e),t)}var Ae,W_,JE,Te,YE,H_,va,QE,XE,eI,tI,rI,nI,oI,iI,sI,aI,cI,uI,lI,pI,dI,fI,K_,hI,mI,gI,yI,_I,bI,J_,Y_,xI,wI,kI,ld,SI,$I,X_,TI,PI,EI,ev,AI,OI,NI,tv,ad=_(()=>{at();at();td();sd();ud();Ae=w("ZodType",(e,t)=>(me.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)=>Ct(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>q_(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>U_(e,r,n),e.parseAsync=async(r,n)=>F_(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>B_(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(MI(r,n)),e.superRefine=r=>e.check(LI(r)),e.overwrite=r=>e.check(Ln(r)),e.optional=()=>ze(e),e.nullable=()=>G_(e),e.nullish=()=>ze(G_(e)),e.nonoptional=r=>zI(e,r),e.array=()=>ie(e),e.or=r=>xe([e,r]),e.and=r=>ba(e,r),e.transform=r=>pd(e,Q_(r)),e.default=r=>CI(e,r),e.prefault=r=>II(e,r),e.catch=r=>RI(e,r),e.pipe=r=>pd(e,r),e.readonly=()=>DI(e),e.describe=r=>{let n=e.clone();return Jr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Jr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Jr.get(e);let n=e.clone();return Jr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),W_=w("_ZodString",(e,t)=>{Si.init(e,t),Ae.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(Lp(...n)),e.includes=(...n)=>e.check(Fp(...n)),e.startsWith=(...n)=>e.check(Up(...n)),e.endsWith=(...n)=>e.check(Bp(...n)),e.min=(...n)=>e.check(wo(...n)),e.max=(...n)=>e.check(fa(...n)),e.length=(...n)=>e.check(ha(...n)),e.nonempty=(...n)=>e.check(wo(1,...n)),e.lowercase=n=>e.check(Zp(n)),e.uppercase=n=>e.check(qp(n)),e.trim=()=>e.check(Vp()),e.normalize=(...n)=>e.check(Hp(...n)),e.toLowerCase=()=>e.check(Gp()),e.toUpperCase=()=>e.check(Wp())}),JE=w("ZodString",(e,t)=>{Si.init(e,t),W_.init(e,t),e.email=r=>e.check(dp(YE,r)),e.url=r=>e.check(yp(QE,r)),e.jwt=r=>e.check(Ap(fI,r)),e.emoji=r=>e.check(_p(XE,r)),e.guid=r=>e.check(ua(H_,r)),e.uuid=r=>e.check(fp(va,r)),e.uuidv4=r=>e.check(hp(va,r)),e.uuidv6=r=>e.check(mp(va,r)),e.uuidv7=r=>e.check(gp(va,r)),e.nanoid=r=>e.check(vp(eI,r)),e.guid=r=>e.check(ua(H_,r)),e.cuid=r=>e.check(bp(tI,r)),e.cuid2=r=>e.check(xp(rI,r)),e.ulid=r=>e.check(wp(nI,r)),e.base64=r=>e.check(Ep(lI,r)),e.base64url=r=>e.check(Ip(pI,r)),e.xid=r=>e.check(kp(oI,r)),e.ksuid=r=>e.check(Sp(iI,r)),e.ipv4=r=>e.check($p(sI,r)),e.ipv6=r=>e.check(Tp(aI,r)),e.cidrv4=r=>e.check(Pp(cI,r)),e.cidrv6=r=>e.check(Cp(uI,r)),e.e164=r=>e.check(zp(dI,r)),e.datetime=r=>e.check(rd(r)),e.date=r=>e.check(nd(r)),e.time=r=>e.check(od(r)),e.duration=r=>e.check(id(r))});Te=w("ZodStringFormat",(e,t)=>{be.init(e,t),W_.init(e,t)}),YE=w("ZodEmail",(e,t)=>{$l.init(e,t),Te.init(e,t)}),H_=w("ZodGUID",(e,t)=>{kl.init(e,t),Te.init(e,t)}),va=w("ZodUUID",(e,t)=>{Sl.init(e,t),Te.init(e,t)}),QE=w("ZodURL",(e,t)=>{Tl.init(e,t),Te.init(e,t)}),XE=w("ZodEmoji",(e,t)=>{Pl.init(e,t),Te.init(e,t)}),eI=w("ZodNanoID",(e,t)=>{Cl.init(e,t),Te.init(e,t)}),tI=w("ZodCUID",(e,t)=>{El.init(e,t),Te.init(e,t)}),rI=w("ZodCUID2",(e,t)=>{Il.init(e,t),Te.init(e,t)}),nI=w("ZodULID",(e,t)=>{zl.init(e,t),Te.init(e,t)}),oI=w("ZodXID",(e,t)=>{Al.init(e,t),Te.init(e,t)}),iI=w("ZodKSUID",(e,t)=>{Rl.init(e,t),Te.init(e,t)}),sI=w("ZodIPv4",(e,t)=>{Ol.init(e,t),Te.init(e,t)}),aI=w("ZodIPv6",(e,t)=>{Nl.init(e,t),Te.init(e,t)}),cI=w("ZodCIDRv4",(e,t)=>{Dl.init(e,t),Te.init(e,t)}),uI=w("ZodCIDRv6",(e,t)=>{jl.init(e,t),Te.init(e,t)}),lI=w("ZodBase64",(e,t)=>{Ml.init(e,t),Te.init(e,t)}),pI=w("ZodBase64URL",(e,t)=>{Ll.init(e,t),Te.init(e,t)}),dI=w("ZodE164",(e,t)=>{Zl.init(e,t),Te.init(e,t)}),fI=w("ZodJWT",(e,t)=>{ql.init(e,t),Te.init(e,t)}),K_=w("ZodNumber",(e,t)=>{ia.init(e,t),Ae.init(e,t),e.gt=(n,o)=>e.check(pa(n,o)),e.gte=(n,o)=>e.check(Pi(n,o)),e.min=(n,o)=>e.check(Pi(n,o)),e.lt=(n,o)=>e.check(la(n,o)),e.lte=(n,o)=>e.check(Ti(n,o)),e.max=(n,o)=>e.check(Ti(n,o)),e.int=n=>e.check(V_(n)),e.safe=n=>e.check(V_(n)),e.positive=n=>e.check(pa(0,n)),e.nonnegative=n=>e.check(Pi(0,n)),e.negative=n=>e.check(la(0,n)),e.nonpositive=n=>e.check(Ti(0,n)),e.multipleOf=(n,o)=>e.check(da(n,o)),e.step=(n,o)=>e.check(da(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});hI=w("ZodNumberFormat",(e,t)=>{Fl.init(e,t),K_.init(e,t)});mI=w("ZodBoolean",(e,t)=>{Ul.init(e,t),Ae.init(e,t)});gI=w("ZodNull",(e,t)=>{Bl.init(e,t),Ae.init(e,t)});yI=w("ZodUnknown",(e,t)=>{Hl.init(e,t),Ae.init(e,t)});_I=w("ZodNever",(e,t)=>{Vl.init(e,t),Ae.init(e,t)});bI=w("ZodArray",(e,t)=>{Gl.init(e,t),Ae.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(wo(r,n)),e.nonempty=r=>e.check(wo(1,r)),e.max=(r,n)=>e.check(fa(r,n)),e.length=(r,n)=>e.check(ha(r,n)),e.unwrap=()=>e.element});J_=w("ZodObject",(e,t)=>{sa.init(e,t),Ae.init(e,t),oe.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>_t(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Pe()}),e.loose=()=>e.clone({...e._zod.def,catchall:Pe()}),e.strict=()=>e.clone({...e._zod.def,catchall:vI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>oe.extend(e,r),e.merge=r=>oe.merge(e,r),e.pick=r=>oe.pick(e,r),e.omit=r=>oe.omit(e,r),e.partial=(...r)=>oe.partial(X_,e,r[0]),e.required=(...r)=>oe.required(ev,e,r[0])});Y_=w("ZodUnion",(e,t)=>{aa.init(e,t),Ae.init(e,t),e.options=t.options});xI=w("ZodDiscriminatedUnion",(e,t)=>{Y_.init(e,t),Wl.init(e,t)});wI=w("ZodIntersection",(e,t)=>{Kl.init(e,t),Ae.init(e,t)});kI=w("ZodRecord",(e,t)=>{Jl.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});ld=w("ZodEnum",(e,t)=>{Yl.init(e,t),Ae.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 ld({...t,checks:[],...oe.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 ld({...t,checks:[],...oe.normalizeParams(o),entries:i})}});SI=w("ZodLiteral",(e,t)=>{Ql.init(e,t),Ae.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]}})});$I=w("ZodTransform",(e,t)=>{Xl.init(e,t),Ae.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(oe.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(oe.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});X_=w("ZodOptional",(e,t)=>{ep.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType});TI=w("ZodNullable",(e,t)=>{tp.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType});PI=w("ZodDefault",(e,t)=>{rp.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});EI=w("ZodPrefault",(e,t)=>{np.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType});ev=w("ZodNonOptional",(e,t)=>{op.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType});AI=w("ZodCatch",(e,t)=>{ip.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});OI=w("ZodPipe",(e,t)=>{sp.init(e,t),Ae.init(e,t),e.in=t.in,e.out=t.out});NI=w("ZodReadonly",(e,t)=>{ap.init(e,t),Ae.init(e,t)});tv=w("ZodCustom",(e,t)=>{cp.init(e,t),Ae.init(e,t)})});var nv=_(()=>{});var ov=_(()=>{});var iv=_(()=>{at();ad();td();cd();ud();nv();at();g_();ca();sd();ov();Pt(m_())});var sv=_(()=>{iv()});var av=_(()=>{sv()});function Sv(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function $v(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var gd,cv,Xr,wa,He,uv,lv,dq,FI,UI,yd,Et,zi,pv,Ve,Dt,jt,Ge,ka,dv,_d,fv,hv,vd,Ai,L,bd,mv,gv,fq,Sa,BI,$a,HI,Ri,So,yv,VI,GI,WI,KI,JI,YI,xd,QI,XI,wd,Ta,ez,tz,Pa,rz,Oi,Ni,nz,Di,$o,oz,ji,Ca,Ea,Ia,hq,za,Aa,Ra,_v,vv,bv,kd,xv,Mi,To,wv,iz,Oa,sz,Na,az,Sd,cz,Da,uz,lz,pz,dz,fz,hz,mz,gz,yz,_z,ja,vz,bz,Ma,$d,Td,Pd,xz,wz,kz,Cd,Sz,$z,Tz,Pz,Cz,kv,La,Ez,Za,mq,Iz,Po,zz,gq,Li,Az,Ed,Rz,Oz,Nz,Dz,jz,Mz,Lz,xa,Zz,qz,Fz,Id,zd,Uz,Bz,Hz,Vz,Gz,Wz,Kz,Jz,Yz,Qz,Xz,eA,tA,rA,nA,oA,iA,sA,qa,aA,cA,uA,Fa,lA,pA,dA,Ad,fA,yq,_q,vq,bq,xq,wq,O,md,Zi=_(()=>{av();gd="2025-11-25",cv=[gd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Xr="io.modelcontextprotocol/related-task",wa="2.0",He=rv(e=>e!==null&&(typeof e=="object"||typeof e=="function")),uv=xe([x(),fe().int()]),lv=x(),dq=ct({ttl:xe([fe(),dd()]).optional(),pollInterval:fe().optional()}),FI=z({ttl:fe().optional()}),UI=z({taskId:x()}),yd=ct({progressToken:uv.optional(),[Xr]:UI.optional()}),Et=z({_meta:yd.optional()}),zi=Et.extend({task:FI.optional()}),pv=e=>zi.safeParse(e).success,Ve=z({method:x(),params:Et.loose().optional()}),Dt=z({_meta:yd.optional()}),jt=z({method:x(),params:Dt.loose().optional()}),Ge=ct({_meta:yd.optional()}),ka=xe([x(),fe().int()]),dv=z({jsonrpc:N(wa),id:ka,...Ve.shape}).strict(),_d=e=>dv.safeParse(e).success,fv=z({jsonrpc:N(wa),...jt.shape}).strict(),hv=e=>fv.safeParse(e).success,vd=z({jsonrpc:N(wa),id:ka,result:Ge}).strict(),Ai=e=>vd.safeParse(e).success;(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"})(L||(L={}));bd=z({jsonrpc:N(wa),id:ka.optional(),error:z({code:fe().int(),message:x(),data:Pe().optional()})}).strict(),mv=e=>bd.safeParse(e).success,gv=xe([dv,fv,vd,bd]),fq=xe([vd,bd]),Sa=Ge.strict(),BI=Dt.extend({requestId:ka.optional(),reason:x().optional()}),$a=jt.extend({method:N("notifications/cancelled"),params:BI}),HI=z({src:x(),mimeType:x().optional(),sizes:ie(x()).optional(),theme:_t(["light","dark"]).optional()}),Ri=z({icons:ie(HI).optional()}),So=z({name:x(),title:x().optional()}),yv=So.extend({...So.shape,...Ri.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),VI=ba(z({applyDefaults:Fe().optional()}),Ce(x(),Pe())),GI=hd(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ba(z({form:VI.optional(),url:He.optional()}),Ce(x(),Pe()).optional())),WI=ct({list:He.optional(),cancel:He.optional(),requests:ct({sampling:ct({createMessage:He.optional()}).optional(),elicitation:ct({create:He.optional()}).optional()}).optional()}),KI=ct({list:He.optional(),cancel:He.optional(),requests:ct({tools:ct({call:He.optional()}).optional()}).optional()}),JI=z({experimental:Ce(x(),He).optional(),sampling:z({context:He.optional(),tools:He.optional()}).optional(),elicitation:GI.optional(),roots:z({listChanged:Fe().optional()}).optional(),tasks:WI.optional()}),YI=Et.extend({protocolVersion:x(),capabilities:JI,clientInfo:yv}),xd=Ve.extend({method:N("initialize"),params:YI}),QI=z({experimental:Ce(x(),He).optional(),logging:He.optional(),completions:He.optional(),prompts:z({listChanged:Fe().optional()}).optional(),resources:z({subscribe:Fe().optional(),listChanged:Fe().optional()}).optional(),tools:z({listChanged:Fe().optional()}).optional(),tasks:KI.optional()}),XI=Ge.extend({protocolVersion:x(),capabilities:QI,serverInfo:yv,instructions:x().optional()}),wd=jt.extend({method:N("notifications/initialized"),params:Dt.optional()}),Ta=Ve.extend({method:N("ping"),params:Et.optional()}),ez=z({progress:fe(),total:ze(fe()),message:ze(x())}),tz=z({...Dt.shape,...ez.shape,progressToken:uv}),Pa=jt.extend({method:N("notifications/progress"),params:tz}),rz=Et.extend({cursor:lv.optional()}),Oi=Ve.extend({params:rz.optional()}),Ni=Ge.extend({nextCursor:lv.optional()}),nz=_t(["working","input_required","completed","failed","cancelled"]),Di=z({taskId:x(),status:nz,ttl:xe([fe(),dd()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:ze(fe()),statusMessage:ze(x())}),$o=Ge.extend({task:Di}),oz=Dt.merge(Di),ji=jt.extend({method:N("notifications/tasks/status"),params:oz}),Ca=Ve.extend({method:N("tasks/get"),params:Et.extend({taskId:x()})}),Ea=Ge.merge(Di),Ia=Ve.extend({method:N("tasks/result"),params:Et.extend({taskId:x()})}),hq=Ge.loose(),za=Oi.extend({method:N("tasks/list")}),Aa=Ni.extend({tasks:ie(Di)}),Ra=Ve.extend({method:N("tasks/cancel"),params:Et.extend({taskId:x()})}),_v=Ge.merge(Di),vv=z({uri:x(),mimeType:ze(x()),_meta:Ce(x(),Pe()).optional()}),bv=vv.extend({text:x()}),kd=x().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),xv=vv.extend({blob:kd}),Mi=_t(["user","assistant"]),To=z({audience:ie(Mi).optional(),priority:fe().min(0).max(1).optional(),lastModified:Ei.datetime({offset:!0}).optional()}),wv=z({...So.shape,...Ri.shape,uri:x(),description:ze(x()),mimeType:ze(x()),annotations:To.optional(),_meta:ze(ct({}))}),iz=z({...So.shape,...Ri.shape,uriTemplate:x(),description:ze(x()),mimeType:ze(x()),annotations:To.optional(),_meta:ze(ct({}))}),Oa=Oi.extend({method:N("resources/list")}),sz=Ni.extend({resources:ie(wv)}),Na=Oi.extend({method:N("resources/templates/list")}),az=Ni.extend({resourceTemplates:ie(iz)}),Sd=Et.extend({uri:x()}),cz=Sd,Da=Ve.extend({method:N("resources/read"),params:cz}),uz=Ge.extend({contents:ie(xe([bv,xv]))}),lz=jt.extend({method:N("notifications/resources/list_changed"),params:Dt.optional()}),pz=Sd,dz=Ve.extend({method:N("resources/subscribe"),params:pz}),fz=Sd,hz=Ve.extend({method:N("resources/unsubscribe"),params:fz}),mz=Dt.extend({uri:x()}),gz=jt.extend({method:N("notifications/resources/updated"),params:mz}),yz=z({name:x(),description:ze(x()),required:ze(Fe())}),_z=z({...So.shape,...Ri.shape,description:ze(x()),arguments:ze(ie(yz)),_meta:ze(ct({}))}),ja=Oi.extend({method:N("prompts/list")}),vz=Ni.extend({prompts:ie(_z)}),bz=Et.extend({name:x(),arguments:Ce(x(),x()).optional()}),Ma=Ve.extend({method:N("prompts/get"),params:bz}),$d=z({type:N("text"),text:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),Td=z({type:N("image"),data:kd,mimeType:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),Pd=z({type:N("audio"),data:kd,mimeType:x(),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),xz=z({type:N("tool_use"),name:x(),id:x(),input:Ce(x(),Pe()),_meta:Ce(x(),Pe()).optional()}),wz=z({type:N("resource"),resource:xe([bv,xv]),annotations:To.optional(),_meta:Ce(x(),Pe()).optional()}),kz=wv.extend({type:N("resource_link")}),Cd=xe([$d,Td,Pd,kz,wz]),Sz=z({role:Mi,content:Cd}),$z=Ge.extend({description:x().optional(),messages:ie(Sz)}),Tz=jt.extend({method:N("notifications/prompts/list_changed"),params:Dt.optional()}),Pz=z({title:x().optional(),readOnlyHint:Fe().optional(),destructiveHint:Fe().optional(),idempotentHint:Fe().optional(),openWorldHint:Fe().optional()}),Cz=z({taskSupport:_t(["required","optional","forbidden"]).optional()}),kv=z({...So.shape,...Ri.shape,description:x().optional(),inputSchema:z({type:N("object"),properties:Ce(x(),He).optional(),required:ie(x()).optional()}).catchall(Pe()),outputSchema:z({type:N("object"),properties:Ce(x(),He).optional(),required:ie(x()).optional()}).catchall(Pe()).optional(),annotations:Pz.optional(),execution:Cz.optional(),_meta:Ce(x(),Pe()).optional()}),La=Oi.extend({method:N("tools/list")}),Ez=Ni.extend({tools:ie(kv)}),Za=Ge.extend({content:ie(Cd).default([]),structuredContent:Ce(x(),Pe()).optional(),isError:Fe().optional()}),mq=Za.or(Ge.extend({toolResult:Pe()})),Iz=zi.extend({name:x(),arguments:Ce(x(),Pe()).optional()}),Po=Ve.extend({method:N("tools/call"),params:Iz}),zz=jt.extend({method:N("notifications/tools/list_changed"),params:Dt.optional()}),gq=z({autoRefresh:Fe().default(!0),debounceMs:fe().int().nonnegative().default(300)}),Li=_t(["debug","info","notice","warning","error","critical","alert","emergency"]),Az=Et.extend({level:Li}),Ed=Ve.extend({method:N("logging/setLevel"),params:Az}),Rz=Dt.extend({level:Li,logger:x().optional(),data:Pe()}),Oz=jt.extend({method:N("notifications/message"),params:Rz}),Nz=z({name:x().optional()}),Dz=z({hints:ie(Nz).optional(),costPriority:fe().min(0).max(1).optional(),speedPriority:fe().min(0).max(1).optional(),intelligencePriority:fe().min(0).max(1).optional()}),jz=z({mode:_t(["auto","required","none"]).optional()}),Mz=z({type:N("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:ie(Cd).default([]),structuredContent:z({}).loose().optional(),isError:Fe().optional(),_meta:Ce(x(),Pe()).optional()}),Lz=fd("type",[$d,Td,Pd]),xa=fd("type",[$d,Td,Pd,xz,Mz]),Zz=z({role:Mi,content:xe([xa,ie(xa)]),_meta:Ce(x(),Pe()).optional()}),qz=zi.extend({messages:ie(Zz),modelPreferences:Dz.optional(),systemPrompt:x().optional(),includeContext:_t(["none","thisServer","allServers"]).optional(),temperature:fe().optional(),maxTokens:fe().int(),stopSequences:ie(x()).optional(),metadata:He.optional(),tools:ie(kv).optional(),toolChoice:jz.optional()}),Fz=Ve.extend({method:N("sampling/createMessage"),params:qz}),Id=Ge.extend({model:x(),stopReason:ze(_t(["endTurn","stopSequence","maxTokens"]).or(x())),role:Mi,content:Lz}),zd=Ge.extend({model:x(),stopReason:ze(_t(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:Mi,content:xe([xa,ie(xa)])}),Uz=z({type:N("boolean"),title:x().optional(),description:x().optional(),default:Fe().optional()}),Bz=z({type:N("string"),title:x().optional(),description:x().optional(),minLength:fe().optional(),maxLength:fe().optional(),format:_t(["email","uri","date","date-time"]).optional(),default:x().optional()}),Hz=z({type:_t(["number","integer"]),title:x().optional(),description:x().optional(),minimum:fe().optional(),maximum:fe().optional(),default:fe().optional()}),Vz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),default:x().optional()}),Gz=z({type:N("string"),title:x().optional(),description:x().optional(),oneOf:ie(z({const:x(),title:x()})),default:x().optional()}),Wz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ie(x()),enumNames:ie(x()).optional(),default:x().optional()}),Kz=xe([Vz,Gz]),Jz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:z({type:N("string"),enum:ie(x())}),default:ie(x()).optional()}),Yz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:fe().optional(),maxItems:fe().optional(),items:z({anyOf:ie(z({const:x(),title:x()}))}),default:ie(x()).optional()}),Qz=xe([Jz,Yz]),Xz=xe([Wz,Kz,Qz]),eA=xe([Xz,Uz,Bz,Hz]),tA=zi.extend({mode:N("form").optional(),message:x(),requestedSchema:z({type:N("object"),properties:Ce(x(),eA),required:ie(x()).optional()})}),rA=zi.extend({mode:N("url"),message:x(),elicitationId:x(),url:x().url()}),nA=xe([tA,rA]),oA=Ve.extend({method:N("elicitation/create"),params:nA}),iA=Dt.extend({elicitationId:x()}),sA=jt.extend({method:N("notifications/elicitation/complete"),params:iA}),qa=Ge.extend({action:_t(["accept","decline","cancel"]),content:hd(e=>e===null?void 0:e,Ce(x(),xe([x(),fe(),Fe(),ie(x())])).optional())}),aA=z({type:N("ref/resource"),uri:x()}),cA=z({type:N("ref/prompt"),name:x()}),uA=Et.extend({ref:xe([cA,aA]),argument:z({name:x(),value:x()}),context:z({arguments:Ce(x(),x()).optional()}).optional()}),Fa=Ve.extend({method:N("completion/complete"),params:uA});lA=Ge.extend({completion:ct({values:ie(x()).max(100),total:ze(fe().int()),hasMore:ze(Fe())})}),pA=z({uri:x().startsWith("file://"),name:x().optional(),_meta:Ce(x(),Pe()).optional()}),dA=Ve.extend({method:N("roots/list"),params:Et.optional()}),Ad=Ge.extend({roots:ie(pA)}),fA=jt.extend({method:N("notifications/roots/list_changed"),params:Dt.optional()}),yq=xe([Ta,xd,Fa,Ed,Ma,ja,Oa,Na,Da,dz,hz,Po,La,Ca,Ia,za,Ra]),_q=xe([$a,Pa,wd,fA,ji]),vq=xe([Sa,Id,zd,qa,Ad,Ea,Aa,$o]),bq=xe([Ta,Fz,oA,dA,Ca,Ia,za,Ra]),xq=xe([$a,Pa,Oz,gz,lz,zz,Tz,ji,sA]),wq=xe([Sa,XI,lA,$z,vz,sz,az,uz,Za,Ez,Ea,Aa,$o]),O=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===L.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new md(o.elicitations,r)}return new e(t,r,n)}},md=class extends O{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(L.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}});function en(e){return e==="completed"||e==="failed"||e==="cancelled"}var Tv=_(()=>{});var Cv,Pv,Ev,Ua=_(()=>{Cv=Symbol("Let zodToJsonSchema decide on which parser to use"),Pv={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"},Ev=e=>typeof e=="string"?{...Pv,name:e}:{...Pv,...e}});var Iv,Rd=_(()=>{Ua();Iv=e=>{let t=Ev(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 Od(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function se(e,t,r,n,o){e[t]=r,Od(e,t,n,o)}var tn=_(()=>{});var Ba,Ha=_(()=>{Ba=(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 Ee(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Ba(t,e.currentPath):t.join("/")}}var Mt=_(()=>{Ha()});function zv(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==P.ZodAny&&(r.items=B(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&se(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&se(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(se(r,"minItems",e.exactLength.value,e.exactLength.message,t),se(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Nd=_(()=>{mi();tn();De()});function Av(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?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Dd=_(()=>{tn()});function Rv(){return{type:"boolean"}}var jd=_(()=>{});function Va(e,t){return B(e.type._def,t)}var Ga=_(()=>{De()});var Ov,Md=_(()=>{De();Ov=(e,t)=>B(e.innerType._def,t)});function Ld(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>Ld(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 hA(e,t)}}var hA,Zd=_(()=>{tn();hA=(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":se(r,"minimum",n.value,n.message,t);break;case"max":se(r,"maximum",n.value,n.message,t);break}return r}});function Nv(e,t){return{...B(e.innerType._def,t),default:e.defaultValue()}}var qd=_(()=>{De()});function Dv(e,t){return t.effectStrategy==="input"?B(e.schema._def,t):Ee(t)}var Fd=_(()=>{De();Mt()});function jv(e){return{type:"string",enum:Array.from(e.values)}}var Ud=_(()=>{});function Mv(e,t){let r=[B(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),B(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(mA(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}var mA,Bd=_(()=>{De();mA=e=>"type"in e&&e.type==="string"?!1:"allOf"in e});function Lv(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 Hd=_(()=>{});function Wa(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":se(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":Yt(r,"email",n.message,t);break;case"format:idn-email":Yt(r,"idn-email",n.message,t);break;case"pattern:zod":ut(r,Jt.email,n.message,t);break}break;case"url":Yt(r,"uri",n.message,t);break;case"uuid":Yt(r,"uuid",n.message,t);break;case"regex":ut(r,n.regex,n.message,t);break;case"cuid":ut(r,Jt.cuid,n.message,t);break;case"cuid2":ut(r,Jt.cuid2,n.message,t);break;case"startsWith":ut(r,RegExp(`^${Gd(n.value,t)}`),n.message,t);break;case"endsWith":ut(r,RegExp(`${Gd(n.value,t)}$`),n.message,t);break;case"datetime":Yt(r,"date-time",n.message,t);break;case"date":Yt(r,"date",n.message,t);break;case"time":Yt(r,"time",n.message,t);break;case"duration":Yt(r,"duration",n.message,t);break;case"length":se(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),se(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{ut(r,RegExp(Gd(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Yt(r,"ipv4",n.message,t),n.version!=="v4"&&Yt(r,"ipv6",n.message,t);break}case"base64url":ut(r,Jt.base64url,n.message,t);break;case"jwt":ut(r,Jt.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&ut(r,Jt.ipv4Cidr,n.message,t),n.version!=="v4"&&ut(r,Jt.ipv6Cidr,n.message,t);break}case"emoji":ut(r,Jt.emoji(),n.message,t);break;case"ulid":{ut(r,Jt.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Yt(r,"binary",n.message,t);break}case"contentEncoding:base64":{se(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{ut(r,Jt.base64,n.message,t);break}}break}case"nanoid":ut(r,Jt.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Gd(e,t){return t.patternStrategy==="escape"?yA(e):e}function yA(e){let t="";for(let r=0;r<e.length;r++)gA.has(e[r])||(t+="\\"),t+=e[r];return t}function Yt(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}}})):se(e,"format",t,r,n)}function ut(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:Zv(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):se(e,"pattern",Zv(t,n),r,n)}function Zv(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
29
29
  ]))`;continue}else if(n[c]==="$"){o+=`($|(?=[\r
30
30
  ]))`;continue}}if(r.s&&n[c]==="."){o+=s?`${n[c]}\r
31
31
  `:`[${n[c]}\r
32
- ]`;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}var Hd,Jt,gR,Ka=_(()=>{tn();Jt={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:()=>(Hd===void 0&&(Hd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Hd),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-_]*$/};gR=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function Ja(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===P.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,o)=>({...n,[o]:B(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",o]})??Ee(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:B(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===P.ZodString&&e.keyType._def.checks?.length){let{type:n,...o}=Wa(e.keyType._def,t);return{...r,propertyNames:o}}else{if(e.keyType?._def.typeName===P.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===P.ZodBranded&&e.keyType._def.type._def.typeName===P.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...o}=Ha(e.keyType._def,t);return{...r,propertyNames:o}}}return r}var Ya=_(()=>{mi();De();Ka();Ga();Mt()});function qv(e,t){if(t.mapStrategy==="record")return Ja(e,t);let r=B(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ee(t),n=B(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ee(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Wd=_(()=>{De();Ya();Mt()});function Fv(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}}var Kd=_(()=>{});function Uv(e){return e.target==="openAi"?void 0:{not:Ee({...e,currentPath:[...e.currentPath,"not"]})}}var Jd=_(()=>{Mt()});function Bv(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Yd=_(()=>{});function Hv(e,t){if(t.target==="openApi3")return Vv(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in qi&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=qi[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 Vv(e,t)}var qi,Vv,Qa=_(()=>{De();qi={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Vv=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,o)=>B(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 Gv(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:qi[e.innerType._def.typeName],nullable:!0}:{type:[qi[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let n=B(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=B(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var Qd=_(()=>{De();Qa()});function Wv(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",Od(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Xd=_(()=>{tn()});function Kv(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=vR(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let p=B(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=_R(e,t);return s!==void 0&&(n.additionalProperties=s),n}function _R(e,t){if(e.catchall._def.typeName!=="ZodNever")return B(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 vR(e){try{return e.isOptional()}catch{return!0}}var ef=_(()=>{De()});var Jv,tf=_(()=>{De();Mt();Jv=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return B(e.innerType._def,t);let r=B(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Ee(t)},r]}:Ee(t)}});var Yv,rf=_(()=>{De();Yv=(e,t)=>{if(t.pipeStrategy==="input")return B(e.in._def,t);if(t.pipeStrategy==="output")return B(e.out._def,t);let r=B(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=B(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}}});function Qv(e,t){return B(e.type._def,t)}var nf=_(()=>{De()});function Xv(e,t){let n={type:"array",uniqueItems:!0,items:B(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&se(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&se(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}var of=_(()=>{tn();De()});function e0(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>B(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:B(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>B(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var sf=_(()=>{De()});function t0(e){return{not:Ee(e)}}var af=_(()=>{Mt()});function r0(e){return Ee(e)}var cf=_(()=>{Mt()});var n0,uf=_(()=>{De();n0=(e,t)=>B(e.innerType._def,t)});var o0,lf=_(()=>{mi();Mt();Nd();Dd();jd();Ga();Md();Zd();qd();Fd();Ud();Bd();Vd();Wd();Kd();Jd();Yd();Qd();Xd();ef();tf();rf();nf();Ya();of();Ka();sf();af();Qa();cf();uf();o0=(e,t,r)=>{switch(t){case P.ZodString:return Wa(e,r);case P.ZodNumber:return Wv(e,r);case P.ZodObject:return Kv(e,r);case P.ZodBigInt:return Rv(e,r);case P.ZodBoolean:return Av();case P.ZodDate:return Ld(e,r);case P.ZodUndefined:return t0(r);case P.ZodNull:return Bv(r);case P.ZodArray:return zv(e,r);case P.ZodUnion:case P.ZodDiscriminatedUnion:return Hv(e,r);case P.ZodIntersection:return Mv(e,r);case P.ZodTuple:return e0(e,r);case P.ZodRecord:return Ja(e,r);case P.ZodLiteral:return Lv(e,r);case P.ZodEnum:return jv(e);case P.ZodNativeEnum:return Fv(e);case P.ZodNullable:return Gv(e,r);case P.ZodOptional:return Jv(e,r);case P.ZodMap:return qv(e,r);case P.ZodSet:return Xv(e,r);case P.ZodLazy:return()=>e.getter()._def;case P.ZodPromise:return Qv(e,r);case P.ZodNaN:case P.ZodNever:return Uv(r);case P.ZodEffects:return Dv(e,r);case P.ZodAny:return Ee(r);case P.ZodUnknown:return r0(r);case P.ZodDefault:return Nv(e,r);case P.ZodBranded:return Ha(e,r);case P.ZodReadonly:return n0(e,r);case P.ZodCatch:return Ov(e,r);case P.ZodPipeline:return Yv(e,r);case P.ZodFunction:case P.ZodVoid:case P.ZodSymbol:return;default:return(n=>{})(t)}}});function B(e,t,r=!1){let n=t.seen.get(e);if(t.override){let a=t.override?.(e,t,n,r);if(a!==Cv)return a}if(n&&!r){let a=bR(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=o0(e,e.typeName,t),s=typeof i=="function"?B(i(),t):i;if(s&&xR(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return o.jsonSchema=s,a}return o.jsonSchema=s,s}var bR,xR,De=_(()=>{Ua();lf();Va();Mt();bR=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ba(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`),Ee(t)):t.$refStrategy==="seen"?Ee(t):void 0}},xR=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r)});var i0=_(()=>{});var pf,df=_(()=>{De();Ad();Mt();pf=(e,t)=>{let r=Iv(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,p])=>({...c,[u]:B(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Ee(r)}),{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=B(e._def,o===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??Ee(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}});var s0=_(()=>{Ua();Ad();tn();Va();De();i0();Mt();Nd();Dd();jd();Ga();Md();Zd();qd();Fd();Ud();Bd();Vd();Wd();Kd();Jd();Yd();Qd();Xd();ef();tf();rf();nf();uf();Ya();of();Ka();sf();af();Qa();cf();lf();df();df()});function wR(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function ff(e,t){return Nt(e)?Yp(e,{target:wR(t?.target),io:t?.pipeStrategy??"input"}):pf(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function hf(e){let r=Qr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=_a(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function mf(e,t){let r=Yr(e,t);if(!r.success)throw r.error;return r.data}var gf=_(()=>{ed();Ci();s0()});function a0(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function c0(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];a0(s)&&a0(i)?r[o]={...s,...i}:r[o]=i}return r}var kR,Xa,u0=_(()=>{Ci();Zi();Tv();gf();kR=6e4,Xa=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($a,r=>{this._oncancel(r)}),this.setNotificationHandler(Pa,r=>{this._onprogress(r)}),this.setRequestHandler(Ta,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Ca,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(Ia,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 O(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 O(L.InvalidParams,`Task not found: ${i}`);if(!en(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(en(s.status)){let a=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[Xr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(za,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 O(L.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(Aa,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,`Task not found: ${r.params.taskId}`);if(en(o.status))throw new O(L.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 O(L.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof O?o:new O(L.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),O.fromError(L.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),Ri(i)||mv(i)?this._onresponse(i):_d(i)?this._onrequest(i,s):hv(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=O.fromError(L.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?.[Xr]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:t.id,error:{code:L.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=pv(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 O(L.ConnectionClosed,"Request was cancelled");let f={...d,relatedRequestId:t.id};i&&!f.relatedTask&&(f.relatedTask={taskId:i});let h=f.relatedTask?.taskId??i;return h&&c&&await c.updateTaskStatus(h,"input_required"),await this.request(p,l,f)},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:L.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),Ri(t))n(t);else{let s=new O(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(Ri(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),Ri(t))o(t);else{let s=O.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 O?s:new O(L.InternalError,String(s))}}return}let i;try{let s=await this.request(t,$o,n);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new O(L.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:a},en(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:a.status==="failed"?yield{type:"error",error:new O(L.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new O(L.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 O?s:new O(L.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=v=>{p(v)};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(v){l(v);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:d}}),a&&(f.params={...f.params,task:a}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Xr]:c}});let h=v=>{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(v)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(C=>this._onerror(new Error(`Failed to send cancellation: ${C}`)));let k=v instanceof O?v:new O(L.RequestTimeout,String(v));p(k)};this._responseHandlers.set(d,v=>{if(!n?.signal?.aborted){if(v instanceof Error)return p(v);try{let k=Yr(r,v.result);k.success?u(k.data):p(k.error)}catch(k){p(k)}}}),n?.signal?.addEventListener("abort",()=>{h(n?.signal?.reason)});let g=n?.timeout??kR,y=()=>h(O.fromError(L.RequestTimeout,"Request timed out",{timeout:g}));this._setupTimeout(d,g,n?.maxTotalTimeout,y,n?.resetTimeoutOnProgress??!1);let b=c?.taskId;if(b){let v=k=>{let C=this._responseHandlers.get(d);C?C(k):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,v),this._enqueueTaskMessage(b,{type:"request",message:f,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(d),p(k)})}else this._transport.send(f,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(v=>{this._cleanupTimeout(d),p(v)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Ea,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},Ra,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},_v,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||{},[Xr]: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||{},[Xr]: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||{},[Xr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let n=hf(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=mf(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=hf(t);this._notificationHandlers.set(n,o=>{let i=mf(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"&&_d(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new O(L.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 O(L.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(s),i(new O(L.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 O(L.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=ji.parse({method:"notifications/tasks/status",params:a});await this.notification(c),en(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 O(L.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(en(a.status))throw new O(L.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=ji.parse({method:"notifications/tasks/status",params:c});await this.notification(u),en(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}}});var Bi=S(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.regexpCode=ue.getEsmExportName=ue.getProperty=ue.safeStringify=ue.stringify=ue.strConcat=ue.addCodeArg=ue.str=ue._=ue.nil=ue._Code=ue.Name=ue.IDENTIFIER=ue._CodeOrName=void 0;var Fi=class{};ue._CodeOrName=Fi;ue.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Fn=class extends Fi{constructor(t){if(super(),!ue.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}}};ue.Name=Fn;var Lt=class extends Fi{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 Fn&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ue._Code=Lt;ue.nil=new Lt("");function l0(e,...t){let r=[e[0]],n=0;for(;n<t.length;)_f(r,t[n]),r.push(e[++n]);return new Lt(r)}ue._=l0;var yf=new Lt("+");function p0(e,...t){let r=[Ui(e[0])],n=0;for(;n<t.length;)r.push(yf),_f(r,t[n]),r.push(yf,Ui(e[++n]));return SR(r),new Lt(r)}ue.str=p0;function _f(e,t){t instanceof Lt?e.push(...t._items):t instanceof Fn?e.push(t):e.push(PR(t))}ue.addCodeArg=_f;function SR(e){let t=1;for(;t<e.length-1;){if(e[t]===yf){let r=$R(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function $R(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Fn||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 Fn))return`"${e}${t.slice(1)}`}function TR(e,t){return t.emptyStr()?e:e.emptyStr()?t:p0`${e}${t}`}ue.strConcat=TR;function PR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ui(Array.isArray(e)?e.join(","):e)}function CR(e){return new Lt(Ui(e))}ue.stringify=CR;function Ui(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ue.safeStringify=Ui;function ER(e){return typeof e=="string"&&ue.IDENTIFIER.test(e)?new Lt(`.${e}`):l0`[${e}]`}ue.getProperty=ER;function IR(e){if(typeof e=="string"&&ue.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ue.getEsmExportName=IR;function zR(e){return new Lt(e.toString())}ue.regexpCode=zR});var xf=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.ValueScope=bt.ValueScopeName=bt.Scope=bt.varKinds=bt.UsedValueState=void 0;var vt=Bi(),vf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ec;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ec||(bt.UsedValueState=ec={}));bt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var tc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof vt.Name?t:this.name(t)}name(t){return new vt.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}}};bt.Scope=tc;var rc=class extends vt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,vt._)`.${new vt.Name(r)}[${n}]`}};bt.ValueScopeName=rc;var RR=(0,vt._)`\n`,bf=class extends tc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?RR:vt.nil}}get(){return this._scope}name(t){return new rc(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,vt._)`${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=vt.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,ec.Started);let p=r(u);if(p){let l=this.opts.es5?bt.varKinds.var:bt.varKinds.const;i=(0,vt._)`${i}${l} ${u} = ${p};${this.opts._n}`}else if(p=o?.(u))i=(0,vt._)`${i}${p}${this.opts._n}`;else throw new vf(u);c.set(u,ec.Completed)})}return i}};bt.ValueScope=bf});var Y=S(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.or=X.and=X.not=X.CodeGen=X.operators=X.varKinds=X.ValueScopeName=X.ValueScope=X.Scope=X.Name=X.regexpCode=X.stringify=X.getProperty=X.nil=X.strConcat=X.str=X._=void 0;var ae=Bi(),Qt=xf(),rn=Bi();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return rn._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return rn.str}});Object.defineProperty(X,"strConcat",{enumerable:!0,get:function(){return rn.strConcat}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return rn.nil}});Object.defineProperty(X,"getProperty",{enumerable:!0,get:function(){return rn.getProperty}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return rn.stringify}});Object.defineProperty(X,"regexpCode",{enumerable:!0,get:function(){return rn.regexpCode}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return rn.Name}});var sc=xf();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return sc.Scope}});Object.defineProperty(X,"ValueScope",{enumerable:!0,get:function(){return sc.ValueScope}});Object.defineProperty(X,"ValueScopeName",{enumerable:!0,get:function(){return sc.ValueScopeName}});Object.defineProperty(X,"varKinds",{enumerable:!0,get:function(){return sc.varKinds}});X.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var Cr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},wf=class extends Cr{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Qt.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=Eo(this.rhs,t,r)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},nc=class extends Cr{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 ae.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Eo(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ae.Name?{}:{...this.lhs.names};return ic(t,this.rhs)}},kf=class extends nc{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Sf=class extends Cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},$f=class extends Cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Tf=class extends Cr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Pf=class extends Cr{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=Eo(this.code,t,r),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},Vi=class extends Cr{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)||(AR(t,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Vn(t,r.names),{})}},Er=class extends Vi{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Cf=class extends Vi{},Co=class extends Er{};Co.kind="else";var Un=class e extends Er{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 Co(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(d0(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=Eo(this.condition,t,r),this}get names(){let t=super.names;return ic(t,this.condition),this.else&&Vn(t,this.else.names),t}};Un.kind="if";var Bn=class extends Er{};Bn.kind="for";var Ef=class extends Bn{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=Eo(this.iteration,t,r),this}get names(){return Vn(super.names,this.iteration.names)}},If=class extends Bn{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?Qt.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=ic(super.names,this.from);return ic(t,this.to)}},oc=class extends Bn{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=Eo(this.iterable,t,r),this}get names(){return Vn(super.names,this.iterable.names)}},Hi=class extends Er{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)}};Hi.kind="func";var Gi=class extends Vi{render(t){return"return "+super.render(t)}};Gi.kind="return";var zf=class extends Er{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&&Vn(t,this.catch.names),this.finally&&Vn(t,this.finally.names),t}},Wi=class extends Er{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Wi.kind="catch";var Ki=class extends Er{render(t){return"finally"+super.render(t)}};Ki.kind="finally";var Rf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
33
- `:""},this._extScope=t,this._scope=new Qt.Scope({parent:t}),this._nodes=[new Cf]}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 wf(t,i,n)),i}const(t,r,n){return this._def(Qt.varKinds.const,t,r,n)}let(t,r,n){return this._def(Qt.varKinds.let,t,r,n)}var(t,r,n){return this._def(Qt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new nc(t,r,n))}add(t,r){return this._leafNode(new kf(t,X.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ae.nil&&this._leafNode(new Pf(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,ae.addCodeArg)(r,o));return r.push("}"),new ae._Code(r)}if(t,r,n){if(this._blockNode(new Un(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 Un(t))}else(){return this._elseNode(new Co)}endIf(){return this._endBlockNode(Un,Co)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Ef(t),r)}forRange(t,r,n,o,i=this.opts.es5?Qt.varKinds.var:Qt.varKinds.let){let s=this._scope.toName(t);return this._for(new If(i,s,r,n),()=>o(s))}forOf(t,r,n,o=Qt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof ae.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ae._)`${s}.length`,a=>{this.var(i,(0,ae._)`${s}[${a}]`),n(i)})}return this._for(new oc("of",o,i,r),()=>n(i))}forIn(t,r,n,o=this.opts.es5?Qt.varKinds.var:Qt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ae._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new oc("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(Bn)}label(t){return this._leafNode(new Sf(t))}break(t){return this._leafNode(new $f(t))}return(t){let r=new Gi;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Gi)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new zf;if(this._blockNode(o),this.code(t),r){let i=this.name("e");this._currNode=o.catch=new Wi(i),r(i)}return n&&(this._currNode=o.finally=new Ki,this.code(n)),this._endBlockNode(Wi,Ki)}throw(t){return this._leafNode(new Tf(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=ae.nil,n,o){return this._blockNode(new Hi(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Hi)}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 Un))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}};X.CodeGen=Rf;function Vn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function ic(e,t){return t instanceof ae._CodeOrName?Vn(e,t.names):e}function Eo(e,t,r){if(e instanceof ae.Name)return n(e);if(!o(e))return e;return new ae._Code(e._items.reduce((i,s)=>(s instanceof ae.Name&&(s=n(s)),s instanceof ae._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 ae._Code&&i._items.some(s=>s instanceof ae.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function AR(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function d0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ae._)`!${Af(e)}`}X.not=d0;var OR=f0(X.operators.AND);function NR(...e){return e.reduce(OR)}X.and=NR;var DR=f0(X.operators.OR);function jR(...e){return e.reduce(DR)}X.or=jR;function f0(e){return(t,r)=>t===ae.nil?r:r===ae.nil?t:(0,ae._)`${Af(t)} ${e} ${Af(r)}`}function Af(e){return e instanceof ae.Name?e:(0,ae._)`(${e})`}});var le=S(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;var _e=Y(),MR=Bi();function LR(e){let t={};for(let r of e)t[r]=!0;return t}ee.toHash=LR;function ZR(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(g0(e,t),!y0(t,e.self.RULES.all))}ee.alwaysValidSchema=ZR;function g0(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]||b0(e,`unknown keyword: "${i}"`)}ee.checkUnknownRules=g0;function y0(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ee.schemaHasRules=y0;function qR(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ee.schemaHasRulesButRef=qR;function FR({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,_e._)`${r}`}return(0,_e._)`${e}${t}${(0,_e.getProperty)(n)}`}ee.schemaRefOrVal=FR;function UR(e){return _0(decodeURIComponent(e))}ee.unescapeFragment=UR;function BR(e){return encodeURIComponent(Nf(e))}ee.escapeFragment=BR;function Nf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=Nf;function _0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=_0;function VR(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ee.eachItem=VR;function h0({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof _e.Name?(i instanceof _e.Name?e(o,i,s):t(o,i,s),s):i instanceof _e.Name?(t(o,s,i),i):r(i,s);return a===_e.Name&&!(c instanceof _e.Name)?n(o,c):c}}ee.mergeEvaluated={props:h0({mergeNames:(e,t,r)=>e.if((0,_e._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,_e._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,_e._)`${r} || {}`).code((0,_e._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,_e._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,_e._)`${r} || {}`),Df(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:v0}),items:h0({mergeNames:(e,t,r)=>e.if((0,_e._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,_e._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,_e._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,_e._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function v0(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,_e._)`{}`);return t!==void 0&&Df(e,r,t),r}ee.evaluatedPropsToName=v0;function Df(e,t,r){Object.keys(r).forEach(n=>e.assign((0,_e._)`${t}${(0,_e.getProperty)(n)}`,!0))}ee.setEvaluated=Df;var m0={};function HR(e,t){return e.scopeValue("func",{ref:t,code:m0[t.code]||(m0[t.code]=new MR._Code(t.code))})}ee.useFunc=HR;var Of;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Of||(ee.Type=Of={}));function GR(e,t,r){if(e instanceof _e.Name){let n=t===Of.Num;return r?n?(0,_e._)`"[" + ${e} + "]"`:(0,_e._)`"['" + ${e} + "']"`:n?(0,_e._)`"/" + ${e}`:(0,_e._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,_e.getProperty)(e).toString():"/"+Nf(e)}ee.getErrorPath=GR;function b0(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ee.checkStrictMode=b0});var Ir=S(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var et=Y(),WR={data:new et.Name("data"),valCxt:new et.Name("valCxt"),instancePath:new et.Name("instancePath"),parentData:new et.Name("parentData"),parentDataProperty:new et.Name("parentDataProperty"),rootData:new et.Name("rootData"),dynamicAnchors:new et.Name("dynamicAnchors"),vErrors:new et.Name("vErrors"),errors:new et.Name("errors"),this:new et.Name("this"),self:new et.Name("self"),scope:new et.Name("scope"),json:new et.Name("json"),jsonPos:new et.Name("jsonPos"),jsonLen:new et.Name("jsonLen"),jsonPart:new et.Name("jsonPart")};jf.default=WR});var Ji=S(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.extendErrors=tt.resetErrorsCount=tt.reportExtraError=tt.reportError=tt.keyword$DataError=tt.keywordError=void 0;var ce=Y(),ac=le(),lt=Ir();tt.keywordError={message:({keyword:e})=>(0,ce.str)`must pass "${e}" keyword validation`};tt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ce.str)`"${e}" keyword must be ${t} ($data)`:(0,ce.str)`"${e}" keyword is invalid ($data)`};function KR(e,t=tt.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:s,allErrors:a}=o,c=k0(e,t,r);n??(s||a)?x0(i,c):w0(o,(0,ce._)`[${c}]`)}tt.reportError=KR;function JR(e,t=tt.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:s}=n,a=k0(e,t,r);x0(o,a),i||s||w0(n,lt.default.vErrors)}tt.reportExtraError=JR;function YR(e,t){e.assign(lt.default.errors,t),e.if((0,ce._)`${lt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ce._)`${lt.default.vErrors}.length`,t),()=>e.assign(lt.default.vErrors,null)))}tt.resetErrorsCount=YR;function QR({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,lt.default.errors,a=>{e.const(s,(0,ce._)`${lt.default.vErrors}[${a}]`),e.if((0,ce._)`${s}.instancePath === undefined`,()=>e.assign((0,ce._)`${s}.instancePath`,(0,ce.strConcat)(lt.default.instancePath,i.errorPath))),e.assign((0,ce._)`${s}.schemaPath`,(0,ce.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,ce._)`${s}.schema`,r),e.assign((0,ce._)`${s}.data`,n))})}tt.extendErrors=QR;function x0(e,t){let r=e.const("err",t);e.if((0,ce._)`${lt.default.vErrors} === null`,()=>e.assign(lt.default.vErrors,(0,ce._)`[${r}]`),(0,ce._)`${lt.default.vErrors}.push(${r})`),e.code((0,ce._)`${lt.default.errors}++`)}function w0(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,ce._)`new ${e.ValidationError}(${t})`):(r.assign((0,ce._)`${n}.errors`,t),r.return(!1))}var Hn={keyword:new ce.Name("keyword"),schemaPath:new ce.Name("schemaPath"),params:new ce.Name("params"),propertyName:new ce.Name("propertyName"),message:new ce.Name("message"),schema:new ce.Name("schema"),parentSchema:new ce.Name("parentSchema")};function k0(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ce._)`{}`:XR(e,t,r)}function XR(e,t,r={}){let{gen:n,it:o}=e,i=[eA(o,r),tA(e,r)];return rA(e,t,i),n.object(...i)}function eA({errorPath:e},{instancePath:t}){let r=t?(0,ce.str)`${e}${(0,ac.getErrorPath)(t,ac.Type.Str)}`:e;return[lt.default.instancePath,(0,ce.strConcat)(lt.default.instancePath,r)]}function tA({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,ce.str)`${t}/${e}`;return r&&(o=(0,ce.str)`${o}${(0,ac.getErrorPath)(r,ac.Type.Str)}`),[Hn.schemaPath,o]}function rA(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,ce._)`{}`]),c.messages&&n.push([Hn.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Hn.schema,s],[Hn.parentSchema,(0,ce._)`${p}${l}`],[lt.default.data,i]),u&&n.push([Hn.propertyName,u])}});var $0=S(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.boolOrEmptySchema=Io.topBoolOrEmptySchema=void 0;var nA=Ji(),oA=Y(),iA=Ir(),sA={message:"boolean schema is false"};function aA(e){let{gen:t,schema:r,validateName:n}=e;r===!1?S0(e,!1):typeof r=="object"&&r.$async===!0?t.return(iA.default.data):(t.assign((0,oA._)`${n}.errors`,null),t.return(!0))}Io.topBoolOrEmptySchema=aA;function cA(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),S0(e)):r.var(t,!0)}Io.boolOrEmptySchema=cA;function S0(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,nA.reportError)(o,sA,void 0,t)}});var Mf=S(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.getRules=zo.isJSONType=void 0;var uA=["string","number","integer","boolean","null","object","array"],lA=new Set(uA);function pA(e){return typeof e=="string"&&lA.has(e)}zo.isJSONType=pA;function dA(){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:{}}}zo.getRules=dA});var Lf=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.shouldUseRule=nn.shouldUseGroup=nn.schemaHasRulesForType=void 0;function fA({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&T0(e,n)}nn.schemaHasRulesForType=fA;function T0(e,t){return t.rules.some(r=>P0(e,r))}nn.shouldUseGroup=T0;function P0(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))}nn.shouldUseRule=P0});var Yi=S(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.reportTypeError=rt.checkDataTypes=rt.checkDataType=rt.coerceAndCheckDataType=rt.getJSONTypes=rt.getSchemaTypes=rt.DataType=void 0;var hA=Mf(),mA=Lf(),gA=Ji(),K=Y(),C0=le(),Ro;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ro||(rt.DataType=Ro={}));function yA(e){let t=E0(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}rt.getSchemaTypes=yA;function E0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(hA.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}rt.getJSONTypes=E0;function _A(e,t){let{gen:r,data:n,opts:o}=e,i=vA(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,mA.schemaHasRulesForType)(e,t[0]));if(s){let a=qf(t,n,o.strictNumbers,Ro.Wrong);r.if(a,()=>{i.length?bA(e,t,i):Ff(e)})}return s}rt.coerceAndCheckDataType=_A;var I0=new Set(["string","number","integer","boolean","null"]);function vA(e,t){return t?e.filter(r=>I0.has(r)||t==="array"&&r==="array"):[]}function bA(e,t,r){let{gen:n,data:o,opts:i}=e,s=n.let("dataType",(0,K._)`typeof ${o}`),a=n.let("coerced",(0,K._)`undefined`);i.coerceTypes==="array"&&n.if((0,K._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,K._)`${o}[0]`).assign(s,(0,K._)`typeof ${o}`).if(qf(t,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,K._)`${a} !== undefined`);for(let u of r)(I0.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);n.else(),Ff(e),n.endIf(),n.if((0,K._)`${a} !== undefined`,()=>{n.assign(o,a),xA(e,a)});function c(u){switch(u){case"string":n.elseIf((0,K._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,K._)`"" + ${o}`).elseIf((0,K._)`${o} === null`).assign(a,(0,K._)`""`);return;case"number":n.elseIf((0,K._)`${s} == "boolean" || ${o} === null
32
+ ]`;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}var Vd,Jt,gA,Ka=_(()=>{tn();Jt={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:()=>(Vd===void 0&&(Vd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Vd),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-_]*$/};gA=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function Ja(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===P.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,o)=>({...n,[o]:B(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",o]})??Ee(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:B(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===P.ZodString&&e.keyType._def.checks?.length){let{type:n,...o}=Wa(e.keyType._def,t);return{...r,propertyNames:o}}else{if(e.keyType?._def.typeName===P.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===P.ZodBranded&&e.keyType._def.type._def.typeName===P.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...o}=Va(e.keyType._def,t);return{...r,propertyNames:o}}}return r}var Ya=_(()=>{mi();De();Ka();Ga();Mt()});function qv(e,t){if(t.mapStrategy==="record")return Ja(e,t);let r=B(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ee(t),n=B(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ee(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Wd=_(()=>{De();Ya();Mt()});function Fv(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}}var Kd=_(()=>{});function Uv(e){return e.target==="openAi"?void 0:{not:Ee({...e,currentPath:[...e.currentPath,"not"]})}}var Jd=_(()=>{Mt()});function Bv(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Yd=_(()=>{});function Vv(e,t){if(t.target==="openApi3")return Hv(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in qi&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=qi[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 Hv(e,t)}var qi,Hv,Qa=_(()=>{De();qi={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Hv=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,o)=>B(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 Gv(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:qi[e.innerType._def.typeName],nullable:!0}:{type:[qi[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let n=B(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=B(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var Qd=_(()=>{De();Qa()});function Wv(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",Od(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?se(r,"minimum",n.value,n.message,t):se(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),se(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?se(r,"maximum",n.value,n.message,t):se(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),se(r,"maximum",n.value,n.message,t));break;case"multipleOf":se(r,"multipleOf",n.value,n.message,t);break}return r}var Xd=_(()=>{tn()});function Kv(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=vA(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let p=B(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=_A(e,t);return s!==void 0&&(n.additionalProperties=s),n}function _A(e,t){if(e.catchall._def.typeName!=="ZodNever")return B(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 vA(e){try{return e.isOptional()}catch{return!0}}var ef=_(()=>{De()});var Jv,tf=_(()=>{De();Mt();Jv=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return B(e.innerType._def,t);let r=B(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Ee(t)},r]}:Ee(t)}});var Yv,rf=_(()=>{De();Yv=(e,t)=>{if(t.pipeStrategy==="input")return B(e.in._def,t);if(t.pipeStrategy==="output")return B(e.out._def,t);let r=B(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=B(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}}});function Qv(e,t){return B(e.type._def,t)}var nf=_(()=>{De()});function Xv(e,t){let n={type:"array",uniqueItems:!0,items:B(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&se(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&se(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}var of=_(()=>{tn();De()});function e0(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>B(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:B(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>B(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var sf=_(()=>{De()});function t0(e){return{not:Ee(e)}}var af=_(()=>{Mt()});function r0(e){return Ee(e)}var cf=_(()=>{Mt()});var n0,uf=_(()=>{De();n0=(e,t)=>B(e.innerType._def,t)});var o0,lf=_(()=>{mi();Mt();Nd();Dd();jd();Ga();Md();Zd();qd();Fd();Ud();Bd();Hd();Wd();Kd();Jd();Yd();Qd();Xd();ef();tf();rf();nf();Ya();of();Ka();sf();af();Qa();cf();uf();o0=(e,t,r)=>{switch(t){case P.ZodString:return Wa(e,r);case P.ZodNumber:return Wv(e,r);case P.ZodObject:return Kv(e,r);case P.ZodBigInt:return Av(e,r);case P.ZodBoolean:return Rv();case P.ZodDate:return Ld(e,r);case P.ZodUndefined:return t0(r);case P.ZodNull:return Bv(r);case P.ZodArray:return zv(e,r);case P.ZodUnion:case P.ZodDiscriminatedUnion:return Vv(e,r);case P.ZodIntersection:return Mv(e,r);case P.ZodTuple:return e0(e,r);case P.ZodRecord:return Ja(e,r);case P.ZodLiteral:return Lv(e,r);case P.ZodEnum:return jv(e);case P.ZodNativeEnum:return Fv(e);case P.ZodNullable:return Gv(e,r);case P.ZodOptional:return Jv(e,r);case P.ZodMap:return qv(e,r);case P.ZodSet:return Xv(e,r);case P.ZodLazy:return()=>e.getter()._def;case P.ZodPromise:return Qv(e,r);case P.ZodNaN:case P.ZodNever:return Uv(r);case P.ZodEffects:return Dv(e,r);case P.ZodAny:return Ee(r);case P.ZodUnknown:return r0(r);case P.ZodDefault:return Nv(e,r);case P.ZodBranded:return Va(e,r);case P.ZodReadonly:return n0(e,r);case P.ZodCatch:return Ov(e,r);case P.ZodPipeline:return Yv(e,r);case P.ZodFunction:case P.ZodVoid:case P.ZodSymbol:return;default:return(n=>{})(t)}}});function B(e,t,r=!1){let n=t.seen.get(e);if(t.override){let a=t.override?.(e,t,n,r);if(a!==Cv)return a}if(n&&!r){let a=bA(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=o0(e,e.typeName,t),s=typeof i=="function"?B(i(),t):i;if(s&&xA(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return o.jsonSchema=s,a}return o.jsonSchema=s,s}var bA,xA,De=_(()=>{Ua();lf();Ha();Mt();bA=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ba(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`),Ee(t)):t.$refStrategy==="seen"?Ee(t):void 0}},xA=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r)});var i0=_(()=>{});var pf,df=_(()=>{De();Rd();Mt();pf=(e,t)=>{let r=Iv(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,p])=>({...c,[u]:B(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Ee(r)}),{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=B(e._def,o===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??Ee(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}});var s0=_(()=>{Ua();Rd();tn();Ha();De();i0();Mt();Nd();Dd();jd();Ga();Md();Zd();qd();Fd();Ud();Bd();Hd();Wd();Kd();Jd();Yd();Qd();Xd();ef();tf();rf();nf();uf();Ya();of();Ka();sf();af();Qa();cf();lf();df();df()});function wA(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function ff(e,t){return Nt(e)?Yp(e,{target:wA(t?.target),io:t?.pipeStrategy??"input"}):pf(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function hf(e){let r=Qr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=_a(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function mf(e,t){let r=Yr(e,t);if(!r.success)throw r.error;return r.data}var gf=_(()=>{ed();Ci();s0()});function a0(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function c0(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];a0(s)&&a0(i)?r[o]={...s,...i}:r[o]=i}return r}var kA,Xa,u0=_(()=>{Ci();Zi();Tv();gf();kA=6e4,Xa=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($a,r=>{this._oncancel(r)}),this.setNotificationHandler(Pa,r=>{this._onprogress(r)}),this.setRequestHandler(Ta,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Ca,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(Ia,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 O(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 O(L.InvalidParams,`Task not found: ${i}`);if(!en(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(en(s.status)){let a=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[Xr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(za,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 O(L.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(Ra,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,`Task not found: ${r.params.taskId}`);if(en(o.status))throw new O(L.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 O(L.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof O?o:new O(L.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),O.fromError(L.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),Ai(i)||mv(i)?this._onresponse(i):_d(i)?this._onrequest(i,s):hv(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=O.fromError(L.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?.[Xr]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:t.id,error:{code:L.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=pv(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 O(L.ConnectionClosed,"Request was cancelled");let f={...d,relatedRequestId:t.id};i&&!f.relatedTask&&(f.relatedTask={taskId:i});let h=f.relatedTask?.taskId??i;return h&&c&&await c.updateTaskStatus(h,"input_required"),await this.request(p,l,f)},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:L.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),Ai(t))n(t);else{let s=new O(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(Ai(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),Ai(t))o(t);else{let s=O.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 O?s:new O(L.InternalError,String(s))}}return}let i;try{let s=await this.request(t,$o,n);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new O(L.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:a},en(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:a.status==="failed"?yield{type:"error",error:new O(L.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new O(L.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 O?s:new O(L.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=v=>{p(v)};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(v){l(v);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:d}}),a&&(f.params={...f.params,task:a}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Xr]:c}});let h=v=>{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(v)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(C=>this._onerror(new Error(`Failed to send cancellation: ${C}`)));let k=v instanceof O?v:new O(L.RequestTimeout,String(v));p(k)};this._responseHandlers.set(d,v=>{if(!n?.signal?.aborted){if(v instanceof Error)return p(v);try{let k=Yr(r,v.result);k.success?u(k.data):p(k.error)}catch(k){p(k)}}}),n?.signal?.addEventListener("abort",()=>{h(n?.signal?.reason)});let m=n?.timeout??kA,y=()=>h(O.fromError(L.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(d,m,n?.maxTotalTimeout,y,n?.resetTimeoutOnProgress??!1);let b=c?.taskId;if(b){let v=k=>{let C=this._responseHandlers.get(d);C?C(k):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,v),this._enqueueTaskMessage(b,{type:"request",message:f,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(d),p(k)})}else this._transport.send(f,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(v=>{this._cleanupTimeout(d),p(v)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Ea,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},Aa,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},_v,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||{},[Xr]: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||{},[Xr]: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||{},[Xr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let n=hf(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=mf(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=hf(t);this._notificationHandlers.set(n,o=>{let i=mf(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"&&_d(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new O(L.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 O(L.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(s),i(new O(L.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 O(L.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=ji.parse({method:"notifications/tasks/status",params:a});await this.notification(c),en(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 O(L.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(en(a.status))throw new O(L.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=ji.parse({method:"notifications/tasks/status",params:c});await this.notification(u),en(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}}});var Bi=S(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.regexpCode=ue.getEsmExportName=ue.getProperty=ue.safeStringify=ue.stringify=ue.strConcat=ue.addCodeArg=ue.str=ue._=ue.nil=ue._Code=ue.Name=ue.IDENTIFIER=ue._CodeOrName=void 0;var Fi=class{};ue._CodeOrName=Fi;ue.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Fn=class extends Fi{constructor(t){if(super(),!ue.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}}};ue.Name=Fn;var Lt=class extends Fi{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 Fn&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ue._Code=Lt;ue.nil=new Lt("");function l0(e,...t){let r=[e[0]],n=0;for(;n<t.length;)_f(r,t[n]),r.push(e[++n]);return new Lt(r)}ue._=l0;var yf=new Lt("+");function p0(e,...t){let r=[Ui(e[0])],n=0;for(;n<t.length;)r.push(yf),_f(r,t[n]),r.push(yf,Ui(e[++n]));return SA(r),new Lt(r)}ue.str=p0;function _f(e,t){t instanceof Lt?e.push(...t._items):t instanceof Fn?e.push(t):e.push(PA(t))}ue.addCodeArg=_f;function SA(e){let t=1;for(;t<e.length-1;){if(e[t]===yf){let r=$A(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function $A(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Fn||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 Fn))return`"${e}${t.slice(1)}`}function TA(e,t){return t.emptyStr()?e:e.emptyStr()?t:p0`${e}${t}`}ue.strConcat=TA;function PA(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ui(Array.isArray(e)?e.join(","):e)}function CA(e){return new Lt(Ui(e))}ue.stringify=CA;function Ui(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ue.safeStringify=Ui;function EA(e){return typeof e=="string"&&ue.IDENTIFIER.test(e)?new Lt(`.${e}`):l0`[${e}]`}ue.getProperty=EA;function IA(e){if(typeof e=="string"&&ue.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ue.getEsmExportName=IA;function zA(e){return new Lt(e.toString())}ue.regexpCode=zA});var xf=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.ValueScope=bt.ValueScopeName=bt.Scope=bt.varKinds=bt.UsedValueState=void 0;var vt=Bi(),vf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ec;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ec||(bt.UsedValueState=ec={}));bt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var tc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof vt.Name?t:this.name(t)}name(t){return new vt.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}}};bt.Scope=tc;var rc=class extends vt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,vt._)`.${new vt.Name(r)}[${n}]`}};bt.ValueScopeName=rc;var AA=(0,vt._)`\n`,bf=class extends tc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?AA:vt.nil}}get(){return this._scope}name(t){return new rc(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,vt._)`${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=vt.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,ec.Started);let p=r(u);if(p){let l=this.opts.es5?bt.varKinds.var:bt.varKinds.const;i=(0,vt._)`${i}${l} ${u} = ${p};${this.opts._n}`}else if(p=o?.(u))i=(0,vt._)`${i}${p}${this.opts._n}`;else throw new vf(u);c.set(u,ec.Completed)})}return i}};bt.ValueScope=bf});var Y=S(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.or=X.and=X.not=X.CodeGen=X.operators=X.varKinds=X.ValueScopeName=X.ValueScope=X.Scope=X.Name=X.regexpCode=X.stringify=X.getProperty=X.nil=X.strConcat=X.str=X._=void 0;var ae=Bi(),Qt=xf(),rn=Bi();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return rn._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return rn.str}});Object.defineProperty(X,"strConcat",{enumerable:!0,get:function(){return rn.strConcat}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return rn.nil}});Object.defineProperty(X,"getProperty",{enumerable:!0,get:function(){return rn.getProperty}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return rn.stringify}});Object.defineProperty(X,"regexpCode",{enumerable:!0,get:function(){return rn.regexpCode}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return rn.Name}});var sc=xf();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return sc.Scope}});Object.defineProperty(X,"ValueScope",{enumerable:!0,get:function(){return sc.ValueScope}});Object.defineProperty(X,"ValueScopeName",{enumerable:!0,get:function(){return sc.ValueScopeName}});Object.defineProperty(X,"varKinds",{enumerable:!0,get:function(){return sc.varKinds}});X.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var Cr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},wf=class extends Cr{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Qt.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=Eo(this.rhs,t,r)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},nc=class extends Cr{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 ae.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Eo(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ae.Name?{}:{...this.lhs.names};return ic(t,this.rhs)}},kf=class extends nc{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Sf=class extends Cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},$f=class extends Cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Tf=class extends Cr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Pf=class extends Cr{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=Eo(this.code,t,r),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},Hi=class extends Cr{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)||(RA(t,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Hn(t,r.names),{})}},Er=class extends Hi{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Cf=class extends Hi{},Co=class extends Er{};Co.kind="else";var Un=class e extends Er{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 Co(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(d0(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=Eo(this.condition,t,r),this}get names(){let t=super.names;return ic(t,this.condition),this.else&&Hn(t,this.else.names),t}};Un.kind="if";var Bn=class extends Er{};Bn.kind="for";var Ef=class extends Bn{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=Eo(this.iteration,t,r),this}get names(){return Hn(super.names,this.iteration.names)}},If=class extends Bn{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?Qt.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=ic(super.names,this.from);return ic(t,this.to)}},oc=class extends Bn{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=Eo(this.iterable,t,r),this}get names(){return Hn(super.names,this.iterable.names)}},Vi=class extends Er{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)}};Vi.kind="func";var Gi=class extends Hi{render(t){return"return "+super.render(t)}};Gi.kind="return";var zf=class extends Er{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&&Hn(t,this.catch.names),this.finally&&Hn(t,this.finally.names),t}},Wi=class extends Er{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Wi.kind="catch";var Ki=class extends Er{render(t){return"finally"+super.render(t)}};Ki.kind="finally";var Af=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
33
+ `:""},this._extScope=t,this._scope=new Qt.Scope({parent:t}),this._nodes=[new Cf]}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 wf(t,i,n)),i}const(t,r,n){return this._def(Qt.varKinds.const,t,r,n)}let(t,r,n){return this._def(Qt.varKinds.let,t,r,n)}var(t,r,n){return this._def(Qt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new nc(t,r,n))}add(t,r){return this._leafNode(new kf(t,X.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ae.nil&&this._leafNode(new Pf(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,ae.addCodeArg)(r,o));return r.push("}"),new ae._Code(r)}if(t,r,n){if(this._blockNode(new Un(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 Un(t))}else(){return this._elseNode(new Co)}endIf(){return this._endBlockNode(Un,Co)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Ef(t),r)}forRange(t,r,n,o,i=this.opts.es5?Qt.varKinds.var:Qt.varKinds.let){let s=this._scope.toName(t);return this._for(new If(i,s,r,n),()=>o(s))}forOf(t,r,n,o=Qt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof ae.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ae._)`${s}.length`,a=>{this.var(i,(0,ae._)`${s}[${a}]`),n(i)})}return this._for(new oc("of",o,i,r),()=>n(i))}forIn(t,r,n,o=this.opts.es5?Qt.varKinds.var:Qt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ae._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new oc("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(Bn)}label(t){return this._leafNode(new Sf(t))}break(t){return this._leafNode(new $f(t))}return(t){let r=new Gi;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Gi)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new zf;if(this._blockNode(o),this.code(t),r){let i=this.name("e");this._currNode=o.catch=new Wi(i),r(i)}return n&&(this._currNode=o.finally=new Ki,this.code(n)),this._endBlockNode(Wi,Ki)}throw(t){return this._leafNode(new Tf(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=ae.nil,n,o){return this._blockNode(new Vi(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Vi)}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 Un))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}};X.CodeGen=Af;function Hn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function ic(e,t){return t instanceof ae._CodeOrName?Hn(e,t.names):e}function Eo(e,t,r){if(e instanceof ae.Name)return n(e);if(!o(e))return e;return new ae._Code(e._items.reduce((i,s)=>(s instanceof ae.Name&&(s=n(s)),s instanceof ae._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 ae._Code&&i._items.some(s=>s instanceof ae.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function RA(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function d0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ae._)`!${Rf(e)}`}X.not=d0;var OA=f0(X.operators.AND);function NA(...e){return e.reduce(OA)}X.and=NA;var DA=f0(X.operators.OR);function jA(...e){return e.reduce(DA)}X.or=jA;function f0(e){return(t,r)=>t===ae.nil?r:r===ae.nil?t:(0,ae._)`${Rf(t)} ${e} ${Rf(r)}`}function Rf(e){return e instanceof ae.Name?e:(0,ae._)`(${e})`}});var le=S(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;var _e=Y(),MA=Bi();function LA(e){let t={};for(let r of e)t[r]=!0;return t}ee.toHash=LA;function ZA(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(g0(e,t),!y0(t,e.self.RULES.all))}ee.alwaysValidSchema=ZA;function g0(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]||b0(e,`unknown keyword: "${i}"`)}ee.checkUnknownRules=g0;function y0(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ee.schemaHasRules=y0;function qA(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ee.schemaHasRulesButRef=qA;function FA({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,_e._)`${r}`}return(0,_e._)`${e}${t}${(0,_e.getProperty)(n)}`}ee.schemaRefOrVal=FA;function UA(e){return _0(decodeURIComponent(e))}ee.unescapeFragment=UA;function BA(e){return encodeURIComponent(Nf(e))}ee.escapeFragment=BA;function Nf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=Nf;function _0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=_0;function HA(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ee.eachItem=HA;function h0({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof _e.Name?(i instanceof _e.Name?e(o,i,s):t(o,i,s),s):i instanceof _e.Name?(t(o,s,i),i):r(i,s);return a===_e.Name&&!(c instanceof _e.Name)?n(o,c):c}}ee.mergeEvaluated={props:h0({mergeNames:(e,t,r)=>e.if((0,_e._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,_e._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,_e._)`${r} || {}`).code((0,_e._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,_e._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,_e._)`${r} || {}`),Df(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:v0}),items:h0({mergeNames:(e,t,r)=>e.if((0,_e._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,_e._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,_e._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,_e._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function v0(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,_e._)`{}`);return t!==void 0&&Df(e,r,t),r}ee.evaluatedPropsToName=v0;function Df(e,t,r){Object.keys(r).forEach(n=>e.assign((0,_e._)`${t}${(0,_e.getProperty)(n)}`,!0))}ee.setEvaluated=Df;var m0={};function VA(e,t){return e.scopeValue("func",{ref:t,code:m0[t.code]||(m0[t.code]=new MA._Code(t.code))})}ee.useFunc=VA;var Of;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Of||(ee.Type=Of={}));function GA(e,t,r){if(e instanceof _e.Name){let n=t===Of.Num;return r?n?(0,_e._)`"[" + ${e} + "]"`:(0,_e._)`"['" + ${e} + "']"`:n?(0,_e._)`"/" + ${e}`:(0,_e._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,_e.getProperty)(e).toString():"/"+Nf(e)}ee.getErrorPath=GA;function b0(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ee.checkStrictMode=b0});var Ir=S(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var tt=Y(),WA={data:new tt.Name("data"),valCxt:new tt.Name("valCxt"),instancePath:new tt.Name("instancePath"),parentData:new tt.Name("parentData"),parentDataProperty:new tt.Name("parentDataProperty"),rootData:new tt.Name("rootData"),dynamicAnchors:new tt.Name("dynamicAnchors"),vErrors:new tt.Name("vErrors"),errors:new tt.Name("errors"),this:new tt.Name("this"),self:new tt.Name("self"),scope:new tt.Name("scope"),json:new tt.Name("json"),jsonPos:new tt.Name("jsonPos"),jsonLen:new tt.Name("jsonLen"),jsonPart:new tt.Name("jsonPart")};jf.default=WA});var Ji=S(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.extendErrors=rt.resetErrorsCount=rt.reportExtraError=rt.reportError=rt.keyword$DataError=rt.keywordError=void 0;var ce=Y(),ac=le(),lt=Ir();rt.keywordError={message:({keyword:e})=>(0,ce.str)`must pass "${e}" keyword validation`};rt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ce.str)`"${e}" keyword must be ${t} ($data)`:(0,ce.str)`"${e}" keyword is invalid ($data)`};function KA(e,t=rt.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:s,allErrors:a}=o,c=k0(e,t,r);n??(s||a)?x0(i,c):w0(o,(0,ce._)`[${c}]`)}rt.reportError=KA;function JA(e,t=rt.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:s}=n,a=k0(e,t,r);x0(o,a),i||s||w0(n,lt.default.vErrors)}rt.reportExtraError=JA;function YA(e,t){e.assign(lt.default.errors,t),e.if((0,ce._)`${lt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ce._)`${lt.default.vErrors}.length`,t),()=>e.assign(lt.default.vErrors,null)))}rt.resetErrorsCount=YA;function QA({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,lt.default.errors,a=>{e.const(s,(0,ce._)`${lt.default.vErrors}[${a}]`),e.if((0,ce._)`${s}.instancePath === undefined`,()=>e.assign((0,ce._)`${s}.instancePath`,(0,ce.strConcat)(lt.default.instancePath,i.errorPath))),e.assign((0,ce._)`${s}.schemaPath`,(0,ce.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,ce._)`${s}.schema`,r),e.assign((0,ce._)`${s}.data`,n))})}rt.extendErrors=QA;function x0(e,t){let r=e.const("err",t);e.if((0,ce._)`${lt.default.vErrors} === null`,()=>e.assign(lt.default.vErrors,(0,ce._)`[${r}]`),(0,ce._)`${lt.default.vErrors}.push(${r})`),e.code((0,ce._)`${lt.default.errors}++`)}function w0(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,ce._)`new ${e.ValidationError}(${t})`):(r.assign((0,ce._)`${n}.errors`,t),r.return(!1))}var Vn={keyword:new ce.Name("keyword"),schemaPath:new ce.Name("schemaPath"),params:new ce.Name("params"),propertyName:new ce.Name("propertyName"),message:new ce.Name("message"),schema:new ce.Name("schema"),parentSchema:new ce.Name("parentSchema")};function k0(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ce._)`{}`:XA(e,t,r)}function XA(e,t,r={}){let{gen:n,it:o}=e,i=[eR(o,r),tR(e,r)];return rR(e,t,i),n.object(...i)}function eR({errorPath:e},{instancePath:t}){let r=t?(0,ce.str)`${e}${(0,ac.getErrorPath)(t,ac.Type.Str)}`:e;return[lt.default.instancePath,(0,ce.strConcat)(lt.default.instancePath,r)]}function tR({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,ce.str)`${t}/${e}`;return r&&(o=(0,ce.str)`${o}${(0,ac.getErrorPath)(r,ac.Type.Str)}`),[Vn.schemaPath,o]}function rR(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([Vn.keyword,o],[Vn.params,typeof t=="function"?t(e):t||(0,ce._)`{}`]),c.messages&&n.push([Vn.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Vn.schema,s],[Vn.parentSchema,(0,ce._)`${p}${l}`],[lt.default.data,i]),u&&n.push([Vn.propertyName,u])}});var $0=S(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.boolOrEmptySchema=Io.topBoolOrEmptySchema=void 0;var nR=Ji(),oR=Y(),iR=Ir(),sR={message:"boolean schema is false"};function aR(e){let{gen:t,schema:r,validateName:n}=e;r===!1?S0(e,!1):typeof r=="object"&&r.$async===!0?t.return(iR.default.data):(t.assign((0,oR._)`${n}.errors`,null),t.return(!0))}Io.topBoolOrEmptySchema=aR;function cR(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),S0(e)):r.var(t,!0)}Io.boolOrEmptySchema=cR;function S0(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,nR.reportError)(o,sR,void 0,t)}});var Mf=S(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.getRules=zo.isJSONType=void 0;var uR=["string","number","integer","boolean","null","object","array"],lR=new Set(uR);function pR(e){return typeof e=="string"&&lR.has(e)}zo.isJSONType=pR;function dR(){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:{}}}zo.getRules=dR});var Lf=S(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.shouldUseRule=nn.shouldUseGroup=nn.schemaHasRulesForType=void 0;function fR({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&T0(e,n)}nn.schemaHasRulesForType=fR;function T0(e,t){return t.rules.some(r=>P0(e,r))}nn.shouldUseGroup=T0;function P0(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))}nn.shouldUseRule=P0});var Yi=S(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.reportTypeError=nt.checkDataTypes=nt.checkDataType=nt.coerceAndCheckDataType=nt.getJSONTypes=nt.getSchemaTypes=nt.DataType=void 0;var hR=Mf(),mR=Lf(),gR=Ji(),K=Y(),C0=le(),Ao;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ao||(nt.DataType=Ao={}));function yR(e){let t=E0(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}nt.getSchemaTypes=yR;function E0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(hR.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}nt.getJSONTypes=E0;function _R(e,t){let{gen:r,data:n,opts:o}=e,i=vR(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,mR.schemaHasRulesForType)(e,t[0]));if(s){let a=qf(t,n,o.strictNumbers,Ao.Wrong);r.if(a,()=>{i.length?bR(e,t,i):Ff(e)})}return s}nt.coerceAndCheckDataType=_R;var I0=new Set(["string","number","integer","boolean","null"]);function vR(e,t){return t?e.filter(r=>I0.has(r)||t==="array"&&r==="array"):[]}function bR(e,t,r){let{gen:n,data:o,opts:i}=e,s=n.let("dataType",(0,K._)`typeof ${o}`),a=n.let("coerced",(0,K._)`undefined`);i.coerceTypes==="array"&&n.if((0,K._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,K._)`${o}[0]`).assign(s,(0,K._)`typeof ${o}`).if(qf(t,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,K._)`${a} !== undefined`);for(let u of r)(I0.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);n.else(),Ff(e),n.endIf(),n.if((0,K._)`${a} !== undefined`,()=>{n.assign(o,a),xR(e,a)});function c(u){switch(u){case"string":n.elseIf((0,K._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,K._)`"" + ${o}`).elseIf((0,K._)`${o} === null`).assign(a,(0,K._)`""`);return;case"number":n.elseIf((0,K._)`${s} == "boolean" || ${o} === null
34
34
  || (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,K._)`+${o}`);return;case"integer":n.elseIf((0,K._)`${s} === "boolean" || ${o} === null
35
35
  || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,K._)`+${o}`);return;case"boolean":n.elseIf((0,K._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,K._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,K._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,K._)`${s} === "string" || ${s} === "number"
36
- || ${s} === "boolean" || ${o} === null`).assign(a,(0,K._)`[${o}]`)}}}function xA({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,K._)`${t} !== undefined`,()=>e.assign((0,K._)`${t}[${r}]`,n))}function Zf(e,t,r,n=Ro.Correct){let o=n===Ro.Correct?K.operators.EQ:K.operators.NEQ,i;switch(e){case"null":return(0,K._)`${t} ${o} null`;case"array":i=(0,K._)`Array.isArray(${t})`;break;case"object":i=(0,K._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,K._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,K._)`typeof ${t} ${o} ${e}`}return n===Ro.Correct?i:(0,K.not)(i);function s(a=K.nil){return(0,K.and)((0,K._)`typeof ${t} == "number"`,a,r?(0,K._)`isFinite(${t})`:K.nil)}}rt.checkDataType=Zf;function qf(e,t,r,n){if(e.length===1)return Zf(e[0],t,r,n);let o,i=(0,C0.toHash)(e);if(i.array&&i.object){let s=(0,K._)`typeof ${t} != "object"`;o=i.null?s:(0,K._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else o=K.nil;i.number&&delete i.integer;for(let s in i)o=(0,K.and)(o,Zf(s,t,r,n));return o}rt.checkDataTypes=qf;var wA={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,K._)`{type: ${e}}`:(0,K._)`{type: ${t}}`};function Ff(e){let t=kA(e);(0,gA.reportError)(t,wA)}rt.reportTypeError=Ff;function kA(e){let{gen:t,data:r,schema:n}=e,o=(0,C0.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var R0=S(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.assignDefaults=void 0;var Ao=Y(),SA=le();function $A(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)z0(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,i)=>z0(e,i,o.default))}cc.assignDefaults=$A;function z0(e,t,r){let{gen:n,compositeRule:o,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Ao._)`${i}${(0,Ao.getProperty)(t)}`;if(o){(0,SA.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Ao._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Ao._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Ao._)`${a} = ${(0,Ao.stringify)(r)}`)}});var Zt=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.validateUnion=ge.validateArray=ge.usePattern=ge.callValidateCode=ge.schemaProperties=ge.allSchemaProperties=ge.noPropertyInData=ge.propertyInData=ge.isOwnProperty=ge.hasPropFunc=ge.reportMissingProp=ge.checkMissingProp=ge.checkReportMissingProp=void 0;var ke=Y(),Uf=le(),on=Ir(),TA=le();function PA(e,t){let{gen:r,data:n,it:o}=e;r.if(Vf(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ke._)`${t}`},!0),e.error()})}ge.checkReportMissingProp=PA;function CA({gen:e,data:t,it:{opts:r}},n,o){return(0,ke.or)(...n.map(i=>(0,ke.and)(Vf(e,t,i,r.ownProperties),(0,ke._)`${o} = ${i}`)))}ge.checkMissingProp=CA;function EA(e,t){e.setParams({missingProperty:t},!0),e.error()}ge.reportMissingProp=EA;function A0(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}ge.hasPropFunc=A0;function Bf(e,t,r){return(0,ke._)`${A0(e)}.call(${t}, ${r})`}ge.isOwnProperty=Bf;function IA(e,t,r,n){let o=(0,ke._)`${t}${(0,ke.getProperty)(r)} !== undefined`;return n?(0,ke._)`${o} && ${Bf(e,t,r)}`:o}ge.propertyInData=IA;function Vf(e,t,r,n){let o=(0,ke._)`${t}${(0,ke.getProperty)(r)} === undefined`;return n?(0,ke.or)(o,(0,ke.not)(Bf(e,t,r))):o}ge.noPropertyInData=Vf;function O0(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ge.allSchemaProperties=O0;function zA(e,t){return O0(t).filter(r=>!(0,Uf.alwaysValidSchema)(e,t[r]))}ge.schemaProperties=zA;function RA({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,u){let p=u?(0,ke._)`${e}, ${t}, ${n}${o}`:t,l=[[on.default.instancePath,(0,ke.strConcat)(on.default.instancePath,i)],[on.default.parentData,s.parentData],[on.default.parentDataProperty,s.parentDataProperty],[on.default.rootData,on.default.rootData]];s.opts.dynamicRef&&l.push([on.default.dynamicAnchors,on.default.dynamicAnchors]);let d=(0,ke._)`${p}, ${r.object(...l)}`;return c!==ke.nil?(0,ke._)`${a}.call(${c}, ${d})`:(0,ke._)`${a}(${d})`}ge.callValidateCode=RA;var AA=(0,ke._)`new RegExp`;function OA({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,ke._)`${o.code==="new RegExp"?AA:(0,TA.useFunc)(e,o)}(${r}, ${n})`})}ge.usePattern=OA;function NA(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,ke._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:Uf.Type.Num},i),t.if((0,ke.not)(i),a)})}}ge.validateArray=NA;function DA(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,Uf.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,ke._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,ke.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}ge.validateUnion=DA});var j0=S(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateKeywordUsage=fr.validSchemaType=fr.funcKeywordCode=fr.macroKeywordCode=void 0;var pt=Y(),Gn=Ir(),jA=Zt(),MA=Ji();function LA(e,t){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=e,a=t.macro.call(s.self,o,i,s),c=D0(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:pt.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}fr.macroKeywordCode=LA;function ZA(e,t){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=e;FA(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,p=D0(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)g(),t.modifying&&N0(e),y(()=>e.error());else{let b=t.async?f():h();t.modifying&&N0(e),y(()=>qA(e,b))}}function f(){let b=n.let("ruleErrs",null);return n.try(()=>g((0,pt._)`await `),v=>n.assign(l,!1).if((0,pt._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(b,(0,pt._)`${v}.errors`),()=>n.throw(v))),b}function h(){let b=(0,pt._)`${p}.errors`;return n.assign(b,null),g(pt.nil),b}function g(b=t.async?(0,pt._)`await `:pt.nil){let v=c.opts.passContext?Gn.default.this:Gn.default.self,k=!("compile"in t&&!a||t.schema===!1);n.assign(l,(0,pt._)`${b}${(0,jA.callValidateCode)(e,p,v,k)}`,t.modifying)}function y(b){var v;n.if((0,pt.not)((v=t.valid)!==null&&v!==void 0?v:l),b)}}fr.funcKeywordCode=ZA;function N0(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,pt._)`${n.parentData}[${n.parentDataProperty}]`))}function qA(e,t){let{gen:r}=e;r.if((0,pt._)`Array.isArray(${t})`,()=>{r.assign(Gn.default.vErrors,(0,pt._)`${Gn.default.vErrors} === null ? ${t} : ${Gn.default.vErrors}.concat(${t})`).assign(Gn.default.errors,(0,pt._)`${Gn.default.vErrors}.length`),(0,MA.extendErrors)(e)},()=>e.error())}function FA({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function D0(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,pt.stringify)(r)})}function UA(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")}fr.validSchemaType=UA;function BA({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)}}fr.validateKeywordUsage=BA});var L0=S(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.extendSubschemaMode=sn.extendSubschemaData=sn.getSubschema=void 0;var hr=Y(),M0=le();function VA(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,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}${(0,hr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,M0.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')}sn.getSubschema=VA;function HA(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,hr._)`${t.data}${(0,hr.getProperty)(r)}`,!0);c(d),e.errorPath=(0,hr.str)`${u}${(0,M0.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,hr._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(o!==void 0){let u=o instanceof hr.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]}}sn.extendSubschemaData=HA;function GA(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}sn.extendSubschemaMode=GA});var Hf=S((jU,Z0)=>{"use strict";Z0.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 F0=S((MU,q0)=>{"use strict";var an=q0.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(){};uc(t,n,o,e,"",e)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.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 uc(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 an.arrayKeywords)for(var d=0;d<l.length;d++)uc(e,t,r,l[d],o+"/"+p+"/"+d,i,o,p,n,d)}else if(p in an.propsKeywords){if(l&&typeof l=="object")for(var f in l)uc(e,t,r,l[f],o+"/"+p+"/"+WA(f),i,o,p,n,f)}else(p in an.keywords||e.allKeys&&!(p in an.skipKeywords))&&uc(e,t,r,l,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,u)}}function WA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qi=S(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.getSchemaRefs=xt.resolveUrl=xt.normalizeId=xt._getFullPath=xt.getFullPath=xt.inlineRef=void 0;var KA=le(),JA=Hf(),YA=F0(),QA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function XA(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Gf(e):t?U0(e)<=t:!1}xt.inlineRef=XA;var eO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Gf(e){for(let t in e){if(eO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Gf)||typeof r=="object"&&Gf(r))return!0}return!1}function U0(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!QA.has(r)&&(typeof e[r]=="object"&&(0,KA.eachItem)(e[r],n=>t+=U0(n)),t===1/0))return 1/0}return t}function B0(e,t="",r){r!==!1&&(t=Oo(t));let n=e.parse(t);return V0(e,n)}xt.getFullPath=B0;function V0(e,t){return e.serialize(t).split("#")[0]+"#"}xt._getFullPath=V0;var tO=/#\/?$/;function Oo(e){return e?e.replace(tO,""):""}xt.normalizeId=Oo;function rO(e,t,r){return r=Oo(r),e.resolve(t,r)}xt.resolveUrl=rO;var nO=/^[a-z_][-a-z0-9._]*$/i;function oO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Oo(e[r]||t),i={"":o},s=B0(n,o,!1),a={},c=new Set;return YA(e,{allKeys:!0},(l,d,f,h)=>{if(h===void 0)return;let g=s+d,y=i[h];typeof l[r]=="string"&&(y=b.call(this,l[r])),v.call(this,l.$anchor),v.call(this,l.$dynamicAnchor),i[d]=y;function b(k){let C=this.opts.uriResolver.resolve;if(k=Oo(y?C(y,k):k),c.has(k))throw p(k);c.add(k);let T=this.refs[k];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(l,T.schema,k):k!==Oo(g)&&(k[0]==="#"?(u(l,a[k],k),a[k]=l):this.refs[k]=g),k}function v(k){if(typeof k=="string"){if(!nO.test(k))throw new Error(`invalid anchor "${k}"`);b.call(this,`#${k}`)}}}),a;function u(l,d,f){if(d!==void 0&&!JA(l,d))throw p(f)}function p(l){return new Error(`reference "${l}" resolves to more than one schema`)}}xt.getSchemaRefs=oO});var ts=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;var J0=$0(),H0=Yi(),Kf=Lf(),lc=Yi(),iO=R0(),es=j0(),Wf=L0(),D=Y(),H=Ir(),sO=Qi(),zr=le(),Xi=Ji();function aO(e){if(X0(e)&&(eb(e),Q0(e))){lO(e);return}Y0(e,()=>(0,J0.topBoolOrEmptySchema)(e))}cn.validateFunctionCode=aO;function Y0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,(0,D._)`${H.default.data}, ${H.default.valCxt}`,n.$async,()=>{e.code((0,D._)`"use strict"; ${G0(r,o)}`),uO(e,o),e.code(i)}):e.func(t,(0,D._)`${H.default.data}, ${cO(o)}`,n.$async,()=>e.code(G0(r,o)).code(i))}function cO(e){return(0,D._)`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${e.dynamicRef?(0,D._)`, ${H.default.dynamicAnchors}={}`:D.nil}}={}`}function uO(e,t){e.if(H.default.valCxt,()=>{e.var(H.default.instancePath,(0,D._)`${H.default.valCxt}.${H.default.instancePath}`),e.var(H.default.parentData,(0,D._)`${H.default.valCxt}.${H.default.parentData}`),e.var(H.default.parentDataProperty,(0,D._)`${H.default.valCxt}.${H.default.parentDataProperty}`),e.var(H.default.rootData,(0,D._)`${H.default.valCxt}.${H.default.rootData}`),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,D._)`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{e.var(H.default.instancePath,(0,D._)`""`),e.var(H.default.parentData,(0,D._)`undefined`),e.var(H.default.parentDataProperty,(0,D._)`undefined`),e.var(H.default.rootData,H.default.data),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,D._)`{}`)})}function lO(e){let{schema:t,opts:r,gen:n}=e;Y0(e,()=>{r.$comment&&t.$comment&&rb(e),mO(e),n.let(H.default.vErrors,null),n.let(H.default.errors,0),r.unevaluated&&pO(e),tb(e),_O(e)})}function pO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,D._)`${r}.evaluated`),t.if((0,D._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,D._)`${e.evaluated}.props`,(0,D._)`undefined`)),t.if((0,D._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,D._)`${e.evaluated}.items`,(0,D._)`undefined`))}function G0(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,D._)`/*# sourceURL=${r} */`:D.nil}function dO(e,t){if(X0(e)&&(eb(e),Q0(e))){fO(e,t);return}(0,J0.boolOrEmptySchema)(e,t)}function Q0({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 X0(e){return typeof e.schema!="boolean"}function fO(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&rb(e),gO(e),yO(e);let i=n.const("_errs",H.default.errors);tb(e,i),n.var(t,(0,D._)`${i} === ${H.default.errors}`)}function eb(e){(0,zr.checkUnknownRules)(e),hO(e)}function tb(e,t){if(e.opts.jtd)return W0(e,[],!1,t);let r=(0,H0.getSchemaTypes)(e.schema),n=(0,H0.coerceAndCheckDataType)(e,r);W0(e,r,!n,t)}function hO(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,zr.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function mO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,zr.checkStrictMode)(e,"default is ignored in the schema root")}function gO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,sO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function yO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function rb({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)e.code((0,D._)`${H.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,D.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,D._)`${H.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function _O(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if((0,D._)`${H.default.errors} === 0`,()=>t.return(H.default.data),()=>t.throw((0,D._)`new ${o}(${H.default.vErrors})`)):(t.assign((0,D._)`${n}.errors`,H.default.vErrors),i.unevaluated&&vO(e),t.return((0,D._)`${H.default.errors} === 0`))}function vO({gen:e,evaluated:t,props:r,items:n}){r instanceof D.Name&&e.assign((0,D._)`${t}.props`,r),n instanceof D.Name&&e.assign((0,D._)`${t}.items`,n)}function W0(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,zr.schemaHasRulesButRef)(i,p))){o.block(()=>ob(e,"$ref",p.all.$ref.definition));return}c.jtd||bO(e,t),o.block(()=>{for(let d of p.rules)l(d);l(p.post)});function l(d){(0,Kf.shouldUseGroup)(i,d)&&(d.type?(o.if((0,lc.checkDataType)(d.type,s,c.strictNumbers)),K0(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,lc.reportTypeError)(e)),o.endIf()):K0(e,d),a||o.if((0,D._)`${H.default.errors} === ${n||0}`))}}function K0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,iO.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,Kf.shouldUseRule)(n,i)&&ob(e,i.keyword,i.definition,t.type)})}function bO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(xO(e,t),e.opts.allowUnionTypes||wO(e,t),kO(e,e.dataTypes))}function xO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{nb(e.dataTypes,r)||Jf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),$O(e,t)}}function wO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Jf(e,"use allowUnionTypes to allow union type keyword")}function kO(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Kf.shouldUseRule)(e.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>SO(t,s))&&Jf(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function SO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function nb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function $O(e,t){let r=[];for(let n of e.dataTypes)nb(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Jf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,zr.checkStrictMode)(e,t,e.opts.strictTypes)}var pc=class{constructor(t,r,n){if((0,es.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,zr.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",ib(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,es.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",H.default.errors))}result(t,r,n){this.failResult((0,D.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,D.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,D._)`${r} !== undefined && (${(0,D.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?Xi.reportExtraError:Xi.reportError)(this,this.def.error,r)}$dataError(){(0,Xi.reportError)(this,this.def.$dataError||Xi.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xi.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=D.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=D.nil,r=D.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,D.or)((0,D._)`${o} === undefined`,r)),t!==D.nil&&n.assign(t,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==D.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,D.or)(s(),a());function s(){if(n.length){if(!(r instanceof D.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,D._)`${(0,lc.checkDataTypes)(c,r,i.opts.strictNumbers,lc.DataType.Wrong)}`}return D.nil}function a(){if(o.validateSchema){let c=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,D._)`!${c}(${r})`}return D.nil}}subschema(t,r){let n=(0,Wf.getSubschema)(this.it,t);(0,Wf.extendSubschemaData)(n,this.it,t),(0,Wf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return dO(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=zr.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=zr.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,D.Name)),!0}};cn.KeywordCxt=pc;function ob(e,t,r,n){let o=new pc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,es.funcKeywordCode)(o,r):"macro"in r?(0,es.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,es.funcKeywordCode)(o,r)}var TO=/^\/(?:[^~]|~0|~1)*$/,PO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ib(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(e==="")return H.default.rootData;if(e[0]==="/"){if(!TO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=H.default.rootData}else{let u=PO.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,D._)`${i}${(0,D.getProperty)((0,zr.unescapeJsonPointer)(u))}`,s=(0,D._)`${s} && ${i}`);return s;function c(u,p){return`Cannot access ${u} ${p} levels up, current level is ${t}`}}cn.getData=ib});var dc=S(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Yf=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Qf.default=Yf});var rs=S(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var Xf=Qi(),eh=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Xf.resolveUrl)(t,r,n),this.missingSchema=(0,Xf.normalizeId)((0,Xf.getFullPath)(t,this.missingRef))}};th.default=eh});var hc=S(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.resolveSchema=qt.getCompilingSchema=qt.resolveRef=qt.compileSchema=qt.SchemaEnv=void 0;var Xt=Y(),CO=dc(),Wn=Ir(),er=Qi(),sb=le(),EO=ts(),No=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,er.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};qt.SchemaEnv=No;function nh(e){let t=ab.call(this,e);if(t)return t;let r=(0,er.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Xt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:CO.default,code:(0,Xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Wn.default.data,parentData:Wn.default.parentData,parentDataProperty:Wn.default.parentDataProperty,dataNames:[Wn.default.data],dataPathArr:[Xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Xt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Xt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Xt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,EO.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let l=s.toString();p=`${s.scopeRefs(Wn.default.scope)}return ${l}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let f=new Function(`${Wn.default.self}`,`${Wn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:l,scopeValues:s._values}),this.opts.unevaluated){let{props:h,items:g}=u;f.evaluated={props:h instanceof Xt.Name?void 0:h,items:g instanceof Xt.Name?void 0:g,dynamicProps:h instanceof Xt.Name,dynamicItems:g instanceof Xt.Name},f.source&&(f.source.evaluated=(0,Xt.stringify)(f.evaluated))}return e.validate=f,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)}}qt.compileSchema=nh;function IO(e,t,r){var n;r=(0,er.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let i=AO.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 No({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=zO.call(this,i)}qt.resolveRef=IO;function zO(e){return(0,er.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:nh.call(this,e)}function ab(e){for(let t of this._compilations)if(RO(t,e))return t}qt.getCompilingSchema=ab;function RO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function AO(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||fc.call(this,e,t)}function fc(e,t){let r=this.opts.uriResolver.parse(t),n=(0,er._getFullPath)(this.opts.uriResolver,r),o=(0,er.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return rh.call(this,r,e);let i=(0,er.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=fc.call(this,e,s);return typeof a?.schema!="object"?void 0:rh.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||nh.call(this,s),i===(0,er.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,er.resolveUrl)(this.opts.uriResolver,o,u)),new No({schema:a,schemaId:c,root:e,baseId:o})}return rh.call(this,r,s)}}qt.resolveSchema=fc;var OO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function rh(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,sb.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!OO.has(a)&&u&&(t=(0,er.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,sb.schemaHasRulesButRef)(r,this.RULES)){let a=(0,er.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=fc.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new No({schema:r,schemaId:s,root:n,baseId:t}),i.schema!==i.root.schema)return i}});var cb=S((BU,NO)=>{NO.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 ih=S((VU,db)=>{"use strict";var DO=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),lb=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 oh(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 jO=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function ub(e){return e.length=0,!0}function MO(e,t,r){if(e.length){let n=oh(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function LO(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=MO;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=ub}else{o.push(u);continue}}return o.length&&(a===ub?r.zone=o.join(""):s?n.push(o.join("")):n.push(oh(o))),r.address=n.join(""),r}function pb(e){if(ZO(e,":")<2)return{host:e,isIPV6:!1};let t=LO(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 ZO(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function qO(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 FO(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 UO(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!lb(r)){let n=pb(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}db.exports={nonSimpleDomain:jO,recomposeAuthority:UO,normalizeComponentEncoding:FO,removeDotSegments:qO,isIPv4:lb,isUUID:DO,normalizeIPv6:pb,stringArrayToHexStripped:oh}});var yb=S((HU,gb)=>{"use strict";var{isUUID:BO}=ih(),VO=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,HO=["http","https","ws","wss","urn","urn:uuid"];function GO(e){return HO.indexOf(e)!==-1}function sh(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 fb(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function hb(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 WO(e){return e.secure=sh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function KO(e){if((e.port===(sh(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 JO(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(VO);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=ah(o);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function YO(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=ah(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 QO(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!BO(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function XO(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var mb={scheme:"http",domainHost:!0,parse:fb,serialize:hb},eN={scheme:"https",domainHost:mb.domainHost,parse:fb,serialize:hb},mc={scheme:"ws",domainHost:!0,parse:WO,serialize:KO},tN={scheme:"wss",domainHost:mc.domainHost,parse:mc.parse,serialize:mc.serialize},rN={scheme:"urn",parse:JO,serialize:YO,skipNormalize:!0},nN={scheme:"urn:uuid",parse:QO,serialize:XO,skipNormalize:!0},gc={http:mb,https:eN,ws:mc,wss:tN,urn:rN,"urn:uuid":nN};Object.setPrototypeOf(gc,null);function ah(e){return e&&(gc[e]||gc[e.toLowerCase()])||void 0}gb.exports={wsIsSecure:sh,SCHEMES:gc,isValidSchemeName:GO,getSchemeHandler:ah}});var bb=S((GU,_c)=>{"use strict";var{normalizeIPv6:oN,removeDotSegments:ns,recomposeAuthority:iN,normalizeComponentEncoding:yc,isIPv4:sN,nonSimpleDomain:aN}=ih(),{SCHEMES:cN,getSchemeHandler:_b}=yb();function uN(e,t){return typeof e=="string"?e=mr(Rr(e,t),t):typeof e=="object"&&(e=Rr(mr(e,t),t)),e}function lN(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=vb(Rr(e,n),Rr(t,n),n,!0);return n.skipEscape=!0,mr(o,n)}function vb(e,t,r,n){let o={};return n||(e=Rr(mr(e,r),r),t=Rr(mr(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=ns(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=ns(t.path||""),o.query=t.query):(t.path?(t.path[0]==="/"?o.path=ns(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=ns(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 pN(e,t,r){return typeof e=="string"?(e=unescape(e),e=mr(yc(Rr(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=mr(yc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=mr(yc(Rr(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=mr(yc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function mr(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=_b(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=iN(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=ns(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 dN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Rr(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(dN);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(sN(n.host)===!1){let c=oN(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=_b(r.scheme||n.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&n.host&&(r.domainHost||s&&s.domainHost)&&o===!1&&aN(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 ch={SCHEMES:cN,normalize:uN,resolve:lN,resolveComponent:vb,equal:pN,serialize:mr,parse:Rr};_c.exports=ch;_c.exports.default=ch;_c.exports.fastUri=ch});var wb=S(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var xb=bb();xb.code='require("ajv/dist/runtime/uri").default';uh.default=xb});var Ib=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.CodeGen=Ge.Name=Ge.nil=Ge.stringify=Ge.str=Ge._=Ge.KeywordCxt=void 0;var fN=ts();Object.defineProperty(Ge,"KeywordCxt",{enumerable:!0,get:function(){return fN.KeywordCxt}});var Do=Y();Object.defineProperty(Ge,"_",{enumerable:!0,get:function(){return Do._}});Object.defineProperty(Ge,"str",{enumerable:!0,get:function(){return Do.str}});Object.defineProperty(Ge,"stringify",{enumerable:!0,get:function(){return Do.stringify}});Object.defineProperty(Ge,"nil",{enumerable:!0,get:function(){return Do.nil}});Object.defineProperty(Ge,"Name",{enumerable:!0,get:function(){return Do.Name}});Object.defineProperty(Ge,"CodeGen",{enumerable:!0,get:function(){return Do.CodeGen}});var hN=dc(),Pb=rs(),mN=Mf(),os=hc(),gN=Y(),is=Qi(),vc=Yi(),ph=le(),kb=cb(),yN=wb(),Cb=(e,t)=>new RegExp(e,t);Cb.code="new RegExp";var _N=["removeAdditional","useDefaults","coerceTypes"],vN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),bN={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."},xN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Sb=200;function wN(e){var t,r,n,o,i,s,a,c,u,p,l,d,f,h,g,y,b,v,k,C,T,U,Q,Ie,ht;let we=e.strict,Qe=(t=e.code)===null||t===void 0?void 0:t.optimize,Rt=Qe===!0||Qe===void 0?1:Qe||0,li=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Cb,uo=(o=e.uriResolver)!==null&&o!==void 0?o:yN.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:we)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:we)!==null&&c!==void 0?c:!0,strictTypes:(p=(u=e.strictTypes)!==null&&u!==void 0?u:we)!==null&&p!==void 0?p:"log",strictTuples:(d=(l=e.strictTuples)!==null&&l!==void 0?l:we)!==null&&d!==void 0?d:"log",strictRequired:(h=(f=e.strictRequired)!==null&&f!==void 0?f:we)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:Rt,regExp:li}:{optimize:Rt,regExp:li},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:Sb,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:Sb,meta:(b=e.meta)!==null&&b!==void 0?b:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(T=e.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(U=e.validateSchema)!==null&&U!==void 0?U:!0,validateFormats:(Q=e.validateFormats)!==null&&Q!==void 0?Q:!0,unicodeRegExp:(Ie=e.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(ht=e.int32range)!==null&&ht!==void 0?ht:!0,uriResolver:uo}}var ss=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...wN(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new gN.ValueScope({scope:{},prefixes:vN,es5:r,lines:n}),this.logger=CN(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,mN.getRules)(),$b.call(this,bN,t,"NOT SUPPORTED"),$b.call(this,xN,t,"DEPRECATED","warn"),this._metaOpts=TN.call(this),t.formats&&SN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&$N.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),kN.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=kb;n==="id"&&(o={...kb},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 Pb.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,is.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=Tb.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new os.SchemaEnv({schema:{},schemaId:n});if(r=os.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=Tb.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,is.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(IN.call(this,n,r),!r)return(0,ph.eachItem)(n,i=>lh.call(this,i)),this;RN.call(this,r);let o={...r,type:(0,vc.getJSONTypes)(r.type),schemaType:(0,vc.getJSONTypes)(r.schemaType)};return(0,ph.eachItem)(n,o.type.length===0?i=>lh.call(this,i,o):i=>o.type.forEach(s=>lh.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]=Eb(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,is.normalizeId)(s||n);let u=is.getSchemaRefs.call(this,t,n);return c=new os.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):os.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{os.compileSchema.call(this,t)}finally{this.opts=r}}};ss.ValidationError=hN.default;ss.MissingRefError=Pb.default;Ge.default=ss;function $b(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 Tb(e){return e=(0,is.normalizeId)(e),this.schemas[e]||this.refs[e]}function kN(){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 SN(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function $N(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 TN(){let e={...this.opts};for(let t of _N)delete e[t];return e}var PN={log(){},warn(){},error(){}};function CN(e){if(e===!1)return PN;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 EN=/^[a-z_$][a-z0-9_$:-]*$/i;function IN(e,t){let{RULES:r}=this;if((0,ph.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!EN.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 lh(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,vc.getJSONTypes)(t.type),schemaType:(0,vc.getJSONTypes)(t.schemaType)}};t.before?zN.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 zN(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 RN(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Eb(t)),e.validateSchema=this.compile(t,!0))}var AN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Eb(e){return{anyOf:[e,AN]}}});var zb=S(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var ON={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};dh.default=ON});var Nb=S(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.callRef=Kn.getValidate=void 0;var NN=rs(),Rb=Zt(),wt=Y(),jo=Ir(),Ab=hc(),bc=le(),DN={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=Ab.resolveRef.call(c,u,o,r);if(p===void 0)throw new NN.default(n.opts.uriResolver,o,r);if(p instanceof Ab.SchemaEnv)return d(p);return f(p);function l(){if(i===u)return xc(e,s,i,i.$async);let h=t.scopeValue("root",{ref:u});return xc(e,(0,wt._)`${h}.validate`,u,u.$async)}function d(h){let g=Ob(e,h);xc(e,g,h,h.$async)}function f(h){let g=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,wt.stringify)(h)}:{ref:h}),y=t.name("valid"),b=e.subschema({schema:h,dataTypes:[],schemaPath:wt.nil,topSchemaRef:g,errSchemaPath:r},y);e.mergeEvaluated(b),e.ok(y)}}};function Ob(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Kn.getValidate=Ob;function xc(e,t,r,n){let{gen:o,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?jo.default.this:wt.nil;n?p():l();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=o.let("valid");o.try(()=>{o.code((0,wt._)`await ${(0,Rb.callValidateCode)(e,t,u)}`),f(t),s||o.assign(h,!0)},g=>{o.if((0,wt._)`!(${g} instanceof ${i.ValidationError})`,()=>o.throw(g)),d(g),s||o.assign(h,!1)}),e.ok(h)}function l(){e.result((0,Rb.callValidateCode)(e,t,u),()=>f(t),()=>d(t))}function d(h){let g=(0,wt._)`${h}.errors`;o.assign(jo.default.vErrors,(0,wt._)`${jo.default.vErrors} === null ? ${g} : ${jo.default.vErrors}.concat(${g})`),o.assign(jo.default.errors,(0,wt._)`${jo.default.vErrors}.length`)}function f(h){var g;if(!i.opts.unevaluated)return;let y=(g=r?.validate)===null||g===void 0?void 0:g.evaluated;if(i.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(i.props=bc.mergeEvaluated.props(o,y.props,i.props));else{let b=o.var("props",(0,wt._)`${h}.evaluated.props`);i.props=bc.mergeEvaluated.props(o,b,i.props,wt.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=bc.mergeEvaluated.items(o,y.items,i.items));else{let b=o.var("items",(0,wt._)`${h}.evaluated.items`);i.items=bc.mergeEvaluated.items(o,b,i.items,wt.Name)}}}Kn.callRef=xc;Kn.default=DN});var Db=S(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var jN=zb(),MN=Nb(),LN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",jN.default,MN.default];fh.default=LN});var jb=S(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var wc=Y(),un=wc.operators,kc={maximum:{okStr:"<=",ok:un.LTE,fail:un.GT},minimum:{okStr:">=",ok:un.GTE,fail:un.LT},exclusiveMaximum:{okStr:"<",ok:un.LT,fail:un.GTE},exclusiveMinimum:{okStr:">",ok:un.GT,fail:un.LTE}},ZN={message:({keyword:e,schemaCode:t})=>(0,wc.str)`must be ${kc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wc._)`{comparison: ${kc[e].okStr}, limit: ${t}}`},qN={keyword:Object.keys(kc),type:"number",schemaType:"number",$data:!0,error:ZN,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,wc._)`${r} ${kc[t].fail} ${n} || isNaN(${r})`)}};hh.default=qN});var Mb=S(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var as=Y(),FN={message:({schemaCode:e})=>(0,as.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,as._)`{multipleOf: ${e}}`},UN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:FN,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,i=o.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,as._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,as._)`${s} !== parseInt(${s})`;e.fail$data((0,as._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};mh.default=UN});var Zb=S(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});function Lb(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}gh.default=Lb;Lb.code='require("ajv/dist/runtime/ucs2length").default'});var qb=S(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});var Jn=Y(),BN=le(),VN=Zb(),HN={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Jn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Jn._)`{limit: ${e}}`},GN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:HN,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,i=t==="maxLength"?Jn.operators.GT:Jn.operators.LT,s=o.opts.unicode===!1?(0,Jn._)`${r}.length`:(0,Jn._)`${(0,BN.useFunc)(e.gen,VN.default)}(${r})`;e.fail$data((0,Jn._)`${s} ${i} ${n}`)}};yh.default=GN});var Fb=S(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var WN=Zt(),Sc=Y(),KN={message:({schemaCode:e})=>(0,Sc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Sc._)`{pattern: ${e}}`},JN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:KN,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,Sc._)`(new RegExp(${o}, ${s}))`:(0,WN.usePattern)(e,n);e.fail$data((0,Sc._)`!${a}.test(${t})`)}};_h.default=JN});var Ub=S(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var cs=Y(),YN={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,cs.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,cs._)`{limit: ${e}}`},QN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:YN,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?cs.operators.GT:cs.operators.LT;e.fail$data((0,cs._)`Object.keys(${r}).length ${o} ${n}`)}};vh.default=QN});var Bb=S(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var us=Zt(),ls=Y(),XN=le(),e4={message:({params:{missingProperty:e}})=>(0,ls.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ls._)`{missingProperty: ${e}}`},t4={keyword:"required",type:"object",schemaType:"array",$data:!0,error:e4,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 f=e.parentSchema.properties,{definedProperties:h}=e.it;for(let g of r)if(f?.[g]===void 0&&!h.has(g)){let y=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${g}" is not defined at "${y}" (strictRequired)`;(0,XN.checkStrictMode)(s,b,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(ls.nil,l);else for(let f of r)(0,us.checkReportMissingProp)(e,f)}function p(){let f=t.let("missing");if(c||i){let h=t.let("valid",!0);e.block$data(h,()=>d(f,h)),e.ok(h)}else t.if((0,us.checkMissingProp)(e,r,f)),(0,us.reportMissingProp)(e,f),t.else()}function l(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,us.noPropertyInData)(t,o,f,a.ownProperties),()=>e.error())})}function d(f,h){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(h,(0,us.propertyInData)(t,o,f,a.ownProperties)),t.if((0,ls.not)(h),()=>{e.error(),t.break()})},ls.nil)}}};bh.default=t4});var Vb=S(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var ps=Y(),r4={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,ps.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,ps._)`{limit: ${e}}`},n4={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r4,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?ps.operators.GT:ps.operators.LT;e.fail$data((0,ps._)`${r}.length ${o} ${n}`)}};xh.default=n4});var $c=S(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Hb=Hf();Hb.code='require("ajv/dist/runtime/equal").default';wh.default=Hb});var Gb=S(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var kh=Yi(),We=Y(),o4=le(),i4=$c(),s4={message:({params:{i:e,j:t}})=>(0,We.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,We._)`{i: ${e}, j: ${t}}`},a4={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s4,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,kh.getSchemaTypes)(i.items):[];e.block$data(c,p,(0,We._)`${s} === false`),e.ok(c);function p(){let h=t.let("i",(0,We._)`${r}.length`),g=t.let("j");e.setParams({i:h,j:g}),t.assign(c,!0),t.if((0,We._)`${h} > 1`,()=>(l()?d:f)(h,g))}function l(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function d(h,g){let y=t.name("item"),b=(0,kh.checkDataTypes)(u,y,a.opts.strictNumbers,kh.DataType.Wrong),v=t.const("indices",(0,We._)`{}`);t.for((0,We._)`;${h}--;`,()=>{t.let(y,(0,We._)`${r}[${h}]`),t.if(b,(0,We._)`continue`),u.length>1&&t.if((0,We._)`typeof ${y} == "string"`,(0,We._)`${y} += "_"`),t.if((0,We._)`typeof ${v}[${y}] == "number"`,()=>{t.assign(g,(0,We._)`${v}[${y}]`),e.error(),t.assign(c,!1).break()}).code((0,We._)`${v}[${y}] = ${h}`)})}function f(h,g){let y=(0,o4.useFunc)(t,i4.default),b=t.name("outer");t.label(b).for((0,We._)`;${h}--;`,()=>t.for((0,We._)`${g} = ${h}; ${g}--;`,()=>t.if((0,We._)`${y}(${r}[${h}], ${r}[${g}])`,()=>{e.error(),t.assign(c,!1).break(b)})))}}};Sh.default=a4});var Wb=S(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var $h=Y(),c4=le(),u4=$c(),l4={message:"must be equal to constant",params:({schemaCode:e})=>(0,$h._)`{allowedValue: ${e}}`},p4={keyword:"const",$data:!0,error:l4,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,$h._)`!${(0,c4.useFunc)(t,u4.default)}(${r}, ${o})`):e.fail((0,$h._)`${i} !== ${r}`)}};Th.default=p4});var Kb=S(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var ds=Y(),d4=le(),f4=$c(),h4={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ds._)`{allowedValues: ${e}}`},m4={keyword:"enum",schemaType:"array",$data:!0,error:h4,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,d4.useFunc)(t,f4.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 f=t.const("vSchema",i);p=(0,ds.or)(...o.map((h,g)=>d(f,g)))}e.pass(p);function l(){t.assign(p,!1),t.forOf("v",i,f=>t.if((0,ds._)`${u()}(${r}, ${f})`,()=>t.assign(p,!0).break()))}function d(f,h){let g=o[h];return typeof g=="object"&&g!==null?(0,ds._)`${u()}(${r}, ${f}[${h}])`:(0,ds._)`${r} === ${g}`}}};Ph.default=m4});var Jb=S(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var g4=jb(),y4=Mb(),_4=qb(),v4=Fb(),b4=Ub(),x4=Bb(),w4=Vb(),k4=Gb(),S4=Wb(),$4=Kb(),T4=[g4.default,y4.default,_4.default,v4.default,b4.default,x4.default,w4.default,k4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},S4.default,$4.default];Ch.default=T4});var Ih=S(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.validateAdditionalItems=void 0;var Yn=Y(),Eh=le(),P4={message:({params:{len:e}})=>(0,Yn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Yn._)`{limit: ${e}}`},C4={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:P4,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Eh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Yb(e,n)}};function Yb(e,t){let{gen:r,schema:n,data:o,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Yn._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Yn._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Eh.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Yn._)`${a} <= ${t.length}`);r.if((0,Yn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,p=>{e.subschema({keyword:i,dataProp:p,dataPropType:Eh.Type.Num},u),s.allErrors||r.if((0,Yn.not)(u),()=>r.break())})}}fs.validateAdditionalItems=Yb;fs.default=C4});var zh=S(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.validateTuple=void 0;var Qb=Y(),Tc=le(),E4=Zt(),I4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Xb(e,"additionalItems",t);r.items=!0,!(0,Tc.alwaysValidSchema)(r,t)&&e.ok((0,E4.validateArray)(e))}};function Xb(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=Tc.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,Qb._)`${i}.length`);r.forEach((l,d)=>{(0,Tc.alwaysValidSchema)(a,l)||(n.if((0,Qb._)`${u} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(l){let{opts:d,errSchemaPath:f}=a,h=r.length,g=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(d.strictTuples&&!g){let y=`"${s}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Tc.checkStrictMode)(a,y,d.strictTuples)}}}hs.validateTuple=Xb;hs.default=I4});var ex=S(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var z4=zh(),R4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,z4.validateTuple)(e,"items")};Rh.default=R4});var rx=S(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var tx=Y(),A4=le(),O4=Zt(),N4=Ih(),D4={message:({params:{len:e}})=>(0,tx.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,tx._)`{limit: ${e}}`},j4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:D4,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,A4.alwaysValidSchema)(n,t)&&(o?(0,N4.validateAdditionalItems)(e,o):e.ok((0,O4.validateArray)(e)))}};Ah.default=j4});var nx=S(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Ft=Y(),Pc=le(),M4={message:({params:{min:e,max:t}})=>t===void 0?(0,Ft.str)`must contain at least ${e} valid item(s)`:(0,Ft.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ft._)`{minContains: ${e}}`:(0,Ft._)`{minContains: ${e}, maxContains: ${t}}`},L4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:M4,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,Ft._)`${o}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Pc.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Pc.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Pc.alwaysValidSchema)(i,r)){let g=(0,Ft._)`${p} >= ${s}`;a!==void 0&&(g=(0,Ft._)`${g} && ${p} <= ${a}`),e.pass(g);return}i.items=!0;let l=t.name("valid");a===void 0&&s===1?f(l,()=>t.if(l,()=>t.break())):s===0?(t.let(l,!0),a!==void 0&&t.if((0,Ft._)`${o}.length > 0`,d)):(t.let(l,!1),d()),e.result(l,()=>e.reset());function d(){let g=t.name("_valid"),y=t.let("count",0);f(g,()=>t.if(g,()=>h(y)))}function f(g,y){t.forRange("i",0,p,b=>{e.subschema({keyword:"contains",dataProp:b,dataPropType:Pc.Type.Num,compositeRule:!0},g),y()})}function h(g){t.code((0,Ft._)`${g}++`),a===void 0?t.if((0,Ft._)`${g} >= ${s}`,()=>t.assign(l,!0).break()):(t.if((0,Ft._)`${g} > ${a}`,()=>t.assign(l,!1).break()),s===1?t.assign(l,!0):t.if((0,Ft._)`${g} >= ${s}`,()=>t.assign(l,!0)))}}};Oh.default=L4});var sx=S(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.validateSchemaDeps=gr.validatePropertyDeps=gr.error=void 0;var Nh=Y(),Z4=le(),ms=Zt();gr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Nh.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Nh._)`{property: ${e},
36
+ || ${s} === "boolean" || ${o} === null`).assign(a,(0,K._)`[${o}]`)}}}function xR({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,K._)`${t} !== undefined`,()=>e.assign((0,K._)`${t}[${r}]`,n))}function Zf(e,t,r,n=Ao.Correct){let o=n===Ao.Correct?K.operators.EQ:K.operators.NEQ,i;switch(e){case"null":return(0,K._)`${t} ${o} null`;case"array":i=(0,K._)`Array.isArray(${t})`;break;case"object":i=(0,K._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,K._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,K._)`typeof ${t} ${o} ${e}`}return n===Ao.Correct?i:(0,K.not)(i);function s(a=K.nil){return(0,K.and)((0,K._)`typeof ${t} == "number"`,a,r?(0,K._)`isFinite(${t})`:K.nil)}}nt.checkDataType=Zf;function qf(e,t,r,n){if(e.length===1)return Zf(e[0],t,r,n);let o,i=(0,C0.toHash)(e);if(i.array&&i.object){let s=(0,K._)`typeof ${t} != "object"`;o=i.null?s:(0,K._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else o=K.nil;i.number&&delete i.integer;for(let s in i)o=(0,K.and)(o,Zf(s,t,r,n));return o}nt.checkDataTypes=qf;var wR={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,K._)`{type: ${e}}`:(0,K._)`{type: ${t}}`};function Ff(e){let t=kR(e);(0,gR.reportError)(t,wR)}nt.reportTypeError=Ff;function kR(e){let{gen:t,data:r,schema:n}=e,o=(0,C0.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var A0=S(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.assignDefaults=void 0;var Ro=Y(),SR=le();function $R(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)z0(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,i)=>z0(e,i,o.default))}cc.assignDefaults=$R;function z0(e,t,r){let{gen:n,compositeRule:o,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Ro._)`${i}${(0,Ro.getProperty)(t)}`;if(o){(0,SR.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Ro._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Ro._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Ro._)`${a} = ${(0,Ro.stringify)(r)}`)}});var Zt=S(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.validateUnion=ge.validateArray=ge.usePattern=ge.callValidateCode=ge.schemaProperties=ge.allSchemaProperties=ge.noPropertyInData=ge.propertyInData=ge.isOwnProperty=ge.hasPropFunc=ge.reportMissingProp=ge.checkMissingProp=ge.checkReportMissingProp=void 0;var ke=Y(),Uf=le(),on=Ir(),TR=le();function PR(e,t){let{gen:r,data:n,it:o}=e;r.if(Hf(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ke._)`${t}`},!0),e.error()})}ge.checkReportMissingProp=PR;function CR({gen:e,data:t,it:{opts:r}},n,o){return(0,ke.or)(...n.map(i=>(0,ke.and)(Hf(e,t,i,r.ownProperties),(0,ke._)`${o} = ${i}`)))}ge.checkMissingProp=CR;function ER(e,t){e.setParams({missingProperty:t},!0),e.error()}ge.reportMissingProp=ER;function R0(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}ge.hasPropFunc=R0;function Bf(e,t,r){return(0,ke._)`${R0(e)}.call(${t}, ${r})`}ge.isOwnProperty=Bf;function IR(e,t,r,n){let o=(0,ke._)`${t}${(0,ke.getProperty)(r)} !== undefined`;return n?(0,ke._)`${o} && ${Bf(e,t,r)}`:o}ge.propertyInData=IR;function Hf(e,t,r,n){let o=(0,ke._)`${t}${(0,ke.getProperty)(r)} === undefined`;return n?(0,ke.or)(o,(0,ke.not)(Bf(e,t,r))):o}ge.noPropertyInData=Hf;function O0(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ge.allSchemaProperties=O0;function zR(e,t){return O0(t).filter(r=>!(0,Uf.alwaysValidSchema)(e,t[r]))}ge.schemaProperties=zR;function AR({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,u){let p=u?(0,ke._)`${e}, ${t}, ${n}${o}`:t,l=[[on.default.instancePath,(0,ke.strConcat)(on.default.instancePath,i)],[on.default.parentData,s.parentData],[on.default.parentDataProperty,s.parentDataProperty],[on.default.rootData,on.default.rootData]];s.opts.dynamicRef&&l.push([on.default.dynamicAnchors,on.default.dynamicAnchors]);let d=(0,ke._)`${p}, ${r.object(...l)}`;return c!==ke.nil?(0,ke._)`${a}.call(${c}, ${d})`:(0,ke._)`${a}(${d})`}ge.callValidateCode=AR;var RR=(0,ke._)`new RegExp`;function OR({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,ke._)`${o.code==="new RegExp"?RR:(0,TR.useFunc)(e,o)}(${r}, ${n})`})}ge.usePattern=OR;function NR(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,ke._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:Uf.Type.Num},i),t.if((0,ke.not)(i),a)})}}ge.validateArray=NR;function DR(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,Uf.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,ke._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,ke.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}ge.validateUnion=DR});var j0=S(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateKeywordUsage=fr.validSchemaType=fr.funcKeywordCode=fr.macroKeywordCode=void 0;var pt=Y(),Gn=Ir(),jR=Zt(),MR=Ji();function LR(e,t){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=e,a=t.macro.call(s.self,o,i,s),c=D0(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:pt.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}fr.macroKeywordCode=LR;function ZR(e,t){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=e;FR(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,p=D0(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&&N0(e),y(()=>e.error());else{let b=t.async?f():h();t.modifying&&N0(e),y(()=>qR(e,b))}}function f(){let b=n.let("ruleErrs",null);return n.try(()=>m((0,pt._)`await `),v=>n.assign(l,!1).if((0,pt._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(b,(0,pt._)`${v}.errors`),()=>n.throw(v))),b}function h(){let b=(0,pt._)`${p}.errors`;return n.assign(b,null),m(pt.nil),b}function m(b=t.async?(0,pt._)`await `:pt.nil){let v=c.opts.passContext?Gn.default.this:Gn.default.self,k=!("compile"in t&&!a||t.schema===!1);n.assign(l,(0,pt._)`${b}${(0,jR.callValidateCode)(e,p,v,k)}`,t.modifying)}function y(b){var v;n.if((0,pt.not)((v=t.valid)!==null&&v!==void 0?v:l),b)}}fr.funcKeywordCode=ZR;function N0(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,pt._)`${n.parentData}[${n.parentDataProperty}]`))}function qR(e,t){let{gen:r}=e;r.if((0,pt._)`Array.isArray(${t})`,()=>{r.assign(Gn.default.vErrors,(0,pt._)`${Gn.default.vErrors} === null ? ${t} : ${Gn.default.vErrors}.concat(${t})`).assign(Gn.default.errors,(0,pt._)`${Gn.default.vErrors}.length`),(0,MR.extendErrors)(e)},()=>e.error())}function FR({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function D0(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,pt.stringify)(r)})}function UR(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")}fr.validSchemaType=UR;function BR({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)}}fr.validateKeywordUsage=BR});var L0=S(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.extendSubschemaMode=sn.extendSubschemaData=sn.getSubschema=void 0;var hr=Y(),M0=le();function HR(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,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}${(0,hr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,M0.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')}sn.getSubschema=HR;function VR(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,hr._)`${t.data}${(0,hr.getProperty)(r)}`,!0);c(d),e.errorPath=(0,hr.str)`${u}${(0,M0.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,hr._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(o!==void 0){let u=o instanceof hr.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]}}sn.extendSubschemaData=VR;function GR(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}sn.extendSubschemaMode=GR});var Vf=S((MU,Z0)=>{"use strict";Z0.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 F0=S((LU,q0)=>{"use strict";var an=q0.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(){};uc(t,n,o,e,"",e)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.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 uc(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 an.arrayKeywords)for(var d=0;d<l.length;d++)uc(e,t,r,l[d],o+"/"+p+"/"+d,i,o,p,n,d)}else if(p in an.propsKeywords){if(l&&typeof l=="object")for(var f in l)uc(e,t,r,l[f],o+"/"+p+"/"+WR(f),i,o,p,n,f)}else(p in an.keywords||e.allKeys&&!(p in an.skipKeywords))&&uc(e,t,r,l,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,u)}}function WR(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qi=S(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.getSchemaRefs=xt.resolveUrl=xt.normalizeId=xt._getFullPath=xt.getFullPath=xt.inlineRef=void 0;var KR=le(),JR=Vf(),YR=F0(),QR=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function XR(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Gf(e):t?U0(e)<=t:!1}xt.inlineRef=XR;var eO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Gf(e){for(let t in e){if(eO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Gf)||typeof r=="object"&&Gf(r))return!0}return!1}function U0(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!QR.has(r)&&(typeof e[r]=="object"&&(0,KR.eachItem)(e[r],n=>t+=U0(n)),t===1/0))return 1/0}return t}function B0(e,t="",r){r!==!1&&(t=Oo(t));let n=e.parse(t);return H0(e,n)}xt.getFullPath=B0;function H0(e,t){return e.serialize(t).split("#")[0]+"#"}xt._getFullPath=H0;var tO=/#\/?$/;function Oo(e){return e?e.replace(tO,""):""}xt.normalizeId=Oo;function rO(e,t,r){return r=Oo(r),e.resolve(t,r)}xt.resolveUrl=rO;var nO=/^[a-z_][-a-z0-9._]*$/i;function oO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Oo(e[r]||t),i={"":o},s=B0(n,o,!1),a={},c=new Set;return YR(e,{allKeys:!0},(l,d,f,h)=>{if(h===void 0)return;let m=s+d,y=i[h];typeof l[r]=="string"&&(y=b.call(this,l[r])),v.call(this,l.$anchor),v.call(this,l.$dynamicAnchor),i[d]=y;function b(k){let C=this.opts.uriResolver.resolve;if(k=Oo(y?C(y,k):k),c.has(k))throw p(k);c.add(k);let T=this.refs[k];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(l,T.schema,k):k!==Oo(m)&&(k[0]==="#"?(u(l,a[k],k),a[k]=l):this.refs[k]=m),k}function v(k){if(typeof k=="string"){if(!nO.test(k))throw new Error(`invalid anchor "${k}"`);b.call(this,`#${k}`)}}}),a;function u(l,d,f){if(d!==void 0&&!JR(l,d))throw p(f)}function p(l){return new Error(`reference "${l}" resolves to more than one schema`)}}xt.getSchemaRefs=oO});var ts=S(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;var J0=$0(),V0=Yi(),Kf=Lf(),lc=Yi(),iO=A0(),es=j0(),Wf=L0(),D=Y(),V=Ir(),sO=Qi(),zr=le(),Xi=Ji();function aO(e){if(X0(e)&&(eb(e),Q0(e))){lO(e);return}Y0(e,()=>(0,J0.topBoolOrEmptySchema)(e))}cn.validateFunctionCode=aO;function Y0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,(0,D._)`${V.default.data}, ${V.default.valCxt}`,n.$async,()=>{e.code((0,D._)`"use strict"; ${G0(r,o)}`),uO(e,o),e.code(i)}):e.func(t,(0,D._)`${V.default.data}, ${cO(o)}`,n.$async,()=>e.code(G0(r,o)).code(i))}function cO(e){return(0,D._)`{${V.default.instancePath}="", ${V.default.parentData}, ${V.default.parentDataProperty}, ${V.default.rootData}=${V.default.data}${e.dynamicRef?(0,D._)`, ${V.default.dynamicAnchors}={}`:D.nil}}={}`}function uO(e,t){e.if(V.default.valCxt,()=>{e.var(V.default.instancePath,(0,D._)`${V.default.valCxt}.${V.default.instancePath}`),e.var(V.default.parentData,(0,D._)`${V.default.valCxt}.${V.default.parentData}`),e.var(V.default.parentDataProperty,(0,D._)`${V.default.valCxt}.${V.default.parentDataProperty}`),e.var(V.default.rootData,(0,D._)`${V.default.valCxt}.${V.default.rootData}`),t.dynamicRef&&e.var(V.default.dynamicAnchors,(0,D._)`${V.default.valCxt}.${V.default.dynamicAnchors}`)},()=>{e.var(V.default.instancePath,(0,D._)`""`),e.var(V.default.parentData,(0,D._)`undefined`),e.var(V.default.parentDataProperty,(0,D._)`undefined`),e.var(V.default.rootData,V.default.data),t.dynamicRef&&e.var(V.default.dynamicAnchors,(0,D._)`{}`)})}function lO(e){let{schema:t,opts:r,gen:n}=e;Y0(e,()=>{r.$comment&&t.$comment&&rb(e),mO(e),n.let(V.default.vErrors,null),n.let(V.default.errors,0),r.unevaluated&&pO(e),tb(e),_O(e)})}function pO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,D._)`${r}.evaluated`),t.if((0,D._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,D._)`${e.evaluated}.props`,(0,D._)`undefined`)),t.if((0,D._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,D._)`${e.evaluated}.items`,(0,D._)`undefined`))}function G0(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,D._)`/*# sourceURL=${r} */`:D.nil}function dO(e,t){if(X0(e)&&(eb(e),Q0(e))){fO(e,t);return}(0,J0.boolOrEmptySchema)(e,t)}function Q0({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 X0(e){return typeof e.schema!="boolean"}function fO(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&rb(e),gO(e),yO(e);let i=n.const("_errs",V.default.errors);tb(e,i),n.var(t,(0,D._)`${i} === ${V.default.errors}`)}function eb(e){(0,zr.checkUnknownRules)(e),hO(e)}function tb(e,t){if(e.opts.jtd)return W0(e,[],!1,t);let r=(0,V0.getSchemaTypes)(e.schema),n=(0,V0.coerceAndCheckDataType)(e,r);W0(e,r,!n,t)}function hO(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,zr.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function mO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,zr.checkStrictMode)(e,"default is ignored in the schema root")}function gO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,sO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function yO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function rb({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)e.code((0,D._)`${V.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,D.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,D._)`${V.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function _O(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if((0,D._)`${V.default.errors} === 0`,()=>t.return(V.default.data),()=>t.throw((0,D._)`new ${o}(${V.default.vErrors})`)):(t.assign((0,D._)`${n}.errors`,V.default.vErrors),i.unevaluated&&vO(e),t.return((0,D._)`${V.default.errors} === 0`))}function vO({gen:e,evaluated:t,props:r,items:n}){r instanceof D.Name&&e.assign((0,D._)`${t}.props`,r),n instanceof D.Name&&e.assign((0,D._)`${t}.items`,n)}function W0(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,zr.schemaHasRulesButRef)(i,p))){o.block(()=>ob(e,"$ref",p.all.$ref.definition));return}c.jtd||bO(e,t),o.block(()=>{for(let d of p.rules)l(d);l(p.post)});function l(d){(0,Kf.shouldUseGroup)(i,d)&&(d.type?(o.if((0,lc.checkDataType)(d.type,s,c.strictNumbers)),K0(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,lc.reportTypeError)(e)),o.endIf()):K0(e,d),a||o.if((0,D._)`${V.default.errors} === ${n||0}`))}}function K0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,iO.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,Kf.shouldUseRule)(n,i)&&ob(e,i.keyword,i.definition,t.type)})}function bO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(xO(e,t),e.opts.allowUnionTypes||wO(e,t),kO(e,e.dataTypes))}function xO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{nb(e.dataTypes,r)||Jf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),$O(e,t)}}function wO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Jf(e,"use allowUnionTypes to allow union type keyword")}function kO(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Kf.shouldUseRule)(e.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>SO(t,s))&&Jf(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function SO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function nb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function $O(e,t){let r=[];for(let n of e.dataTypes)nb(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Jf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,zr.checkStrictMode)(e,t,e.opts.strictTypes)}var pc=class{constructor(t,r,n){if((0,es.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,zr.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",ib(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,es.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",V.default.errors))}result(t,r,n){this.failResult((0,D.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,D.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,D._)`${r} !== undefined && (${(0,D.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?Xi.reportExtraError:Xi.reportError)(this,this.def.error,r)}$dataError(){(0,Xi.reportError)(this,this.def.$dataError||Xi.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xi.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=D.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=D.nil,r=D.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,D.or)((0,D._)`${o} === undefined`,r)),t!==D.nil&&n.assign(t,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==D.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,D.or)(s(),a());function s(){if(n.length){if(!(r instanceof D.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,D._)`${(0,lc.checkDataTypes)(c,r,i.opts.strictNumbers,lc.DataType.Wrong)}`}return D.nil}function a(){if(o.validateSchema){let c=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,D._)`!${c}(${r})`}return D.nil}}subschema(t,r){let n=(0,Wf.getSubschema)(this.it,t);(0,Wf.extendSubschemaData)(n,this.it,t),(0,Wf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return dO(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=zr.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=zr.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,D.Name)),!0}};cn.KeywordCxt=pc;function ob(e,t,r,n){let o=new pc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,es.funcKeywordCode)(o,r):"macro"in r?(0,es.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,es.funcKeywordCode)(o,r)}var TO=/^\/(?:[^~]|~0|~1)*$/,PO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ib(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(e==="")return V.default.rootData;if(e[0]==="/"){if(!TO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=V.default.rootData}else{let u=PO.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,D._)`${i}${(0,D.getProperty)((0,zr.unescapeJsonPointer)(u))}`,s=(0,D._)`${s} && ${i}`);return s;function c(u,p){return`Cannot access ${u} ${p} levels up, current level is ${t}`}}cn.getData=ib});var dc=S(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Yf=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Qf.default=Yf});var rs=S(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var Xf=Qi(),eh=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Xf.resolveUrl)(t,r,n),this.missingSchema=(0,Xf.normalizeId)((0,Xf.getFullPath)(t,this.missingRef))}};th.default=eh});var hc=S(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.resolveSchema=qt.getCompilingSchema=qt.resolveRef=qt.compileSchema=qt.SchemaEnv=void 0;var Xt=Y(),CO=dc(),Wn=Ir(),er=Qi(),sb=le(),EO=ts(),No=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,er.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};qt.SchemaEnv=No;function nh(e){let t=ab.call(this,e);if(t)return t;let r=(0,er.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Xt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:CO.default,code:(0,Xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Wn.default.data,parentData:Wn.default.parentData,parentDataProperty:Wn.default.parentDataProperty,dataNames:[Wn.default.data],dataPathArr:[Xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Xt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Xt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Xt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,EO.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let l=s.toString();p=`${s.scopeRefs(Wn.default.scope)}return ${l}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let f=new Function(`${Wn.default.self}`,`${Wn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:l,scopeValues:s._values}),this.opts.unevaluated){let{props:h,items:m}=u;f.evaluated={props:h instanceof Xt.Name?void 0:h,items:m instanceof Xt.Name?void 0:m,dynamicProps:h instanceof Xt.Name,dynamicItems:m instanceof Xt.Name},f.source&&(f.source.evaluated=(0,Xt.stringify)(f.evaluated))}return e.validate=f,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)}}qt.compileSchema=nh;function IO(e,t,r){var n;r=(0,er.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let i=RO.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 No({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=zO.call(this,i)}qt.resolveRef=IO;function zO(e){return(0,er.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:nh.call(this,e)}function ab(e){for(let t of this._compilations)if(AO(t,e))return t}qt.getCompilingSchema=ab;function AO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function RO(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||fc.call(this,e,t)}function fc(e,t){let r=this.opts.uriResolver.parse(t),n=(0,er._getFullPath)(this.opts.uriResolver,r),o=(0,er.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return rh.call(this,r,e);let i=(0,er.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=fc.call(this,e,s);return typeof a?.schema!="object"?void 0:rh.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||nh.call(this,s),i===(0,er.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,er.resolveUrl)(this.opts.uriResolver,o,u)),new No({schema:a,schemaId:c,root:e,baseId:o})}return rh.call(this,r,s)}}qt.resolveSchema=fc;var OO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function rh(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,sb.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!OO.has(a)&&u&&(t=(0,er.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,sb.schemaHasRulesButRef)(r,this.RULES)){let a=(0,er.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=fc.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new No({schema:r,schemaId:s,root:n,baseId:t}),i.schema!==i.root.schema)return i}});var cb=S((HU,NO)=>{NO.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 ih=S((VU,db)=>{"use strict";var DO=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),lb=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 oh(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 jO=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function ub(e){return e.length=0,!0}function MO(e,t,r){if(e.length){let n=oh(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function LO(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=MO;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=ub}else{o.push(u);continue}}return o.length&&(a===ub?r.zone=o.join(""):s?n.push(o.join("")):n.push(oh(o))),r.address=n.join(""),r}function pb(e){if(ZO(e,":")<2)return{host:e,isIPV6:!1};let t=LO(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 ZO(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function qO(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 FO(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 UO(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!lb(r)){let n=pb(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}db.exports={nonSimpleDomain:jO,recomposeAuthority:UO,normalizeComponentEncoding:FO,removeDotSegments:qO,isIPv4:lb,isUUID:DO,normalizeIPv6:pb,stringArrayToHexStripped:oh}});var yb=S((GU,gb)=>{"use strict";var{isUUID:BO}=ih(),HO=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,VO=["http","https","ws","wss","urn","urn:uuid"];function GO(e){return VO.indexOf(e)!==-1}function sh(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 fb(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function hb(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 WO(e){return e.secure=sh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function KO(e){if((e.port===(sh(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 JO(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(HO);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=ah(o);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function YO(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=ah(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 QO(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!BO(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function XO(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var mb={scheme:"http",domainHost:!0,parse:fb,serialize:hb},eN={scheme:"https",domainHost:mb.domainHost,parse:fb,serialize:hb},mc={scheme:"ws",domainHost:!0,parse:WO,serialize:KO},tN={scheme:"wss",domainHost:mc.domainHost,parse:mc.parse,serialize:mc.serialize},rN={scheme:"urn",parse:JO,serialize:YO,skipNormalize:!0},nN={scheme:"urn:uuid",parse:QO,serialize:XO,skipNormalize:!0},gc={http:mb,https:eN,ws:mc,wss:tN,urn:rN,"urn:uuid":nN};Object.setPrototypeOf(gc,null);function ah(e){return e&&(gc[e]||gc[e.toLowerCase()])||void 0}gb.exports={wsIsSecure:sh,SCHEMES:gc,isValidSchemeName:GO,getSchemeHandler:ah}});var bb=S((WU,_c)=>{"use strict";var{normalizeIPv6:oN,removeDotSegments:ns,recomposeAuthority:iN,normalizeComponentEncoding:yc,isIPv4:sN,nonSimpleDomain:aN}=ih(),{SCHEMES:cN,getSchemeHandler:_b}=yb();function uN(e,t){return typeof e=="string"?e=mr(Ar(e,t),t):typeof e=="object"&&(e=Ar(mr(e,t),t)),e}function lN(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=vb(Ar(e,n),Ar(t,n),n,!0);return n.skipEscape=!0,mr(o,n)}function vb(e,t,r,n){let o={};return n||(e=Ar(mr(e,r),r),t=Ar(mr(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=ns(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=ns(t.path||""),o.query=t.query):(t.path?(t.path[0]==="/"?o.path=ns(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=ns(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 pN(e,t,r){return typeof e=="string"?(e=unescape(e),e=mr(yc(Ar(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=mr(yc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=mr(yc(Ar(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=mr(yc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function mr(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=_b(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=iN(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=ns(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 dN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Ar(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(dN);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(sN(n.host)===!1){let c=oN(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=_b(r.scheme||n.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&n.host&&(r.domainHost||s&&s.domainHost)&&o===!1&&aN(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 ch={SCHEMES:cN,normalize:uN,resolve:lN,resolveComponent:vb,equal:pN,serialize:mr,parse:Ar};_c.exports=ch;_c.exports.default=ch;_c.exports.fastUri=ch});var wb=S(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var xb=bb();xb.code='require("ajv/dist/runtime/uri").default';uh.default=xb});var Ib=S(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.CodeGen=We.Name=We.nil=We.stringify=We.str=We._=We.KeywordCxt=void 0;var fN=ts();Object.defineProperty(We,"KeywordCxt",{enumerable:!0,get:function(){return fN.KeywordCxt}});var Do=Y();Object.defineProperty(We,"_",{enumerable:!0,get:function(){return Do._}});Object.defineProperty(We,"str",{enumerable:!0,get:function(){return Do.str}});Object.defineProperty(We,"stringify",{enumerable:!0,get:function(){return Do.stringify}});Object.defineProperty(We,"nil",{enumerable:!0,get:function(){return Do.nil}});Object.defineProperty(We,"Name",{enumerable:!0,get:function(){return Do.Name}});Object.defineProperty(We,"CodeGen",{enumerable:!0,get:function(){return Do.CodeGen}});var hN=dc(),Pb=rs(),mN=Mf(),os=hc(),gN=Y(),is=Qi(),vc=Yi(),ph=le(),kb=cb(),yN=wb(),Cb=(e,t)=>new RegExp(e,t);Cb.code="new RegExp";var _N=["removeAdditional","useDefaults","coerceTypes"],vN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),bN={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."},xN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Sb=200;function wN(e){var t,r,n,o,i,s,a,c,u,p,l,d,f,h,m,y,b,v,k,C,T,U,Q,Ie,ht;let we=e.strict,Xe=(t=e.code)===null||t===void 0?void 0:t.optimize,At=Xe===!0||Xe===void 0?1:Xe||0,li=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Cb,uo=(o=e.uriResolver)!==null&&o!==void 0?o:yN.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:we)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:we)!==null&&c!==void 0?c:!0,strictTypes:(p=(u=e.strictTypes)!==null&&u!==void 0?u:we)!==null&&p!==void 0?p:"log",strictTuples:(d=(l=e.strictTuples)!==null&&l!==void 0?l:we)!==null&&d!==void 0?d:"log",strictRequired:(h=(f=e.strictRequired)!==null&&f!==void 0?f:we)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:At,regExp:li}:{optimize:At,regExp:li},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:Sb,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:Sb,meta:(b=e.meta)!==null&&b!==void 0?b:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(T=e.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(U=e.validateSchema)!==null&&U!==void 0?U:!0,validateFormats:(Q=e.validateFormats)!==null&&Q!==void 0?Q:!0,unicodeRegExp:(Ie=e.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(ht=e.int32range)!==null&&ht!==void 0?ht:!0,uriResolver:uo}}var ss=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...wN(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new gN.ValueScope({scope:{},prefixes:vN,es5:r,lines:n}),this.logger=CN(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,mN.getRules)(),$b.call(this,bN,t,"NOT SUPPORTED"),$b.call(this,xN,t,"DEPRECATED","warn"),this._metaOpts=TN.call(this),t.formats&&SN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&$N.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),kN.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=kb;n==="id"&&(o={...kb},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 Pb.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,is.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=Tb.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new os.SchemaEnv({schema:{},schemaId:n});if(r=os.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=Tb.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,is.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(IN.call(this,n,r),!r)return(0,ph.eachItem)(n,i=>lh.call(this,i)),this;AN.call(this,r);let o={...r,type:(0,vc.getJSONTypes)(r.type),schemaType:(0,vc.getJSONTypes)(r.schemaType)};return(0,ph.eachItem)(n,o.type.length===0?i=>lh.call(this,i,o):i=>o.type.forEach(s=>lh.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]=Eb(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,is.normalizeId)(s||n);let u=is.getSchemaRefs.call(this,t,n);return c=new os.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):os.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{os.compileSchema.call(this,t)}finally{this.opts=r}}};ss.ValidationError=hN.default;ss.MissingRefError=Pb.default;We.default=ss;function $b(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 Tb(e){return e=(0,is.normalizeId)(e),this.schemas[e]||this.refs[e]}function kN(){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 SN(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function $N(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 TN(){let e={...this.opts};for(let t of _N)delete e[t];return e}var PN={log(){},warn(){},error(){}};function CN(e){if(e===!1)return PN;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 EN=/^[a-z_$][a-z0-9_$:-]*$/i;function IN(e,t){let{RULES:r}=this;if((0,ph.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!EN.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 lh(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,vc.getJSONTypes)(t.type),schemaType:(0,vc.getJSONTypes)(t.schemaType)}};t.before?zN.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 zN(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 AN(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Eb(t)),e.validateSchema=this.compile(t,!0))}var RN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Eb(e){return{anyOf:[e,RN]}}});var zb=S(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var ON={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};dh.default=ON});var Nb=S(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.callRef=Kn.getValidate=void 0;var NN=rs(),Ab=Zt(),wt=Y(),jo=Ir(),Rb=hc(),bc=le(),DN={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=Rb.resolveRef.call(c,u,o,r);if(p===void 0)throw new NN.default(n.opts.uriResolver,o,r);if(p instanceof Rb.SchemaEnv)return d(p);return f(p);function l(){if(i===u)return xc(e,s,i,i.$async);let h=t.scopeValue("root",{ref:u});return xc(e,(0,wt._)`${h}.validate`,u,u.$async)}function d(h){let m=Ob(e,h);xc(e,m,h,h.$async)}function f(h){let m=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,wt.stringify)(h)}:{ref:h}),y=t.name("valid"),b=e.subschema({schema:h,dataTypes:[],schemaPath:wt.nil,topSchemaRef:m,errSchemaPath:r},y);e.mergeEvaluated(b),e.ok(y)}}};function Ob(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Kn.getValidate=Ob;function xc(e,t,r,n){let{gen:o,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?jo.default.this:wt.nil;n?p():l();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=o.let("valid");o.try(()=>{o.code((0,wt._)`await ${(0,Ab.callValidateCode)(e,t,u)}`),f(t),s||o.assign(h,!0)},m=>{o.if((0,wt._)`!(${m} instanceof ${i.ValidationError})`,()=>o.throw(m)),d(m),s||o.assign(h,!1)}),e.ok(h)}function l(){e.result((0,Ab.callValidateCode)(e,t,u),()=>f(t),()=>d(t))}function d(h){let m=(0,wt._)`${h}.errors`;o.assign(jo.default.vErrors,(0,wt._)`${jo.default.vErrors} === null ? ${m} : ${jo.default.vErrors}.concat(${m})`),o.assign(jo.default.errors,(0,wt._)`${jo.default.vErrors}.length`)}function f(h){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=bc.mergeEvaluated.props(o,y.props,i.props));else{let b=o.var("props",(0,wt._)`${h}.evaluated.props`);i.props=bc.mergeEvaluated.props(o,b,i.props,wt.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=bc.mergeEvaluated.items(o,y.items,i.items));else{let b=o.var("items",(0,wt._)`${h}.evaluated.items`);i.items=bc.mergeEvaluated.items(o,b,i.items,wt.Name)}}}Kn.callRef=xc;Kn.default=DN});var Db=S(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var jN=zb(),MN=Nb(),LN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",jN.default,MN.default];fh.default=LN});var jb=S(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var wc=Y(),un=wc.operators,kc={maximum:{okStr:"<=",ok:un.LTE,fail:un.GT},minimum:{okStr:">=",ok:un.GTE,fail:un.LT},exclusiveMaximum:{okStr:"<",ok:un.LT,fail:un.GTE},exclusiveMinimum:{okStr:">",ok:un.GT,fail:un.LTE}},ZN={message:({keyword:e,schemaCode:t})=>(0,wc.str)`must be ${kc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wc._)`{comparison: ${kc[e].okStr}, limit: ${t}}`},qN={keyword:Object.keys(kc),type:"number",schemaType:"number",$data:!0,error:ZN,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,wc._)`${r} ${kc[t].fail} ${n} || isNaN(${r})`)}};hh.default=qN});var Mb=S(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var as=Y(),FN={message:({schemaCode:e})=>(0,as.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,as._)`{multipleOf: ${e}}`},UN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:FN,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,i=o.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,as._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,as._)`${s} !== parseInt(${s})`;e.fail$data((0,as._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};mh.default=UN});var Zb=S(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});function Lb(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}gh.default=Lb;Lb.code='require("ajv/dist/runtime/ucs2length").default'});var qb=S(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});var Jn=Y(),BN=le(),HN=Zb(),VN={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Jn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Jn._)`{limit: ${e}}`},GN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:VN,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,i=t==="maxLength"?Jn.operators.GT:Jn.operators.LT,s=o.opts.unicode===!1?(0,Jn._)`${r}.length`:(0,Jn._)`${(0,BN.useFunc)(e.gen,HN.default)}(${r})`;e.fail$data((0,Jn._)`${s} ${i} ${n}`)}};yh.default=GN});var Fb=S(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var WN=Zt(),Sc=Y(),KN={message:({schemaCode:e})=>(0,Sc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Sc._)`{pattern: ${e}}`},JN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:KN,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,Sc._)`(new RegExp(${o}, ${s}))`:(0,WN.usePattern)(e,n);e.fail$data((0,Sc._)`!${a}.test(${t})`)}};_h.default=JN});var Ub=S(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var cs=Y(),YN={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,cs.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,cs._)`{limit: ${e}}`},QN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:YN,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?cs.operators.GT:cs.operators.LT;e.fail$data((0,cs._)`Object.keys(${r}).length ${o} ${n}`)}};vh.default=QN});var Bb=S(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var us=Zt(),ls=Y(),XN=le(),e4={message:({params:{missingProperty:e}})=>(0,ls.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ls._)`{missingProperty: ${e}}`},t4={keyword:"required",type:"object",schemaType:"array",$data:!0,error:e4,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 f=e.parentSchema.properties,{definedProperties:h}=e.it;for(let m of r)if(f?.[m]===void 0&&!h.has(m)){let y=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,XN.checkStrictMode)(s,b,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(ls.nil,l);else for(let f of r)(0,us.checkReportMissingProp)(e,f)}function p(){let f=t.let("missing");if(c||i){let h=t.let("valid",!0);e.block$data(h,()=>d(f,h)),e.ok(h)}else t.if((0,us.checkMissingProp)(e,r,f)),(0,us.reportMissingProp)(e,f),t.else()}function l(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,us.noPropertyInData)(t,o,f,a.ownProperties),()=>e.error())})}function d(f,h){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(h,(0,us.propertyInData)(t,o,f,a.ownProperties)),t.if((0,ls.not)(h),()=>{e.error(),t.break()})},ls.nil)}}};bh.default=t4});var Hb=S(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var ps=Y(),r4={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,ps.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,ps._)`{limit: ${e}}`},n4={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r4,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?ps.operators.GT:ps.operators.LT;e.fail$data((0,ps._)`${r}.length ${o} ${n}`)}};xh.default=n4});var $c=S(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Vb=Vf();Vb.code='require("ajv/dist/runtime/equal").default';wh.default=Vb});var Gb=S(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var kh=Yi(),Ke=Y(),o4=le(),i4=$c(),s4={message:({params:{i:e,j:t}})=>(0,Ke.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ke._)`{i: ${e}, j: ${t}}`},a4={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s4,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,kh.getSchemaTypes)(i.items):[];e.block$data(c,p,(0,Ke._)`${s} === false`),e.ok(c);function p(){let h=t.let("i",(0,Ke._)`${r}.length`),m=t.let("j");e.setParams({i:h,j:m}),t.assign(c,!0),t.if((0,Ke._)`${h} > 1`,()=>(l()?d:f)(h,m))}function l(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function d(h,m){let y=t.name("item"),b=(0,kh.checkDataTypes)(u,y,a.opts.strictNumbers,kh.DataType.Wrong),v=t.const("indices",(0,Ke._)`{}`);t.for((0,Ke._)`;${h}--;`,()=>{t.let(y,(0,Ke._)`${r}[${h}]`),t.if(b,(0,Ke._)`continue`),u.length>1&&t.if((0,Ke._)`typeof ${y} == "string"`,(0,Ke._)`${y} += "_"`),t.if((0,Ke._)`typeof ${v}[${y}] == "number"`,()=>{t.assign(m,(0,Ke._)`${v}[${y}]`),e.error(),t.assign(c,!1).break()}).code((0,Ke._)`${v}[${y}] = ${h}`)})}function f(h,m){let y=(0,o4.useFunc)(t,i4.default),b=t.name("outer");t.label(b).for((0,Ke._)`;${h}--;`,()=>t.for((0,Ke._)`${m} = ${h}; ${m}--;`,()=>t.if((0,Ke._)`${y}(${r}[${h}], ${r}[${m}])`,()=>{e.error(),t.assign(c,!1).break(b)})))}}};Sh.default=a4});var Wb=S(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var $h=Y(),c4=le(),u4=$c(),l4={message:"must be equal to constant",params:({schemaCode:e})=>(0,$h._)`{allowedValue: ${e}}`},p4={keyword:"const",$data:!0,error:l4,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,$h._)`!${(0,c4.useFunc)(t,u4.default)}(${r}, ${o})`):e.fail((0,$h._)`${i} !== ${r}`)}};Th.default=p4});var Kb=S(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var ds=Y(),d4=le(),f4=$c(),h4={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ds._)`{allowedValues: ${e}}`},m4={keyword:"enum",schemaType:"array",$data:!0,error:h4,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,d4.useFunc)(t,f4.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 f=t.const("vSchema",i);p=(0,ds.or)(...o.map((h,m)=>d(f,m)))}e.pass(p);function l(){t.assign(p,!1),t.forOf("v",i,f=>t.if((0,ds._)`${u()}(${r}, ${f})`,()=>t.assign(p,!0).break()))}function d(f,h){let m=o[h];return typeof m=="object"&&m!==null?(0,ds._)`${u()}(${r}, ${f}[${h}])`:(0,ds._)`${r} === ${m}`}}};Ph.default=m4});var Jb=S(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var g4=jb(),y4=Mb(),_4=qb(),v4=Fb(),b4=Ub(),x4=Bb(),w4=Hb(),k4=Gb(),S4=Wb(),$4=Kb(),T4=[g4.default,y4.default,_4.default,v4.default,b4.default,x4.default,w4.default,k4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},S4.default,$4.default];Ch.default=T4});var Ih=S(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.validateAdditionalItems=void 0;var Yn=Y(),Eh=le(),P4={message:({params:{len:e}})=>(0,Yn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Yn._)`{limit: ${e}}`},C4={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:P4,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Eh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Yb(e,n)}};function Yb(e,t){let{gen:r,schema:n,data:o,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Yn._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Yn._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Eh.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Yn._)`${a} <= ${t.length}`);r.if((0,Yn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,p=>{e.subschema({keyword:i,dataProp:p,dataPropType:Eh.Type.Num},u),s.allErrors||r.if((0,Yn.not)(u),()=>r.break())})}}fs.validateAdditionalItems=Yb;fs.default=C4});var zh=S(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.validateTuple=void 0;var Qb=Y(),Tc=le(),E4=Zt(),I4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Xb(e,"additionalItems",t);r.items=!0,!(0,Tc.alwaysValidSchema)(r,t)&&e.ok((0,E4.validateArray)(e))}};function Xb(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=Tc.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,Qb._)`${i}.length`);r.forEach((l,d)=>{(0,Tc.alwaysValidSchema)(a,l)||(n.if((0,Qb._)`${u} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(l){let{opts:d,errSchemaPath:f}=a,h=r.length,m=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(d.strictTuples&&!m){let y=`"${s}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Tc.checkStrictMode)(a,y,d.strictTuples)}}}hs.validateTuple=Xb;hs.default=I4});var ex=S(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var z4=zh(),A4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,z4.validateTuple)(e,"items")};Ah.default=A4});var rx=S(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var tx=Y(),R4=le(),O4=Zt(),N4=Ih(),D4={message:({params:{len:e}})=>(0,tx.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,tx._)`{limit: ${e}}`},j4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:D4,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,R4.alwaysValidSchema)(n,t)&&(o?(0,N4.validateAdditionalItems)(e,o):e.ok((0,O4.validateArray)(e)))}};Rh.default=j4});var nx=S(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Ft=Y(),Pc=le(),M4={message:({params:{min:e,max:t}})=>t===void 0?(0,Ft.str)`must contain at least ${e} valid item(s)`:(0,Ft.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ft._)`{minContains: ${e}}`:(0,Ft._)`{minContains: ${e}, maxContains: ${t}}`},L4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:M4,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,Ft._)`${o}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Pc.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Pc.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Pc.alwaysValidSchema)(i,r)){let m=(0,Ft._)`${p} >= ${s}`;a!==void 0&&(m=(0,Ft._)`${m} && ${p} <= ${a}`),e.pass(m);return}i.items=!0;let l=t.name("valid");a===void 0&&s===1?f(l,()=>t.if(l,()=>t.break())):s===0?(t.let(l,!0),a!==void 0&&t.if((0,Ft._)`${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);f(m,()=>t.if(m,()=>h(y)))}function f(m,y){t.forRange("i",0,p,b=>{e.subschema({keyword:"contains",dataProp:b,dataPropType:Pc.Type.Num,compositeRule:!0},m),y()})}function h(m){t.code((0,Ft._)`${m}++`),a===void 0?t.if((0,Ft._)`${m} >= ${s}`,()=>t.assign(l,!0).break()):(t.if((0,Ft._)`${m} > ${a}`,()=>t.assign(l,!1).break()),s===1?t.assign(l,!0):t.if((0,Ft._)`${m} >= ${s}`,()=>t.assign(l,!0)))}}};Oh.default=L4});var sx=S(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.validateSchemaDeps=gr.validatePropertyDeps=gr.error=void 0;var Nh=Y(),Z4=le(),ms=Zt();gr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Nh.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Nh._)`{property: ${e},
37
37
  missingProperty: ${n},
38
38
  depsCount: ${t},
39
- deps: ${r}}`};var q4={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=F4(e);ox(e,t),ix(e,r)}};function F4({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 ox(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,ms.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,ms.checkReportMissingProp)(e,u)}):(r.if((0,Nh._)`${c} && (${(0,ms.checkMissingProp)(e,a,i)})`),(0,ms.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=ox;function ix(e,t=e.schema){let{gen:r,data:n,keyword:o,it:i}=e,s=r.name("valid");for(let a in t)(0,Z4.alwaysValidSchema)(i,t[a])||(r.if((0,ms.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))}gr.validateSchemaDeps=ix;gr.default=q4});var cx=S(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var ax=Y(),U4=le(),B4={message:"property name must be valid",params:({params:e})=>(0,ax._)`{propertyName: ${e.propertyName}}`},V4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:B4,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,U4.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,ax.not)(i),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(i)}};Dh.default=V4});var Mh=S(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var Cc=Zt(),tr=Y(),H4=Ir(),Ec=le(),G4={message:"must NOT have additional properties",params:({params:e})=>(0,tr._)`{additionalProperty: ${e.additionalProperty}}`},W4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:G4,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,Ec.alwaysValidSchema)(s,r))return;let u=(0,Cc.allSchemaProperties)(n.properties),p=(0,Cc.allSchemaProperties)(n.patternProperties);l(),e.ok((0,tr._)`${i} === ${H4.default.errors}`);function l(){t.forIn("key",o,y=>{!u.length&&!p.length?h(y):t.if(d(y),()=>h(y))})}function d(y){let b;if(u.length>8){let v=(0,Ec.schemaRefOrVal)(s,n.properties,"properties");b=(0,Cc.isOwnProperty)(t,v,y)}else u.length?b=(0,tr.or)(...u.map(v=>(0,tr._)`${y} === ${v}`)):b=tr.nil;return p.length&&(b=(0,tr.or)(b,...p.map(v=>(0,tr._)`${(0,Cc.usePattern)(e,v)}.test(${y})`))),(0,tr.not)(b)}function f(y){t.code((0,tr._)`delete ${o}[${y}]`)}function h(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Ec.alwaysValidSchema)(s,r)){let b=t.name("valid");c.removeAdditional==="failing"?(g(y,b,!1),t.if((0,tr.not)(b),()=>{e.reset(),f(y)})):(g(y,b),a||t.if((0,tr.not)(b),()=>t.break()))}}function g(y,b,v){let k={keyword:"additionalProperties",dataProp:y,dataPropType:Ec.Type.Str};v===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,b)}}};jh.default=W4});var px=S(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var K4=ts(),ux=Zt(),Lh=le(),lx=Mh(),J4={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&&lx.default.code(new K4.KeywordCxt(i,lx.default,"additionalProperties"));let s=(0,ux.allSchemaProperties)(r);for(let l of s)i.definedProperties.add(l);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Lh.mergeEvaluated.props(t,(0,Lh.toHash)(s),i.props));let a=s.filter(l=>!(0,Lh.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,ux.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)}}};Zh.default=J4});var mx=S(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var dx=Zt(),Ic=Y(),fx=le(),hx=le(),Y4={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,dx.allSchemaProperties)(r),c=a.filter(g=>(0,fx.alwaysValidSchema)(i,r[g]));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 Ic.Name)&&(i.props=(0,hx.evaluatedPropsToName)(t,i.props));let{props:l}=i;d();function d(){for(let g of a)u&&f(g),i.allErrors?h(g):(t.var(p,!0),h(g),t.if(p))}function f(g){for(let y in u)new RegExp(g).test(y)&&(0,fx.checkStrictMode)(i,`property ${y} matches pattern ${g} (use allowMatchingProperties)`)}function h(g){t.forIn("key",n,y=>{t.if((0,Ic._)`${(0,dx.usePattern)(e,g)}.test(${y})`,()=>{let b=c.includes(g);b||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:y,dataPropType:hx.Type.Str},p),i.opts.unevaluated&&l!==!0?t.assign((0,Ic._)`${l}[${y}]`,!0):!b&&!i.allErrors&&t.if((0,Ic.not)(p),()=>t.break())})})}}};qh.default=Y4});var gx=S(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var Q4=le(),X4={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,Q4.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"}};Fh.default=X4});var yx=S(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var eD=Zt(),tD={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:eD.validateUnion,error:{message:"must match a schema in anyOf"}};Uh.default=tD});var _x=S(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var zc=Y(),rD=le(),nD={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,zc._)`{passingSchemas: ${e.passing}}`},oD={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:nD,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,rD.alwaysValidSchema)(o,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c),l>0&&t.if((0,zc._)`${c} && ${s}`).assign(s,!1).assign(a,(0,zc._)`[${a}, ${l}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,l),d&&e.mergeEvaluated(d,zc.Name)})})}}};Bh.default=oD});var vx=S(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var iD=le(),sD={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,iD.alwaysValidSchema)(n,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(a)})}};Vh.default=sD});var wx=S(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});var Rc=Y(),xx=le(),aD={message:({params:e})=>(0,Rc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Rc._)`{failingKeyword: ${e.ifClause}}`},cD={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:aD,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,xx.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=bx(n,"then"),i=bx(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,Rc.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,Rc._)`${p}`):e.setParams({ifClause:p})}}}};function bx(e,t){let r=e.schema[t];return r!==void 0&&!(0,xx.alwaysValidSchema)(e,r)}Hh.default=cD});var kx=S(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var uD=le(),lD={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,uD.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Gh.default=lD});var Sx=S(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var pD=Ih(),dD=ex(),fD=zh(),hD=rx(),mD=nx(),gD=sx(),yD=cx(),_D=Mh(),vD=px(),bD=mx(),xD=gx(),wD=yx(),kD=_x(),SD=vx(),$D=wx(),TD=kx();function PD(e=!1){let t=[xD.default,wD.default,kD.default,SD.default,$D.default,TD.default,yD.default,_D.default,gD.default,vD.default,bD.default];return e?t.push(dD.default,hD.default):t.push(pD.default,fD.default),t.push(mD.default),t}Wh.default=PD});var $x=S(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});var Oe=Y(),CD={message:({schemaCode:e})=>(0,Oe.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Oe._)`{format: ${e}}`},ED={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:CD,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():f();function d(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),g=r.const("fDef",(0,Oe._)`${h}[${s}]`),y=r.let("fType"),b=r.let("format");r.if((0,Oe._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(y,(0,Oe._)`${g}.type || "string"`).assign(b,(0,Oe._)`${g}.validate`),()=>r.assign(y,(0,Oe._)`"string"`).assign(b,g)),e.fail$data((0,Oe.or)(v(),k()));function v(){return c.strictSchema===!1?Oe.nil:(0,Oe._)`${s} && !${b}`}function k(){let C=p.$async?(0,Oe._)`(${g}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,Oe._)`${b}(${n})`,T=(0,Oe._)`(typeof ${b} == "function" ? ${C} : ${b}.test(${n}))`;return(0,Oe._)`${b} && ${b} !== true && ${y} === ${t} && !${T}`}}function f(){let h=l.formats[i];if(!h){v();return}if(h===!0)return;let[g,y,b]=k(h);g===t&&e.pass(C());function v(){if(c.strictSchema===!1){l.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(T){let U=T instanceof RegExp?(0,Oe.regexpCode)(T):c.code.formats?(0,Oe._)`${c.code.formats}${(0,Oe.getProperty)(i)}`:void 0,Q=r.scopeValue("formats",{key:i,ref:T,code:U});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Oe._)`${Q}.validate`]:["string",T,Q]}function C(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Oe._)`await ${b}(${n})`}return typeof y=="function"?(0,Oe._)`${b}(${n})`:(0,Oe._)`${b}.test(${n})`}}}};Kh.default=ED});var Tx=S(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var ID=$x(),zD=[ID.default];Jh.default=zD});var Px=S(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.contentVocabulary=Mo.metadataVocabulary=void 0;Mo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Mo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ex=S(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var RD=Db(),AD=Jb(),OD=Sx(),ND=Tx(),Cx=Px(),DD=[RD.default,AD.default,(0,OD.default)(),ND.default,Cx.metadataVocabulary,Cx.contentVocabulary];Yh.default=DD});var zx=S(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.DiscrError=void 0;var Ix;(function(e){e.Tag="tag",e.Mapping="mapping"})(Ix||(Ac.DiscrError=Ix={}))});var Ax=S(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var Lo=Y(),Qh=zx(),Rx=hc(),jD=rs(),MD=le(),LD={message:({params:{discrError:e,tagName:t}})=>e===Qh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Lo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},ZD={keyword:"discriminator",type:"object",schemaType:"object",error:LD,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,Lo._)`${r}${(0,Lo.getProperty)(a)}`);t.if((0,Lo._)`typeof ${u} == "string"`,()=>p(),()=>e.error(!1,{discrError:Qh.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function p(){let f=d();t.if(!1);for(let h in f)t.elseIf((0,Lo._)`${u} === ${h}`),t.assign(c,l(f[h]));t.else(),e.error(!1,{discrError:Qh.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function l(f){let h=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:f},h);return e.mergeEvaluated(g,Lo.Name),h}function d(){var f;let h={},g=b(o),y=!0;for(let C=0;C<s.length;C++){let T=s[C];if(T?.$ref&&!(0,MD.schemaHasRulesButRef)(T,i.self.RULES)){let Q=T.$ref;if(T=Rx.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Q),T instanceof Rx.SchemaEnv&&(T=T.schema),T===void 0)throw new jD.default(i.opts.uriResolver,i.baseId,Q)}let U=(f=T?.properties)===null||f===void 0?void 0:f[a];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(g||b(T)),v(U,C)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return h;function b({required:C}){return Array.isArray(C)&&C.includes(a)}function v(C,T){if(C.const)k(C.const,T);else if(C.enum)for(let U of C.enum)k(U,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(C,T){if(typeof C!="string"||C in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[C]=T}}}};Xh.default=ZD});var Ox=S((NB,qD)=>{qD.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 tm=S((Se,em)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var FD=Ib(),UD=Ex(),BD=Ax(),Nx=Ox(),VD=["/properties"],Oc="http://json-schema.org/draft-07/schema",Zo=class extends FD.default{_addVocabularies(){super._addVocabularies(),UD.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(BD.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Nx,VD):Nx;this.addMetaSchema(t,Oc,!1),this.refs["http://json-schema.org/schema"]=Oc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Oc)?Oc:void 0)}};Se.Ajv=Zo;em.exports=Se=Zo;em.exports.Ajv=Zo;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Zo;var HD=ts();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return HD.KeywordCxt}});var qo=Y();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return qo._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return qo.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return qo.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return qo.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return qo.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return qo.CodeGen}});var GD=dc();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return GD.default}});var WD=rs();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return WD.default}})});var Ux=S(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.formatNames=_r.fastFormats=_r.fullFormats=void 0;function yr(e,t){return{validate:e,compare:t}}_r.fullFormats={date:yr(Lx,im),time:yr(nm(!0),sm),"date-time":yr(Dx(!0),qx),"iso-time":yr(nm(),Zx),"iso-date-time":yr(Dx(),Fx),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:ej,"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:aj,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:tj,int32:{type:"number",validate:oj},int64:{type:"number",validate:ij},float:{type:"number",validate:Mx},double:{type:"number",validate:Mx},password:!0,binary:!0};_r.fastFormats={..._r.fullFormats,date:yr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,im),time:yr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,sm),"date-time":yr(/^\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,qx),"iso-time":yr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Zx),"iso-date-time":yr(/^\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,Fx),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};_r.formatNames=Object.keys(_r.fullFormats);function KD(e){return e%4===0&&(e%100!==0||e%400===0)}var JD=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,YD=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Lx(e){let t=JD.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&&KD(r)?29:YD[n])}function im(e,t){if(e&&t)return e>t?1:e<t?-1:0}var rm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function nm(e){return function(r){let n=rm.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 sm(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 Zx(e,t){if(!(e&&t))return;let r=rm.exec(e),n=rm.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 om=/t|\s/i;function Dx(e){let t=nm(e);return function(n){let o=n.split(om);return o.length===2&&Lx(o[0])&&t(o[1])}}function qx(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function Fx(e,t){if(!(e&&t))return;let[r,n]=e.split(om),[o,i]=t.split(om),s=im(r,o);if(s!==void 0)return s||sm(n,i)}var QD=/\/|:/,XD=/^(?:[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 ej(e){return QD.test(e)&&XD.test(e)}var jx=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function tj(e){return jx.lastIndex=0,jx.test(e)}var rj=-(2**31),nj=2**31-1;function oj(e){return Number.isInteger(e)&&e<=nj&&e>=rj}function ij(e){return Number.isInteger(e)}function Mx(){return!0}var sj=/[^\\]\\Z/;function aj(e){if(sj.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Bx=S(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.formatLimitDefinition=void 0;var cj=tm(),rr=Y(),ln=rr.operators,Nc={formatMaximum:{okStr:"<=",ok:ln.LTE,fail:ln.GT},formatMinimum:{okStr:">=",ok:ln.GTE,fail:ln.LT},formatExclusiveMaximum:{okStr:"<",ok:ln.LT,fail:ln.GTE},formatExclusiveMinimum:{okStr:">",ok:ln.GT,fail:ln.LTE}},uj={message:({keyword:e,schemaCode:t})=>(0,rr.str)`should be ${Nc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,rr._)`{comparison: ${Nc[e].okStr}, limit: ${t}}`};Fo.formatLimitDefinition={keyword:Object.keys(Nc),type:"string",schemaType:"string",$data:!0,error:uj,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 cj.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}),f=t.const("fmt",(0,rr._)`${d}[${c.schemaCode}]`);e.fail$data((0,rr.or)((0,rr._)`typeof ${f} != "object"`,(0,rr._)`${f} instanceof RegExp`,(0,rr._)`typeof ${f}.compare != "function"`,l(f)))}function p(){let d=c.schema,f=a.formats[d];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let h=t.scopeValue("formats",{key:d,ref:f,code:s.code.formats?(0,rr._)`${s.code.formats}${(0,rr.getProperty)(d)}`:void 0});e.fail$data(l(h))}function l(d){return(0,rr._)`${d}.compare(${r}, ${n}) ${Nc[o].fail} 0`}},dependencies:["format"]};var lj=e=>(e.addKeyword(Fo.formatLimitDefinition),e);Fo.default=lj});var Wx=S((gs,Gx)=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Uo=Ux(),pj=Bx(),am=Y(),Vx=new am.Name("fullFormats"),dj=new am.Name("fastFormats"),cm=(e,t={keywords:!0})=>{if(Array.isArray(t))return Hx(e,t,Uo.fullFormats,Vx),e;let[r,n]=t.mode==="fast"?[Uo.fastFormats,dj]:[Uo.fullFormats,Vx],o=t.formats||Uo.formatNames;return Hx(e,o,r,n),t.keywords&&(0,pj.default)(e),e};cm.get=(e,t="full")=>{let n=(t==="fast"?Uo.fastFormats:Uo.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function Hx(e,t,r,n){var o,i;(o=(i=e.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,am._)`require("ajv-formats/dist/formats").${n}`);for(let s of t)e.addFormat(s,r[s])}Gx.exports=gs=cm;Object.defineProperty(gs,"__esModule",{value:!0});gs.default=cm});function fj(){let e=new Kx.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Jx.default)(e),e}var Kx,Jx,Dc,Yx=_(()=>{Kx=st(tm(),1),Jx=st(Wx(),1);Dc=class{constructor(t){this._ajv=t??fj()}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 jc,Qx=_(()=>{jc=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 Xx(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 ew(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 tw=_(()=>{});var Mc,rw=_(()=>{u0();Zi();Yx();Ci();Qx();tw();Mc=class extends Xa{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Li.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 Dc,this.setRequestHandler(xd,n=>this._oninitialize(n)),this.setNotificationHandler(wd,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Ed,async(n,o)=>{let i=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=n.params,a=Li.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new jc(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=c0(this._capabilities,t)}setRequestHandler(t,r){let o=Qr(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(Nt(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=Yr(Po,c);if(!p.success){let h=p.error instanceof Error?p.error.message:String(p.error);throw new O(L.InvalidParams,`Invalid tools/call request: ${h}`)}let{params:l}=p.data,d=await Promise.resolve(r(c,u));if(l.task){let h=Yr($o,d);if(!h.success){let g=h.error instanceof Error?h.error.message:String(h.error);throw new O(L.InvalidParams,`Invalid task creation result: ${g}`)}return h.data}let f=Yr(Za,d);if(!f.success){let h=f.error instanceof Error?f.error.message:String(f.error);throw new O(L.InvalidParams,`Invalid tools/call result: ${h}`)}return f.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){ew(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Xx(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:cv.includes(r)?r:gd,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Sa)}async createMessage(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},zd,r):this.request({method:"sampling/createMessage",params:t},Id,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},qa,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},qa,r);if(i.action==="accept"&&i.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(i.content);if(!a.valid)throw new O(L.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof O?s:new O(L.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},Rd,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"})}}});function um(e){return!!e&&typeof e=="object"&&ow in e}function iw(e){return e[ow]?.complete}var ow,nw,sw=_(()=>{ow=Symbol.for("mcp.completable");(function(e){e.Completable="McpCompletable"})(nw||(nw={}))});var Lc,aw=_(()=>{Lc=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}}});function mj(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"),!hj.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 gj(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 lm(e){let t=mj(e);return gj(e,t.warnings),t.isValid}var hj,cw=_(()=>{hj=/^[A-Za-z0-9._-]{1,128}$/});var Zc,uw=_(()=>{Zc=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 pe=_(()=>{Ws();Ws()});function dw(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function _j(e){return"_def"in e||"_zod"in e||dw(e)}function pm(e){return typeof e!="object"||e===null||_j(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(dw)}function lw(e){if(e)return pm(e)?qn(e):e}function vj(e){let t=Qr(e);return t?Object.entries(t).map(([r,n])=>{let o=O_(n),i=N_(n);return{name:r,description:o,required:!i}}):[]}function pn(e){let r=Qr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=_a(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function pw(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var qc,_s,yj,ys,fw=_(()=>{rw();Ci();gf();Zi();sw();aw();cw();uw();pe();qc=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 Mc(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Zc(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(La)),this.server.assertCanSetRequestHandler(pn(Po)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(La,()=>({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=ko(r.inputSchema);return o?ff(o,{strictUnions:!0,pipeStrategy:"input"}):yj})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=ko(r.outputSchema);o&&(n.outputSchema=ff(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(Po,async(t,r)=>{try{let n=this._registeredTools[t.params.name];if(!n)throw new O(L.InvalidParams,`Tool ${t.params.name} not found`);if(!n.enabled)throw new O(L.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 O(L.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!o)throw new O(L.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 O&&n.code===L.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=ko(t.inputSchema)??t.inputSchema,s=await ga(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=ya(a);throw new O(L.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 O(L.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=ko(t.outputSchema),i=await ga(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=ya(s);throw new O(L.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 O(L.InternalError,`Task ${c} not found during polling`);u=l}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(pn(Fa)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Fa,async t=>{switch(t.params.ref.type){case"ref/prompt":return Sv(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return $v(t),this.handleResourceCompletion(t,t.params.ref);default:throw new O(L.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let n=this._registeredPrompts[r.name];if(!n)throw new O(L.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return ys;let i=Qr(n.argsSchema)?.[t.params.argument.name];if(!um(i))return ys;let s=iw(i);if(!s)return ys;let a=await s(t.params.argument.value,t.params.context);return pw(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 ys;throw new O(L.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(t.params.argument.name);if(!o)return ys;let i=await o(t.params.argument.value,t.params.context);return pw(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(Oa)),this.server.assertCanSetRequestHandler(pn(Na)),this.server.assertCanSetRequestHandler(pn(Da)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Oa,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(Na,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler(Da,async(t,r)=>{let n=new URL(t.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new O(L.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 O(L.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(ja)),this.server.assertCanSetRequestHandler(pn(Ma)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(ja,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?vj(r.argsSchema):void 0}))})),this.server.setRequestHandler(Ma,async(t,r)=>{let n=this._registeredPrompts[t.params.name];if(!n)throw new O(L.InvalidParams,`Prompt ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${t.params.name} disabled`);if(n.argsSchema){let o=ko(n.argsSchema),i=await ga(o,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=ya(c);throw new O(L.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:qn(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=qn(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 gt?c._def?.innerType:c;return um(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,n,o,i,s,a,c,u){lm(t);let p={title:r,description:n,inputSchema:lw(o),outputSchema:lw(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"&&lm(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=qn(l.paramsSchema)),typeof l.outputSchema<"u"&&(p.outputSchema=qn(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];pm(c)?(o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!pm(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()}},_s=class{constructor(t,r){this._callbacks=r,this._uriTemplate=typeof t=="string"?new Lc(t):t}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(t){return this._callbacks.complete?.[t]}},yj={type:"object",properties:{}};ys={completion:{values:[],hasMore:!1}}});function bj(e){return gv.parse(JSON.parse(e))}function hw(e){return JSON.stringify(e)+`
39
+ deps: ${r}}`};var q4={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=F4(e);ox(e,t),ix(e,r)}};function F4({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 ox(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,ms.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,ms.checkReportMissingProp)(e,u)}):(r.if((0,Nh._)`${c} && (${(0,ms.checkMissingProp)(e,a,i)})`),(0,ms.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=ox;function ix(e,t=e.schema){let{gen:r,data:n,keyword:o,it:i}=e,s=r.name("valid");for(let a in t)(0,Z4.alwaysValidSchema)(i,t[a])||(r.if((0,ms.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))}gr.validateSchemaDeps=ix;gr.default=q4});var cx=S(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var ax=Y(),U4=le(),B4={message:"property name must be valid",params:({params:e})=>(0,ax._)`{propertyName: ${e.propertyName}}`},H4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:B4,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,U4.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,ax.not)(i),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(i)}};Dh.default=H4});var Mh=S(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var Cc=Zt(),tr=Y(),V4=Ir(),Ec=le(),G4={message:"must NOT have additional properties",params:({params:e})=>(0,tr._)`{additionalProperty: ${e.additionalProperty}}`},W4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:G4,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,Ec.alwaysValidSchema)(s,r))return;let u=(0,Cc.allSchemaProperties)(n.properties),p=(0,Cc.allSchemaProperties)(n.patternProperties);l(),e.ok((0,tr._)`${i} === ${V4.default.errors}`);function l(){t.forIn("key",o,y=>{!u.length&&!p.length?h(y):t.if(d(y),()=>h(y))})}function d(y){let b;if(u.length>8){let v=(0,Ec.schemaRefOrVal)(s,n.properties,"properties");b=(0,Cc.isOwnProperty)(t,v,y)}else u.length?b=(0,tr.or)(...u.map(v=>(0,tr._)`${y} === ${v}`)):b=tr.nil;return p.length&&(b=(0,tr.or)(b,...p.map(v=>(0,tr._)`${(0,Cc.usePattern)(e,v)}.test(${y})`))),(0,tr.not)(b)}function f(y){t.code((0,tr._)`delete ${o}[${y}]`)}function h(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Ec.alwaysValidSchema)(s,r)){let b=t.name("valid");c.removeAdditional==="failing"?(m(y,b,!1),t.if((0,tr.not)(b),()=>{e.reset(),f(y)})):(m(y,b),a||t.if((0,tr.not)(b),()=>t.break()))}}function m(y,b,v){let k={keyword:"additionalProperties",dataProp:y,dataPropType:Ec.Type.Str};v===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,b)}}};jh.default=W4});var px=S(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});var K4=ts(),ux=Zt(),Lh=le(),lx=Mh(),J4={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&&lx.default.code(new K4.KeywordCxt(i,lx.default,"additionalProperties"));let s=(0,ux.allSchemaProperties)(r);for(let l of s)i.definedProperties.add(l);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Lh.mergeEvaluated.props(t,(0,Lh.toHash)(s),i.props));let a=s.filter(l=>!(0,Lh.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,ux.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)}}};Zh.default=J4});var mx=S(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var dx=Zt(),Ic=Y(),fx=le(),hx=le(),Y4={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,dx.allSchemaProperties)(r),c=a.filter(m=>(0,fx.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 Ic.Name)&&(i.props=(0,hx.evaluatedPropsToName)(t,i.props));let{props:l}=i;d();function d(){for(let m of a)u&&f(m),i.allErrors?h(m):(t.var(p,!0),h(m),t.if(p))}function f(m){for(let y in u)new RegExp(m).test(y)&&(0,fx.checkStrictMode)(i,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function h(m){t.forIn("key",n,y=>{t.if((0,Ic._)`${(0,dx.usePattern)(e,m)}.test(${y})`,()=>{let b=c.includes(m);b||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:hx.Type.Str},p),i.opts.unevaluated&&l!==!0?t.assign((0,Ic._)`${l}[${y}]`,!0):!b&&!i.allErrors&&t.if((0,Ic.not)(p),()=>t.break())})})}}};qh.default=Y4});var gx=S(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var Q4=le(),X4={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,Q4.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"}};Fh.default=X4});var yx=S(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var eD=Zt(),tD={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:eD.validateUnion,error:{message:"must match a schema in anyOf"}};Uh.default=tD});var _x=S(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});var zc=Y(),rD=le(),nD={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,zc._)`{passingSchemas: ${e.passing}}`},oD={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:nD,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,rD.alwaysValidSchema)(o,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c),l>0&&t.if((0,zc._)`${c} && ${s}`).assign(s,!1).assign(a,(0,zc._)`[${a}, ${l}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,l),d&&e.mergeEvaluated(d,zc.Name)})})}}};Bh.default=oD});var vx=S(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});var iD=le(),sD={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,iD.alwaysValidSchema)(n,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(a)})}};Hh.default=sD});var wx=S(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});var Ac=Y(),xx=le(),aD={message:({params:e})=>(0,Ac.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Ac._)`{failingKeyword: ${e.ifClause}}`},cD={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:aD,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,xx.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=bx(n,"then"),i=bx(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,Ac.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,Ac._)`${p}`):e.setParams({ifClause:p})}}}};function bx(e,t){let r=e.schema[t];return r!==void 0&&!(0,xx.alwaysValidSchema)(e,r)}Vh.default=cD});var kx=S(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var uD=le(),lD={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,uD.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Gh.default=lD});var Sx=S(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var pD=Ih(),dD=ex(),fD=zh(),hD=rx(),mD=nx(),gD=sx(),yD=cx(),_D=Mh(),vD=px(),bD=mx(),xD=gx(),wD=yx(),kD=_x(),SD=vx(),$D=wx(),TD=kx();function PD(e=!1){let t=[xD.default,wD.default,kD.default,SD.default,$D.default,TD.default,yD.default,_D.default,gD.default,vD.default,bD.default];return e?t.push(dD.default,hD.default):t.push(pD.default,fD.default),t.push(mD.default),t}Wh.default=PD});var $x=S(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});var Oe=Y(),CD={message:({schemaCode:e})=>(0,Oe.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Oe._)`{format: ${e}}`},ED={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:CD,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():f();function d(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),m=r.const("fDef",(0,Oe._)`${h}[${s}]`),y=r.let("fType"),b=r.let("format");r.if((0,Oe._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Oe._)`${m}.type || "string"`).assign(b,(0,Oe._)`${m}.validate`),()=>r.assign(y,(0,Oe._)`"string"`).assign(b,m)),e.fail$data((0,Oe.or)(v(),k()));function v(){return c.strictSchema===!1?Oe.nil:(0,Oe._)`${s} && !${b}`}function k(){let C=p.$async?(0,Oe._)`(${m}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,Oe._)`${b}(${n})`,T=(0,Oe._)`(typeof ${b} == "function" ? ${C} : ${b}.test(${n}))`;return(0,Oe._)`${b} && ${b} !== true && ${y} === ${t} && !${T}`}}function f(){let h=l.formats[i];if(!h){v();return}if(h===!0)return;let[m,y,b]=k(h);m===t&&e.pass(C());function v(){if(c.strictSchema===!1){l.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(T){let U=T instanceof RegExp?(0,Oe.regexpCode)(T):c.code.formats?(0,Oe._)`${c.code.formats}${(0,Oe.getProperty)(i)}`:void 0,Q=r.scopeValue("formats",{key:i,ref:T,code:U});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Oe._)`${Q}.validate`]:["string",T,Q]}function C(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Oe._)`await ${b}(${n})`}return typeof y=="function"?(0,Oe._)`${b}(${n})`:(0,Oe._)`${b}.test(${n})`}}}};Kh.default=ED});var Tx=S(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});var ID=$x(),zD=[ID.default];Jh.default=zD});var Px=S(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.contentVocabulary=Mo.metadataVocabulary=void 0;Mo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Mo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ex=S(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var AD=Db(),RD=Jb(),OD=Sx(),ND=Tx(),Cx=Px(),DD=[AD.default,RD.default,(0,OD.default)(),ND.default,Cx.metadataVocabulary,Cx.contentVocabulary];Yh.default=DD});var zx=S(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.DiscrError=void 0;var Ix;(function(e){e.Tag="tag",e.Mapping="mapping"})(Ix||(Rc.DiscrError=Ix={}))});var Rx=S(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});var Lo=Y(),Qh=zx(),Ax=hc(),jD=rs(),MD=le(),LD={message:({params:{discrError:e,tagName:t}})=>e===Qh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Lo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},ZD={keyword:"discriminator",type:"object",schemaType:"object",error:LD,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,Lo._)`${r}${(0,Lo.getProperty)(a)}`);t.if((0,Lo._)`typeof ${u} == "string"`,()=>p(),()=>e.error(!1,{discrError:Qh.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function p(){let f=d();t.if(!1);for(let h in f)t.elseIf((0,Lo._)`${u} === ${h}`),t.assign(c,l(f[h]));t.else(),e.error(!1,{discrError:Qh.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function l(f){let h=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:f},h);return e.mergeEvaluated(m,Lo.Name),h}function d(){var f;let h={},m=b(o),y=!0;for(let C=0;C<s.length;C++){let T=s[C];if(T?.$ref&&!(0,MD.schemaHasRulesButRef)(T,i.self.RULES)){let Q=T.$ref;if(T=Ax.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Q),T instanceof Ax.SchemaEnv&&(T=T.schema),T===void 0)throw new jD.default(i.opts.uriResolver,i.baseId,Q)}let U=(f=T?.properties)===null||f===void 0?void 0:f[a];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(m||b(T)),v(U,C)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return h;function b({required:C}){return Array.isArray(C)&&C.includes(a)}function v(C,T){if(C.const)k(C.const,T);else if(C.enum)for(let U of C.enum)k(U,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(C,T){if(typeof C!="string"||C in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[C]=T}}}};Xh.default=ZD});var Ox=S((DB,qD)=>{qD.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 tm=S((Se,em)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var FD=Ib(),UD=Ex(),BD=Rx(),Nx=Ox(),HD=["/properties"],Oc="http://json-schema.org/draft-07/schema",Zo=class extends FD.default{_addVocabularies(){super._addVocabularies(),UD.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(BD.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Nx,HD):Nx;this.addMetaSchema(t,Oc,!1),this.refs["http://json-schema.org/schema"]=Oc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Oc)?Oc:void 0)}};Se.Ajv=Zo;em.exports=Se=Zo;em.exports.Ajv=Zo;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Zo;var VD=ts();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return VD.KeywordCxt}});var qo=Y();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return qo._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return qo.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return qo.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return qo.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return qo.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return qo.CodeGen}});var GD=dc();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return GD.default}});var WD=rs();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return WD.default}})});var Ux=S(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.formatNames=_r.fastFormats=_r.fullFormats=void 0;function yr(e,t){return{validate:e,compare:t}}_r.fullFormats={date:yr(Lx,im),time:yr(nm(!0),sm),"date-time":yr(Dx(!0),qx),"iso-time":yr(nm(),Zx),"iso-date-time":yr(Dx(),Fx),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:ej,"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:aj,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:tj,int32:{type:"number",validate:oj},int64:{type:"number",validate:ij},float:{type:"number",validate:Mx},double:{type:"number",validate:Mx},password:!0,binary:!0};_r.fastFormats={..._r.fullFormats,date:yr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,im),time:yr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,sm),"date-time":yr(/^\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,qx),"iso-time":yr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Zx),"iso-date-time":yr(/^\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,Fx),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};_r.formatNames=Object.keys(_r.fullFormats);function KD(e){return e%4===0&&(e%100!==0||e%400===0)}var JD=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,YD=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Lx(e){let t=JD.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&&KD(r)?29:YD[n])}function im(e,t){if(e&&t)return e>t?1:e<t?-1:0}var rm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function nm(e){return function(r){let n=rm.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 sm(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 Zx(e,t){if(!(e&&t))return;let r=rm.exec(e),n=rm.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 om=/t|\s/i;function Dx(e){let t=nm(e);return function(n){let o=n.split(om);return o.length===2&&Lx(o[0])&&t(o[1])}}function qx(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function Fx(e,t){if(!(e&&t))return;let[r,n]=e.split(om),[o,i]=t.split(om),s=im(r,o);if(s!==void 0)return s||sm(n,i)}var QD=/\/|:/,XD=/^(?:[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 ej(e){return QD.test(e)&&XD.test(e)}var jx=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function tj(e){return jx.lastIndex=0,jx.test(e)}var rj=-(2**31),nj=2**31-1;function oj(e){return Number.isInteger(e)&&e<=nj&&e>=rj}function ij(e){return Number.isInteger(e)}function Mx(){return!0}var sj=/[^\\]\\Z/;function aj(e){if(sj.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Bx=S(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.formatLimitDefinition=void 0;var cj=tm(),rr=Y(),ln=rr.operators,Nc={formatMaximum:{okStr:"<=",ok:ln.LTE,fail:ln.GT},formatMinimum:{okStr:">=",ok:ln.GTE,fail:ln.LT},formatExclusiveMaximum:{okStr:"<",ok:ln.LT,fail:ln.GTE},formatExclusiveMinimum:{okStr:">",ok:ln.GT,fail:ln.LTE}},uj={message:({keyword:e,schemaCode:t})=>(0,rr.str)`should be ${Nc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,rr._)`{comparison: ${Nc[e].okStr}, limit: ${t}}`};Fo.formatLimitDefinition={keyword:Object.keys(Nc),type:"string",schemaType:"string",$data:!0,error:uj,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 cj.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}),f=t.const("fmt",(0,rr._)`${d}[${c.schemaCode}]`);e.fail$data((0,rr.or)((0,rr._)`typeof ${f} != "object"`,(0,rr._)`${f} instanceof RegExp`,(0,rr._)`typeof ${f}.compare != "function"`,l(f)))}function p(){let d=c.schema,f=a.formats[d];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let h=t.scopeValue("formats",{key:d,ref:f,code:s.code.formats?(0,rr._)`${s.code.formats}${(0,rr.getProperty)(d)}`:void 0});e.fail$data(l(h))}function l(d){return(0,rr._)`${d}.compare(${r}, ${n}) ${Nc[o].fail} 0`}},dependencies:["format"]};var lj=e=>(e.addKeyword(Fo.formatLimitDefinition),e);Fo.default=lj});var Wx=S((gs,Gx)=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Uo=Ux(),pj=Bx(),am=Y(),Hx=new am.Name("fullFormats"),dj=new am.Name("fastFormats"),cm=(e,t={keywords:!0})=>{if(Array.isArray(t))return Vx(e,t,Uo.fullFormats,Hx),e;let[r,n]=t.mode==="fast"?[Uo.fastFormats,dj]:[Uo.fullFormats,Hx],o=t.formats||Uo.formatNames;return Vx(e,o,r,n),t.keywords&&(0,pj.default)(e),e};cm.get=(e,t="full")=>{let n=(t==="fast"?Uo.fastFormats:Uo.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function Vx(e,t,r,n){var o,i;(o=(i=e.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,am._)`require("ajv-formats/dist/formats").${n}`);for(let s of t)e.addFormat(s,r[s])}Gx.exports=gs=cm;Object.defineProperty(gs,"__esModule",{value:!0});gs.default=cm});function fj(){let e=new Kx.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Jx.default)(e),e}var Kx,Jx,Dc,Yx=_(()=>{Kx=st(tm(),1),Jx=st(Wx(),1);Dc=class{constructor(t){this._ajv=t??fj()}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 jc,Qx=_(()=>{jc=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 Xx(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 ew(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 tw=_(()=>{});var Mc,rw=_(()=>{u0();Zi();Yx();Ci();Qx();tw();Mc=class extends Xa{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Li.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 Dc,this.setRequestHandler(xd,n=>this._oninitialize(n)),this.setNotificationHandler(wd,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Ed,async(n,o)=>{let i=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=n.params,a=Li.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new jc(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=c0(this._capabilities,t)}setRequestHandler(t,r){let o=Qr(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(Nt(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=Yr(Po,c);if(!p.success){let h=p.error instanceof Error?p.error.message:String(p.error);throw new O(L.InvalidParams,`Invalid tools/call request: ${h}`)}let{params:l}=p.data,d=await Promise.resolve(r(c,u));if(l.task){let h=Yr($o,d);if(!h.success){let m=h.error instanceof Error?h.error.message:String(h.error);throw new O(L.InvalidParams,`Invalid task creation result: ${m}`)}return h.data}let f=Yr(Za,d);if(!f.success){let h=f.error instanceof Error?f.error.message:String(f.error);throw new O(L.InvalidParams,`Invalid tools/call result: ${h}`)}return f.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){ew(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Xx(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:cv.includes(r)?r:gd,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Sa)}async createMessage(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},zd,r):this.request({method:"sampling/createMessage",params:t},Id,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},qa,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},qa,r);if(i.action==="accept"&&i.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(i.content);if(!a.valid)throw new O(L.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof O?s:new O(L.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},Ad,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"})}}});function um(e){return!!e&&typeof e=="object"&&ow in e}function iw(e){return e[ow]?.complete}var ow,nw,sw=_(()=>{ow=Symbol.for("mcp.completable");(function(e){e.Completable="McpCompletable"})(nw||(nw={}))});var Lc,aw=_(()=>{Lc=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}}});function mj(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"),!hj.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 gj(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 lm(e){let t=mj(e);return gj(e,t.warnings),t.isValid}var hj,cw=_(()=>{hj=/^[A-Za-z0-9._-]{1,128}$/});var Zc,uw=_(()=>{Zc=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 pe=_(()=>{Ws();Ws()});function dw(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function _j(e){return"_def"in e||"_zod"in e||dw(e)}function pm(e){return typeof e!="object"||e===null||_j(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(dw)}function lw(e){if(e)return pm(e)?qn(e):e}function vj(e){let t=Qr(e);return t?Object.entries(t).map(([r,n])=>{let o=O_(n),i=N_(n);return{name:r,description:o,required:!i}}):[]}function pn(e){let r=Qr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=_a(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function pw(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var qc,_s,yj,ys,fw=_(()=>{rw();Ci();gf();Zi();sw();aw();cw();uw();pe();qc=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 Mc(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Zc(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(La)),this.server.assertCanSetRequestHandler(pn(Po)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(La,()=>({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=ko(r.inputSchema);return o?ff(o,{strictUnions:!0,pipeStrategy:"input"}):yj})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=ko(r.outputSchema);o&&(n.outputSchema=ff(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(Po,async(t,r)=>{try{let n=this._registeredTools[t.params.name];if(!n)throw new O(L.InvalidParams,`Tool ${t.params.name} not found`);if(!n.enabled)throw new O(L.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 O(L.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!o)throw new O(L.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 O&&n.code===L.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=ko(t.inputSchema)??t.inputSchema,s=await ga(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=ya(a);throw new O(L.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 O(L.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=ko(t.outputSchema),i=await ga(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=ya(s);throw new O(L.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 O(L.InternalError,`Task ${c} not found during polling`);u=l}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(pn(Fa)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Fa,async t=>{switch(t.params.ref.type){case"ref/prompt":return Sv(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return $v(t),this.handleResourceCompletion(t,t.params.ref);default:throw new O(L.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let n=this._registeredPrompts[r.name];if(!n)throw new O(L.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return ys;let i=Qr(n.argsSchema)?.[t.params.argument.name];if(!um(i))return ys;let s=iw(i);if(!s)return ys;let a=await s(t.params.argument.value,t.params.context);return pw(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 ys;throw new O(L.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(t.params.argument.name);if(!o)return ys;let i=await o(t.params.argument.value,t.params.context);return pw(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(Oa)),this.server.assertCanSetRequestHandler(pn(Na)),this.server.assertCanSetRequestHandler(pn(Da)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Oa,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(Na,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler(Da,async(t,r)=>{let n=new URL(t.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new O(L.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 O(L.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(pn(ja)),this.server.assertCanSetRequestHandler(pn(Ma)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(ja,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?vj(r.argsSchema):void 0}))})),this.server.setRequestHandler(Ma,async(t,r)=>{let n=this._registeredPrompts[t.params.name];if(!n)throw new O(L.InvalidParams,`Prompt ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${t.params.name} disabled`);if(n.argsSchema){let o=ko(n.argsSchema),i=await ga(o,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=ya(c);throw new O(L.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:qn(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=qn(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 gt?c._def?.innerType:c;return um(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,n,o,i,s,a,c,u){lm(t);let p={title:r,description:n,inputSchema:lw(o),outputSchema:lw(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"&&lm(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=qn(l.paramsSchema)),typeof l.outputSchema<"u"&&(p.outputSchema=qn(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];pm(c)?(o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!pm(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()}},_s=class{constructor(t,r){this._callbacks=r,this._uriTemplate=typeof t=="string"?new Lc(t):t}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(t){return this._callbacks.complete?.[t]}},yj={type:"object",properties:{}};ys={completion:{values:[],hasMore:!1}}});function bj(e){return gv.parse(JSON.parse(e))}function hw(e){return JSON.stringify(e)+`
40
40
  `}var Fc,mw=_(()=>{Zi();Fc=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
41
- `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),bj(r)}clear(){this._buffer=void 0}}});var dm,Uc,gw=_(()=>{dm=st(require("node:process"),1);mw();Uc=class{constructor(t=dm.default.stdin,r=dm.default.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new Fc,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=hw(t);this._stdout.write(n)?r():this._stdout.once("drain",r)})}}});function Rw(e){return typeof e>"u"||e===null}function xj(e){return typeof e=="object"&&e!==null}function wj(e){return Array.isArray(e)?e:Rw(e)?[]:[e]}function kj(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 Sj(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function $j(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function Aw(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+=`
41
+ `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),bj(r)}clear(){this._buffer=void 0}}});var dm,Uc,gw=_(()=>{dm=st(require("node:process"),1);mw();Uc=class{constructor(t=dm.default.stdin,r=dm.default.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new Fc,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=hw(t);this._stdout.write(n)?r():this._stdout.once("drain",r)})}}});function Aw(e){return typeof e>"u"||e===null}function xj(e){return typeof e=="object"&&e!==null}function wj(e){return Array.isArray(e)?e:Aw(e)?[]:[e]}function kj(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 Sj(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function $j(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function Rw(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+=`
42
42
 
43
- `+e.mark.snippet),n+" "+r):n}function bs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Aw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function fm(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 hm(e,t){return Ze.repeat(" ",t-e.length)+e}function Rj(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=fm(e.buffer,n[s-c],o[s-c],e.position-(n[s]-n[s-c]),l),a=Ze.repeat(" ",t.indent)+hm((e.line-c+1).toString(),p)+" | "+u.str+`
43
+ `+e.mark.snippet),n+" "+r):n}function bs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Rw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function fm(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 hm(e,t){return Ze.repeat(" ",t-e.length)+e}function Aj(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=fm(e.buffer,n[s-c],o[s-c],e.position-(n[s]-n[s-c]),l),a=Ze.repeat(" ",t.indent)+hm((e.line-c+1).toString(),p)+" | "+u.str+`
44
44
  `+a;for(u=fm(e.buffer,n[s],o[s],e.position,l),a+=Ze.repeat(" ",t.indent)+hm((e.line+1).toString(),p)+" | "+u.str+`
45
45
  `,a+=Ze.repeat("-",t.indent+p+3+u.pos)+`^
46
46
  `,c=1;c<=t.linesAfter&&!(s+c>=o.length);c++)u=fm(e.buffer,n[s+c],o[s+c],e.position-(n[s]-n[s+c]),l),a+=Ze.repeat(" ",t.indent)+hm((e.line+c+1).toString(),p)+" | "+u.str+`
47
- `;return a.replace(/\n$/,"")}function Dj(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function jj(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Oj.indexOf(r)===-1)throw new dt('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=Dj(t.styleAliases||null),Nj.indexOf(this.kind)===-1)throw new dt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function yw(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 Mj(){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 gm(e){return this.extend(e)}function Lj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Zj(){return null}function qj(e){return e===null}function Fj(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 Uj(e){return e==="true"||e==="True"||e==="TRUE"}function Bj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Vj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Hj(e){return 48<=e&&e<=55}function Gj(e){return 48<=e&&e<=57}function Wj(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(!Vj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Hj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!Gj(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function Kj(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 Jj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ze.isNegativeZero(e)}function Qj(e){return!(e===null||!Yj.test(e)||e[e.length-1]==="_")}function Xj(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)}function t3(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(Ze.isNegativeZero(e))return"-0.0";return r=e.toString(10),e3.test(r)?r.replace("e",".e"):r}function r3(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ze.isNegativeZero(e))}function n3(e){return e===null?!1:Vw.exec(e)!==null||Hw.exec(e)!==null}function o3(e){var t,r,n,o,i,s,a,c=0,u=null,p,l,d;if(t=Vw.exec(e),t===null&&(t=Hw.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 i3(e){return e.toISOString()}function s3(e){return e==="<<"||e===null}function a3(e){if(e===null)return!1;var t,r,n=0,o=e.length,i=xm;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 c3(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=xm,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 u3(e){var t="",r=0,n,o,i=e.length,s=xm;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 l3(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function f3(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,d3.call(o)!=="[object Object]")return!1;for(i in o)if(p3.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 h3(e){return e!==null?e:[]}function g3(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],m3.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;i[t]=[o[0],n[o[0]]]}return!0}function y3(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}function v3(e){if(e===null)return!0;var t,r=e;for(t in r)if(_3.call(r,t)&&r[t]!==null)return!1;return!0}function b3(e){return e!==null?e:{}}function vw(e){return Object.prototype.toString.call(e)}function vr(e){return e===10||e===13}function Xn(e){return e===9||e===32}function kt(e){return e===9||e===32||e===10||e===13}function Vo(e){return e===44||e===91||e===93||e===123||e===125}function $3(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function T3(e){return e===120?2:e===117?4:e===85?8:0}function P3(e){return 48<=e&&e<=57?e-48:-1}function bw(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
48
- `: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 C3(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function nk(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function E3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||wm,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 sk(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=Aj(r),new dt(t,r)}function j(e,t){throw sk(e,t)}function Hc(e,t){e.onWarning&&e.onWarning.call(null,sk(e,t))}function dn(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||j(e,"expected valid JSON character");else w3.test(a)&&j(e,"the stream contains non-printable characters");e.result+=a}}function ww(e,t,r,n){var o,i,s,a;for(Ze.isObject(r)||j(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],fn.call(t,i)||(nk(t,i,r[i]),n[i]=!0)}function Ho(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])&&j(e,"nested arrays are not supported inside keys"),typeof o=="object"&&vw(o[u])==="[object Object]"&&(o[u]="[object Object]");if(typeof o=="object"&&vw(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)ww(e,t,i[u],r);else ww(e,t,i,r);else!e.json&&!fn.call(r,o)&&fn.call(t,o)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,j(e,"duplicated mapping key")),nk(t,o,i),delete r[o];return t}function km(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++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function je(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Xn(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(vr(o))for(km(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&&Hc(e,"deficient indentation"),n}function Kc(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||kt(r)))}function Sm(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ze.repeat(`
49
- `,t-1))}function I3(e,t,r){var n,o,i,s,a,c,u,p,l=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),kt(f)||Vo(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(o=e.input.charCodeAt(e.position+1),kt(o)||r&&Vo(o)))return!1;for(e.kind="scalar",e.result="",i=s=e.position,a=!1;f!==0;){if(f===58){if(o=e.input.charCodeAt(e.position+1),kt(o)||r&&Vo(o))break}else if(f===35){if(n=e.input.charCodeAt(e.position-1),kt(n))break}else{if(e.position===e.lineStart&&Kc(e)||r&&Vo(f))break;if(vr(f))if(c=e.line,u=e.lineStart,p=e.lineIndent,je(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=p;break}}a&&(dn(e,i,s,!1),Sm(e,e.line-c),i=s=e.position,a=!1),Xn(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return dn(e,i,s,!1),e.result?!0:(e.kind=l,e.result=d,!1)}function z3(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(dn(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 vr(r)?(dn(e,n,o,!0),Sm(e,je(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Kc(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function R3(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 dn(e,r,e.position,!0),e.position++,!0;if(a===92){if(dn(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),vr(a))je(e,!1,t);else if(a<256&&ok[a])e.result+=ik[a],e.position++;else if((s=T3(a))>0){for(o=s,i=0;o>0;o--)a=e.input.charCodeAt(++e.position),(s=$3(a))>=0?i=(i<<4)+s:j(e,"expected hexadecimal character");e.result+=C3(i),e.position++}else j(e,"unknown escape sequence");r=n=e.position}else vr(a)?(dn(e,r,n,!0),Sm(e,je(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Kc(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function A3(e,t){var r=!0,n,o,i,s=e.tag,a,c=e.anchor,u,p,l,d,f,h=Object.create(null),g,y,b,v;if(v=e.input.charCodeAt(e.position),v===91)p=93,f=!1,a=[];else if(v===123)p=125,f=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),v=e.input.charCodeAt(++e.position);v!==0;){if(je(e,!0,t),v=e.input.charCodeAt(e.position),v===p)return e.position++,e.tag=s,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=a,!0;r?v===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),y=g=b=null,l=d=!1,v===63&&(u=e.input.charCodeAt(e.position+1),kt(u)&&(l=d=!0,e.position++,je(e,!0,t))),n=e.line,o=e.lineStart,i=e.position,Go(e,t,Bc,!1,!0),y=e.tag,g=e.result,je(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===n)&&v===58&&(l=!0,v=e.input.charCodeAt(++e.position),je(e,!0,t),Go(e,t,Bc,!1,!0),b=e.result),f?Ho(e,a,h,y,g,b,n,o,i):l?a.push(Ho(e,null,h,y,g,b,n,o,i)):a.push(g),je(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(r=!0,v=e.input.charCodeAt(++e.position)):r=!1}j(e,"unexpected end of the stream within a flow collection")}function O3(e,t){var r,n,o=mm,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)mm===o?o=l===43?_w:x3:j(e,"repeat of a chomping mode identifier");else if((p=P3(l))>=0)p===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?j(e,"repeat of an indentation width identifier"):(a=t+p-1,s=!0);else break;if(Xn(l)){do l=e.input.charCodeAt(++e.position);while(Xn(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!vr(l)&&l!==0)}for(;l!==0;){for(km(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),vr(l)){c++;continue}if(e.lineIndent<a){o===_w?e.result+=Ze.repeat(`
47
+ `;return a.replace(/\n$/,"")}function Dj(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function jj(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Oj.indexOf(r)===-1)throw new dt('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=Dj(t.styleAliases||null),Nj.indexOf(this.kind)===-1)throw new dt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function yw(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 Mj(){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 gm(e){return this.extend(e)}function Lj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Zj(){return null}function qj(e){return e===null}function Fj(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 Uj(e){return e==="true"||e==="True"||e==="TRUE"}function Bj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Hj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Vj(e){return 48<=e&&e<=55}function Gj(e){return 48<=e&&e<=57}function Wj(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(!Hj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Vj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!Gj(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function Kj(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 Jj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ze.isNegativeZero(e)}function Qj(e){return!(e===null||!Yj.test(e)||e[e.length-1]==="_")}function Xj(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)}function t3(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(Ze.isNegativeZero(e))return"-0.0";return r=e.toString(10),e3.test(r)?r.replace("e",".e"):r}function r3(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ze.isNegativeZero(e))}function n3(e){return e===null?!1:Hw.exec(e)!==null||Vw.exec(e)!==null}function o3(e){var t,r,n,o,i,s,a,c=0,u=null,p,l,d;if(t=Hw.exec(e),t===null&&(t=Vw.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 i3(e){return e.toISOString()}function s3(e){return e==="<<"||e===null}function a3(e){if(e===null)return!1;var t,r,n=0,o=e.length,i=xm;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 c3(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=xm,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 u3(e){var t="",r=0,n,o,i=e.length,s=xm;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 l3(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function f3(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,d3.call(o)!=="[object Object]")return!1;for(i in o)if(p3.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 h3(e){return e!==null?e:[]}function g3(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],m3.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;i[t]=[o[0],n[o[0]]]}return!0}function y3(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}function v3(e){if(e===null)return!0;var t,r=e;for(t in r)if(_3.call(r,t)&&r[t]!==null)return!1;return!0}function b3(e){return e!==null?e:{}}function vw(e){return Object.prototype.toString.call(e)}function vr(e){return e===10||e===13}function Xn(e){return e===9||e===32}function kt(e){return e===9||e===32||e===10||e===13}function Ho(e){return e===44||e===91||e===93||e===123||e===125}function $3(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function T3(e){return e===120?2:e===117?4:e===85?8:0}function P3(e){return 48<=e&&e<=57?e-48:-1}function bw(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
48
+ `: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 C3(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function nk(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function E3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||wm,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 sk(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=Rj(r),new dt(t,r)}function j(e,t){throw sk(e,t)}function Vc(e,t){e.onWarning&&e.onWarning.call(null,sk(e,t))}function dn(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||j(e,"expected valid JSON character");else w3.test(a)&&j(e,"the stream contains non-printable characters");e.result+=a}}function ww(e,t,r,n){var o,i,s,a;for(Ze.isObject(r)||j(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],fn.call(t,i)||(nk(t,i,r[i]),n[i]=!0)}function Vo(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])&&j(e,"nested arrays are not supported inside keys"),typeof o=="object"&&vw(o[u])==="[object Object]"&&(o[u]="[object Object]");if(typeof o=="object"&&vw(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)ww(e,t,i[u],r);else ww(e,t,i,r);else!e.json&&!fn.call(r,o)&&fn.call(t,o)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,j(e,"duplicated mapping key")),nk(t,o,i),delete r[o];return t}function km(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++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function je(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Xn(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(vr(o))for(km(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&&Vc(e,"deficient indentation"),n}function Kc(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||kt(r)))}function Sm(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ze.repeat(`
49
+ `,t-1))}function I3(e,t,r){var n,o,i,s,a,c,u,p,l=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),kt(f)||Ho(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(o=e.input.charCodeAt(e.position+1),kt(o)||r&&Ho(o)))return!1;for(e.kind="scalar",e.result="",i=s=e.position,a=!1;f!==0;){if(f===58){if(o=e.input.charCodeAt(e.position+1),kt(o)||r&&Ho(o))break}else if(f===35){if(n=e.input.charCodeAt(e.position-1),kt(n))break}else{if(e.position===e.lineStart&&Kc(e)||r&&Ho(f))break;if(vr(f))if(c=e.line,u=e.lineStart,p=e.lineIndent,je(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=p;break}}a&&(dn(e,i,s,!1),Sm(e,e.line-c),i=s=e.position,a=!1),Xn(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return dn(e,i,s,!1),e.result?!0:(e.kind=l,e.result=d,!1)}function z3(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(dn(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 vr(r)?(dn(e,n,o,!0),Sm(e,je(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Kc(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function A3(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 dn(e,r,e.position,!0),e.position++,!0;if(a===92){if(dn(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),vr(a))je(e,!1,t);else if(a<256&&ok[a])e.result+=ik[a],e.position++;else if((s=T3(a))>0){for(o=s,i=0;o>0;o--)a=e.input.charCodeAt(++e.position),(s=$3(a))>=0?i=(i<<4)+s:j(e,"expected hexadecimal character");e.result+=C3(i),e.position++}else j(e,"unknown escape sequence");r=n=e.position}else vr(a)?(dn(e,r,n,!0),Sm(e,je(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Kc(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function R3(e,t){var r=!0,n,o,i,s=e.tag,a,c=e.anchor,u,p,l,d,f,h=Object.create(null),m,y,b,v;if(v=e.input.charCodeAt(e.position),v===91)p=93,f=!1,a=[];else if(v===123)p=125,f=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),v=e.input.charCodeAt(++e.position);v!==0;){if(je(e,!0,t),v=e.input.charCodeAt(e.position),v===p)return e.position++,e.tag=s,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=a,!0;r?v===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),y=m=b=null,l=d=!1,v===63&&(u=e.input.charCodeAt(e.position+1),kt(u)&&(l=d=!0,e.position++,je(e,!0,t))),n=e.line,o=e.lineStart,i=e.position,Go(e,t,Bc,!1,!0),y=e.tag,m=e.result,je(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===n)&&v===58&&(l=!0,v=e.input.charCodeAt(++e.position),je(e,!0,t),Go(e,t,Bc,!1,!0),b=e.result),f?Vo(e,a,h,y,m,b,n,o,i):l?a.push(Vo(e,null,h,y,m,b,n,o,i)):a.push(m),je(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(r=!0,v=e.input.charCodeAt(++e.position)):r=!1}j(e,"unexpected end of the stream within a flow collection")}function O3(e,t){var r,n,o=mm,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)mm===o?o=l===43?_w:x3:j(e,"repeat of a chomping mode identifier");else if((p=P3(l))>=0)p===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?j(e,"repeat of an indentation width identifier"):(a=t+p-1,s=!0);else break;if(Xn(l)){do l=e.input.charCodeAt(++e.position);while(Xn(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!vr(l)&&l!==0)}for(;l!==0;){for(km(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),vr(l)){c++;continue}if(e.lineIndent<a){o===_w?e.result+=Ze.repeat(`
50
50
  `,i?1+c:c):o===mm&&i&&(e.result+=`
51
51
  `);break}for(n?Xn(l)?(u=!0,e.result+=Ze.repeat(`
52
52
  `,i?1+c:c)):u?(u=!1,e.result+=Ze.repeat(`
53
53
  `,c+1)):c===0?i&&(e.result+=" "):e.result+=Ze.repeat(`
54
54
  `,c):e.result+=Ze.repeat(`
55
- `,i?1+c:c),i=!0,s=!0,c=0,r=e.position;!vr(l)&&l!==0;)l=e.input.charCodeAt(++e.position);dn(e,r,e.position,!1)}return!0}function kw(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,j(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!kt(s))));){if(a=!0,e.position++,je(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Go(e,t,ek,!1,!0),i.push(e.result),je(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)j(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 N3(e,t,r){var n,o,i,s,a,c,u=e.tag,p=e.anchor,l={},d=Object.create(null),f=null,h=null,g=null,y=!1,b=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),v=e.input.charCodeAt(e.position);v!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,(v===63||v===58)&&kt(n))v===63?(y&&(Ho(e,l,d,f,h,null,s,a,c),f=h=g=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(s=e.line,a=e.lineStart,c=e.position,!Go(e,r,Xw,!1,!0))break;if(e.line===i){for(v=e.input.charCodeAt(e.position);Xn(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),kt(v)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ho(e,l,d,f,h,null,s,a,c),f=h=g=null),b=!0,y=!1,o=!1,f=e.tag,h=e.result;else if(b)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(b)j(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),Go(e,t,Vc,!0,o)&&(y?h=e.result:g=e.result),y||(Ho(e,l,d,f,h,g,s,a,c),f=h=g=null),je(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&v!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ho(e,l,d,f,h,null,s,a,c),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=l),b}function D3(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&&j(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)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!kt(s);)s===33&&(n?j(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),tk.test(o)||j(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),S3.test(i)&&j(e,"tag suffix cannot contain flow indicator characters")}i&&!rk.test(i)&&j(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{j(e,"tag name is malformed: "+i)}return r?e.tag=i:fn.call(e.tagMap,o)?e.tag=e.tagMap[o]+i:o==="!"?e.tag="!"+i:o==="!!"?e.tag="tag:yaml.org,2002:"+i:j(e,'undeclared tag handle "'+o+'"'),!0}function j3(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!kt(r)&&!Vo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function M3(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&&!kt(n)&&!Vo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),fn.call(e.anchorMap,r)||j(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],je(e,!0,-1),!0}function Go(e,t,r,n,o){var i,s,a,c=1,u=!1,p=!1,l,d,f,h,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=s=a=Vc===r||ek===r,n&&je(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;D3(e)||j3(e);)je(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||Vc===r)&&(Bc===r||Xw===r?g=t:g=t+1,y=e.position-e.lineStart,c===1?a&&(kw(e,y)||N3(e,y,g))||A3(e,g)?p=!0:(s&&O3(e,g)||z3(e,g)||R3(e,g)?p=!0:M3(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&j(e,"alias node should not have any properties")):I3(e,g,Bc===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=a&&kw(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"&&j(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,d=e.implicitTypes.length;l<d;l+=1)if(h=e.implicitTypes[l],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(fn.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,f=e.typeMap.multi[e.kind||"fallback"],l=0,d=f.length;l<d;l+=1)if(e.tag.slice(0,f[l].tag.length)===f[l].tag){h=f[l];break}h||j(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):j(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 L3(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&&(je(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&&!kt(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&j(e,"directive name must not be less than one character in length");s!==0;){for(;Xn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!vr(s));break}if(vr(s))break;for(r=e.position;s!==0&&!kt(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}s!==0&&km(e),fn.call(xw,n)?xw[n](e,n,o):Hc(e,'unknown document directive "'+n+'"')}if(je(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,je(e,!0,-1)):i&&j(e,"directives end mark is expected"),Go(e,e.lineIndent-1,Vc,!1,!0),je(e,!0,-1),e.checkLineBreaks&&k3.test(e.input.slice(t,e.position))&&Hc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Kc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,je(e,!0,-1));return}if(e.position<e.length-1)j(e,"end of the stream or a document separator is expected");else return}function ak(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
55
+ `,i?1+c:c),i=!0,s=!0,c=0,r=e.position;!vr(l)&&l!==0;)l=e.input.charCodeAt(++e.position);dn(e,r,e.position,!1)}return!0}function kw(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,j(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!kt(s))));){if(a=!0,e.position++,je(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Go(e,t,ek,!1,!0),i.push(e.result),je(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)j(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 N3(e,t,r){var n,o,i,s,a,c,u=e.tag,p=e.anchor,l={},d=Object.create(null),f=null,h=null,m=null,y=!1,b=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),v=e.input.charCodeAt(e.position);v!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,(v===63||v===58)&&kt(n))v===63?(y&&(Vo(e,l,d,f,h,null,s,a,c),f=h=m=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(s=e.line,a=e.lineStart,c=e.position,!Go(e,r,Xw,!1,!0))break;if(e.line===i){for(v=e.input.charCodeAt(e.position);Xn(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),kt(v)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Vo(e,l,d,f,h,null,s,a,c),f=h=m=null),b=!0,y=!1,o=!1,f=e.tag,h=e.result;else if(b)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(b)j(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),Go(e,t,Hc,!0,o)&&(y?h=e.result:m=e.result),y||(Vo(e,l,d,f,h,m,s,a,c),f=h=m=null),je(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&v!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Vo(e,l,d,f,h,null,s,a,c),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=l),b}function D3(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&&j(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)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!kt(s);)s===33&&(n?j(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),tk.test(o)||j(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),S3.test(i)&&j(e,"tag suffix cannot contain flow indicator characters")}i&&!rk.test(i)&&j(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{j(e,"tag name is malformed: "+i)}return r?e.tag=i:fn.call(e.tagMap,o)?e.tag=e.tagMap[o]+i:o==="!"?e.tag="!"+i:o==="!!"?e.tag="tag:yaml.org,2002:"+i:j(e,'undeclared tag handle "'+o+'"'),!0}function j3(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!kt(r)&&!Ho(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function M3(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&&!kt(n)&&!Ho(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),fn.call(e.anchorMap,r)||j(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],je(e,!0,-1),!0}function Go(e,t,r,n,o){var i,s,a,c=1,u=!1,p=!1,l,d,f,h,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=Hc===r||ek===r,n&&je(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;D3(e)||j3(e);)je(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||Hc===r)&&(Bc===r||Xw===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?a&&(kw(e,y)||N3(e,y,m))||R3(e,m)?p=!0:(s&&O3(e,m)||z3(e,m)||A3(e,m)?p=!0:M3(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&j(e,"alias node should not have any properties")):I3(e,m,Bc===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=a&&kw(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"&&j(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,d=e.implicitTypes.length;l<d;l+=1)if(h=e.implicitTypes[l],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(fn.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,f=e.typeMap.multi[e.kind||"fallback"],l=0,d=f.length;l<d;l+=1)if(e.tag.slice(0,f[l].tag.length)===f[l].tag){h=f[l];break}h||j(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):j(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 L3(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&&(je(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&&!kt(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&j(e,"directive name must not be less than one character in length");s!==0;){for(;Xn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!vr(s));break}if(vr(s))break;for(r=e.position;s!==0&&!kt(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}s!==0&&km(e),fn.call(xw,n)?xw[n](e,n,o):Vc(e,'unknown document directive "'+n+'"')}if(je(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,je(e,!0,-1)):i&&j(e,"directives end mark is expected"),Go(e,e.lineIndent-1,Hc,!1,!0),je(e,!0,-1),e.checkLineBreaks&&k3.test(e.input.slice(t,e.position))&&Vc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Kc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,je(e,!0,-1));return}if(e.position<e.length-1)j(e,"end of the stream or a document separator is expected");else return}function ak(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
56
56
  `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new E3(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,j(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;)L3(r);return r.documents}function Z3(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=ak(e,r);if(typeof t!="function")return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])}function q3(e,t){var r=ak(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new dt("expected a single document in the stream, but found more")}}function cM(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&&lk.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[s]=a;return r}function uM(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 dt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ze.repeat("0",n-t.length)+t}function pM(e){this.schema=e.schema||wm,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ze.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=cM(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==='"'?ws:lM,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 Sw(e,t){for(var r=Ze.repeat(" ",t),n=0,o=-1,i="",s,a=e.length;n<a;)o=e.indexOf(`
57
57
  `,n),o===-1?(s=e.slice(n),n=a):(s=e.slice(n,o+1),n=o+1),s.length&&s!==`
58
58
  `&&(i+=r),i+=s;return i}function _m(e,t){return`
59
- `+Ze.repeat(" ",e.indent*t)}function dM(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 Wc(e){return e===H3||e===B3}function ks(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==$m||65536<=e&&e<=1114111}function $w(e){return ks(e)&&e!==$m&&e!==V3&&e!==xs}function Tw(e,t,r){var n=$w(e),o=n&&!Wc(e);return(r?n:n&&e!==pk&&e!==dk&&e!==fk&&e!==hk&&e!==mk)&&e!==ym&&!(t===Gc&&!o)||$w(t)&&!Wc(t)&&e===ym||t===Gc&&o}function fM(e){return ks(e)&&e!==$m&&!Wc(e)&&e!==X3&&e!==rM&&e!==Gc&&e!==pk&&e!==dk&&e!==fk&&e!==hk&&e!==mk&&e!==ym&&e!==J3&&e!==Q3&&e!==G3&&e!==iM&&e!==eM&&e!==tM&&e!==Y3&&e!==W3&&e!==K3&&e!==nM&&e!==oM}function hM(e){return!Wc(e)&&e!==Gc}function vs(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 gk(e){var t=/^\n* /;return t.test(e)}function mM(e,t,r,n,o,i,s,a){var c,u=0,p=null,l=!1,d=!1,f=n!==-1,h=-1,g=fM(vs(e,0))&&hM(vs(e,e.length-1));if(t||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=vs(e,c),!ks(u))return Bo;g=g&&Tw(u,p,a),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=vs(e,c),u===xs)l=!0,f&&(d=d||c-h-1>n&&e[h+1]!==" ",h=c);else if(!ks(u))return Bo;g=g&&Tw(u,p,a),p=u}d=d||f&&c-h-1>n&&e[h+1]!==" "}return!l&&!d?g&&!s&&!o(e)?yk:i===ws?Bo:vm:r>9&&gk(e)?Bo:s?i===ws?Bo:vm:d?vk:_k}function gM(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===ws?'""':"''";if(!e.noCompatMode&&(sM.indexOf(t)!==-1||aM.test(t)))return e.quotingType===ws?'"'+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 dM(e,u)}switch(mM(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,o)){case yk:return t;case vm:return"'"+t.replace(/'/g,"''")+"'";case _k:return"|"+Pw(t,e.indent)+Cw(Sw(t,i));case vk:return">"+Pw(t,e.indent)+Cw(Sw(yM(t,s),i));case Bo:return'"'+_M(t)+'"';default:throw new dt("impossible error: invalid scalar style")}})()}function Pw(e,t){var r=gk(e)?String(t):"",n=e[e.length-1]===`
59
+ `+Ze.repeat(" ",e.indent*t)}function dM(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 Wc(e){return e===V3||e===B3}function ks(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==$m||65536<=e&&e<=1114111}function $w(e){return ks(e)&&e!==$m&&e!==H3&&e!==xs}function Tw(e,t,r){var n=$w(e),o=n&&!Wc(e);return(r?n:n&&e!==pk&&e!==dk&&e!==fk&&e!==hk&&e!==mk)&&e!==ym&&!(t===Gc&&!o)||$w(t)&&!Wc(t)&&e===ym||t===Gc&&o}function fM(e){return ks(e)&&e!==$m&&!Wc(e)&&e!==X3&&e!==rM&&e!==Gc&&e!==pk&&e!==dk&&e!==fk&&e!==hk&&e!==mk&&e!==ym&&e!==J3&&e!==Q3&&e!==G3&&e!==iM&&e!==eM&&e!==tM&&e!==Y3&&e!==W3&&e!==K3&&e!==nM&&e!==oM}function hM(e){return!Wc(e)&&e!==Gc}function vs(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 gk(e){var t=/^\n* /;return t.test(e)}function mM(e,t,r,n,o,i,s,a){var c,u=0,p=null,l=!1,d=!1,f=n!==-1,h=-1,m=fM(vs(e,0))&&hM(vs(e,e.length-1));if(t||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=vs(e,c),!ks(u))return Bo;m=m&&Tw(u,p,a),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=vs(e,c),u===xs)l=!0,f&&(d=d||c-h-1>n&&e[h+1]!==" ",h=c);else if(!ks(u))return Bo;m=m&&Tw(u,p,a),p=u}d=d||f&&c-h-1>n&&e[h+1]!==" "}return!l&&!d?m&&!s&&!o(e)?yk:i===ws?Bo:vm:r>9&&gk(e)?Bo:s?i===ws?Bo:vm:d?vk:_k}function gM(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===ws?'""':"''";if(!e.noCompatMode&&(sM.indexOf(t)!==-1||aM.test(t)))return e.quotingType===ws?'"'+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 dM(e,u)}switch(mM(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,o)){case yk:return t;case vm:return"'"+t.replace(/'/g,"''")+"'";case _k:return"|"+Pw(t,e.indent)+Cw(Sw(t,i));case vk:return">"+Pw(t,e.indent)+Cw(Sw(yM(t,s),i));case Bo:return'"'+_M(t)+'"';default:throw new dt("impossible error: invalid scalar style")}})()}function Pw(e,t){var r=gk(e)?String(t):"",n=e[e.length-1]===`
60
60
  `,o=n&&(e[e.length-2]===`
61
61
  `||e===`
62
62
  `),i=o?"+":n?"":"-";return r+i+`
@@ -67,18 +67,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
67
67
  `:"")+Ew(c,t),o=i}return n}function Ew(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+=`
68
68
  `+e.slice(o,i),o=i+1),s=a;return c+=`
69
69
  `,e.length-o>t&&s>o?c+=e.slice(o,s)+`
70
- `+e.slice(s+1):c+=e.slice(o),c.slice(1)}function _M(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=vs(e,o),n=nt[r],!n&&ks(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||uM(r);return t}function vM(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)),(Ar(e,t,a,!1,!1)||typeof a>"u"&&Ar(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Iw(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)),(Ar(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Ar(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=_m(e,t)),e.dump&&xs===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function bM(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)),Ar(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ar(e,t,u,!1,!1)&&(p+=e.dump,n+=p));e.tag=o,e.dump="{"+n+"}"}function xM(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 dt("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)d="",(!n||o!=="")&&(d+=_m(e,t)),u=s[a],p=r[u],e.replacer&&(p=e.replacer.call(r,u,p)),Ar(e,t+1,u,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&xs===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,l&&(d+=_m(e,t)),Ar(e,t+1,p,!0,l)&&(e.dump&&xs===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,o+=d));e.tag=i,e.dump=o||"{}"}function zw(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,uk.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(lk.call(a.represent,c))n=a.represent[c](t,c);else throw new dt("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function Ar(e,t,r,n,o,i,s){e.tag=null,e.dump=r,zw(e,r,!1)||zw(e,r,!0);var a=uk.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?(xM(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(bM(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?Iw(e,t-1,e.dump,o):Iw(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(vM(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&gM(e,e.dump,t,i,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new dt("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 wM(e,t){var r=[],n=[],o,i;for(bm(e,r,n),o=0,i=n.length;o<i;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(i)}function bm(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)bm(e[o],t,r);else for(n=Object.keys(e),o=0,i=n.length;o<i;o+=1)bm(e[n[o]],t,r)}function kM(e,t){t=t||{};var r=new pM(t);r.noRefs||wM(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ar(r,0,n,!0,!0)?r.dump+`
71
- `:""}function Tm(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 Tj,Pj,Cj,Ej,Ij,zj,Ze,dt,Aj,Oj,Nj,Ke,Ow,Nw,Dw,jw,Mw,Lw,Zw,qw,Yj,e3,Fw,Uw,Bw,Vw,Hw,Gw,Ww,xm,Kw,p3,d3,Jw,m3,Yw,_3,Qw,wm,fn,Bc,Xw,ek,Vc,mm,x3,_w,w3,k3,S3,tk,rk,ok,ik,Qn,xw,F3,U3,ck,uk,lk,$m,B3,xs,V3,H3,G3,W3,ym,K3,J3,Y3,Q3,pk,X3,Gc,eM,tM,rM,nM,dk,fk,oM,hk,iM,mk,nt,sM,aM,lM,ws,yk,vm,_k,vk,Bo,SM,$M,TM,PM,CM,EM,IM,zM,RM,AM,OM,NM,DM,jM,MM,LM,hn,Pm=_(()=>{Tj=Rw,Pj=xj,Cj=wj,Ej=Sj,Ij=$j,zj=kj,Ze={isNothing:Tj,isObject:Pj,toArray:Cj,repeat:Ej,isNegativeZero:Ij,extend:zj};bs.prototype=Object.create(Error.prototype);bs.prototype.constructor=bs;bs.prototype.toString=function(t){return this.name+": "+Aw(this,t)};dt=bs;Aj=Rj,Oj=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Nj=["scalar","sequence","mapping"];Ke=jj;gm.prototype.extend=function(t){var r=[],n=[];if(t instanceof Ke)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 dt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof Ke))throw new dt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new dt("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 dt("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 Ke))throw new dt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(gm.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=yw(o,"implicit"),o.compiledExplicit=yw(o,"explicit"),o.compiledTypeMap=Mj(o.compiledImplicit,o.compiledExplicit),o};Ow=gm,Nw=new Ke("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Dw=new Ke("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),jw=new Ke("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mw=new Ow({explicit:[Nw,Dw,jw]});Lw=new Ke("tag:yaml.org,2002:null",{kind:"scalar",resolve:Lj,construct:Zj,predicate:qj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});Zw=new Ke("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Fj,construct:Uj,predicate:Bj,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});qw=new Ke("tag:yaml.org,2002:int",{kind:"scalar",resolve:Wj,construct:Kj,predicate:Jj,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"]}}),Yj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");e3=/^[-+]?[0-9]+e/;Fw=new Ke("tag:yaml.org,2002:float",{kind:"scalar",resolve:Qj,construct:Xj,predicate:r3,represent:t3,defaultStyle:"lowercase"}),Uw=Mw.extend({implicit:[Lw,Zw,qw,Fw]}),Bw=Uw,Vw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Hw=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]))?))?$");Gw=new Ke("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n3,construct:o3,instanceOf:Date,represent:i3});Ww=new Ke("tag:yaml.org,2002:merge",{kind:"scalar",resolve:s3}),xm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
72
- \r`;Kw=new Ke("tag:yaml.org,2002:binary",{kind:"scalar",resolve:a3,construct:c3,predicate:l3,represent:u3}),p3=Object.prototype.hasOwnProperty,d3=Object.prototype.toString;Jw=new Ke("tag:yaml.org,2002:omap",{kind:"sequence",resolve:f3,construct:h3}),m3=Object.prototype.toString;Yw=new Ke("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:g3,construct:y3}),_3=Object.prototype.hasOwnProperty;Qw=new Ke("tag:yaml.org,2002:set",{kind:"mapping",resolve:v3,construct:b3}),wm=Bw.extend({implicit:[Gw,Ww],explicit:[Kw,Jw,Yw,Qw]}),fn=Object.prototype.hasOwnProperty,Bc=1,Xw=2,ek=3,Vc=4,mm=1,x3=2,_w=3,w3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k3=/[\x85\u2028\u2029]/,S3=/[,\[\]\{\}]/,tk=/^(?:!|!!|![a-z\-]+!)$/i,rk=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;ok=new Array(256),ik=new Array(256);for(Qn=0;Qn<256;Qn++)ok[Qn]=bw(Qn)?1:0,ik[Qn]=bw(Qn);xw={YAML:function(t,r,n){var o,i,s;t.version!==null&&j(t,"duplication of %YAML directive"),n.length!==1&&j(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&j(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&j(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Hc(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,i;n.length!==2&&j(t,"TAG directive accepts exactly two arguments"),o=n[0],i=n[1],tk.test(o)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),fn.call(t.tagMap,o)&&j(t,'there is a previously declared suffix for "'+o+'" tag handle'),rk.test(i)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{j(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i}};F3=Z3,U3=q3,ck={loadAll:F3,load:U3},uk=Object.prototype.toString,lk=Object.prototype.hasOwnProperty,$m=65279,B3=9,xs=10,V3=13,H3=32,G3=33,W3=34,ym=35,K3=37,J3=38,Y3=39,Q3=42,pk=44,X3=45,Gc=58,eM=61,tM=62,rM=63,nM=64,dk=91,fk=93,oM=96,hk=123,iM=124,mk=125,nt={};nt[0]="\\0";nt[7]="\\a";nt[8]="\\b";nt[9]="\\t";nt[10]="\\n";nt[11]="\\v";nt[12]="\\f";nt[13]="\\r";nt[27]="\\e";nt[34]='\\"';nt[92]="\\\\";nt[133]="\\N";nt[160]="\\_";nt[8232]="\\L";nt[8233]="\\P";sM=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],aM=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;lM=1,ws=2;yk=1,vm=2,_k=3,vk=4,Bo=5;SM=kM,$M={dump:SM};TM=Ke,PM=Ow,CM=Mw,EM=Uw,IM=Bw,zM=wm,RM=ck.load,AM=ck.loadAll,OM=$M.dump,NM=dt,DM={binary:Kw,float:Fw,map:jw,null:Lw,pairs:Yw,set:Qw,timestamp:Gw,bool:Zw,int:qw,merge:Ww,omap:Jw,seq:Dw,str:Nw},jM=Tm("safeLoad","load"),MM=Tm("safeLoadAll","loadAll"),LM=Tm("safeDump","dump"),hn={Type:TM,Schema:PM,FAILSAFE_SCHEMA:CM,JSON_SCHEMA:EM,CORE_SCHEMA:IM,DEFAULT_SCHEMA:zM,load:RM,loadAll:AM,dump:OM,YAMLException:NM,types:DM,safeLoad:jM,safeLoadAll:MM,safeDump:LM}});var ZM,qM,FM,UM,BM,VM,bk,xk,wk=_(()=>{"use strict";pe();ZM=m.object({id:m.string(),label:m.string(),name:m.string(),mindset_template:m.string().optional()}),qM=m.object({name:m.string(),root_dir:m.string().default("frontend"),build_command:m.string(),package_manager:m.string().default("pnpm"),mindset_template:m.string().optional()}),FM=m.object({name:m.string(),root_dir:m.string().default("backend"),architecture:m.string(),dependency_direction:m.string(),package_manager:m.string().default("uv"),mindset_template:m.string().optional()}),UM=m.object({frontend:m.string().optional(),backend:m.string().optional(),preflight_command:m.string().default("pnpm preflight"),summary:m.string().default("format/lint/typecheck/build")}),BM=m.object({name:m.string(),description:m.string(),runtime:m.enum(["python","node","unknown"]).default("unknown"),setup_hint:m.string().optional(),enabled:m.boolean().default(!0)}),VM=m.object({id:m.string(),label:m.string(),category:m.enum(["frontend","backend","testing","infra","devtool","monitoring"]),description:m.string(),url:m.string().optional(),guidance:m.string().optional()}),bk=m.object({name:m.string(),description:m.string().optional(),stacks:m.array(ZM),frontend:qM.optional(),backend:FM.optional(),quality_gate:UM.optional(),vendor:m.array(BM).optional(),tools:m.array(VM).optional()}),xk=m.object({license_key:m.string().min(1,"license_key \u306F\u5FC5\u9808\u3067\u3059"),stack_profile:m.string().optional(),components:m.array(m.string().min(1,"\u7A7A\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u540D\u306F\u7121\u52B9\u3067\u3059")).optional(),language:m.string().default("en"),registry_url:m.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 kk(e){let t=e??process.env.GODD_CONFIG;if(!t)throw new Error(`${Ut} \u306E\u30D1\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3092\u8A2D\u5B9A\u3059\u308B\u304B\u3001\u660E\u793A\u7684\u306B\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);if(!(0,Wo.existsSync)(t))throw new Error(`${Ut} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${t}
73
- GODD_CONFIG \u74B0\u5883\u5909\u6570\u307E\u305F\u306F .cursor/mcp.json \u306E env.GODD_CONFIG \u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);let r=(0,Wo.readFileSync)(t,"utf-8"),n=hn.load(r);return xk.parse(n)}function GM(e){let t=hn.load(e);return bk.parse(t)}function Cm(e,t){if(!HM.test(e))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\u304C\u4E0D\u6B63\u3067\u3059: '${e}' \u2014 \u82F1\u6570\u5B57\u30FB\u30CF\u30A4\u30D5\u30F3\u30FB\u30C9\u30C3\u30C8\u30FB\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\u306E\u307F\u4F7F\u7528\u53EF\u80FD\u3067\u3059\u3002`);let r=t??(0,Ss.join)(process.cwd(),"stacks"),n=(0,Ss.resolve)(r,`${e}.yaml`);if(!n.startsWith((0,Ss.resolve)(r)))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9\u304C\u4E0D\u6B63\u3067\u3059: '${e}'`);if(!(0,Wo.existsSync)(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=(0,Wo.readFileSync)(n,"utf-8");return GM(o)}var Wo,Ss,HM,Ut,Em=_(()=>{"use strict";Wo=require("node:fs"),Ss=require("node:path");Pm();wk();HM=/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/,Ut="config.godd"});function Ne(e){return e instanceof Error?e.message:String(e)}var Ko=_(()=>{"use strict"});var ft=S(It=>{"use strict";It.__esModule=!0;It.extend=Sk;It.indexOf=QM;It.escapeExpression=XM;It.isEmpty=eL;It.createFrame=tL;It.blockParams=rL;It.appendContextPath=nL;var WM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},KM=/[&<>"'`=]/g,JM=/[&<>"'`=]/;function YM(e){return WM[e]}function Sk(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 zm=Object.prototype.toString;It.toString=zm;var Im=function(t){return typeof t=="function"};Im(/x/)&&(It.isFunction=Im=function(e){return typeof e=="function"&&zm.call(e)==="[object Function]"});It.isFunction=Im;var $k=Array.isArray||function(e){return e&&typeof e=="object"?zm.call(e)==="[object Array]":!1};It.isArray=$k;function QM(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function XM(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return JM.test(e)?e.replace(KM,YM):e}function eL(e){return!e&&e!==0?!0:!!($k(e)&&e.length===0)}function tL(e){var t=Sk({},e);return t._parent=e,t}function rL(e,t){return e.path=t,e}function nL(e,t){return(e?e+".":"")+t}});var Bt=S((Jc,Tk)=>{"use strict";Jc.__esModule=!0;var Rm=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Am(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<Rm.length;c++)this[Rm[c]]=a[Rm[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Am);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{}}Am.prototype=new Error;Jc.default=Am;Tk.exports=Jc.default});var Ck=S((Yc,Pk)=>{"use strict";Yc.__esModule=!0;var Om=ft();Yc.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(Om.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=Om.createFrame(r.data);i.contextPath=Om.appendContextPath(r.data.contextPath,r.name),r={data:i}}return o(t,r)})};Pk.exports=Yc.default});var Ik=S((Qc,Ek)=>{"use strict";Qc.__esModule=!0;function oL(e){return e&&e.__esModule?e:{default:e}}var $s=ft(),iL=Bt(),sL=oL(iL);Qc.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new sL.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=$s.appendContextPath(r.data.contextPath,r.ids[0])+"."),$s.isFunction(t)&&(t=t.call(this)),r.data&&(a=$s.createFrame(r.data));function u(h,g,y){a&&(a.key=h,a.index=g,a.first=g===0,a.last=!!y,c&&(a.contextPath=c+h)),s=s+n(t[h],{data:a,blockParams:$s.blockParams([t[h],h],[c+h,null])})}if(t&&typeof t=="object")if($s.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](),f=d.next();!f.done;f=d.next())l.push(f.value);t=l;for(var p=t.length;i<p;i++)u(i,i,i===t.length-1)}else(function(){var h=void 0;Object.keys(t).forEach(function(g){h!==void 0&&u(h,i-1),h=g,i++}),h!==void 0&&u(h,i-1,!0)})();return i===0&&(s=o(this)),s})};Ek.exports=Qc.default});var Rk=S((Xc,zk)=>{"use strict";Xc.__esModule=!0;function aL(e){return e&&e.__esModule?e:{default:e}}var cL=Bt(),uL=aL(cL);Xc.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new uL.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};zk.exports=Xc.default});var Dk=S((eu,Nk)=>{"use strict";eu.__esModule=!0;function lL(e){return e&&e.__esModule?e:{default:e}}var Ak=ft(),pL=Bt(),Ok=lL(pL);eu.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new Ok.default("#if requires exactly one argument");return Ak.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||Ak.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new Ok.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Nk.exports=eu.default});var Mk=S((tu,jk)=>{"use strict";tu.__esModule=!0;tu.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)})};jk.exports=tu.default});var Zk=S((ru,Lk)=>{"use strict";ru.__esModule=!0;ru.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};Lk.exports=ru.default});var Fk=S((nu,qk)=>{"use strict";nu.__esModule=!0;function dL(e){return e&&e.__esModule?e:{default:e}}var Ts=ft(),fL=Bt(),hL=dL(fL);nu.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new hL.default("#with requires exactly one argument");Ts.isFunction(t)&&(t=t.call(this));var n=r.fn;if(Ts.isEmpty(t))return r.inverse(this);var o=r.data;return r.data&&r.ids&&(o=Ts.createFrame(r.data),o.contextPath=Ts.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:o,blockParams:Ts.blockParams([t],[o&&o.contextPath])})})};qk.exports=nu.default});var Nm=S(ou=>{"use strict";ou.__esModule=!0;ou.registerDefaultHelpers=EL;ou.moveHelperToHooks=IL;function eo(e){return e&&e.__esModule?e:{default:e}}var mL=Ck(),gL=eo(mL),yL=Ik(),_L=eo(yL),vL=Rk(),bL=eo(vL),xL=Dk(),wL=eo(xL),kL=Mk(),SL=eo(kL),$L=Zk(),TL=eo($L),PL=Fk(),CL=eo(PL);function EL(e){gL.default(e),_L.default(e),bL.default(e),wL.default(e),SL.default(e),TL.default(e),CL.default(e)}function IL(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}});var Bk=S((iu,Uk)=>{"use strict";iu.__esModule=!0;var zL=ft();iu.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=zL.extend({},c,r.partials);var u=t(s,a);return n.partials=c,u}),r.partials[o.args[0]]=o.fn,i})};Uk.exports=iu.default});var Vk=S(Dm=>{"use strict";Dm.__esModule=!0;Dm.registerDefaultDecorators=NL;function RL(e){return e&&e.__esModule?e:{default:e}}var AL=Bk(),OL=RL(AL);function NL(e){OL.default(e)}});var jm=S((su,Hk)=>{"use strict";su.__esModule=!0;var DL=ft(),Jo={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=DL.indexOf(Jo.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=Jo.lookupLevel(t),typeof console<"u"&&Jo.lookupLevel(Jo.level)<=t){var r=Jo.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)}}};su.default=Jo;Hk.exports=su.default});var Gk=S(Mm=>{"use strict";Mm.__esModule=!0;Mm.createNewLookupObject=ML;var jL=ft();function ML(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return jL.extend.apply(void 0,[Object.create(null)].concat(t))}});var Lm=S(Ps=>{"use strict";Ps.__esModule=!0;Ps.createProtoAccessControl=FL;Ps.resultIsAllowed=UL;Ps.resetLoggedProperties=VL;function LL(e){return e&&e.__esModule?e:{default:e}}var Wk=Gk(),ZL=jm(),qL=LL(ZL),au=Object.create(null);function FL(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:Wk.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Wk.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function UL(e,t,r){return Kk(typeof e=="function"?t.methods:t.properties,r)}function Kk(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(BL(t),!1)}function BL(e){au[e]!==!0&&(au[e]=!0,qL.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
70
+ `+e.slice(s+1):c+=e.slice(o),c.slice(1)}function _M(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=vs(e,o),n=ot[r],!n&&ks(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||uM(r);return t}function vM(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)),(Rr(e,t,a,!1,!1)||typeof a>"u"&&Rr(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Iw(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)),(Rr(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Rr(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=_m(e,t)),e.dump&&xs===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function bM(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)),Rr(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Rr(e,t,u,!1,!1)&&(p+=e.dump,n+=p));e.tag=o,e.dump="{"+n+"}"}function xM(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 dt("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)d="",(!n||o!=="")&&(d+=_m(e,t)),u=s[a],p=r[u],e.replacer&&(p=e.replacer.call(r,u,p)),Rr(e,t+1,u,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&xs===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,l&&(d+=_m(e,t)),Rr(e,t+1,p,!0,l)&&(e.dump&&xs===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,o+=d));e.tag=i,e.dump=o||"{}"}function zw(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,uk.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(lk.call(a.represent,c))n=a.represent[c](t,c);else throw new dt("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function Rr(e,t,r,n,o,i,s){e.tag=null,e.dump=r,zw(e,r,!1)||zw(e,r,!0);var a=uk.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?(xM(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(bM(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?Iw(e,t-1,e.dump,o):Iw(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(vM(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&gM(e,e.dump,t,i,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new dt("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 wM(e,t){var r=[],n=[],o,i;for(bm(e,r,n),o=0,i=n.length;o<i;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(i)}function bm(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)bm(e[o],t,r);else for(n=Object.keys(e),o=0,i=n.length;o<i;o+=1)bm(e[n[o]],t,r)}function kM(e,t){t=t||{};var r=new pM(t);r.noRefs||wM(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Rr(r,0,n,!0,!0)?r.dump+`
71
+ `:""}function Tm(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 Tj,Pj,Cj,Ej,Ij,zj,Ze,dt,Rj,Oj,Nj,Je,Ow,Nw,Dw,jw,Mw,Lw,Zw,qw,Yj,e3,Fw,Uw,Bw,Hw,Vw,Gw,Ww,xm,Kw,p3,d3,Jw,m3,Yw,_3,Qw,wm,fn,Bc,Xw,ek,Hc,mm,x3,_w,w3,k3,S3,tk,rk,ok,ik,Qn,xw,F3,U3,ck,uk,lk,$m,B3,xs,H3,V3,G3,W3,ym,K3,J3,Y3,Q3,pk,X3,Gc,eM,tM,rM,nM,dk,fk,oM,hk,iM,mk,ot,sM,aM,lM,ws,yk,vm,_k,vk,Bo,SM,$M,TM,PM,CM,EM,IM,zM,AM,RM,OM,NM,DM,jM,MM,LM,hn,Pm=_(()=>{Tj=Aw,Pj=xj,Cj=wj,Ej=Sj,Ij=$j,zj=kj,Ze={isNothing:Tj,isObject:Pj,toArray:Cj,repeat:Ej,isNegativeZero:Ij,extend:zj};bs.prototype=Object.create(Error.prototype);bs.prototype.constructor=bs;bs.prototype.toString=function(t){return this.name+": "+Rw(this,t)};dt=bs;Rj=Aj,Oj=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Nj=["scalar","sequence","mapping"];Je=jj;gm.prototype.extend=function(t){var r=[],n=[];if(t instanceof Je)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 dt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof Je))throw new dt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new dt("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 dt("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 Je))throw new dt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(gm.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=yw(o,"implicit"),o.compiledExplicit=yw(o,"explicit"),o.compiledTypeMap=Mj(o.compiledImplicit,o.compiledExplicit),o};Ow=gm,Nw=new Je("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Dw=new Je("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),jw=new Je("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mw=new Ow({explicit:[Nw,Dw,jw]});Lw=new Je("tag:yaml.org,2002:null",{kind:"scalar",resolve:Lj,construct:Zj,predicate:qj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});Zw=new Je("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Fj,construct:Uj,predicate:Bj,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});qw=new Je("tag:yaml.org,2002:int",{kind:"scalar",resolve:Wj,construct:Kj,predicate:Jj,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"]}}),Yj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");e3=/^[-+]?[0-9]+e/;Fw=new Je("tag:yaml.org,2002:float",{kind:"scalar",resolve:Qj,construct:Xj,predicate:r3,represent:t3,defaultStyle:"lowercase"}),Uw=Mw.extend({implicit:[Lw,Zw,qw,Fw]}),Bw=Uw,Hw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Vw=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]))?))?$");Gw=new Je("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n3,construct:o3,instanceOf:Date,represent:i3});Ww=new Je("tag:yaml.org,2002:merge",{kind:"scalar",resolve:s3}),xm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
72
+ \r`;Kw=new Je("tag:yaml.org,2002:binary",{kind:"scalar",resolve:a3,construct:c3,predicate:l3,represent:u3}),p3=Object.prototype.hasOwnProperty,d3=Object.prototype.toString;Jw=new Je("tag:yaml.org,2002:omap",{kind:"sequence",resolve:f3,construct:h3}),m3=Object.prototype.toString;Yw=new Je("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:g3,construct:y3}),_3=Object.prototype.hasOwnProperty;Qw=new Je("tag:yaml.org,2002:set",{kind:"mapping",resolve:v3,construct:b3}),wm=Bw.extend({implicit:[Gw,Ww],explicit:[Kw,Jw,Yw,Qw]}),fn=Object.prototype.hasOwnProperty,Bc=1,Xw=2,ek=3,Hc=4,mm=1,x3=2,_w=3,w3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k3=/[\x85\u2028\u2029]/,S3=/[,\[\]\{\}]/,tk=/^(?:!|!!|![a-z\-]+!)$/i,rk=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;ok=new Array(256),ik=new Array(256);for(Qn=0;Qn<256;Qn++)ok[Qn]=bw(Qn)?1:0,ik[Qn]=bw(Qn);xw={YAML:function(t,r,n){var o,i,s;t.version!==null&&j(t,"duplication of %YAML directive"),n.length!==1&&j(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&j(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&j(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Vc(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,i;n.length!==2&&j(t,"TAG directive accepts exactly two arguments"),o=n[0],i=n[1],tk.test(o)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),fn.call(t.tagMap,o)&&j(t,'there is a previously declared suffix for "'+o+'" tag handle'),rk.test(i)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{j(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i}};F3=Z3,U3=q3,ck={loadAll:F3,load:U3},uk=Object.prototype.toString,lk=Object.prototype.hasOwnProperty,$m=65279,B3=9,xs=10,H3=13,V3=32,G3=33,W3=34,ym=35,K3=37,J3=38,Y3=39,Q3=42,pk=44,X3=45,Gc=58,eM=61,tM=62,rM=63,nM=64,dk=91,fk=93,oM=96,hk=123,iM=124,mk=125,ot={};ot[0]="\\0";ot[7]="\\a";ot[8]="\\b";ot[9]="\\t";ot[10]="\\n";ot[11]="\\v";ot[12]="\\f";ot[13]="\\r";ot[27]="\\e";ot[34]='\\"';ot[92]="\\\\";ot[133]="\\N";ot[160]="\\_";ot[8232]="\\L";ot[8233]="\\P";sM=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],aM=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;lM=1,ws=2;yk=1,vm=2,_k=3,vk=4,Bo=5;SM=kM,$M={dump:SM};TM=Je,PM=Ow,CM=Mw,EM=Uw,IM=Bw,zM=wm,AM=ck.load,RM=ck.loadAll,OM=$M.dump,NM=dt,DM={binary:Kw,float:Fw,map:jw,null:Lw,pairs:Yw,set:Qw,timestamp:Gw,bool:Zw,int:qw,merge:Ww,omap:Jw,seq:Dw,str:Nw},jM=Tm("safeLoad","load"),MM=Tm("safeLoadAll","loadAll"),LM=Tm("safeDump","dump"),hn={Type:TM,Schema:PM,FAILSAFE_SCHEMA:CM,JSON_SCHEMA:EM,CORE_SCHEMA:IM,DEFAULT_SCHEMA:zM,load:AM,loadAll:RM,dump:OM,YAMLException:NM,types:DM,safeLoad:jM,safeLoadAll:MM,safeDump:LM}});var ZM,qM,FM,UM,BM,HM,bk,xk,wk=_(()=>{"use strict";pe();ZM=g.object({id:g.string(),label:g.string(),name:g.string(),mindset_template:g.string().optional()}),qM=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()}),FM=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()}),UM=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")}),BM=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)}),HM=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()}),bk=g.object({name:g.string(),description:g.string().optional(),stacks:g.array(ZM),frontend:qM.optional(),backend:FM.optional(),quality_gate:UM.optional(),vendor:g.array(BM).optional(),tools:g.array(HM).optional()}),xk=g.object({license_key:g.string().min(1,"license_key \u306F\u5FC5\u9808\u3067\u3059"),stack_profile:g.string().optional(),components:g.array(g.string().min(1,"\u7A7A\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u540D\u306F\u7121\u52B9\u3067\u3059")).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 kk(e){let t=e??process.env.GODD_CONFIG;if(!t)throw new Error(`${Ut} \u306E\u30D1\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3092\u8A2D\u5B9A\u3059\u308B\u304B\u3001\u660E\u793A\u7684\u306B\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);if(!(0,Wo.existsSync)(t))throw new Error(`${Ut} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${t}
73
+ GODD_CONFIG \u74B0\u5883\u5909\u6570\u307E\u305F\u306F .cursor/mcp.json \u306E env.GODD_CONFIG \u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);let r=(0,Wo.readFileSync)(t,"utf-8"),n=hn.load(r);return xk.parse(n)}function GM(e){let t=hn.load(e);return bk.parse(t)}function Cm(e,t){if(!VM.test(e))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\u304C\u4E0D\u6B63\u3067\u3059: '${e}' \u2014 \u82F1\u6570\u5B57\u30FB\u30CF\u30A4\u30D5\u30F3\u30FB\u30C9\u30C3\u30C8\u30FB\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\u306E\u307F\u4F7F\u7528\u53EF\u80FD\u3067\u3059\u3002`);let r=t??(0,Ss.join)(process.cwd(),"stacks"),n=(0,Ss.resolve)(r,`${e}.yaml`);if(!n.startsWith((0,Ss.resolve)(r)))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9\u304C\u4E0D\u6B63\u3067\u3059: '${e}'`);if(!(0,Wo.existsSync)(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=(0,Wo.readFileSync)(n,"utf-8");return GM(o)}var Wo,Ss,VM,Ut,Em=_(()=>{"use strict";Wo=require("node:fs"),Ss=require("node:path");Pm();wk();VM=/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/,Ut="config.godd"});function Ne(e){return e instanceof Error?e.message:String(e)}var Ko=_(()=>{"use strict"});var ft=S(It=>{"use strict";It.__esModule=!0;It.extend=Sk;It.indexOf=QM;It.escapeExpression=XM;It.isEmpty=eL;It.createFrame=tL;It.blockParams=rL;It.appendContextPath=nL;var WM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},KM=/[&<>"'`=]/g,JM=/[&<>"'`=]/;function YM(e){return WM[e]}function Sk(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 zm=Object.prototype.toString;It.toString=zm;var Im=function(t){return typeof t=="function"};Im(/x/)&&(It.isFunction=Im=function(e){return typeof e=="function"&&zm.call(e)==="[object Function]"});It.isFunction=Im;var $k=Array.isArray||function(e){return e&&typeof e=="object"?zm.call(e)==="[object Array]":!1};It.isArray=$k;function QM(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function XM(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return JM.test(e)?e.replace(KM,YM):e}function eL(e){return!e&&e!==0?!0:!!($k(e)&&e.length===0)}function tL(e){var t=Sk({},e);return t._parent=e,t}function rL(e,t){return e.path=t,e}function nL(e,t){return(e?e+".":"")+t}});var Bt=S((Jc,Tk)=>{"use strict";Jc.__esModule=!0;var Am=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Rm(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<Am.length;c++)this[Am[c]]=a[Am[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Rm);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{}}Rm.prototype=new Error;Jc.default=Rm;Tk.exports=Jc.default});var Ck=S((Yc,Pk)=>{"use strict";Yc.__esModule=!0;var Om=ft();Yc.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(Om.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=Om.createFrame(r.data);i.contextPath=Om.appendContextPath(r.data.contextPath,r.name),r={data:i}}return o(t,r)})};Pk.exports=Yc.default});var Ik=S((Qc,Ek)=>{"use strict";Qc.__esModule=!0;function oL(e){return e&&e.__esModule?e:{default:e}}var $s=ft(),iL=Bt(),sL=oL(iL);Qc.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new sL.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=$s.appendContextPath(r.data.contextPath,r.ids[0])+"."),$s.isFunction(t)&&(t=t.call(this)),r.data&&(a=$s.createFrame(r.data));function u(h,m,y){a&&(a.key=h,a.index=m,a.first=m===0,a.last=!!y,c&&(a.contextPath=c+h)),s=s+n(t[h],{data:a,blockParams:$s.blockParams([t[h],h],[c+h,null])})}if(t&&typeof t=="object")if($s.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](),f=d.next();!f.done;f=d.next())l.push(f.value);t=l;for(var p=t.length;i<p;i++)u(i,i,i===t.length-1)}else(function(){var h=void 0;Object.keys(t).forEach(function(m){h!==void 0&&u(h,i-1),h=m,i++}),h!==void 0&&u(h,i-1,!0)})();return i===0&&(s=o(this)),s})};Ek.exports=Qc.default});var Ak=S((Xc,zk)=>{"use strict";Xc.__esModule=!0;function aL(e){return e&&e.__esModule?e:{default:e}}var cL=Bt(),uL=aL(cL);Xc.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new uL.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};zk.exports=Xc.default});var Dk=S((eu,Nk)=>{"use strict";eu.__esModule=!0;function lL(e){return e&&e.__esModule?e:{default:e}}var Rk=ft(),pL=Bt(),Ok=lL(pL);eu.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new Ok.default("#if requires exactly one argument");return Rk.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||Rk.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new Ok.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Nk.exports=eu.default});var Mk=S((tu,jk)=>{"use strict";tu.__esModule=!0;tu.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)})};jk.exports=tu.default});var Zk=S((ru,Lk)=>{"use strict";ru.__esModule=!0;ru.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};Lk.exports=ru.default});var Fk=S((nu,qk)=>{"use strict";nu.__esModule=!0;function dL(e){return e&&e.__esModule?e:{default:e}}var Ts=ft(),fL=Bt(),hL=dL(fL);nu.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new hL.default("#with requires exactly one argument");Ts.isFunction(t)&&(t=t.call(this));var n=r.fn;if(Ts.isEmpty(t))return r.inverse(this);var o=r.data;return r.data&&r.ids&&(o=Ts.createFrame(r.data),o.contextPath=Ts.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:o,blockParams:Ts.blockParams([t],[o&&o.contextPath])})})};qk.exports=nu.default});var Nm=S(ou=>{"use strict";ou.__esModule=!0;ou.registerDefaultHelpers=EL;ou.moveHelperToHooks=IL;function eo(e){return e&&e.__esModule?e:{default:e}}var mL=Ck(),gL=eo(mL),yL=Ik(),_L=eo(yL),vL=Ak(),bL=eo(vL),xL=Dk(),wL=eo(xL),kL=Mk(),SL=eo(kL),$L=Zk(),TL=eo($L),PL=Fk(),CL=eo(PL);function EL(e){gL.default(e),_L.default(e),bL.default(e),wL.default(e),SL.default(e),TL.default(e),CL.default(e)}function IL(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}});var Bk=S((iu,Uk)=>{"use strict";iu.__esModule=!0;var zL=ft();iu.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=zL.extend({},c,r.partials);var u=t(s,a);return n.partials=c,u}),r.partials[o.args[0]]=o.fn,i})};Uk.exports=iu.default});var Hk=S(Dm=>{"use strict";Dm.__esModule=!0;Dm.registerDefaultDecorators=NL;function AL(e){return e&&e.__esModule?e:{default:e}}var RL=Bk(),OL=AL(RL);function NL(e){OL.default(e)}});var jm=S((su,Vk)=>{"use strict";su.__esModule=!0;var DL=ft(),Jo={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=DL.indexOf(Jo.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=Jo.lookupLevel(t),typeof console<"u"&&Jo.lookupLevel(Jo.level)<=t){var r=Jo.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)}}};su.default=Jo;Vk.exports=su.default});var Gk=S(Mm=>{"use strict";Mm.__esModule=!0;Mm.createNewLookupObject=ML;var jL=ft();function ML(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return jL.extend.apply(void 0,[Object.create(null)].concat(t))}});var Lm=S(Ps=>{"use strict";Ps.__esModule=!0;Ps.createProtoAccessControl=FL;Ps.resultIsAllowed=UL;Ps.resetLoggedProperties=HL;function LL(e){return e&&e.__esModule?e:{default:e}}var Wk=Gk(),ZL=jm(),qL=LL(ZL),au=Object.create(null);function FL(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:Wk.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Wk.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function UL(e,t,r){return Kk(typeof e=="function"?t.methods:t.properties,r)}function Kk(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(BL(t),!1)}function BL(e){au[e]!==!0&&(au[e]=!0,qL.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
74
74
  You can add a runtime option to disable the check or this warning:
75
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function VL(){Object.keys(au).forEach(function(e){delete au[e]})}});var uu=S(br=>{"use strict";br.__esModule=!0;br.HandlebarsEnvironment=Fm;function Jk(e){return e&&e.__esModule?e:{default:e}}var to=ft(),HL=Bt(),Zm=Jk(HL),GL=Nm(),WL=Vk(),KL=jm(),cu=Jk(KL),JL=Lm(),YL="4.7.8";br.VERSION=YL;var QL=8;br.COMPILER_REVISION=QL;var XL=7;br.LAST_COMPATIBLE_COMPILER_REVISION=XL;var e9={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"};br.REVISION_CHANGES=e9;var qm="[object Object]";function Fm(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},GL.registerDefaultHelpers(this),WL.registerDefaultDecorators(this)}Fm.prototype={constructor:Fm,logger:cu.default,log:cu.default.log,registerHelper:function(t,r){if(to.toString.call(t)===qm){if(r)throw new Zm.default("Arg not supported with multiple helpers");to.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(to.toString.call(t)===qm)to.extend(this.partials,t);else{if(typeof r>"u")throw new Zm.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(to.toString.call(t)===qm){if(r)throw new Zm.default("Arg not supported with multiple decorators");to.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){JL.resetLoggedProperties()}};var t9=cu.default.log;br.log=t9;br.createFrame=to.createFrame;br.logger=cu.default});var Qk=S((lu,Yk)=>{"use strict";lu.__esModule=!0;function Um(e){this.string=e}Um.prototype.toString=Um.prototype.toHTML=function(){return""+this.string};lu.default=Um;Yk.exports=lu.default});var Xk=S(Bm=>{"use strict";Bm.__esModule=!0;Bm.wrapHelper=r9;function r9(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 oS=S(mn=>{"use strict";mn.__esModule=!0;mn.checkRevision=c9;mn.template=u9;mn.wrapProgram=pu;mn.resolvePartial=l9;mn.invokePartial=p9;mn.noop=rS;function n9(e){return e&&e.__esModule?e:{default:e}}function o9(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 i9=ft(),Or=o9(i9),s9=Bt(),Nr=n9(s9),Dr=uu(),eS=Nm(),a9=Xk(),tS=Lm();function c9(e){var t=e&&e[0]||1,r=Dr.COMPILER_REVISION;if(!(t>=Dr.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Dr.COMPILER_REVISION))if(t<Dr.LAST_COMPATIBLE_COMPILER_REVISION){var n=Dr.REVISION_CHANGES[r],o=Dr.REVISION_CHANGES[t];throw new Nr.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 Nr.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 u9(e,t){if(!t)throw new Nr.default("No environment passed to template");if(!e||!e.main)throw new Nr.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=Or.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c);var u=Or.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(`
75
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function HL(){Object.keys(au).forEach(function(e){delete au[e]})}});var uu=S(br=>{"use strict";br.__esModule=!0;br.HandlebarsEnvironment=Fm;function Jk(e){return e&&e.__esModule?e:{default:e}}var to=ft(),VL=Bt(),Zm=Jk(VL),GL=Nm(),WL=Hk(),KL=jm(),cu=Jk(KL),JL=Lm(),YL="4.7.8";br.VERSION=YL;var QL=8;br.COMPILER_REVISION=QL;var XL=7;br.LAST_COMPATIBLE_COMPILER_REVISION=XL;var e9={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"};br.REVISION_CHANGES=e9;var qm="[object Object]";function Fm(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},GL.registerDefaultHelpers(this),WL.registerDefaultDecorators(this)}Fm.prototype={constructor:Fm,logger:cu.default,log:cu.default.log,registerHelper:function(t,r){if(to.toString.call(t)===qm){if(r)throw new Zm.default("Arg not supported with multiple helpers");to.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(to.toString.call(t)===qm)to.extend(this.partials,t);else{if(typeof r>"u")throw new Zm.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(to.toString.call(t)===qm){if(r)throw new Zm.default("Arg not supported with multiple decorators");to.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){JL.resetLoggedProperties()}};var t9=cu.default.log;br.log=t9;br.createFrame=to.createFrame;br.logger=cu.default});var Qk=S((lu,Yk)=>{"use strict";lu.__esModule=!0;function Um(e){this.string=e}Um.prototype.toString=Um.prototype.toHTML=function(){return""+this.string};lu.default=Um;Yk.exports=lu.default});var Xk=S(Bm=>{"use strict";Bm.__esModule=!0;Bm.wrapHelper=r9;function r9(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 oS=S(mn=>{"use strict";mn.__esModule=!0;mn.checkRevision=c9;mn.template=u9;mn.wrapProgram=pu;mn.resolvePartial=l9;mn.invokePartial=p9;mn.noop=rS;function n9(e){return e&&e.__esModule?e:{default:e}}function o9(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 i9=ft(),Or=o9(i9),s9=Bt(),Nr=n9(s9),Dr=uu(),eS=Nm(),a9=Xk(),tS=Lm();function c9(e){var t=e&&e[0]||1,r=Dr.COMPILER_REVISION;if(!(t>=Dr.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Dr.COMPILER_REVISION))if(t<Dr.LAST_COMPATIBLE_COMPILER_REVISION){var n=Dr.REVISION_CHANGES[r],o=Dr.REVISION_CHANGES[t];throw new Nr.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 Nr.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 u9(e,t){if(!t)throw new Nr.default("No environment passed to template");if(!e||!e.main)throw new Nr.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=Or.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c);var u=Or.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(`
76
76
  `),d=0,f=l.length;d<f&&!(!l[d]&&d+1===f);d++)l[d]=c.indent+l[d];p=l.join(`
77
- `)}return p}else throw new Nr.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 Nr.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)||tS.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:Or.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],f=this.fn(a);return c||l||p||u?d=pu(this,a,f,c,u,p,l):d||(d=this.programs[a]=pu(this,a,f)),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=Or.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=d9(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=nS(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=Or.extend({},t.helpers,s.helpers);f9(a,o),o.helpers=a,e.usePartial&&(o.partials=o.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=Or.extend({},t.decorators,s.decorators)),o.hooks={},o.protoAccessControl=tS.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;eS.moveHelperToHooks(o,"helperMissing",c),eS.moveHelperToHooks(o,"blockHelperMissing",c)}},i._child=function(s,a,c,u){if(e.useBlockParams&&!c)throw new Nr.default("must pass block params");if(e.useDepths&&!u)throw new Nr.default("must pass parent depths");return pu(o,s,e[s],a,0,c,u)},i}function pu(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=nS(r,a,e,s,n,i),a.program=t,a.depth=s?s.length:0,a.blockParams=o||0,a}function l9(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 p9(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!==rS&&(function(){r.data=Dr.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=Dr.createFrame(c.data),c.data["partial-block"]=n,i(a,c)},i.partials&&(r.partials=Or.extend({},r.partials,i.partials))})(),e===void 0&&o&&(e=o),e===void 0)throw new Nr.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function rS(){return""}function d9(e,t){return(!t||!("root"in t))&&(t=t?Dr.createFrame(t):{},t.root=e),t}function nS(e,t,r,n,o,i){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],o,i,n),Or.extend(t,s)}return t}function f9(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=h9(n,t)})}function h9(e,t){var r=t.lookupProperty;return a9.wrapHelper(e,function(n){return Or.extend({lookupProperty:r},n)})}});var Vm=S((du,iS)=>{"use strict";du.__esModule=!0;du.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}};iS.exports=du.default});var lS=S((fu,uS)=>{"use strict";fu.__esModule=!0;function Gm(e){return e&&e.__esModule?e:{default:e}}function Wm(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 m9=uu(),sS=Wm(m9),g9=Qk(),y9=Gm(g9),_9=Bt(),v9=Gm(_9),b9=ft(),Hm=Wm(b9),x9=oS(),aS=Wm(x9),w9=Vm(),k9=Gm(w9);function cS(){var e=new sS.HandlebarsEnvironment;return Hm.extend(e,sS),e.SafeString=y9.default,e.Exception=v9.default,e.Utils=Hm,e.escapeExpression=Hm.escapeExpression,e.VM=aS,e.template=function(t){return aS.template(t,e)},e}var Cs=cS();Cs.create=cS;k9.default(Cs);Cs.default=Cs;fu.default=Cs;uS.exports=fu.default});var Km=S((hu,dS)=>{"use strict";hu.__esModule=!0;var pS={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&&!pS.helpers.scopedId(t)&&!t.depth}}};hu.default=pS;dS.exports=hu.default});var hS=S((mu,fS)=>{"use strict";mu.__esModule=!0;var S9=(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._$),f=a.prepareProgram([d],u[l-1].loc);f.chained=!0,this.$={strip:u[l-2].strip,program:f,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,f=0,h=2,g=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 b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function v(ar){s.length=s.length-2*ar,a.length=a.length-ar,c.length=c.length-ar}function k(){var ar;return ar=i.lexer.lex()||1,typeof ar!="number"&&(ar=i.symbols_[ar]||ar),ar}for(var C,T,U,Q,Ie,ht,we={},Qe,Rt,li,uo;;){if(U=s[s.length-1],this.defaultActions[U]?Q=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=k()),Q=u[U]&&u[U][C]),typeof Q>"u"||!Q.length||!Q[0]){var Fu="";if(!f){uo=[];for(Qe in u[U])this.terminals_[Qe]&&Qe>2&&uo.push("'"+this.terminals_[Qe]+"'");this.lexer.showPosition?Fu="Parse error on line "+(l+1)+`:
77
+ `)}return p}else throw new Nr.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 Nr.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)||tS.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:Or.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],f=this.fn(a);return c||l||p||u?d=pu(this,a,f,c,u,p,l):d||(d=this.programs[a]=pu(this,a,f)),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=Or.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=d9(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=nS(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=Or.extend({},t.helpers,s.helpers);f9(a,o),o.helpers=a,e.usePartial&&(o.partials=o.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=Or.extend({},t.decorators,s.decorators)),o.hooks={},o.protoAccessControl=tS.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;eS.moveHelperToHooks(o,"helperMissing",c),eS.moveHelperToHooks(o,"blockHelperMissing",c)}},i._child=function(s,a,c,u){if(e.useBlockParams&&!c)throw new Nr.default("must pass block params");if(e.useDepths&&!u)throw new Nr.default("must pass parent depths");return pu(o,s,e[s],a,0,c,u)},i}function pu(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=nS(r,a,e,s,n,i),a.program=t,a.depth=s?s.length:0,a.blockParams=o||0,a}function l9(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 p9(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!==rS&&(function(){r.data=Dr.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=Dr.createFrame(c.data),c.data["partial-block"]=n,i(a,c)},i.partials&&(r.partials=Or.extend({},r.partials,i.partials))})(),e===void 0&&o&&(e=o),e===void 0)throw new Nr.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function rS(){return""}function d9(e,t){return(!t||!("root"in t))&&(t=t?Dr.createFrame(t):{},t.root=e),t}function nS(e,t,r,n,o,i){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],o,i,n),Or.extend(t,s)}return t}function f9(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=h9(n,t)})}function h9(e,t){var r=t.lookupProperty;return a9.wrapHelper(e,function(n){return Or.extend({lookupProperty:r},n)})}});var Hm=S((du,iS)=>{"use strict";du.__esModule=!0;du.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}};iS.exports=du.default});var lS=S((fu,uS)=>{"use strict";fu.__esModule=!0;function Gm(e){return e&&e.__esModule?e:{default:e}}function Wm(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 m9=uu(),sS=Wm(m9),g9=Qk(),y9=Gm(g9),_9=Bt(),v9=Gm(_9),b9=ft(),Vm=Wm(b9),x9=oS(),aS=Wm(x9),w9=Hm(),k9=Gm(w9);function cS(){var e=new sS.HandlebarsEnvironment;return Vm.extend(e,sS),e.SafeString=y9.default,e.Exception=v9.default,e.Utils=Vm,e.escapeExpression=Vm.escapeExpression,e.VM=aS,e.template=function(t){return aS.template(t,e)},e}var Cs=cS();Cs.create=cS;k9.default(Cs);Cs.default=Cs;fu.default=Cs;uS.exports=fu.default});var Km=S((hu,dS)=>{"use strict";hu.__esModule=!0;var pS={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&&!pS.helpers.scopedId(t)&&!t.depth}}};hu.default=pS;dS.exports=hu.default});var hS=S((mu,fS)=>{"use strict";mu.__esModule=!0;var S9=(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._$),f=a.prepareProgram([d],u[l-1].loc);f.chained=!0,this.$={strip:u[l-2].strip,program:f,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,f=0,h=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 b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function v(ar){s.length=s.length-2*ar,a.length=a.length-ar,c.length=c.length-ar}function k(){var ar;return ar=i.lexer.lex()||1,typeof ar!="number"&&(ar=i.symbols_[ar]||ar),ar}for(var C,T,U,Q,Ie,ht,we={},Xe,At,li,uo;;){if(U=s[s.length-1],this.defaultActions[U]?Q=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=k()),Q=u[U]&&u[U][C]),typeof Q>"u"||!Q.length||!Q[0]){var Fu="";if(!f){uo=[];for(Xe in u[U])this.terminals_[Xe]&&Xe>2&&uo.push("'"+this.terminals_[Xe]+"'");this.lexer.showPosition?Fu="Parse error on line "+(l+1)+`:
78
78
  `+this.lexer.showPosition()+`
79
- Expecting `+uo.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Fu="Parse error on line "+(l+1)+": Unexpected "+(C==1?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(Fu,{text:this.lexer.match,token:this.terminals_[C]||C,line:this.lexer.yylineno,loc:y,expected:uo})}}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(Q[0]){case 1:s.push(C),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(Q[1]),C=null,T?(C=T,T=null):(d=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(Rt=this.productions_[Q[1]][1],we.$=a[a.length-Rt],we._$={first_line:c[c.length-(Rt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Rt||1)].first_column,last_column:c[c.length-1].last_column},b&&(we._$.range=[c[c.length-(Rt||1)].range[0],c[c.length-1].range[1]]),ht=this.performAction.call(we,p,d,l,this.yy,Q[1],a,c),typeof ht<"u")return ht;Rt&&(s=s.slice(0,-1*Rt*2),a=a.slice(0,-1*Rt),c=c.slice(0,-1*Rt)),s.push(this.productions_[Q[1]][0]),a.push(we.$),c.push(we._$),li=u[s[s.length-2]][s[s.length-1]],s.push(li);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()+`
79
+ Expecting `+uo.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Fu="Parse error on line "+(l+1)+": Unexpected "+(C==1?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(Fu,{text:this.lexer.match,token:this.terminals_[C]||C,line:this.lexer.yylineno,loc:y,expected:uo})}}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(Q[0]){case 1:s.push(C),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(Q[1]),C=null,T?(C=T,T=null):(d=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(At=this.productions_[Q[1]][1],we.$=a[a.length-At],we._$={first_line:c[c.length-(At||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(At||1)].first_column,last_column:c[c.length-1].last_column},b&&(we._$.range=[c[c.length-(At||1)].range[0],c[c.length-1].range[1]]),ht=this.performAction.call(we,p,d,l,this.yy,Q[1],a,c),typeof ht<"u")return ht;At&&(s=s.slice(0,-1*At*2),a=a.slice(0,-1*At),c=c.slice(0,-1*At)),s.push(this.productions_[Q[1]][0]),a.push(we.$),c.push(we._$),li=u[s[s.length-2]][s[s.length-1]],s.push(li);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()+`
80
80
  `+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.
81
- `+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})();mu.default=S9;fS.exports=mu.default});var vu=S((_u,yS)=>{"use strict";_u.__esModule=!0;function $9(e){return e&&e.__esModule?e:{default:e}}var T9=Bt(),Jm=$9(T9);function gu(){this.parents=[]}gu.prototype={constructor:gu,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!gu.prototype[n.type])throw new Jm.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 Jm.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 Jm.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:yu,Decorator:yu,BlockStatement:mS,DecoratorBlock:mS,PartialStatement:gS,PartialBlockStatement:function(t){gS.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:yu,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 yu(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function mS(e){yu.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function gS(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}_u.default=gu;yS.exports=_u.default});var vS=S((bu,_S)=>{"use strict";bu.__esModule=!0;function P9(e){return e&&e.__esModule?e:{default:e}}var C9=vu(),E9=P9(C9);function xr(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}xr.prototype=new E9.default;xr.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=Ym(n,o,r),u=Qm(n,o,r),p=a.openStandalone&&c,l=a.closeStandalone&&u,d=a.inlineStandalone&&c&&u;a.close&&ro(n,o,!0),a.open&&gn(n,o,!0),t&&d&&(ro(n,o),gn(n,o)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[o-1].original)[1])),t&&p&&(ro((s.program||s.inverse).body),gn(n,o)),t&&l&&(ro(n,o),gn((s.inverse||s.program).body))}}return e};xr.prototype.BlockStatement=xr.prototype.DecoratorBlock=xr.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:Qm(t.body),closeStandalone:Ym((n||t).body)};if(e.openStrip.close&&ro(t.body,null,!0),r){var s=e.inverseStrip;s.open&&gn(t.body,null,!0),s.close&&ro(n.body,null,!0),e.closeStrip.open&&gn(o.body,null,!0),!this.options.ignoreStandalone&&Ym(t.body)&&Qm(n.body)&&(gn(t.body),ro(n.body))}else e.closeStrip.open&&gn(t.body,null,!0);return i};xr.prototype.Decorator=xr.prototype.MustacheStatement=function(e){return e.strip};xr.prototype.PartialStatement=xr.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function Ym(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 Qm(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 ro(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 gn(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}}bu.default=xr;_S.exports=bu.default});var bS=S(Vt=>{"use strict";Vt.__esModule=!0;Vt.SourceLocation=R9;Vt.id=A9;Vt.stripFlags=O9;Vt.stripComment=N9;Vt.preparePath=D9;Vt.prepareMustache=j9;Vt.prepareRawBlock=M9;Vt.prepareBlock=L9;Vt.prepareProgram=Z9;Vt.preparePartialBlock=q9;function I9(e){return e&&e.__esModule?e:{default:e}}var z9=Bt(),Xm=I9(z9);function eg(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new Xm.default(e.path.original+" doesn't match "+t,r)}}function R9(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 A9(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function O9(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function N9(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function D9(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 Xm.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 j9(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 M9(e,t,r,n){eg(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 L9(e,t,r,n,o,i){n&&n.path&&eg(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Xm.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 Z9(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 q9(e,t,r,n){return eg(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 kS=S(Es=>{"use strict";Es.__esModule=!0;Es.parseWithoutProcessing=wS;Es.parse=K9;function F9(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 xS(e){return e&&e.__esModule?e:{default:e}}var U9=hS(),tg=xS(U9),B9=vS(),V9=xS(B9),H9=bS(),G9=F9(H9),W9=ft();Es.parser=tg.default;var xu={};W9.extend(xu,G9);function wS(e,t){if(e.type==="Program")return e;tg.default.yy=xu,xu.locInfo=function(n){return new xu.SourceLocation(t&&t.srcName,n)};var r=tg.default.parse(e);return r}function K9(e,t){var r=wS(e,t),n=new V9.default(t);return n.accept(r)}});var PS=S(As=>{"use strict";As.__esModule=!0;As.Compiler=rg;As.precompile=X9;As.compile=eZ;function $S(e){return e&&e.__esModule?e:{default:e}}var J9=Bt(),zs=$S(J9),Rs=ft(),Y9=Km(),Is=$S(Y9),Q9=[].slice;function rg(){}rg.prototype={compiler:rg,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||!TS(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=Rs.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 zs.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){SS(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 zs.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){SS(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 zs.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,Is.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=Is.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:Q9.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=Is.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),o=!n&&Is.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&&!Is.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&&Rs.indexOf(o,t);if(o&&i>=0)return[r,i]}}};function X9(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new zs.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 eZ(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new zs.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=Rs.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 TS(e,t){if(e===t)return!0;if(Rs.isArray(e)&&Rs.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!TS(e[r],t[r]))return!1;return!0}}function SS(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 ES=S(ng=>{var CS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ng.encode=function(e){if(0<=e&&e<CS.length)return CS[e];throw new TypeError("Must be between 0 and 63: "+e)};ng.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 sg=S(ig=>{var IS=ES(),og=5,zS=1<<og,RS=zS-1,AS=zS;function tZ(e){return e<0?(-e<<1)+1:(e<<1)+0}function rZ(e){var t=(e&1)===1,r=e>>1;return t?-r:r}ig.encode=function(t){var r="",n,o=tZ(t);do n=o&RS,o>>>=og,o>0&&(n|=AS),r+=IS.encode(n);while(o>0);return r};ig.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=IS.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&AS),c&=RS,i=i+(c<<s),s+=og}while(a);n.value=rZ(i),n.rest=r}});var Xo=S(ot=>{function nZ(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}ot.getArg=nZ;var OS=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,oZ=/^data:.+\,.+$/;function Os(e){var t=e.match(OS);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}ot.urlParse=Os;function Yo(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}ot.urlGenerate=Yo;function ag(e){var t=e,r=Os(e);if(r){if(!r.path)return e;t=r.path}for(var n=ot.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,Yo(r)):t}ot.normalize=ag;function NS(e,t){e===""&&(e="."),t===""&&(t=".");var r=Os(t),n=Os(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Yo(r);if(r||t.match(oZ))return t;if(n&&!n.host&&!n.path)return n.host=t,Yo(n);var o=t.charAt(0)==="/"?t:ag(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Yo(n)):o}ot.join=NS;ot.isAbsolute=function(e){return e.charAt(0)==="/"||OS.test(e)};function iZ(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)}ot.relative=iZ;var DS=(function(){var e=Object.create(null);return!("__proto__"in e)})();function jS(e){return e}function sZ(e){return MS(e)?"$"+e:e}ot.toSetString=DS?jS:sZ;function aZ(e){return MS(e)?e.slice(1):e}ot.fromSetString=DS?jS:aZ;function MS(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 cZ(e,t,r){var n=Qo(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:Qo(e.name,t.name)}ot.compareByOriginalPositions=cZ;function uZ(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Qo(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Qo(e.name,t.name)}ot.compareByGeneratedPositionsDeflated=uZ;function Qo(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function lZ(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Qo(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Qo(e.name,t.name)}ot.compareByGeneratedPositionsInflated=lZ;function pZ(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}ot.parseSourceMapInput=pZ;function dZ(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Os(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=NS(Yo(n),t)}return ag(t)}ot.computeSourceURL=dZ});var lg=S(LS=>{var cg=Xo(),ug=Object.prototype.hasOwnProperty,no=typeof Map<"u";function jr(){this._array=[],this._set=no?new Map:Object.create(null)}jr.fromArray=function(t,r){for(var n=new jr,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};jr.prototype.size=function(){return no?this._set.size:Object.getOwnPropertyNames(this._set).length};jr.prototype.add=function(t,r){var n=no?t:cg.toSetString(t),o=no?this.has(t):ug.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(no?this._set.set(t,i):this._set[n]=i)};jr.prototype.has=function(t){if(no)return this._set.has(t);var r=cg.toSetString(t);return ug.call(this._set,r)};jr.prototype.indexOf=function(t){if(no){var r=this._set.get(t);if(r>=0)return r}else{var n=cg.toSetString(t);if(ug.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};jr.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};jr.prototype.toArray=function(){return this._array.slice()};LS.ArraySet=jr});var FS=S(qS=>{var ZS=Xo();function fZ(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||ZS.compareByGeneratedPositionsInflated(e,t)<=0}function wu(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}wu.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};wu.prototype.add=function(t){fZ(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};wu.prototype.toArray=function(){return this._sorted||(this._array.sort(ZS.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};qS.MappingList=wu});var pg=S(US=>{var Ns=sg(),Me=Xo(),ku=lg().ArraySet,hZ=FS().MappingList;function Ht(e){e||(e={}),this._file=Me.getArg(e,"file",null),this._sourceRoot=Me.getArg(e,"sourceRoot",null),this._skipValidation=Me.getArg(e,"skipValidation",!1),this._sources=new ku,this._names=new ku,this._mappings=new hZ,this._sourcesContents=null}Ht.prototype._version=3;Ht.fromSourceMap=function(t){var r=t.sourceRoot,n=new Ht({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=Me.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=Me.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s)}),n};Ht.prototype.addMapping=function(t){var r=Me.getArg(t,"generated"),n=Me.getArg(t,"original",null),o=Me.getArg(t,"source",null),i=Me.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})};Ht.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Me.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Me.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Me.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ht.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=Me.relative(i,o));var s=new ku,a=new ku;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=Me.join(n,c.source)),i!=null&&(c.source=Me.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=Me.join(n,c)),i!=null&&(c=Me.relative(i,c)),this.setSourceContent(c,u))},this)};Ht.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}))}};Ht.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(),f=0,h=d.length;f<h;f++){if(u=d[f],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(f>0){if(!Me.compareByGeneratedPositionsInflated(u,d[f-1]))continue;c+=","}c+=Ns.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(l=this._sources.indexOf(u.source),c+=Ns.encode(l-s),s=l,c+=Ns.encode(u.originalLine-1-o),o=u.originalLine-1,c+=Ns.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(p=this._names.indexOf(u.name),c+=Ns.encode(p-i),i=p)),a+=c}return a};Ht.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Me.relative(r,n));var o=Me.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Ht.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};Ht.prototype.toString=function(){return JSON.stringify(this.toJSON())};US.SourceMapGenerator=Ht});var BS=S(oo=>{oo.GREATEST_LOWER_BOUND=1;oo.LEAST_UPPER_BOUND=2;function dg(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?dg(s,t,r,n,o,i):i==oo.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?dg(e,s,r,n,o,i):i==oo.LEAST_UPPER_BOUND?s:e<0?-1:e}oo.search=function(t,r,n,o){if(r.length===0)return-1;var i=dg(-1,r.length,t,r,n,o||oo.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&n(r[i],r[i-1],!0)===0;)--i;return i}});var HS=S(VS=>{function fg(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function mZ(e,t){return Math.round(e+Math.random()*(t-e))}function hg(e,t,r,n){if(r<n){var o=mZ(r,n),i=r-1;fg(e,o,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(i+=1,fg(e,i,a));fg(e,i+1,a);var c=i+1;hg(e,t,r,c-1),hg(e,t,c+1,n)}}VS.quickSort=function(e,t){hg(e,t,0,e.length-1)}});var WS=S(Su=>{var R=Xo(),mg=BS(),ei=lg().ArraySet,gZ=sg(),Ds=HS().quickSort;function $e(e,t){var r=e;return typeof e=="string"&&(r=R.parseSourceMapInput(e)),r.sections!=null?new nr(r,t):new Je(r,t)}$e.fromSourceMap=function(e,t){return Je.fromSourceMap(e,t)};$e.prototype._version=3;$e.prototype.__generatedMappings=null;Object.defineProperty($e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});$e.prototype.__originalMappings=null;Object.defineProperty($e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});$e.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};$e.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};$e.GENERATED_ORDER=1;$e.ORIGINAL_ORDER=2;$e.GREATEST_LOWER_BOUND=1;$e.LEAST_UPPER_BOUND=2;$e.prototype.eachMapping=function(t,r,n){var o=r||null,i=n||$e.GENERATED_ORDER,s;switch(i){case $e.GENERATED_ORDER:s=this._generatedMappings;break;case $e.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=R.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)};$e.prototype.allGeneratedPositionsFor=function(t){var r=R.getArg(t,"line"),n={source:R.getArg(t,"source"),originalLine:r,originalColumn:R.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",R.compareByOriginalPositions,mg.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:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)o.push({line:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return o};Su.SourceMapConsumer=$e;function Je(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sources"),i=R.getArg(r,"names",[]),s=R.getArg(r,"sourceRoot",null),a=R.getArg(r,"sourcesContent",null),c=R.getArg(r,"mappings"),u=R.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=R.normalize(s)),o=o.map(String).map(R.normalize).map(function(p){return s&&R.isAbsolute(s)&&R.isAbsolute(p)?R.relative(s,p):p}),this._names=ei.fromArray(i.map(String),!0),this._sources=ei.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return R.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}Je.prototype=Object.create($e.prototype);Je.prototype.consumer=$e;Je.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=R.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};Je.fromSourceMap=function(t,r){var n=Object.create(Je.prototype),o=n._names=ei.fromArray(t._names.toArray(),!0),i=n._sources=ei.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(f){return R.computeSourceURL(n.sourceRoot,f,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 GS;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 Ds(n.__originalMappings,R.compareByOriginalPositions),n};Je.prototype._version=3;Object.defineProperty(Je.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function GS(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Je.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={},f=[],h=[],g,y,b,v,k;p<u;)if(t.charAt(p)===";")n++,p++,o=0;else if(t.charAt(p)===",")p++;else{for(g=new GS,g.generatedLine=n,v=p;v<u&&!this._charIsMappingSeparator(t,v);v++);if(y=t.slice(p,v),b=l[y],b)p+=y.length;else{for(b=[];p<v;)gZ.decode(t,p,d),k=d.value,p=d.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");l[y]=b}g.generatedColumn=o+b[0],o=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=i+b[2],i=g.originalLine,g.originalLine+=1,g.originalColumn=s+b[3],s=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),h.push(g),typeof g.originalLine=="number"&&f.push(g)}Ds(h,R.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,Ds(f,R.compareByOriginalPositions),this.__originalMappings=f};Je.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 mg.search(t,r,i,s)};Je.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}};Je.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",R.compareByGeneratedPositionsDeflated,R.getArg(t,"bias",$e.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=R.getArg(o,"source",null);i!==null&&(i=this._sources.at(i),i=R.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=R.getArg(o,"name",null);return s!==null&&(s=this._names.at(s)),{source:i,line:R.getArg(o,"originalLine",null),column:R.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Je.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Je.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=R.relative(this.sourceRoot,o));var i;if(this.sourceRoot!=null&&(i=R.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.')};Je.prototype.generatedPositionFor=function(t){var r=R.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:R.getArg(t,"line"),originalColumn:R.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,R.getArg(t,"bias",$e.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:R.getArg(i,"generatedLine",null),column:R.getArg(i,"generatedColumn",null),lastColumn:R.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Su.BasicSourceMapConsumer=Je;function nr(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new ei,this._names=new ei;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=R.getArg(s,"offset"),c=R.getArg(a,"line"),u=R.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 $e(R.getArg(s,"map"),t)}})}nr.prototype=Object.create($e.prototype);nr.prototype.constructor=$e;nr.prototype._version=3;Object.defineProperty(nr.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}});nr.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=mg.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}};nr.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};nr.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.')};nr.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(R.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}};nr.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=R.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)}Ds(this.__generatedMappings,R.compareByGeneratedPositionsDeflated),Ds(this.__originalMappings,R.compareByOriginalPositions)};Su.IndexedSourceMapConsumer=nr});var JS=S(KS=>{var yZ=pg().SourceMapGenerator,$u=Xo(),_Z=/(\r?\n)/,vZ=10,ti="$$$isSourceNode$$$";function zt(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[ti]=!0,n!=null&&this.add(n)}zt.fromStringWithSourceMap=function(t,r,n){var o=new zt,i=t.split(_Z),s=0,a=function(){var d=h(),f=h()||"";return d+f;function h(){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 f=i[s]||"",h=f.substr(0,d.generatedColumn-u);i[s]=f.substr(d.generatedColumn-u),u=d.generatedColumn,l(p,h),p=d;return}for(;c<d.generatedLine;)o.add(a()),c++;if(u<d.generatedColumn){var f=i[s]||"";o.add(f.substr(0,d.generatedColumn)),i[s]=f.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 f=r.sourceContentFor(d);f!=null&&(n!=null&&(d=$u.join(n,d)),o.setSourceContent(d,f))}),o;function l(d,f){if(d===null||d.source===void 0)o.add(f);else{var h=n?$u.join(n,d.source):d.source;o.add(new zt(d.originalLine,d.originalColumn,h,f,d.name))}}};zt.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[ti]||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};zt.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[ti]||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};zt.prototype.walk=function(t){for(var r,n=0,o=this.children.length;n<o;n++)r=this.children[n],r[ti]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};zt.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};zt.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[ti]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};zt.prototype.setSourceContent=function(t,r){this.sourceContents[$u.toSetString(t)]=r};zt.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][ti]&&this.children[r].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),r=0,n=o.length;r<n;r++)t($u.fromSetString(o[r]),this.sourceContents[o[r]])};zt.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};zt.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new yZ(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)===vZ?(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}};KS.SourceNode=zt});var YS=S(Tu=>{Tu.SourceMapGenerator=pg().SourceMapGenerator;Tu.SourceMapConsumer=WS().SourceMapConsumer;Tu.SourceNode=JS().SourceNode});var t1=S((Pu,e1)=>{"use strict";Pu.__esModule=!0;var yg=ft(),io=void 0;try{(typeof define!="function"||!define.amd)&&(QS=YS(),io=QS.SourceNode)}catch{}var QS;io||(io=function(e,t,r,n){this.src="",n&&this.add(n)},io.prototype={add:function(t){yg.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){yg.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function gg(e,t,r){if(yg.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 XS(e){this.srcFile=e,this.source=[]}XS.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,`
81
+ `+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})();mu.default=S9;fS.exports=mu.default});var vu=S((_u,yS)=>{"use strict";_u.__esModule=!0;function $9(e){return e&&e.__esModule?e:{default:e}}var T9=Bt(),Jm=$9(T9);function gu(){this.parents=[]}gu.prototype={constructor:gu,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!gu.prototype[n.type])throw new Jm.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 Jm.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 Jm.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:yu,Decorator:yu,BlockStatement:mS,DecoratorBlock:mS,PartialStatement:gS,PartialBlockStatement:function(t){gS.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:yu,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 yu(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function mS(e){yu.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function gS(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}_u.default=gu;yS.exports=_u.default});var vS=S((bu,_S)=>{"use strict";bu.__esModule=!0;function P9(e){return e&&e.__esModule?e:{default:e}}var C9=vu(),E9=P9(C9);function xr(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}xr.prototype=new E9.default;xr.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=Ym(n,o,r),u=Qm(n,o,r),p=a.openStandalone&&c,l=a.closeStandalone&&u,d=a.inlineStandalone&&c&&u;a.close&&ro(n,o,!0),a.open&&gn(n,o,!0),t&&d&&(ro(n,o),gn(n,o)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[o-1].original)[1])),t&&p&&(ro((s.program||s.inverse).body),gn(n,o)),t&&l&&(ro(n,o),gn((s.inverse||s.program).body))}}return e};xr.prototype.BlockStatement=xr.prototype.DecoratorBlock=xr.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:Qm(t.body),closeStandalone:Ym((n||t).body)};if(e.openStrip.close&&ro(t.body,null,!0),r){var s=e.inverseStrip;s.open&&gn(t.body,null,!0),s.close&&ro(n.body,null,!0),e.closeStrip.open&&gn(o.body,null,!0),!this.options.ignoreStandalone&&Ym(t.body)&&Qm(n.body)&&(gn(t.body),ro(n.body))}else e.closeStrip.open&&gn(t.body,null,!0);return i};xr.prototype.Decorator=xr.prototype.MustacheStatement=function(e){return e.strip};xr.prototype.PartialStatement=xr.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function Ym(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 Qm(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 ro(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 gn(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}}bu.default=xr;_S.exports=bu.default});var bS=S(Ht=>{"use strict";Ht.__esModule=!0;Ht.SourceLocation=A9;Ht.id=R9;Ht.stripFlags=O9;Ht.stripComment=N9;Ht.preparePath=D9;Ht.prepareMustache=j9;Ht.prepareRawBlock=M9;Ht.prepareBlock=L9;Ht.prepareProgram=Z9;Ht.preparePartialBlock=q9;function I9(e){return e&&e.__esModule?e:{default:e}}var z9=Bt(),Xm=I9(z9);function eg(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new Xm.default(e.path.original+" doesn't match "+t,r)}}function A9(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 R9(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function O9(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function N9(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function D9(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 Xm.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 j9(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 M9(e,t,r,n){eg(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 L9(e,t,r,n,o,i){n&&n.path&&eg(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Xm.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 Z9(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 q9(e,t,r,n){return eg(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 kS=S(Es=>{"use strict";Es.__esModule=!0;Es.parseWithoutProcessing=wS;Es.parse=K9;function F9(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 xS(e){return e&&e.__esModule?e:{default:e}}var U9=hS(),tg=xS(U9),B9=vS(),H9=xS(B9),V9=bS(),G9=F9(V9),W9=ft();Es.parser=tg.default;var xu={};W9.extend(xu,G9);function wS(e,t){if(e.type==="Program")return e;tg.default.yy=xu,xu.locInfo=function(n){return new xu.SourceLocation(t&&t.srcName,n)};var r=tg.default.parse(e);return r}function K9(e,t){var r=wS(e,t),n=new H9.default(t);return n.accept(r)}});var PS=S(Rs=>{"use strict";Rs.__esModule=!0;Rs.Compiler=rg;Rs.precompile=X9;Rs.compile=eZ;function $S(e){return e&&e.__esModule?e:{default:e}}var J9=Bt(),zs=$S(J9),As=ft(),Y9=Km(),Is=$S(Y9),Q9=[].slice;function rg(){}rg.prototype={compiler:rg,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||!TS(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=As.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 zs.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){SS(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 zs.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){SS(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 zs.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,Is.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=Is.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:Q9.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=Is.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),o=!n&&Is.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&&!Is.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&&As.indexOf(o,t);if(o&&i>=0)return[r,i]}}};function X9(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new zs.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 eZ(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new zs.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=As.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 TS(e,t){if(e===t)return!0;if(As.isArray(e)&&As.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!TS(e[r],t[r]))return!1;return!0}}function SS(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 ES=S(ng=>{var CS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ng.encode=function(e){if(0<=e&&e<CS.length)return CS[e];throw new TypeError("Must be between 0 and 63: "+e)};ng.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 sg=S(ig=>{var IS=ES(),og=5,zS=1<<og,AS=zS-1,RS=zS;function tZ(e){return e<0?(-e<<1)+1:(e<<1)+0}function rZ(e){var t=(e&1)===1,r=e>>1;return t?-r:r}ig.encode=function(t){var r="",n,o=tZ(t);do n=o&AS,o>>>=og,o>0&&(n|=RS),r+=IS.encode(n);while(o>0);return r};ig.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=IS.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&RS),c&=AS,i=i+(c<<s),s+=og}while(a);n.value=rZ(i),n.rest=r}});var Xo=S(it=>{function nZ(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}it.getArg=nZ;var OS=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,oZ=/^data:.+\,.+$/;function Os(e){var t=e.match(OS);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}it.urlParse=Os;function Yo(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}it.urlGenerate=Yo;function ag(e){var t=e,r=Os(e);if(r){if(!r.path)return e;t=r.path}for(var n=it.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,Yo(r)):t}it.normalize=ag;function NS(e,t){e===""&&(e="."),t===""&&(t=".");var r=Os(t),n=Os(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Yo(r);if(r||t.match(oZ))return t;if(n&&!n.host&&!n.path)return n.host=t,Yo(n);var o=t.charAt(0)==="/"?t:ag(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Yo(n)):o}it.join=NS;it.isAbsolute=function(e){return e.charAt(0)==="/"||OS.test(e)};function iZ(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)}it.relative=iZ;var DS=(function(){var e=Object.create(null);return!("__proto__"in e)})();function jS(e){return e}function sZ(e){return MS(e)?"$"+e:e}it.toSetString=DS?jS:sZ;function aZ(e){return MS(e)?e.slice(1):e}it.fromSetString=DS?jS:aZ;function MS(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 cZ(e,t,r){var n=Qo(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:Qo(e.name,t.name)}it.compareByOriginalPositions=cZ;function uZ(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Qo(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Qo(e.name,t.name)}it.compareByGeneratedPositionsDeflated=uZ;function Qo(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function lZ(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Qo(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Qo(e.name,t.name)}it.compareByGeneratedPositionsInflated=lZ;function pZ(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}it.parseSourceMapInput=pZ;function dZ(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Os(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=NS(Yo(n),t)}return ag(t)}it.computeSourceURL=dZ});var lg=S(LS=>{var cg=Xo(),ug=Object.prototype.hasOwnProperty,no=typeof Map<"u";function jr(){this._array=[],this._set=no?new Map:Object.create(null)}jr.fromArray=function(t,r){for(var n=new jr,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};jr.prototype.size=function(){return no?this._set.size:Object.getOwnPropertyNames(this._set).length};jr.prototype.add=function(t,r){var n=no?t:cg.toSetString(t),o=no?this.has(t):ug.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(no?this._set.set(t,i):this._set[n]=i)};jr.prototype.has=function(t){if(no)return this._set.has(t);var r=cg.toSetString(t);return ug.call(this._set,r)};jr.prototype.indexOf=function(t){if(no){var r=this._set.get(t);if(r>=0)return r}else{var n=cg.toSetString(t);if(ug.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};jr.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};jr.prototype.toArray=function(){return this._array.slice()};LS.ArraySet=jr});var FS=S(qS=>{var ZS=Xo();function fZ(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||ZS.compareByGeneratedPositionsInflated(e,t)<=0}function wu(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}wu.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};wu.prototype.add=function(t){fZ(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};wu.prototype.toArray=function(){return this._sorted||(this._array.sort(ZS.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};qS.MappingList=wu});var pg=S(US=>{var Ns=sg(),Me=Xo(),ku=lg().ArraySet,hZ=FS().MappingList;function Vt(e){e||(e={}),this._file=Me.getArg(e,"file",null),this._sourceRoot=Me.getArg(e,"sourceRoot",null),this._skipValidation=Me.getArg(e,"skipValidation",!1),this._sources=new ku,this._names=new ku,this._mappings=new hZ,this._sourcesContents=null}Vt.prototype._version=3;Vt.fromSourceMap=function(t){var r=t.sourceRoot,n=new Vt({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=Me.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=Me.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s)}),n};Vt.prototype.addMapping=function(t){var r=Me.getArg(t,"generated"),n=Me.getArg(t,"original",null),o=Me.getArg(t,"source",null),i=Me.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})};Vt.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Me.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Me.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Me.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Vt.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=Me.relative(i,o));var s=new ku,a=new ku;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=Me.join(n,c.source)),i!=null&&(c.source=Me.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=Me.join(n,c)),i!=null&&(c=Me.relative(i,c)),this.setSourceContent(c,u))},this)};Vt.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}))}};Vt.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(),f=0,h=d.length;f<h;f++){if(u=d[f],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(f>0){if(!Me.compareByGeneratedPositionsInflated(u,d[f-1]))continue;c+=","}c+=Ns.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(l=this._sources.indexOf(u.source),c+=Ns.encode(l-s),s=l,c+=Ns.encode(u.originalLine-1-o),o=u.originalLine-1,c+=Ns.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(p=this._names.indexOf(u.name),c+=Ns.encode(p-i),i=p)),a+=c}return a};Vt.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Me.relative(r,n));var o=Me.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Vt.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};Vt.prototype.toString=function(){return JSON.stringify(this.toJSON())};US.SourceMapGenerator=Vt});var BS=S(oo=>{oo.GREATEST_LOWER_BOUND=1;oo.LEAST_UPPER_BOUND=2;function dg(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?dg(s,t,r,n,o,i):i==oo.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?dg(e,s,r,n,o,i):i==oo.LEAST_UPPER_BOUND?s:e<0?-1:e}oo.search=function(t,r,n,o){if(r.length===0)return-1;var i=dg(-1,r.length,t,r,n,o||oo.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&n(r[i],r[i-1],!0)===0;)--i;return i}});var VS=S(HS=>{function fg(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function mZ(e,t){return Math.round(e+Math.random()*(t-e))}function hg(e,t,r,n){if(r<n){var o=mZ(r,n),i=r-1;fg(e,o,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(i+=1,fg(e,i,a));fg(e,i+1,a);var c=i+1;hg(e,t,r,c-1),hg(e,t,c+1,n)}}HS.quickSort=function(e,t){hg(e,t,0,e.length-1)}});var WS=S(Su=>{var A=Xo(),mg=BS(),ei=lg().ArraySet,gZ=sg(),Ds=VS().quickSort;function $e(e,t){var r=e;return typeof e=="string"&&(r=A.parseSourceMapInput(e)),r.sections!=null?new nr(r,t):new Ye(r,t)}$e.fromSourceMap=function(e,t){return Ye.fromSourceMap(e,t)};$e.prototype._version=3;$e.prototype.__generatedMappings=null;Object.defineProperty($e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});$e.prototype.__originalMappings=null;Object.defineProperty($e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});$e.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};$e.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};$e.GENERATED_ORDER=1;$e.ORIGINAL_ORDER=2;$e.GREATEST_LOWER_BOUND=1;$e.LEAST_UPPER_BOUND=2;$e.prototype.eachMapping=function(t,r,n){var o=r||null,i=n||$e.GENERATED_ORDER,s;switch(i){case $e.GENERATED_ORDER:s=this._generatedMappings;break;case $e.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=A.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)};$e.prototype.allGeneratedPositionsFor=function(t){var r=A.getArg(t,"line"),n={source:A.getArg(t,"source"),originalLine:r,originalColumn:A.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",A.compareByOriginalPositions,mg.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:A.getArg(s,"generatedLine",null),column:A.getArg(s,"generatedColumn",null),lastColumn:A.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)o.push({line:A.getArg(s,"generatedLine",null),column:A.getArg(s,"generatedColumn",null),lastColumn:A.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return o};Su.SourceMapConsumer=$e;function Ye(e,t){var r=e;typeof e=="string"&&(r=A.parseSourceMapInput(e));var n=A.getArg(r,"version"),o=A.getArg(r,"sources"),i=A.getArg(r,"names",[]),s=A.getArg(r,"sourceRoot",null),a=A.getArg(r,"sourcesContent",null),c=A.getArg(r,"mappings"),u=A.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=A.normalize(s)),o=o.map(String).map(A.normalize).map(function(p){return s&&A.isAbsolute(s)&&A.isAbsolute(p)?A.relative(s,p):p}),this._names=ei.fromArray(i.map(String),!0),this._sources=ei.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return A.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}Ye.prototype=Object.create($e.prototype);Ye.prototype.consumer=$e;Ye.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=A.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};Ye.fromSourceMap=function(t,r){var n=Object.create(Ye.prototype),o=n._names=ei.fromArray(t._names.toArray(),!0),i=n._sources=ei.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(f){return A.computeSourceURL(n.sourceRoot,f,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 GS;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 Ds(n.__originalMappings,A.compareByOriginalPositions),n};Ye.prototype._version=3;Object.defineProperty(Ye.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function GS(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ye.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={},f=[],h=[],m,y,b,v,k;p<u;)if(t.charAt(p)===";")n++,p++,o=0;else if(t.charAt(p)===",")p++;else{for(m=new GS,m.generatedLine=n,v=p;v<u&&!this._charIsMappingSeparator(t,v);v++);if(y=t.slice(p,v),b=l[y],b)p+=y.length;else{for(b=[];p<v;)gZ.decode(t,p,d),k=d.value,p=d.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");l[y]=b}m.generatedColumn=o+b[0],o=m.generatedColumn,b.length>1&&(m.source=a+b[1],a+=b[1],m.originalLine=i+b[2],i=m.originalLine,m.originalLine+=1,m.originalColumn=s+b[3],s=m.originalColumn,b.length>4&&(m.name=c+b[4],c+=b[4])),h.push(m),typeof m.originalLine=="number"&&f.push(m)}Ds(h,A.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,Ds(f,A.compareByOriginalPositions),this.__originalMappings=f};Ye.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 mg.search(t,r,i,s)};Ye.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}};Ye.prototype.originalPositionFor=function(t){var r={generatedLine:A.getArg(t,"line"),generatedColumn:A.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",A.compareByGeneratedPositionsDeflated,A.getArg(t,"bias",$e.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=A.getArg(o,"source",null);i!==null&&(i=this._sources.at(i),i=A.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=A.getArg(o,"name",null);return s!==null&&(s=this._names.at(s)),{source:i,line:A.getArg(o,"originalLine",null),column:A.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ye.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Ye.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=A.relative(this.sourceRoot,o));var i;if(this.sourceRoot!=null&&(i=A.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.')};Ye.prototype.generatedPositionFor=function(t){var r=A.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:A.getArg(t,"line"),originalColumn:A.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",A.compareByOriginalPositions,A.getArg(t,"bias",$e.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:A.getArg(i,"generatedLine",null),column:A.getArg(i,"generatedColumn",null),lastColumn:A.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Su.BasicSourceMapConsumer=Ye;function nr(e,t){var r=e;typeof e=="string"&&(r=A.parseSourceMapInput(e));var n=A.getArg(r,"version"),o=A.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new ei,this._names=new ei;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=A.getArg(s,"offset"),c=A.getArg(a,"line"),u=A.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 $e(A.getArg(s,"map"),t)}})}nr.prototype=Object.create($e.prototype);nr.prototype.constructor=$e;nr.prototype._version=3;Object.defineProperty(nr.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}});nr.prototype.originalPositionFor=function(t){var r={generatedLine:A.getArg(t,"line"),generatedColumn:A.getArg(t,"column")},n=mg.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}};nr.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};nr.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.')};nr.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(A.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}};nr.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=A.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)}Ds(this.__generatedMappings,A.compareByGeneratedPositionsDeflated),Ds(this.__originalMappings,A.compareByOriginalPositions)};Su.IndexedSourceMapConsumer=nr});var JS=S(KS=>{var yZ=pg().SourceMapGenerator,$u=Xo(),_Z=/(\r?\n)/,vZ=10,ti="$$$isSourceNode$$$";function zt(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[ti]=!0,n!=null&&this.add(n)}zt.fromStringWithSourceMap=function(t,r,n){var o=new zt,i=t.split(_Z),s=0,a=function(){var d=h(),f=h()||"";return d+f;function h(){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 f=i[s]||"",h=f.substr(0,d.generatedColumn-u);i[s]=f.substr(d.generatedColumn-u),u=d.generatedColumn,l(p,h),p=d;return}for(;c<d.generatedLine;)o.add(a()),c++;if(u<d.generatedColumn){var f=i[s]||"";o.add(f.substr(0,d.generatedColumn)),i[s]=f.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 f=r.sourceContentFor(d);f!=null&&(n!=null&&(d=$u.join(n,d)),o.setSourceContent(d,f))}),o;function l(d,f){if(d===null||d.source===void 0)o.add(f);else{var h=n?$u.join(n,d.source):d.source;o.add(new zt(d.originalLine,d.originalColumn,h,f,d.name))}}};zt.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[ti]||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};zt.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[ti]||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};zt.prototype.walk=function(t){for(var r,n=0,o=this.children.length;n<o;n++)r=this.children[n],r[ti]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};zt.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};zt.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[ti]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};zt.prototype.setSourceContent=function(t,r){this.sourceContents[$u.toSetString(t)]=r};zt.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][ti]&&this.children[r].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),r=0,n=o.length;r<n;r++)t($u.fromSetString(o[r]),this.sourceContents[o[r]])};zt.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};zt.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new yZ(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)===vZ?(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}};KS.SourceNode=zt});var YS=S(Tu=>{Tu.SourceMapGenerator=pg().SourceMapGenerator;Tu.SourceMapConsumer=WS().SourceMapConsumer;Tu.SourceNode=JS().SourceNode});var t1=S((Pu,e1)=>{"use strict";Pu.__esModule=!0;var yg=ft(),io=void 0;try{(typeof define!="function"||!define.amd)&&(QS=YS(),io=QS.SourceNode)}catch{}var QS;io||(io=function(e,t,r,n){this.src="",n&&this.add(n)},io.prototype={add:function(t){yg.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){yg.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function gg(e,t,r){if(yg.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 XS(e){this.srcFile=e,this.source=[]}XS.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,`
82
82
  `])}),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 io(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 io?t:(t=gg(t,this,r),new io(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=gg(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(gg(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};Pu.default=XS;e1.exports=Pu.default});var s1=S((Cu,i1)=>{"use strict";Cu.__esModule=!0;function o1(e){return e&&e.__esModule?e:{default:e}}var r1=uu(),bZ=Bt(),_g=o1(bZ),xZ=ft(),wZ=t1(),n1=o1(wZ);function ri(e){this.value=e}function ni(){}ni.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=r1.COMPILER_REVISION,r=r1.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return xZ.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 _g.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(),`;
83
83
  `]),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) {
84
84
  `),this.decorators.push(`}
@@ -91,26 +91,26 @@ Expecting `+uo.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Fu="Parse error
91
91
  }
92
92
  return undefined
93
93
  }
94
- `.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(kZ(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:ni,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 ri||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new ri(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 _g.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof ri)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 ri)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 ri)return n.value;if(!r){if(!this.stackSlot)throw new _g.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 ri?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=ni.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();ni.isValidJavaScriptVariableName=function(e){return!ni.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function kZ(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}Cu.default=ni;i1.exports=Cu.default});var u1=S((Eu,c1)=>{"use strict";Eu.__esModule=!0;function js(e){return e&&e.__esModule?e:{default:e}}var SZ=lS(),$Z=js(SZ),TZ=Km(),PZ=js(TZ),vg=kS(),bg=PS(),CZ=s1(),EZ=js(CZ),IZ=vu(),zZ=js(IZ),RZ=Vm(),AZ=js(RZ),OZ=$Z.default.create;function a1(){var e=OZ();return e.compile=function(t,r){return bg.compile(t,r,e)},e.precompile=function(t,r){return bg.precompile(t,r,e)},e.AST=PZ.default,e.Compiler=bg.Compiler,e.JavaScriptCompiler=EZ.default,e.Parser=vg.parser,e.parse=vg.parse,e.parseWithoutProcessing=vg.parseWithoutProcessing,e}var oi=a1();oi.create=a1;AZ.default(oi);oi.Visitor=zZ.default;oi.default=oi;Eu.default=oi;c1.exports=Eu.default});var l1=S(Iu=>{"use strict";Iu.__esModule=!0;Iu.print=MZ;Iu.PrintVisitor=Ae;function NZ(e){return e&&e.__esModule?e:{default:e}}var DZ=vu(),jZ=NZ(DZ);function MZ(e){return new Ae().accept(e)}function Ae(){this.padding=0}Ae.prototype=new jZ.default;Ae.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
95
- `,t};Ae.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};Ae.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};Ae.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};Ae.prototype.BlockStatement=Ae.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};Ae.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+" }}")};Ae.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+" }}")};Ae.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};Ae.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};Ae.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};Ae.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};Ae.prototype.StringLiteral=function(e){return'"'+e.value+'"'};Ae.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};Ae.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};Ae.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ae.prototype.NullLiteral=function(){return"NULL"};Ae.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(", ")+"}"};Ae.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var xg=S((BV,f1)=>{var zu=u1().default,d1=l1();zu.PrintVisitor=d1.PrintVisitor;zu.print=d1.print;f1.exports=zu;function p1(e,t){var r=require("fs"),n=r.readFileSync(t,"utf8");e.exports=zu.compile(n)}typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=p1,require.extensions[".hbs"]=p1)});function Ms(e,t){Ru.default.registerPartial(e,t)}function Mr(e,t){LZ.set(e,t),wg.set(e,Ru.default.compile(t))}function ZZ(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 h1(e,t){let r=wg.get(`mindset:${e}`);return r?r(t):`[Mindset '${e}' not found]`}function m1(e,t,r){let n=wg.get(`prompt:${e}`);if(!n)throw new Error(`\u30D7\u30ED\u30F3\u30D7\u30C8\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093`);let o=ZZ(t,r);if(t.frontend?.mindset_template){let i=h1(t.frontend.mindset_template,o);o.frontend.mindset=i}if(t.backend?.mindset_template){let i=h1(t.backend.mindset_template,o);o.backend.mindset=i}return n(o)}var Ru,wg,LZ,Au=_(()=>{"use strict";Ru=st(xg(),1);Ru.default.registerHelper("eq",function(e,t){return e===t});wg=new Map,LZ=new Map});function Ou(e,t){if((0,ii.existsSync)(e))for(let r of(0,ii.readdirSync)(e)){if(!r.endsWith(".hbs"))continue;let n=(0,Lr.basename)(r,".hbs");try{let o=(0,ii.readFileSync)((0,Lr.join)(e,r),"utf-8");t(n,o)}catch(o){console.error(`[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u8AAD\u307F\u8FBC\u307F\u30B9\u30AD\u30C3\u30D7: ${(0,Lr.join)(e,r)} \u2014 ${Ne(o)}`)}}}function kg(e){Ou((0,Lr.join)(e,"partials"),(t,r)=>Ms(t,r)),Ou((0,Lr.join)(e,"prompts"),(t,r)=>Mr(`prompt:${t}`,r)),Ou((0,Lr.join)(e,"mindsets"),(t,r)=>Mr(`mindset:${t}`,r)),Ou((0,Lr.join)(e,"agents"),(t,r)=>Mr(`agent:${t}`,r))}async function qZ(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 FZ(e,t){let r;try{r=JSON.parse(e)}catch(p){throw new Error(`\u6697\u53F7\u5316\u30D0\u30F3\u30C9\u30EB\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(p)}`)}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 qZ(t,n),c=(0,g1.createDecipheriv)("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)){if(!Number.isInteger(l.offset)||!Number.isInteger(l.length)||l.offset<0||l.length<0||l.offset+l.length>u.length)throw new Error(`\u30D0\u30F3\u30C9\u30EB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 "${p}" \u306E offset/length \u304C\u4E0D\u6B63\u3067\u3059 (offset=${l.offset}, length=${l.length}, bufferSize=${u.length})`);let d=u.subarray(l.offset,l.offset+l.length).toString("utf-8"),f=p.includes(":")?p.split(":").slice(1).join(":"):p;l.type==="partial"?Ms(f,d):Mr(`${l.type}:${f}`,d)}}async function y1(e){return!1}var ii,Lr,g1,_1=_(()=>{"use strict";ii=require("node:fs"),Lr=require("node:path"),g1=require("node:crypto");Au();Ko()});function UZ(){let e=`${(0,b1.hostname)()}-${process.env.USERNAME??process.env.USER??"unknown"}`;return(0,v1.createHash)("sha256").update(e).digest("hex").slice(0,32)}async function x1(e){let t=`${e.registry_url}/v1/auth/validate`,r=UZ(),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({license_key:e.license_key,machine_id:r}),signal:AbortSignal.timeout(1e4)});if(!n.ok)throw new Error(`Registry API \u8A8D\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${n.status} ${n.statusText}`);let o=await n.text(),i;try{i=JSON.parse(o)}catch{throw new Error(`Registry API \u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${o.slice(0,200)}`)}let s=BZ.safeParse(i);if(!s.success)throw new Error(`Registry API \u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u30B9\u30AD\u30FC\u30DE\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: ${s.error.message}`);return s.data}async function w1(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,signal:AbortSignal.timeout(1e4)});if(s.status===304)return null;if(!s.ok){let d=await s.text();throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${s.status} \u2014 ${d}`)}let a=await s.text(),c;try{c=JSON.parse(a)}catch{throw new Error(`Registry API \u306E\u30D0\u30F3\u30C9\u30EB\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${a.slice(0,200)}`)}let u=VZ.safeParse(c);if(!u.success)throw new Error(`Registry API \u306E\u30D0\u30F3\u30C9\u30EB\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u30B9\u30AD\u30FC\u30DE\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: ${u.error.message}`);let p=u.data,l=s.headers.get("ETag")?.replace(/"/g,"")??"";return{bundle:p,etag:l}}async function k1(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",(f,h)=>{f?d(f):l(h)})}),u=n("aes-256-gcm",c,i);u.setAuthTag(s);let p=Buffer.concat([u.update(a),u.final()]);try{return JSON.parse(p.toString("utf-8"))}catch(l){throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u306E\u5FA9\u53F7\u7D50\u679C\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${Ne(l)}`)}}var v1,b1,BZ,VZ,S1=_(()=>{"use strict";v1=require("node:crypto"),b1=require("node:os");pe();Ko();BZ=m.object({valid:m.boolean(),expires_at:m.string().nullable().optional().default(null),error:m.string().nullable().optional().default(null)});VZ=m.object({version:m.number(),salt:m.string(),iv:m.string(),tag:m.string(),data:m.string(),templates:m.record(m.object({type:m.string()}))})});function Sg(){let e=process.env.HOME??process.env.USERPROFILE??(0,$1.homedir)(),t=(0,so.join)(e,".godd","cache");return(0,St.existsSync)(t)||(0,St.mkdirSync)(t,{recursive:!0}),t}function $g(e,t){let r=`${[...e].sort().join(",")}_${t}`;return(0,or.createHash)("sha256").update(r).digest("hex").slice(0,16)}function T1(e,t){return new Promise((r,n)=>{(0,or.pbkdf2)(e,t,5e4,32,"sha256",(o,i)=>{o?n(o):r(i)})})}async function GZ(e,t){let r=(0,or.randomBytes)(32),n=await T1(t,r),o=(0,or.randomBytes)(12),i=(0,or.createCipheriv)("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 WZ(e,t){let r=e.subarray(0,32),n=e.subarray(32,44),o=e.subarray(44,60),i=e.subarray(60),s=await T1(t,r),a=(0,or.createDecipheriv)("aes-256-gcm",s,n);return a.setAuthTag(o),Buffer.concat([a.update(i),a.final()])}async function P1(e,t,r,n,o){let i=Sg(),s=$g(r,n),a=await GZ(Buffer.from(e,"utf-8"),o);(0,St.writeFileSync)((0,so.join)(i,`bundle-${s}.enc`),a);let c={etag:t,timestamp:Date.now(),components:r,language:n,profileHash:s};(0,St.writeFileSync)((0,so.join)(i,"meta.json"),JSON.stringify(c,null,2),"utf-8")}async function C1(e,t,r){let n=Sg(),o=(0,so.join)(n,"meta.json");if(!(0,St.existsSync)(o))return null;let i;try{i=JSON.parse((0,St.readFileSync)(o,"utf-8"))}catch{return null}let s=$g(e,t);if(i.profileHash!==s)return null;let a=(0,so.join)(n,`bundle-${s}.enc`);if(!(0,St.existsSync)(a))return null;try{let c=(0,St.readFileSync)(a);return{data:(await WZ(c,r)).toString("utf-8"),etag:i.etag,isExpired:Date.now()-i.timestamp>HZ}}catch{return null}}function E1(e,t){let r=Sg(),n=(0,so.join)(r,"meta.json");if((0,St.existsSync)(n))try{let o=JSON.parse((0,St.readFileSync)(n,"utf-8")),i=$g(e,t);return o.profileHash!==i?void 0:o.etag}catch{return}}var or,St,$1,so,HZ,I1=_(()=>{"use strict";or=require("node:crypto"),St=require("node:fs"),$1=require("node:os"),so=require("node:path"),HZ=600*60*1e3});function Ls(e){for(let[t,r]of Object.entries(e.partials))Ms(t,r);for(let[t,r]of Object.entries(e.prompts))Mr(`prompt:${t}`,r);for(let[t,r]of Object.entries(e.agents))Mr(`agent:${t}`,r);for(let[t,r]of Object.entries(e.mindsets))Mr(`mindset:${t}`,r)}var z1=_(()=>{"use strict";Au()});function Zs(e){let t=e??process.cwd();try{let r=(0,R1.execSync)("git config --get remote.origin.url",{encoding:"utf-8",cwd:t,timeout:5e3}).trim();if(r)return r}catch{}try{let r=(0,A1.join)(t,".git","config");return(0,Nu.existsSync)(r)?(0,Nu.readFileSync)(r,"utf-8").match(/\[remote\s+"origin"\][^[]*url\s*=\s*(.+)/)?.[1]?.trim()??null:null}catch{return null}}var R1,Nu,A1,Tg=_(()=>{"use strict";R1=require("node:child_process"),Nu=require("node:fs"),A1=require("node:path")});async function Cg(e,t){let r=Zs();if(!r)throw new Error("Git \u30EA\u30E2\u30FC\u30C8 (origin) \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002");let n=await fetch(`${e}/v1/repos/register`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({remote_url:r}),signal:AbortSignal.timeout(1e4)});if(!n.ok){let i=(await n.json().catch(()=>({detail:n.statusText}))).detail,s=typeof i=="string"?i:i!=null?JSON.stringify(i):n.statusText;throw new Error(`\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${s}`)}Pg.set(r,{verified:!0,verifiedAt:Date.now()})}function KZ(e){if(e){let t=Pg.get(e);return t?Date.now()-t.verifiedAt<O1:!1}for(let t of Pg.values())if(Date.now()-t.verifiedAt<O1)return!0;return!1}async function N1(e,t){let r=Zs();r&&KZ(r)||await Cg(e,t)}var O1,Pg,D1=_(()=>{"use strict";Tg();O1=3600*1e3,Pg=new Map});function si(e){try{return(0,re.existsSync)(e)?JSON.parse((0,re.readFileSync)(e,"utf-8")):null}catch{return null}}function Zr(e,t=4096){try{return(0,re.existsSync)(e)?(0,re.readFileSync)(e).subarray(0,t).toString("utf-8"):""}catch{return""}}function YZ(e){let t=(0,W.join)(e,"vendor");if(!(0,re.existsSync)(t))return[];let r=[];try{for(let n of(0,re.readdirSync)(t)){let o=(0,W.join)(t,n);if(!(0,re.statSync)(o).isDirectory())continue;let i=JZ[n];if(i)r.push({name:n,path:o,description:i.description,runtime:i.runtime,setupHint:i.setupHint});else{let s=(0,re.existsSync)((0,W.join)(o,"pyproject.toml")),a=(0,re.existsSync)((0,W.join)(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 QZ(e){let t=[],r=(0,W.join)(e,"backend","pyproject.toml"),n=(0,W.join)(e,"backend","requirements.txt");if((0,re.existsSync)(r)){let y=Zr(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(0,re.existsSync)(n)&&Zr(n).includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/requirements.txt \u306B fastapi \u3092\u691C\u51FA"});let o=si((0,W.join)(e,"frontend","package.json")),i=si((0,W.join)(e,"package.json")),s=si((0,W.join)(e,"src","package.json"));for(let[y,b]of[["frontend/package.json",o],["package.json",i],["src/package.json",s]]){if(!b)continue;let v={...b.dependencies,...b.devDependencies};v.react&&t.push({id:"react",label:"React",evidence:`${y} \u306B react \u3092\u691C\u51FA`}),v.next&&t.push({id:"nextjs",label:"Next.js",evidence:`${y} \u306B next \u3092\u691C\u51FA`}),v.vue&&t.push({id:"vue",label:"Vue.js",evidence:`${y} \u306B vue \u3092\u691C\u51FA`}),v.svelte&&t.push({id:"svelte",label:"Svelte",evidence:`${y} \u306B svelte \u3092\u691C\u51FA`}),v.electron&&t.push({id:"electron",label:"Electron",evidence:`${y} \u306B electron \u3092\u691C\u51FA`})}let a=(0,W.join)(e,"pubspec.yaml");if((0,re.existsSync)(a)){let y=Zr(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=(0,re.existsSync)((0,W.join)(e,"Package.swift")),u=(0,W.join)(e,"ios"),p=(0,re.existsSync)(u)&&(()=>{try{return(0,re.readdirSync)(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=(0,re.existsSync)((0,W.join)(e,"build.gradle.kts")),d=(0,re.existsSync)((0,W.join)(e,"build.gradle")),f=(0,W.join)(e,"android"),h=(0,re.existsSync)((0,W.join)(f,"build.gradle.kts"))||(0,re.existsSync)((0,W.join)(f,"build.gradle"));(l||d||h)&&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 g=Zr((0,W.join)(e,"docker-compose.yml"));return g&&g.includes("postgres")&&t.push({id:"postgres",label:"Postgres",evidence:"docker-compose.yml \u306B postgres \u3092\u691C\u51FA"}),((0,re.existsSync)((0,W.join)(e,"prisma","schema.prisma"))||(0,re.existsSync)((0,W.join)(e,"backend","prisma","schema.prisma")))&&t.push({id:"prisma",label:"Prisma",evidence:"prisma/schema.prisma \u3092\u691C\u51FA"}),t}function e5(e){let t={},r=new Map,n=[(0,W.join)(e,"package.json"),(0,W.join)(e,"frontend","package.json"),(0,W.join)(e,"src","package.json")];for(let o of n){let i=si(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 t5(e){let t=new Set,r="";for(let n of[(0,W.join)(e,"backend"),e]){let o=(0,W.join)(n,"pyproject.toml");if((0,re.existsSync)(o)){let a=Zr(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=(0,W.join)(n,"requirements.txt");if((0,re.existsSync)(i)){let s=Zr(i,16384);for(let a of s.split(`
94
+ `.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(kZ(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:ni,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 ri||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new ri(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 _g.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof ri)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 ri)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 ri)return n.value;if(!r){if(!this.stackSlot)throw new _g.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 ri?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=ni.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();ni.isValidJavaScriptVariableName=function(e){return!ni.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function kZ(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}Cu.default=ni;i1.exports=Cu.default});var u1=S((Eu,c1)=>{"use strict";Eu.__esModule=!0;function js(e){return e&&e.__esModule?e:{default:e}}var SZ=lS(),$Z=js(SZ),TZ=Km(),PZ=js(TZ),vg=kS(),bg=PS(),CZ=s1(),EZ=js(CZ),IZ=vu(),zZ=js(IZ),AZ=Hm(),RZ=js(AZ),OZ=$Z.default.create;function a1(){var e=OZ();return e.compile=function(t,r){return bg.compile(t,r,e)},e.precompile=function(t,r){return bg.precompile(t,r,e)},e.AST=PZ.default,e.Compiler=bg.Compiler,e.JavaScriptCompiler=EZ.default,e.Parser=vg.parser,e.parse=vg.parse,e.parseWithoutProcessing=vg.parseWithoutProcessing,e}var oi=a1();oi.create=a1;RZ.default(oi);oi.Visitor=zZ.default;oi.default=oi;Eu.default=oi;c1.exports=Eu.default});var l1=S(Iu=>{"use strict";Iu.__esModule=!0;Iu.print=MZ;Iu.PrintVisitor=Re;function NZ(e){return e&&e.__esModule?e:{default:e}}var DZ=vu(),jZ=NZ(DZ);function MZ(e){return new Re().accept(e)}function Re(){this.padding=0}Re.prototype=new jZ.default;Re.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
95
+ `,t};Re.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};Re.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};Re.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};Re.prototype.BlockStatement=Re.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};Re.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+" }}")};Re.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+" }}")};Re.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};Re.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};Re.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};Re.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};Re.prototype.StringLiteral=function(e){return'"'+e.value+'"'};Re.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};Re.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};Re.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Re.prototype.NullLiteral=function(){return"NULL"};Re.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(", ")+"}"};Re.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var xg=S((HH,f1)=>{var zu=u1().default,d1=l1();zu.PrintVisitor=d1.PrintVisitor;zu.print=d1.print;f1.exports=zu;function p1(e,t){var r=require("fs"),n=r.readFileSync(t,"utf8");e.exports=zu.compile(n)}typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=p1,require.extensions[".hbs"]=p1)});function Ms(e,t){Au.default.registerPartial(e,t)}function Mr(e,t){LZ.set(e,t),wg.set(e,Au.default.compile(t))}function ZZ(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 h1(e,t){let r=wg.get(`mindset:${e}`);return r?r(t):`[Mindset '${e}' not found]`}function m1(e,t,r){let n=wg.get(`prompt:${e}`);if(!n)throw new Error(`\u30D7\u30ED\u30F3\u30D7\u30C8\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093`);let o=ZZ(t,r);if(t.frontend?.mindset_template){let i=h1(t.frontend.mindset_template,o);o.frontend.mindset=i}if(t.backend?.mindset_template){let i=h1(t.backend.mindset_template,o);o.backend.mindset=i}return n(o)}var Au,wg,LZ,Ru=_(()=>{"use strict";Au=st(xg(),1);Au.default.registerHelper("eq",function(e,t){return e===t});wg=new Map,LZ=new Map});function Ou(e,t){if((0,ii.existsSync)(e))for(let r of(0,ii.readdirSync)(e)){if(!r.endsWith(".hbs"))continue;let n=(0,Lr.basename)(r,".hbs");try{let o=(0,ii.readFileSync)((0,Lr.join)(e,r),"utf-8");t(n,o)}catch(o){console.error(`[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u8AAD\u307F\u8FBC\u307F\u30B9\u30AD\u30C3\u30D7: ${(0,Lr.join)(e,r)} \u2014 ${Ne(o)}`)}}}function kg(e){Ou((0,Lr.join)(e,"partials"),(t,r)=>Ms(t,r)),Ou((0,Lr.join)(e,"prompts"),(t,r)=>Mr(`prompt:${t}`,r)),Ou((0,Lr.join)(e,"mindsets"),(t,r)=>Mr(`mindset:${t}`,r)),Ou((0,Lr.join)(e,"agents"),(t,r)=>Mr(`agent:${t}`,r))}async function qZ(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 FZ(e,t){let r;try{r=JSON.parse(e)}catch(p){throw new Error(`\u6697\u53F7\u5316\u30D0\u30F3\u30C9\u30EB\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(p)}`)}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 qZ(t,n),c=(0,g1.createDecipheriv)("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)){if(!Number.isInteger(l.offset)||!Number.isInteger(l.length)||l.offset<0||l.length<0||l.offset+l.length>u.length)throw new Error(`\u30D0\u30F3\u30C9\u30EB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 "${p}" \u306E offset/length \u304C\u4E0D\u6B63\u3067\u3059 (offset=${l.offset}, length=${l.length}, bufferSize=${u.length})`);let d=u.subarray(l.offset,l.offset+l.length).toString("utf-8"),f=p.includes(":")?p.split(":").slice(1).join(":"):p;l.type==="partial"?Ms(f,d):Mr(`${l.type}:${f}`,d)}}async function y1(e){return!1}var ii,Lr,g1,_1=_(()=>{"use strict";ii=require("node:fs"),Lr=require("node:path"),g1=require("node:crypto");Ru();Ko()});function UZ(){let e=`${(0,b1.hostname)()}-${process.env.USERNAME??process.env.USER??"unknown"}`;return(0,v1.createHash)("sha256").update(e).digest("hex").slice(0,32)}async function x1(e){let t=`${e.registry_url}/v1/auth/validate`,r=UZ(),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({license_key:e.license_key,machine_id:r}),signal:AbortSignal.timeout(1e4)});if(!n.ok)throw new Error(`Registry API \u8A8D\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${n.status} ${n.statusText}`);let o=await n.text(),i;try{i=JSON.parse(o)}catch{throw new Error(`Registry API \u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${o.slice(0,200)}`)}let s=BZ.safeParse(i);if(!s.success)throw new Error(`Registry API \u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u30B9\u30AD\u30FC\u30DE\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: ${s.error.message}`);return s.data}async function w1(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,signal:AbortSignal.timeout(1e4)});if(s.status===304)return null;if(!s.ok){let d=await s.text();throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${s.status} \u2014 ${d}`)}let a=await s.text(),c;try{c=JSON.parse(a)}catch{throw new Error(`Registry API \u306E\u30D0\u30F3\u30C9\u30EB\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${a.slice(0,200)}`)}let u=HZ.safeParse(c);if(!u.success)throw new Error(`Registry API \u306E\u30D0\u30F3\u30C9\u30EB\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u30B9\u30AD\u30FC\u30DE\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: ${u.error.message}`);let p=u.data,l=s.headers.get("ETag")?.replace(/"/g,"")??"";return{bundle:p,etag:l}}async function k1(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",(f,h)=>{f?d(f):l(h)})}),u=n("aes-256-gcm",c,i);u.setAuthTag(s);let p=Buffer.concat([u.update(a),u.final()]);try{return JSON.parse(p.toString("utf-8"))}catch(l){throw new Error(`Registry API \u30D0\u30F3\u30C9\u30EB\u306E\u5FA9\u53F7\u7D50\u679C\u304C\u4E0D\u6B63\u306A JSON \u3067\u3059: ${Ne(l)}`)}}var v1,b1,BZ,HZ,S1=_(()=>{"use strict";v1=require("node:crypto"),b1=require("node:os");pe();Ko();BZ=g.object({valid:g.boolean(),expires_at:g.string().nullable().optional().default(null),error:g.string().nullable().optional().default(null)});HZ=g.object({version:g.number(),salt:g.string(),iv:g.string(),tag:g.string(),data:g.string(),templates:g.record(g.object({type:g.string()}))})});function Sg(){let e=process.env.HOME??process.env.USERPROFILE??(0,$1.homedir)(),t=(0,so.join)(e,".godd","cache");return(0,St.existsSync)(t)||(0,St.mkdirSync)(t,{recursive:!0}),t}function $g(e,t){let r=`${[...e].sort().join(",")}_${t}`;return(0,or.createHash)("sha256").update(r).digest("hex").slice(0,16)}function T1(e,t){return new Promise((r,n)=>{(0,or.pbkdf2)(e,t,5e4,32,"sha256",(o,i)=>{o?n(o):r(i)})})}async function GZ(e,t){let r=(0,or.randomBytes)(32),n=await T1(t,r),o=(0,or.randomBytes)(12),i=(0,or.createCipheriv)("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 WZ(e,t){let r=e.subarray(0,32),n=e.subarray(32,44),o=e.subarray(44,60),i=e.subarray(60),s=await T1(t,r),a=(0,or.createDecipheriv)("aes-256-gcm",s,n);return a.setAuthTag(o),Buffer.concat([a.update(i),a.final()])}async function P1(e,t,r,n,o){let i=Sg(),s=$g(r,n),a=await GZ(Buffer.from(e,"utf-8"),o);(0,St.writeFileSync)((0,so.join)(i,`bundle-${s}.enc`),a);let c={etag:t,timestamp:Date.now(),components:r,language:n,profileHash:s};(0,St.writeFileSync)((0,so.join)(i,"meta.json"),JSON.stringify(c,null,2),"utf-8")}async function C1(e,t,r){let n=Sg(),o=(0,so.join)(n,"meta.json");if(!(0,St.existsSync)(o))return null;let i;try{i=JSON.parse((0,St.readFileSync)(o,"utf-8"))}catch{return null}let s=$g(e,t);if(i.profileHash!==s)return null;let a=(0,so.join)(n,`bundle-${s}.enc`);if(!(0,St.existsSync)(a))return null;try{let c=(0,St.readFileSync)(a);return{data:(await WZ(c,r)).toString("utf-8"),etag:i.etag,isExpired:Date.now()-i.timestamp>VZ}}catch{return null}}function E1(e,t){let r=Sg(),n=(0,so.join)(r,"meta.json");if((0,St.existsSync)(n))try{let o=JSON.parse((0,St.readFileSync)(n,"utf-8")),i=$g(e,t);return o.profileHash!==i?void 0:o.etag}catch{return}}var or,St,$1,so,VZ,I1=_(()=>{"use strict";or=require("node:crypto"),St=require("node:fs"),$1=require("node:os"),so=require("node:path"),VZ=600*60*1e3});function Ls(e){for(let[t,r]of Object.entries(e.partials))Ms(t,r);for(let[t,r]of Object.entries(e.prompts))Mr(`prompt:${t}`,r);for(let[t,r]of Object.entries(e.agents))Mr(`agent:${t}`,r);for(let[t,r]of Object.entries(e.mindsets))Mr(`mindset:${t}`,r)}var z1=_(()=>{"use strict";Ru()});function Zs(e){let t=e??process.cwd();try{let r=(0,A1.execSync)("git config --get remote.origin.url",{encoding:"utf-8",cwd:t,timeout:5e3}).trim();if(r)return r}catch{}try{let r=(0,R1.join)(t,".git","config");return(0,Nu.existsSync)(r)?(0,Nu.readFileSync)(r,"utf-8").match(/\[remote\s+"origin"\][^[]*url\s*=\s*(.+)/)?.[1]?.trim()??null:null}catch{return null}}var A1,Nu,R1,Tg=_(()=>{"use strict";A1=require("node:child_process"),Nu=require("node:fs"),R1=require("node:path")});async function Cg(e,t){let r=Zs();if(!r)throw new Error("Git \u30EA\u30E2\u30FC\u30C8 (origin) \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002");let n=await fetch(`${e}/v1/repos/register`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({remote_url:r}),signal:AbortSignal.timeout(1e4)});if(!n.ok){let i=(await n.json().catch(()=>({detail:n.statusText}))).detail,s=typeof i=="string"?i:i!=null?JSON.stringify(i):n.statusText;throw new Error(`\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${s}`)}Pg.set(r,{verified:!0,verifiedAt:Date.now()})}function KZ(e){if(e){let t=Pg.get(e);return t?Date.now()-t.verifiedAt<O1:!1}for(let t of Pg.values())if(Date.now()-t.verifiedAt<O1)return!0;return!1}async function N1(e,t){let r=Zs();r&&KZ(r)||await Cg(e,t)}var O1,Pg,D1=_(()=>{"use strict";Tg();O1=3600*1e3,Pg=new Map});function si(e){try{return(0,re.existsSync)(e)?JSON.parse((0,re.readFileSync)(e,"utf-8")):null}catch{return null}}function Zr(e,t=4096){try{return(0,re.existsSync)(e)?(0,re.readFileSync)(e).subarray(0,t).toString("utf-8"):""}catch{return""}}function YZ(e){let t=(0,W.join)(e,"vendor");if(!(0,re.existsSync)(t))return[];let r=[];try{for(let n of(0,re.readdirSync)(t)){let o=(0,W.join)(t,n);if(!(0,re.statSync)(o).isDirectory())continue;let i=JZ[n];if(i)r.push({name:n,path:o,description:i.description,runtime:i.runtime,setupHint:i.setupHint});else{let s=(0,re.existsSync)((0,W.join)(o,"pyproject.toml")),a=(0,re.existsSync)((0,W.join)(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 QZ(e){let t=[],r=(0,W.join)(e,"backend","pyproject.toml"),n=(0,W.join)(e,"backend","requirements.txt");if((0,re.existsSync)(r)){let y=Zr(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(0,re.existsSync)(n)&&Zr(n).includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/requirements.txt \u306B fastapi \u3092\u691C\u51FA"});let o=si((0,W.join)(e,"frontend","package.json")),i=si((0,W.join)(e,"package.json")),s=si((0,W.join)(e,"src","package.json"));for(let[y,b]of[["frontend/package.json",o],["package.json",i],["src/package.json",s]]){if(!b)continue;let v={...b.dependencies,...b.devDependencies};v.react&&t.push({id:"react",label:"React",evidence:`${y} \u306B react \u3092\u691C\u51FA`}),v.next&&t.push({id:"nextjs",label:"Next.js",evidence:`${y} \u306B next \u3092\u691C\u51FA`}),v.vue&&t.push({id:"vue",label:"Vue.js",evidence:`${y} \u306B vue \u3092\u691C\u51FA`}),v.svelte&&t.push({id:"svelte",label:"Svelte",evidence:`${y} \u306B svelte \u3092\u691C\u51FA`}),v.electron&&t.push({id:"electron",label:"Electron",evidence:`${y} \u306B electron \u3092\u691C\u51FA`})}let a=(0,W.join)(e,"pubspec.yaml");if((0,re.existsSync)(a)){let y=Zr(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=(0,re.existsSync)((0,W.join)(e,"Package.swift")),u=(0,W.join)(e,"ios"),p=(0,re.existsSync)(u)&&(()=>{try{return(0,re.readdirSync)(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=(0,re.existsSync)((0,W.join)(e,"build.gradle.kts")),d=(0,re.existsSync)((0,W.join)(e,"build.gradle")),f=(0,W.join)(e,"android"),h=(0,re.existsSync)((0,W.join)(f,"build.gradle.kts"))||(0,re.existsSync)((0,W.join)(f,"build.gradle"));(l||d||h)&&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=Zr((0,W.join)(e,"docker-compose.yml"));return m&&m.includes("postgres")&&t.push({id:"postgres",label:"Postgres",evidence:"docker-compose.yml \u306B postgres \u3092\u691C\u51FA"}),((0,re.existsSync)((0,W.join)(e,"prisma","schema.prisma"))||(0,re.existsSync)((0,W.join)(e,"backend","prisma","schema.prisma")))&&t.push({id:"prisma",label:"Prisma",evidence:"prisma/schema.prisma \u3092\u691C\u51FA"}),t}function e5(e){let t={},r=new Map,n=[(0,W.join)(e,"package.json"),(0,W.join)(e,"frontend","package.json"),(0,W.join)(e,"src","package.json")];for(let o of n){let i=si(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 t5(e){let t=new Set,r="";for(let n of[(0,W.join)(e,"backend"),e]){let o=(0,W.join)(n,"pyproject.toml");if((0,re.existsSync)(o)){let a=Zr(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=(0,W.join)(n,"requirements.txt");if((0,re.existsSync)(i)){let s=Zr(i,16384);for(let a of s.split(`
96
96
  `)){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 r5(e){let t=[],r=new Set,{deps:n,sources:o}=e5(e),{deps:i,source:s}=t5(e),a="";for(let c of["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]){let u=Zr((0,W.join)(e,c));if(u){a=u;break}}for(let c of XZ)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((0,re.existsSync)((0,W.join)(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 n5(e){let t;for(let i of["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"])if(t=Zr((0,W.join)(e,i)),t)break;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 o5(e){let t=(0,W.join)(e,"docs"),r=(0,re.existsSync)((0,W.join)(e,"godd-mcp-server","notes-app","package.json")),n=(0,re.existsSync)((0,W.join)(e,"godd-mcp-server","notes-api","pyproject.toml"));if(!(0,re.existsSync)(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(0,re.readdirSync)(a)){if(u.startsWith("."))continue;let p=(0,W.join)(a,u),l=c?`${c}/${u}`:u;(0,re.statSync)(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 j1(e){let t=si((0,W.join)(e,"package.json"))?.name||(0,W.basename)(e),r=[];try{for(let u of(0,re.readdirSync)(e)){if(u.startsWith(".")||u==="node_modules")continue;let p=(0,W.join)(e,u);(0,re.statSync)(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=>(0,re.existsSync)((0,W.join)(e,u))),s=si((0,W.join)(e,"package.json"))?.scripts??{},a=[];try{for(let u of(0,re.readdirSync)(e))(u.match(/^env.*\.example$/)||u.match(/^\.env.*\.example$/))&&a.push(u)}catch{}let c=Zr((0,W.join)(e,"README.md"),500);return{root:e,name:t,detected_stacks:QZ(e),detected_tools:r5(e),vendor_items:YZ(e),key_files:o,directories:r,scripts:s,docker_services:n5(e),env_templates:a,readme_excerpt:c,question_list_path:(0,W.join)(e,"docs","003_requirements","questions.csv"),docs_structure:o5(e)}}var re,W,JZ,XZ,M1=_(()=>{"use strict";re=require("node:fs"),W=require("node:path");JZ={"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"}};XZ=[{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 i5(e,t){let r=t??process.env.GODD_PROJECT_ROOT??process.cwd();if(e.projectContext?.root===r)return e.projectContext;let n=j1(r);return e.projectContext=n,n}function M(e,t,r,n,o){let i=i5(e,n),s=e.config.language??"en",a=m1(t,e.profile,{project:i,language:s,...o});return`${s!=="en"?`> **Output Language**: Respond entirely in ${s}.
97
97
 
98
98
  `:""}${a}
99
99
 
100
100
  ---
101
101
 
102
- ${r}`}var he=_(()=>{"use strict";Au();M1()});function F1(e,t){let r=[`## \u4F9D\u983C
102
+ ${r}`}var he=_(()=>{"use strict";Ru();M1()});function F1(e,t){let r=[`## \u4F9D\u983C
103
103
  ${t.task??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.completion_criteria&&r.push(`## \u5B8C\u4E86\u6761\u4EF6
104
104
  ${t.completion_criteria}`),t.slug&&r.push(`## Slug
105
105
  ${t.slug}`),t.constraints&&r.push(`## \u5236\u7D04
106
106
  ${t.constraints}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
107
107
  ${t.context}`),M(e,"dev",r.join(`
108
108
 
109
- `),t.project_root)}var L1,Z1,q1,U1=_(()=>{"use strict";pe();he();L1="godd_dev",Z1="\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",q1=m.object({task:m.string().max(2e5).optional().describe("\u5B9F\u88C5\u3057\u305F\u3044\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\u3067\u8A18\u8FF0\uFF09"),context:m.string().max(2e5).optional().describe("\u95A2\u9023\u3059\u308B\u30B3\u30FC\u30C9\u3084\u4ED5\u69D8\u306E\u60C5\u5831\uFF08\u4EFB\u610F\uFF09"),completion_criteria:m.string().max(2e5).optional().describe("\u5B8C\u4E86\u6761\u4EF6\uFF08\u6E2C\u5B9A\u53EF\u80FD\u306B\uFF09"),slug:m.string().max(1e3).optional().describe("\u30C1\u30B1\u30C3\u30C8/\u77ED\u3044\u8B58\u5225\u5B50"),constraints:m.string().max(2e5).optional().describe("\u5236\u7D04\u4E8B\u9805"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function G1(e,t){let r=[`## \u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61
109
+ `),t.project_root)}var L1,Z1,q1,U1=_(()=>{"use strict";pe();he();L1="godd_dev",Z1="\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",q1=g.object({task:g.string().max(2e5).optional().describe("\u5B9F\u88C5\u3057\u305F\u3044\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\u3067\u8A18\u8FF0\uFF09"),context:g.string().max(2e5).optional().describe("\u95A2\u9023\u3059\u308B\u30B3\u30FC\u30C9\u3084\u4ED5\u69D8\u306E\u60C5\u5831\uFF08\u4EFB\u610F\uFF09"),completion_criteria:g.string().max(2e5).optional().describe("\u5B8C\u4E86\u6761\u4EF6\uFF08\u6E2C\u5B9A\u53EF\u80FD\u306B\uFF09"),slug:g.string().max(1e3).optional().describe("\u30C1\u30B1\u30C3\u30C8/\u77ED\u3044\u8B58\u5225\u5B50"),constraints:g.string().max(2e5).optional().describe("\u5236\u7D04\u4E8B\u9805"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function G1(e,t){let r=[`## \u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61
110
110
  ${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
111
111
  ${t.check_type}`),M(e,"check",r.join(`
112
112
 
113
- `),t.project_root)}var B1,V1,H1,W1=_(()=>{"use strict";pe();he();B1="godd_check",V1="\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",H1=m.object({target:m.string().max(2e5).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:m.string().max(1e3).optional().describe("\u30C1\u30A7\u30C3\u30AF\u7A2E\u5225\uFF08\u4F8B: pre-submit, spec, security, full\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Q1(e,t){let r=[];return t.context&&r.push(`## \u80CC\u666F
113
+ `),t.project_root)}var B1,H1,V1,W1=_(()=>{"use strict";pe();he();B1="godd_check",H1="\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",V1=g.object({target:g.string().max(2e5).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().max(1e3).optional().describe("\u30C1\u30A7\u30C3\u30AF\u7A2E\u5225\uFF08\u4F8B: pre-submit, spec, security, full\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Q1(e,t){let r=[];return t.context&&r.push(`## \u80CC\u666F
114
114
  ${t.context}`),t.review_scope&&r.push(`## \u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2
115
115
  ${t.review_scope}`),t.severity_threshold&&r.push(`## \u6700\u4F4E\u91CD\u5927\u5EA6\u30D5\u30A3\u30EB\u30BF
116
116
  ${t.severity_threshold} \u4EE5\u4E0A\u306E\u307F\u51FA\u529B`),t.focus_areas&&r.push(`## \u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF
@@ -119,36 +119,36 @@ ${t.focus_areas}`),t.file_path&&r.push(`## \u30D5\u30A1\u30A4\u30EB: ${t.file_pa
119
119
  ${t.code}
120
120
  \`\`\``),M(e,"review",r.join(`
121
121
 
122
- `),t.project_root)}var K1,J1,Y1,X1=_(()=>{"use strict";pe();he();K1="godd_review",J1="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",Y1=m.object({code:m.string().max(2e5).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:m.string().max(1e3).optional().describe("\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),review_scope:m.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:m.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:m.string().max(1e3).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:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function n2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
122
+ `),t.project_root)}var K1,J1,Y1,X1=_(()=>{"use strict";pe();he();K1="godd_review",J1="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",Y1=g.object({code:g.string().max(2e5).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().max(1e3).optional().describe("\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9"),context:g.string().max(2e5).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().max(1e3).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().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function n2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
123
123
  ${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.context&&r.push(`## \u80CC\u666F
124
124
  ${t.context}`),M(e,"commit",r.join(`
125
125
 
126
- `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var e2,t2,r2,o2=_(()=>{"use strict";pe();he();e2="godd_commit",t2="\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",r2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08diff \u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\uFF09"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),auto_confirm:m.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:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function c2(e,t){let r=[`## \u8981\u6C42
126
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var e2,t2,r2,o2=_(()=>{"use strict";pe();he();e2="godd_commit",t2="\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",r2=g.object({changes:g.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08diff \u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\uFF09"),context:g.string().max(2e5).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().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function c2(e,t){let r=[`## \u8981\u6C42
127
127
  ${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
128
128
  ${t.spec_types.join(", ")}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
129
129
  ${t.context}`),M(e,"spec",r.join(`
130
130
 
131
- `),t.project_root)}var i2,s2,a2,u2=_(()=>{"use strict";pe();he();i2="godd_spec",s2="\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",a2=m.object({requirements:m.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),spec_types:m.array(m.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:m.string().max(2e5).optional().describe("\u65E2\u5B58\u306E\u4ED5\u69D8\u3084\u5236\u7D04"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function f2(e,t){let r=[`## \u5909\u66F4\u6982\u8981
131
+ `),t.project_root)}var i2,s2,a2,u2=_(()=>{"use strict";pe();he();i2="godd_spec",s2="\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",a2=g.object({requirements:g.string().max(2e5).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().max(2e5).optional().describe("\u65E2\u5B58\u306E\u4ED5\u69D8\u3084\u5236\u7D04"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function f2(e,t){let r=[`## \u5909\u66F4\u6982\u8981
132
132
  ${t.change_summary??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB
133
133
  ${t.target_modules??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.breaking_changes!==void 0&&r.push(`## \u7834\u58CA\u7684\u5909\u66F4
134
134
  ${t.breaking_changes?"\u3042\u308A":"\u306A\u3057"}`),M(e,"impact-analysis",r.join(`
135
135
 
136
- `),t.project_root)}var l2,p2,d2,h2=_(()=>{"use strict";pe();he();l2="godd_impact",p2="\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",d2=m.object({change_summary:m.string().max(2e5).optional().describe("\u5909\u66F4\u6982\u8981\uFF08\u4F55\u3092/\u306A\u305C\uFF09"),target_modules:m.string().max(2e5).optional().describe("\u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB"),breaking_changes:m.boolean().optional().describe("\u7834\u58CA\u7684\u5909\u66F4\u306E\u6709\u7121"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function _2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
136
+ `),t.project_root)}var l2,p2,d2,h2=_(()=>{"use strict";pe();he();l2="godd_impact",p2="\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",d2=g.object({change_summary:g.string().max(2e5).optional().describe("\u5909\u66F4\u6982\u8981\uFF08\u4F55\u3092/\u306A\u305C\uFF09"),target_modules:g.string().max(2e5).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().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function _2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
137
137
  ${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
138
138
  ${t.failure_points}`),M(e,"test-plan",r.join(`
139
139
 
140
- `),t.project_root)}var m2,g2,y2,v2=_(()=>{"use strict";pe();he();m2="godd_test_plan",g2="\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",y2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08Spec/\u5B9F\u88C5\u5DEE\u5206\uFF09"),failure_points:m.string().max(2e5).optional().describe("\u5931\u6557\u3057\u3046\u308B\u30DD\u30A4\u30F3\u30C8\uFF08\u5883\u754C\u5024/\u7570\u5E38\u7CFB\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function k2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
140
+ `),t.project_root)}var m2,g2,y2,v2=_(()=>{"use strict";pe();he();m2="godd_test_plan",g2="\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",y2=g.object({changes:g.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08Spec/\u5B9F\u88C5\u5DEE\u5206\uFF09"),failure_points:g.string().max(2e5).optional().describe("\u5931\u6557\u3057\u3046\u308B\u30DD\u30A4\u30F3\u30C8\uFF08\u5883\u754C\u5024/\u7570\u5E38\u7CFB\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function k2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
141
141
  ${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
142
142
  ${t.doc_type}`),M(e,"auto-documentation",r.join(`
143
143
 
144
- `),t.project_root)}var b2,x2,w2,S2=_(()=>{"use strict";pe();he();b2="godd_documentation",x2="\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",w2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u5BFE\u8C61\u30D5\u30A1\u30A4\u30EB/\u6319\u52D5\u5DEE\u5206\uFF09"),doc_type:m.string().max(1e3).optional().describe("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225\uFF08\u4F8B: spec, readme, config, tech-stack\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function C2(e,t){let r=[`## \u80CC\u666F
144
+ `),t.project_root)}var b2,x2,w2,S2=_(()=>{"use strict";pe();he();b2="godd_documentation",x2="\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",w2=g.object({changes:g.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u5BFE\u8C61\u30D5\u30A1\u30A4\u30EB/\u6319\u52D5\u5DEE\u5206\uFF09"),doc_type:g.string().max(1e3).optional().describe("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225\uFF08\u4F8B: spec, readme, config, tech-stack\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function C2(e,t){let r=[`## \u80CC\u666F
145
145
  ${t.background??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5909\u66F4\u5185\u5BB9
146
146
  ${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.scope&&r.push(`## \u5F71\u97FF\u7BC4\u56F2
147
147
  ${t.scope}`),t.breaking_changes&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
148
148
  ${t.breaking_changes}`),t.verification&&r.push(`## \u52D5\u4F5C\u78BA\u8A8D
149
149
  ${t.verification}`),M(e,"pr-analyze",r.join(`
150
150
 
151
- `),t.project_root)}var $2,T2,P2,E2=_(()=>{"use strict";pe();he();$2="godd_pr_analyze",T2="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",P2=m.object({background:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F/\u76EE\u7684"),changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30D5\u30A1\u30A4\u30EB/\u6A5F\u80FD\u5358\u4F4D\uFF09"),scope:m.string().max(2e5).optional().describe("\u5F71\u97FF\u7BC4\u56F2"),breaking_changes:m.string().max(2e5).optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),verification:m.string().max(2e5).optional().describe("\u52D5\u4F5C\u78BA\u8A8D\uFF08\u30B3\u30DE\u30F3\u30C9/\u624B\u52D5\u624B\u9806\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Eg(e){return e.length<=8?"****":e.slice(0,4)+"****"+e.slice(-4)}function A2(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.godd` \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(`
151
+ `),t.project_root)}var $2,T2,P2,E2=_(()=>{"use strict";pe();he();$2="godd_pr_analyze",T2="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",P2=g.object({background:g.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F/\u76EE\u7684"),changes:g.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30D5\u30A1\u30A4\u30EB/\u6A5F\u80FD\u5358\u4F4D\uFF09"),scope:g.string().max(2e5).optional().describe("\u5F71\u97FF\u7BC4\u56F2"),breaking_changes:g.string().max(2e5).optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),verification:g.string().max(2e5).optional().describe("\u52D5\u4F5C\u78BA\u8A8D\uFF08\u30B3\u30DE\u30F3\u30C9/\u624B\u52D5\u624B\u9806\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Eg(e){return e.length<=8?"****":e.slice(0,4)+"****"+e.slice(-4)}function R2(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.godd` \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(`
152
152
  **\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8**: ${s5}`);t.license_key?n.push(`
153
153
  ### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC: \`${Eg(t.license_key)}\`\uFF08\u8A2D\u5B9A\u6E08\u307F\uFF09`):n.push(`
154
154
  ### \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(`
@@ -161,59 +161,59 @@ ${t.components.join(", ")}`),t.environment&&r.push(`## \u74B0\u5883\u60C5\u5831
161
161
  ${t.environment}`),t.issues&&r.push(`## \u554F\u984C
162
162
  ${t.issues}`),M(e,"setup",r.join(`
163
163
 
164
- `),t.project_root)}var I2,z2,R2,s5,O2=_(()=>{"use strict";pe();he();I2="godd_setup",z2="\u74B0\u5883\u69CB\u7BC9\u652F\u63F4\u3002GoDD MCP \u306E config.godd / .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.godd \u3092\u81EA\u52D5\u751F\u6210\u3067\u304D\u307E\u3059\u3002",R2=m.object({mode:m.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.godd \u81EA\u52D5\u751F\u6210"),environment:m.string().max(2e5).optional().describe("\u74B0\u5883\u60C5\u5831\uFF08OS\u3001\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C4\u30FC\u30EB\u7B49\uFF09"),license_key:m.string().max(1e3).optional().describe("GoDD \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08config.godd \u306B\u66F8\u304D\u8FBC\u3080\uFF09"),stack_profile:m.string().max(1e3).optional().describe("\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u4F8B: fastapi-react\uFF09"),components:m.array(m.string().max(1e3)).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:m.string().max(1e3).optional().describe("\u30DE\u30A4\u30F3\u30C9\u30BB\u30C3\u30C8\u8A00\u8A9E\uFF08\u4F8B: ja, en\uFF09"),issues:m.string().max(2e5).optional().describe("\u56F0\u3063\u3066\u3044\u308B\u3053\u3068\uFF08\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8\u7B49\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")}),s5=["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 M2(e,t){let r=[`## \u5909\u66F4\u70B9
164
+ `),t.project_root)}var I2,z2,A2,s5,O2=_(()=>{"use strict";pe();he();I2="godd_setup",z2="\u74B0\u5883\u69CB\u7BC9\u652F\u63F4\u3002GoDD MCP \u306E config.godd / .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.godd \u3092\u81EA\u52D5\u751F\u6210\u3067\u304D\u307E\u3059\u3002",A2=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.godd \u81EA\u52D5\u751F\u6210"),environment:g.string().max(2e5).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().max(1e3).optional().describe("GoDD \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08config.godd \u306B\u66F8\u304D\u8FBC\u3080\uFF09"),stack_profile:g.string().max(1e3).optional().describe("\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u4F8B: fastapi-react\uFF09"),components:g.array(g.string().max(1e3)).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().max(1e3).optional().describe("\u30DE\u30A4\u30F3\u30C9\u30BB\u30C3\u30C8\u8A00\u8A9E\uFF08\u4F8B: ja, en\uFF09"),issues:g.string().max(2e5).optional().describe("\u56F0\u3063\u3066\u3044\u308B\u3053\u3068\uFF08\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8\u7B49\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")}),s5=["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 M2(e,t){let r=[`## \u5909\u66F4\u70B9
165
165
  ${t.changes??"(git log \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.compatibility&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
166
166
  ${t.compatibility}`),t.known_issues&&r.push(`## \u65E2\u77E5\u306E\u554F\u984C
167
167
  ${t.known_issues}`),M(e,"release-notes",r.join(`
168
168
 
169
- `),t.project_root)}var N2,D2,j2,L2=_(()=>{"use strict";pe();he();N2="godd_release_notes",D2="\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",j2=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u70B9\uFF08\u8FFD\u52A0/\u5909\u66F4/\u4FEE\u6B63\uFF09"),compatibility:m.string().max(2e5).optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),known_issues:m.string().max(2e5).optional().describe("\u65E2\u77E5\u306E\u554F\u984C"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function U2(e,t){let r=[`## Decision
169
+ `),t.project_root)}var N2,D2,j2,L2=_(()=>{"use strict";pe();he();N2="godd_release_notes",D2="\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",j2=g.object({changes:g.string().max(2e5).optional().describe("\u5909\u66F4\u70B9\uFF08\u8FFD\u52A0/\u5909\u66F4/\u4FEE\u6B63\uFF09"),compatibility:g.string().max(2e5).optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),known_issues:g.string().max(2e5).optional().describe("\u65E2\u77E5\u306E\u554F\u984C"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function U2(e,t){let r=[`## Decision
170
170
  ${t.decision??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## Context
171
171
  ${t.context??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.options&&r.push(`## Options
172
172
  ${t.options}`),M(e,"adr",r.join(`
173
173
 
174
- `),t.project_root)}var Z2,q2,F2,B2=_(()=>{"use strict";pe();he();Z2="godd_adr",q2="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",F2=m.object({decision:m.string().max(2e5).optional().describe("\u4F55\u3092\u6C7A\u3081\u308B\u304B\uFF08Decision\uFF09"),context:m.string().max(2e5).optional().describe("\u80CC\u666F\uFF08Context\uFF09"),options:m.string().max(2e5).optional().describe("\u4EE3\u66FF\u6848\uFF08Options\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function W2(e,t){return M(e,"sync","",t.project_root)}var V2,H2,G2,K2=_(()=>{"use strict";pe();he();V2="godd_sync",H2="\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",G2=m.object({project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function X2(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
174
+ `),t.project_root)}var Z2,q2,F2,B2=_(()=>{"use strict";pe();he();Z2="godd_adr",q2="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",F2=g.object({decision:g.string().max(2e5).optional().describe("\u4F55\u3092\u6C7A\u3081\u308B\u304B\uFF08Decision\uFF09"),context:g.string().max(2e5).optional().describe("\u80CC\u666F\uFF08Context\uFF09"),options:g.string().max(2e5).optional().describe("\u4EE3\u66FF\u6848\uFF08Options\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function W2(e,t){return M(e,"sync","",t.project_root)}var H2,V2,G2,K2=_(()=>{"use strict";pe();he();H2="godd_sync",V2="\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",G2=g.object({project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function X2(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
175
175
  ${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
176
176
  ${t.base_branch}`),M(e,"new-branch",r.join(`
177
177
 
178
- `),t.project_root)}var J2,Y2,Q2,e$=_(()=>{"use strict";pe();he();J2="godd_new_branch",Y2="\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",Q2=m.object({branch_name:m.string().max(1e3).optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),base_branch:m.string().max(1e3).optional().describe("\u8D77\u70B9\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: origin/main\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function o$(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
178
+ `),t.project_root)}var J2,Y2,Q2,e$=_(()=>{"use strict";pe();he();J2="godd_new_branch",Y2="\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",Q2=g.object({branch_name:g.string().max(1e3).optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),base_branch:g.string().max(1e3).optional().describe("\u8D77\u70B9\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: origin/main\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function o$(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
179
179
  ${t.branch_name??"(\u30BF\u30B9\u30AF\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210)"}`];return t.purpose&&r.push(`## \u76EE\u7684
180
180
  ${t.purpose}`),M(e,"git-workflow",r.join(`
181
181
 
182
- `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var t$,r$,n$,i$=_(()=>{"use strict";pe();he();t$="godd_git_workflow",r$="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",n$=m.object({branch_name:m.string().max(1e3).optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),purpose:m.string().max(2e5).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:m.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:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function u$(e,t){return M(e,"push","",t.project_root)}var s$,a$,c$,l$=_(()=>{"use strict";pe();he();s$="godd_push",a$="\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",c$=m.object({project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function h$(e,t){return M(e,"push-execute","",t.project_root,{auto_confirm:t.auto_confirm??!1})}var p$,d$,f$,m$=_(()=>{"use strict";pe();he();p$="godd_push_execute",d$="\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",f$=m.object({auto_confirm:m.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:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function v$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
182
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1})}var t$,r$,n$,i$=_(()=>{"use strict";pe();he();t$="godd_git_workflow",r$="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",n$=g.object({branch_name:g.string().max(1e3).optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),purpose:g.string().max(2e5).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().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function u$(e,t){return M(e,"push","",t.project_root)}var s$,a$,c$,l$=_(()=>{"use strict";pe();he();s$="godd_push",a$="\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",c$=g.object({project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function h$(e,t){return M(e,"push-execute","",t.project_root,{auto_confirm:t.auto_confirm??!1})}var p$,d$,f$,m$=_(()=>{"use strict";pe();he();p$="godd_push_execute",d$="\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",f$=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().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function v$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
183
183
  ${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
184
184
  ${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
185
185
  ${t.context}`),M(e,"pr-create",r.join(`
186
186
 
187
- `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var g$,y$,_$,b$=_(()=>{"use strict";pe();he();g$="godd_pr_create",y$="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",_$=m.object({title:m.string().max(1e3).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:m.string().max(1e3).optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:m.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:m.string().max(1e3).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=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
187
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var g$,y$,_$,b$=_(()=>{"use strict";pe();he();g$="godd_pr_create",y$="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",_$=g.object({title:g.string().max(1e3).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().max(1e3).optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().max(2e5).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().max(1e3).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=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
188
188
  ${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
189
189
  ${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
190
190
  ${t.context}`),M(e,"submit",r.join(`
191
191
 
192
- `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var x$,w$,k$,$$=_(()=>{"use strict";pe();he();x$="godd_submit",w$="\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",k$=m.object({title:m.string().max(1e3).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:m.string().max(1e3).optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:m.string().max(2e5).optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:m.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:m.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:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function E$(e,t){return M(e,"agent-dev-workflow","",t.project_root)}var T$,P$,C$,I$=_(()=>{"use strict";pe();he();T$="godd_dev_workflow",P$="\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",C$=m.object({project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function O$(e,t){let r=[`## \u5831\u544A\u5BFE\u8C61
192
+ `),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var x$,w$,k$,$$=_(()=>{"use strict";pe();he();x$="godd_submit",w$="\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",k$=g.object({title:g.string().max(1e3).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().max(1e3).optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().max(2e5).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().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function E$(e,t){return M(e,"agent-dev-workflow","",t.project_root)}var T$,P$,C$,I$=_(()=>{"use strict";pe();he();T$="godd_dev_workflow",P$="\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",C$=g.object({project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function O$(e,t){let r=[`## \u5831\u544A\u5BFE\u8C61
193
193
  ${t.target??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.report_type&&r.push(`## \u5831\u544A\u30BF\u30A4\u30D7
194
194
  ${t.report_type}`),M(e,"analyze-report",r.join(`
195
195
 
196
- `),t.project_root)}var z$,R$,A$,N$=_(()=>{"use strict";pe();he();z$="godd_report",R$="\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",A$=m.object({target:m.string().max(2e5).optional().describe("\u5831\u544A\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u6982\u8981\u307E\u305F\u306F\u30BF\u30B9\u30AF\u540D\uFF09"),report_type:m.string().max(1e3).optional().describe("\u5831\u544A\u30BF\u30A4\u30D7\uFF08\u4F8B: task-completion, incident, investigation\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function L$(e,t){return M(e,"requirements-to-business-flow",`## \u8981\u6C42
197
- ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var D$,j$,M$,Z$=_(()=>{"use strict";pe();he();D$="godd_req_to_flow",j$="\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",M$=m.object({requirements:m.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function B$(e,t){return M(e,"requirements-to-tickets",`## \u8981\u6C42
198
- ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var q$,F$,U$,V$=_(()=>{"use strict";pe();he();q$="godd_req_to_tickets",F$="\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",U$=m.object({requirements:m.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function K$(e,t){return M(e,"specification-to-tickets",`## \u5BFE\u8C61Spec
199
- ${t.specification??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var H$,G$,W$,J$=_(()=>{"use strict";pe();he();H$="godd_spec_to_tickets",G$="\u4ED5\u69D8\u2192\u30C1\u30B1\u30C3\u30C8\u5909\u63DB\u3002Spec\uFF08docs/003_requirements/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",W$=m.object({specification:m.string().max(2e5).optional().describe("\u5BFE\u8C61Spec\uFF08API/UI/DB/Feature/Usecase/Error Codes\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function eT(e,t){return M(e,"install",`## \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61
200
- ${t.target}`,t.project_root)}var Y$,Q$,X$,tT=_(()=>{"use strict";pe();he();Y$="godd_install",Q$="\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",X$=m.object({target:m.string().max(1e3).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:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function iT(e,t){let r=[`## \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D
196
+ `),t.project_root)}var z$,A$,R$,N$=_(()=>{"use strict";pe();he();z$="godd_report",A$="\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",R$=g.object({target:g.string().max(2e5).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().max(1e3).optional().describe("\u5831\u544A\u30BF\u30A4\u30D7\uFF08\u4F8B: task-completion, incident, investigation\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function L$(e,t){return M(e,"requirements-to-business-flow",`## \u8981\u6C42
197
+ ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var D$,j$,M$,Z$=_(()=>{"use strict";pe();he();D$="godd_req_to_flow",j$="\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",M$=g.object({requirements:g.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function B$(e,t){return M(e,"requirements-to-tickets",`## \u8981\u6C42
198
+ ${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var q$,F$,U$,H$=_(()=>{"use strict";pe();he();q$="godd_req_to_tickets",F$="\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",U$=g.object({requirements:g.string().max(2e5).optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function K$(e,t){return M(e,"specification-to-tickets",`## \u5BFE\u8C61Spec
199
+ ${t.specification??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var V$,G$,W$,J$=_(()=>{"use strict";pe();he();V$="godd_spec_to_tickets",G$="\u4ED5\u69D8\u2192\u30C1\u30B1\u30C3\u30C8\u5909\u63DB\u3002Spec\uFF08docs/003_requirements/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",W$=g.object({specification:g.string().max(2e5).optional().describe("\u5BFE\u8C61Spec\uFF08API/UI/DB/Feature/Usecase/Error Codes\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function eT(e,t){return M(e,"install",`## \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61
200
+ ${t.target}`,t.project_root)}var Y$,Q$,X$,tT=_(()=>{"use strict";pe();he();Y$="godd_install",Q$="\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",X$=g.object({target:g.string().max(1e3).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().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function iT(e,t){let r=[`## \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D
201
201
  ${t.project_name??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.roles?.length&&r.push(`## \u30ED\u30FC\u30EB
202
202
  ${t.roles.map(n=>`- ${n}`).join(`
203
203
  `)}`),t.screens?.length&&r.push(`## \u753B\u9762ID
204
204
  ${t.screens.map(n=>`- ${n}`).join(`
205
205
  `)}`),M(e,"docs-init",r.join(`
206
206
 
207
- `),t.project_root)}var rT,nT,oT,sT=_(()=>{"use strict";pe();he();rT="godd_docs_init",nT="\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\u3002GoDD 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",oT=m.object({project_name:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D"),roles:m.array(m.string().max(1e3)).optional().describe("\u30ED\u30FC\u30EB\u540D\u4E00\u89A7\uFF08\u4F8B: \u7BA1\u7406\u8005, \u904B\u55B6\u8005, \u5229\u7528\u8005\uFF09"),screens:m.array(m.string().max(1e3)).optional().describe("\u753B\u9762ID\u4E00\u89A7\uFF08\u4F8B: SC-OP-01, SC-US-01\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function lT(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
207
+ `),t.project_root)}var rT,nT,oT,sT=_(()=>{"use strict";pe();he();rT="godd_docs_init",nT="\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\u3002GoDD 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",oT=g.object({project_name:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D"),roles:g.array(g.string().max(1e3)).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().max(1e3)).optional().describe("\u753B\u9762ID\u4E00\u89A7\uFF08\u4F8B: SC-OP-01, SC-US-01\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function lT(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
208
208
  ${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
209
209
  ${t.target_sections.map(n=>`- ${n}`).join(`
210
210
  `)}`),M(e,"docs-update",r.join(`
211
211
 
212
- `),t.project_root)}var aT,cT,uT,pT=_(()=>{"use strict";pe();he();aT="godd_docs_update",cT="\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",uT=m.object({changes:m.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30B3\u30FC\u30C9\u5909\u66F4\u306E\u6982\u8981\uFF09"),target_sections:m.array(m.string().max(1e3)).optional().describe("\u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3\uFF08\u4F8B: 001_project, 003_requirements\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function mT(e,t){let r=[];return t.deploy_target&&r.push(`## \u30C7\u30D7\u30ED\u30A4\u5148
212
+ `),t.project_root)}var aT,cT,uT,pT=_(()=>{"use strict";pe();he();aT="godd_docs_update",cT="\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",uT=g.object({changes:g.string().max(2e5).optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30B3\u30FC\u30C9\u5909\u66F4\u306E\u6982\u8981\uFF09"),target_sections:g.array(g.string().max(1e3)).optional().describe("\u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3\uFF08\u4F8B: 001_project, 003_requirements\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function mT(e,t){let r=[];return t.deploy_target&&r.push(`## \u30C7\u30D7\u30ED\u30A4\u5148
213
213
  ${t.deploy_target}`),t.github_repo&&r.push(`## \u5BFE\u8C61\u30EA\u30DD\u30B8\u30C8\u30EA
214
214
  ${t.github_repo}`),M(e,"notes-deploy",r.join(`
215
215
 
216
- `)||"\u30C7\u30D7\u30ED\u30A4\u624B\u9806\u3092\u6848\u5185\u3057\u3066\u304F\u3060\u3055\u3044\u3002",t.project_root)}var dT,fT,hT,gT=_(()=>{"use strict";pe();he();dT="godd_notes_deploy",fT="GoDD Notes \u3092\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u3002AI \u304C\u81EA\u5F8B\u5B9F\u884C\u53EF\u80FD\u306A\u624B\u9806\u3092\u8FD4\u3057\u307E\u3059\u3002compose --auto\uFF08\u30ED\u30FC\u30AB\u30EB\u81EA\u52D5\u30C7\u30D7\u30ED\u30A4\uFF09/ compose --config\uFF08\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u6307\u5B9A\uFF09/ deploy -y\uFF08AWS \u5B9F\u30C7\u30D7\u30ED\u30A4\uFF09/ status\uFF08\u72B6\u614B\u78BA\u8A8D\uFF09\u306E\u624B\u9806\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002",hT=m.object({deploy_target:m.string().max(1e3).optional().describe("\u30C7\u30D7\u30ED\u30A4\u65B9\u5F0F\uFF08compose, deploy, infra \u306E\u3044\u305A\u308C\u304B\uFF09"),github_repo:m.string().max(1e3).optional().describe("\u5BFE\u8C61 GitHub \u30EA\u30DD\u30B8\u30C8\u30EA\uFF08owner/repo \u5F62\u5F0F\uFF09"),project_root:m.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function a5(){let e=process.env.GODD_CONFIG;if(!e)throw new Error(`GODD_CONFIG \u74B0\u5883\u5909\u6570\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002${Ut} \u306E\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);return e}function yT(e){let t;try{t=hn.load(e)}catch{return e.replace(/(license_key\s*:\s*["']?)([^"'\n]+)(["']?)/g,"$1****$3")}if(typeof t=="object"&&t!==null&&!Array.isArray(t)){let r=t;return typeof r.license_key=="string"&&r.license_key.length>0&&(r.license_key="****"),hn.dump(r,{lineWidth:-1,quotingType:'"'})}return e}function xT(e){let t=a5();if(e.action==="show"){if(!(0,yn.existsSync)(t))return`## ${Ut} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
216
+ `)||"\u30C7\u30D7\u30ED\u30A4\u624B\u9806\u3092\u6848\u5185\u3057\u3066\u304F\u3060\u3055\u3044\u3002",t.project_root)}var dT,fT,hT,gT=_(()=>{"use strict";pe();he();dT="godd_notes_deploy",fT="GoDD Notes \u3092\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u3002AI \u304C\u81EA\u5F8B\u5B9F\u884C\u53EF\u80FD\u306A\u624B\u9806\u3092\u8FD4\u3057\u307E\u3059\u3002compose --auto\uFF08\u30ED\u30FC\u30AB\u30EB\u81EA\u52D5\u30C7\u30D7\u30ED\u30A4\uFF09/ compose --config\uFF08\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u6307\u5B9A\uFF09/ deploy -y\uFF08AWS \u5B9F\u30C7\u30D7\u30ED\u30A4\uFF09/ status\uFF08\u72B6\u614B\u78BA\u8A8D\uFF09\u306E\u624B\u9806\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002",hT=g.object({deploy_target:g.string().max(1e3).optional().describe("\u30C7\u30D7\u30ED\u30A4\u65B9\u5F0F\uFF08compose, deploy, infra \u306E\u3044\u305A\u308C\u304B\uFF09"),github_repo:g.string().max(1e3).optional().describe("\u5BFE\u8C61 GitHub \u30EA\u30DD\u30B8\u30C8\u30EA\uFF08owner/repo \u5F62\u5F0F\uFF09"),project_root:g.string().max(1e3).optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function a5(){let e=process.env.GODD_CONFIG;if(!e)throw new Error(`GODD_CONFIG \u74B0\u5883\u5909\u6570\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002${Ut} \u306E\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);return e}function yT(e){let t;try{t=hn.load(e)}catch{return e.replace(/(license_key\s*:\s*["']?)([^"'\n]+)(["']?)/g,"$1****$3")}if(typeof t=="object"&&t!==null&&!Array.isArray(t)){let r=t;return typeof r.license_key=="string"&&r.license_key.length>0&&(r.license_key="****"),hn.dump(r,{lineWidth:-1,quotingType:'"'})}return e}function xT(e){let t=a5();if(e.action==="show"){if(!(0,yn.existsSync)(t))return`## ${Ut} \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
217
217
 
218
218
  \u30D1\u30B9: \`${t}\`
219
219
 
@@ -256,16 +256,16 @@ ${i.map(a=>`- ${a}`).join(`
256
256
  \`\`\`yaml
257
257
  ${yT(s)}\`\`\`
258
258
 
259
- \u26A0 MCP \u30B5\u30FC\u30D0\u30FC\u306E\u518D\u8D77\u52D5\u304C\u5FC5\u8981\u3067\u3059\uFF08Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002`}var yn,_T,vT,bT,wT=_(()=>{"use strict";pe();yn=require("node:fs");Pm();Em();_T="godd_config",vT="config.godd \u306E\u8868\u793A\u30FB\u66F4\u65B0\u3092\u884C\u3044\u307E\u3059\u3002show \u3067\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3001update \u3067\u6307\u5B9A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3067\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",bT=m.object({action:m.enum(["show","update"]).describe("show=\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A, update=\u8A2D\u5B9A\u3092\u66F4\u65B0"),license_key:m.string().min(1,"license_key \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08action=update \u6642\u306E\u307F\uFF09"),components:m.array(m.string().min(1).max(1e3)).min(1,"components \u306F\u7A7A\u914D\u5217\u306B\u3067\u304D\u307E\u305B\u3093").optional().describe("\u66F4\u65B0\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u914D\u5217\uFF08action=update \u6642\u306E\u307F\uFF09"),language:m.string().min(1,"language \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B\u8A00\u8A9E\uFF08action=update \u6642\u306E\u307F\uFF09"),registry_url:m.string().min(1,"registry_url \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").url("registry_url \u306F\u6709\u52B9\u306A URL \u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B Registry URL\uFF08action=update \u6642\u306E\u307F\uFF09")})});function zg(e){Ig=e}function kT(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");return Buffer.from(t,"base64")}function Rg(e){return c5.test(e.trim())}function u5(e){let t=e.trim();if(Rg(t))throw new $t("Registry \u767A\u884C\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F Registry API \u3067\u691C\u8A3C\u3057\u3066\u304F\u3060\u3055\u3044");let r=t.split(".");if(r.length!==2)throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059");let[n,o]=r;if(Ig){let c=(0,Du.createPublicKey)(Ig),u=kT(o);if(!(0,Du.verify)(null,Buffer.from(n),c,u))throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u7F72\u540D\u304C\u7121\u52B9\u3067\u3059")}else if(process.env.SKIP_LICENSE_VERIFY!=="true")throw new $t("\u516C\u958B\u9375\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u304C\u3067\u304D\u307E\u305B\u3093");let i=kT(n).toString("utf-8"),s;try{s=JSON.parse(i)}catch{throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}if(s.v!==1)throw new $t(`\u672A\u5BFE\u5FDC\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3: ${s.v}`);let a=new Date(s.exp);if(isNaN(a.getTime()))throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u4E0D\u6B63\u3067\u3059");if(a<new Date)throw new $t(`\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\uFF08${s.exp}\uFF09`);return s}function Ag(e,t){let r=u5(e);if(r.stack&&r.stack!==t)throw new $t(`\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 Du,c5,Ig,$t,ST=_(()=>{"use strict";Du=require("node:crypto"),c5=/^godd-[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Ig="";$t=class extends Error{constructor(t){super(t),this.name="LicenseError"}}});var TT={};Br(TT,{startServer:()=>$T});function l5(){try{let e=(0,ir.join)(qr,"..","package.json");return JSON.parse((0,ao.readFileSync)(e,"utf-8")).version??"0.0.0"}catch{return"0.0.0"}}async function p5(e){let t=e.components??[];if(t.length===0)return null;let r=await C1(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");try{let n=JSON.parse(r.data);return Ls(n),n}catch{console.error("[GoDD] \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002Registry API \u304B\u3089\u518D\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3059")}}try{let n=E1(t,e.language),o=await w1(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");try{let i=JSON.parse(r.data);return Ls(i),i}catch{console.error("[GoDD] 304 \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}}if(o){let i=await k1(o.bundle,e.license_key);Ls(i);let s=JSON.stringify(i);return await P1(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: ${Ne(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");try{let n=JSON.parse(r.data);return Ls(n),n}catch{console.error("[GoDD] \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u306E JSON \u30D1\u30FC\u30B9\u306B\u3082\u5931\u6557\u3057\u307E\u3057\u305F")}}return null}async function $T(){let e=kk(),t=e.components&&e.components.length>0,r;if(t){try{let d=await x1(e);d.valid||(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${d.error??"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"}`),process.exit(1))}catch(d){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: ${Ne(d)}`),Rg(e.license_key)&&(console.error("[GoDD] Registry \u767A\u884C\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F\u30ED\u30FC\u30AB\u30EB\u7F72\u540D\u691C\u8A3C\u3067\u304D\u307E\u305B\u3093\u3002registry_url \u3068\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let f=(0,ir.join)(qr,"..",".keys","public.pem");(0,ao.existsSync)(f)&&zg((0,ao.readFileSync)(f,"utf-8"));try{let h=e.components?.[0]??e.stack_profile??"fastapi-react";Ag(e.license_key,h)}catch(h){h instanceof $t?console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC (\u30ED\u30FC\u30AB\u30EB\u691C\u8A3C): ${h.message}`):console.error(`[GoDD] \u30ED\u30FC\u30AB\u30EB\u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u3067\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC: ${Ne(h)}`),process.exit(1)}}try{await Cg(e.registry_url,e.license_key)}catch(d){console.error("\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u30A8\u30E9\u30FC:",Ne(d)),console.error(" godd init \u3092\u518D\u5B9F\u884C\u3059\u308B\u304B\u3001Registry API \u304C\u8D77\u52D5\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)}let l=await p5(e);if(l)r={name:`registry:${e.components.join("+")}`,stacks:e.components.map(d=>({id:d,label:d,name:d})),quality_gate:l.quality_gate?{frontend:l.quality_gate.frontend,backend:l.quality_gate.backend,preflight_command:l.quality_gate.preflight??"pnpm preflight",summary:"format/lint/typecheck/build"}:void 0,tools:l.tools?.map(d=>({id:d.id,label:d.label,category:d.category,description:d.description,guidance:d.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"),kg((0,ir.join)(qr,"..","templates"));let d=e.stack_profile??"fastapi-react";try{r=Cm(d,(0,ir.join)(qr,"..","stacks"))}catch(f){console.error(`[GoDD] \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${d}' \u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(f)}`),console.error("[GoDD] \u6700\u5C0F\u9650\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u8D77\u52D5\u3057\u307E\u3059"),r={name:d,stacks:[]}}}}else{let l=(0,ir.join)(qr,"..",".keys","public.pem");(0,ao.existsSync)(l)&&zg((0,ao.readFileSync)(l,"utf-8"));try{Ag(e.license_key,e.stack_profile??"fastapi-react")}catch(h){h instanceof $t&&(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${h.message}`),process.exit(1)),console.error(`[GoDD] \u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u3067\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC: ${Ne(h)}`),process.exit(1)}let d=e.stack_profile??"fastapi-react";try{r=Cm(d,(0,ir.join)(qr,"..","stacks"))}catch(h){console.error(`[GoDD] \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${d}' \u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(h)}`),console.error("[GoDD] \u6700\u5C0F\u9650\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u8D77\u52D5\u3057\u307E\u3059"),r={name:d,stacks:[]}}await y1(e.license_key)||kg((0,ir.join)(qr,"..","templates"))}let n={profile:r,config:e},o=new qc({name:"godd-mcp-server",version:l5()});async function i(l){return t&&await N1(e.registry_url,e.license_key),l()}let s=[];function a(l,d,f,h){let g=f.shape;o.tool(l,d,g,async y=>({content:[{type:"text",text:await i(()=>h(n,f.parse(y)))}]})),s.push({name:l,description:d,params:Object.keys(g)})}function c(l,d,f,h){let g=f.shape;o.tool(l,d,g,async y=>({content:[{type:"text",text:await h(f.parse(y))}]})),s.push({name:l,description:d,params:Object.keys(g)})}a(L1,Z1,q1,F1),a(B1,V1,H1,G1),a(K1,J1,Y1,Q1),a(e2,t2,r2,n2),a(i2,s2,a2,c2),a(l2,p2,d2,f2),a(m2,g2,y2,_2),a(b2,x2,w2,k2),a($2,T2,P2,C2),a(I2,z2,R2,A2),a(N2,D2,j2,M2),a(Z2,q2,F2,U2),a(V2,H2,G2,W2),a(J2,Y2,Q2,X2),a(t$,r$,n$,o$),a(s$,a$,c$,u$),a(p$,d$,f$,h$),a(g$,y$,_$,v$),a(x$,w$,k$,S$),a(T$,P$,C$,E$),a(z$,R$,A$,O$),a(D$,j$,M$,L$),a(q$,F$,U$,B$),a(H$,G$,W$,K$),a(Y$,Q$,X$,eT),a(rT,nT,oT,iT),a(aT,cT,uT,lT),a(dT,fT,hT,mT),c(_T,vT,bT,xT);let u=r?.tools??[];u.length>0&&o.resource("ecosystem-tool",new _s("godd://tools/{toolId}",{list:async()=>({resources:u.map(l=>({uri:`godd://tools/${l.id}`,name:l.label,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolId:d})=>{let f=u.find(g=>g.id===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.label}`,"",`- **\u30AB\u30C6\u30B4\u30EA**: ${f.category}`,`- **\u8AAC\u660E**: ${f.description}`];return f.guidance&&h.push("","## \u5229\u7528\u30AC\u30A4\u30C0\u30F3\u30B9","",f.guidance),"url"in f&&f.url&&h.push("",`- **\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8**: ${f.url}`),{contents:[{uri:l.href,text:h.join(`
260
- `),mimeType:"text/plain"}]}}),o.resource("mcp-tool",new _s("godd://mcp-tools/{toolName}",{list:async()=>({resources:s.map(l=>({uri:`godd://mcp-tools/${l.name}`,name:l.name,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolName:d})=>{let f=s.find(g=>g.name===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.name}`,"",f.description,"","## \u30D1\u30E9\u30E1\u30FC\u30BF","",...f.params.map(g=>`- \`${g}\``)];return{contents:[{uri:l.href,text:h.join(`
261
- `),mimeType:"text/plain"}]}});let p=new Uc;await o.connect(p)}var ir,Og,ao,PT,qr,d5,CT=_(()=>{"use strict";fw();gw();Em();Ko();_1();S1();I1();z1();D1();U1();W1();X1();o2();u2();h2();v2();S2();E2();O2();L2();B2();K2();e$();i$();l$();m$();b$();$$();I$();N$();Z$();V$();J$();tT();sT();pT();gT();wT();ST();ir=require("node:path"),Og=require("node:url"),ao=require("node:fs"),PT={};try{qr=(0,ir.dirname)((0,Og.fileURLToPath)(PT.url))}catch{qr=(0,ir.dirname)(process.execPath)}d5=(()=>{try{let e=(0,Og.fileURLToPath)(PT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();d5&&$T().catch(e=>{console.error("GoDD MCP Server \u8D77\u52D5\u30A8\u30E9\u30FC:",e),process.exit(1)})});var OT={};Br(OT,{buildMcpServerEntry:()=>Ng,runInit:()=>AT});function ai(e){return new Promise(t=>{RT.question(e,r=>t(r.trim()))})}function f5(e){let t=new Map;for(let n of e){let o=g5[n.name]??n.category,i=t.get(o)??[];i.push(n),t.set(o,i)}return["language","frontend-ui","frontend-css","frontend-build","frontend","backend-api","backend-orm","backend-task","backend","runtime","database","infra","architecture"].filter(n=>t.has(n)).map(n=>({category:n,components:t.get(n)}))}function y5(e,t){let r=m5[e];return r===void 0||r.length===0?!0:r.some(n=>t.has(n))}function _5(){return!!process.pkg}async function v5(e,t){try{let r=await fetch(`${e}/v1/components`,{headers:{Authorization:`Bearer ${t}`}});return r.ok?await r.json():null}catch{return null}}function b5(e,t,r,n){return["# GoDD MCP Server Configuration","# Generated by godd-init","",`license_key: "${e}"`,"","# \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8","components:",...t.map(i=>` - ${i}`),"",`language: "${r}"`,"","# Registry API URL (default: production endpoint)",`# registry_url: "${n}"`,""].join(`
262
- `)}function Ng(e){if(_5())return{command:"godd",args:["server"],env:{GODD_CONFIG:e}};let t;try{t=(0,Dg.fileURLToPath)(NT.url)}catch{typeof __filename<"u"?t=__filename:(t=process.argv[1]??process.execPath,console.warn(`[GoDD] import.meta.url / __filename \u304C\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002process.argv[1] \u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${t}`))}let r=(0,Tt.dirname)(t),n=t.includes("src")?(0,Tt.resolve)(r,"..","..","dist","godd.js"):(0,Tt.resolve)(r,"godd.js");return{command:process.execPath,args:[n,"server"],env:{GODD_CONFIG:e}}}async function AT(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD MCP Server \u2014 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=await ai("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: ");e||(console.error("\u30A8\u30E9\u30FC: \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let r=await ai("\u4F7F\u7528\u8A00\u8A9E\u3092\u9078\u629E [ja/en/zh/ru/kz/tr] (default: ja): ")||"ja",o=await ai("Registry API URL (default: http://localhost:8100): ")||"http://localhost:8100",i=Zs();i||(console.error(`
259
+ \u26A0 MCP \u30B5\u30FC\u30D0\u30FC\u306E\u518D\u8D77\u52D5\u304C\u5FC5\u8981\u3067\u3059\uFF08Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF09\u3002`}var yn,_T,vT,bT,wT=_(()=>{"use strict";pe();yn=require("node:fs");Pm();Em();_T="godd_config",vT="config.godd \u306E\u8868\u793A\u30FB\u66F4\u65B0\u3092\u884C\u3044\u307E\u3059\u3002show \u3067\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3001update \u3067\u6307\u5B9A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u3067\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",bT=g.object({action:g.enum(["show","update"]).describe("show=\u73FE\u5728\u306E\u8A2D\u5B9A\u3092\u8868\u793A, update=\u8A2D\u5B9A\u3092\u66F4\u65B0"),license_key:g.string().min(1,"license_key \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08action=update \u6642\u306E\u307F\uFF09"),components:g.array(g.string().min(1).max(1e3)).min(1,"components \u306F\u7A7A\u914D\u5217\u306B\u3067\u304D\u307E\u305B\u3093").optional().describe("\u66F4\u65B0\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u914D\u5217\uFF08action=update \u6642\u306E\u307F\uFF09"),language:g.string().min(1,"language \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B\u8A00\u8A9E\uFF08action=update \u6642\u306E\u307F\uFF09"),registry_url:g.string().min(1,"registry_url \u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093").url("registry_url \u306F\u6709\u52B9\u306A URL \u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093").max(1e3).optional().describe("\u66F4\u65B0\u3059\u308B Registry URL\uFF08action=update \u6642\u306E\u307F\uFF09")})});function zg(e){Ig=e}function kT(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");return Buffer.from(t,"base64")}function Ag(e){return c5.test(e.trim())}function u5(e){let t=e.trim();if(Ag(t))throw new $t("Registry \u767A\u884C\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F Registry API \u3067\u691C\u8A3C\u3057\u3066\u304F\u3060\u3055\u3044");let r=t.split(".");if(r.length!==2)throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059");let[n,o]=r;if(Ig){let c=(0,Du.createPublicKey)(Ig),u=kT(o);if(!(0,Du.verify)(null,Buffer.from(n),c,u))throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u7F72\u540D\u304C\u7121\u52B9\u3067\u3059")}else if(process.env.SKIP_LICENSE_VERIFY!=="true")throw new $t("\u516C\u958B\u9375\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u304C\u3067\u304D\u307E\u305B\u3093");let i=kT(n).toString("utf-8"),s;try{s=JSON.parse(i)}catch{throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}if(s.v!==1)throw new $t(`\u672A\u5BFE\u5FDC\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3: ${s.v}`);let a=new Date(s.exp);if(isNaN(a.getTime()))throw new $t("\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u4E0D\u6B63\u3067\u3059");if(a<new Date)throw new $t(`\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\uFF08${s.exp}\uFF09`);return s}function Rg(e,t){let r=u5(e);if(r.stack&&r.stack!==t)throw new $t(`\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 Du,c5,Ig,$t,ST=_(()=>{"use strict";Du=require("node:crypto"),c5=/^godd-[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Ig="";$t=class extends Error{constructor(t){super(t),this.name="LicenseError"}}});var TT={};Br(TT,{startServer:()=>$T});function l5(){try{let e=(0,ir.join)(qr,"..","package.json");return JSON.parse((0,ao.readFileSync)(e,"utf-8")).version??"0.0.0"}catch{return"0.0.0"}}async function p5(e){let t=e.components??[];if(t.length===0)return null;let r=await C1(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");try{let n=JSON.parse(r.data);return Ls(n),n}catch{console.error("[GoDD] \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002Registry API \u304B\u3089\u518D\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3059")}}try{let n=E1(t,e.language),o=await w1(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");try{let i=JSON.parse(r.data);return Ls(i),i}catch{console.error("[GoDD] 304 \u30AD\u30E3\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}}if(o){let i=await k1(o.bundle,e.license_key);Ls(i);let s=JSON.stringify(i);return await P1(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: ${Ne(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");try{let n=JSON.parse(r.data);return Ls(n),n}catch{console.error("[GoDD] \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u306E JSON \u30D1\u30FC\u30B9\u306B\u3082\u5931\u6557\u3057\u307E\u3057\u305F")}}return null}async function $T(){let e=kk(),t=e.components&&e.components.length>0,r;if(t){try{let d=await x1(e);d.valid||(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${d.error??"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"}`),process.exit(1))}catch(d){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: ${Ne(d)}`),Ag(e.license_key)&&(console.error("[GoDD] Registry \u767A\u884C\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F\u30ED\u30FC\u30AB\u30EB\u7F72\u540D\u691C\u8A3C\u3067\u304D\u307E\u305B\u3093\u3002registry_url \u3068\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let f=(0,ir.join)(qr,"..",".keys","public.pem");(0,ao.existsSync)(f)&&zg((0,ao.readFileSync)(f,"utf-8"));try{let h=e.components?.[0]??e.stack_profile??"fastapi-react";Rg(e.license_key,h)}catch(h){h instanceof $t?console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC (\u30ED\u30FC\u30AB\u30EB\u691C\u8A3C): ${h.message}`):console.error(`[GoDD] \u30ED\u30FC\u30AB\u30EB\u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u3067\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC: ${Ne(h)}`),process.exit(1)}}try{await Cg(e.registry_url,e.license_key)}catch(d){console.error("\u30EA\u30DD\u30B8\u30C8\u30EA\u691C\u8A3C\u30A8\u30E9\u30FC:",Ne(d)),console.error(" godd init \u3092\u518D\u5B9F\u884C\u3059\u308B\u304B\u3001Registry API \u304C\u8D77\u52D5\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)}let l=await p5(e);if(l)r={name:`registry:${e.components.join("+")}`,stacks:e.components.map(d=>({id:d,label:d,name:d})),quality_gate:l.quality_gate?{frontend:l.quality_gate.frontend,backend:l.quality_gate.backend,preflight_command:l.quality_gate.preflight??"pnpm preflight",summary:"format/lint/typecheck/build"}:void 0,tools:l.tools?.map(d=>({id:d.id,label:d.label,category:d.category,description:d.description,guidance:d.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"),kg((0,ir.join)(qr,"..","templates"));let d=e.stack_profile??"fastapi-react";try{r=Cm(d,(0,ir.join)(qr,"..","stacks"))}catch(f){console.error(`[GoDD] \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${d}' \u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(f)}`),console.error("[GoDD] \u6700\u5C0F\u9650\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u8D77\u52D5\u3057\u307E\u3059"),r={name:d,stacks:[]}}}}else{let l=(0,ir.join)(qr,"..",".keys","public.pem");(0,ao.existsSync)(l)&&zg((0,ao.readFileSync)(l,"utf-8"));try{Rg(e.license_key,e.stack_profile??"fastapi-react")}catch(h){h instanceof $t&&(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${h.message}`),process.exit(1)),console.error(`[GoDD] \u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u3067\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC: ${Ne(h)}`),process.exit(1)}let d=e.stack_profile??"fastapi-react";try{r=Cm(d,(0,ir.join)(qr,"..","stacks"))}catch(h){console.error(`[GoDD] \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${d}' \u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${Ne(h)}`),console.error("[GoDD] \u6700\u5C0F\u9650\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u8D77\u52D5\u3057\u307E\u3059"),r={name:d,stacks:[]}}await y1(e.license_key)||kg((0,ir.join)(qr,"..","templates"))}let n={profile:r,config:e},o=new qc({name:"godd-mcp-server",version:l5()});async function i(l){return t&&await N1(e.registry_url,e.license_key),l()}let s=[];function a(l,d,f,h){let m=f.shape;o.tool(l,d,m,async y=>({content:[{type:"text",text:await i(()=>h(n,f.parse(y)))}]})),s.push({name:l,description:d,params:Object.keys(m)})}function c(l,d,f,h){let m=f.shape;o.tool(l,d,m,async y=>({content:[{type:"text",text:await h(f.parse(y))}]})),s.push({name:l,description:d,params:Object.keys(m)})}a(L1,Z1,q1,F1),a(B1,H1,V1,G1),a(K1,J1,Y1,Q1),a(e2,t2,r2,n2),a(i2,s2,a2,c2),a(l2,p2,d2,f2),a(m2,g2,y2,_2),a(b2,x2,w2,k2),a($2,T2,P2,C2),a(I2,z2,A2,R2),a(N2,D2,j2,M2),a(Z2,q2,F2,U2),a(H2,V2,G2,W2),a(J2,Y2,Q2,X2),a(t$,r$,n$,o$),a(s$,a$,c$,u$),a(p$,d$,f$,h$),a(g$,y$,_$,v$),a(x$,w$,k$,S$),a(T$,P$,C$,E$),a(z$,A$,R$,O$),a(D$,j$,M$,L$),a(q$,F$,U$,B$),a(V$,G$,W$,K$),a(Y$,Q$,X$,eT),a(rT,nT,oT,iT),a(aT,cT,uT,lT),a(dT,fT,hT,mT),c(_T,vT,bT,xT);let u=r?.tools??[];u.length>0&&o.resource("ecosystem-tool",new _s("godd://tools/{toolId}",{list:async()=>({resources:u.map(l=>({uri:`godd://tools/${l.id}`,name:l.label,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolId:d})=>{let f=u.find(m=>m.id===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.label}`,"",`- **\u30AB\u30C6\u30B4\u30EA**: ${f.category}`,`- **\u8AAC\u660E**: ${f.description}`];return f.guidance&&h.push("","## \u5229\u7528\u30AC\u30A4\u30C0\u30F3\u30B9","",f.guidance),"url"in f&&f.url&&h.push("",`- **\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8**: ${f.url}`),{contents:[{uri:l.href,text:h.join(`
260
+ `),mimeType:"text/plain"}]}}),o.resource("mcp-tool",new _s("godd://mcp-tools/{toolName}",{list:async()=>({resources:s.map(l=>({uri:`godd://mcp-tools/${l.name}`,name:l.name,description:l.description,mimeType:"text/plain"}))})}),async(l,{toolName:d})=>{let f=s.find(m=>m.name===String(d));if(!f)return{contents:[{uri:l.href,text:"Tool not found"}]};let h=[`# ${f.name}`,"",f.description,"","## \u30D1\u30E9\u30E1\u30FC\u30BF","",...f.params.map(m=>`- \`${m}\``)];return{contents:[{uri:l.href,text:h.join(`
261
+ `),mimeType:"text/plain"}]}});let p=new Uc;await o.connect(p)}var ir,Og,ao,PT,qr,d5,CT=_(()=>{"use strict";fw();gw();Em();Ko();_1();S1();I1();z1();D1();U1();W1();X1();o2();u2();h2();v2();S2();E2();O2();L2();B2();K2();e$();i$();l$();m$();b$();$$();I$();N$();Z$();H$();J$();tT();sT();pT();gT();wT();ST();ir=require("node:path"),Og=require("node:url"),ao=require("node:fs"),PT={};try{qr=(0,ir.dirname)((0,Og.fileURLToPath)(PT.url))}catch{qr=(0,ir.dirname)(process.execPath)}d5=(()=>{try{let e=(0,Og.fileURLToPath)(PT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();d5&&$T().catch(e=>{console.error("GoDD MCP Server \u8D77\u52D5\u30A8\u30E9\u30FC:",e),process.exit(1)})});var OT={};Br(OT,{buildMcpServerEntry:()=>Ng,runInit:()=>RT});function ai(e){return new Promise(t=>{AT.question(e,r=>t(r.trim()))})}function f5(e){let t=new Map;for(let n of e){let o=g5[n.name]??n.category,i=t.get(o)??[];i.push(n),t.set(o,i)}return["language","frontend-ui","frontend-css","frontend-build","frontend","backend-api","backend-orm","backend-task","backend","runtime","database","infra","architecture"].filter(n=>t.has(n)).map(n=>({category:n,components:t.get(n)}))}function y5(e,t){let r=m5[e];return r===void 0||r.length===0?!0:r.some(n=>t.has(n))}function _5(){return!!process.pkg}async function v5(e,t){try{let r=await fetch(`${e}/v1/components`,{headers:{Authorization:`Bearer ${t}`}});return r.ok?await r.json():null}catch{return null}}function b5(e,t,r,n){return["# GoDD MCP Server Configuration","# Generated by godd-init","",`license_key: "${e}"`,"","# \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8","components:",...t.map(i=>` - ${i}`),"",`language: "${r}"`,"","# Registry API URL (default: production endpoint)",`# registry_url: "${n}"`,""].join(`
262
+ `)}function Ng(e){if(_5())return{command:"godd",args:["server"],env:{GODD_CONFIG:e}};let t;try{t=(0,Dg.fileURLToPath)(NT.url)}catch{typeof __filename<"u"?t=__filename:(t=process.argv[1]??process.execPath,console.warn(`[GoDD] import.meta.url / __filename \u304C\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002process.argv[1] \u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${t}`))}let r=(0,Tt.dirname)(t),n=t.includes("src")?(0,Tt.resolve)(r,"..","..","dist","godd.js"):(0,Tt.resolve)(r,"godd.js");return{command:process.execPath,args:[n,"server"],env:{GODD_CONFIG:e}}}async function RT(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD MCP Server \u2014 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=await ai("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: ");e||(console.error("\u30A8\u30E9\u30FC: \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let r=await ai("\u4F7F\u7528\u8A00\u8A9E\u3092\u9078\u629E [ja/en/zh/ru/kz/tr] (default: ja): ")||"ja",o=await ai("Registry API URL (default: http://localhost:8100): ")||"http://localhost:8100",i=Zs();i||(console.error(`
263
263
  \u30A8\u30E9\u30FC: Git \u30EA\u30E2\u30FC\u30C8 (origin) \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002`),console.error(" git remote add origin <url> \u3067\u30EA\u30E2\u30FC\u30C8\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),console.log(`
264
264
  \u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u767B\u9332\u4E2D: ${i}`);try{let T=await fetch(`${o}/v1/repos/register`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({remote_url:i}),signal:AbortSignal.timeout(1e4)});if(!T.ok){let U=await T.json().catch(()=>({detail:T.statusText}));console.error(`
265
265
  \u30A8\u30E9\u30FC: \u30EA\u30DD\u30B8\u30C8\u30EA\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002`),console.error(` ${U.detail??T.statusText}`),T.status===401?console.error(" \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u304C\u7121\u52B9\u3067\u3059\u3002"):T.status===403&&console.error(" \u30EA\u30DD\u30B8\u30C8\u30EA\u6570\u306E\u4E0A\u9650\u306B\u9054\u3057\u3066\u3044\u307E\u3059\u3002\u7BA1\u7406\u8005\u306B\u9023\u7D61\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)}console.log("\u2713 \u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u767B\u9332\u3057\u307E\u3057\u305F")}catch{console.error(`
266
266
  \u30A8\u30E9\u30FC: Registry API \u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3002`),console.error(` ${o} \u304C\u8D77\u52D5\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`),process.exit(1)}console.log(`
267
267
  \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u4E2D...`);let s=await v5(o,e)??ET;console.log(s===ET?" Registry API \u306B\u63A5\u7D9A\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u30D3\u30EB\u30C8\u30A4\u30F3\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002":` ${s.length} \u4EF6\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F\u3002`);let a=f5(s),c=new Set,u=new Set;function p(T){return a.find(U=>U.category===T)}async function l(T,U){let Q=h5[T.category]??T.category,Ie=U?T.components.filter(we=>y5(we.name,u)):T.components;if(Ie.length===0){console.log(` \u3010${Q}\u3011 \u2014 \u5BFE\u5FDC\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u30B9\u30AD\u30C3\u30D7\uFF09`);return}console.log(`
268
- \u3010${Q}\u3011`),Ie.forEach((we,Qe)=>{console.log(` ${String(Qe+1).padStart(2)}. ${we.label.padEnd(25)} ${we.description}`)});let ht=await ai(" \u9078\u629E (\u4F8B: 1,3): ");if(ht.toLowerCase()==="all")for(let we of Ie)c.add(we.name);else if(ht){let we=ht.split(",").map(Qe=>parseInt(Qe.trim(),10));for(let Qe of we)Qe>=1&&Qe<=Ie.length&&c.add(Ie[Qe-1].name)}}let d=[{step:1,title:"\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E",categories:["language"]},{step:2,title:"\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF / \u30E9\u30A4\u30D6\u30E9\u30EA",categories:["frontend-ui","backend-api","frontend","backend"]},{step:3,title:"\u95A2\u9023\u30C4\u30FC\u30EB\uFF08CSS / \u30D3\u30EB\u30C9 / ORM / \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC / \u30E9\u30F3\u30BF\u30A4\u30E0\uFF09",categories:["frontend-css","frontend-build","backend-orm","backend-task","runtime"]},{step:4,title:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",categories:["database"]},{step:5,title:"\u30A4\u30F3\u30D5\u30E9",categories:["infra"]}],f=d.length;console.log(`
268
+ \u3010${Q}\u3011`),Ie.forEach((we,Xe)=>{console.log(` ${String(Xe+1).padStart(2)}. ${we.label.padEnd(25)} ${we.description}`)});let ht=await ai(" \u9078\u629E (\u4F8B: 1,3): ");if(ht.toLowerCase()==="all")for(let we of Ie)c.add(we.name);else if(ht){let we=ht.split(",").map(Xe=>parseInt(Xe.trim(),10));for(let Xe of we)Xe>=1&&Xe<=Ie.length&&c.add(Ie[Xe-1].name)}}let d=[{step:1,title:"\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E",categories:["language"]},{step:2,title:"\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF / \u30E9\u30A4\u30D6\u30E9\u30EA",categories:["frontend-ui","backend-api","frontend","backend"]},{step:3,title:"\u95A2\u9023\u30C4\u30FC\u30EB\uFF08CSS / \u30D3\u30EB\u30C9 / ORM / \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC / \u30E9\u30F3\u30BF\u30A4\u30E0\uFF09",categories:["frontend-css","frontend-build","backend-orm","backend-task","runtime"]},{step:4,title:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",categories:["database"]},{step:5,title:"\u30A4\u30F3\u30D5\u30E9",categories:["infra"]}],f=d.length;console.log(`
269
269
  \u2501\u2501\u2501 \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u9078\u629E\uFF08${f} \u30B9\u30C6\u30C3\u30D7 + \u81EA\u52D5\u8A2D\u5B9A\uFF09\u2501\u2501\u2501`),console.log(`\u8907\u6570\u9078\u629E: "1,3,5" / \u5168\u9078\u629E: "all" / \u30B9\u30AD\u30C3\u30D7: Enter
270
270
  `);for(let T of d){console.log(`
271
271
  \u2554\u2500 Step ${T.step}/${f}: ${T.title}`);for(let U of T.categories){let Q=p(U);Q&&await l(Q,T.step!==1)}if(T.step===1){let U=p("language");if(U)for(let Q of U.components)c.has(Q.name)&&u.add(Q.name);u.size===0&&(console.error(`
@@ -273,18 +273,18 @@ ${yT(s)}\`\`\`
273
273
  \u2192 \u9078\u629E\u8A00\u8A9E: ${[...u].join(", ")}`),console.log(" \u4EE5\u964D\u306F\u9078\u629E\u3055\u308C\u305F\u8A00\u8A9E\u306B\u5BFE\u5FDC\u3059\u308B\u6280\u8853\u306E\u307F\u8868\u793A\u3057\u307E\u3059\u3002")}console.log(`\u255A\u2500 Step ${T.step} \u5B8C\u4E86`)}let h=p("architecture");if(h){for(let U of h.components)c.add(U.name);let T=h.components.map(U=>U.label).join(", ");console.log(`
274
274
  \u2714 \u8A2D\u8A08\u30D1\u30BF\u30FC\u30F3\u3092\u81EA\u52D5\u8A2D\u5B9A\u3057\u307E\u3057\u305F: ${T}`)}c.size===0&&(console.error(`
275
275
  \u30A8\u30E9\u30FC: \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C1\u3064\u3082\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002`),process.exit(1)),console.log(`
276
- \u2501\u2501\u2501 \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 (${c.size} \u4EF6) \u2501\u2501\u2501`);for(let T of c){let U=s.find(Q=>Q.name===T);console.log(` \u2713 ${U?.label??T}`)}let g=process.cwd(),y=(0,Tt.join)(g,"config.godd"),v=await ai(`
276
+ \u2501\u2501\u2501 \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 (${c.size} \u4EF6) \u2501\u2501\u2501`);for(let T of c){let U=s.find(Q=>Q.name===T);console.log(` \u2713 ${U?.label??T}`)}let m=process.cwd(),y=(0,Tt.join)(m,"config.godd"),v=await ai(`
277
277
  config.godd \u306E\u4FDD\u5B58\u5148 (default: ${y}): `)||y,k=b5(e,[...c],r,o);if((0,Gt.writeFileSync)(v,k,"utf-8"),console.log(`
278
- \u2713 config.godd \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${v}`),(await ai(".cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: ")).toLowerCase()!=="n"){let T=(0,Tt.join)(g,".cursor"),U=(0,Tt.resolve)((0,Tt.join)(T,"mcp.json")),Q=(0,Tt.resolve)((0,Tt.join)((0,zT.homedir)(),".cursor","mcp.json"));if(U===Q){let Ie={godd:Ng((0,Tt.resolve)(v))};console.log(`
278
+ \u2713 config.godd \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${v}`),(await ai(".cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: ")).toLowerCase()!=="n"){let T=(0,Tt.join)(m,".cursor"),U=(0,Tt.resolve)((0,Tt.join)(T,"mcp.json")),Q=(0,Tt.resolve)((0,Tt.join)((0,zT.homedir)(),".cursor","mcp.json"));if(U===Q){let Ie={godd:Ng((0,Tt.resolve)(v))};console.log(`
279
279
  \u26A0 \u30E6\u30FC\u30B6\u30FC\u30B0\u30ED\u30FC\u30D0\u30EB\u306E MCP \u8A2D\u5B9A\u3092\u4E0A\u66F8\u304D\u3057\u306A\u3044\u305F\u3081\u3001\u30D5\u30A1\u30A4\u30EB\u306B\u306F\u66F8\u304D\u8FBC\u307F\u307E\u305B\u3093\u3002`),console.log(` \u4EE5\u4E0B\u306E\u30D6\u30ED\u30C3\u30AF\u3092\u624B\u52D5\u3067 ${Q} \u306E mcpServers \u306B\u8FFD\u8A18\u3057\u3066\u304F\u3060\u3055\u3044:
280
280
  `),console.log(JSON.stringify(Ie,null,2)),console.log("")}else{(0,Gt.existsSync)(T)||(0,Gt.mkdirSync)(T,{recursive:!0});let Ie={mcpServers:{}};if((0,Gt.existsSync)(U))try{Ie={...JSON.parse((0,Gt.readFileSync)(U,"utf-8"))},(typeof Ie.mcpServers!="object"||Ie.mcpServers===null)&&(Ie.mcpServers={})}catch{console.warn(`\u26A0 \u65E2\u5B58\u306E ${U} \u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u65E2\u5B58\u8A2D\u5B9A\u3092\u4FDD\u6301\u3057\u305F\u307E\u307E godd \u30A8\u30F3\u30C8\u30EA\u306E\u307F\u8FFD\u52A0\u3057\u307E\u3059\u3002`);let we=`${U}.bak`;(0,Gt.writeFileSync)(we,(0,Gt.readFileSync)(U,"utf-8"),"utf-8"),console.warn(` \u30D0\u30C3\u30AF\u30A2\u30C3\u30D7: ${we}`)}let ht={...Ie.mcpServers};ht.godd=Ng((0,Tt.resolve)(v)),Ie.mcpServers=ht,(0,Gt.writeFileSync)(U,JSON.stringify(Ie,null,2),"utf-8"),console.log(`\u2713 .cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${U}`)}}console.log(`
281
- \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`),console.log("\u2551 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(" 2. \u30C1\u30E3\u30C3\u30C8\u3067 GoDD MCP \u30C4\u30FC\u30EB\u304C\u4F7F\u3048\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059"),console.log(" - godd_dev: \u958B\u767A\u652F\u63F4"),console.log(" - godd_check: \u30B3\u30FC\u30C9\u30C1\u30A7\u30C3\u30AF"),console.log(" - godd_review: \u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC"),console.log(" - godd_setup: \u74B0\u5883\u69CB\u7BC9\u652F\u63F4"),console.log(" \u4ED6 12 \u30C4\u30FC\u30EB"),console.log(""),RT.close()}var IT,Gt,Tt,Dg,zT,NT,ET,RT,h5,m5,g5,x5,DT=_(()=>{"use strict";IT=st(require("node:readline"),1),Gt=require("node:fs"),Tt=require("node:path"),Dg=require("node:url"),zT=require("node:os");Tg();NT={},ET=[{id:"",name:"python",category:"language",label:"Python",description:"\u6C4E\u7528\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"typescript",category:"language",label:"TypeScript",description:"\u578B\u5B89\u5168\u306A JavaScript \u30B9\u30FC\u30D1\u30FC\u30BB\u30C3\u30C8"},{id:"",name:"javascript",category:"language",label:"JavaScript",description:"\u52D5\u7684\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E (ES2024+)"},{id:"",name:"go",category:"language",label:"Go",description:"\u9759\u7684\u578B\u4ED8\u3051\u30B3\u30F3\u30D1\u30A4\u30EB\u8A00\u8A9E"},{id:"",name:"php",category:"language",label:"PHP",description:"\u6C4E\u7528\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E"},{id:"",name:"ruby",category:"language",label:"Ruby",description:"\u52D5\u7684\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u6307\u5411\u8A00\u8A9E"},{id:"",name:"c",category:"language",label:"C",description:"\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"html",category:"language",label:"HTML",description:"HyperText Markup Language"},{id:"",name:"css",category:"language",label:"CSS",description:"Cascading Style Sheets"},{id:"",name:"react",category:"frontend",label:"React",description:"React UI \u30E9\u30A4\u30D6\u30E9\u30EA"},{id:"",name:"nextjs",category:"frontend",label:"Next.js",description:"React \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (SSR/SSG/ISR)"},{id:"",name:"vue",category:"frontend",label:"Vue.js",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 JavaScript \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"angular",category:"frontend",label:"Angular",description:"TypeScript \u30D9\u30FC\u30B9 Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"svelte",category:"frontend",label:"Svelte",description:"\u30B3\u30F3\u30D1\u30A4\u30EB\u6642 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"vite",category:"frontend",label:"Vite",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB"},{id:"",name:"tailwind",category:"frontend",label:"Tailwind CSS",description:"\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u30D5\u30A1\u30FC\u30B9\u30C8 CSS"},{id:"",name:"sass",category:"frontend",label:"Sass",description:"CSS \u30D7\u30EA\u30D7\u30ED\u30BB\u30C3\u30B5"},{id:"",name:"electron",category:"frontend",label:"Electron",description:"\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\u30A2\u30D7\u30EA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastapi",category:"backend",label:"FastAPI",description:"\u9AD8\u901F Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"django",category:"backend",label:"Django",description:"Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (batteries included)"},{id:"",name:"flask",category:"backend",label:"Flask",description:"Python \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"express",category:"backend",label:"Express",description:"\u6700\u5C0F\u9650\u306E Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastify",category:"backend",label:"Fastify",description:"\u9AD8\u901F Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"nestjs",category:"backend",label:"NestJS",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 Node.js \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"gin",category:"backend",label:"Gin",description:"Go HTTP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"echo",category:"backend",label:"Echo",description:"\u9AD8\u6027\u80FD Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fiber",category:"backend",label:"Fiber",description:"Express \u98A8 Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"laravel",category:"backend",label:"Laravel",description:"PHP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"symfony",category:"backend",label:"Symfony",description:"PHP \u30A8\u30F3\u30BF\u30FC\u30D7\u30E9\u30A4\u30BA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"wordpress",category:"backend",label:"WordPress",description:"PHP CMS \u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"rails",category:"backend",label:"Ruby on Rails",description:"Ruby Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (MVC)"},{id:"",name:"sinatra",category:"backend",label:"Sinatra",description:"Ruby \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"koa",category:"backend",label:"Koa",description:"\u6B21\u4E16\u4EE3 Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"node",category:"runtime",label:"Node.js",description:"JavaScript \u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"agent-stdio",category:"runtime",label:"Agent Stdio",description:"MCP Agent stdio \u5B9F\u884C\u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"postgresql",category:"database",label:"PostgreSQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mysql",category:"database",label:"MySQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mongodb",category:"database",label:"MongoDB",description:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u6307\u5411 NoSQL DB"},{id:"",name:"redis",category:"database",label:"Redis",description:"\u30A4\u30F3\u30E1\u30E2\u30EA KVS / \u30AD\u30E3\u30C3\u30B7\u30E5"},{id:"",name:"sqlalchemy",category:"backend",label:"SQLAlchemy",description:"Python SQL \u30C4\u30FC\u30EB\u30AD\u30C3\u30C8 + ORM"},{id:"",name:"celery",category:"backend",label:"Celery",description:"\u5206\u6563\u30BF\u30B9\u30AF\u30AD\u30E5\u30FC"},{id:"",name:"docker",category:"infra",label:"Docker",description:"\u30B3\u30F3\u30C6\u30CA\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"terraform",category:"infra",label:"Terraform",description:"IaC \u30C4\u30FC\u30EB (HashiCorp)"},{id:"",name:"ddd-clean-architecture",category:"architecture",label:"DDD / Clean Architecture",description:"\u30C9\u30E1\u30A4\u30F3\u99C6\u52D5\u8A2D\u8A08 + Clean Architecture"}],RT=IT.createInterface({input:process.stdin,output:process.stdout});h5={language:"\u8A00\u8A9E","frontend-ui":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","frontend-css":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 CSS","frontend-build":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",frontend:"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6","backend-api":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 API \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","backend-orm":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 ORM / DB \u30C4\u30FC\u30EB","backend-task":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC",backend:"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6",runtime:"\u30E9\u30F3\u30BF\u30A4\u30E0",database:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",infra:"\u30A4\u30F3\u30D5\u30E9",architecture:"\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3"},m5={fastapi:["python"],django:["python"],flask:["python"],sqlalchemy:["python"],celery:["python"],express:["typescript","javascript"],fastify:["typescript","javascript"],nestjs:["typescript","javascript"],koa:["typescript","javascript"],gin:["go"],echo:["go"],fiber:["go"],laravel:["php"],symfony:["php"],wordpress:["php"],rails:["ruby"],sinatra:["ruby"],react:["typescript","javascript"],nextjs:["typescript","javascript"],vue:["typescript","javascript"],angular:["typescript","javascript"],svelte:["typescript","javascript"],vite:["typescript","javascript"],electron:["typescript","javascript"],tailwind:[],sass:[],node:["typescript","javascript"],"agent-stdio":[]},g5={react:"frontend-ui",nextjs:"frontend-ui",vue:"frontend-ui",angular:"frontend-ui",svelte:"frontend-ui",electron:"frontend-ui",tailwind:"frontend-css",sass:"frontend-css",vite:"frontend-build",fastapi:"backend-api",django:"backend-api",flask:"backend-api",express:"backend-api",fastify:"backend-api",nestjs:"backend-api",gin:"backend-api",echo:"backend-api",fiber:"backend-api",laravel:"backend-api",symfony:"backend-api",wordpress:"backend-api",rails:"backend-api",sinatra:"backend-api",koa:"backend-api",sqlalchemy:"backend-orm",celery:"backend-task"};x5=(()=>{try{let e=(0,Dg.fileURLToPath)(NT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();x5&&AT().catch(e=>{console.error("\u30A8\u30E9\u30FC:",e),process.exit(1)})});var ZT={};Br(ZT,{runInstall:()=>T5});function w5(){if(process.platform==="win32"){let e=process.env.LOCALAPPDATA??(0,_n.join)((0,ju.homedir)(),"AppData","Local");return(0,_n.join)(e,"GoDD")}return(0,_n.join)((0,ju.homedir)(),".godd","bin")}function k5(){return process.platform==="win32"?"godd.exe":"godd"}function LT(e){let t=process.env.PATH??"",r=process.platform==="win32"?";":":";return t.split(r).map(o=>o.replace(/[\\/]+$/,"").toLowerCase()).includes(e.replace(/[\\/]+$/,"").toLowerCase())}function S5(e){if(LT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}try{let t=["$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')","if ($currentPath -and $currentPath.Length -gt 0) {",` $newPath = $currentPath + ';' + '${e.replace(/'/g,"''")}'`,"} else {",` $newPath = '${e.replace(/'/g,"''")}'`,"}","[Environment]::SetEnvironmentVariable('PATH', $newPath, 'User')"].join("; ");(0,jT.execSync)(`powershell -NoProfile -Command "${t}"`,{stdio:"pipe"}),console.log(" PATH: \u30E6\u30FC\u30B6\u30FC\u74B0\u5883\u5909\u6570\u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002")}catch{console.error(` PATH: \u81EA\u52D5\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u4EE5\u4E0B\u3092\u624B\u52D5\u3067 PATH \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044:
281
+ \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`),console.log("\u2551 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(" 2. \u30C1\u30E3\u30C3\u30C8\u3067 GoDD MCP \u30C4\u30FC\u30EB\u304C\u4F7F\u3048\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059"),console.log(" - godd_dev: \u958B\u767A\u652F\u63F4"),console.log(" - godd_check: \u30B3\u30FC\u30C9\u30C1\u30A7\u30C3\u30AF"),console.log(" - godd_review: \u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC"),console.log(" - godd_setup: \u74B0\u5883\u69CB\u7BC9\u652F\u63F4"),console.log(" \u4ED6 12 \u30C4\u30FC\u30EB"),console.log(""),AT.close()}var IT,Gt,Tt,Dg,zT,NT,ET,AT,h5,m5,g5,x5,DT=_(()=>{"use strict";IT=st(require("node:readline"),1),Gt=require("node:fs"),Tt=require("node:path"),Dg=require("node:url"),zT=require("node:os");Tg();NT={},ET=[{id:"",name:"python",category:"language",label:"Python",description:"\u6C4E\u7528\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"typescript",category:"language",label:"TypeScript",description:"\u578B\u5B89\u5168\u306A JavaScript \u30B9\u30FC\u30D1\u30FC\u30BB\u30C3\u30C8"},{id:"",name:"javascript",category:"language",label:"JavaScript",description:"\u52D5\u7684\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E (ES2024+)"},{id:"",name:"go",category:"language",label:"Go",description:"\u9759\u7684\u578B\u4ED8\u3051\u30B3\u30F3\u30D1\u30A4\u30EB\u8A00\u8A9E"},{id:"",name:"php",category:"language",label:"PHP",description:"\u6C4E\u7528\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E"},{id:"",name:"ruby",category:"language",label:"Ruby",description:"\u52D5\u7684\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u6307\u5411\u8A00\u8A9E"},{id:"",name:"c",category:"language",label:"C",description:"\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"html",category:"language",label:"HTML",description:"HyperText Markup Language"},{id:"",name:"css",category:"language",label:"CSS",description:"Cascading Style Sheets"},{id:"",name:"react",category:"frontend",label:"React",description:"React UI \u30E9\u30A4\u30D6\u30E9\u30EA"},{id:"",name:"nextjs",category:"frontend",label:"Next.js",description:"React \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (SSR/SSG/ISR)"},{id:"",name:"vue",category:"frontend",label:"Vue.js",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 JavaScript \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"angular",category:"frontend",label:"Angular",description:"TypeScript \u30D9\u30FC\u30B9 Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"svelte",category:"frontend",label:"Svelte",description:"\u30B3\u30F3\u30D1\u30A4\u30EB\u6642 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"vite",category:"frontend",label:"Vite",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB"},{id:"",name:"tailwind",category:"frontend",label:"Tailwind CSS",description:"\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u30D5\u30A1\u30FC\u30B9\u30C8 CSS"},{id:"",name:"sass",category:"frontend",label:"Sass",description:"CSS \u30D7\u30EA\u30D7\u30ED\u30BB\u30C3\u30B5"},{id:"",name:"electron",category:"frontend",label:"Electron",description:"\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\u30A2\u30D7\u30EA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastapi",category:"backend",label:"FastAPI",description:"\u9AD8\u901F Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"django",category:"backend",label:"Django",description:"Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (batteries included)"},{id:"",name:"flask",category:"backend",label:"Flask",description:"Python \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"express",category:"backend",label:"Express",description:"\u6700\u5C0F\u9650\u306E Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastify",category:"backend",label:"Fastify",description:"\u9AD8\u901F Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"nestjs",category:"backend",label:"NestJS",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 Node.js \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"gin",category:"backend",label:"Gin",description:"Go HTTP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"echo",category:"backend",label:"Echo",description:"\u9AD8\u6027\u80FD Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fiber",category:"backend",label:"Fiber",description:"Express \u98A8 Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"laravel",category:"backend",label:"Laravel",description:"PHP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"symfony",category:"backend",label:"Symfony",description:"PHP \u30A8\u30F3\u30BF\u30FC\u30D7\u30E9\u30A4\u30BA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"wordpress",category:"backend",label:"WordPress",description:"PHP CMS \u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"rails",category:"backend",label:"Ruby on Rails",description:"Ruby Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (MVC)"},{id:"",name:"sinatra",category:"backend",label:"Sinatra",description:"Ruby \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"koa",category:"backend",label:"Koa",description:"\u6B21\u4E16\u4EE3 Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"node",category:"runtime",label:"Node.js",description:"JavaScript \u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"agent-stdio",category:"runtime",label:"Agent Stdio",description:"MCP Agent stdio \u5B9F\u884C\u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"postgresql",category:"database",label:"PostgreSQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mysql",category:"database",label:"MySQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mongodb",category:"database",label:"MongoDB",description:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u6307\u5411 NoSQL DB"},{id:"",name:"redis",category:"database",label:"Redis",description:"\u30A4\u30F3\u30E1\u30E2\u30EA KVS / \u30AD\u30E3\u30C3\u30B7\u30E5"},{id:"",name:"sqlalchemy",category:"backend",label:"SQLAlchemy",description:"Python SQL \u30C4\u30FC\u30EB\u30AD\u30C3\u30C8 + ORM"},{id:"",name:"celery",category:"backend",label:"Celery",description:"\u5206\u6563\u30BF\u30B9\u30AF\u30AD\u30E5\u30FC"},{id:"",name:"docker",category:"infra",label:"Docker",description:"\u30B3\u30F3\u30C6\u30CA\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"terraform",category:"infra",label:"Terraform",description:"IaC \u30C4\u30FC\u30EB (HashiCorp)"},{id:"",name:"ddd-clean-architecture",category:"architecture",label:"DDD / Clean Architecture",description:"\u30C9\u30E1\u30A4\u30F3\u99C6\u52D5\u8A2D\u8A08 + Clean Architecture"}],AT=IT.createInterface({input:process.stdin,output:process.stdout});h5={language:"\u8A00\u8A9E","frontend-ui":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","frontend-css":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 CSS","frontend-build":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",frontend:"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6","backend-api":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 API \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","backend-orm":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 ORM / DB \u30C4\u30FC\u30EB","backend-task":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC",backend:"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6",runtime:"\u30E9\u30F3\u30BF\u30A4\u30E0",database:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",infra:"\u30A4\u30F3\u30D5\u30E9",architecture:"\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3"},m5={fastapi:["python"],django:["python"],flask:["python"],sqlalchemy:["python"],celery:["python"],express:["typescript","javascript"],fastify:["typescript","javascript"],nestjs:["typescript","javascript"],koa:["typescript","javascript"],gin:["go"],echo:["go"],fiber:["go"],laravel:["php"],symfony:["php"],wordpress:["php"],rails:["ruby"],sinatra:["ruby"],react:["typescript","javascript"],nextjs:["typescript","javascript"],vue:["typescript","javascript"],angular:["typescript","javascript"],svelte:["typescript","javascript"],vite:["typescript","javascript"],electron:["typescript","javascript"],tailwind:[],sass:[],node:["typescript","javascript"],"agent-stdio":[]},g5={react:"frontend-ui",nextjs:"frontend-ui",vue:"frontend-ui",angular:"frontend-ui",svelte:"frontend-ui",electron:"frontend-ui",tailwind:"frontend-css",sass:"frontend-css",vite:"frontend-build",fastapi:"backend-api",django:"backend-api",flask:"backend-api",express:"backend-api",fastify:"backend-api",nestjs:"backend-api",gin:"backend-api",echo:"backend-api",fiber:"backend-api",laravel:"backend-api",symfony:"backend-api",wordpress:"backend-api",rails:"backend-api",sinatra:"backend-api",koa:"backend-api",sqlalchemy:"backend-orm",celery:"backend-task"};x5=(()=>{try{let e=(0,Dg.fileURLToPath)(NT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();x5&&RT().catch(e=>{console.error("\u30A8\u30E9\u30FC:",e),process.exit(1)})});var ZT={};Br(ZT,{runInstall:()=>T5});function w5(){if(process.platform==="win32"){let e=process.env.LOCALAPPDATA??(0,_n.join)((0,ju.homedir)(),"AppData","Local");return(0,_n.join)(e,"GoDD")}return(0,_n.join)((0,ju.homedir)(),".godd","bin")}function k5(){return process.platform==="win32"?"godd.exe":"godd"}function LT(e){let t=process.env.PATH??"",r=process.platform==="win32"?";":":";return t.split(r).map(o=>o.replace(/[\\/]+$/,"").toLowerCase()).includes(e.replace(/[\\/]+$/,"").toLowerCase())}function S5(e){if(LT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}try{let t=["$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')","if ($currentPath -and $currentPath.Length -gt 0) {",` $newPath = $currentPath + ';' + '${e.replace(/'/g,"''")}'`,"} else {",` $newPath = '${e.replace(/'/g,"''")}'`,"}","[Environment]::SetEnvironmentVariable('PATH', $newPath, 'User')"].join("; ");(0,jT.execSync)(`powershell -NoProfile -Command "${t}"`,{stdio:"pipe"}),console.log(" PATH: \u30E6\u30FC\u30B6\u30FC\u74B0\u5883\u5909\u6570\u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002")}catch{console.error(` PATH: \u81EA\u52D5\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u4EE5\u4E0B\u3092\u624B\u52D5\u3067 PATH \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044:
282
282
  ${e}`)}}function $5(e){if(LT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}let t=`
283
283
  # GoDD CLI
284
284
  export PATH="${e}:$PATH"
285
- `,r=(0,ju.homedir)(),n=[],o=(0,_n.join)(r,".zshrc"),i=(0,_n.join)(r,".bashrc"),s=(0,_n.join)(r,".bash_profile");if((0,sr.existsSync)(o)&&n.push(o),(0,sr.existsSync)(i)?n.push(i):(0,sr.existsSync)(s)&&n.push(s),n.length===0){let a=process.platform==="darwin"?o:i;n.push(a)}for(let a of n){try{if((0,Mu.readFileSync)(a,"utf-8").includes(e)){console.log(` PATH: ${a} \u306B\u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002`);continue}}catch{}(0,Mu.appendFileSync)(a,t,"utf-8"),console.log(` PATH: ${a} \u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002`)}}async function T5(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD CLI \u2014 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=w5(),t=k5(),r=(0,_n.join)(e,t),n=process.execPath;console.log(`\u30BD\u30FC\u30B9: ${n}`),console.log(`\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148: ${r}`),console.log(""),(0,sr.existsSync)(e)||((0,sr.mkdirSync)(e,{recursive:!0}),console.log(`\u2713 \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F: ${e}`));let o=n.replace(/\\/g,"/").toLowerCase(),i=r.replace(/\\/g,"/").toLowerCase();if(o===i?console.log("\u2713 \u65E2\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148\u304B\u3089\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u3059\uFF08\u30B3\u30D4\u30FC\u3092\u30B9\u30AD\u30C3\u30D7\uFF09\u3002"):((0,sr.copyFileSync)(n,r),console.log("\u2713 \u30D0\u30A4\u30CA\u30EA\u3092\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\u3002"),process.platform!=="win32"&&(0,sr.chmodSync)(r,493)),console.log(""),process.platform==="win32"?S5(e):$5(e),console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. \u30BF\u30FC\u30DF\u30CA\u30EB\u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF08PATH \u3092\u53CD\u6620\u3059\u308B\u305F\u3081\uFF09"),console.log(" 2. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067 godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(""),console.log("\u4F7F\u3044\u65B9:"),console.log(" godd init \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7"),console.log(" godd server MCP \u30B5\u30FC\u30D0\u30FC\u8D77\u52D5\uFF08Cursor \u304C\u81EA\u52D5\u5B9F\u884C\uFF09"),console.log(" godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u8868\u793A"),console.log(" godd help \u30D8\u30EB\u30D7\u8868\u793A"),console.log(""),process.platform==="win32"&&!process.env.TERM&&!process.env.CI){let s=MT.createInterface({input:process.stdin,output:process.stdout});await new Promise(a=>{s.question("Enter \u30AD\u30FC\u3092\u62BC\u3057\u3066\u9589\u3058\u307E\u3059...",()=>{s.close(),a()})})}}var sr,_n,ju,jT,Mu,MT,qT=_(()=>{"use strict";sr=require("node:fs"),_n=require("node:path"),ju=require("node:os"),jT=require("node:child_process"),Mu=require("node:fs"),MT=st(require("node:readline"),1)});var JT={};Br(JT,{PROVIDER_LABELS:()=>jg,findNotesSourceDirs:()=>GT,runNotesInfra:()=>H5,scaffoldNotesApplicationSources:()=>KT,shouldExcludeNotesSourceEntry:()=>HT});function P5(){return FT.createInterface({input:process.stdin,output:process.stdout})}function ne(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function VT(){try{return(0,F.dirname)((0,UT.fileURLToPath)(G5.url))}catch{return(0,F.dirname)(process.execPath)}}function C5(e){let t=VT(),r=(0,F.resolve)(t,".."),n=(0,F.join)(r,"templates","terraform",e),o=(0,F.join)(r,"templates","github-actions",e);return(0,V.existsSync)(n)&&(0,V.existsSync)(o)?{terraformDir:n,ghaDir:o}:null}function HT(e,t){return e===".env"||e.startsWith(".env.")&&e!==".env.example"||e.endsWith(".pyc")||e.endsWith(".tsbuildinfo")?!0:E5.has(e)||t.has(e)}function R5(e,t){return(0,V.existsSync)((0,F.join)(e,"app","main.py"))&&(0,V.existsSync)((0,F.join)(t,"package.json"))&&(0,V.existsSync)((0,F.join)(t,"src"))}function GT(){let e=VT(),t=[(0,F.resolve)(e,".."),e,(0,F.dirname)(process.execPath),process.cwd()];for(let r of t){let n=(0,F.join)(r,"notes-api"),o=(0,F.join)(r,"notes-app");if((0,V.existsSync)(n)&&(0,V.existsSync)(o)&&R5(n,o))return{apiDir:n,appDir:o}}return null}function WT(e,t,r){(0,V.mkdirSync)(t,{recursive:!0});for(let n of(0,V.readdirSync)(e)){if(HT(n,r))continue;let o=(0,F.join)(e,n),i=(0,F.join)(t,n);(0,V.statSync)(o).isDirectory()?WT(o,i,r):(0,V.copyFileSync)(o,i)}}function KT(e){let t=GT();if(!t)return console.warn(`
285
+ `,r=(0,ju.homedir)(),n=[],o=(0,_n.join)(r,".zshrc"),i=(0,_n.join)(r,".bashrc"),s=(0,_n.join)(r,".bash_profile");if((0,sr.existsSync)(o)&&n.push(o),(0,sr.existsSync)(i)?n.push(i):(0,sr.existsSync)(s)&&n.push(s),n.length===0){let a=process.platform==="darwin"?o:i;n.push(a)}for(let a of n){try{if((0,Mu.readFileSync)(a,"utf-8").includes(e)){console.log(` PATH: ${a} \u306B\u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002`);continue}}catch{}(0,Mu.appendFileSync)(a,t,"utf-8"),console.log(` PATH: ${a} \u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002`)}}async function T5(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD CLI \u2014 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=w5(),t=k5(),r=(0,_n.join)(e,t),n=process.execPath;console.log(`\u30BD\u30FC\u30B9: ${n}`),console.log(`\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148: ${r}`),console.log(""),(0,sr.existsSync)(e)||((0,sr.mkdirSync)(e,{recursive:!0}),console.log(`\u2713 \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F: ${e}`));let o=n.replace(/\\/g,"/").toLowerCase(),i=r.replace(/\\/g,"/").toLowerCase();if(o===i?console.log("\u2713 \u65E2\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148\u304B\u3089\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u3059\uFF08\u30B3\u30D4\u30FC\u3092\u30B9\u30AD\u30C3\u30D7\uFF09\u3002"):((0,sr.copyFileSync)(n,r),console.log("\u2713 \u30D0\u30A4\u30CA\u30EA\u3092\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\u3002"),process.platform!=="win32"&&(0,sr.chmodSync)(r,493)),console.log(""),process.platform==="win32"?S5(e):$5(e),console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. \u30BF\u30FC\u30DF\u30CA\u30EB\u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF08PATH \u3092\u53CD\u6620\u3059\u308B\u305F\u3081\uFF09"),console.log(" 2. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067 godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(""),console.log("\u4F7F\u3044\u65B9:"),console.log(" godd init \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7"),console.log(" godd server MCP \u30B5\u30FC\u30D0\u30FC\u8D77\u52D5\uFF08Cursor \u304C\u81EA\u52D5\u5B9F\u884C\uFF09"),console.log(" godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u8868\u793A"),console.log(" godd help \u30D8\u30EB\u30D7\u8868\u793A"),console.log(""),process.platform==="win32"&&!process.env.TERM&&!process.env.CI){let s=MT.createInterface({input:process.stdin,output:process.stdout});await new Promise(a=>{s.question("Enter \u30AD\u30FC\u3092\u62BC\u3057\u3066\u9589\u3058\u307E\u3059...",()=>{s.close(),a()})})}}var sr,_n,ju,jT,Mu,MT,qT=_(()=>{"use strict";sr=require("node:fs"),_n=require("node:path"),ju=require("node:os"),jT=require("node:child_process"),Mu=require("node:fs"),MT=st(require("node:readline"),1)});var JT={};Br(JT,{PROVIDER_LABELS:()=>jg,findNotesSourceDirs:()=>GT,runNotesInfra:()=>V5,scaffoldNotesApplicationSources:()=>KT,shouldExcludeNotesSourceEntry:()=>VT});function P5(){return FT.createInterface({input:process.stdin,output:process.stdout})}function ne(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function HT(){try{return(0,F.dirname)((0,UT.fileURLToPath)(G5.url))}catch{return(0,F.dirname)(process.execPath)}}function C5(e){let t=HT(),r=(0,F.resolve)(t,".."),n=(0,F.join)(r,"templates","terraform",e),o=(0,F.join)(r,"templates","github-actions",e);return(0,H.existsSync)(n)&&(0,H.existsSync)(o)?{terraformDir:n,ghaDir:o}:null}function VT(e,t){return e===".env"||e.startsWith(".env.")&&e!==".env.example"||e.endsWith(".pyc")||e.endsWith(".tsbuildinfo")?!0:E5.has(e)||t.has(e)}function A5(e,t){return(0,H.existsSync)((0,F.join)(e,"app","main.py"))&&(0,H.existsSync)((0,F.join)(t,"package.json"))&&(0,H.existsSync)((0,F.join)(t,"src"))}function GT(){let e=HT(),t=[(0,F.resolve)(e,".."),e,(0,F.dirname)(process.execPath),process.cwd()];for(let r of t){let n=(0,F.join)(r,"notes-api"),o=(0,F.join)(r,"notes-app");if((0,H.existsSync)(n)&&(0,H.existsSync)(o)&&A5(n,o))return{apiDir:n,appDir:o}}return null}function WT(e,t,r){(0,H.mkdirSync)(t,{recursive:!0});for(let n of(0,H.readdirSync)(e)){if(VT(n,r))continue;let o=(0,F.join)(e,n),i=(0,F.join)(t,n);(0,H.statSync)(o).isDirectory()?WT(o,i,r):(0,H.copyFileSync)(o,i)}}function KT(e){let t=GT();if(!t)return console.warn(`
286
286
  \u26A0 notes-api / notes-app \u306E\u540C\u68B1\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u3089\u306A\u3044\u305F\u3081\u3001\u30A2\u30D7\u30EA scaffold \u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3057\u305F\u3002`),[];let r=[],n=[{label:"notes-api",src:t.apiDir,dest:(0,F.join)(e,"notes-api"),exclude:z5},{label:"notes-app",src:t.appDir,dest:(0,F.join)(e,"notes-app"),exclude:I5}];console.log(`
287
- [\u30A2\u30D7\u30EA] Notes \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30BD\u30FC\u30B9\u3092\u540C\u671F: ${e}`);for(let o of n){let i=(0,V.existsSync)(o.dest)?"\u66F4\u65B0":"\u914D\u7F6E";WT(o.src,o.dest,o.exclude),r.push(o.label),console.log(` \u2713 ${o.label}/ \u3092${i}`)}return r}function A5(e){let t=(0,F.join)(e,Mg);if(!(0,V.existsSync)(t))return null;try{return JSON.parse((0,V.readFileSync)(t,"utf-8"))}catch{return null}}function O5(e){let t=(0,F.join)(e.outputDir,Mg),r={...e};(0,V.writeFileSync)(t,JSON.stringify(r,null,2)+`
287
+ [\u30A2\u30D7\u30EA] Notes \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30BD\u30FC\u30B9\u3092\u540C\u671F: ${e}`);for(let o of n){let i=(0,H.existsSync)(o.dest)?"\u66F4\u65B0":"\u914D\u7F6E";WT(o.src,o.dest,o.exclude),r.push(o.label),console.log(` \u2713 ${o.label}/ \u3092${i}`)}return r}function R5(e){let t=(0,F.join)(e,Mg);if(!(0,H.existsSync)(t))return null;try{return JSON.parse((0,H.readFileSync)(t,"utf-8"))}catch{return null}}function O5(e){let t=(0,F.join)(e.outputDir,Mg),r={...e};(0,H.writeFileSync)(t,JSON.stringify(r,null,2)+`
288
288
  `,"utf-8")}async function N5(e,t){console.log(`
289
289
  --- \u30AF\u30E9\u30A6\u30C9\u30D7\u30ED\u30D0\u30A4\u30C0\u9078\u629E ---`);let r=Object.entries(jg);for(let s=0;s<r.length;s++){let[a,c]=r[s],u=a===(t??"aws");console.log(` ${s+1}. ${c}${u?" [\u30C7\u30D5\u30A9\u30EB\u30C8]":""}`)}let n=r.findIndex(([s])=>s===(t??"aws"))+1,o=await ne(e,`
290
290
  \u9078\u629E [${n}]: `)||String(n),i=parseInt(o,10)-1;return(i<0||i>=r.length)&&(console.error("\u30A8\u30E9\u30FC: \u7121\u52B9\u306A\u9078\u629E\u3067\u3059\u3002"),process.exit(1)),r[i][0]}async function D5(e,t){console.log(`
@@ -314,17 +314,17 @@ export PATH="${e}:$PATH"
314
314
  \u2551 \u5BFE\u5FDC\u30D7\u30ED\u30D0\u30A4\u30C0: \u2551
315
315
  \u2551 AWS / GCP / Azure / Vercel\xD7Railway \u2551
316
316
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
317
- `);let t=A5(process.cwd());switch(await N5(e,t?.provider)){case"aws":return D5(e,t??{});case"gcp":return j5(e,t??{});case"azure":return M5(e,t??{});case"vercel-railway":return L5(e,t??{})}}function Fr(e,t){let r;try{r=(0,V.readFileSync)(e,"utf-8")}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u304C\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093: ${e} \u2014 ${Ne(n)}`,{cause:n})}try{return BT.default.compile(r,{noEscape:!0})(t)}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30B3\u30F3\u30D1\u30A4\u30EB/\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${e} \u2014 ${Ne(n)}`,{cause:n})}}function q5(e){switch(console.log(`
317
+ `);let t=R5(process.cwd());switch(await N5(e,t?.provider)){case"aws":return D5(e,t??{});case"gcp":return j5(e,t??{});case"azure":return M5(e,t??{});case"vercel-railway":return L5(e,t??{})}}function Fr(e,t){let r;try{r=(0,H.readFileSync)(e,"utf-8")}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30D5\u30A1\u30A4\u30EB\u304C\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093: ${e} \u2014 ${Ne(n)}`,{cause:n})}try{return BT.default.compile(r,{noEscape:!0})(t)}catch(n){throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30B3\u30F3\u30D1\u30A4\u30EB/\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${e} \u2014 ${Ne(n)}`,{cause:n})}}function q5(e){switch(console.log(`
318
318
  --- \u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30D7\u30ED\u30D0\u30A4\u30C0: ${jg[e.provider]}`),console.log(` \u74B0\u5883: ${e.env}`),console.log(` GitHub: ${e.githubOwner}/${e.githubRepo}`),e.provider){case"aws":console.log(` AWS \u30A2\u30AB\u30A6\u30F3\u30C8: ${e.accountId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` VPC CIDR: ${e.vpcCidr}`),console.log(` RDS: ${e.rdsInstanceClass}`),console.log(` ECS: ${e.ecsCpu} CPU / ${e.ecsMemory} MB`);break;case"gcp":console.log(` \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8: ${e.projectId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` Cloud SQL: ${e.dbTier}`),console.log(` Cloud Run: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"azure":console.log(` Subscription: ${e.subscriptionId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` PostgreSQL: ${e.dbSku}`),console.log(` Container App: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"vercel-railway":console.log(` Railway API: ${e.railwayApiUrl}`);break}console.log(` \u51FA\u529B\u5148: ${e.outputDir}`)}function F5(e){let t=C5(e.provider);t||(console.error(`\u30A8\u30E9\u30FC: ${e.provider} \u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002`),process.exit(1));let{terraformDir:r,ghaDir:n}=t,o=e;e.provider==="aws"?U5(r,n,e,o):B5(r,n,e,o),KT(e.outputDir),O5(e),console.log(`
319
- \u2713 \u8A2D\u5B9A\u3092 ${(0,F.join)(e.outputDir,Mg)} \u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F`)}function U5(e,t,r,n){let o=(0,F.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,F.join)(r.outputDir,"terraform","godd-notes",`${r.env}-iam`),s=(0,F.join)(r.outputDir,".github","workflows");(0,V.mkdirSync)(o,{recursive:!0}),(0,V.mkdirSync)(i,{recursive:!0}),(0,V.mkdirSync)(s,{recursive:!0});let a=(0,V.readdirSync)(e).filter(k=>k.endsWith(".tf.hbs")),c=["iam.tf.hbs"],u=a.filter(k=>!c.includes(k)),p=(0,F.resolve)(e,"..","..","scripts","aws"),l=(0,F.join)(p,"terraform-backend-setup.sh.hbs"),d=(0,V.existsSync)(l),f=d?4:3,h=[];console.log(`
320
- [1/${f}] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let k of u){let C=k.replace(".hbs",""),T=Fr((0,F.join)(e,k),n);(0,V.writeFileSync)((0,F.join)(o,C),T,"utf-8"),console.log(` \u2713 ${C}`)}console.log(`
321
- [2/${f}] IAM Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${i}`);for(let k of c){let C=k.replace(".hbs",""),T=Fr((0,F.join)(e,k),n);(0,V.writeFileSync)((0,F.join)(i,C),T,"utf-8"),console.log(` \u2713 ${C}`)}let g=(0,F.join)(e,"local.tf.hbs");if((0,V.existsSync)(g)){let k=Fr(g,n);(0,V.writeFileSync)((0,F.join)(i,"local.tf"),k,"utf-8"),console.log(" \u2713 local.tf")}else console.warn(` \u26A0 local.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${g}`),h.push("local.tf.hbs");let y=(0,F.join)(e,"provider.tf.hbs");if((0,V.existsSync)(y)){let k=Fr(y,n);(0,V.writeFileSync)((0,F.join)(i,"provider.tf"),k,"utf-8"),console.log(" \u2713 provider.tf")}else console.warn(` \u26A0 provider.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${y}`),h.push("provider.tf.hbs");let b=(0,F.join)(e,"backend.tf.hbs");if((0,V.existsSync)(b)){let k=Fr(b,{...n,env:`${r.env}-iam`});(0,V.writeFileSync)((0,F.join)(i,"backend.tf"),k,"utf-8"),console.log(" \u2713 backend.tf")}else console.warn(` \u26A0 backend.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${b}`),h.push("backend.tf.hbs");console.log(`
322
- [3/${f}] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${s}`);let v=(0,V.readdirSync)(t).filter(k=>k.endsWith(".yml.hbs"));for(let k of v){let C=k.replace(".hbs",""),T=Fr((0,F.join)(t,k),n);(0,V.writeFileSync)((0,F.join)(s,C),T,"utf-8"),console.log(` \u2713 ${C}`)}if(d){let k=(0,F.join)(r.outputDir,"scripts");(0,V.mkdirSync)(k,{recursive:!0}),console.log(`
323
- [4/${f}] \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u751F\u6210: ${k}`);let C=Fr(l,n),T=(0,F.join)(k,"terraform-backend-setup.sh");(0,V.writeFileSync)(T,C,"utf-8");try{(0,V.chmodSync)(T,493)}catch{}console.log(" \u2713 terraform-backend-setup.sh")}else console.warn(`
319
+ \u2713 \u8A2D\u5B9A\u3092 ${(0,F.join)(e.outputDir,Mg)} \u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F`)}function U5(e,t,r,n){let o=(0,F.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,F.join)(r.outputDir,"terraform","godd-notes",`${r.env}-iam`),s=(0,F.join)(r.outputDir,".github","workflows");(0,H.mkdirSync)(o,{recursive:!0}),(0,H.mkdirSync)(i,{recursive:!0}),(0,H.mkdirSync)(s,{recursive:!0});let a=(0,H.readdirSync)(e).filter(k=>k.endsWith(".tf.hbs")),c=["iam.tf.hbs"],u=a.filter(k=>!c.includes(k)),p=(0,F.resolve)(e,"..","..","scripts","aws"),l=(0,F.join)(p,"terraform-backend-setup.sh.hbs"),d=(0,H.existsSync)(l),f=d?4:3,h=[];console.log(`
320
+ [1/${f}] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let k of u){let C=k.replace(".hbs",""),T=Fr((0,F.join)(e,k),n);(0,H.writeFileSync)((0,F.join)(o,C),T,"utf-8"),console.log(` \u2713 ${C}`)}console.log(`
321
+ [2/${f}] IAM Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${i}`);for(let k of c){let C=k.replace(".hbs",""),T=Fr((0,F.join)(e,k),n);(0,H.writeFileSync)((0,F.join)(i,C),T,"utf-8"),console.log(` \u2713 ${C}`)}let m=(0,F.join)(e,"local.tf.hbs");if((0,H.existsSync)(m)){let k=Fr(m,n);(0,H.writeFileSync)((0,F.join)(i,"local.tf"),k,"utf-8"),console.log(" \u2713 local.tf")}else console.warn(` \u26A0 local.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${m}`),h.push("local.tf.hbs");let y=(0,F.join)(e,"provider.tf.hbs");if((0,H.existsSync)(y)){let k=Fr(y,n);(0,H.writeFileSync)((0,F.join)(i,"provider.tf"),k,"utf-8"),console.log(" \u2713 provider.tf")}else console.warn(` \u26A0 provider.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${y}`),h.push("provider.tf.hbs");let b=(0,F.join)(e,"backend.tf.hbs");if((0,H.existsSync)(b)){let k=Fr(b,{...n,env:`${r.env}-iam`});(0,H.writeFileSync)((0,F.join)(i,"backend.tf"),k,"utf-8"),console.log(" \u2713 backend.tf")}else console.warn(` \u26A0 backend.tf.hbs \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${b}`),h.push("backend.tf.hbs");console.log(`
322
+ [3/${f}] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${s}`);let v=(0,H.readdirSync)(t).filter(k=>k.endsWith(".yml.hbs"));for(let k of v){let C=k.replace(".hbs",""),T=Fr((0,F.join)(t,k),n);(0,H.writeFileSync)((0,F.join)(s,C),T,"utf-8"),console.log(` \u2713 ${C}`)}if(d){let k=(0,F.join)(r.outputDir,"scripts");(0,H.mkdirSync)(k,{recursive:!0}),console.log(`
323
+ [4/${f}] \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u751F\u6210: ${k}`);let C=Fr(l,n),T=(0,F.join)(k,"terraform-backend-setup.sh");(0,H.writeFileSync)(T,C,"utf-8");try{(0,H.chmodSync)(T,493)}catch{}console.log(" \u2713 terraform-backend-setup.sh")}else console.warn(`
324
324
  \u26A0 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B9\u30AF\u30EA\u30D7\u30C8\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: `+l),h.push("terraform-backend-setup.sh.hbs");if(h.length>0){console.warn(`
325
- \u26A0 \u30B9\u30AD\u30C3\u30D7\u3055\u308C\u305F\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 (${h.length} \u4EF6):`);for(let k of h)console.warn(` - ${k}`)}}function B5(e,t,r,n){let o=(0,F.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,F.join)(r.outputDir,".github","workflows");(0,V.mkdirSync)(o,{recursive:!0}),(0,V.mkdirSync)(i,{recursive:!0});let s=(0,V.readdirSync)(e).filter(c=>c.endsWith(".tf.hbs"));console.log(`
326
- [1/2] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let c of s){let u=c.replace(".hbs",""),p=Fr((0,F.join)(e,c),n);(0,V.writeFileSync)((0,F.join)(o,u),p,"utf-8"),console.log(` \u2713 ${u}`)}console.log(`
327
- [2/2] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${i}`);let a=(0,V.readdirSync)(t).filter(c=>c.endsWith(".yml.hbs"));for(let c of a){let u=c.replace(".hbs",""),p=Fr((0,F.join)(t,c),n);(0,V.writeFileSync)((0,F.join)(i,u),p,"utf-8"),console.log(` \u2713 ${u}`)}}function V5(e){switch(e.provider){case"aws":console.log(`
325
+ \u26A0 \u30B9\u30AD\u30C3\u30D7\u3055\u308C\u305F\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8 (${h.length} \u4EF6):`);for(let k of h)console.warn(` - ${k}`)}}function B5(e,t,r,n){let o=(0,F.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,F.join)(r.outputDir,".github","workflows");(0,H.mkdirSync)(o,{recursive:!0}),(0,H.mkdirSync)(i,{recursive:!0});let s=(0,H.readdirSync)(e).filter(c=>c.endsWith(".tf.hbs"));console.log(`
326
+ [1/2] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let c of s){let u=c.replace(".hbs",""),p=Fr((0,F.join)(e,c),n);(0,H.writeFileSync)((0,F.join)(o,u),p,"utf-8"),console.log(` \u2713 ${u}`)}console.log(`
327
+ [2/2] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${i}`);let a=(0,H.readdirSync)(t).filter(c=>c.endsWith(".yml.hbs"));for(let c of a){let u=c.replace(".hbs",""),p=Fr((0,F.join)(t,c),n);(0,H.writeFileSync)((0,F.join)(i,u),p,"utf-8"),console.log(` \u2713 ${u}`)}}function H5(e){switch(e.provider){case"aws":console.log(`
328
328
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
329
329
  \u2551 AWS \u30A4\u30F3\u30D5\u30E9\u30D5\u30A1\u30A4\u30EB\u751F\u6210\u5B8C\u4E86 \u2551
330
330
  \u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
@@ -414,7 +414,7 @@ export PATH="${e}:$PATH"
414
414
  \u2551 terraform init && terraform apply \u2551
415
415
  \u2551 \u2551
416
416
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
417
- `);break}}async function H5(e){if(e.includes("--help")||e.includes("-h")){console.log(`
417
+ `);break}}async function V5(e){if(e.includes("--help")||e.includes("-h")){console.log(`
418
418
  GoDD Notes Infra \u2014 \u30A2\u30D7\u30EA + \u30DE\u30EB\u30C1\u30AF\u30E9\u30A6\u30C9 \u30A4\u30F3\u30D5\u30E9\u81EA\u52D5\u751F\u6210
419
419
 
420
420
  Usage: godd notes infra [options]
@@ -432,13 +432,13 @@ Usage: godd notes infra [options]
432
432
  Options:
433
433
  --help, -h \u3053\u306E\u30D8\u30EB\u30D7\u3092\u8868\u793A
434
434
  `);return}let t=P5();try{let r=await Z5(t);if(q5(r),(await ne(t,`
435
- \u3053\u306E\u8A2D\u5B9A\u3067\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}F5(r),V5(r)}finally{t.close()}}var FT,V,F,UT,BT,G5,jg,E5,I5,z5,Mg,YT=_(()=>{"use strict";FT=st(require("node:readline"),1),V=require("node:fs"),F=require("node:path"),UT=require("node:url"),BT=st(xg(),1);Ko();G5={},jg={aws:"AWS (ECS Fargate + S3/CloudFront + RDS)",gcp:"GCP (Cloud Run + GCS + Cloud SQL)",azure:"Azure (Container Apps + Blob Storage + PostgreSQL)","vercel-railway":"Vercel \xD7 Railway (PaaS)"};E5=new Set([".git","coverage","dist","node_modules"]),I5=new Set(["playwright-report","test-results"]),z5=new Set([".pytest_cache",".ruff_cache",".venv","__pycache__"]);Mg=".godd-notes-infra.json"});var uP={};Br(uP,{checkAwsPrerequisites:()=>rP,checkDocker:()=>Fg,deployToAws:()=>nP,generateEnvFile:()=>oP,generateSecret:()=>wr,getTerraformOutputs:()=>Bg,loadInfraConfig:()=>Ug,parseComposeFlags:()=>aP,parseDeployFlags:()=>sP,runNotes:()=>a8});function eP(){return QT.createInterface({input:process.stdin,output:process.stdout})}function it(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function wr(e=48){return XT.randomBytes(e).toString("base64url").slice(0,e)}function Fg(){try{return Ye.execSync("docker --version",{stdio:"ignore",timeout:ci}),Ye.execSync("docker compose version",{stdio:"ignore",timeout:ci}),!0}catch{return!1}}function W5(){try{return(0,ye.dirname)((0,qg.fileURLToPath)(lP.url))}catch{return(0,ye.dirname)(process.execPath)}}function tP(){let e=W5(),t=(0,ye.resolve)(e,".."),r=(0,ye.join)(t,"notes-api"),n=(0,ye.join)(t,"notes-app"),o=(0,ye.join)(t,"templates","notes-compose.yml");return(0,de.existsSync)(r)&&(0,de.existsSync)(n)&&(0,de.existsSync)(o)?{apiDir:r,appDir:n,composeTemplate:o}:null}function Lg(e,t){(0,de.mkdirSync)(t,{recursive:!0});for(let r of(0,de.readdirSync)(e)){if(K5.has(r)||r.endsWith(".pyc")||r.endsWith(".tsbuildinfo"))continue;let n=(0,ye.join)(e,r),o=(0,ye.join)(t,r);(0,de.statSync)(n).isDirectory()?Lg(n,o):(0,de.copyFileSync)(n,o)}}function J5(e,t){return new Promise((r,n)=>{let o=Ye.spawn("docker",["compose",...t],{cwd:e,stdio:"inherit"});o.on("error",i=>n(i)),o.on("close",i=>r(i??1))})}async function Y5(e,t=12e4){let r=Date.now(),n=3e3;for(;Date.now()-r<t;){if(await new Promise(i=>{let s=Zg.get(e,{timeout:3e3},a=>{a.resume(),i(a.statusCode===200)});s.on("error",()=>i(!1)),s.on("timeout",()=>{s.destroy(),i(!1)})}))return!0;await new Promise(i=>setTimeout(i,n))}return!1}function Ug(e){let t=(0,ye.join)(e,Q5);if(!(0,de.existsSync)(t))return null;try{return JSON.parse((0,de.readFileSync)(t,"utf-8"))}catch{return null}}function Bg(e){if(!(0,de.existsSync)(e))throw new Error(`Terraform \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${e}`);let t;try{t=Ye.execSync("terraform output -json",{cwd:e,encoding:"utf-8",stdio:["pipe","pipe","pipe"]})}catch(s){throw new Error(`terraform output \u306E\u5B9F\u884C\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002terraform init && terraform apply \u3092\u5148\u306B\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
436
- ${Ne(s)}`)}let r;try{r=JSON.parse(t)}catch{throw new Error(`terraform output \u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${t.slice(0,200)}`)}let n=["ecr_repository_url","ecs_cluster_name","ecs_service_name","s3_bucket_name","cloudfront_distribution_id","cloudfront_domain","notes_app_url","notes_api_url"],o=n.filter(s=>!r[s]?.value);if(o.length>0)throw new Error(`Terraform output \u306B\u5FC5\u8981\u306A\u5024\u304C\u3042\u308A\u307E\u305B\u3093: ${o.join(", ")}`);let i={};for(let s of n)i[s]=r[s].value;return i}function rP(){let e=[];try{Ye.execSync("aws --version",{stdio:"pipe",timeout:ci})}catch{e.push("AWS CLI \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002https://aws.amazon.com/cli/")}try{Ye.execSync("aws sts get-caller-identity",{stdio:"pipe",timeout:ci})}catch{e.push("AWS \u8A8D\u8A3C\u60C5\u5831\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002aws configure \u307E\u305F\u306F AWS SSO \u3067\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}try{Ye.execSync("docker --version",{stdio:"pipe",timeout:ci})}catch{e.push("Docker \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002")}try{Ye.execSync("pnpm --version",{stdio:"pipe",timeout:ci})}catch{e.push("pnpm \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002npm install -g pnpm")}return{ok:e.length===0,errors:e}}function co(e,t,r={}){let{cwd:n,label:o}=r;o&&console.log(` ${o}...`);let i=Ye.spawnSync(e,t,{cwd:n,stdio:"inherit"});if(i.error)throw new Error(`\u30B3\u30DE\u30F3\u30C9\u8D77\u52D5\u5931\u6557: ${e}
435
+ \u3053\u306E\u8A2D\u5B9A\u3067\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}F5(r),H5(r)}finally{t.close()}}var FT,H,F,UT,BT,G5,jg,E5,I5,z5,Mg,YT=_(()=>{"use strict";FT=st(require("node:readline"),1),H=require("node:fs"),F=require("node:path"),UT=require("node:url"),BT=st(xg(),1);Ko();G5={},jg={aws:"AWS (ECS Fargate + S3/CloudFront + RDS)",gcp:"GCP (Cloud Run + GCS + Cloud SQL)",azure:"Azure (Container Apps + Blob Storage + PostgreSQL)","vercel-railway":"Vercel \xD7 Railway (PaaS)"};E5=new Set([".git","coverage","dist","node_modules"]),I5=new Set(["playwright-report","test-results"]),z5=new Set([".pytest_cache",".ruff_cache",".venv","__pycache__"]);Mg=".godd-notes-infra.json"});var uP={};Br(uP,{checkAwsPrerequisites:()=>rP,checkDocker:()=>Fg,deployToAws:()=>nP,generateEnvFile:()=>oP,generateSecret:()=>wr,getTerraformOutputs:()=>Bg,loadInfraConfig:()=>Ug,parseComposeFlags:()=>aP,parseDeployFlags:()=>sP,runNotes:()=>c8});function eP(){return QT.createInterface({input:process.stdin,output:process.stdout})}function qe(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function wr(e=48){return XT.randomBytes(e).toString("base64url").slice(0,e)}function W5(e){return!!(e.githubToken||e.githubAppId&&e.githubAppPrivateKey&&e.githubAppInstallationId)}function Fg(){try{return Qe.execSync("docker --version",{stdio:"ignore",timeout:ci}),Qe.execSync("docker compose version",{stdio:"ignore",timeout:ci}),!0}catch{return!1}}function K5(){try{return(0,ye.dirname)((0,qg.fileURLToPath)(lP.url))}catch{return(0,ye.dirname)(process.execPath)}}function tP(){let e=K5(),t=(0,ye.resolve)(e,".."),r=(0,ye.join)(t,"notes-api"),n=(0,ye.join)(t,"notes-app"),o=(0,ye.join)(t,"templates","notes-compose.yml");return(0,de.existsSync)(r)&&(0,de.existsSync)(n)&&(0,de.existsSync)(o)?{apiDir:r,appDir:n,composeTemplate:o}:null}function Lg(e,t){(0,de.mkdirSync)(t,{recursive:!0});for(let r of(0,de.readdirSync)(e)){if(J5.has(r)||r.endsWith(".pyc")||r.endsWith(".tsbuildinfo"))continue;let n=(0,ye.join)(e,r),o=(0,ye.join)(t,r);(0,de.statSync)(n).isDirectory()?Lg(n,o):(0,de.copyFileSync)(n,o)}}function Y5(e,t){return new Promise((r,n)=>{let o=Qe.spawn("docker",["compose",...t],{cwd:e,stdio:"inherit"});o.on("error",i=>n(i)),o.on("close",i=>r(i??1))})}async function Q5(e,t=12e4){let r=Date.now(),n=3e3;for(;Date.now()-r<t;){if(await new Promise(i=>{let s=Zg.get(e,{timeout:3e3},a=>{a.resume(),i(a.statusCode===200)});s.on("error",()=>i(!1)),s.on("timeout",()=>{s.destroy(),i(!1)})}))return!0;await new Promise(i=>setTimeout(i,n))}return!1}function Ug(e){let t=(0,ye.join)(e,X5);if(!(0,de.existsSync)(t))return null;try{return JSON.parse((0,de.readFileSync)(t,"utf-8"))}catch{return null}}function Bg(e){if(!(0,de.existsSync)(e))throw new Error(`Terraform \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${e}`);let t;try{t=Qe.execSync("terraform output -json",{cwd:e,encoding:"utf-8",stdio:["pipe","pipe","pipe"]})}catch(s){throw new Error(`terraform output \u306E\u5B9F\u884C\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002terraform init && terraform apply \u3092\u5148\u306B\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
436
+ ${Ne(s)}`)}let r;try{r=JSON.parse(t)}catch{throw new Error(`terraform output \u306E JSON \u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${t.slice(0,200)}`)}let n=["ecr_repository_url","ecs_cluster_name","ecs_service_name","s3_bucket_name","cloudfront_distribution_id","cloudfront_domain","notes_app_url","notes_api_url"],o=n.filter(s=>!r[s]?.value);if(o.length>0)throw new Error(`Terraform output \u306B\u5FC5\u8981\u306A\u5024\u304C\u3042\u308A\u307E\u305B\u3093: ${o.join(", ")}`);let i={};for(let s of n)i[s]=r[s].value;return i}function rP(){let e=[];try{Qe.execSync("aws --version",{stdio:"pipe",timeout:ci})}catch{e.push("AWS CLI \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002https://aws.amazon.com/cli/")}try{Qe.execSync("aws sts get-caller-identity",{stdio:"pipe",timeout:ci})}catch{e.push("AWS \u8A8D\u8A3C\u60C5\u5831\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002aws configure \u307E\u305F\u306F AWS SSO \u3067\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}try{Qe.execSync("docker --version",{stdio:"pipe",timeout:ci})}catch{e.push("Docker \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002")}try{Qe.execSync("pnpm --version",{stdio:"pipe",timeout:ci})}catch{e.push("pnpm \u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002npm install -g pnpm")}return{ok:e.length===0,errors:e}}function co(e,t,r={}){let{cwd:n,label:o}=r;o&&console.log(` ${o}...`);let i=Qe.spawnSync(e,t,{cwd:n,stdio:"inherit"});if(i.error)throw new Error(`\u30B3\u30DE\u30F3\u30C9\u8D77\u52D5\u5931\u6557: ${e}
437
437
  ${Ne(i.error)}`);if(i.status!==0)throw new Error(`\u30B3\u30DE\u30F3\u30C9\u5931\u6557 (exit ${i.status}): ${e} ${t.join(" ")}`)}async function nP(e,t,r){let n=t.region??"ap-northeast-1",i=`${t.accountId??""}.dkr.ecr.${n}.amazonaws.com`;console.log(`
438
438
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
439
439
  \u2551 GoDD Notes \u2014 AWS \u30C7\u30D7\u30ED\u30A4\u958B\u59CB \u2551
440
440
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
441
- `),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${n}`),console.log(` ECR: ${e.ecr_repository_url}`),console.log(` ECS \u30AF\u30E9\u30B9\u30BF: ${e.ecs_cluster_name}`),console.log(` S3 \u30D0\u30B1\u30C3\u30C8: ${e.s3_bucket_name}`),console.log(` CloudFront: ${e.cloudfront_distribution_id}`),console.log(),console.log("[1/6] ECR \u306B\u30ED\u30B0\u30A4\u30F3...");{let c=Ye.spawnSync("aws",["ecr","get-login-password","--region",n],{encoding:"utf-8"});if(c.status!==0||!c.stdout)throw new Error(`ECR \u30ED\u30B0\u30A4\u30F3\u30D1\u30B9\u30EF\u30FC\u30C9\u53D6\u5F97\u5931\u6557: ${c.stderr??""}`);if(Ye.spawnSync("docker",["login","--username","AWS","--password-stdin",i],{input:c.stdout,stdio:["pipe","inherit","inherit"]}).status!==0)throw new Error("docker login \u5931\u6557")}console.log(" \u2713 ECR \u30ED\u30B0\u30A4\u30F3\u5B8C\u4E86"),console.log(`
441
+ `),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${n}`),console.log(` ECR: ${e.ecr_repository_url}`),console.log(` ECS \u30AF\u30E9\u30B9\u30BF: ${e.ecs_cluster_name}`),console.log(` S3 \u30D0\u30B1\u30C3\u30C8: ${e.s3_bucket_name}`),console.log(` CloudFront: ${e.cloudfront_distribution_id}`),console.log(),console.log("[1/6] ECR \u306B\u30ED\u30B0\u30A4\u30F3...");{let c=Qe.spawnSync("aws",["ecr","get-login-password","--region",n],{encoding:"utf-8"});if(c.status!==0||!c.stdout)throw new Error(`ECR \u30ED\u30B0\u30A4\u30F3\u30D1\u30B9\u30EF\u30FC\u30C9\u53D6\u5F97\u5931\u6557: ${c.stderr??""}`);if(Qe.spawnSync("docker",["login","--username","AWS","--password-stdin",i],{input:c.stdout,stdio:["pipe","inherit","inherit"]}).status!==0)throw new Error("docker login \u5931\u6557")}console.log(" \u2713 ECR \u30ED\u30B0\u30A4\u30F3\u5B8C\u4E86"),console.log(`
442
442
  [2/6] Notes API \u306E Docker \u30A4\u30E1\u30FC\u30B8\u3092\u30D3\u30EB\u30C9...`);let s=`${e.ecr_repository_url}:latest`;co("docker",["build","--platform","linux/arm64","-t",s,"-f","docker/Dockerfile","."],{cwd:r.apiDir}),console.log(" \u2713 \u30A4\u30E1\u30FC\u30B8\u30D3\u30EB\u30C9\u5B8C\u4E86"),console.log(`
443
443
  [3/6] ECR \u306B\u30D7\u30C3\u30B7\u30E5...`),co("docker",["push",s]),console.log(" \u2713 ECR \u30D7\u30C3\u30B7\u30E5\u5B8C\u4E86"),console.log(`
444
444
  [4/6] ECS \u30B5\u30FC\u30D3\u30B9\u3092\u66F4\u65B0...`),co("aws",["ecs","update-service","--cluster",e.ecs_cluster_name,"--service",e.ecs_service_name,"--force-new-deployment","--region",n]),console.log(" \u2713 ECS \u30C7\u30D7\u30ED\u30A4\u958B\u59CB\uFF08\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u3067\u5B89\u5B9A\u5316\u5F85\u3061\uFF09"),console.log(`
@@ -458,21 +458,21 @@ ${Ne(i.error)}`);if(i.status!==0)throw new Error(`\u30B3\u30DE\u30F3\u30C9\u5931
458
458
  \u2551 --services ${e.ecs_service_name.padEnd(32)}\u2551
459
459
  \u2551 \u2551
460
460
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
461
- `)}async function X5(e){console.log(`
461
+ `)}async function e8(e){console.log(`
462
462
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
463
463
  \u2551 GoDD Notes \u30C7\u30D7\u30ED\u30A4\u30A6\u30A3\u30B6\u30FC\u30C9 \u2551
464
464
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
465
- `);let t=await it(e,"\u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [./godd-notes]: ")||"./godd-notes";console.log(`
466
- --- PostgreSQL \u8A2D\u5B9A ---`);let r=await it(e,"DB \u30E6\u30FC\u30B6\u30FC [app_user]: ")||"app_user",n=await it(e,"DB \u30D1\u30B9\u30EF\u30FC\u30C9 [\u81EA\u52D5\u751F\u6210]: ")||wr(24),o=await it(e,"DB \u540D [godd_notes]: ")||"godd_notes",i=await it(e,"PostgreSQL \u30DD\u30FC\u30C8 [5432]: ")||"5432";console.log(`
467
- --- \u30DD\u30FC\u30C8\u8A2D\u5B9A ---`);let s=await it(e,"Notes API \u30DD\u30FC\u30C8 [3100]: ")||"3100",a=await it(e,"Notes App \u30DD\u30FC\u30C8 [5175]: ")||"5175";console.log(`
468
- --- GitHub \u9023\u643A ---`);let c=await it(e,"GitHub Token (ghp_xxx): "),u=await it(e,"GitHub Owner (\u7D44\u7E54 or \u30E6\u30FC\u30B6\u30FC\u540D): "),p=await it(e,"GitHub Repo (\u30EA\u30DD\u30B8\u30C8\u30EA\u540D): "),l=await it(e,"GitHub Branch [main]: ")||"main";console.log(`
469
- --- \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3 ---`);let d=await it(e,"JWT \u30B7\u30FC\u30AF\u30EC\u30C3\u30C8 [\u81EA\u52D5\u751F\u6210]: ")||wr(48);console.log(`
470
- --- \u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8 ---`);let f=await it(e,"\u7BA1\u7406\u8005\u30E6\u30FC\u30B6\u30FC\u540D [admin]: ")||"admin",h=await it(e,"\u7BA1\u7406\u8005\u30D1\u30B9\u30EF\u30FC\u30C9: ")||wr(16);return{deployDir:(0,ye.resolve)(t),postgresUser:r,postgresPassword:n,postgresDb:o,postgresPort:i,notesApiPort:s,notesAppPort:a,githubToken:c,githubOwner:u,githubRepo:p,githubBranch:l,jwtSecret:d,adminUsername:f,adminPassword:h}}function oP(e){return["# GoDD Notes \u74B0\u5883\u5909\u6570\uFF08\u81EA\u52D5\u751F\u6210\uFF09",`POSTGRES_USER=${e.postgresUser}`,`POSTGRES_PASSWORD=${e.postgresPassword}`,`POSTGRES_DB=${e.postgresDb}`,`POSTGRES_PORT=${e.postgresPort}`,`NOTES_API_PORT=${e.notesApiPort}`,`NOTES_APP_PORT=${e.notesAppPort}`,`GITHUB_TOKEN=${e.githubToken}`,`GITHUB_OWNER=${e.githubOwner}`,`GITHUB_REPO=${e.githubRepo}`,`GITHUB_BRANCH=${e.githubBranch}`,`JWT_SECRET=${e.jwtSecret}`,`NOTES_ADMIN_USERNAME=${e.adminUsername}`,`NOTES_ADMIN_PASSWORD=${e.adminPassword}`,""].join(`
465
+ `);let t=await qe(e,"\u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [./godd-notes]: ")||"./godd-notes";console.log(`
466
+ --- PostgreSQL \u8A2D\u5B9A ---`);let r=await qe(e,"DB \u30E6\u30FC\u30B6\u30FC [app_user]: ")||"app_user",n=await qe(e,"DB \u30D1\u30B9\u30EF\u30FC\u30C9 [\u81EA\u52D5\u751F\u6210]: ")||wr(24),o=await qe(e,"DB \u540D [godd_notes]: ")||"godd_notes",i=await qe(e,"PostgreSQL \u30DD\u30FC\u30C8 [5432]: ")||"5432";console.log(`
467
+ --- \u30DD\u30FC\u30C8\u8A2D\u5B9A ---`);let s=await qe(e,"Notes API \u30DD\u30FC\u30C8 [3100]: ")||"3100",a=await qe(e,"Notes App \u30DD\u30FC\u30C8 [5175]: ")||"5175";console.log(`
468
+ --- GitHub \u9023\u643A ---`);let c=await qe(e,"GitHub Token (ghp_xxx): "),u=await qe(e,"GitHub App ID [\u4EFB\u610F]: "),p=await qe(e,"GitHub App Private Key PEM [\u4EFB\u610F]: "),l=await qe(e,"GitHub App Installation ID [\u4EFB\u610F]: "),d=await qe(e,"GitHub Owner (\u7D44\u7E54 or \u30E6\u30FC\u30B6\u30FC\u540D): "),f=await qe(e,"GitHub Repo (\u30EA\u30DD\u30B8\u30C8\u30EA\u540D): "),h=await qe(e,"GitHub Branch [main]: ")||"main";console.log(`
469
+ --- \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3 ---`);let m=await qe(e,"JWT \u30B7\u30FC\u30AF\u30EC\u30C3\u30C8 [\u81EA\u52D5\u751F\u6210]: ")||wr(48);console.log(`
470
+ --- \u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8 ---`);let y=await qe(e,"\u7BA1\u7406\u8005\u30E6\u30FC\u30B6\u30FC\u540D [admin]: ")||"admin",b=await qe(e,"\u7BA1\u7406\u8005\u30D1\u30B9\u30EF\u30FC\u30C9: ")||wr(16);return{deployDir:(0,ye.resolve)(t),postgresUser:r,postgresPassword:n,postgresDb:o,postgresPort:i,notesApiPort:s,notesAppPort:a,githubToken:c,githubAppId:u,githubAppPrivateKey:p,githubAppInstallationId:l,githubOwner:d,githubRepo:f,githubBranch:h,jwtSecret:m,adminUsername:y,adminPassword:b}}function oP(e){return["# GoDD Notes \u74B0\u5883\u5909\u6570\uFF08\u81EA\u52D5\u751F\u6210\uFF09",`POSTGRES_USER=${e.postgresUser}`,`POSTGRES_PASSWORD=${e.postgresPassword}`,`POSTGRES_DB=${e.postgresDb}`,`POSTGRES_PORT=${e.postgresPort}`,`NOTES_API_PORT=${e.notesApiPort}`,`NOTES_APP_PORT=${e.notesAppPort}`,`GITHUB_TOKEN=${e.githubToken}`,`GITHUB_APP_ID=${e.githubAppId}`,`GITHUB_APP_PRIVATE_KEY=${e.githubAppPrivateKey}`,`GITHUB_APP_INSTALLATION_ID=${e.githubAppInstallationId}`,`GITHUB_OWNER=${e.githubOwner}`,`GITHUB_REPO=${e.githubRepo}`,`GITHUB_BRANCH=${e.githubBranch}`,`JWT_SECRET=${e.jwtSecret}`,`NOTES_ADMIN_USERNAME=${e.adminUsername}`,`NOTES_ADMIN_PASSWORD=${e.adminPassword}`,""].join(`
471
471
  `)}async function iP(e){let t=tP();t||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),console.error("npm \u30D1\u30C3\u30B1\u30FC\u30B8\u304C\u6B63\u3057\u304F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u308B\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let{apiDir:r,appDir:n,composeTemplate:o}=t;try{console.log(`
472
472
  [1/5] \u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u6E96\u5099: ${e.deployDir}`),(0,de.mkdirSync)(e.deployDir,{recursive:!0}),console.log("[2/5] notes-api \u3092\u30B3\u30D4\u30FC..."),Lg(r,(0,ye.join)(e.deployDir,"notes-api")),console.log("[3/5] notes-app \u3092\u30B3\u30D4\u30FC..."),Lg(n,(0,ye.join)(e.deployDir,"notes-app")),console.log("[4/5] docker-compose.yml \u3068 .env \u3092\u751F\u6210...");let p=(0,de.readFileSync)(o,"utf-8");(0,de.writeFileSync)((0,ye.join)(e.deployDir,"docker-compose.yml"),p,"utf-8"),(0,de.writeFileSync)((0,ye.join)(e.deployDir,".env"),oP(e),"utf-8")}catch(p){let l=p instanceof Error?p.message:String(p);console.error(`
473
- \u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB\u64CD\u4F5C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${l}`),console.error(`\u30C7\u30D7\u30ED\u30A4\u5148\u306E\u30D1\u30B9\u3068\u30A2\u30AF\u30BB\u30B9\u6A29\u9650\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044: ${e.deployDir}`),process.exit(1)}console.log("[5/5] Docker Compose \u3067\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5..."),await J5(e.deployDir,["up","-d","--build"])!==0&&(console.error(`
473
+ \u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB\u64CD\u4F5C\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${l}`),console.error(`\u30C7\u30D7\u30ED\u30A4\u5148\u306E\u30D1\u30B9\u3068\u30A2\u30AF\u30BB\u30B9\u6A29\u9650\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044: ${e.deployDir}`),process.exit(1)}console.log("[5/5] Docker Compose \u3067\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5..."),await Y5(e.deployDir,["up","-d","--build"])!==0&&(console.error(`
474
474
  \u30A8\u30E9\u30FC: docker compose up \u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002`),console.error(`\u30ED\u30B0\u3092\u78BA\u8A8D: cd ${e.deployDir} && docker compose logs`),process.exit(1)),console.log(`
475
- \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u5F85\u6A5F\u4E2D...`);let s=`http://localhost:${e.notesApiPort}/api/health`;await Y5(s)||(console.warn(`
475
+ \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u5F85\u6A5F\u4E2D...`);let s=`http://localhost:${e.notesApiPort}/api/health`;await Q5(s)||(console.warn(`
476
476
  \u8B66\u544A: \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u304C\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3057\u307E\u3057\u305F\u3002`),console.warn("\u30B5\u30FC\u30D3\u30B9\u306E\u8D77\u52D5\u306B\u6642\u9593\u304C\u304B\u304B\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"),console.warn(`\u624B\u52D5\u3067\u78BA\u8A8D: curl ${s}`));let c=`http://localhost:${e.notesAppPort}`,u=`http://localhost:${e.notesApiPort}`;console.log(`
477
477
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
478
478
  \u2551 GoDD Notes \u30C7\u30D7\u30ED\u30A4\u5B8C\u4E86 \u2551
@@ -496,12 +496,12 @@ ${Ne(i.error)}`);if(i.status!==0)throw new Error(`\u30B3\u30DE\u30F3\u30C9\u5931
496
496
  docker compose stop # \u505C\u6B62
497
497
  docker compose start # \u518D\u958B
498
498
  docker compose down -v # \u5B8C\u5168\u524A\u9664
499
- `)}async function e8(e){Fg()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let t=await X5(e);if(console.log(`
500
- --- \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${t.deployDir}`),console.log(` DB: ${t.postgresUser}@localhost:${t.postgresPort}/${t.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${t.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${t.notesAppPort}`),console.log(` GitHub: ${t.githubOwner}/${t.githubRepo} (${t.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${t.adminUsername}`),(await it(e,`
501
- \u3053\u306E\u8A2D\u5B9A\u3067\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}await iP(t)}function sP(e){let t=!1;for(let r=0;r<e.length;r++)(e[r]==="--yes"||e[r]==="-y")&&(t=!0);return{yes:t}}function aP(e){let t=!1,r=null;for(let n=0;n<e.length;n++)e[n]==="--auto"?t=!0:e[n]==="--config"&&n+1<e.length&&(r=e[++n]);return{auto:t,configPath:r}}function t8(e){if(!(0,de.existsSync)(e))throw new Error(`\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${e}`);let t;try{t=JSON.parse((0,de.readFileSync)(e,"utf-8"))}catch{throw new Error(`\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF08JSON \u5F62\u5F0F\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\uFF09: ${e}`)}return{deployDir:(0,ye.resolve)(t.deployDir??"./godd-notes"),postgresUser:t.postgresUser??"app_user",postgresPassword:t.postgresPassword??wr(24),postgresDb:t.postgresDb??"godd_notes",postgresPort:t.postgresPort??"5432",notesApiPort:t.notesApiPort??"3100",notesAppPort:t.notesAppPort??"5175",githubToken:t.githubToken??"",githubOwner:t.githubOwner??"",githubRepo:t.githubRepo??"",githubBranch:t.githubBranch??"main",jwtSecret:t.jwtSecret??wr(48),adminUsername:t.adminUsername??"admin",adminPassword:t.adminPassword??wr(16)}}function r8(){return{deployDir:(0,ye.resolve)("./godd-notes"),postgresUser:"app_user",postgresPassword:wr(24),postgresDb:"godd_notes",postgresPort:"5432",notesApiPort:"3100",notesAppPort:"5175",githubToken:process.env.GITHUB_TOKEN??"",githubOwner:process.env.GITHUB_OWNER??"",githubRepo:process.env.GITHUB_REPO??"",githubBranch:process.env.GITHUB_BRANCH??"main",jwtSecret:wr(48),adminUsername:"admin",adminPassword:wr(16)}}function n8(e){let{postgresPassword:t,jwtSecret:r,adminPassword:n,githubToken:o,...i}=e;(0,de.writeFileSync)(cP,JSON.stringify(i,null,2)+`
502
- `,"utf-8")}async function o8(){let e=process.cwd(),t=Ug(e);console.log(`
499
+ `)}async function t8(e){Fg()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let t=await e8(e);if(console.log(`
500
+ --- \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${t.deployDir}`),console.log(` DB: ${t.postgresUser}@localhost:${t.postgresPort}/${t.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${t.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${t.notesAppPort}`),console.log(` GitHub: ${t.githubOwner}/${t.githubRepo} (${t.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${t.adminUsername}`),(await qe(e,`
501
+ \u3053\u306E\u8A2D\u5B9A\u3067\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}await iP(t)}function sP(e){let t=!1;for(let r=0;r<e.length;r++)(e[r]==="--yes"||e[r]==="-y")&&(t=!0);return{yes:t}}function aP(e){let t=!1,r=null;for(let n=0;n<e.length;n++)e[n]==="--auto"?t=!0:e[n]==="--config"&&n+1<e.length&&(r=e[++n]);return{auto:t,configPath:r}}function r8(e){if(!(0,de.existsSync)(e))throw new Error(`\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${e}`);let t;try{t=JSON.parse((0,de.readFileSync)(e,"utf-8"))}catch{throw new Error(`\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30FC\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF08JSON \u5F62\u5F0F\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\uFF09: ${e}`)}return{deployDir:(0,ye.resolve)(t.deployDir??"./godd-notes"),postgresUser:t.postgresUser??"app_user",postgresPassword:t.postgresPassword??wr(24),postgresDb:t.postgresDb??"godd_notes",postgresPort:t.postgresPort??"5432",notesApiPort:t.notesApiPort??"3100",notesAppPort:t.notesAppPort??"5175",githubToken:t.githubToken??"",githubAppId:t.githubAppId??"",githubAppPrivateKey:t.githubAppPrivateKey??"",githubAppInstallationId:t.githubAppInstallationId??"",githubOwner:t.githubOwner??"",githubRepo:t.githubRepo??"",githubBranch:t.githubBranch??"main",jwtSecret:t.jwtSecret??wr(48),adminUsername:t.adminUsername??"admin",adminPassword:t.adminPassword??wr(16)}}function n8(){return{deployDir:(0,ye.resolve)("./godd-notes"),postgresUser:"app_user",postgresPassword:wr(24),postgresDb:"godd_notes",postgresPort:"5432",notesApiPort:"3100",notesAppPort:"5175",githubToken:process.env.GITHUB_TOKEN??"",githubAppId:process.env.GITHUB_APP_ID??"",githubAppPrivateKey:process.env.GITHUB_APP_PRIVATE_KEY??"",githubAppInstallationId:process.env.GITHUB_APP_INSTALLATION_ID??"",githubOwner:process.env.GITHUB_OWNER??"",githubRepo:process.env.GITHUB_REPO??"",githubBranch:process.env.GITHUB_BRANCH??"main",jwtSecret:wr(48),adminUsername:"admin",adminPassword:wr(16)}}function o8(e){let{postgresPassword:t,jwtSecret:r,adminPassword:n,githubToken:o,githubAppPrivateKey:i,...s}=e;(0,de.writeFileSync)(cP,JSON.stringify(s,null,2)+`
502
+ `,"utf-8")}async function i8(){let e=process.cwd(),t=Ug(e);console.log(`
503
503
  --- GoDD Notes \u30B9\u30C6\u30FC\u30BF\u30B9\u78BA\u8A8D ---
504
- `);let r=(0,de.existsSync)((0,ye.join)(e,"godd-notes"))?(0,ye.join)(e,"godd-notes"):e;if((0,de.existsSync)((0,ye.join)(r,"docker-compose.yml"))){console.log("[Docker Compose]");try{Ye.spawnSync("docker",["compose","ps"],{cwd:r,stdio:"inherit"})}catch{console.log(" Docker Compose \u304C\u8D77\u52D5\u3057\u3066\u3044\u307E\u305B\u3093\u3002")}console.log()}if(t?.provider==="aws"){console.log("[AWS ECS]");let c=t.region??"ap-northeast-1";try{let u=t.env??"dev",p=(0,ye.join)(t.outputDir??e,"terraform","godd-notes",u),l=Bg(p);Ye.spawnSync("aws",["ecs","describe-services","--cluster",l.ecs_cluster_name,"--services",l.ecs_service_name,"--region",c,"--query","services[0].{status:status,running:runningCount,desired:desiredCount,deployments:length(deployments)}","--output","table"],{stdio:"inherit"})}catch(u){console.log(` ECS \u30B9\u30C6\u30FC\u30BF\u30B9\u53D6\u5F97\u306B\u5931\u6557: ${Ne(u)}`)}console.log()}let o=(0,ye.join)(e,cP),s=((0,de.existsSync)(o)?(()=>{try{return JSON.parse((0,de.readFileSync)(o,"utf-8"))}catch{return null}})():null)?.notesApiPort??"3100",a=[s,...s!=="8000"?["8000"]:[]];console.log("[\u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF]");for(let c of a){let u=`http://localhost:${c}/api/health`,p=await new Promise(l=>{let d=Zg.get(u,{timeout:3e3},f=>{f.resume(),l(f.statusCode===200)});d.on("error",()=>l(!1)),d.on("timeout",()=>{d.destroy(),l(!1)})});console.log(` ${u}: ${p?"\u2713 OK":"\u2717 \u5FDC\u7B54\u306A\u3057"}`)}}function Lu(){console.log(`
504
+ `);let r=(0,de.existsSync)((0,ye.join)(e,"godd-notes"))?(0,ye.join)(e,"godd-notes"):e;if((0,de.existsSync)((0,ye.join)(r,"docker-compose.yml"))){console.log("[Docker Compose]");try{Qe.spawnSync("docker",["compose","ps"],{cwd:r,stdio:"inherit"})}catch{console.log(" Docker Compose \u304C\u8D77\u52D5\u3057\u3066\u3044\u307E\u305B\u3093\u3002")}console.log()}if(t?.provider==="aws"){console.log("[AWS ECS]");let c=t.region??"ap-northeast-1";try{let u=t.env??"dev",p=(0,ye.join)(t.outputDir??e,"terraform","godd-notes",u),l=Bg(p);Qe.spawnSync("aws",["ecs","describe-services","--cluster",l.ecs_cluster_name,"--services",l.ecs_service_name,"--region",c,"--query","services[0].{status:status,running:runningCount,desired:desiredCount,deployments:length(deployments)}","--output","table"],{stdio:"inherit"})}catch(u){console.log(` ECS \u30B9\u30C6\u30FC\u30BF\u30B9\u53D6\u5F97\u306B\u5931\u6557: ${Ne(u)}`)}console.log()}let o=(0,ye.join)(e,cP),s=((0,de.existsSync)(o)?(()=>{try{return JSON.parse((0,de.readFileSync)(o,"utf-8"))}catch{return null}})():null)?.notesApiPort??"3100",a=[s,...s!=="8000"?["8000"]:[]];console.log("[\u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF]");for(let c of a){let u=`http://localhost:${c}/api/health`,p=await new Promise(l=>{let d=Zg.get(u,{timeout:3e3},f=>{f.resume(),l(f.statusCode===200)});d.on("error",()=>l(!1)),d.on("timeout",()=>{d.destroy(),l(!1)})});console.log(` ${u}: ${p?"\u2713 OK":"\u2717 \u5FDC\u7B54\u306A\u3057"}`)}}function Lu(){console.log(`
505
505
  GoDD Notes \u30C7\u30D7\u30ED\u30A4\u7BA1\u7406
506
506
 
507
507
  Usage: godd notes <command> [options]
@@ -548,15 +548,15 @@ AI \u9023\u643A:
548
548
  \u8A2D\u5B9A\u306E\u6C38\u7D9A\u5316:
549
549
  infra \u30B3\u30DE\u30F3\u30C9\u306F .godd-notes-infra.json \u3092\u4FDD\u5B58\u3057\u518D\u5229\u7528\u3002
550
550
  compose --config/--auto \u306F .godd-notes-compose.json \u3092\u4FDD\u5B58\u3057\u518D\u5229\u7528\u3002
551
- `)}async function i8(e,t,r){console.log(`
551
+ `)}async function s8(e,t,r){console.log(`
552
552
  \u524D\u63D0\u6761\u4EF6\u3092\u78BA\u8A8D\u4E2D...`);let n=rP();if(!n.ok){console.error(`
553
553
  \u30A8\u30E9\u30FC: AWS \u30C7\u30D7\u30ED\u30A4\u306E\u524D\u63D0\u6761\u4EF6\u3092\u6E80\u305F\u3057\u3066\u3044\u307E\u305B\u3093:`);for(let u of n.errors)console.error(` - ${u}`);process.exit(1)}console.log(` \u2713 \u524D\u63D0\u6761\u4EF6 OK
554
554
  `);let o=e.env??"dev",i=e.outputDir??t,s=(0,ye.join)(i,"terraform","godd-notes",o);console.log(`Terraform output \u3092\u53D6\u5F97\u4E2D... (${s})`);let a=Bg(s);console.log(` \u2713 Terraform output \u53D6\u5F97\u5B8C\u4E86
555
- `);let c=tP();if(c||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),process.exit(1)),console.log("--- AWS \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---"),console.log(` ECR: ${a.ecr_repository_url}`),console.log(` ECS: ${a.ecs_cluster_name} / ${a.ecs_service_name}`),console.log(` S3: ${a.s3_bucket_name}`),console.log(` CloudFront: ${a.cloudfront_distribution_id}`),console.log(` App URL: ${a.notes_app_url}`),!r){let u=eP();try{if((await it(u,`
556
- \u3053\u306E\u8A2D\u5B9A\u3067 AWS \u306B\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}}finally{u.close()}}await nP(a,e,c)}async function s8(){try{let e=(0,ye.join)((0,ye.dirname)((0,qg.fileURLToPath)(lP.url)),"..","..","package.json");if(!(0,de.existsSync)(e))return;let t=JSON.parse((0,de.readFileSync)(e,"utf-8")),r=Ye.spawnSync("npm",["view",t.name,"dist-tags.latest","--json"],{encoding:"utf-8",timeout:5e3});if(r.status!==0||!r.stdout)return;let n=r.stdout.trim(),o=JSON.parse(n);o&&o!==t.version&&(console.log(`
555
+ `);let c=tP();if(c||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),process.exit(1)),console.log("--- AWS \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---"),console.log(` ECR: ${a.ecr_repository_url}`),console.log(` ECS: ${a.ecs_cluster_name} / ${a.ecs_service_name}`),console.log(` S3: ${a.s3_bucket_name}`),console.log(` CloudFront: ${a.cloudfront_distribution_id}`),console.log(` App URL: ${a.notes_app_url}`),!r){let u=eP();try{if((await qe(u,`
556
+ \u3053\u306E\u8A2D\u5B9A\u3067 AWS \u306B\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}}finally{u.close()}}await nP(a,e,c)}async function a8(){try{let e=(0,ye.join)((0,ye.dirname)((0,qg.fileURLToPath)(lP.url)),"..","..","package.json");if(!(0,de.existsSync)(e))return;let t=JSON.parse((0,de.readFileSync)(e,"utf-8")),r=Qe.spawnSync("npm",["view",t.name,"dist-tags.latest","--json"],{encoding:"utf-8",timeout:5e3});if(r.status!==0||!r.stdout)return;let n=r.stdout.trim(),o=JSON.parse(n);o&&o!==t.version&&(console.log(`
557
557
  \u26A0 @ripla/godd-mcp \u306E\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059: ${o}\uFF08\u73FE\u5728: ${t.version}\uFF09`),console.log(` \u66F4\u65B0: npm install -g ${t.name}@latest
558
- `))}catch{}}async function a8(e){let t=e[0]??"help";switch(t){case"compose":{if(e.includes("--help")||e.includes("-h")){Lu();return}Fg()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let r=aP(e.slice(1));if(r.auto||r.configPath){let n=r.configPath?t8(r.configPath):r8();n.githubToken||(console.error("\u30A8\u30E9\u30FC: githubToken \u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"),console.error("--config \u30D5\u30A1\u30A4\u30EB\u5185\u306B githubToken \u3092\u6307\u5B9A\u3059\u308B\u304B\u3001\u74B0\u5883\u5909\u6570 GITHUB_TOKEN \u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),console.log(`
559
- --- \u975E\u5BFE\u8A71\u30E2\u30FC\u30C9: \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${n.deployDir}`),console.log(` DB: ${n.postgresUser}@localhost:${n.postgresPort}/${n.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${n.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${n.notesAppPort}`),console.log(` GitHub: ${n.githubOwner}/${n.githubRepo} (${n.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${n.adminUsername}`),n8(n),await iP(n)}else{let n=eP();try{await e8(n)}finally{n.close()}}break}case"deploy":{if(e.includes("--help")||e.includes("-h")){Lu();return}await s8();let{yes:r}=sP(e),n=process.cwd(),o=Ug(n);(!o||o.provider!=="aws")&&(console.error("\u30A8\u30E9\u30FC: .godd-notes-infra.json \u304C\u898B\u3064\u304B\u3089\u306A\u3044\u304B\u3001provider \u304C aws \u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"),console.error("\u5148\u306B godd notes infra \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),await i8(o,n,r);break}case"infra":{let{runNotesInfra:r}=await Promise.resolve().then(()=>(YT(),JT));await r(e.slice(1));break}case"status":{await o8();break}case"help":case"--help":case"-h":Lu();break;default:console.error(`\u4E0D\u660E\u306A\u30B5\u30D6\u30B3\u30DE\u30F3\u30C9: ${t}`),Lu(),process.exit(1)}}var QT,XT,de,ye,Ye,Zg,qg,lP,ci,K5,Q5,cP,pP=_(()=>{"use strict";QT=st(require("node:readline"),1),XT=st(require("node:crypto"),1),de=require("node:fs"),ye=require("node:path"),Ye=st(require("node:child_process"),1),Zg=st(require("node:http"),1),qg=require("node:url");Ko();lP={};ci=1e4;K5=new Set([".venv","__pycache__",".pytest_cache",".ruff_cache","node_modules",".git",".env","dist"]);Q5=".godd-notes-infra.json";cP=".godd-notes-compose.json"});var qu=require("node:fs"),Ur=require("node:path"),Vg=require("node:os"),hP=require("node:url"),g8={};process.env.__GODD_CLI__="1";var c8=(0,hP.fileURLToPath)(g8.url),dP=(0,Ur.dirname)(c8);function u8(){for(let e of[(0,Ur.join)(dP,"..","package.json"),(0,Ur.join)(dP,"..","..","package.json")])try{let t=JSON.parse((0,qu.readFileSync)(e,"utf-8"));if(t.version)return t.version}catch{}return"0.0.0"}var ui=u8();function l8(){return ui.includes("-canary")?`${ui} (canary)`:ui==="0.0.0"?`${ui} (development)`:`${ui} (latest)`}function p8(){let e=process.platform==="win32"?"godd.exe":"godd",t=process.platform==="win32"?(0,Ur.join)(process.env.LOCALAPPDATA??(0,Ur.join)((0,Vg.homedir)(),"AppData","Local"),"GoDD"):(0,Ur.join)((0,Vg.homedir)(),".godd","bin");return(0,qu.existsSync)((0,Ur.join)(t,e))}var d8={i:"install",s:"server",n:"notes",v:"version",h:"help"};function f8(){return p8()?"help":"install"}var Zu=process.argv[2],h8=Zu?d8[Zu]??Zu:f8();function fP(){console.log(`
558
+ `))}catch{}}async function c8(e){let t=e[0]??"help";switch(t){case"compose":{if(e.includes("--help")||e.includes("-h")){Lu();return}Fg()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let r=aP(e.slice(1));if(r.auto||r.configPath){let n=r.configPath?r8(r.configPath):n8();W5(n)||(console.error("\u30A8\u30E9\u30FC: GitHub \u8A8D\u8A3C\u60C5\u5831\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"),console.error("--config \u30D5\u30A1\u30A4\u30EB\u5185\u307E\u305F\u306F\u74B0\u5883\u5909\u6570\u306B GITHUB_TOKEN \u304B GitHub App \u8A2D\u5B9A\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),console.log(`
559
+ --- \u975E\u5BFE\u8A71\u30E2\u30FC\u30C9: \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${n.deployDir}`),console.log(` DB: ${n.postgresUser}@localhost:${n.postgresPort}/${n.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${n.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${n.notesAppPort}`),console.log(` GitHub: ${n.githubOwner}/${n.githubRepo} (${n.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${n.adminUsername}`),o8(n),await iP(n)}else{let n=eP();try{await t8(n)}finally{n.close()}}break}case"deploy":{if(e.includes("--help")||e.includes("-h")){Lu();return}await a8();let{yes:r}=sP(e),n=process.cwd(),o=Ug(n);(!o||o.provider!=="aws")&&(console.error("\u30A8\u30E9\u30FC: .godd-notes-infra.json \u304C\u898B\u3064\u304B\u3089\u306A\u3044\u304B\u3001provider \u304C aws \u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"),console.error("\u5148\u306B godd notes infra \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1)),await s8(o,n,r);break}case"infra":{let{runNotesInfra:r}=await Promise.resolve().then(()=>(YT(),JT));await r(e.slice(1));break}case"status":{await i8();break}case"help":case"--help":case"-h":Lu();break;default:console.error(`\u4E0D\u660E\u306A\u30B5\u30D6\u30B3\u30DE\u30F3\u30C9: ${t}`),Lu(),process.exit(1)}}var QT,XT,de,ye,Qe,Zg,qg,lP,ci,J5,X5,cP,pP=_(()=>{"use strict";QT=st(require("node:readline"),1),XT=st(require("node:crypto"),1),de=require("node:fs"),ye=require("node:path"),Qe=st(require("node:child_process"),1),Zg=st(require("node:http"),1),qg=require("node:url");Ko();lP={};ci=1e4;J5=new Set([".venv","__pycache__",".pytest_cache",".ruff_cache","node_modules",".git",".env","dist"]);X5=".godd-notes-infra.json";cP=".godd-notes-compose.json"});var qu=require("node:fs"),Ur=require("node:path"),Hg=require("node:os"),hP=require("node:url"),y8={};process.env.__GODD_CLI__="1";var u8=(0,hP.fileURLToPath)(y8.url),dP=(0,Ur.dirname)(u8);function l8(){for(let e of[(0,Ur.join)(dP,"..","package.json"),(0,Ur.join)(dP,"..","..","package.json")])try{let t=JSON.parse((0,qu.readFileSync)(e,"utf-8"));if(t.version)return t.version}catch{}return"0.0.0"}var ui=l8();function p8(){return ui.includes("-canary")?`${ui} (canary)`:ui==="0.0.0"?`${ui} (development)`:`${ui} (latest)`}function d8(){let e=process.platform==="win32"?"godd.exe":"godd",t=process.platform==="win32"?(0,Ur.join)(process.env.LOCALAPPDATA??(0,Ur.join)((0,Hg.homedir)(),"AppData","Local"),"GoDD"):(0,Ur.join)((0,Hg.homedir)(),".godd","bin");return(0,qu.existsSync)((0,Ur.join)(t,e))}var f8={i:"install",s:"server",n:"notes",v:"version",h:"help"};function h8(){return d8()?"help":"install"}var Zu=process.argv[2],m8=Zu?f8[Zu]??Zu:h8();function fP(){console.log(`
560
560
  GoDD CLI v${ui}
561
561
 
562
562
  Usage: godd <command>
@@ -576,7 +576,7 @@ Examples:
576
576
  godd notes deploy AWS \u306B\u30C7\u30D7\u30ED\u30A4\uFF08ECR/ECS/S3/CloudFront\uFF09
577
577
  godd notes infra Notes \u30A2\u30D7\u30EA\u96DB\u5F62\u3068\u30AF\u30E9\u30A6\u30C9\u30A4\u30F3\u30D5\u30E9\u3092\u5BFE\u8A71\u5F62\u5F0F\u3067\u69CB\u7BC9
578
578
  godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u78BA\u8A8D
579
- `)}async function m8(){switch(h8){case"server":{let{startServer:e}=await Promise.resolve().then(()=>(CT(),TT));await e();break}case"init":{let{runInit:e}=await Promise.resolve().then(()=>(DT(),OT));await e();break}case"install":{let{runInstall:e}=await Promise.resolve().then(()=>(qT(),ZT));await e();break}case"notes":{let{runNotes:e}=await Promise.resolve().then(()=>(pP(),uP));await e(process.argv.slice(3));break}case"version":console.log(`GoDD CLI v${l8()}`);break;case"help":fP();break;default:console.error(`\u4E0D\u660E\u306A\u30B3\u30DE\u30F3\u30C9: ${Zu}`),fP(),process.exit(1)}}m8().catch(e=>{console.error("GoDD CLI \u30A8\u30E9\u30FC:",e),process.exit(1)});
579
+ `)}async function g8(){switch(m8){case"server":{let{startServer:e}=await Promise.resolve().then(()=>(CT(),TT));await e();break}case"init":{let{runInit:e}=await Promise.resolve().then(()=>(DT(),OT));await e();break}case"install":{let{runInstall:e}=await Promise.resolve().then(()=>(qT(),ZT));await e();break}case"notes":{let{runNotes:e}=await Promise.resolve().then(()=>(pP(),uP));await e(process.argv.slice(3));break}case"version":console.log(`GoDD CLI v${p8()}`);break;case"help":fP();break;default:console.error(`\u4E0D\u660E\u306A\u30B3\u30DE\u30F3\u30C9: ${Zu}`),fP(),process.exit(1)}}g8().catch(e=>{console.error("GoDD CLI \u30A8\u30E9\u30FC:",e),process.exit(1)});
580
580
  /*! Bundled license information:
581
581
 
582
582
  js-yaml/dist/js-yaml.mjs: