@iflow-ai/iflow-cli 0.2.5-beta.0 → 0.2.5
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/bundle/iflow.js +3 -3
- package/package.json +1 -1
package/bundle/iflow.js
CHANGED
|
@@ -541,7 +541,7 @@ ${JSON.stringify(a,null,2)}`),a.usage&&(this.lastUsageMetadata={total_tokens:a.u
|
|
|
541
541
|
\u8FD9\u4E2A\u662F\u9519\u8BEF\u7684json\u683C\u5F0F\uFF1A
|
|
542
542
|
${e}
|
|
543
543
|
|
|
544
|
-
\u8BF7\u76F4\u63A5\u8F93\u51FA\u4E00\u4E2A\u6B63\u786E\u7684json\u683C\u5F0F\uFF1A`;try{let r=await fetch("https://apis.iflow.cn/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({model:"QWen3-4B",messages:[{role:"user",content:n}],temperature:.1,max_tokens:1e3})});if(!r.ok)throw new Error(`QWen API error: ${r.status}`);let o=(await r.json()).choices[0].message.content.trim();return o.startsWith("```json")?o=o.replace(/^```json\s*/,"").replace(/\s*```$/,""):o.startsWith("```")&&(o=o.replace(/^```\s*/,"").replace(/\s*```$/,"")),JSON.parse(o)}catch(r){throw NC(r),console.error("QWen JSON fix failed:",r),r}}extractTextFromRequest(e){let n="";if(e.contents){let r=Array.isArray(e.contents)?e.contents:[e.contents];for(let i of r)if(i&&typeof i=="object"&&"parts"in i&&i.parts){let o=Array.isArray(i.parts)?i.parts:[i.parts];for(let s of o)if(s&&typeof s=="object"&&"text"in s&&s.text)n+=s.text+" ";else if(s.functionResponse&&s.functionResponse.response)for(let[a,l]of Object.entries(s.functionResponse.response))l!=null&&(n+=String(l)+" ")}}return n.trim()}extractTextFromEmbedRequest(e){if(e.contents){let n=Array.isArray(e.contents)?e.contents:[e.contents];for(let r of n)if(typeof r=="object"&&r!==null&&"parts"in r&&r.parts){let i=Array.isArray(r.parts)?r.parts:[r.parts];for(let o of i)if(typeof o=="object"&&o!==null&&"text"in o&&o.text)return o.text}else{if(typeof r=="string")return r;if(typeof r=="object"&&r!==null&&"text"in r&&r.text)return r.text}}return""}extractSystemInstruction(e){let n="";if(typeof e=="string")n=e;else if(Array.isArray(e)){for(let r of e)typeof r=="object"&&r!==null&&"text"in r&&r.text&&(n+=r.text+" ");n=n.trim()}else if(typeof e=="object"&&e!==null)if("parts"in e&&e.parts){let r=Array.isArray(e.parts)?e.parts:[e.parts];for(let i of r)typeof i=="object"&&i!==null&&"text"in i&&i.text&&(n+=i.text+" ");n=n.trim()}else"text"in e&&e.text&&(n=e.text);return n}convertToOpenAITools(e){if(!e||e.length===0)return[];let n=[];for(let r of e)if(r.functionDeclarations&&Array.isArray(r.functionDeclarations))for(let i of r.functionDeclarations)n.push({type:"function",function:{name:i.name||"",description:i.description,parameters:this.convertParameters(i.parameters||i.parametersJsonSchema)}});return n}convertParameters(e){if(!e)return;let n={STRING:"string",INTEGER:"integer",NUMBER:"number",BOOLEAN:"boolean",OBJECT:"object",ARRAY:"array"};if(typeof e=="object"&&e.type){if(typeof e.type=="string"&&(n[e.type]?e.type=n[e.type]:e.type=e.type.toLowerCase()),e.properties)for(let i in e.properties){let o=e.properties[i],s={};o.type&&(s.type=n[o.type]),o.description&&(s.description=o.description),e.properties[i]=s}return e.items&&(e.items=this.convertParameters(e.items)),e}let r=i=>{if(!i)return;let o={};if(i.type)switch(i.type){case"STRING":o.type="string";break;case"INTEGER":o.type="integer";break;case"NUMBER":o.type="number";break;case"BOOLEAN":o.type="boolean";break;case"OBJECT":o.type="object";break;case"ARRAY":o.type="array";break;default:o.type=i.type.toLowerCase()}if(o.type="object",i.description&&(o.description=i.description),i.enum&&(o.enum=i.enum),i.properties){o.properties={};for(let[s,a]of Object.entries(i.properties))o.properties[s]=r(a)}return i.items&&(o.items=r(i.items)),i.required&&(o.required=i.required),o};return r(e)}mapFinishReason(e){switch(e){case"stop":return qb.STOP;case"length":return qb.MAX_TOKENS;case"content_filter":return qb.SAFETY;case"tool_calls":return qb.MALFORMED_FUNCTION_CALL;default:return qb.OTHER}}convertResponseSchema(e){if(e)return e.type==="object"||e.type==="OBJECT"?{type:"json_schema",json_schema:{name:e.name||"",description:e.description||"",schema:this.convertSchemaToJsonSchema(e),strict:!0}}:{type:"json_schema",json_schema:{name:"response_schema",description:"Generated response schema",schema:this.convertSchemaToJsonSchema(e),strict:!0}}}convertSchemaToJsonSchema(e){if(!e)return{};let n={};if(e.type)switch(e.type){case"STRING":n.type="string";break;case"INTEGER":n.type="integer";break;case"NUMBER":n.type="number";break;case"BOOLEAN":n.type="boolean";break;case"OBJECT":n.type="object";break;case"ARRAY":n.type="array";break;default:n.type=typeof e.type=="string"?e.type.toLowerCase():e.type}if(e.description&&(n.description=e.description),e.enum&&(n.enum=e.enum),e.properties){n.properties={};for(let[r,i]of Object.entries(e.properties))n.properties[r]=this.convertSchemaToJsonSchema(i)}return e.items&&(n.items=this.convertSchemaToJsonSchema(e.items)),e.required&&(n.required=e.required),n.type==="object"&&!("additionalProperties"in n)&&(n.additionalProperties=!1),n}}});function SFn(t){return t.replace(/([a-z])([A-Z])/g,"$1_$2").toUpperCase()}function oS(t){let e=SFn(t),n=`IFLOW_${t}`;if(process.env[n])return process.env[n];let r=`IFLOW_${e}`;if(process.env[r])return process.env[r];let i=`iflow_${t}`;if(process.env[i])return process.env[i];let o=`iflow_${e}`;if(process.env[o])return process.env[o]}function sG(){return oS("apiKey")}function aG(){return oS("baseUrl")||oS("url")}function lG(){return oS("modelName")||oS("model")}function nat(t){let e=oS(t);if(e===void 0)return;let n=e.toLowerCase();if(n==="true"||n==="1"||n==="yes")return!0;if(n==="false"||n==="0"||n==="no")return!1}function rat(t){let e=oS(t);if(e===void 0)return;let n=Number(e);return isNaN(n)?void 0:n}function iat(t){let e=oS(t);if(e!==void 0)return e.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function MZ(){return!!(sG()||aG()||lG())}function FSe(){let t={},e=["theme","selectedAuthType","sandbox","toolDiscoveryCommand","toolCallCommand","mcpServerCommand","contextFileName","preferredEditor","apiKey","baseUrl","modelName","searchApiKey","multimodalModelName","memoryImportFormat"],n=["useExternalAuth","showMemoryUsage","usageStatisticsEnabled","autoConfigureMaxOldSpaceSize","hideWindowTitle","hideTips","hideBanner","vimMode","ideModeFeature","ideMode","disableAutoUpdate"],r=["maxSessionTurns","memoryDiscoveryMaxDirs"],i=["coreTools","excludeTools","allowMCPServers","excludeMCPServers"];return e.forEach(o=>{let s=oS(o);s!==void 0&&(t[o]=s)}),n.forEach(o=>{let s=nat(o);s!==void 0&&(t[o]=s)}),r.forEach(o=>{let s=rat(o);s!==void 0&&(t[o]=s)}),i.forEach(o=>{let s=iat(o);s!==void 0&&(t[o]=s)}),t}function _Fn(){return{apiKey:sG(),baseUrl:aG(),model:lG()}}var LSe=Le(()=>{"use strict";});function PSe(t,e,n){let r=process.env.GEMINI_API_KEY,i=process.env.GOOGLE_API_KEY,o=process.env.GOOGLE_CLOUD_PROJECT,s=process.env.GOOGLE_CLOUD_LOCATION,a=sG(),l=aG(),u=lG(),c=n?.apiKey||a,d=n?.baseUrl||l||IFn[e],h=t.getModel()||u||wh,m={model:h,authType:e,proxy:t?.getProxy(),multimodalModelName:n?.multimodalModelName,debugMode:t?.getDebugMode()};return e===Sn.LOGIN_WITH_GOOGLE||e===Sn.CLOUD_SHELL?m:e===Sn.USE_GEMINI&&r?(m.apiKey=r,m.vertexai=!1,Yst(m.apiKey,m.model,m.proxy),m):e===Sn.USE_VERTEX_AI&&(i||o&&s)?(m.apiKey=i,m.vertexai=!0,m):([...Vf,Sn.OPENAI_COMPATIBLE].includes(e)&&c&&(m.apiKey=c,m.baseUrl=d,m.model=h),m)}async function QSe(t,e,n){let i={headers:{"User-Agent":`iFlowCLI/0.2.5-beta.0 (${process.platform}; ${process.arch})`}};if(t.authType&&[...Vf,Sn.IDEA_LAB].includes(t.authType)||t.authType===Sn.OPENAI_COMPATIBLE)return new OZ(t);if(t.authType===Sn.LOGIN_WITH_GOOGLE||t.authType===Sn.CLOUD_SHELL)return U1e(i,t.authType,e,n);if([...Vf,Sn.OPENAI_COMPATIBLE].includes(t.authType)||t.authType===Sn.USE_GEMINI||t.authType===Sn.USE_VERTEX_AI)return new dK({apiKey:t.apiKey===""?void 0:t.apiKey,vertexai:t.vertexai,httpOptions:i}).models;throw new Error(`Error creating contentGenerator: Unsupported authType: ${t.authType}`)}var Sn,Vf,IFn,$I=Le(()=>{"use strict";nl();G1e();_C();jst();tat();LSe();(function(t){t.LOGIN_WITH_GOOGLE="oauth-personal",t.USE_GEMINI="gemini-api-key",t.USE_VERTEX_AI="vertex-ai",t.CLOUD_SHELL="cloud-shell",t.IFLOW="iflow",t.IDEA_LAB="idealab",t.OPENAI_COMPATIBLE="openai-compatible"})(Sn||(Sn={}));Vf=[Sn.IFLOW,Sn.IDEA_LAB],IFn={[Sn.IDEA_LAB]:"https://idealab.alibaba-inc.com/api/openai/v1",[Sn.IFLOW]:VXe}});var FZ,oat=Le(()=>{"use strict";FZ=class{prompts=new Map;registerPrompt(e){if(this.prompts.has(e.name)){let n=`${e.serverName}_${e.name}`;console.warn(`Prompt with name "${e.name}" is already registered. Renaming to "${n}".`),this.prompts.set(n,{...e,name:n})}else this.prompts.set(e.name,e)}getAllPrompts(){return Array.from(this.prompts.values()).sort((e,n)=>e.name.localeCompare(n.name))}getPrompt(e){return this.prompts.get(e)}getPromptsByServer(e){let n=[];for(let r of this.prompts.values())r.serverName===e&&n.push(r);return n.sort((r,i)=>r.name.localeCompare(i.name))}}});var Io,Rr,To,pc=Le(()=>{"use strict";Io=class{name;displayName;description;icon;parameterSchema;isOutputMarkdown;canUpdateOutput;aliases;constructor(e,n,r,i,o,s=!0,a=!1,l=[]){this.name=e,this.displayName=n,this.description=r,this.icon=i,this.parameterSchema=o,this.isOutputMarkdown=s,this.canUpdateOutput=a,this.aliases=l}get schema(){return{name:this.name,description:this.description,parameters:this.parameterSchema}}validateToolParams(e){return null}getDescription(e){return JSON.stringify(e)}shouldConfirmExecute(e,n){return Promise.resolve(!1)}toolLocations(e){return[]}};(function(t){t.ProceedOnce="proceed_once",t.ProceedAlways="proceed_always",t.ProceedAlwaysServer="proceed_always_server",t.ProceedAlwaysTool="proceed_always_tool",t.ModifyWithEditor="modify_with_editor",t.Cancel="cancel"})(Rr||(Rr={}));(function(t){t.FileSearch="fileSearch",t.Folder="folder",t.Globe="globe",t.Hammer="hammer",t.LightBulb="lightBulb",t.Pencil="pencil",t.Regex="regex",t.Terminal="terminal"})(To||(To={}))});var os,kSe,Gn,sS,uG=Le(()=>{(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(os||(os={}));(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(kSe||(kSe={}));Gn=os.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sS=t=>{switch(typeof t){case"undefined":return Gn.undefined;case"string":return Gn.string;case"number":return Number.isNaN(t)?Gn.nan:Gn.number;case"boolean":return Gn.boolean;case"function":return Gn.function;case"bigint":return Gn.bigint;case"symbol":return Gn.symbol;case"object":return Array.isArray(t)?Gn.array:t===null?Gn.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Gn.promise:typeof Map<"u"&&t instanceof Map?Gn.map:typeof Set<"u"&&t instanceof Set?Gn.set:typeof Date<"u"&&t instanceof Date?Gn.date:Gn.object;default:return Gn.unknown}}});var ln,TFn,sg,LZ=Le(()=>{uG();ln=os.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"]),TFn=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),sg=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(o){return o.message},r={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){let u=s.path[l];l===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(s))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,os.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];n[o]=n[o]||[],n[o].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};sg.create=t=>new sg(t)});var bFn,u2,USe=Le(()=>{LZ();uG();bFn=(t,e)=>{let n;switch(t.code){case ln.invalid_type:t.received===Gn.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ln.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,os.jsonStringifyReplacer)}`;break;case ln.unrecognized_keys:n=`Unrecognized key(s) in object: ${os.joinValues(t.keys,", ")}`;break;case ln.invalid_union:n="Invalid input";break;case ln.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${os.joinValues(t.options)}`;break;case ln.invalid_enum_value:n=`Invalid enum value. Expected ${os.joinValues(t.options)}, received '${t.received}'`;break;case ln.invalid_arguments:n="Invalid function arguments";break;case ln.invalid_return_type:n="Invalid function return type";break;case ln.invalid_date:n="Invalid date";break;case ln.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:os.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ln.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ln.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ln.custom:n="Invalid input";break;case ln.invalid_intersection_types:n="Intersection results could not be merged";break;case ln.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ln.not_finite:n="Number must be finite";break;default:n=e.defaultError,os.assertNever(t)}return{message:n}},u2=bFn});function xFn(t){sat=t}function q8(){return sat}var sat,PZ=Le(()=>{USe();sat=u2});function Nn(t,e){let n=q8(),r=cG({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===u2?void 0:u2].filter(i=>!!i)});t.common.issues.push(r)}var cG,wFn,Hp,pi,vN,Mh,QZ,kZ,sx,V8,GSe=Le(()=>{PZ();USe();cG=t=>{let{data:e,path:n,errorMaps:r,issueData:i}=t,o=[...n,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",l=r.filter(u=>!!u).slice().reverse();for(let u of l)a=u(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},wFn=[];Hp=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let i of n){if(i.status==="aborted")return pi;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let i of n){let o=await i.key,s=await i.value;r.push({key:o,value:s})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let i of n){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return pi;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:e.value,value:r}}},pi=Object.freeze({status:"aborted"}),vN=t=>({status:"dirty",value:t}),Mh=t=>({status:"valid",value:t}),QZ=t=>t.status==="aborted",kZ=t=>t.status==="dirty",sx=t=>t.status==="valid",V8=t=>typeof Promise<"u"&&t instanceof Promise});var aat=Le(()=>{});var Dr,lat=Le(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Dr||(Dr={}))});function Co(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{let{message:l}=t;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:i}}function fat(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function YFn(t){return new RegExp(`^${fat(t)}$`)}function pat(t){let e=`${dat}T${fat(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function jFn(t,e){return!!((e==="v4"||!e)&&kFn.test(t)||(e==="v6"||!e)&&GFn.test(t))}function WFn(t,e){if(!FFn.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function zFn(t,e){return!!((e==="v4"||!e)&&UFn.test(t)||(e==="v6"||!e)&&HFn.test(t))}function JFn(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}function $8(t){if(t instanceof ag){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=_y.create($8(r))}return new ag({...t._def,shape:()=>e})}else return t instanceof f2?new f2({...t._def,type:$8(t.element)}):t instanceof _y?_y.create($8(t.unwrap())):t instanceof lS?lS.create($8(t.unwrap())):t instanceof aS?aS.create(t.items.map(e=>$8(e))):t}function qSe(t,e){let n=sS(t),r=sS(e);if(t===e)return{valid:!0,data:t};if(n===Gn.object&&r===Gn.object){let i=os.objectKeys(e),o=os.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let l=qSe(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Gn.array&&r===Gn.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],l=qSe(s,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Gn.date&&r===Gn.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function hat(t,e){return new NN({values:t,typeName:Si.ZodEnum,...Co(e)})}function cat(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function mat(t,e={},n){return t?lx.create().superRefine((r,i)=>{let o=t(r);if(o instanceof Promise)return o.then(s=>{if(!s){let a=cat(e,r),l=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:l})}});if(!o){let s=cat(e,r),a=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:a})}}):lx.create()}var Iy,uat,Po,RFn,BFn,NFn,OFn,MFn,FFn,LFn,PFn,QFn,HSe,kFn,UFn,GFn,HFn,qFn,VFn,dat,$Fn,ax,DN,SN,_N,IN,Y8,TN,bN,lx,d2,OC,j8,f2,ag,xN,c2,UZ,wN,aS,GZ,W8,z8,HZ,RN,BN,NN,ON,ux,Ty,_y,lS,MN,FN,J8,KFn,dG,fG,LN,XFn,Si,ZFn,Aat,gat,e8n,t8n,Eat,n8n,r8n,i8n,o8n,s8n,a8n,l8n,u8n,c8n,d8n,f8n,p8n,h8n,m8n,A8n,g8n,E8n,y8n,C8n,v8n,D8n,S8n,_8n,I8n,T8n,b8n,x8n,w8n,R8n,B8n,N8n,O8n,M8n,F8n,yat=Le(()=>{LZ();PZ();lat();GSe();uG();Iy=class{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},uat=(t,e)=>{if(sx(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new sg(t.common.issues);return this._error=n,this._error}}};Po=class{get description(){return this._def.description}_getType(e){return sS(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:sS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Hp,ctx:{common:e.parent.common,data:e.data,parsedType:sS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(V8(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sS(e)},i=this._parseSync({data:e,path:r.path,parent:r});return uat(r,i)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sS(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return sx(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>sx(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sS(e)},i=this._parse({data:e,path:r.path,parent:r}),o=await(V8(i)?i:Promise.resolve(i));return uat(r,o)}refine(e,n){let r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:ln.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Ty({schema:this,typeName:Si.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return _y.create(this,this._def)}nullable(){return lS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return f2.create(this)}promise(){return ux.create(this,this._def)}or(e){return xN.create([this,e],this._def)}and(e){return wN.create(this,e,this._def)}transform(e){return new Ty({...Co(this._def),schema:this,typeName:Si.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new MN({...Co(this._def),innerType:this,defaultValue:n,typeName:Si.ZodDefault})}brand(){return new dG({typeName:Si.ZodBranded,type:this,...Co(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new FN({...Co(this._def),innerType:this,catchValue:n,typeName:Si.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return fG.create(this,e)}readonly(){return LN.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},RFn=/^c[^\s-]{8,}$/i,BFn=/^[0-9a-z]+$/,NFn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,OFn=/^[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,MFn=/^[a-z0-9_-]{21}$/i,FFn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,LFn=/^[-+]?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)?)??$/,PFn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,QFn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",kFn=/^(?:(?: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])$/,UFn=/^(?:(?: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])$/,GFn=/^(([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]))$/,HFn=/^(([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])$/,qFn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,VFn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dat="((\\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])))",$Fn=new RegExp(`^${dat}$`);ax=class t extends Po{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Gn.string){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_type,expected:Gn.string,received:o.parsedType}),pi}let r=new Hp,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?Nn(i,{code:ln.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Nn(i,{code:ln.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")PFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"email",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")HSe||(HSe=new RegExp(QFn,"u")),HSe.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"emoji",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")OFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"uuid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")MFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"nanoid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")RFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"cuid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")BFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"cuid2",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")NFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"ulid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),Nn(i,{validation:"url",code:ln.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"regex",code:ln.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?pat(o).test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?$Fn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?YFn(o).test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?LFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"duration",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?jFn(e.data,o.version)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"ip",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?WFn(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"jwt",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?zFn(e.data,o.version)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"cidr",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?qFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"base64",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?VFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"base64url",code:ln.invalid_string,message:o.message}),r.dirty()):os.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:ln.invalid_string,...Dr.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Dr.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Dr.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Dr.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Dr.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Dr.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Dr.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Dr.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Dr.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Dr.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Dr.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Dr.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Dr.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Dr.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Dr.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Dr.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Dr.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Dr.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Dr.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Dr.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Dr.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Dr.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Dr.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Dr.errToObj(n)})}nonempty(e){return this.min(1,Dr.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};ax.create=t=>new ax({checks:[],typeName:Si.ZodString,coerce:t?.coerce??!1,...Co(t)});DN=class t extends Po{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Gn.number){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_type,expected:Gn.number,received:o.parsedType}),pi}let r,i=new Hp;for(let o of this._def.checks)o.kind==="int"?os.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?JFn(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.not_finite,message:o.message}),i.dirty()):os.assertNever(o);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Dr.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Dr.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Dr.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Dr.toString(n))}setLimit(e,n,r,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Dr.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Dr.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Dr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Dr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Dr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Dr.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Dr.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Dr.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Dr.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Dr.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&os.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};DN.create=t=>new DN({checks:[],typeName:Si.ZodNumber,coerce:t?.coerce||!1,...Co(t)});SN=class t extends Po{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Gn.bigint)return this._getInvalidInput(e);let r,i=new Hp;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):os.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return Nn(n,{code:ln.invalid_type,expected:Gn.bigint,received:n.parsedType}),pi}gte(e,n){return this.setLimit("min",e,!0,Dr.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Dr.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Dr.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Dr.toString(n))}setLimit(e,n,r,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Dr.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Dr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Dr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Dr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Dr.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Dr.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};SN.create=t=>new SN({checks:[],typeName:Si.ZodBigInt,coerce:t?.coerce??!1,...Co(t)});_N=class extends Po{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Gn.boolean){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.boolean,received:r.parsedType}),pi}return Mh(e.data)}};_N.create=t=>new _N({typeName:Si.ZodBoolean,coerce:t?.coerce||!1,...Co(t)});IN=class t extends Po{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Gn.date){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_type,expected:Gn.date,received:o.parsedType}),pi}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_date}),pi}let r=new Hp,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):os.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Dr.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Dr.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};IN.create=t=>new IN({checks:[],coerce:t?.coerce||!1,typeName:Si.ZodDate,...Co(t)});Y8=class extends Po{_parse(e){if(this._getType(e)!==Gn.symbol){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.symbol,received:r.parsedType}),pi}return Mh(e.data)}};Y8.create=t=>new Y8({typeName:Si.ZodSymbol,...Co(t)});TN=class extends Po{_parse(e){if(this._getType(e)!==Gn.undefined){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.undefined,received:r.parsedType}),pi}return Mh(e.data)}};TN.create=t=>new TN({typeName:Si.ZodUndefined,...Co(t)});bN=class extends Po{_parse(e){if(this._getType(e)!==Gn.null){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.null,received:r.parsedType}),pi}return Mh(e.data)}};bN.create=t=>new bN({typeName:Si.ZodNull,...Co(t)});lx=class extends Po{constructor(){super(...arguments),this._any=!0}_parse(e){return Mh(e.data)}};lx.create=t=>new lx({typeName:Si.ZodAny,...Co(t)});d2=class extends Po{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Mh(e.data)}};d2.create=t=>new d2({typeName:Si.ZodUnknown,...Co(t)});OC=class extends Po{_parse(e){let n=this._getOrReturnCtx(e);return Nn(n,{code:ln.invalid_type,expected:Gn.never,received:n.parsedType}),pi}};OC.create=t=>new OC({typeName:Si.ZodNever,...Co(t)});j8=class extends Po{_parse(e){if(this._getType(e)!==Gn.undefined){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.void,received:r.parsedType}),pi}return Mh(e.data)}};j8.create=t=>new j8({typeName:Si.ZodVoid,...Co(t)});f2=class t extends Po{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==Gn.array)return Nn(n,{code:ln.invalid_type,expected:Gn.array,received:n.parsedType}),pi;if(i.exactLength!==null){let s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(Nn(n,{code:s?ln.too_big:ln.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Nn(n,{code:ln.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Nn(n,{code:ln.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new Iy(n,s,n.path,a)))).then(s=>Hp.mergeArray(r,s));let o=[...n.data].map((s,a)=>i.type._parseSync(new Iy(n,s,n.path,a)));return Hp.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:Dr.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:Dr.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:Dr.toString(n)}})}nonempty(e){return this.min(1,e)}};f2.create=(t,e)=>new f2({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Si.ZodArray,...Co(e)});ag=class t extends Po{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=os.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Gn.object){let u=this._getOrReturnCtx(e);return Nn(u,{code:ln.invalid_type,expected:Gn.object,received:u.parsedType}),pi}let{status:r,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof OC&&this._def.unknownKeys==="strip"))for(let u in i.data)s.includes(u)||a.push(u);let l=[];for(let u of s){let c=o[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Iy(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof OC){let u=this._def.unknownKeys;if(u==="passthrough")for(let c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(Nn(i,{code:ln.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let c of a){let d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Iy(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let u=[];for(let c of l){let d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>Hp.mergeObjectSync(r,u)):Hp.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Dr.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Dr.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Si.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of os.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of os.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return $8(this)}partial(e){let n={};for(let r of os.objectKeys(this.shape)){let i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of os.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof _y;)o=o._def.innerType;n[r]=o}return new t({...this._def,shape:()=>n})}keyof(){return hat(os.objectKeys(this.shape))}};ag.create=(t,e)=>new ag({shape:()=>t,unknownKeys:"strip",catchall:OC.create(),typeName:Si.ZodObject,...Co(e)});ag.strictCreate=(t,e)=>new ag({shape:()=>t,unknownKeys:"strict",catchall:OC.create(),typeName:Si.ZodObject,...Co(e)});ag.lazycreate=(t,e)=>new ag({shape:t,unknownKeys:"strip",catchall:OC.create(),typeName:Si.ZodObject,...Co(e)});xN=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new sg(a.ctx.common.issues));return Nn(n,{code:ln.invalid_union,unionErrors:s}),pi}if(n.common.async)return Promise.all(r.map(async o=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let l of r){let u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(l=>new sg(l));return Nn(n,{code:ln.invalid_union,unionErrors:a}),pi}}get options(){return this._def.options}};xN.create=(t,e)=>new xN({options:t,typeName:Si.ZodUnion,...Co(e)});c2=t=>t instanceof RN?c2(t.schema):t instanceof Ty?c2(t.innerType()):t instanceof BN?[t.value]:t instanceof NN?t.options:t instanceof ON?os.objectValues(t.enum):t instanceof MN?c2(t._def.innerType):t instanceof TN?[void 0]:t instanceof bN?[null]:t instanceof _y?[void 0,...c2(t.unwrap())]:t instanceof lS?[null,...c2(t.unwrap())]:t instanceof dG||t instanceof LN?c2(t.unwrap()):t instanceof FN?c2(t._def.innerType):[],UZ=class t extends Po{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==Gn.object)return Nn(n,{code:ln.invalid_type,expected:Gn.object,received:n.parsedType}),pi;let r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Nn(n,{code:ln.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),pi)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let i=new Map;for(let o of n){let s=c2(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:Si.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Co(r)})}};wN=class extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=(o,s)=>{if(QZ(o)||QZ(s))return pi;let a=qSe(o.value,s.value);return a.valid?((kZ(o)||kZ(s))&&n.dirty(),{status:n.value,value:a.data}):(Nn(r,{code:ln.invalid_intersection_types}),pi)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};wN.create=(t,e,n)=>new wN({left:t,right:e,typeName:Si.ZodIntersection,...Co(n)});aS=class t extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.array)return Nn(r,{code:ln.invalid_type,expected:Gn.array,received:r.parsedType}),pi;if(r.data.length<this._def.items.length)return Nn(r,{code:ln.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pi;!this._def.rest&&r.data.length>this._def.items.length&&(Nn(r,{code:ln.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let o=[...r.data].map((s,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new Iy(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>Hp.mergeArray(n,s)):Hp.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};aS.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new aS({items:t,typeName:Si.ZodTuple,rest:null,...Co(e)})};GZ=class t extends Po{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.object)return Nn(r,{code:ln.invalid_type,expected:Gn.object,received:r.parsedType}),pi;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in r.data)i.push({key:o._parse(new Iy(r,a,r.path,a)),value:s._parse(new Iy(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Hp.mergeObjectAsync(n,i):Hp.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Po?new t({keyType:e,valueType:n,typeName:Si.ZodRecord,...Co(r)}):new t({keyType:ax.create(),valueType:e,typeName:Si.ZodRecord,...Co(n)})}},W8=class extends Po{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.map)return Nn(r,{code:ln.invalid_type,expected:Gn.map,received:r.parsedType}),pi;let i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,l],u)=>({key:i._parse(new Iy(r,a,r.path,[u,"key"])),value:o._parse(new Iy(r,l,r.path,[u,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of s){let u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return pi;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of s){let u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return pi;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}};W8.create=(t,e,n)=>new W8({valueType:e,keyType:t,typeName:Si.ZodMap,...Co(n)});z8=class t extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.set)return Nn(r,{code:ln.invalid_type,expected:Gn.set,received:r.parsedType}),pi;let i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Nn(r,{code:ln.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Nn(r,{code:ln.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());let o=this._def.valueType;function s(l){let u=new Set;for(let c of l){if(c.status==="aborted")return pi;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}let a=[...r.data.values()].map((l,u)=>o._parse(new Iy(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new t({...this._def,minSize:{value:e,message:Dr.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:Dr.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};z8.create=(t,e)=>new z8({valueType:t,minSize:null,maxSize:null,typeName:Si.ZodSet,...Co(e)});HZ=class t extends Po{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==Gn.function)return Nn(n,{code:ln.invalid_type,expected:Gn.function,received:n.parsedType}),pi;function r(a,l){return cG({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,q8(),u2].filter(u=>!!u),issueData:{code:ln.invalid_arguments,argumentsError:l}})}function i(a,l){return cG({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,q8(),u2].filter(u=>!!u),issueData:{code:ln.invalid_return_type,returnTypeError:l}})}let o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ux){let a=this;return Mh(async function(...l){let u=new sg([]),c=await a._def.args.parseAsync(l,o).catch(m=>{throw u.addIssue(r(l,m)),u}),d=await Reflect.apply(s,this,c);return await a._def.returns._def.type.parseAsync(d,o).catch(m=>{throw u.addIssue(i(d,m)),u})})}else{let a=this;return Mh(function(...l){let u=a._def.args.safeParse(l,o);if(!u.success)throw new sg([r(l,u.error)]);let c=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(c,o);if(!d.success)throw new sg([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:aS.create(e).rest(d2.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||aS.create([]).rest(d2.create()),returns:n||d2.create(),typeName:Si.ZodFunction,...Co(r)})}},RN=class extends Po{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};RN.create=(t,e)=>new RN({getter:t,typeName:Si.ZodLazy,...Co(e)});BN=class extends Po{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return Nn(n,{received:n.data,code:ln.invalid_literal,expected:this._def.value}),pi}return{status:"valid",value:e.data}}get value(){return this._def.value}};BN.create=(t,e)=>new BN({value:t,typeName:Si.ZodLiteral,...Co(e)});NN=class t extends Po{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return Nn(n,{expected:os.joinValues(r),received:n.parsedType,code:ln.invalid_type}),pi}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return Nn(n,{received:n.data,code:ln.invalid_enum_value,options:r}),pi}return Mh(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};NN.create=hat;ON=class extends Po{_parse(e){let n=os.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Gn.string&&r.parsedType!==Gn.number){let i=os.objectValues(n);return Nn(r,{expected:os.joinValues(i),received:r.parsedType,code:ln.invalid_type}),pi}if(this._cache||(this._cache=new Set(os.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=os.objectValues(n);return Nn(r,{received:r.data,code:ln.invalid_enum_value,options:i}),pi}return Mh(e.data)}get enum(){return this._def.values}};ON.create=(t,e)=>new ON({values:t,typeName:Si.ZodNativeEnum,...Co(e)});ux=class extends Po{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==Gn.promise&&n.common.async===!1)return Nn(n,{code:ln.invalid_type,expected:Gn.promise,received:n.parsedType}),pi;let r=n.parsedType===Gn.promise?n.data:Promise.resolve(n.data);return Mh(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ux.create=(t,e)=>new ux({type:t,typeName:Si.ZodPromise,...Co(e)});Ty=class extends Po{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Si.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{Nn(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return pi;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?pi:l.status==="dirty"?vN(l.value):n.value==="dirty"?vN(l.value):l});{if(n.value==="aborted")return pi;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?pi:a.status==="dirty"?vN(a.value):n.value==="dirty"?vN(a.value):a}}if(i.type==="refinement"){let s=a=>{let l=i.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?pi:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?pi:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!sx(s))return pi;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>sx(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):pi);os.assertNever(i)}};Ty.create=(t,e,n)=>new Ty({schema:t,typeName:Si.ZodEffects,effect:e,...Co(n)});Ty.createWithPreprocess=(t,e,n)=>new Ty({schema:e,effect:{type:"preprocess",transform:t},typeName:Si.ZodEffects,...Co(n)});_y=class extends Po{_parse(e){return this._getType(e)===Gn.undefined?Mh(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};_y.create=(t,e)=>new _y({innerType:t,typeName:Si.ZodOptional,...Co(e)});lS=class extends Po{_parse(e){return this._getType(e)===Gn.null?Mh(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};lS.create=(t,e)=>new lS({innerType:t,typeName:Si.ZodNullable,...Co(e)});MN=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===Gn.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};MN.create=(t,e)=>new MN({innerType:t,typeName:Si.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Co(e)});FN=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return V8(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sg(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sg(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};FN.create=(t,e)=>new FN({innerType:t,typeName:Si.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Co(e)});J8=class extends Po{_parse(e){if(this._getType(e)!==Gn.nan){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.nan,received:r.parsedType}),pi}return{status:"valid",value:e.data}}};J8.create=t=>new J8({typeName:Si.ZodNaN,...Co(t)});KFn=Symbol("zod_brand"),dG=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},fG=class t extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?pi:o.status==="dirty"?(n.dirty(),vN(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{let i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?pi:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:Si.ZodPipeline})}},LN=class extends Po{_parse(e){let n=this._def.innerType._parse(e),r=i=>(sx(i)&&(i.value=Object.freeze(i.value)),i);return V8(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}};LN.create=(t,e)=>new LN({innerType:t,typeName:Si.ZodReadonly,...Co(e)});XFn={object:ag.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Si||(Si={}));ZFn=(t,e={message:`Input not instance of ${t.name}`})=>mat(n=>n instanceof t,e),Aat=ax.create,gat=DN.create,e8n=J8.create,t8n=SN.create,Eat=_N.create,n8n=IN.create,r8n=Y8.create,i8n=TN.create,o8n=bN.create,s8n=lx.create,a8n=d2.create,l8n=OC.create,u8n=j8.create,c8n=f2.create,d8n=ag.create,f8n=ag.strictCreate,p8n=xN.create,h8n=UZ.create,m8n=wN.create,A8n=aS.create,g8n=GZ.create,E8n=W8.create,y8n=z8.create,C8n=HZ.create,v8n=RN.create,D8n=BN.create,S8n=NN.create,_8n=ON.create,I8n=ux.create,T8n=Ty.create,b8n=_y.create,x8n=lS.create,w8n=Ty.createWithPreprocess,R8n=fG.create,B8n=()=>Aat().optional(),N8n=()=>gat().optional(),O8n=()=>Eat().optional(),M8n={string:t=>ax.create({...t,coerce:!0}),number:t=>DN.create({...t,coerce:!0}),boolean:t=>_N.create({...t,coerce:!0}),bigint:t=>SN.create({...t,coerce:!0}),date:t=>IN.create({...t,coerce:!0})},F8n=pi});var Ce={};h0(Ce,{BRAND:()=>KFn,DIRTY:()=>vN,EMPTY_PATH:()=>wFn,INVALID:()=>pi,NEVER:()=>F8n,OK:()=>Mh,ParseStatus:()=>Hp,Schema:()=>Po,ZodAny:()=>lx,ZodArray:()=>f2,ZodBigInt:()=>SN,ZodBoolean:()=>_N,ZodBranded:()=>dG,ZodCatch:()=>FN,ZodDate:()=>IN,ZodDefault:()=>MN,ZodDiscriminatedUnion:()=>UZ,ZodEffects:()=>Ty,ZodEnum:()=>NN,ZodError:()=>sg,ZodFirstPartyTypeKind:()=>Si,ZodFunction:()=>HZ,ZodIntersection:()=>wN,ZodIssueCode:()=>ln,ZodLazy:()=>RN,ZodLiteral:()=>BN,ZodMap:()=>W8,ZodNaN:()=>J8,ZodNativeEnum:()=>ON,ZodNever:()=>OC,ZodNull:()=>bN,ZodNullable:()=>lS,ZodNumber:()=>DN,ZodObject:()=>ag,ZodOptional:()=>_y,ZodParsedType:()=>Gn,ZodPipeline:()=>fG,ZodPromise:()=>ux,ZodReadonly:()=>LN,ZodRecord:()=>GZ,ZodSchema:()=>Po,ZodSet:()=>z8,ZodString:()=>ax,ZodSymbol:()=>Y8,ZodTransformer:()=>Ty,ZodTuple:()=>aS,ZodType:()=>Po,ZodUndefined:()=>TN,ZodUnion:()=>xN,ZodUnknown:()=>d2,ZodVoid:()=>j8,addIssueToContext:()=>Nn,any:()=>s8n,array:()=>c8n,bigint:()=>t8n,boolean:()=>Eat,coerce:()=>M8n,custom:()=>mat,date:()=>n8n,datetimeRegex:()=>pat,defaultErrorMap:()=>u2,discriminatedUnion:()=>h8n,effect:()=>T8n,enum:()=>S8n,function:()=>C8n,getErrorMap:()=>q8,getParsedType:()=>sS,instanceof:()=>ZFn,intersection:()=>m8n,isAborted:()=>QZ,isAsync:()=>V8,isDirty:()=>kZ,isValid:()=>sx,late:()=>XFn,lazy:()=>v8n,literal:()=>D8n,makeIssue:()=>cG,map:()=>E8n,nan:()=>e8n,nativeEnum:()=>_8n,never:()=>l8n,null:()=>o8n,nullable:()=>x8n,number:()=>gat,object:()=>d8n,objectUtil:()=>kSe,oboolean:()=>O8n,onumber:()=>N8n,optional:()=>b8n,ostring:()=>B8n,pipeline:()=>R8n,preprocess:()=>w8n,promise:()=>I8n,quotelessJson:()=>TFn,record:()=>g8n,set:()=>y8n,setErrorMap:()=>xFn,strictObject:()=>f8n,string:()=>Aat,symbol:()=>r8n,transformer:()=>T8n,tuple:()=>A8n,undefined:()=>i8n,union:()=>p8n,unknown:()=>a8n,util:()=>os,void:()=>u8n});var VSe=Le(()=>{PZ();GSe();aat();uG();yat();LZ()});var pG=Le(()=>{VSe();VSe()});var K8,Cat,qZ,vat,Dat,L8n,wy,lg,hG,uS,Ry,VZ,Sat,$Z,_at,Iat,Tat,mG,by,bat,xat,cx,PN,YZ,AG,wat,P8n,Q8n,k8n,$Se,Rat,Bat,jZ,U8n,WZ,zZ,JZ,Nat,Oat,Mat,Fat,G8n,H8n,YSe,q8n,jSe,V8n,WSe,$8n,Y8n,j8n,W8n,z8n,J8n,K8n,gG,X8n,zSe,JSe,KSe,Z8n,eLn,Lat,tLn,EG,nLn,rLn,iLn,oLn,XSe,KZ,ZKr,sLn,aLn,Pat,lLn,uLn,cLn,dLn,fLn,pLn,hLn,mLn,ALn,gLn,ELn,yLn,CLn,vLn,DLn,SLn,_Ln,ZSe,ILn,TLn,bLn,xLn,eXr,tXr,nXr,rXr,iXr,oXr,xy,dx=Le(()=>{pG();K8="2025-06-18",Cat=[K8,"2025-03-26","2024-11-05","2024-10-07"],qZ="2.0",vat=Ce.union([Ce.string(),Ce.number().int()]),Dat=Ce.string(),L8n=Ce.object({progressToken:Ce.optional(vat)}).passthrough(),wy=Ce.object({_meta:Ce.optional(L8n)}).passthrough(),lg=Ce.object({method:Ce.string(),params:Ce.optional(wy)}),hG=Ce.object({_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),uS=Ce.object({method:Ce.string(),params:Ce.optional(hG)}),Ry=Ce.object({_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),VZ=Ce.union([Ce.string(),Ce.number().int()]),Sat=Ce.object({jsonrpc:Ce.literal(qZ),id:VZ}).merge(lg).strict(),$Z=t=>Sat.safeParse(t).success,_at=Ce.object({jsonrpc:Ce.literal(qZ)}).merge(uS).strict(),Iat=t=>_at.safeParse(t).success,Tat=Ce.object({jsonrpc:Ce.literal(qZ),id:VZ,result:Ry}).strict(),mG=t=>Tat.safeParse(t).success;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError"})(by||(by={}));bat=Ce.object({jsonrpc:Ce.literal(qZ),id:VZ,error:Ce.object({code:Ce.number().int(),message:Ce.string(),data:Ce.optional(Ce.unknown())})}).strict(),xat=t=>bat.safeParse(t).success,cx=Ce.union([Sat,_at,Tat,bat]),PN=Ry.strict(),YZ=uS.extend({method:Ce.literal("notifications/cancelled"),params:hG.extend({requestId:VZ,reason:Ce.string().optional()})}),AG=Ce.object({name:Ce.string(),title:Ce.optional(Ce.string())}).passthrough(),wat=AG.extend({version:Ce.string()}),P8n=Ce.object({experimental:Ce.optional(Ce.object({}).passthrough()),sampling:Ce.optional(Ce.object({}).passthrough()),elicitation:Ce.optional(Ce.object({}).passthrough()),roots:Ce.optional(Ce.object({listChanged:Ce.optional(Ce.boolean())}).passthrough())}).passthrough(),Q8n=lg.extend({method:Ce.literal("initialize"),params:wy.extend({protocolVersion:Ce.string(),capabilities:P8n,clientInfo:wat})}),k8n=Ce.object({experimental:Ce.optional(Ce.object({}).passthrough()),logging:Ce.optional(Ce.object({}).passthrough()),completions:Ce.optional(Ce.object({}).passthrough()),prompts:Ce.optional(Ce.object({listChanged:Ce.optional(Ce.boolean())}).passthrough()),resources:Ce.optional(Ce.object({subscribe:Ce.optional(Ce.boolean()),listChanged:Ce.optional(Ce.boolean())}).passthrough()),tools:Ce.optional(Ce.object({listChanged:Ce.optional(Ce.boolean())}).passthrough())}).passthrough(),$Se=Ry.extend({protocolVersion:Ce.string(),capabilities:k8n,serverInfo:wat,instructions:Ce.optional(Ce.string())}),Rat=uS.extend({method:Ce.literal("notifications/initialized")}),Bat=t=>Rat.safeParse(t).success,jZ=lg.extend({method:Ce.literal("ping")}),U8n=Ce.object({progress:Ce.number(),total:Ce.optional(Ce.number()),message:Ce.optional(Ce.string())}).passthrough(),WZ=uS.extend({method:Ce.literal("notifications/progress"),params:hG.merge(U8n).extend({progressToken:vat})}),zZ=lg.extend({params:wy.extend({cursor:Ce.optional(Dat)}).optional()}),JZ=Ry.extend({nextCursor:Ce.optional(Dat)}),Nat=Ce.object({uri:Ce.string(),mimeType:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),Oat=Nat.extend({text:Ce.string()}),Mat=Nat.extend({blob:Ce.string().base64()}),Fat=AG.extend({uri:Ce.string(),description:Ce.optional(Ce.string()),mimeType:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}),G8n=AG.extend({uriTemplate:Ce.string(),description:Ce.optional(Ce.string()),mimeType:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}),H8n=zZ.extend({method:Ce.literal("resources/list")}),YSe=JZ.extend({resources:Ce.array(Fat)}),q8n=zZ.extend({method:Ce.literal("resources/templates/list")}),jSe=JZ.extend({resourceTemplates:Ce.array(G8n)}),V8n=lg.extend({method:Ce.literal("resources/read"),params:wy.extend({uri:Ce.string()})}),WSe=Ry.extend({contents:Ce.array(Ce.union([Oat,Mat]))}),$8n=uS.extend({method:Ce.literal("notifications/resources/list_changed")}),Y8n=lg.extend({method:Ce.literal("resources/subscribe"),params:wy.extend({uri:Ce.string()})}),j8n=lg.extend({method:Ce.literal("resources/unsubscribe"),params:wy.extend({uri:Ce.string()})}),W8n=uS.extend({method:Ce.literal("notifications/resources/updated"),params:hG.extend({uri:Ce.string()})}),z8n=Ce.object({name:Ce.string(),description:Ce.optional(Ce.string()),required:Ce.optional(Ce.boolean())}).passthrough(),J8n=AG.extend({description:Ce.optional(Ce.string()),arguments:Ce.optional(Ce.array(z8n)),_meta:Ce.optional(Ce.object({}).passthrough())}),K8n=zZ.extend({method:Ce.literal("prompts/list")}),gG=JZ.extend({prompts:Ce.array(J8n)}),X8n=lg.extend({method:Ce.literal("prompts/get"),params:wy.extend({name:Ce.string(),arguments:Ce.optional(Ce.record(Ce.string()))})}),zSe=Ce.object({type:Ce.literal("text"),text:Ce.string(),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),JSe=Ce.object({type:Ce.literal("image"),data:Ce.string().base64(),mimeType:Ce.string(),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),KSe=Ce.object({type:Ce.literal("audio"),data:Ce.string().base64(),mimeType:Ce.string(),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),Z8n=Ce.object({type:Ce.literal("resource"),resource:Ce.union([Oat,Mat]),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),eLn=Fat.extend({type:Ce.literal("resource_link")}),Lat=Ce.union([zSe,JSe,KSe,eLn,Z8n]),tLn=Ce.object({role:Ce.enum(["user","assistant"]),content:Lat}).passthrough(),EG=Ry.extend({description:Ce.optional(Ce.string()),messages:Ce.array(tLn)}),nLn=uS.extend({method:Ce.literal("notifications/prompts/list_changed")}),rLn=Ce.object({title:Ce.optional(Ce.string()),readOnlyHint:Ce.optional(Ce.boolean()),destructiveHint:Ce.optional(Ce.boolean()),idempotentHint:Ce.optional(Ce.boolean()),openWorldHint:Ce.optional(Ce.boolean())}).passthrough(),iLn=AG.extend({description:Ce.optional(Ce.string()),inputSchema:Ce.object({type:Ce.literal("object"),properties:Ce.optional(Ce.object({}).passthrough()),required:Ce.optional(Ce.array(Ce.string()))}).passthrough(),outputSchema:Ce.optional(Ce.object({type:Ce.literal("object"),properties:Ce.optional(Ce.object({}).passthrough()),required:Ce.optional(Ce.array(Ce.string()))}).passthrough()),annotations:Ce.optional(rLn),_meta:Ce.optional(Ce.object({}).passthrough())}),oLn=zZ.extend({method:Ce.literal("tools/list")}),XSe=JZ.extend({tools:Ce.array(iLn)}),KZ=Ry.extend({content:Ce.array(Lat).default([]),structuredContent:Ce.object({}).passthrough().optional(),isError:Ce.optional(Ce.boolean())}),ZKr=KZ.or(Ry.extend({toolResult:Ce.unknown()})),sLn=lg.extend({method:Ce.literal("tools/call"),params:wy.extend({name:Ce.string(),arguments:Ce.optional(Ce.record(Ce.unknown()))})}),aLn=uS.extend({method:Ce.literal("notifications/tools/list_changed")}),Pat=Ce.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),lLn=lg.extend({method:Ce.literal("logging/setLevel"),params:wy.extend({level:Pat})}),uLn=uS.extend({method:Ce.literal("notifications/message"),params:hG.extend({level:Pat,logger:Ce.optional(Ce.string()),data:Ce.unknown()})}),cLn=Ce.object({name:Ce.string().optional()}).passthrough(),dLn=Ce.object({hints:Ce.optional(Ce.array(cLn)),costPriority:Ce.optional(Ce.number().min(0).max(1)),speedPriority:Ce.optional(Ce.number().min(0).max(1)),intelligencePriority:Ce.optional(Ce.number().min(0).max(1))}).passthrough(),fLn=Ce.object({role:Ce.enum(["user","assistant"]),content:Ce.union([zSe,JSe,KSe])}).passthrough(),pLn=lg.extend({method:Ce.literal("sampling/createMessage"),params:wy.extend({messages:Ce.array(fLn),systemPrompt:Ce.optional(Ce.string()),includeContext:Ce.optional(Ce.enum(["none","thisServer","allServers"])),temperature:Ce.optional(Ce.number()),maxTokens:Ce.number().int(),stopSequences:Ce.optional(Ce.array(Ce.string())),metadata:Ce.optional(Ce.object({}).passthrough()),modelPreferences:Ce.optional(dLn)})}),hLn=Ry.extend({model:Ce.string(),stopReason:Ce.optional(Ce.enum(["endTurn","stopSequence","maxTokens"]).or(Ce.string())),role:Ce.enum(["user","assistant"]),content:Ce.discriminatedUnion("type",[zSe,JSe,KSe])}),mLn=Ce.object({type:Ce.literal("boolean"),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),default:Ce.optional(Ce.boolean())}).passthrough(),ALn=Ce.object({type:Ce.literal("string"),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),minLength:Ce.optional(Ce.number()),maxLength:Ce.optional(Ce.number()),format:Ce.optional(Ce.enum(["email","uri","date","date-time"]))}).passthrough(),gLn=Ce.object({type:Ce.enum(["number","integer"]),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),minimum:Ce.optional(Ce.number()),maximum:Ce.optional(Ce.number())}).passthrough(),ELn=Ce.object({type:Ce.literal("string"),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),enum:Ce.array(Ce.string()),enumNames:Ce.optional(Ce.array(Ce.string()))}).passthrough(),yLn=Ce.union([mLn,ALn,gLn,ELn]),CLn=lg.extend({method:Ce.literal("elicitation/create"),params:wy.extend({message:Ce.string(),requestedSchema:Ce.object({type:Ce.literal("object"),properties:Ce.record(Ce.string(),yLn),required:Ce.optional(Ce.array(Ce.string()))}).passthrough()})}),vLn=Ry.extend({action:Ce.enum(["accept","decline","cancel"]),content:Ce.optional(Ce.record(Ce.string(),Ce.unknown()))}),DLn=Ce.object({type:Ce.literal("ref/resource"),uri:Ce.string()}).passthrough(),SLn=Ce.object({type:Ce.literal("ref/prompt"),name:Ce.string()}).passthrough(),_Ln=lg.extend({method:Ce.literal("completion/complete"),params:wy.extend({ref:Ce.union([SLn,DLn]),argument:Ce.object({name:Ce.string(),value:Ce.string()}).passthrough(),context:Ce.optional(Ce.object({arguments:Ce.optional(Ce.record(Ce.string(),Ce.string()))}))})}),ZSe=Ry.extend({completion:Ce.object({values:Ce.array(Ce.string()).max(100),total:Ce.optional(Ce.number().int()),hasMore:Ce.optional(Ce.boolean())}).passthrough()}),ILn=Ce.object({uri:Ce.string().startsWith("file://"),name:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),TLn=lg.extend({method:Ce.literal("roots/list")}),bLn=Ry.extend({roots:Ce.array(ILn)}),xLn=uS.extend({method:Ce.literal("notifications/roots/list_changed")}),eXr=Ce.union([jZ,Q8n,_Ln,lLn,X8n,K8n,H8n,q8n,V8n,Y8n,j8n,sLn,oLn]),tXr=Ce.union([YZ,WZ,Rat,xLn]),nXr=Ce.union([PN,hLn,vLn,bLn]),rXr=Ce.union([jZ,pLn,CLn,TLn]),iXr=Ce.union([YZ,WZ,uLn,W8n,$8n,aLn,nLn]),oXr=Ce.union([PN,$Se,ZSe,EG,gG,YSe,jSe,WSe,KZ,XSe]),xy=class extends Error{constructor(e,n,r){super(`MCP error ${e}: ${n}`),this.code=e,this.data=r,this.name="McpError"}}});function Qat(t,e){return Object.entries(e).reduce((n,[r,i])=>(i&&typeof i=="object"?n[r]=n[r]?{...n[r],...i}:i:n[r]=i,n),{...t})}var wLn,XZ,kat=Le(()=>{dx();wLn=6e4,XZ=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this.setNotificationHandler(YZ,n=>{let r=this._requestHandlerAbortControllers.get(n.params.requestId);r?.abort(n.params.reason)}),this.setNotificationHandler(WZ,n=>{this._onprogress(n)}),this.setRequestHandler(jZ,n=>({}))}_setupTimeout(e,n,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let n=this._timeoutInfo.get(e);if(!n)return!1;let r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),new xy(by.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){let n=this._timeoutInfo.get(e);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var n,r,i;this._transport=e;let o=(n=this.transport)===null||n===void 0?void 0:n.onclose;this._transport.onclose=()=>{o?.(),this._onclose()};let s=(r=this.transport)===null||r===void 0?void 0:r.onerror;this._transport.onerror=l=>{s?.(l),this._onerror(l)};let a=(i=this._transport)===null||i===void 0?void 0:i.onmessage;this._transport.onmessage=(l,u)=>{a?.(l,u),mG(l)||xat(l)?this._onresponse(l):$Z(l)?this._onrequest(l,u):Iat(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var e;let n=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._transport=void 0,(e=this.onclose)===null||e===void 0||e.call(this);let r=new xy(by.ConnectionClosed,"Connection closed");for(let i of n.values())i(r)}_onerror(e){var n;(n=this.onerror)===null||n===void 0||n.call(this,e)}_onnotification(e){var n;let r=(n=this._notificationHandlers.get(e.method))!==null&&n!==void 0?n:this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(e,n){var r,i,o,s;let a=(r=this._requestHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackRequestHandler;if(a===void 0){(i=this._transport)===null||i===void 0||i.send({jsonrpc:"2.0",id:e.id,error:{code:by.MethodNotFound,message:"Method not found"}}).catch(c=>this._onerror(new Error(`Failed to send an error response: ${c}`)));return}let l=new AbortController;this._requestHandlerAbortControllers.set(e.id,l);let u={signal:l.signal,sessionId:(o=this._transport)===null||o===void 0?void 0:o.sessionId,_meta:(s=e.params)===null||s===void 0?void 0:s._meta,sendNotification:c=>this.notification(c,{relatedRequestId:e.id}),sendRequest:(c,d,h)=>this.request(c,d,{...h,relatedRequestId:e.id}),authInfo:n?.authInfo,requestId:e.id,requestInfo:n?.requestInfo};Promise.resolve().then(()=>a(e,u)).then(c=>{var d;if(!l.signal.aborted)return(d=this._transport)===null||d===void 0?void 0:d.send({result:c,jsonrpc:"2.0",id:e.id})},c=>{var d,h;if(!l.signal.aborted)return(d=this._transport)===null||d===void 0?void 0:d.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(c.code)?c.code:by.InternalError,message:(h=c.message)!==null&&h!==void 0?h:"Internal error"}})}).catch(c=>this._onerror(new Error(`Failed to send response: ${c}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:n,...r}=e.params,i=Number(n),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let s=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(l){s(l);return}o(r)}_onresponse(e){let n=Number(e.id),r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),mG(e))r(e);else{let i=new xy(e.error.code,e.error.message,e.error.data);r(i)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)===null||e===void 0?void 0:e.close())}request(e,n,r){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:s}=r??{};return new Promise((a,l)=>{var u,c,d,h,m,E;if(!this._transport){l(new Error("Not connected"));return}((u=this._options)===null||u===void 0?void 0:u.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),(c=r?.signal)===null||c===void 0||c.throwIfAborted();let y=this._requestMessageId++,C={...e,jsonrpc:"2.0",id:y};r?.onprogress&&(this._progressHandlers.set(y,r.onprogress),C.params={...e.params,_meta:{...((d=e.params)===null||d===void 0?void 0:d._meta)||{},progressToken:y}});let _=R=>{var F;this._responseHandlers.delete(y),this._progressHandlers.delete(y),this._cleanupTimeout(y),(F=this._transport)===null||F===void 0||F.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:y,reason:String(R)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:s}).catch(q=>this._onerror(new Error(`Failed to send cancellation: ${q}`))),l(R)};this._responseHandlers.set(y,R=>{var F;if(!(!((F=r?.signal)===null||F===void 0)&&F.aborted)){if(R instanceof Error)return l(R);try{let q=n.parse(R.result);a(q)}catch(q){l(q)}}}),(h=r?.signal)===null||h===void 0||h.addEventListener("abort",()=>{var R;_((R=r?.signal)===null||R===void 0?void 0:R.reason)});let w=(m=r?.timeout)!==null&&m!==void 0?m:wLn,B=()=>_(new xy(by.RequestTimeout,"Request timed out",{timeout:w}));this._setupTimeout(y,w,r?.maxTotalTimeout,B,(E=r?.resetTimeoutOnProgress)!==null&&E!==void 0?E:!1),this._transport.send(C,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:s}).catch(R=>{this._cleanupTimeout(y),l(R)})})}async notification(e,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let r={...e,jsonrpc:"2.0"};await this._transport.send(r,n)}setRequestHandler(e,n){let r=e.shape.method.value;this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(i,o)=>Promise.resolve(n(e.parse(i),o)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,n){this._notificationHandlers.set(e.shape.method.value,r=>Promise.resolve(n(e.parse(r))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}});var Gat=b((ZZ,Uat)=>{(function(t,e){typeof ZZ=="object"&&typeof Uat<"u"?e(ZZ):typeof define=="function"&&define.amd?define(["exports"],e):e(t.URI=t.URI||{})})(ZZ,function(t){"use strict";function e(){for(var Je=arguments.length,je=Array(Je),ut=0;ut<Je;ut++)je[ut]=arguments[ut];if(je.length>1){je[0]=je[0].slice(0,-1);for(var St=je.length-1,st=1;st<St;++st)je[st]=je[st].slice(1,-1);return je[St]=je[St].slice(1),je.join("")}else return je[0]}function n(Je){return"(?:"+Je+")"}function r(Je){return Je===void 0?"undefined":Je===null?"null":Object.prototype.toString.call(Je).split(" ").pop().split("]").shift().toLowerCase()}function i(Je){return Je.toUpperCase()}function o(Je){return Je!=null?Je instanceof Array?Je:typeof Je.length!="number"||Je.split||Je.setInterval||Je.call?[Je]:Array.prototype.slice.call(Je):[]}function s(Je,je){var ut=Je;if(je)for(var St in je)ut[St]=je[St];return ut}function a(Je){var je="[A-Za-z]",ut="[\\x0D]",St="[0-9]",st="[\\x22]",vn=e(St,"[A-Fa-f]"),Vn="[\\x0A]",li="[\\x20]",Ir=n(n("%[EFef]"+vn+"%"+vn+vn+"%"+vn+vn)+"|"+n("%[89A-Fa-f]"+vn+"%"+vn+vn)+"|"+n("%"+vn+vn)),gs="[\\:\\/\\?\\#\\[\\]\\@]",Pi="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Bo=e(gs,Pi),Gs=Je?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Cr=Je?"[\\uE000-\\uF8FF]":"[]",ni=e(je,St,"[\\-\\.\\_\\~]",Gs),Do=n(je+e(je,St,"[\\+\\-\\.]")+"*"),No=n(n(Ir+"|"+e(ni,Pi,"[\\:]"))+"*"),Ou=n(n("25[0-5]")+"|"+n("2[0-4]"+St)+"|"+n("1"+St+St)+"|"+n("[1-9]"+St)+"|"+St),va=n(n("25[0-5]")+"|"+n("2[0-4]"+St)+"|"+n("1"+St+St)+"|"+n("0?[1-9]"+St)+"|0?0?"+St),Xs=n(va+"\\."+va+"\\."+va+"\\."+va),Ei=n(vn+"{1,4}"),fl=n(n(Ei+"\\:"+Ei)+"|"+Xs),ui=n(n(Ei+"\\:")+"{6}"+fl),ci=n("\\:\\:"+n(Ei+"\\:")+"{5}"+fl),Mu=n(n(Ei)+"?\\:\\:"+n(Ei+"\\:")+"{4}"+fl),Da=n(n(n(Ei+"\\:")+"{0,1}"+Ei)+"?\\:\\:"+n(Ei+"\\:")+"{3}"+fl),ho=n(n(n(Ei+"\\:")+"{0,2}"+Ei)+"?\\:\\:"+n(Ei+"\\:")+"{2}"+fl),Ic=n(n(n(Ei+"\\:")+"{0,3}"+Ei)+"?\\:\\:"+Ei+"\\:"+fl),ca=n(n(n(Ei+"\\:")+"{0,4}"+Ei)+"?\\:\\:"+fl),Es=n(n(n(Ei+"\\:")+"{0,5}"+Ei)+"?\\:\\:"+Ei),ja=n(n(n(Ei+"\\:")+"{0,6}"+Ei)+"?\\:\\:"),Be=n([ui,ci,Mu,Da,ho,Ic,ca,Es,ja].join("|")),Me=n(n(ni+"|"+Ir)+"+"),tt=n(Be+"\\%25"+Me),ct=n(Be+n("\\%25|\\%(?!"+vn+"{2})")+Me),Ct=n("[vV]"+vn+"+\\."+e(ni,Pi,"[\\:]")+"+"),Ft=n("\\["+n(ct+"|"+Be+"|"+Ct)+"\\]"),Jt=n(n(Ir+"|"+e(ni,Pi))+"*"),Vt=n(Ft+"|"+Xs+"(?!"+Jt+")|"+Jt),nn=n(St+"*"),en=n(n(No+"@")+"?"+Vt+n("\\:"+nn)+"?"),hn=n(Ir+"|"+e(ni,Pi,"[\\:\\@]")),sr=n(hn+"*"),Ii=n(hn+"+"),Hs=n(n(Ir+"|"+e(ni,Pi,"[\\@]"))+"+"),hi=n(n("\\/"+sr)+"*"),La=n("\\/"+n(Ii+hi)+"?"),eu=n(Hs+hi),ad=n(Ii+hi),bs="(?!"+hn+")",mE=n(hi+"|"+La+"|"+eu+"|"+ad+"|"+bs),Hd=n(n(hn+"|"+e("[\\/\\?]",Cr))+"*"),ld=n(n(hn+"|[\\/\\?]")+"*"),gm=n(n("\\/\\/"+en+hi)+"|"+La+"|"+ad+"|"+bs),AE=n(Do+"\\:"+gm+n("\\?"+Hd)+"?"+n("\\#"+ld)+"?"),ph=n(n("\\/\\/"+en+hi)+"|"+La+"|"+eu+"|"+bs),Wa=n(ph+n("\\?"+Hd)+"?"+n("\\#"+ld)+"?"),wA=n(AE+"|"+Wa),Ef=n(Do+"\\:"+gm+n("\\?"+Hd)+"?"),Em="^("+Do+")\\:"+n(n("\\/\\/("+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?)")+"?("+hi+"|"+La+"|"+ad+"|"+bs+")")+n("\\?("+Hd+")")+"?"+n("\\#("+ld+")")+"?$",yf="^(){0}"+n(n("\\/\\/("+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?)")+"?("+hi+"|"+La+"|"+eu+"|"+bs+")")+n("\\?("+Hd+")")+"?"+n("\\#("+ld+")")+"?$",ym="^("+Do+")\\:"+n(n("\\/\\/("+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?)")+"?("+hi+"|"+La+"|"+ad+"|"+bs+")")+n("\\?("+Hd+")")+"?$",Fu="^"+n("\\#("+ld+")")+"?$",Vg="^"+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",je,St,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",ni,Pi),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",ni,Pi),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",ni,Pi),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",ni,Pi),"g"),NOT_QUERY:new RegExp(e("[^\\%]",ni,Pi,"[\\:\\@\\/\\?]",Cr),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",ni,Pi,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",ni,Pi),"g"),UNRESERVED:new RegExp(ni,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",ni,Bo),"g"),PCT_ENCODED:new RegExp(Ir,"g"),IPV4ADDRESS:new RegExp("^("+Xs+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Be+")"+n(n("\\%25|\\%(?!"+vn+"{2})")+"("+Me+")")+"?\\]?$")}}var l=a(!1),u=a(!0),c=function(){function Je(je,ut){var St=[],st=!0,vn=!1,Vn=void 0;try{for(var li=je[Symbol.iterator](),Ir;!(st=(Ir=li.next()).done)&&(St.push(Ir.value),!(ut&&St.length===ut));st=!0);}catch(gs){vn=!0,Vn=gs}finally{try{!st&&li.return&&li.return()}finally{if(vn)throw Vn}}return St}return function(je,ut){if(Array.isArray(je))return je;if(Symbol.iterator in Object(je))return Je(je,ut);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(Je){if(Array.isArray(Je)){for(var je=0,ut=Array(Je.length);je<Je.length;je++)ut[je]=Je[je];return ut}else return Array.from(Je)},h=2147483647,m=36,E=1,y=26,C=38,_=700,w=72,B=128,R="-",F=/^xn--/,q=/[^\0-\x7E]/,J=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=m-E,K=Math.floor,U=String.fromCharCode;function se(Je){throw new RangeError(j[Je])}function V(Je,je){for(var ut=[],St=Je.length;St--;)ut[St]=je(Je[St]);return ut}function O(Je,je){var ut=Je.split("@"),St="";ut.length>1&&(St=ut[0]+"@",Je=ut[1]),Je=Je.replace(J,".");var st=Je.split("."),vn=V(st,je).join(".");return St+vn}function Y(Je){for(var je=[],ut=0,St=Je.length;ut<St;){var st=Je.charCodeAt(ut++);if(st>=55296&&st<=56319&&ut<St){var vn=Je.charCodeAt(ut++);(vn&64512)==56320?je.push(((st&1023)<<10)+(vn&1023)+65536):(je.push(st),ut--)}else je.push(st)}return je}var ee=function(je){return String.fromCodePoint.apply(String,d(je))},ne=function(je){return je-48<10?je-22:je-65<26?je-65:je-97<26?je-97:m},Ae=function(je,ut){return je+22+75*(je<26)-((ut!=0)<<5)},ve=function(je,ut,St){var st=0;for(je=St?K(je/_):je>>1,je+=K(je/ut);je>L*y>>1;st+=m)je=K(je/L);return K(st+(L+1)*je/(je+C))},De=function(je){var ut=[],St=je.length,st=0,vn=B,Vn=w,li=je.lastIndexOf(R);li<0&&(li=0);for(var Ir=0;Ir<li;++Ir)je.charCodeAt(Ir)>=128&&se("not-basic"),ut.push(je.charCodeAt(Ir));for(var gs=li>0?li+1:0;gs<St;){for(var Pi=st,Bo=1,Gs=m;;Gs+=m){gs>=St&&se("invalid-input");var Cr=ne(je.charCodeAt(gs++));(Cr>=m||Cr>K((h-st)/Bo))&&se("overflow"),st+=Cr*Bo;var ni=Gs<=Vn?E:Gs>=Vn+y?y:Gs-Vn;if(Cr<ni)break;var Do=m-ni;Bo>K(h/Do)&&se("overflow"),Bo*=Do}var No=ut.length+1;Vn=ve(st-Pi,No,Pi==0),K(st/No)>h-vn&&se("overflow"),vn+=K(st/No),st%=No,ut.splice(st++,0,vn)}return String.fromCodePoint.apply(String,ut)},Ue=function(je){var ut=[];je=Y(je);var St=je.length,st=B,vn=0,Vn=w,li=!0,Ir=!1,gs=void 0;try{for(var Pi=je[Symbol.iterator](),Bo;!(li=(Bo=Pi.next()).done);li=!0){var Gs=Bo.value;Gs<128&&ut.push(U(Gs))}}catch(ct){Ir=!0,gs=ct}finally{try{!li&&Pi.return&&Pi.return()}finally{if(Ir)throw gs}}var Cr=ut.length,ni=Cr;for(Cr&&ut.push(R);ni<St;){var Do=h,No=!0,Ou=!1,va=void 0;try{for(var Xs=je[Symbol.iterator](),Ei;!(No=(Ei=Xs.next()).done);No=!0){var fl=Ei.value;fl>=st&&fl<Do&&(Do=fl)}}catch(ct){Ou=!0,va=ct}finally{try{!No&&Xs.return&&Xs.return()}finally{if(Ou)throw va}}var ui=ni+1;Do-st>K((h-vn)/ui)&&se("overflow"),vn+=(Do-st)*ui,st=Do;var ci=!0,Mu=!1,Da=void 0;try{for(var ho=je[Symbol.iterator](),Ic;!(ci=(Ic=ho.next()).done);ci=!0){var ca=Ic.value;if(ca<st&&++vn>h&&se("overflow"),ca==st){for(var Es=vn,ja=m;;ja+=m){var Be=ja<=Vn?E:ja>=Vn+y?y:ja-Vn;if(Es<Be)break;var Me=Es-Be,tt=m-Be;ut.push(U(Ae(Be+Me%tt,0))),Es=K(Me/tt)}ut.push(U(Ae(Es,0))),Vn=ve(vn,ui,ni==Cr),vn=0,++ni}}}catch(ct){Mu=!0,Da=ct}finally{try{!ci&&ho.return&&ho.return()}finally{if(Mu)throw Da}}++vn,++st}return ut.join("")},qe=function(je){return O(je,function(ut){return F.test(ut)?De(ut.slice(4).toLowerCase()):ut})},Ie=function(je){return O(je,function(ut){return q.test(ut)?"xn--"+Ue(ut):ut})},xe={version:"2.1.0",ucs2:{decode:Y,encode:ee},decode:De,encode:Ue,toASCII:Ie,toUnicode:qe},Oe={};function ue(Je){var je=Je.charCodeAt(0),ut=void 0;return je<16?ut="%0"+je.toString(16).toUpperCase():je<128?ut="%"+je.toString(16).toUpperCase():je<2048?ut="%"+(je>>6|192).toString(16).toUpperCase()+"%"+(je&63|128).toString(16).toUpperCase():ut="%"+(je>>12|224).toString(16).toUpperCase()+"%"+(je>>6&63|128).toString(16).toUpperCase()+"%"+(je&63|128).toString(16).toUpperCase(),ut}function re(Je){for(var je="",ut=0,St=Je.length;ut<St;){var st=parseInt(Je.substr(ut+1,2),16);if(st<128)je+=String.fromCharCode(st),ut+=3;else if(st>=194&&st<224){if(St-ut>=6){var vn=parseInt(Je.substr(ut+4,2),16);je+=String.fromCharCode((st&31)<<6|vn&63)}else je+=Je.substr(ut,6);ut+=6}else if(st>=224){if(St-ut>=9){var Vn=parseInt(Je.substr(ut+4,2),16),li=parseInt(Je.substr(ut+7,2),16);je+=String.fromCharCode((st&15)<<12|(Vn&63)<<6|li&63)}else je+=Je.substr(ut,9);ut+=9}else je+=Je.substr(ut,3),ut+=3}return je}function ye(Je,je){function ut(St){var st=re(St);return st.match(je.UNRESERVED)?st:St}return Je.scheme&&(Je.scheme=String(Je.scheme).replace(je.PCT_ENCODED,ut).toLowerCase().replace(je.NOT_SCHEME,"")),Je.userinfo!==void 0&&(Je.userinfo=String(Je.userinfo).replace(je.PCT_ENCODED,ut).replace(je.NOT_USERINFO,ue).replace(je.PCT_ENCODED,i)),Je.host!==void 0&&(Je.host=String(Je.host).replace(je.PCT_ENCODED,ut).toLowerCase().replace(je.NOT_HOST,ue).replace(je.PCT_ENCODED,i)),Je.path!==void 0&&(Je.path=String(Je.path).replace(je.PCT_ENCODED,ut).replace(Je.scheme?je.NOT_PATH:je.NOT_PATH_NOSCHEME,ue).replace(je.PCT_ENCODED,i)),Je.query!==void 0&&(Je.query=String(Je.query).replace(je.PCT_ENCODED,ut).replace(je.NOT_QUERY,ue).replace(je.PCT_ENCODED,i)),Je.fragment!==void 0&&(Je.fragment=String(Je.fragment).replace(je.PCT_ENCODED,ut).replace(je.NOT_FRAGMENT,ue).replace(je.PCT_ENCODED,i)),Je}function X(Je){return Je.replace(/^0*(.*)/,"$1")||"0"}function he(Je,je){var ut=Je.match(je.IPV4ADDRESS)||[],St=c(ut,2),st=St[1];return st?st.split(".").map(X).join("."):Je}function ae(Je,je){var ut=Je.match(je.IPV6ADDRESS)||[],St=c(ut,3),st=St[1],vn=St[2];if(st){for(var Vn=st.toLowerCase().split("::").reverse(),li=c(Vn,2),Ir=li[0],gs=li[1],Pi=gs?gs.split(":").map(X):[],Bo=Ir.split(":").map(X),Gs=je.IPV4ADDRESS.test(Bo[Bo.length-1]),Cr=Gs?7:8,ni=Bo.length-Cr,Do=Array(Cr),No=0;No<Cr;++No)Do[No]=Pi[No]||Bo[ni+No]||"";Gs&&(Do[Cr-1]=he(Do[Cr-1],je));var Ou=Do.reduce(function(ui,ci,Mu){if(!ci||ci==="0"){var Da=ui[ui.length-1];Da&&Da.index+Da.length===Mu?Da.length++:ui.push({index:Mu,length:1})}return ui},[]),va=Ou.sort(function(ui,ci){return ci.length-ui.length})[0],Xs=void 0;if(va&&va.length>1){var Ei=Do.slice(0,va.index),fl=Do.slice(va.index+va.length);Xs=Ei.join(":")+"::"+fl.join(":")}else Xs=Do.join(":");return vn&&(Xs+="%"+vn),Xs}else return Je}var me=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Se="".match(/(){0}/)[1]===void 0;function ie(Je){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut={},St=je.iri!==!1?u:l;je.reference==="suffix"&&(Je=(je.scheme?je.scheme+":":"")+"//"+Je);var st=Je.match(me);if(st){Se?(ut.scheme=st[1],ut.userinfo=st[3],ut.host=st[4],ut.port=parseInt(st[5],10),ut.path=st[6]||"",ut.query=st[7],ut.fragment=st[8],isNaN(ut.port)&&(ut.port=st[5])):(ut.scheme=st[1]||void 0,ut.userinfo=Je.indexOf("@")!==-1?st[3]:void 0,ut.host=Je.indexOf("//")!==-1?st[4]:void 0,ut.port=parseInt(st[5],10),ut.path=st[6]||"",ut.query=Je.indexOf("?")!==-1?st[7]:void 0,ut.fragment=Je.indexOf("#")!==-1?st[8]:void 0,isNaN(ut.port)&&(ut.port=Je.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?st[4]:void 0)),ut.host&&(ut.host=ae(he(ut.host,St),St)),ut.scheme===void 0&&ut.userinfo===void 0&&ut.host===void 0&&ut.port===void 0&&!ut.path&&ut.query===void 0?ut.reference="same-document":ut.scheme===void 0?ut.reference="relative":ut.fragment===void 0?ut.reference="absolute":ut.reference="uri",je.reference&&je.reference!=="suffix"&&je.reference!==ut.reference&&(ut.error=ut.error||"URI is not a "+je.reference+" reference.");var vn=Oe[(je.scheme||ut.scheme||"").toLowerCase()];if(!je.unicodeSupport&&(!vn||!vn.unicodeSupport)){if(ut.host&&(je.domainHost||vn&&vn.domainHost))try{ut.host=xe.toASCII(ut.host.replace(St.PCT_ENCODED,re).toLowerCase())}catch(Vn){ut.error=ut.error||"Host's domain name can not be converted to ASCII via punycode: "+Vn}ye(ut,l)}else ye(ut,St);vn&&vn.parse&&vn.parse(ut,je)}else ut.error=ut.error||"URI can not be parsed.";return ut}function k(Je,je){var ut=je.iri!==!1?u:l,St=[];return Je.userinfo!==void 0&&(St.push(Je.userinfo),St.push("@")),Je.host!==void 0&&St.push(ae(he(String(Je.host),ut),ut).replace(ut.IPV6ADDRESS,function(st,vn,Vn){return"["+vn+(Vn?"%25"+Vn:"")+"]"})),(typeof Je.port=="number"||typeof Je.port=="string")&&(St.push(":"),St.push(String(Je.port))),St.length?St.join(""):void 0}var z=/^\.\.?\//,pe=/^\/\.(\/|$)/,te=/^\/\.\.(\/|$)/,H=/^\/?(?:.|\n)*?(?=\/|$)/;function ge(Je){for(var je=[];Je.length;)if(Je.match(z))Je=Je.replace(z,"");else if(Je.match(pe))Je=Je.replace(pe,"/");else if(Je.match(te))Je=Je.replace(te,"/"),je.pop();else if(Je==="."||Je==="..")Je="";else{var ut=Je.match(H);if(ut){var St=ut[0];Je=Je.slice(St.length),je.push(St)}else throw new Error("Unexpected dot segment condition")}return je.join("")}function be(Je){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut=je.iri?u:l,St=[],st=Oe[(je.scheme||Je.scheme||"").toLowerCase()];if(st&&st.serialize&&st.serialize(Je,je),Je.host&&!ut.IPV6ADDRESS.test(Je.host)){if(je.domainHost||st&&st.domainHost)try{Je.host=je.iri?xe.toUnicode(Je.host):xe.toASCII(Je.host.replace(ut.PCT_ENCODED,re).toLowerCase())}catch(li){Je.error=Je.error||"Host's domain name can not be converted to "+(je.iri?"Unicode":"ASCII")+" via punycode: "+li}}ye(Je,ut),je.reference!=="suffix"&&Je.scheme&&(St.push(Je.scheme),St.push(":"));var vn=k(Je,je);if(vn!==void 0&&(je.reference!=="suffix"&&St.push("//"),St.push(vn),Je.path&&Je.path.charAt(0)!=="/"&&St.push("/")),Je.path!==void 0){var Vn=Je.path;!je.absolutePath&&(!st||!st.absolutePath)&&(Vn=ge(Vn)),vn===void 0&&(Vn=Vn.replace(/^\/\//,"/%2F")),St.push(Vn)}return Je.query!==void 0&&(St.push("?"),St.push(Je.query)),Je.fragment!==void 0&&(St.push("#"),St.push(Je.fragment)),St.join("")}function Pe(Je,je){var ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},St=arguments[3],st={};return St||(Je=ie(be(Je,ut),ut),je=ie(be(je,ut),ut)),ut=ut||{},!ut.tolerant&&je.scheme?(st.scheme=je.scheme,st.userinfo=je.userinfo,st.host=je.host,st.port=je.port,st.path=ge(je.path||""),st.query=je.query):(je.userinfo!==void 0||je.host!==void 0||je.port!==void 0?(st.userinfo=je.userinfo,st.host=je.host,st.port=je.port,st.path=ge(je.path||""),st.query=je.query):(je.path?(je.path.charAt(0)==="/"?st.path=ge(je.path):((Je.userinfo!==void 0||Je.host!==void 0||Je.port!==void 0)&&!Je.path?st.path="/"+je.path:Je.path?st.path=Je.path.slice(0,Je.path.lastIndexOf("/")+1)+je.path:st.path=je.path,st.path=ge(st.path)),st.query=je.query):(st.path=Je.path,je.query!==void 0?st.query=je.query:st.query=Je.query),st.userinfo=Je.userinfo,st.host=Je.host,st.port=Je.port),st.scheme=Je.scheme),st.fragment=je.fragment,st}function pt(Je,je,ut){var St=s({scheme:"null"},ut);return be(Pe(ie(Je,St),ie(je,St),St,!0),St)}function Dt(Je,je){return typeof Je=="string"?Je=be(ie(Je,je),je):r(Je)==="object"&&(Je=ie(be(Je,je),je)),Je}function Qt(Je,je,ut){return typeof Je=="string"?Je=be(ie(Je,ut),ut):r(Je)==="object"&&(Je=be(Je,ut)),typeof je=="string"?je=be(ie(je,ut),ut):r(je)==="object"&&(je=be(je,ut)),Je===je}function dt(Je,je){return Je&&Je.toString().replace(!je||!je.iri?l.ESCAPE:u.ESCAPE,ue)}function mt(Je,je){return Je&&Je.toString().replace(!je||!je.iri?l.PCT_ENCODED:u.PCT_ENCODED,re)}var kt={scheme:"http",domainHost:!0,parse:function(je,ut){return je.host||(je.error=je.error||"HTTP URIs must have a host."),je},serialize:function(je,ut){var St=String(je.scheme).toLowerCase()==="https";return(je.port===(St?443:80)||je.port==="")&&(je.port=void 0),je.path||(je.path="/"),je}},Ln={scheme:"https",domainHost:kt.domainHost,parse:kt.parse,serialize:kt.serialize};function si(Je){return typeof Je.secure=="boolean"?Je.secure:String(Je.scheme).toLowerCase()==="wss"}var Ni={scheme:"ws",domainHost:!0,parse:function(je,ut){var St=je;return St.secure=si(St),St.resourceName=(St.path||"/")+(St.query?"?"+St.query:""),St.path=void 0,St.query=void 0,St},serialize:function(je,ut){if((je.port===(si(je)?443:80)||je.port==="")&&(je.port=void 0),typeof je.secure=="boolean"&&(je.scheme=je.secure?"wss":"ws",je.secure=void 0),je.resourceName){var St=je.resourceName.split("?"),st=c(St,2),vn=st[0],Vn=st[1];je.path=vn&&vn!=="/"?vn:void 0,je.query=Vn,je.resourceName=void 0}return je.fragment=void 0,je}},Yi={scheme:"wss",domainHost:Ni.domainHost,parse:Ni.parse,serialize:Ni.serialize},Go={},to=!0,Re="[A-Za-z0-9\\-\\.\\_\\~"+(to?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",ot="[0-9A-Fa-f]",it=n(n("%[EFef]"+ot+"%"+ot+ot+"%"+ot+ot)+"|"+n("%[89A-Fa-f]"+ot+"%"+ot+ot)+"|"+n("%"+ot+ot)),Lt="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Cn="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",On=e(Cn,'[\\"\\\\]'),_n="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ur=new RegExp(Re,"g"),Un=new RegExp(it,"g"),Fa=new RegExp(e("[^]",Lt,"[\\.]",'[\\"]',On),"g"),vl=new RegExp(e("[^]",Re,_n),"g"),Ud=vl;function sd(Je){var je=re(Je);return je.match(ur)?je:Je}var _c={scheme:"mailto",parse:function(je,ut){var St=je,st=St.to=St.path?St.path.split(","):[];if(St.path=void 0,St.query){for(var vn=!1,Vn={},li=St.query.split("&"),Ir=0,gs=li.length;Ir<gs;++Ir){var Pi=li[Ir].split("=");switch(Pi[0]){case"to":for(var Bo=Pi[1].split(","),Gs=0,Cr=Bo.length;Gs<Cr;++Gs)st.push(Bo[Gs]);break;case"subject":St.subject=mt(Pi[1],ut);break;case"body":St.body=mt(Pi[1],ut);break;default:vn=!0,Vn[mt(Pi[0],ut)]=mt(Pi[1],ut);break}}vn&&(St.headers=Vn)}St.query=void 0;for(var ni=0,Do=st.length;ni<Do;++ni){var No=st[ni].split("@");if(No[0]=mt(No[0]),ut.unicodeSupport)No[1]=mt(No[1],ut).toLowerCase();else try{No[1]=xe.toASCII(mt(No[1],ut).toLowerCase())}catch(Ou){St.error=St.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ou}st[ni]=No.join("@")}return St},serialize:function(je,ut){var St=je,st=o(je.to);if(st){for(var vn=0,Vn=st.length;vn<Vn;++vn){var li=String(st[vn]),Ir=li.lastIndexOf("@"),gs=li.slice(0,Ir).replace(Un,sd).replace(Un,i).replace(Fa,ue),Pi=li.slice(Ir+1);try{Pi=ut.iri?xe.toUnicode(Pi):xe.toASCII(mt(Pi,ut).toLowerCase())}catch(ni){St.error=St.error||"Email address's domain name can not be converted to "+(ut.iri?"Unicode":"ASCII")+" via punycode: "+ni}st[vn]=gs+"@"+Pi}St.path=st.join(",")}var Bo=je.headers=je.headers||{};je.subject&&(Bo.subject=je.subject),je.body&&(Bo.body=je.body);var Gs=[];for(var Cr in Bo)Bo[Cr]!==Go[Cr]&&Gs.push(Cr.replace(Un,sd).replace(Un,i).replace(vl,ue)+"="+Bo[Cr].replace(Un,sd).replace(Un,i).replace(Ud,ue));return Gs.length&&(St.query=Gs.join("&")),St}},Nu=/^([^\:]+)\:(.*)/,Ca={scheme:"urn",parse:function(je,ut){var St=je.path&&je.path.match(Nu),st=je;if(St){var vn=ut.scheme||st.scheme||"urn",Vn=St[1].toLowerCase(),li=St[2],Ir=vn+":"+(ut.nid||Vn),gs=Oe[Ir];st.nid=Vn,st.nss=li,st.path=void 0,gs&&(st=gs.parse(st,ut))}else st.error=st.error||"URN can not be parsed.";return st},serialize:function(je,ut){var St=ut.scheme||je.scheme||"urn",st=je.nid,vn=St+":"+(ut.nid||st),Vn=Oe[vn];Vn&&(je=Vn.serialize(je,ut));var li=je,Ir=je.nss;return li.path=(st||ut.nid)+":"+Ir,li}},dl=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Gd={scheme:"urn:uuid",parse:function(je,ut){var St=je;return St.uuid=St.nss,St.nss=void 0,!ut.tolerant&&(!St.uuid||!St.uuid.match(dl))&&(St.error=St.error||"UUID is not valid."),St},serialize:function(je,ut){var St=je;return St.nss=(je.uuid||"").toLowerCase(),St}};Oe[kt.scheme]=kt,Oe[Ln.scheme]=Ln,Oe[Ni.scheme]=Ni,Oe[Yi.scheme]=Yi,Oe[_c.scheme]=_c,Oe[Ca.scheme]=Ca,Oe[Gd.scheme]=Gd,t.SCHEMES=Oe,t.pctEncChar=ue,t.pctDecChars=re,t.parse=ie,t.removeDotSegments=ge,t.serialize=be,t.resolveComponents=Pe,t.resolve=pt,t.normalize=Dt,t.equal=Qt,t.escapeComponent=dt,t.unescapeComponent=mt,Object.defineProperty(t,"__esModule",{value:!0})})});var X8=b((uXr,Hat)=>{"use strict";Hat.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Vat=b((cXr,qat)=>{"use strict";qat.exports=function(e){for(var n=0,r=e.length,i=0,o;i<r;)n++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=e.charCodeAt(i),(o&64512)==56320&&i++);return n}});var QN=b((dXr,jat)=>{"use strict";jat.exports={copy:RLn,checkDataType:e_e,checkDataTypes:BLn,coerceToTypes:NLn,toHash:n_e,getProperty:r_e,escapeQuotes:i_e,equal:X8(),ucs2length:Vat(),varOccurences:FLn,varReplace:LLn,schemaHasRules:PLn,schemaHasRulesExcept:QLn,schemaUnknownRules:kLn,toQuotedString:t_e,getPathExpr:ULn,getPath:GLn,getData:VLn,unescapeFragment:$Ln,unescapeJsonPointer:s_e,escapeFragment:YLn,escapeJsonPointer:o_e};function RLn(t,e){e=e||{};for(var n in t)e[n]=t[n];return e}function e_e(t,e,n,r){var i=r?" !== ":" === ",o=r?" || ":" && ",s=r?"!":"",a=r?"":"!";switch(t){case"null":return e+i+"null";case"array":return s+"Array.isArray("+e+")";case"object":return"("+s+e+o+"typeof "+e+i+'"object"'+o+a+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+i+'"number"'+o+a+"("+e+" % 1)"+o+e+i+e+(n?o+s+"isFinite("+e+")":"")+")";case"number":return"(typeof "+e+i+'"'+t+'"'+(n?o+s+"isFinite("+e+")":"")+")";default:return"typeof "+e+i+'"'+t+'"'}}function BLn(t,e,n){switch(t.length){case 1:return e_e(t[0],e,n,!0);default:var r="",i=n_e(t);i.array&&i.object&&(r=i.null?"(":"(!"+e+" || ",r+="typeof "+e+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer;for(var o in i)r+=(r?" && ":"")+e_e(o,e,n,!0);return r}}var $at=n_e(["string","number","integer","boolean","null"]);function NLn(t,e){if(Array.isArray(e)){for(var n=[],r=0;r<e.length;r++){var i=e[r];($at[i]||t==="array"&&i==="array")&&(n[n.length]=i)}if(n.length)return n}else{if($at[e])return[e];if(t==="array"&&e==="array")return["array"]}}function n_e(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}var OLn=/^[a-z$_][a-z$_0-9]*$/i,MLn=/'|\\/g;function r_e(t){return typeof t=="number"?"["+t+"]":OLn.test(t)?"."+t:"['"+i_e(t)+"']"}function i_e(t){return t.replace(MLn,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function FLn(t,e){e+="[^0-9]";var n=t.match(new RegExp(e,"g"));return n?n.length:0}function LLn(t,e,n){return e+="([^0-9])",n=n.replace(/\$/g,"$$$$"),t.replace(new RegExp(e,"g"),n+"$1")}function PLn(t,e){if(typeof t=="boolean")return!t;for(var n in t)if(e[n])return!0}function QLn(t,e,n){if(typeof t=="boolean")return!t&&n!="not";for(var r in t)if(r!=n&&e[r])return!0}function kLn(t,e){if(typeof t!="boolean"){for(var n in t)if(!e[n])return n}}function t_e(t){return"'"+i_e(t)+"'"}function ULn(t,e,n,r){var i=n?"'/' + "+e+(r?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):r?"'[' + "+e+" + ']'":"'[\\'' + "+e+" + '\\']'";return Yat(t,i)}function GLn(t,e,n){var r=t_e(n?"/"+o_e(e):r_e(e));return Yat(t,r)}var HLn=/^\/(?:[^~]|~0|~1)*$/,qLn=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function VLn(t,e,n){var r,i,o,s;if(t==="")return"rootData";if(t[0]=="/"){if(!HLn.test(t))throw new Error("Invalid JSON-pointer: "+t);i=t,o="rootData"}else{if(s=t.match(qLn),!s)throw new Error("Invalid JSON-pointer: "+t);if(r=+s[1],i=s[2],i=="#"){if(r>=e)throw new Error("Cannot access property/index "+r+" levels up, current level is "+e);return n[e-r]}if(r>e)throw new Error("Cannot access data "+r+" levels up, current level is "+e);if(o="data"+(e-r||""),!i)return o}for(var a=o,l=i.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(o+=r_e(s_e(c)),a+=" && "+o)}return a}function Yat(t,e){return t=='""'?e:(t+" + "+e).replace(/([^\\])' \+ '/g,"$1")}function $Ln(t){return s_e(decodeURIComponent(t))}function YLn(t){return encodeURIComponent(o_e(t))}function o_e(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function s_e(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}});var a_e=b((fXr,Wat)=>{"use strict";var jLn=QN();Wat.exports=WLn;function WLn(t){jLn.copy(t,this)}});var Jat=b((pXr,zat)=>{"use strict";var fx=zat.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};eee(e,r,i,t,"",t)};fx.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};fx.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};fx.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};fx.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 eee(t,e,n,r,i,o,s,a,l,u){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,l,u);for(var c in r){var d=r[c];if(Array.isArray(d)){if(c in fx.arrayKeywords)for(var h=0;h<d.length;h++)eee(t,e,n,d[h],i+"/"+c+"/"+h,o,i,c,r,h)}else if(c in fx.propsKeywords){if(d&&typeof d=="object")for(var m in d)eee(t,e,n,d[m],i+"/"+c+"/"+zLn(m),o,i,c,r,m)}else(c in fx.keywords||t.allKeys&&!(c in fx.skipKeywords))&&eee(t,e,n,d,i+"/"+c,o,i,c,r)}n(r,i,o,s,a,l,u)}}function zLn(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var see=b((hXr,elt)=>{"use strict";var yG=Gat(),Kat=X8(),iee=QN(),tee=a_e(),JLn=Jat();elt.exports=hx;hx.normalizeId=px;hx.fullPath=nee;hx.url=ree;hx.ids=tPn;hx.inlineRef=l_e;hx.schema=oee;function hx(t,e,n){var r=this._refs[n];if(typeof r=="string")if(this._refs[r])r=this._refs[r];else return hx.call(this,t,e,r);if(r=r||this._schemas[n],r instanceof tee)return l_e(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i=oee.call(this,e,n),o,s,a;return i&&(o=i.schema,e=i.root,a=i.baseId),o instanceof tee?s=o.validate||t.call(this,o.schema,e,void 0,a):o!==void 0&&(s=l_e(o,this._opts.inlineRefs)?o:t.call(this,o,e,void 0,a)),s}function oee(t,e){var n=yG.parse(e),r=Zat(n),i=nee(this._getId(t.schema));if(Object.keys(t.schema).length===0||r!==i){var o=px(r),s=this._refs[o];if(typeof s=="string")return KLn.call(this,t,s,n);if(s instanceof tee)s.validate||this._compile(s),t=s;else if(s=this._schemas[o],s instanceof tee){if(s.validate||this._compile(s),o==px(e))return{schema:s,root:t,baseId:i};t=s}else return;if(!t.schema)return;i=nee(this._getId(t.schema))}return Xat.call(this,n,i,t.schema,t)}function KLn(t,e,n){var r=oee.call(this,t,e);if(r){var i=r.schema,o=r.baseId;t=r.root;var s=this._getId(i);return s&&(o=ree(o,s)),Xat.call(this,n,o,i,t)}}var XLn=iee.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Xat(t,e,n,r){if(t.fragment=t.fragment||"",t.fragment.slice(0,1)=="/"){for(var i=t.fragment.split("/"),o=1;o<i.length;o++){var s=i[o];if(s){if(s=iee.unescapeFragment(s),n=n[s],n===void 0)break;var a;if(!XLn[s]&&(a=this._getId(n),a&&(e=ree(e,a)),n.$ref)){var l=ree(e,n.$ref),u=oee.call(this,r,l);u&&(n=u.schema,r=u.root,e=u.baseId)}}}if(n!==void 0&&n!==r.schema)return{schema:n,root:r,baseId:e}}}var ZLn=iee.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function l_e(t,e){if(e===!1)return!1;if(e===void 0||e===!0)return u_e(t);if(e)return c_e(t)<=e}function u_e(t){var e;if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(e=t[n],typeof e=="object"&&!u_e(e))return!1}else for(var r in t)if(r=="$ref"||(e=t[r],typeof e=="object"&&!u_e(e)))return!1;return!0}function c_e(t){var e=0,n;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(n=t[r],typeof n=="object"&&(e+=c_e(n)),e==1/0)return 1/0}else for(var i in t){if(i=="$ref")return 1/0;if(ZLn[i])e++;else if(n=t[i],typeof n=="object"&&(e+=c_e(n)+1),e==1/0)return 1/0}return e}function nee(t,e){e!==!1&&(t=px(t));var n=yG.parse(t);return Zat(n)}function Zat(t){return yG.serialize(t).split("#")[0]+"#"}var ePn=/#\/?$/;function px(t){return t?t.replace(ePn,""):""}function ree(t,e){return e=px(e),yG.resolve(t,e)}function tPn(t){var e=px(this._getId(t)),n={"":e},r={"":nee(e,!1)},i={},o=this;return JLn(t,{allKeys:!0},function(s,a,l,u,c,d,h){if(a!==""){var m=o._getId(s),E=n[u],y=r[u]+"/"+c;if(h!==void 0&&(y+="/"+(typeof h=="number"?h:iee.escapeFragment(h))),typeof m=="string"){m=E=px(E?yG.resolve(E,m):m);var C=o._refs[m];if(typeof C=="string"&&(C=o._refs[C]),C&&C.schema){if(!Kat(s,C.schema))throw new Error('id "'+m+'" resolves to more than one schema')}else if(m!=px(y))if(m[0]=="#"){if(i[m]&&!Kat(s,i[m]))throw new Error('id "'+m+'" resolves to more than one schema');i[m]=s}else o._refs[m]=y}n[a]=E,r[a]=y}}),i}});var aee=b((mXr,nlt)=>{"use strict";var d_e=see();nlt.exports={Validation:tlt(nPn),MissingRef:tlt(f_e)};function nPn(t){this.message="validation failed",this.errors=t,this.ajv=this.validation=!0}f_e.message=function(t,e){return"can't resolve reference "+e+" from id "+t};function f_e(t,e,n){this.message=n||f_e.message(t,e),this.missingRef=d_e.url(t,e),this.missingSchema=d_e.normalizeId(d_e.fullPath(this.missingRef))}function tlt(t){return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}});var p_e=b((AXr,rlt)=>{"use strict";rlt.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var n=typeof e.cycles=="boolean"?e.cycles:!1,r=e.cmp&&function(o){return function(s){return function(a,l){var u={key:a,value:s[a]},c={key:l,value:s[l]};return o(u,c)}}}(e.cmp),i=[];return function o(s){if(s&&s.toJSON&&typeof s.toJSON=="function"&&(s=s.toJSON()),s!==void 0){if(typeof s=="number")return isFinite(s)?""+s:"null";if(typeof s!="object")return JSON.stringify(s);var a,l;if(Array.isArray(s)){for(l="[",a=0;a<s.length;a++)a&&(l+=","),l+=o(s[a])||"null";return l+"]"}if(s===null)return"null";if(i.indexOf(s)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var u=i.push(s)-1,c=Object.keys(s).sort(r&&r(s));for(l="",a=0;a<c.length;a++){var d=c[a],h=o(s[d]);h&&(l&&(l+=","),l+=JSON.stringify(d)+":"+h)}return i.splice(u,1),"{"+l+"}"}}(t)}});var h_e=b((gXr,ilt)=>{"use strict";ilt.exports=function(e,n,r){var i="",o=e.schema.$async===!0,s=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),a=e.self._getId(e.schema);if(e.opts.strictKeywords){var l=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(l){var u="unknown keyword: "+l;if(e.opts.strictKeywords==="log")e.logger.warn(u);else throw new Error(u)}}if(e.isTop&&(i+=" var validate = ",o&&(e.async=!0,i+="async "),i+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(e.opts.sourceCode||e.opts.processCode)&&(i+=" "+("/*# sourceURL="+a+" */")+" ")),typeof e.schema=="boolean"||!(s||e.schema.$ref)){var n="false schema",c=e.level,d=e.dataLevel,h=e.schema[n],m=e.schemaPath+e.util.getProperty(n),E=e.errSchemaPath+"/"+n,F=!e.opts.allErrors,j,y="data"+(d||""),R="valid"+c;if(e.schema===!1){e.isTop?F=!0:i+=" var "+R+" = false; ";var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'boolean schema is false' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?o?i+=" return data; ":i+=" validate.errors = null; return true; ":i+=" var "+R+" = true; ";return e.isTop&&(i+=" }; return validate; "),i}if(e.isTop){var w=e.isTop,c=e.level=0,d=e.dataLevel=0,y="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var B="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(B);else throw new Error(B)}i+=" var vErrors = null; ",i+=" var errors = 0; ",i+=" if (rootData === undefined) rootData = data; "}else{var c=e.level,d=e.dataLevel,y="data"+(d||"");if(a&&(e.baseId=e.resolve.url(e.baseId,a)),o&&!e.async)throw new Error("async schema in sync schema");i+=" var errs_"+c+" = errors;"}var R="valid"+c,F=!e.opts.allErrors,q="",J="",j,L=e.schema.type,K=Array.isArray(L);if(L&&e.opts.nullable&&e.schema.nullable===!0&&(K?L.indexOf("null")==-1&&(L=L.concat("null")):L!="null"&&(L=[L,"null"],K=!0)),K&&L.length==1&&(L=L[0],K=!1),e.schema.$ref&&s){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(s=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(i+=" "+e.RULES.all.$comment.code(e,"$comment")),L){if(e.opts.coerceTypes)var U=e.util.coerceToTypes(e.opts.coerceTypes,L);var se=e.RULES.types[L];if(U||K||se===!0||se&&!H(se)){var m=e.schemaPath+".type",E=e.errSchemaPath+"/type",m=e.schemaPath+".type",E=e.errSchemaPath+"/type",V=K?"checkDataTypes":"checkDataType";if(i+=" if ("+e.util[V](L,y,e.opts.strictNumbers,!0)+") { ",U){var O="dataType"+c,Y="coerced"+c;i+=" var "+O+" = typeof "+y+"; var "+Y+" = undefined; ",e.opts.coerceTypes=="array"&&(i+=" if ("+O+" == 'object' && Array.isArray("+y+") && "+y+".length == 1) { "+y+" = "+y+"[0]; "+O+" = typeof "+y+"; if ("+e.util.checkDataType(e.schema.type,y,e.opts.strictNumbers)+") "+Y+" = "+y+"; } "),i+=" if ("+Y+" !== undefined) ; ";var ee=U;if(ee)for(var ne,Ae=-1,ve=ee.length-1;Ae<ve;)ne=ee[Ae+=1],ne=="string"?i+=" else if ("+O+" == 'number' || "+O+" == 'boolean') "+Y+" = '' + "+y+"; else if ("+y+" === null) "+Y+" = ''; ":ne=="number"||ne=="integer"?(i+=" else if ("+O+" == 'boolean' || "+y+" === null || ("+O+" == 'string' && "+y+" && "+y+" == +"+y+" ",ne=="integer"&&(i+=" && !("+y+" % 1)"),i+=")) "+Y+" = +"+y+"; "):ne=="boolean"?i+=" else if ("+y+" === 'false' || "+y+" === 0 || "+y+" === null) "+Y+" = false; else if ("+y+" === 'true' || "+y+" === 1) "+Y+" = true; ":ne=="null"?i+=" else if ("+y+" === '' || "+y+" === 0 || "+y+" === false) "+Y+" = null; ":e.opts.coerceTypes=="array"&&ne=="array"&&(i+=" else if ("+O+" == 'string' || "+O+" == 'number' || "+O+" == 'boolean' || "+y+" == null) "+Y+" = ["+y+"]; ");i+=" else { ";var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",K?i+=""+L.join(","):i+=""+L,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",K?i+=""+L.join(","):i+=""+L,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } if ("+Y+" !== undefined) { ";var De=d?"data"+(d-1||""):"parentData",Ue=d?e.dataPathArr[d]:"parentDataProperty";i+=" "+y+" = "+Y+"; ",d||(i+="if ("+De+" !== undefined)"),i+=" "+De+"["+Ue+"] = "+Y+"; } "}else{var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",K?i+=""+L.join(","):i+=""+L,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",K?i+=""+L.join(","):i+=""+L,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" } "}}if(e.schema.$ref&&!s)i+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",F&&(i+=" } if (errors === ",w?i+="0":i+="errs_"+c,i+=") { ",J+="}");else{var qe=e.RULES;if(qe){for(var se,Ie=-1,xe=qe.length-1;Ie<xe;)if(se=qe[Ie+=1],H(se)){if(se.type&&(i+=" if ("+e.util.checkDataType(se.type,y,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(se.type=="object"&&e.schema.properties){var h=e.schema.properties,Oe=Object.keys(h),ue=Oe;if(ue)for(var re,ye=-1,X=ue.length-1;ye<X;){re=ue[ye+=1];var he=h[re];if(he.default!==void 0){var ae=y+e.util.getProperty(re);if(e.compositeRule){if(e.opts.strictDefaults){var B="default is ignored for: "+ae;if(e.opts.strictDefaults==="log")e.logger.warn(B);else throw new Error(B)}}else i+=" if ("+ae+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+ae+" === null || "+ae+" === '' "),i+=" ) "+ae+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(he.default)+" ":i+=" "+JSON.stringify(he.default)+" ",i+="; "}}}else if(se.type=="array"&&Array.isArray(e.schema.items)){var me=e.schema.items;if(me){for(var he,Ae=-1,Se=me.length-1;Ae<Se;)if(he=me[Ae+=1],he.default!==void 0){var ae=y+"["+Ae+"]";if(e.compositeRule){if(e.opts.strictDefaults){var B="default is ignored for: "+ae;if(e.opts.strictDefaults==="log")e.logger.warn(B);else throw new Error(B)}}else i+=" if ("+ae+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+ae+" === null || "+ae+" === '' "),i+=" ) "+ae+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(he.default)+" ":i+=" "+JSON.stringify(he.default)+" ",i+="; "}}}}var ie=se.rules;if(ie){for(var k,z=-1,pe=ie.length-1;z<pe;)if(k=ie[z+=1],ge(k)){var te=k.code(e,k.keyword,se.type);te&&(i+=" "+te+" ",F&&(q+="}"))}}if(F&&(i+=" "+q+" ",q=""),se.type&&(i+=" } ",L&&L===se.type&&!U)){i+=" else { ";var m=e.schemaPath+".type",E=e.errSchemaPath+"/type",C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",K?i+=""+L.join(","):i+=""+L,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",K?i+=""+L.join(","):i+=""+L,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}F&&(i+=" if (errors === ",w?i+="0":i+="errs_"+c,i+=") { ",J+="}")}}}F&&(i+=" "+J+" "),w?(o?(i+=" if (errors === 0) return data; ",i+=" else throw new ValidationError(vErrors); "):(i+=" validate.errors = vErrors; ",i+=" return errors === 0; "),i+=" }; return validate;"):i+=" var "+R+" = errors === errs_"+c+";";function H(Pe){for(var pt=Pe.rules,Dt=0;Dt<pt.length;Dt++)if(ge(pt[Dt]))return!0}function ge(Pe){return e.schema[Pe.keyword]!==void 0||Pe.implements&&be(Pe)}function be(Pe){for(var pt=Pe.implements,Dt=0;Dt<pt.length;Dt++)if(e.schema[pt[Dt]]!==void 0)return!0}return i}});var ult=b((EXr,llt)=>{"use strict";var lee=see(),cee=QN(),slt=aee(),rPn=p_e(),olt=h_e(),iPn=cee.ucs2length,oPn=X8(),sPn=slt.Validation;llt.exports=m_e;function m_e(t,e,n,r){var i=this,o=this._opts,s=[void 0],a={},l=[],u={},c=[],d={},h=[];e=e||{schema:t,refVal:s,refs:a};var m=aPn.call(this,t,e,r),E=this._compilations[m.index];if(m.compiling)return E.callValidate=B;var y=this._formats,C=this.RULES;try{var _=R(t,e,n,r);E.validate=_;var w=E.callValidate;return w&&(w.schema=_.schema,w.errors=null,w.refs=_.refs,w.refVal=_.refVal,w.root=_.root,w.$async=_.$async,o.sourceCode&&(w.source=_.source)),_}finally{lPn.call(this,t,e,r)}function B(){var V=E.validate,O=V.apply(this,arguments);return B.errors=V.errors,O}function R(V,O,Y,ee){var ne=!O||O&&O.schema==V;if(O.schema!=e.schema)return m_e.call(i,V,O,Y,ee);var Ae=V.$async===!0,ve=olt({isTop:!0,schema:V,isRoot:ne,baseId:ee,root:O,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:slt.MissingRef,RULES:C,validate:olt,util:cee,resolve:lee,resolveRef:F,usePattern:K,useDefault:U,useCustomRule:se,opts:o,formats:y,logger:i.logger,self:i});ve=uee(s,dPn)+uee(l,uPn)+uee(c,cPn)+uee(h,fPn)+ve,o.processCode&&(ve=o.processCode(ve,V));var De;try{var Ue=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",ve);De=Ue(i,C,y,e,s,c,h,oPn,iPn,sPn),s[0]=De}catch(qe){throw i.logger.error("Error compiling schema, function code:",ve),qe}return De.schema=V,De.errors=null,De.refs=a,De.refVal=s,De.root=ne?De:O,Ae&&(De.$async=!0),o.sourceCode===!0&&(De.source={code:ve,patterns:l,defaults:c}),De}function F(V,O,Y){O=lee.url(V,O);var ee=a[O],ne,Ae;if(ee!==void 0)return ne=s[ee],Ae="refVal["+ee+"]",L(ne,Ae);if(!Y&&e.refs){var ve=e.refs[O];if(ve!==void 0)return ne=e.refVal[ve],Ae=q(O,ne),L(ne,Ae)}Ae=q(O);var De=lee.call(i,R,e,O);if(De===void 0){var Ue=n&&n[O];Ue&&(De=lee.inlineRef(Ue,o.inlineRefs)?Ue:m_e.call(i,Ue,e,n,V))}if(De===void 0)J(O);else return j(O,De),L(De,Ae)}function q(V,O){var Y=s.length;return s[Y]=O,a[V]=Y,"refVal"+Y}function J(V){delete a[V]}function j(V,O){var Y=a[V];s[Y]=O}function L(V,O){return typeof V=="object"||typeof V=="boolean"?{code:O,schema:V,inline:!0}:{code:O,$async:V&&!!V.$async}}function K(V){var O=u[V];return O===void 0&&(O=u[V]=l.length,l[O]=V),"pattern"+O}function U(V){switch(typeof V){case"boolean":case"number":return""+V;case"string":return cee.toQuotedString(V);case"object":if(V===null)return"null";var O=rPn(V),Y=d[O];return Y===void 0&&(Y=d[O]=c.length,c[Y]=V),"default"+Y}}function se(V,O,Y,ee){if(i._opts.validateSchema!==!1){var ne=V.definition.dependencies;if(ne&&!ne.every(function(ue){return Object.prototype.hasOwnProperty.call(Y,ue)}))throw new Error("parent schema must have all required keywords: "+ne.join(","));var Ae=V.definition.validateSchema;if(Ae){var ve=Ae(O);if(!ve){var De="keyword schema is invalid: "+i.errorsText(Ae.errors);if(i._opts.validateSchema=="log")i.logger.error(De);else throw new Error(De)}}}var Ue=V.definition.compile,qe=V.definition.inline,Ie=V.definition.macro,xe;if(Ue)xe=Ue.call(i,O,Y,ee);else if(Ie)xe=Ie.call(i,O,Y,ee),o.validateSchema!==!1&&i.validateSchema(xe,!0);else if(qe)xe=qe.call(i,ee,V.keyword,O,Y);else if(xe=V.definition.validate,!xe)return;if(xe===void 0)throw new Error('custom keyword "'+V.keyword+'"failed to compile');var Oe=h.length;return h[Oe]=xe,{code:"customRule"+Oe,validate:xe}}}function aPn(t,e,n){var r=alt.call(this,t,e,n);return r>=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:t,root:e,baseId:n},{index:r,compiling:!1})}function lPn(t,e,n){var r=alt.call(this,t,e,n);r>=0&&this._compilations.splice(r,1)}function alt(t,e,n){for(var r=0;r<this._compilations.length;r++){var i=this._compilations[r];if(i.schema==t&&i.root==e&&i.baseId==n)return r}return-1}function uPn(t,e){return"var pattern"+t+" = new RegExp("+cee.toQuotedString(e[t])+");"}function cPn(t){return"var default"+t+" = defaults["+t+"];"}function dPn(t,e){return e[t]===void 0?"":"var refVal"+t+" = refVal["+t+"];"}function fPn(t){return"var customRule"+t+" = customRules["+t+"];"}function uee(t,e){if(!t.length)return"";for(var n="",r=0;r<t.length;r++)n+=e(r,t);return n}});var dlt=b((yXr,clt)=>{"use strict";var dee=clt.exports=function(){this._cache={}};dee.prototype.put=function(e,n){this._cache[e]=n};dee.prototype.get=function(e){return this._cache[e]};dee.prototype.del=function(e){delete this._cache[e]};dee.prototype.clear=function(){this._cache={}}});var Slt=b((CXr,Dlt)=>{"use strict";var pPn=QN(),hPn=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,mPn=[0,31,28,31,30,31,30,31,31,30,31,30,31],APn=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,flt=/^(?=.{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,gPn=/^(?:[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,EPn=/^(?:[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,plt=/^(?:(?:[^\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,hlt=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,mlt=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Alt=/^(?:\/(?:[^~/]|~0|~1)*)*$/,glt=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Elt=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Dlt.exports=fee;function fee(t){return t=t=="full"?"full":"fast",pPn.copy(fee[t])}fee.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\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,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":plt,url:hlt,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,hostname:flt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:vlt,uuid:mlt,"json-pointer":Alt,"json-pointer-uri-fragment":glt,"relative-json-pointer":Elt};fee.full={date:ylt,time:Clt,"date-time":vPn,uri:SPn,"uri-reference":EPn,"uri-template":plt,url:hlt,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:flt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:vlt,uuid:mlt,"json-pointer":Alt,"json-pointer-uri-fragment":glt,"relative-json-pointer":Elt};function yPn(t){return t%4===0&&(t%100!==0||t%400===0)}function ylt(t){var e=t.match(hPn);if(!e)return!1;var n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&yPn(n)?29:mPn[r])}function Clt(t,e){var n=t.match(APn);if(!n)return!1;var r=n[1],i=n[2],o=n[3],s=n[5];return(r<=23&&i<=59&&o<=59||r==23&&i==59&&o==60)&&(!e||s)}var CPn=/t|\s/i;function vPn(t){var e=t.split(CPn);return e.length==2&&ylt(e[0])&&Clt(e[1],!0)}var DPn=/\/|:/;function SPn(t){return DPn.test(t)&&gPn.test(t)}var _Pn=/[^\\]\\Z/;function vlt(t){if(_Pn.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Ilt=b((vXr,_lt)=>{"use strict";_lt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.errSchemaPath+"/"+n,u=!e.opts.allErrors,c="data"+(s||""),d="valid"+o,h,m;if(a=="#"||a=="#/")e.isRoot?(h=e.async,m="validate"):(h=e.root.schema.$async===!0,m="root.refVal[0]");else{var E=e.resolveRef(e.baseId,a,e.isRoot);if(E===void 0){var y=e.MissingRefError.message(e.baseId,a);if(e.opts.missingRefs=="fail"){e.logger.error(y);var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(a)+"' } ",e.opts.messages!==!1&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(a)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(y),u&&(i+=" if (true) { ");else throw new e.MissingRefError(e.baseId,a,y)}else if(E.inline){var w=e.util.copy(e);w.level++;var B="valid"+w.level;w.schema=E.schema,w.schemaPath="",w.errSchemaPath=a;var R=e.validate(w).replace(/validate\.schema/g,E.code);i+=" "+R+" ",u&&(i+=" if ("+B+") { ")}else h=E.$async===!0||e.async&&E.$async!==!1,m=E.code}if(m){var C=C||[];C.push(i),i="",e.opts.passContext?i+=" "+m+".call(this, ":i+=" "+m+"( ",i+=" "+c+", (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var F=s?"data"+(s-1||""):"parentData",q=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+F+" , "+q+", rootData) ";var J=i;if(i=C.pop(),h){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+d+"; "),i+=" try { await "+J+"; ",u&&(i+=" "+d+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+d+" = false; "),i+=" } ",u&&(i+=" if ("+d+") { ")}else i+=" if (!"+J+") { if (vErrors === null) vErrors = "+m+".errors; else vErrors = vErrors.concat("+m+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i}});var blt=b((DXr,Tlt)=>{"use strict";Tlt.exports=function(e,n,r){var i=" ",o=e.schema[n],s=e.schemaPath+e.util.getProperty(n),a=e.errSchemaPath+"/"+n,l=!e.opts.allErrors,u=e.util.copy(e),c="";u.level++;var d="valid"+u.level,h=u.baseId,m=!0,E=o;if(E)for(var y,C=-1,_=E.length-1;C<_;)y=E[C+=1],(e.opts.strictKeywords?typeof y=="object"&&Object.keys(y).length>0||y===!1:e.util.schemaHasRules(y,e.RULES.all))&&(m=!1,u.schema=y,u.schemaPath=s+"["+C+"]",u.errSchemaPath=a+"/"+C,i+=" "+e.validate(u)+" ",u.baseId=h,l&&(i+=" if ("+d+") { ",c+="}"));return l&&(m?i+=" if (true) { ":i+=" "+c.slice(0,-1)+" "),i}});var wlt=b((SXr,xlt)=>{"use strict";xlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_=a.every(function(j){return e.opts.strictKeywords?typeof j=="object"&&Object.keys(j).length>0||j===!1:e.util.schemaHasRules(j,e.RULES.all)});if(_){var w=E.baseId;i+=" var "+m+" = errors; var "+h+" = false; ";var B=e.compositeRule;e.compositeRule=E.compositeRule=!0;var R=a;if(R)for(var F,q=-1,J=R.length-1;q<J;)F=R[q+=1],E.schema=F,E.schemaPath=l+"["+q+"]",E.errSchemaPath=u+"/"+q,i+=" "+e.validate(E)+" ",E.baseId=w,i+=" "+h+" = "+h+" || "+C+"; if (!"+h+") { ",y+="}";e.compositeRule=E.compositeRule=B,i+=" "+y+" if (!"+h+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else c&&(i+=" if (true) { ");return i}});var Blt=b((_Xr,Rlt)=>{"use strict";Rlt.exports=function(e,n,r){var i=" ",o=e.schema[n],s=e.errSchemaPath+"/"+n,a=!e.opts.allErrors,l=e.util.toQuotedString(o);return e.opts.$comment===!0?i+=" console.log("+l+");":typeof e.opts.$comment=="function"&&(i+=" self._opts.$comment("+l+", "+e.util.toQuotedString(s)+", validate.root.schema);"),i}});var Olt=b((IXr,Nlt)=>{"use strict";Nlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a,m||(i+=" var schema"+o+" = validate.schema"+l+";"),i+="var "+h+" = equal("+d+", schema"+o+"); if (!"+h+") { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+o+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var C=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Flt=b((TXr,Mlt)=>{"use strict";Mlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_="i"+o,w=E.dataLevel=e.dataLevel+1,B="data"+w,R=e.baseId,F=e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all);if(i+="var "+m+" = errors;var "+h+";",F){var q=e.compositeRule;e.compositeRule=E.compositeRule=!0,E.schema=a,E.schemaPath=l,E.errSchemaPath=u,i+=" var "+C+" = false; for (var "+_+" = 0; "+_+" < "+d+".length; "+_+"++) { ",E.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0);var J=d+"["+_+"]";E.dataPathArr[w]=_;var j=e.validate(E);E.baseId=R,e.util.varOccurences(j,B)<2?i+=" "+e.util.varReplace(j,B,J)+" ":i+=" var "+B+" = "+J+"; "+j+" ",i+=" if ("+C+") break; } ",e.compositeRule=E.compositeRule=q,i+=" "+y+" if (!"+C+") {"}else i+=" if ("+d+".length == 0) {";var L=L||[];L.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var K=i;return i=L.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+K+"]); ":i+=" validate.errors = ["+K+"]; return false; ":i+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",F&&(i+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i}});var Plt=b((bXr,Llt)=>{"use strict";Llt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e),E="";m.level++;var y="valid"+m.level,C={},_={},w=e.opts.ownProperties;for(q in a)if(q!="__proto__"){var B=a[q],R=Array.isArray(B)?_:C;R[q]=B}i+="var "+h+" = errors;";var F=e.errorPath;i+="var missing"+o+";";for(var q in _)if(R=_[q],R.length){if(i+=" if ( "+d+e.util.getProperty(q)+" !== undefined ",w&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(q)+"') "),c){i+=" && ( ";var J=R;if(J)for(var j,L=-1,K=J.length-1;L<K;){j=J[L+=1],L&&(i+=" || ");var U=e.util.getProperty(j),se=d+U;i+=" ( ( "+se+" === undefined ",w&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(j)+"') "),i+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:U)+") ) "}i+=")) { ";var V="missing"+o,O="' + "+V+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(F,V,!0):F+" + "+V);var Y=Y||[];Y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(q)+"', missingProperty: '"+O+"', depsCount: "+R.length+", deps: '"+e.util.escapeQuotes(R.length==1?R[0]:R.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",R.length==1?i+="property "+e.util.escapeQuotes(R[0]):i+="properties "+e.util.escapeQuotes(R.join(", ")),i+=" when property "+e.util.escapeQuotes(q)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var ee=i;i=Y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+ee+"]); ":i+=" validate.errors = ["+ee+"]; return false; ":i+=" var err = "+ee+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{i+=" ) { ";var ne=R;if(ne)for(var j,Ae=-1,ve=ne.length-1;Ae<ve;){j=ne[Ae+=1];var U=e.util.getProperty(j),O=e.util.escapeQuotes(j),se=d+U;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(F,j,e.opts.jsonPointers)),i+=" if ( "+se+" === undefined ",w&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(j)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(q)+"', missingProperty: '"+O+"', depsCount: "+R.length+", deps: '"+e.util.escapeQuotes(R.length==1?R[0]:R.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",R.length==1?i+="property "+e.util.escapeQuotes(R[0]):i+="properties "+e.util.escapeQuotes(R.join(", ")),i+=" when property "+e.util.escapeQuotes(q)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}i+=" } ",c&&(E+="}",i+=" else { ")}e.errorPath=F;var De=m.baseId;for(var q in C){var B=C[q];(e.opts.strictKeywords?typeof B=="object"&&Object.keys(B).length>0||B===!1:e.util.schemaHasRules(B,e.RULES.all))&&(i+=" "+y+" = true; if ( "+d+e.util.getProperty(q)+" !== undefined ",w&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(q)+"') "),i+=") { ",m.schema=B,m.schemaPath=l+e.util.getProperty(q),m.errSchemaPath=u+"/"+e.util.escapeFragment(q),i+=" "+e.validate(m)+" ",m.baseId=De,i+=" } ",c&&(i+=" if ("+y+") { ",E+="}"))}return c&&(i+=" "+E+" if ("+h+" == errors) {"),i}});var klt=b((xXr,Qlt)=>{"use strict";Qlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a;var y="i"+o,C="schema"+o;m||(i+=" var "+C+" = validate.schema"+l+";"),i+="var "+h+";",m&&(i+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),i+=""+h+" = false;for (var "+y+"=0; "+y+"<"+C+".length; "+y+"++) if (equal("+d+", "+C+"["+y+"])) { "+h+" = true; break; }",m&&(i+=" } "),i+=" if (!"+h+") { ";var _=_||[];_.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+o+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var w=i;return i=_.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Glt=b((wXr,Ult)=>{"use strict";Ult.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||"");if(e.opts.format===!1)return c&&(i+=" if (true) { "),i;var h=e.opts.$data&&a&&a.$data,m;h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a;var E=e.opts.unknownFormats,y=Array.isArray(E);if(h){var C="format"+o,_="isObject"+o,w="formatType"+o;i+=" var "+C+" = formats["+m+"]; var "+_+" = typeof "+C+" == 'object' && !("+C+" instanceof RegExp) && "+C+".validate; var "+w+" = "+_+" && "+C+".type || 'string'; if ("+_+") { ",e.async&&(i+=" var async"+o+" = "+C+".async; "),i+=" "+C+" = "+C+".validate; } if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'string') || "),i+=" (",E!="ignore"&&(i+=" ("+m+" && !"+C+" ",y&&(i+=" && self._opts.unknownFormats.indexOf("+m+") == -1 "),i+=") || "),i+=" ("+C+" && "+w+" == '"+r+"' && !(typeof "+C+" == 'function' ? ",e.async?i+=" (async"+o+" ? await "+C+"("+d+") : "+C+"("+d+")) ":i+=" "+C+"("+d+") ",i+=" : "+C+".test("+d+"))))) {"}else{var C=e.formats[a];if(!C){if(E=="ignore")return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(i+=" if (true) { "),i;if(y&&E.indexOf(a)>=0)return c&&(i+=" if (true) { "),i;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var _=typeof C=="object"&&!(C instanceof RegExp)&&C.validate,w=_&&C.type||"string";if(_){var B=C.async===!0;C=C.validate}if(w!=r)return c&&(i+=" if (true) { "),i;if(B){if(!e.async)throw new Error("async format in sync schema");var R="formats"+e.util.getProperty(a)+".validate";i+=" if (!(await "+R+"("+d+"))) { "}else{i+=" if (! ";var R="formats"+e.util.getProperty(a);_&&(R+=".validate"),typeof C=="function"?i+=" "+R+"("+d+") ":i+=" "+R+".test("+d+") ",i+=") { "}}var F=F||[];F.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ",h?i+=""+m:i+=""+e.util.toQuotedString(a),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match format "`,h?i+="' + "+m+" + '":i+=""+e.util.escapeQuotes(a),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var q=i;return i=F.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var qlt=b((RXr,Hlt)=>{"use strict";Hlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e);E.level++;var y="valid"+E.level,C=e.schema.then,_=e.schema.else,w=C!==void 0&&(e.opts.strictKeywords?typeof C=="object"&&Object.keys(C).length>0||C===!1:e.util.schemaHasRules(C,e.RULES.all)),B=_!==void 0&&(e.opts.strictKeywords?typeof _=="object"&&Object.keys(_).length>0||_===!1:e.util.schemaHasRules(_,e.RULES.all)),R=E.baseId;if(w||B){var F;E.createErrors=!1,E.schema=a,E.schemaPath=l,E.errSchemaPath=u,i+=" var "+m+" = errors; var "+h+" = true; ";var q=e.compositeRule;e.compositeRule=E.compositeRule=!0,i+=" "+e.validate(E)+" ",E.baseId=R,E.createErrors=!0,i+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=E.compositeRule=q,w?(i+=" if ("+y+") { ",E.schema=e.schema.then,E.schemaPath=e.schemaPath+".then",E.errSchemaPath=e.errSchemaPath+"/then",i+=" "+e.validate(E)+" ",E.baseId=R,i+=" "+h+" = "+y+"; ",w&&B?(F="ifClause"+o,i+=" var "+F+" = 'then'; "):F="'then'",i+=" } ",B&&(i+=" else { ")):i+=" if (!"+y+") { ",B&&(E.schema=e.schema.else,E.schemaPath=e.schemaPath+".else",E.errSchemaPath=e.errSchemaPath+"/else",i+=" "+e.validate(E)+" ",E.baseId=R,i+=" "+h+" = "+y+"; ",w&&B?(F="ifClause"+o,i+=" var "+F+" = 'else'; "):F="'else'",i+=" } "),i+=" if (!"+h+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+F+" } ",e.opts.messages!==!1&&(i+=` , message: 'should match "' + `+F+` + '" schema' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var $lt=b((BXr,Vlt)=>{"use strict";Vlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_="i"+o,w=E.dataLevel=e.dataLevel+1,B="data"+w,R=e.baseId;if(i+="var "+m+" = errors;var "+h+";",Array.isArray(a)){var F=e.schema.additionalItems;if(F===!1){i+=" "+h+" = "+d+".length <= "+a.length+"; ";var q=u;u=e.errSchemaPath+"/additionalItems",i+=" if (!"+h+") { ";var J=J||[];J.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a.length+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var j=i;i=J.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u=q,c&&(y+="}",i+=" else { ")}var L=a;if(L){for(var K,U=-1,se=L.length-1;U<se;)if(K=L[U+=1],e.opts.strictKeywords?typeof K=="object"&&Object.keys(K).length>0||K===!1:e.util.schemaHasRules(K,e.RULES.all)){i+=" "+C+" = true; if ("+d+".length > "+U+") { ";var V=d+"["+U+"]";E.schema=K,E.schemaPath=l+"["+U+"]",E.errSchemaPath=u+"/"+U,E.errorPath=e.util.getPathExpr(e.errorPath,U,e.opts.jsonPointers,!0),E.dataPathArr[w]=U;var O=e.validate(E);E.baseId=R,e.util.varOccurences(O,B)<2?i+=" "+e.util.varReplace(O,B,V)+" ":i+=" var "+B+" = "+V+"; "+O+" ",i+=" } ",c&&(i+=" if ("+C+") { ",y+="}")}}if(typeof F=="object"&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))){E.schema=F,E.schemaPath=e.schemaPath+".additionalItems",E.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+C+" = true; if ("+d+".length > "+a.length+") { for (var "+_+" = "+a.length+"; "+_+" < "+d+".length; "+_+"++) { ",E.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0);var V=d+"["+_+"]";E.dataPathArr[w]=_;var O=e.validate(E);E.baseId=R,e.util.varOccurences(O,B)<2?i+=" "+e.util.varReplace(O,B,V)+" ":i+=" var "+B+" = "+V+"; "+O+" ",c&&(i+=" if (!"+C+") break; "),i+=" } } ",c&&(i+=" if ("+C+") { ",y+="}")}}else if(e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all)){E.schema=a,E.schemaPath=l,E.errSchemaPath=u,i+=" for (var "+_+" = 0; "+_+" < "+d+".length; "+_+"++) { ",E.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0);var V=d+"["+_+"]";E.dataPathArr[w]=_;var O=e.validate(E);E.baseId=R,e.util.varOccurences(O,B)<2?i+=" "+e.util.varReplace(O,B,V)+" ":i+=" var "+B+" = "+V+"; "+O+" ",c&&(i+=" if (!"+C+") break; "),i+=" }"}return c&&(i+=" "+y+" if ("+m+" == errors) {"),i}});var A_e=b((NXr,Ylt)=>{"use strict";Ylt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,R,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a;var E=n=="maximum",y=E?"exclusiveMaximum":"exclusiveMinimum",C=e.schema[y],_=e.opts.$data&&C&&C.$data,w=E?"<":">",B=E?">":"<",R=void 0;if(!(h||typeof a=="number"||a===void 0))throw new Error(n+" must be number");if(!(_||C===void 0||typeof C=="number"||typeof C=="boolean"))throw new Error(y+" must be number or boolean");if(_){var F=e.util.getData(C.$data,s,e.dataPathArr),q="exclusive"+o,J="exclType"+o,j="exclIsNumber"+o,L="op"+o,K="' + "+L+" + '";i+=" var schemaExcl"+o+" = "+F+"; ",F="schemaExcl"+o,i+=" var "+q+"; var "+J+" = typeof "+F+"; if ("+J+" != 'boolean' && "+J+" != 'undefined' && "+J+" != 'number') { ";var R=y,U=U||[];U.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: '"+y+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var se=i;i=U.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+se+"]); ":i+=" validate.errors = ["+se+"]; return false; ":i+=" var err = "+se+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" "+J+" == 'number' ? ( ("+q+" = "+m+" === undefined || "+F+" "+w+"= "+m+") ? "+d+" "+B+"= "+F+" : "+d+" "+B+" "+m+" ) : ( ("+q+" = "+F+" === true) ? "+d+" "+B+"= "+m+" : "+d+" "+B+" "+m+" ) || "+d+" !== "+d+") { var op"+o+" = "+q+" ? '"+w+"' : '"+w+"='; ",a===void 0&&(R=y,u=e.errSchemaPath+"/"+y,m=F,h=_)}else{var j=typeof C=="number",K=w;if(j&&h){var L="'"+K+"'";i+=" if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" ( "+m+" === undefined || "+C+" "+w+"= "+m+" ? "+d+" "+B+"= "+C+" : "+d+" "+B+" "+m+" ) || "+d+" !== "+d+") { "}else{j&&a===void 0?(q=!0,R=y,u=e.errSchemaPath+"/"+y,m=C,B+="="):(j&&(m=Math[E?"min":"max"](C,a)),C===(j?m:!0)?(q=!0,R=y,u=e.errSchemaPath+"/"+y,B+="="):(q=!1,K+="="));var L="'"+K+"'";i+=" if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" "+d+" "+B+" "+m+" || "+d+" !== "+d+") { "}}R=R||n;var U=U||[];U.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+L+", limit: "+m+", exclusive: "+q+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be "+K+" ",h?i+="' + "+m:i+=""+m+"'"),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var se=i;return i=U.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+se+"]); ":i+=" validate.errors = ["+se+"]; return false; ":i+=" var err = "+se+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var g_e=b((OXr,jlt)=>{"use strict";jlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,y,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");var E=n=="maxItems"?">":"<";i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" "+d+".length "+E+" "+m+") { ";var y=n,C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",n=="maxItems"?i+="more":i+="fewer",i+=" than ",h?i+="' + "+m+" + '":i+=""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var _=i;return i=C.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var E_e=b((MXr,Wlt)=>{"use strict";Wlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,y,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");var E=n=="maxLength"?">":"<";i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),e.opts.unicode===!1?i+=" "+d+".length ":i+=" ucs2length("+d+") ",i+=" "+E+" "+m+") { ";var y=n,C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be ",n=="maxLength"?i+="longer":i+="shorter",i+=" than ",h?i+="' + "+m+" + '":i+=""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var _=i;return i=C.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var y_e=b((FXr,zlt)=>{"use strict";zlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,y,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");var E=n=="maxProperties"?">":"<";i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" Object.keys("+d+").length "+E+" "+m+") { ";var y=n,C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",n=="maxProperties"?i+="more":i+="fewer",i+=" than ",h?i+="' + "+m+" + '":i+=""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var _=i;return i=C.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Klt=b((LXr,Jlt)=>{"use strict";Jlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");i+="var division"+o+";if (",h&&(i+=" "+m+" !== undefined && ( typeof "+m+" != 'number' || "),i+=" (division"+o+" = "+d+" / "+m+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var E=E||[];E.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be multiple of ",h?i+="' + "+m:i+=""+m+"'"),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var y=i;return i=E.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Zlt=b((PXr,Xlt)=>{"use strict";Xlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e);m.level++;var E="valid"+m.level;if(e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all)){m.schema=a,m.schemaPath=l,m.errSchemaPath=u,i+=" var "+h+" = errors; ";var y=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1;var C;m.opts.allErrors&&(C=m.opts.allErrors,m.opts.allErrors=!1),i+=" "+e.validate(m)+" ",m.createErrors=!0,C&&(m.opts.allErrors=C),e.compositeRule=m.compositeRule=y,i+=" if ("+E+") { ";var _=_||[];_.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var w=i;i=_.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ");return i}});var tut=b((QXr,eut)=>{"use strict";eut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_=E.baseId,w="prevValid"+o,B="passingSchemas"+o;i+="var "+m+" = errors , "+w+" = false , "+h+" = false , "+B+" = null; ";var R=e.compositeRule;e.compositeRule=E.compositeRule=!0;var F=a;if(F)for(var q,J=-1,j=F.length-1;J<j;)q=F[J+=1],(e.opts.strictKeywords?typeof q=="object"&&Object.keys(q).length>0||q===!1:e.util.schemaHasRules(q,e.RULES.all))?(E.schema=q,E.schemaPath=l+"["+J+"]",E.errSchemaPath=u+"/"+J,i+=" "+e.validate(E)+" ",E.baseId=_):i+=" var "+C+" = true; ",J&&(i+=" if ("+C+" && "+w+") { "+h+" = false; "+B+" = ["+B+", "+J+"]; } else { ",y+="}"),i+=" if ("+C+") { "+h+" = "+w+" = true; "+B+" = "+J+"; }";return e.compositeRule=E.compositeRule=R,i+=""+y+"if (!"+h+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+B+" } ",e.opts.messages!==!1&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i}});var rut=b((kXr,nut)=>{"use strict";nut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a;var E=h?"(new RegExp("+m+"))":e.usePattern(a);i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'string') || "),i+=" !"+E+".test("+d+") ) { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",h?i+=""+m:i+=""+e.util.toQuotedString(a),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match pattern "`,h?i+="' + "+m+" + '":i+=""+e.util.escapeQuotes(a),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var C=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var out=b((UXr,iut)=>{"use strict";iut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e),E="";m.level++;var y="valid"+m.level,C="key"+o,_="idx"+o,w=m.dataLevel=e.dataLevel+1,B="data"+w,R="dataProperties"+o,F=Object.keys(a||{}).filter(Ae),q=e.schema.patternProperties||{},J=Object.keys(q).filter(Ae),j=e.schema.additionalProperties,L=F.length||J.length,K=j===!1,U=typeof j=="object"&&Object.keys(j).length,se=e.opts.removeAdditional,V=K||U||se,O=e.opts.ownProperties,Y=e.baseId,ee=e.schema.required;if(ee&&!(e.opts.$data&&ee.$data)&&ee.length<e.opts.loopRequired)var ne=e.util.toHash(ee);function Ae(mt){return mt!=="__proto__"}if(i+="var "+h+" = errors;var "+y+" = true;",O&&(i+=" var "+R+" = undefined;"),V){if(O?i+=" "+R+" = "+R+" || Object.keys("+d+"); for (var "+_+"=0; "+_+"<"+R+".length; "+_+"++) { var "+C+" = "+R+"["+_+"]; ":i+=" for (var "+C+" in "+d+") { ",L){if(i+=" var isAdditional"+o+" = !(false ",F.length)if(F.length>8)i+=" || validate.schema"+l+".hasOwnProperty("+C+") ";else{var ve=F;if(ve)for(var De,Ue=-1,qe=ve.length-1;Ue<qe;)De=ve[Ue+=1],i+=" || "+C+" == "+e.util.toQuotedString(De)+" "}if(J.length){var Ie=J;if(Ie)for(var xe,Oe=-1,ue=Ie.length-1;Oe<ue;)xe=Ie[Oe+=1],i+=" || "+e.usePattern(xe)+".test("+C+") "}i+=" ); if (isAdditional"+o+") { "}if(se=="all")i+=" delete "+d+"["+C+"]; ";else{var re=e.errorPath,ye="' + "+C+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers)),K)if(se)i+=" delete "+d+"["+C+"]; ";else{i+=" "+y+" = false; ";var X=u;u=e.errSchemaPath+"/additionalProperties";var he=he||[];he.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { additionalProperty: '"+ye+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is an invalid additional property":i+="should NOT have additional properties",i+="' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var ae=i;i=he.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+ae+"]); ":i+=" validate.errors = ["+ae+"]; return false; ":i+=" var err = "+ae+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=X,c&&(i+=" break; ")}else if(U)if(se=="failing"){i+=" var "+h+" = errors; ";var me=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=j,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers);var Se=d+"["+C+"]";m.dataPathArr[w]=C;var ie=e.validate(m);m.baseId=Y,e.util.varOccurences(ie,B)<2?i+=" "+e.util.varReplace(ie,B,Se)+" ":i+=" var "+B+" = "+Se+"; "+ie+" ",i+=" if (!"+y+") { errors = "+h+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+d+"["+C+"]; } ",e.compositeRule=m.compositeRule=me}else{m.schema=j,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers);var Se=d+"["+C+"]";m.dataPathArr[w]=C;var ie=e.validate(m);m.baseId=Y,e.util.varOccurences(ie,B)<2?i+=" "+e.util.varReplace(ie,B,Se)+" ":i+=" var "+B+" = "+Se+"; "+ie+" ",c&&(i+=" if (!"+y+") break; ")}e.errorPath=re}L&&(i+=" } "),i+=" } ",c&&(i+=" if ("+y+") { ",E+="}")}var k=e.opts.useDefaults&&!e.compositeRule;if(F.length){var z=F;if(z)for(var De,pe=-1,te=z.length-1;pe<te;){De=z[pe+=1];var H=a[De];if(e.opts.strictKeywords?typeof H=="object"&&Object.keys(H).length>0||H===!1:e.util.schemaHasRules(H,e.RULES.all)){var ge=e.util.getProperty(De),Se=d+ge,be=k&&H.default!==void 0;m.schema=H,m.schemaPath=l+ge,m.errSchemaPath=u+"/"+e.util.escapeFragment(De),m.errorPath=e.util.getPath(e.errorPath,De,e.opts.jsonPointers),m.dataPathArr[w]=e.util.toQuotedString(De);var ie=e.validate(m);if(m.baseId=Y,e.util.varOccurences(ie,B)<2){ie=e.util.varReplace(ie,B,Se);var Pe=Se}else{var Pe=B;i+=" var "+B+" = "+Se+"; "}if(be)i+=" "+ie+" ";else{if(ne&&ne[De]){i+=" if ( "+Pe+" === undefined ",O&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(De)+"') "),i+=") { "+y+" = false; ";var re=e.errorPath,X=u,pt=e.util.escapeQuotes(De);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(re,De,e.opts.jsonPointers)),u=e.errSchemaPath+"/required";var he=he||[];he.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+pt+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+pt+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var ae=i;i=he.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+ae+"]); ":i+=" validate.errors = ["+ae+"]; return false; ":i+=" var err = "+ae+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=X,e.errorPath=re,i+=" } else { "}else c?(i+=" if ( "+Pe+" === undefined ",O&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(De)+"') "),i+=") { "+y+" = true; } else { "):(i+=" if ("+Pe+" !== undefined ",O&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(De)+"') "),i+=" ) { ");i+=" "+ie+" } "}}c&&(i+=" if ("+y+") { ",E+="}")}}if(J.length){var Dt=J;if(Dt)for(var xe,Qt=-1,dt=Dt.length-1;Qt<dt;){xe=Dt[Qt+=1];var H=q[xe];if(e.opts.strictKeywords?typeof H=="object"&&Object.keys(H).length>0||H===!1:e.util.schemaHasRules(H,e.RULES.all)){m.schema=H,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(xe),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(xe),O?i+=" "+R+" = "+R+" || Object.keys("+d+"); for (var "+_+"=0; "+_+"<"+R+".length; "+_+"++) { var "+C+" = "+R+"["+_+"]; ":i+=" for (var "+C+" in "+d+") { ",i+=" if ("+e.usePattern(xe)+".test("+C+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers);var Se=d+"["+C+"]";m.dataPathArr[w]=C;var ie=e.validate(m);m.baseId=Y,e.util.varOccurences(ie,B)<2?i+=" "+e.util.varReplace(ie,B,Se)+" ":i+=" var "+B+" = "+Se+"; "+ie+" ",c&&(i+=" if (!"+y+") break; "),i+=" } ",c&&(i+=" else "+y+" = true; "),i+=" } ",c&&(i+=" if ("+y+") { ",E+="}")}}}return c&&(i+=" "+E+" if ("+h+" == errors) {"),i}});var aut=b((GXr,sut)=>{"use strict";sut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e),E="";m.level++;var y="valid"+m.level;if(i+="var "+h+" = errors;",e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all)){m.schema=a,m.schemaPath=l,m.errSchemaPath=u;var C="key"+o,_="idx"+o,w="i"+o,B="' + "+C+" + '",R=m.dataLevel=e.dataLevel+1,F="data"+R,q="dataProperties"+o,J=e.opts.ownProperties,j=e.baseId;J&&(i+=" var "+q+" = undefined; "),J?i+=" "+q+" = "+q+" || Object.keys("+d+"); for (var "+_+"=0; "+_+"<"+q+".length; "+_+"++) { var "+C+" = "+q+"["+_+"]; ":i+=" for (var "+C+" in "+d+") { ",i+=" var startErrs"+o+" = errors; ";var L=C,K=e.compositeRule;e.compositeRule=m.compositeRule=!0;var U=e.validate(m);m.baseId=j,e.util.varOccurences(U,F)<2?i+=" "+e.util.varReplace(U,F,L)+" ":i+=" var "+F+" = "+L+"; "+U+" ",e.compositeRule=m.compositeRule=K,i+=" if (!"+y+") { for (var "+w+"=startErrs"+o+"; "+w+"<errors; "+w+"++) { vErrors["+w+"].propertyName = "+C+"; } var err = ",e.createErrors!==!1?(i+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { propertyName: '"+B+"' } ",e.opts.messages!==!1&&(i+=" , message: 'property name \\'"+B+"\\' is invalid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),c&&(i+=" break; "),i+=" } }"}return c&&(i+=" "+E+" if ("+h+" == errors) {"),i}});var uut=b((HXr,lut)=>{"use strict";lut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a;var y="schema"+o;if(!m)if(a.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var C=[],_=a;if(_)for(var w,B=-1,R=_.length-1;B<R;){w=_[B+=1];var F=e.schema.properties[w];F&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))||(C[C.length]=w)}}else var C=a;if(m||C.length){var q=e.errorPath,J=m||C.length>=e.opts.loopRequired,j=e.opts.ownProperties;if(c)if(i+=" var missing"+o+"; ",J){m||(i+=" var "+y+" = validate.schema"+l+"; ");var L="i"+o,K="schema"+o+"["+L+"]",U="' + "+K+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(q,K,e.opts.jsonPointers)),i+=" var "+h+" = true; ",m&&(i+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),i+=" for (var "+L+" = 0; "+L+" < "+y+".length; "+L+"++) { "+h+" = "+d+"["+y+"["+L+"]] !== undefined ",j&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", "+y+"["+L+"]) "),i+="; if (!"+h+") break; } ",m&&(i+=" } "),i+=" if (!"+h+") { ";var se=se||[];se.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var V=i;i=se.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+V+"]); ":i+=" validate.errors = ["+V+"]; return false; ":i+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var O=C;if(O)for(var Y,L=-1,ee=O.length-1;L<ee;){Y=O[L+=1],L&&(i+=" || ");var ne=e.util.getProperty(Y),Ae=d+ne;i+=" ( ( "+Ae+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(Y)+"') "),i+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?Y:ne)+") ) "}i+=") { ";var K="missing"+o,U="' + "+K+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(q,K,!0):q+" + "+K);var se=se||[];se.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var V=i;i=se.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+V+"]); ":i+=" validate.errors = ["+V+"]; return false; ":i+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(J){m||(i+=" var "+y+" = validate.schema"+l+"; ");var L="i"+o,K="schema"+o+"["+L+"]",U="' + "+K+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(q,K,e.opts.jsonPointers)),m&&(i+=" if ("+y+" && !Array.isArray("+y+")) { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+y+" !== undefined) { "),i+=" for (var "+L+" = 0; "+L+" < "+y+".length; "+L+"++) { if ("+d+"["+y+"["+L+"]] === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", "+y+"["+L+"]) "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(i+=" } ")}else{var ve=C;if(ve)for(var Y,De=-1,Ue=ve.length-1;De<Ue;){Y=ve[De+=1];var ne=e.util.getProperty(Y),U=e.util.escapeQuotes(Y),Ae=d+ne;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,Y,e.opts.jsonPointers)),i+=" if ( "+Ae+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(Y)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=q}else c&&(i+=" if (true) {");return i}});var dut=b((qXr,cut)=>{"use strict";cut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;if(m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a,(a||m)&&e.opts.uniqueItems!==!1){m&&(i+=" var "+h+"; if ("+E+" === false || "+E+" === undefined) "+h+" = true; else if (typeof "+E+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+d+".length , "+h+" = true , j; if (i > 1) { ";var y=e.schema.items&&e.schema.items.type,C=Array.isArray(y);if(!y||y=="object"||y=="array"||C&&(y.indexOf("object")>=0||y.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var _="checkDataType"+(C?"s":"");i+=" if ("+e.util[_](y,"item",e.opts.strictNumbers,!0)+") continue; ",C&&(i+=` if (typeof item == 'string') item = '"' + item; `),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",m&&(i+=" } "),i+=" if (!"+h+") { ";var w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",m?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var B=i;i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+B+"]); ":i+=" validate.errors = ["+B+"]; return false; ":i+=" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var put=b((VXr,fut)=>{"use strict";fut.exports={$ref:Ilt(),allOf:blt(),anyOf:wlt(),$comment:Blt(),const:Olt(),contains:Flt(),dependencies:Plt(),enum:klt(),format:Glt(),if:qlt(),items:$lt(),maximum:A_e(),minimum:A_e(),maxItems:g_e(),minItems:g_e(),maxLength:E_e(),minLength:E_e(),maxProperties:y_e(),minProperties:y_e(),multipleOf:Klt(),not:Zlt(),oneOf:tut(),pattern:rut(),properties:out(),propertyNames:aut(),required:uut(),uniqueItems:dut(),validate:h_e()}});var Aut=b(($Xr,mut)=>{"use strict";var hut=put(),C_e=QN().toHash;mut.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],n=["type","$comment"],r=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],i=["number","integer","string","array","object","boolean","null"];return e.all=C_e(n),e.types=C_e(i),e.forEach(function(o){o.rules=o.rules.map(function(s){var a;if(typeof s=="object"){var l=Object.keys(s)[0];a=s[l],s=l,a.forEach(function(c){n.push(c),e.all[c]=!0})}n.push(s);var u=e.all[s]={keyword:s,code:hut[s],implements:a};return u}),e.all.$comment={keyword:"$comment",code:hut.$comment},o.type&&(e.types[o.type]=o)}),e.keywords=C_e(n.concat(r)),e.custom={},e}});var yut=b((YXr,Eut)=>{"use strict";var gut=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];Eut.exports=function(t,e){for(var n=0;n<e.length;n++){t=JSON.parse(JSON.stringify(t));var r=e[n].split("/"),i=t,o;for(o=1;o<r.length;o++)i=i[r[o]];for(o=0;o<gut.length;o++){var s=gut[o],a=i[s];a&&(i[s]={anyOf:[a,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return t}});var Dut=b((jXr,vut)=>{"use strict";var IPn=aee().MissingRef;vut.exports=Cut;function Cut(t,e,n){var r=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof e=="function"&&(n=e,e=void 0);var i=o(t).then(function(){var a=r._addSchema(t,void 0,e);return a.validate||s(a)});return n&&i.then(function(a){n(null,a)},n),i;function o(a){var l=a.$schema;return l&&!r.getSchema(l)?Cut.call(r,{$ref:l},!0):Promise.resolve()}function s(a){try{return r._compile(a)}catch(u){if(u instanceof IPn)return l(u);throw u}function l(u){var c=u.missingSchema;if(m(c))throw new Error("Schema "+c+" is loaded but "+u.missingRef+" cannot be resolved");var d=r._loadingSchemas[c];return d||(d=r._loadingSchemas[c]=r._opts.loadSchema(c),d.then(h,h)),d.then(function(E){if(!m(c))return o(E).then(function(){m(c)||r.addSchema(E,c,void 0,e)})}).then(function(){return s(a)});function h(){delete r._loadingSchemas[c]}function m(E){return r._refs[E]||r._schemas[E]}}}}});var _ut=b((WXr,Sut)=>{"use strict";Sut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d,h="data"+(s||""),m="valid"+o,E="errs__"+o,y=e.opts.$data&&a&&a.$data,C;y?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",C="schema"+o):C=a;var _=this,w="definition"+o,B=_.definition,R="",F,q,J,j,L;if(y&&B.$data){L="keywordValidate"+o;var K=B.validateSchema;i+=" var "+w+" = RULES.custom['"+n+"'].definition; var "+L+" = "+w+".validate;"}else{if(j=e.useCustomRule(_,a,e.schema,e),!j)return;C="validate.schema"+l,L=j.code,F=B.compile,q=B.inline,J=B.macro}var U=L+".errors",se="i"+o,V="ruleErr"+o,O=B.async;if(O&&!e.async)throw new Error("async keyword in sync schema");if(q||J||(i+=""+U+" = null;"),i+="var "+E+" = errors;var "+m+";",y&&B.$data&&(R+="}",i+=" if ("+C+" === undefined) { "+m+" = true; } else { ",K&&(R+="}",i+=" "+m+" = "+w+".validateSchema("+C+"); if ("+m+") { ")),q)B.statements?i+=" "+j.validate+" ":i+=" "+m+" = "+j.validate+"; ";else if(J){var Y=e.util.copy(e),R="";Y.level++;var ee="valid"+Y.level;Y.schema=j.validate,Y.schemaPath="";var ne=e.compositeRule;e.compositeRule=Y.compositeRule=!0;var Ae=e.validate(Y).replace(/validate\.schema/g,L);e.compositeRule=Y.compositeRule=ne,i+=" "+Ae}else{var ve=ve||[];ve.push(i),i="",i+=" "+L+".call( ",e.opts.passContext?i+="this":i+="self",F||B.schema===!1?i+=" , "+h+" ":i+=" , "+C+" , "+h+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var De=s?"data"+(s-1||""):"parentData",Ue=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+De+" , "+Ue+" , rootData ) ";var qe=i;i=ve.pop(),B.errors===!1?(i+=" "+m+" = ",O&&(i+="await "),i+=""+qe+"; "):O?(U="customErrors"+o,i+=" var "+U+" = null; try { "+m+" = await "+qe+"; } catch (e) { "+m+" = false; if (e instanceof ValidationError) "+U+" = e.errors; else throw e; } "):i+=" "+U+" = null; "+m+" = "+qe+"; "}if(B.modifying&&(i+=" if ("+De+") "+h+" = "+De+"["+Ue+"];"),i+=""+R,B.valid)c&&(i+=" if (true) { ");else{i+=" if ( ",B.valid===void 0?(i+=" !",J?i+=""+ee:i+=""+m):i+=" "+!B.valid+" ",i+=") { ",d=_.keyword;var ve=ve||[];ve.push(i),i="";var ve=ve||[];ve.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+_.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+_.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var Ie=i;i=ve.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+Ie+"]); ":i+=" validate.errors = ["+Ie+"]; return false; ":i+=" var err = "+Ie+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var xe=i;i=ve.pop(),q?B.errors?B.errors!="full"&&(i+=" for (var "+se+"="+E+"; "+se+"<errors; "+se+"++) { var "+V+" = vErrors["+se+"]; if ("+V+".dataPath === undefined) "+V+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+V+".schemaPath === undefined) { "+V+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+V+".schema = "+C+"; "+V+".data = "+h+"; "),i+=" } "):B.errors===!1?i+=" "+xe+" ":(i+=" if ("+E+" == errors) { "+xe+" } else { for (var "+se+"="+E+"; "+se+"<errors; "+se+"++) { var "+V+" = vErrors["+se+"]; if ("+V+".dataPath === undefined) "+V+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+V+".schemaPath === undefined) { "+V+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+V+".schema = "+C+"; "+V+".data = "+h+"; "),i+=" } } "):J?(i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+_.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+_.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):B.errors===!1?i+=" "+xe+" ":(i+=" if (Array.isArray("+U+")) { if (vErrors === null) vErrors = "+U+"; else vErrors = vErrors.concat("+U+"); errors = vErrors.length; for (var "+se+"="+E+"; "+se+"<errors; "+se+"++) { var "+V+" = vErrors["+se+"]; if ("+V+".dataPath === undefined) "+V+".dataPath = (dataPath || '') + "+e.errorPath+"; "+V+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+V+".schema = "+C+"; "+V+".data = "+h+"; "),i+=" } } else { "+xe+" } "),i+=" } ",c&&(i+=" else { ")}return i}});var v_e=b((zXr,TPn)=>{TPn.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 but=b((JXr,Tut)=>{"use strict";var Iut=v_e();Tut.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Iut.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Iut.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}});var wut=b((KXr,xut)=>{"use strict";var bPn=/^[a-z_$][a-z0-9_$-]*$/i,xPn=_ut(),wPn=but();xut.exports={add:RPn,get:BPn,remove:NPn,validate:D_e};function RPn(t,e){var n=this.RULES;if(n.keywords[t])throw new Error("Keyword "+t+" is already defined");if(!bPn.test(t))throw new Error("Keyword "+t+" is not a valid identifier");if(e){this.validateKeyword(e,!0);var r=e.type;if(Array.isArray(r))for(var i=0;i<r.length;i++)s(t,r[i],e);else s(t,r,e);var o=e.metaSchema;o&&(e.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),e.validateSchema=this.compile(o,!0))}n.keywords[t]=n.all[t]=!0;function s(a,l,u){for(var c,d=0;d<n.length;d++){var h=n[d];if(h.type==l){c=h;break}}c||(c={type:l,rules:[]},n.push(c));var m={keyword:a,definition:u,custom:!0,code:xPn,implements:u.implements};c.rules.push(m),n.custom[a]=m}return this}function BPn(t){var e=this.RULES.custom[t];return e?e.definition:this.RULES.keywords[t]||!1}function NPn(t){var e=this.RULES;delete e.keywords[t],delete e.all[t],delete e.custom[t];for(var n=0;n<e.length;n++)for(var r=e[n].rules,i=0;i<r.length;i++)if(r[i].keyword==t){r.splice(i,1);break}return this}function D_e(t,e){D_e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(wPn,!0);if(n(t))return!0;if(D_e.errors=n.errors,e)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}});var Rut=b((XXr,OPn)=>{OPn.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Uut=b((ZXr,kut)=>{"use strict";var Nut=ult(),kN=see(),MPn=dlt(),Out=a_e(),FPn=p_e(),LPn=Slt(),PPn=Aut(),Mut=yut(),Fut=QN();kut.exports=hc;hc.prototype.validate=kPn;hc.prototype.compile=UPn;hc.prototype.addSchema=GPn;hc.prototype.addMetaSchema=HPn;hc.prototype.validateSchema=qPn;hc.prototype.getSchema=$Pn;hc.prototype.removeSchema=jPn;hc.prototype.addFormat=t5n;hc.prototype.errorsText=e5n;hc.prototype._addSchema=WPn;hc.prototype._compile=zPn;hc.prototype.compileAsync=Dut();var mee=wut();hc.prototype.addKeyword=mee.add;hc.prototype.getKeyword=mee.get;hc.prototype.removeKeyword=mee.remove;hc.prototype.validateKeyword=mee.validate;var Lut=aee();hc.ValidationError=Lut.Validation;hc.MissingRefError=Lut.MissingRef;hc.$dataMetaSchema=Mut;var hee="http://json-schema.org/draft-07/schema",But=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],QPn=["/properties"];function hc(t){if(!(this instanceof hc))return new hc(t);t=this._opts=Fut.copy(t)||{},a5n(this),this._schemas={},this._refs={},this._fragments={},this._formats=LPn(t.format),this._cache=t.cache||new MPn,this._loadingSchemas={},this._compilations=[],this.RULES=PPn(),this._getId=JPn(t),t.loopRequired=t.loopRequired||1/0,t.errorDataPath=="property"&&(t._errorDataPathProperty=!0),t.serialize===void 0&&(t.serialize=FPn),this._metaOpts=s5n(this),t.formats&&i5n(this),t.keywords&&o5n(this),n5n(this),typeof t.meta=="object"&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),r5n(this)}function kPn(t,e){var n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error('no schema with key or ref "'+t+'"')}else{var r=this._addSchema(t);n=r.validate||this._compile(r)}var i=n(e);return n.$async!==!0&&(this.errors=n.errors),i}function UPn(t,e){var n=this._addSchema(t,void 0,e);return n.validate||this._compile(n)}function GPn(t,e,n,r){if(Array.isArray(t)){for(var i=0;i<t.length;i++)this.addSchema(t[i],void 0,n,r);return this}var o=this._getId(t);if(o!==void 0&&typeof o!="string")throw new Error("schema id must be string");return e=kN.normalizeId(e||o),Qut(this,e),this._schemas[e]=this._addSchema(t,n,r,!0),this}function HPn(t,e,n){return this.addSchema(t,e,n,!0),this}function qPn(t,e){var n=t.$schema;if(n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this._opts.defaultMeta||VPn(this),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var r=this.validate(n,t);if(!r&&e){var i="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(i);else throw new Error(i)}return r}function VPn(t){var e=t._opts.meta;return t._opts.defaultMeta=typeof e=="object"?t._getId(e)||e:t.getSchema(hee)?hee:void 0,t._opts.defaultMeta}function $Pn(t){var e=Put(this,t);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return YPn(this,t)}}function YPn(t,e){var n=kN.schema.call(t,{schema:{}},e);if(n){var r=n.schema,i=n.root,o=n.baseId,s=Nut.call(t,r,i,void 0,o);return t._fragments[e]=new Out({ref:e,fragment:!0,schema:r,root:i,baseId:o,validate:s}),s}}function Put(t,e){return e=kN.normalizeId(e),t._schemas[e]||t._refs[e]||t._fragments[e]}function jPn(t){if(t instanceof RegExp)return pee(this,this._schemas,t),pee(this,this._refs,t),this;switch(typeof t){case"undefined":return pee(this,this._schemas),pee(this,this._refs),this._cache.clear(),this;case"string":var e=Put(this,t);return e&&this._cache.del(e.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":var n=this._opts.serialize,r=n?n(t):t;this._cache.del(r);var i=this._getId(t);i&&(i=kN.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this}function pee(t,e,n){for(var r in e){var i=e[r];!i.meta&&(!n||n.test(r))&&(t._cache.del(i.cacheKey),delete e[r])}}function WPn(t,e,n,r){if(typeof t!="object"&&typeof t!="boolean")throw new Error("schema should be object or boolean");var i=this._opts.serialize,o=i?i(t):t,s=this._cache.get(o);if(s)return s;r=r||this._opts.addUsedSchema!==!1;var a=kN.normalizeId(this._getId(t));a&&r&&Qut(this,a);var l=this._opts.validateSchema!==!1&&!e,u;l&&!(u=a&&a==kN.normalizeId(t.$schema))&&this.validateSchema(t,!0);var c=kN.ids.call(this,t),d=new Out({id:a,schema:t,localRefs:c,cacheKey:o,meta:n});return a[0]!="#"&&r&&(this._refs[a]=d),this._cache.put(o,d),l&&u&&this.validateSchema(t,!0),d}function zPn(t,e){if(t.compiling)return t.validate=i,i.schema=t.schema,i.errors=null,i.root=e||i,t.schema.$async===!0&&(i.$async=!0),i;t.compiling=!0;var n;t.meta&&(n=this._opts,this._opts=this._metaOpts);var r;try{r=Nut.call(this,t.schema,e,t.localRefs)}catch(o){throw delete t.validate,o}finally{t.compiling=!1,t.meta&&(this._opts=n)}return t.validate=r,t.refs=r.refs,t.refVal=r.refVal,t.root=r.root,r;function i(){var o=t.validate,s=o.apply(this,arguments);return i.errors=o.errors,s}}function JPn(t){switch(t.schemaId){case"auto":return ZPn;case"id":return KPn;default:return XPn}}function KPn(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function XPn(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function ZPn(t){if(t.$id&&t.id&&t.$id!=t.id)throw new Error("schema $id is different from id");return t.$id||t.id}function e5n(t,e){if(t=t||this.errors,!t)return"No errors";e=e||{};for(var n=e.separator===void 0?", ":e.separator,r=e.dataVar===void 0?"data":e.dataVar,i="",o=0;o<t.length;o++){var s=t[o];s&&(i+=r+s.dataPath+" "+s.message+n)}return i.slice(0,-n.length)}function t5n(t,e){return typeof e=="string"&&(e=new RegExp(e)),this._formats[t]=e,this}function n5n(t){var e;if(t._opts.$data&&(e=Rut(),t.addMetaSchema(e,e.$id,!0)),t._opts.meta!==!1){var n=v_e();t._opts.$data&&(n=Mut(n,QPn)),t.addMetaSchema(n,hee,!0),t._refs["http://json-schema.org/schema"]=hee}}function r5n(t){var e=t._opts.schemas;if(e)if(Array.isArray(e))t.addSchema(e);else for(var n in e)t.addSchema(e[n],n)}function i5n(t){for(var e in t._opts.formats){var n=t._opts.formats[e];t.addFormat(e,n)}}function o5n(t){for(var e in t._opts.keywords){var n=t._opts.keywords[e];t.addKeyword(e,n)}}function Qut(t,e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function s5n(t){for(var e=Fut.copy(t._opts),n=0;n<But.length;n++)delete e[But[n]];return e}function a5n(t){var e=t._opts.logger;if(e===!1)t.logger={log:S_e,warn:S_e,error:S_e};else{if(e===void 0&&(e=console),!(typeof e=="object"&&e.log&&e.warn&&e.error))throw new Error("logger must implement log, warn and error methods");t.logger=e}}function S_e(){}});var Gut,mx,Aee=Le(()=>{kat();dx();Gut=Qe(Uut(),1),mx=class extends XZ{constructor(e,n){var r;super(n),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=(r=n?.capabilities)!==null&&r!==void 0?r:{},this._ajv=new Gut.default}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Qat(this._capabilities,e)}assertCapability(e,n){var r;if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r[e]))throw new Error(`Server does not support ${e} (required for ${n})`)}async connect(e,n){if(await super.connect(e),e.sessionId===void 0)try{let r=await this.request({method:"initialize",params:{protocolVersion:K8,capabilities:this._capabilities,clientInfo:this._clientInfo}},$Se,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!Cat.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"})}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var n,r,i,o,s;switch(e){case"logging/setLevel":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((i=this._serverCapabilities)===null||i===void 0)&&i.resources))throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(!((o=this._serverCapabilities)===null||o===void 0)&&o.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.completions))throw new Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){var n;switch(e){case"notifications/roots/list_changed":if(!(!((n=this._capabilities.roots)===null||n===void 0)&&n.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"ping":break}}async ping(e){return this.request({method:"ping"},PN,e)}async complete(e,n){return this.request({method:"completion/complete",params:e},ZSe,n)}async setLoggingLevel(e,n){return this.request({method:"logging/setLevel",params:{level:e}},PN,n)}async getPrompt(e,n){return this.request({method:"prompts/get",params:e},EG,n)}async listPrompts(e,n){return this.request({method:"prompts/list",params:e},gG,n)}async listResources(e,n){return this.request({method:"resources/list",params:e},YSe,n)}async listResourceTemplates(e,n){return this.request({method:"resources/templates/list",params:e},jSe,n)}async readResource(e,n){return this.request({method:"resources/read",params:e},WSe,n)}async subscribeResource(e,n){return this.request({method:"resources/subscribe",params:e},PN,n)}async unsubscribeResource(e,n){return this.request({method:"resources/unsubscribe",params:e},PN,n)}async callTool(e,n=KZ,r){let i=await this.request({method:"tools/call",params:e},n,r),o=this.getToolOutputValidator(e.name);if(o){if(!i.structuredContent&&!i.isError)throw new xy(by.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent)try{if(!o(i.structuredContent))throw new xy(by.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(o.errors)}`)}catch(s){throw s instanceof xy?s:new xy(by.InvalidParams,`Failed to validate structured content: ${s instanceof Error?s.message:String(s)}`)}}return i}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(let n of e)if(n.outputSchema)try{let r=this._ajv.compile(n.outputSchema);this._cachedToolOutputValidators.set(n.name,r)}catch{}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,n){let r=await this.request({method:"tools/list",params:e},XSe,n);return this.cacheToolOutputSchemas(r.tools),r}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});var Yut=b((rZr,$ut)=>{$ut.exports=Vut;Vut.sync=u5n;var Hut=we("fs");function l5n(t,e){var n=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function qut(t,e,n){return!t.isSymbolicLink()&&!t.isFile()?!1:l5n(e,n)}function Vut(t,e,n){Hut.stat(t,function(r,i){n(r,r?!1:qut(i,t,e))})}function u5n(t,e){return qut(Hut.statSync(t),t,e)}});var Kut=b((iZr,Jut)=>{Jut.exports=Wut;Wut.sync=c5n;var jut=we("fs");function Wut(t,e,n){jut.stat(t,function(r,i){n(r,r?!1:zut(i,e))})}function c5n(t,e){return zut(jut.statSync(t),e)}function zut(t,e){return t.isFile()&&d5n(t,e)}function d5n(t,e){var n=t.mode,r=t.uid,i=t.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),u=parseInt("001",8),c=a|l,d=n&u||n&l&&i===s||n&a&&r===o||n&c&&o===0;return d}});var Zut=b((sZr,Xut)=>{var oZr=we("fs"),gee;process.platform==="win32"||global.TESTING_WINDOWS?gee=Yut():gee=Kut();Xut.exports=__e;__e.sync=f5n;function __e(t,e,n){if(typeof e=="function"&&(n=e,e={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){__e(t,e||{},function(o,s){o?i(o):r(s)})})}gee(t,e||{},function(r,i){r&&(r.code==="EACCES"||e&&e.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function f5n(t,e){try{return gee.sync(t,e||{})}catch(n){if(e&&e.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var sct=b((aZr,oct)=>{var Z8=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ect=we("path"),p5n=Z8?";":":",tct=Zut(),nct=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),rct=(t,e)=>{let n=e.colon||p5n,r=t.match(/\//)||Z8&&t.match(/\\/)?[""]:[...Z8?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(n)],i=Z8?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Z8?i.split(n):[""];return Z8&&t.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},ict=(t,e,n)=>{typeof e=="function"&&(n=e,e={}),e||(e={});let{pathEnv:r,pathExt:i,pathExtExe:o}=rct(t,e),s=[],a=u=>new Promise((c,d)=>{if(u===r.length)return e.all&&s.length?c(s):d(nct(t));let h=r[u],m=/^".*"$/.test(h)?h.slice(1,-1):h,E=ect.join(m,t),y=!m&&/^\.[\\\/]/.test(t)?t.slice(0,2)+E:E;c(l(y,u,0))}),l=(u,c,d)=>new Promise((h,m)=>{if(d===i.length)return h(a(c+1));let E=i[d];tct(u+E,{pathExt:o},(y,C)=>{if(!y&&C)if(e.all)s.push(u+E);else return h(u+E);return h(l(u,c,d+1))})});return n?a(0).then(u=>n(null,u),n):a(0)},h5n=(t,e)=>{e=e||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=rct(t,e),o=[];for(let s=0;s<n.length;s++){let a=n[s],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=ect.join(l,t),c=!l&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let d=0;d<r.length;d++){let h=c+r[d];try{if(tct.sync(h,{pathExt:i}))if(e.all)o.push(h);else return h}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw nct(t)};oct.exports=ict;ict.sync=h5n});var lct=b((lZr,I_e)=>{"use strict";var act=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};I_e.exports=act;I_e.exports.default=act});var fct=b((uZr,dct)=>{"use strict";var uct=we("path"),m5n=sct(),A5n=lct();function cct(t,e){let n=t.options.env||process.env,r=process.cwd(),i=t.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(t.options.cwd)}catch{}let s;try{s=m5n.sync(t.command,{path:n[A5n({env:n})],pathExt:e?uct.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=uct.resolve(i?t.options.cwd:"",s)),s}function g5n(t){return cct(t)||cct(t,!0)}dct.exports=g5n});var pct=b((cZr,b_e)=>{"use strict";var T_e=/([()\][%!^"`<>&|;, *?])/g;function E5n(t){return t=t.replace(T_e,"^$1"),t}function y5n(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(T_e,"^$1"),e&&(t=t.replace(T_e,"^$1")),t}b_e.exports.command=E5n;b_e.exports.argument=y5n});var mct=b((dZr,hct)=>{"use strict";hct.exports=/^#!(.*)/});var gct=b((fZr,Act)=>{"use strict";var C5n=mct();Act.exports=(t="")=>{let e=t.match(C5n);if(!e)return null;let[n,r]=e[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var yct=b((pZr,Ect)=>{"use strict";var x_e=we("fs"),v5n=gct();function D5n(t){let n=Buffer.alloc(150),r;try{r=x_e.openSync(t,"r"),x_e.readSync(r,n,0,150,0),x_e.closeSync(r)}catch{}return v5n(n.toString())}Ect.exports=D5n});var Sct=b((hZr,Dct)=>{"use strict";var S5n=we("path"),Cct=fct(),vct=pct(),_5n=yct(),I5n=process.platform==="win32",T5n=/\.(?:com|exe)$/i,b5n=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function x5n(t){t.file=Cct(t);let e=t.file&&_5n(t.file);return e?(t.args.unshift(t.file),t.command=e,Cct(t)):t.file}function w5n(t){if(!I5n)return t;let e=x5n(t),n=!T5n.test(e);if(t.options.forceShell||n){let r=b5n.test(e);t.command=S5n.normalize(t.command),t.command=vct.command(t.command),t.args=t.args.map(o=>vct.argument(o,r));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function R5n(t,e,n){e&&!Array.isArray(e)&&(n=e,e=null),e=e?e.slice(0):[],n=Object.assign({},n);let r={command:t,args:e,options:n,file:void 0,original:{command:t,args:e}};return n.shell?r:w5n(r)}Dct.exports=R5n});var Tct=b((mZr,Ict)=>{"use strict";var w_e=process.platform==="win32";function R_e(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function B5n(t,e){if(!w_e)return;let n=t.emit;t.emit=function(r,i){if(r==="exit"){let o=_ct(i,e);if(o)return n.call(t,"error",o)}return n.apply(t,arguments)}}function _ct(t,e){return w_e&&t===1&&!e.file?R_e(e.original,"spawn"):null}function N5n(t,e){return w_e&&t===1&&!e.file?R_e(e.original,"spawnSync"):null}Ict.exports={hookChildProcess:B5n,verifyENOENT:_ct,verifyENOENTSync:N5n,notFoundError:R_e}});var wct=b((AZr,eL)=>{"use strict";var bct=we("child_process"),B_e=Sct(),N_e=Tct();function xct(t,e,n){let r=B_e(t,e,n),i=bct.spawn(r.command,r.args,r.options);return N_e.hookChildProcess(i,r),i}function O5n(t,e,n){let r=B_e(t,e,n),i=bct.spawnSync(r.command,r.args,r.options);return i.error=i.error||N_e.verifyENOENTSync(i.status,r),i}eL.exports=xct;eL.exports.spawn=xct;eL.exports.sync=O5n;eL.exports._parse=B_e;eL.exports._enoent=N_e});function M5n(t){return cx.parse(JSON.parse(t))}function Rct(t){return JSON.stringify(t)+`
|
|
544
|
+
\u8BF7\u76F4\u63A5\u8F93\u51FA\u4E00\u4E2A\u6B63\u786E\u7684json\u683C\u5F0F\uFF1A`;try{let r=await fetch("https://apis.iflow.cn/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({model:"QWen3-4B",messages:[{role:"user",content:n}],temperature:.1,max_tokens:1e3})});if(!r.ok)throw new Error(`QWen API error: ${r.status}`);let o=(await r.json()).choices[0].message.content.trim();return o.startsWith("```json")?o=o.replace(/^```json\s*/,"").replace(/\s*```$/,""):o.startsWith("```")&&(o=o.replace(/^```\s*/,"").replace(/\s*```$/,"")),JSON.parse(o)}catch(r){throw NC(r),console.error("QWen JSON fix failed:",r),r}}extractTextFromRequest(e){let n="";if(e.contents){let r=Array.isArray(e.contents)?e.contents:[e.contents];for(let i of r)if(i&&typeof i=="object"&&"parts"in i&&i.parts){let o=Array.isArray(i.parts)?i.parts:[i.parts];for(let s of o)if(s&&typeof s=="object"&&"text"in s&&s.text)n+=s.text+" ";else if(s.functionResponse&&s.functionResponse.response)for(let[a,l]of Object.entries(s.functionResponse.response))l!=null&&(n+=String(l)+" ")}}return n.trim()}extractTextFromEmbedRequest(e){if(e.contents){let n=Array.isArray(e.contents)?e.contents:[e.contents];for(let r of n)if(typeof r=="object"&&r!==null&&"parts"in r&&r.parts){let i=Array.isArray(r.parts)?r.parts:[r.parts];for(let o of i)if(typeof o=="object"&&o!==null&&"text"in o&&o.text)return o.text}else{if(typeof r=="string")return r;if(typeof r=="object"&&r!==null&&"text"in r&&r.text)return r.text}}return""}extractSystemInstruction(e){let n="";if(typeof e=="string")n=e;else if(Array.isArray(e)){for(let r of e)typeof r=="object"&&r!==null&&"text"in r&&r.text&&(n+=r.text+" ");n=n.trim()}else if(typeof e=="object"&&e!==null)if("parts"in e&&e.parts){let r=Array.isArray(e.parts)?e.parts:[e.parts];for(let i of r)typeof i=="object"&&i!==null&&"text"in i&&i.text&&(n+=i.text+" ");n=n.trim()}else"text"in e&&e.text&&(n=e.text);return n}convertToOpenAITools(e){if(!e||e.length===0)return[];let n=[];for(let r of e)if(r.functionDeclarations&&Array.isArray(r.functionDeclarations))for(let i of r.functionDeclarations)n.push({type:"function",function:{name:i.name||"",description:i.description,parameters:this.convertParameters(i.parameters||i.parametersJsonSchema)}});return n}convertParameters(e){if(!e)return;let n={STRING:"string",INTEGER:"integer",NUMBER:"number",BOOLEAN:"boolean",OBJECT:"object",ARRAY:"array"};if(typeof e=="object"&&e.type){if(typeof e.type=="string"&&(n[e.type]?e.type=n[e.type]:e.type=e.type.toLowerCase()),e.properties)for(let i in e.properties){let o=e.properties[i],s={};o.type&&(s.type=n[o.type]),o.description&&(s.description=o.description),e.properties[i]=s}return e.items&&(e.items=this.convertParameters(e.items)),e}let r=i=>{if(!i)return;let o={};if(i.type)switch(i.type){case"STRING":o.type="string";break;case"INTEGER":o.type="integer";break;case"NUMBER":o.type="number";break;case"BOOLEAN":o.type="boolean";break;case"OBJECT":o.type="object";break;case"ARRAY":o.type="array";break;default:o.type=i.type.toLowerCase()}if(o.type="object",i.description&&(o.description=i.description),i.enum&&(o.enum=i.enum),i.properties){o.properties={};for(let[s,a]of Object.entries(i.properties))o.properties[s]=r(a)}return i.items&&(o.items=r(i.items)),i.required&&(o.required=i.required),o};return r(e)}mapFinishReason(e){switch(e){case"stop":return qb.STOP;case"length":return qb.MAX_TOKENS;case"content_filter":return qb.SAFETY;case"tool_calls":return qb.MALFORMED_FUNCTION_CALL;default:return qb.OTHER}}convertResponseSchema(e){if(e)return e.type==="object"||e.type==="OBJECT"?{type:"json_schema",json_schema:{name:e.name||"",description:e.description||"",schema:this.convertSchemaToJsonSchema(e),strict:!0}}:{type:"json_schema",json_schema:{name:"response_schema",description:"Generated response schema",schema:this.convertSchemaToJsonSchema(e),strict:!0}}}convertSchemaToJsonSchema(e){if(!e)return{};let n={};if(e.type)switch(e.type){case"STRING":n.type="string";break;case"INTEGER":n.type="integer";break;case"NUMBER":n.type="number";break;case"BOOLEAN":n.type="boolean";break;case"OBJECT":n.type="object";break;case"ARRAY":n.type="array";break;default:n.type=typeof e.type=="string"?e.type.toLowerCase():e.type}if(e.description&&(n.description=e.description),e.enum&&(n.enum=e.enum),e.properties){n.properties={};for(let[r,i]of Object.entries(e.properties))n.properties[r]=this.convertSchemaToJsonSchema(i)}return e.items&&(n.items=this.convertSchemaToJsonSchema(e.items)),e.required&&(n.required=e.required),n.type==="object"&&!("additionalProperties"in n)&&(n.additionalProperties=!1),n}}});function SFn(t){return t.replace(/([a-z])([A-Z])/g,"$1_$2").toUpperCase()}function oS(t){let e=SFn(t),n=`IFLOW_${t}`;if(process.env[n])return process.env[n];let r=`IFLOW_${e}`;if(process.env[r])return process.env[r];let i=`iflow_${t}`;if(process.env[i])return process.env[i];let o=`iflow_${e}`;if(process.env[o])return process.env[o]}function sG(){return oS("apiKey")}function aG(){return oS("baseUrl")||oS("url")}function lG(){return oS("modelName")||oS("model")}function nat(t){let e=oS(t);if(e===void 0)return;let n=e.toLowerCase();if(n==="true"||n==="1"||n==="yes")return!0;if(n==="false"||n==="0"||n==="no")return!1}function rat(t){let e=oS(t);if(e===void 0)return;let n=Number(e);return isNaN(n)?void 0:n}function iat(t){let e=oS(t);if(e!==void 0)return e.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function MZ(){return!!(sG()||aG()||lG())}function FSe(){let t={},e=["theme","selectedAuthType","sandbox","toolDiscoveryCommand","toolCallCommand","mcpServerCommand","contextFileName","preferredEditor","apiKey","baseUrl","modelName","searchApiKey","multimodalModelName","memoryImportFormat"],n=["useExternalAuth","showMemoryUsage","usageStatisticsEnabled","autoConfigureMaxOldSpaceSize","hideWindowTitle","hideTips","hideBanner","vimMode","ideModeFeature","ideMode","disableAutoUpdate"],r=["maxSessionTurns","memoryDiscoveryMaxDirs"],i=["coreTools","excludeTools","allowMCPServers","excludeMCPServers"];return e.forEach(o=>{let s=oS(o);s!==void 0&&(t[o]=s)}),n.forEach(o=>{let s=nat(o);s!==void 0&&(t[o]=s)}),r.forEach(o=>{let s=rat(o);s!==void 0&&(t[o]=s)}),i.forEach(o=>{let s=iat(o);s!==void 0&&(t[o]=s)}),t}function _Fn(){return{apiKey:sG(),baseUrl:aG(),model:lG()}}var LSe=Le(()=>{"use strict";});function PSe(t,e,n){let r=process.env.GEMINI_API_KEY,i=process.env.GOOGLE_API_KEY,o=process.env.GOOGLE_CLOUD_PROJECT,s=process.env.GOOGLE_CLOUD_LOCATION,a=sG(),l=aG(),u=lG(),c=n?.apiKey||a,d=n?.baseUrl||l||IFn[e],h=t.getModel()||u||wh,m={model:h,authType:e,proxy:t?.getProxy(),multimodalModelName:n?.multimodalModelName,debugMode:t?.getDebugMode()};return e===Sn.LOGIN_WITH_GOOGLE||e===Sn.CLOUD_SHELL?m:e===Sn.USE_GEMINI&&r?(m.apiKey=r,m.vertexai=!1,Yst(m.apiKey,m.model,m.proxy),m):e===Sn.USE_VERTEX_AI&&(i||o&&s)?(m.apiKey=i,m.vertexai=!0,m):([...Vf,Sn.OPENAI_COMPATIBLE].includes(e)&&c&&(m.apiKey=c,m.baseUrl=d,m.model=h),m)}async function QSe(t,e,n){let i={headers:{"User-Agent":`iFlowCLI/0.2.5 (${process.platform}; ${process.arch})`}};if(t.authType&&[...Vf,Sn.IDEA_LAB].includes(t.authType)||t.authType===Sn.OPENAI_COMPATIBLE)return new OZ(t);if(t.authType===Sn.LOGIN_WITH_GOOGLE||t.authType===Sn.CLOUD_SHELL)return U1e(i,t.authType,e,n);if([...Vf,Sn.OPENAI_COMPATIBLE].includes(t.authType)||t.authType===Sn.USE_GEMINI||t.authType===Sn.USE_VERTEX_AI)return new dK({apiKey:t.apiKey===""?void 0:t.apiKey,vertexai:t.vertexai,httpOptions:i}).models;throw new Error(`Error creating contentGenerator: Unsupported authType: ${t.authType}`)}var Sn,Vf,IFn,$I=Le(()=>{"use strict";nl();G1e();_C();jst();tat();LSe();(function(t){t.LOGIN_WITH_GOOGLE="oauth-personal",t.USE_GEMINI="gemini-api-key",t.USE_VERTEX_AI="vertex-ai",t.CLOUD_SHELL="cloud-shell",t.IFLOW="iflow",t.IDEA_LAB="idealab",t.OPENAI_COMPATIBLE="openai-compatible"})(Sn||(Sn={}));Vf=[Sn.IFLOW,Sn.IDEA_LAB],IFn={[Sn.IDEA_LAB]:"https://idealab.alibaba-inc.com/api/openai/v1",[Sn.IFLOW]:VXe}});var FZ,oat=Le(()=>{"use strict";FZ=class{prompts=new Map;registerPrompt(e){if(this.prompts.has(e.name)){let n=`${e.serverName}_${e.name}`;console.warn(`Prompt with name "${e.name}" is already registered. Renaming to "${n}".`),this.prompts.set(n,{...e,name:n})}else this.prompts.set(e.name,e)}getAllPrompts(){return Array.from(this.prompts.values()).sort((e,n)=>e.name.localeCompare(n.name))}getPrompt(e){return this.prompts.get(e)}getPromptsByServer(e){let n=[];for(let r of this.prompts.values())r.serverName===e&&n.push(r);return n.sort((r,i)=>r.name.localeCompare(i.name))}}});var Io,Rr,To,pc=Le(()=>{"use strict";Io=class{name;displayName;description;icon;parameterSchema;isOutputMarkdown;canUpdateOutput;aliases;constructor(e,n,r,i,o,s=!0,a=!1,l=[]){this.name=e,this.displayName=n,this.description=r,this.icon=i,this.parameterSchema=o,this.isOutputMarkdown=s,this.canUpdateOutput=a,this.aliases=l}get schema(){return{name:this.name,description:this.description,parameters:this.parameterSchema}}validateToolParams(e){return null}getDescription(e){return JSON.stringify(e)}shouldConfirmExecute(e,n){return Promise.resolve(!1)}toolLocations(e){return[]}};(function(t){t.ProceedOnce="proceed_once",t.ProceedAlways="proceed_always",t.ProceedAlwaysServer="proceed_always_server",t.ProceedAlwaysTool="proceed_always_tool",t.ModifyWithEditor="modify_with_editor",t.Cancel="cancel"})(Rr||(Rr={}));(function(t){t.FileSearch="fileSearch",t.Folder="folder",t.Globe="globe",t.Hammer="hammer",t.LightBulb="lightBulb",t.Pencil="pencil",t.Regex="regex",t.Terminal="terminal"})(To||(To={}))});var os,kSe,Gn,sS,uG=Le(()=>{(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(os||(os={}));(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(kSe||(kSe={}));Gn=os.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sS=t=>{switch(typeof t){case"undefined":return Gn.undefined;case"string":return Gn.string;case"number":return Number.isNaN(t)?Gn.nan:Gn.number;case"boolean":return Gn.boolean;case"function":return Gn.function;case"bigint":return Gn.bigint;case"symbol":return Gn.symbol;case"object":return Array.isArray(t)?Gn.array:t===null?Gn.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Gn.promise:typeof Map<"u"&&t instanceof Map?Gn.map:typeof Set<"u"&&t instanceof Set?Gn.set:typeof Date<"u"&&t instanceof Date?Gn.date:Gn.object;default:return Gn.unknown}}});var ln,TFn,sg,LZ=Le(()=>{uG();ln=os.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"]),TFn=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),sg=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(o){return o.message},r={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){let u=s.path[l];l===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(s))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,os.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];n[o]=n[o]||[],n[o].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};sg.create=t=>new sg(t)});var bFn,u2,USe=Le(()=>{LZ();uG();bFn=(t,e)=>{let n;switch(t.code){case ln.invalid_type:t.received===Gn.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ln.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,os.jsonStringifyReplacer)}`;break;case ln.unrecognized_keys:n=`Unrecognized key(s) in object: ${os.joinValues(t.keys,", ")}`;break;case ln.invalid_union:n="Invalid input";break;case ln.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${os.joinValues(t.options)}`;break;case ln.invalid_enum_value:n=`Invalid enum value. Expected ${os.joinValues(t.options)}, received '${t.received}'`;break;case ln.invalid_arguments:n="Invalid function arguments";break;case ln.invalid_return_type:n="Invalid function return type";break;case ln.invalid_date:n="Invalid date";break;case ln.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:os.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ln.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ln.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ln.custom:n="Invalid input";break;case ln.invalid_intersection_types:n="Intersection results could not be merged";break;case ln.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ln.not_finite:n="Number must be finite";break;default:n=e.defaultError,os.assertNever(t)}return{message:n}},u2=bFn});function xFn(t){sat=t}function q8(){return sat}var sat,PZ=Le(()=>{USe();sat=u2});function Nn(t,e){let n=q8(),r=cG({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===u2?void 0:u2].filter(i=>!!i)});t.common.issues.push(r)}var cG,wFn,Hp,pi,vN,Mh,QZ,kZ,sx,V8,GSe=Le(()=>{PZ();USe();cG=t=>{let{data:e,path:n,errorMaps:r,issueData:i}=t,o=[...n,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",l=r.filter(u=>!!u).slice().reverse();for(let u of l)a=u(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},wFn=[];Hp=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let i of n){if(i.status==="aborted")return pi;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let i of n){let o=await i.key,s=await i.value;r.push({key:o,value:s})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let i of n){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return pi;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:e.value,value:r}}},pi=Object.freeze({status:"aborted"}),vN=t=>({status:"dirty",value:t}),Mh=t=>({status:"valid",value:t}),QZ=t=>t.status==="aborted",kZ=t=>t.status==="dirty",sx=t=>t.status==="valid",V8=t=>typeof Promise<"u"&&t instanceof Promise});var aat=Le(()=>{});var Dr,lat=Le(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Dr||(Dr={}))});function Co(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{let{message:l}=t;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:i}}function fat(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function YFn(t){return new RegExp(`^${fat(t)}$`)}function pat(t){let e=`${dat}T${fat(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function jFn(t,e){return!!((e==="v4"||!e)&&kFn.test(t)||(e==="v6"||!e)&&GFn.test(t))}function WFn(t,e){if(!FFn.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function zFn(t,e){return!!((e==="v4"||!e)&&UFn.test(t)||(e==="v6"||!e)&&HFn.test(t))}function JFn(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}function $8(t){if(t instanceof ag){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=_y.create($8(r))}return new ag({...t._def,shape:()=>e})}else return t instanceof f2?new f2({...t._def,type:$8(t.element)}):t instanceof _y?_y.create($8(t.unwrap())):t instanceof lS?lS.create($8(t.unwrap())):t instanceof aS?aS.create(t.items.map(e=>$8(e))):t}function qSe(t,e){let n=sS(t),r=sS(e);if(t===e)return{valid:!0,data:t};if(n===Gn.object&&r===Gn.object){let i=os.objectKeys(e),o=os.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let l=qSe(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Gn.array&&r===Gn.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],l=qSe(s,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Gn.date&&r===Gn.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function hat(t,e){return new NN({values:t,typeName:Si.ZodEnum,...Co(e)})}function cat(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function mat(t,e={},n){return t?lx.create().superRefine((r,i)=>{let o=t(r);if(o instanceof Promise)return o.then(s=>{if(!s){let a=cat(e,r),l=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:l})}});if(!o){let s=cat(e,r),a=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:a})}}):lx.create()}var Iy,uat,Po,RFn,BFn,NFn,OFn,MFn,FFn,LFn,PFn,QFn,HSe,kFn,UFn,GFn,HFn,qFn,VFn,dat,$Fn,ax,DN,SN,_N,IN,Y8,TN,bN,lx,d2,OC,j8,f2,ag,xN,c2,UZ,wN,aS,GZ,W8,z8,HZ,RN,BN,NN,ON,ux,Ty,_y,lS,MN,FN,J8,KFn,dG,fG,LN,XFn,Si,ZFn,Aat,gat,e8n,t8n,Eat,n8n,r8n,i8n,o8n,s8n,a8n,l8n,u8n,c8n,d8n,f8n,p8n,h8n,m8n,A8n,g8n,E8n,y8n,C8n,v8n,D8n,S8n,_8n,I8n,T8n,b8n,x8n,w8n,R8n,B8n,N8n,O8n,M8n,F8n,yat=Le(()=>{LZ();PZ();lat();GSe();uG();Iy=class{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},uat=(t,e)=>{if(sx(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new sg(t.common.issues);return this._error=n,this._error}}};Po=class{get description(){return this._def.description}_getType(e){return sS(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:sS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Hp,ctx:{common:e.parent.common,data:e.data,parsedType:sS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(V8(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sS(e)},i=this._parseSync({data:e,path:r.path,parent:r});return uat(r,i)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sS(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return sx(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>sx(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sS(e)},i=this._parse({data:e,path:r.path,parent:r}),o=await(V8(i)?i:Promise.resolve(i));return uat(r,o)}refine(e,n){let r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:ln.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Ty({schema:this,typeName:Si.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return _y.create(this,this._def)}nullable(){return lS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return f2.create(this)}promise(){return ux.create(this,this._def)}or(e){return xN.create([this,e],this._def)}and(e){return wN.create(this,e,this._def)}transform(e){return new Ty({...Co(this._def),schema:this,typeName:Si.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new MN({...Co(this._def),innerType:this,defaultValue:n,typeName:Si.ZodDefault})}brand(){return new dG({typeName:Si.ZodBranded,type:this,...Co(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new FN({...Co(this._def),innerType:this,catchValue:n,typeName:Si.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return fG.create(this,e)}readonly(){return LN.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},RFn=/^c[^\s-]{8,}$/i,BFn=/^[0-9a-z]+$/,NFn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,OFn=/^[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,MFn=/^[a-z0-9_-]{21}$/i,FFn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,LFn=/^[-+]?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)?)??$/,PFn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,QFn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",kFn=/^(?:(?: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])$/,UFn=/^(?:(?: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])$/,GFn=/^(([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]))$/,HFn=/^(([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])$/,qFn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,VFn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dat="((\\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])))",$Fn=new RegExp(`^${dat}$`);ax=class t extends Po{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Gn.string){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_type,expected:Gn.string,received:o.parsedType}),pi}let r=new Hp,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?Nn(i,{code:ln.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Nn(i,{code:ln.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")PFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"email",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")HSe||(HSe=new RegExp(QFn,"u")),HSe.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"emoji",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")OFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"uuid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")MFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"nanoid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")RFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"cuid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")BFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"cuid2",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")NFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"ulid",code:ln.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),Nn(i,{validation:"url",code:ln.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"regex",code:ln.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?pat(o).test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?$Fn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?YFn(o).test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?LFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"duration",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?jFn(e.data,o.version)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"ip",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?WFn(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"jwt",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?zFn(e.data,o.version)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"cidr",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?qFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"base64",code:ln.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?VFn.test(e.data)||(i=this._getOrReturnCtx(e,i),Nn(i,{validation:"base64url",code:ln.invalid_string,message:o.message}),r.dirty()):os.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:ln.invalid_string,...Dr.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Dr.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Dr.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Dr.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Dr.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Dr.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Dr.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Dr.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Dr.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Dr.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Dr.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Dr.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Dr.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Dr.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Dr.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Dr.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Dr.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Dr.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Dr.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Dr.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Dr.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Dr.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Dr.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Dr.errToObj(n)})}nonempty(e){return this.min(1,Dr.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};ax.create=t=>new ax({checks:[],typeName:Si.ZodString,coerce:t?.coerce??!1,...Co(t)});DN=class t extends Po{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Gn.number){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_type,expected:Gn.number,received:o.parsedType}),pi}let r,i=new Hp;for(let o of this._def.checks)o.kind==="int"?os.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?JFn(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.not_finite,message:o.message}),i.dirty()):os.assertNever(o);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Dr.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Dr.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Dr.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Dr.toString(n))}setLimit(e,n,r,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Dr.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Dr.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Dr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Dr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Dr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Dr.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Dr.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Dr.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Dr.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Dr.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&os.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};DN.create=t=>new DN({checks:[],typeName:Si.ZodNumber,coerce:t?.coerce||!1,...Co(t)});SN=class t extends Po{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Gn.bigint)return this._getInvalidInput(e);let r,i=new Hp;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Nn(r,{code:ln.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):os.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return Nn(n,{code:ln.invalid_type,expected:Gn.bigint,received:n.parsedType}),pi}gte(e,n){return this.setLimit("min",e,!0,Dr.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Dr.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Dr.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Dr.toString(n))}setLimit(e,n,r,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Dr.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Dr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Dr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Dr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Dr.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Dr.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};SN.create=t=>new SN({checks:[],typeName:Si.ZodBigInt,coerce:t?.coerce??!1,...Co(t)});_N=class extends Po{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Gn.boolean){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.boolean,received:r.parsedType}),pi}return Mh(e.data)}};_N.create=t=>new _N({typeName:Si.ZodBoolean,coerce:t?.coerce||!1,...Co(t)});IN=class t extends Po{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Gn.date){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_type,expected:Gn.date,received:o.parsedType}),pi}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return Nn(o,{code:ln.invalid_date}),pi}let r=new Hp,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),Nn(i,{code:ln.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):os.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Dr.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Dr.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};IN.create=t=>new IN({checks:[],coerce:t?.coerce||!1,typeName:Si.ZodDate,...Co(t)});Y8=class extends Po{_parse(e){if(this._getType(e)!==Gn.symbol){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.symbol,received:r.parsedType}),pi}return Mh(e.data)}};Y8.create=t=>new Y8({typeName:Si.ZodSymbol,...Co(t)});TN=class extends Po{_parse(e){if(this._getType(e)!==Gn.undefined){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.undefined,received:r.parsedType}),pi}return Mh(e.data)}};TN.create=t=>new TN({typeName:Si.ZodUndefined,...Co(t)});bN=class extends Po{_parse(e){if(this._getType(e)!==Gn.null){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.null,received:r.parsedType}),pi}return Mh(e.data)}};bN.create=t=>new bN({typeName:Si.ZodNull,...Co(t)});lx=class extends Po{constructor(){super(...arguments),this._any=!0}_parse(e){return Mh(e.data)}};lx.create=t=>new lx({typeName:Si.ZodAny,...Co(t)});d2=class extends Po{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Mh(e.data)}};d2.create=t=>new d2({typeName:Si.ZodUnknown,...Co(t)});OC=class extends Po{_parse(e){let n=this._getOrReturnCtx(e);return Nn(n,{code:ln.invalid_type,expected:Gn.never,received:n.parsedType}),pi}};OC.create=t=>new OC({typeName:Si.ZodNever,...Co(t)});j8=class extends Po{_parse(e){if(this._getType(e)!==Gn.undefined){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.void,received:r.parsedType}),pi}return Mh(e.data)}};j8.create=t=>new j8({typeName:Si.ZodVoid,...Co(t)});f2=class t extends Po{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==Gn.array)return Nn(n,{code:ln.invalid_type,expected:Gn.array,received:n.parsedType}),pi;if(i.exactLength!==null){let s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(Nn(n,{code:s?ln.too_big:ln.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Nn(n,{code:ln.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Nn(n,{code:ln.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new Iy(n,s,n.path,a)))).then(s=>Hp.mergeArray(r,s));let o=[...n.data].map((s,a)=>i.type._parseSync(new Iy(n,s,n.path,a)));return Hp.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:Dr.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:Dr.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:Dr.toString(n)}})}nonempty(e){return this.min(1,e)}};f2.create=(t,e)=>new f2({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Si.ZodArray,...Co(e)});ag=class t extends Po{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=os.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Gn.object){let u=this._getOrReturnCtx(e);return Nn(u,{code:ln.invalid_type,expected:Gn.object,received:u.parsedType}),pi}let{status:r,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof OC&&this._def.unknownKeys==="strip"))for(let u in i.data)s.includes(u)||a.push(u);let l=[];for(let u of s){let c=o[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Iy(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof OC){let u=this._def.unknownKeys;if(u==="passthrough")for(let c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(Nn(i,{code:ln.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let c of a){let d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Iy(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let u=[];for(let c of l){let d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>Hp.mergeObjectSync(r,u)):Hp.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Dr.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Dr.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Si.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of os.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of os.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return $8(this)}partial(e){let n={};for(let r of os.objectKeys(this.shape)){let i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of os.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof _y;)o=o._def.innerType;n[r]=o}return new t({...this._def,shape:()=>n})}keyof(){return hat(os.objectKeys(this.shape))}};ag.create=(t,e)=>new ag({shape:()=>t,unknownKeys:"strip",catchall:OC.create(),typeName:Si.ZodObject,...Co(e)});ag.strictCreate=(t,e)=>new ag({shape:()=>t,unknownKeys:"strict",catchall:OC.create(),typeName:Si.ZodObject,...Co(e)});ag.lazycreate=(t,e)=>new ag({shape:t,unknownKeys:"strip",catchall:OC.create(),typeName:Si.ZodObject,...Co(e)});xN=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new sg(a.ctx.common.issues));return Nn(n,{code:ln.invalid_union,unionErrors:s}),pi}if(n.common.async)return Promise.all(r.map(async o=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let l of r){let u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(l=>new sg(l));return Nn(n,{code:ln.invalid_union,unionErrors:a}),pi}}get options(){return this._def.options}};xN.create=(t,e)=>new xN({options:t,typeName:Si.ZodUnion,...Co(e)});c2=t=>t instanceof RN?c2(t.schema):t instanceof Ty?c2(t.innerType()):t instanceof BN?[t.value]:t instanceof NN?t.options:t instanceof ON?os.objectValues(t.enum):t instanceof MN?c2(t._def.innerType):t instanceof TN?[void 0]:t instanceof bN?[null]:t instanceof _y?[void 0,...c2(t.unwrap())]:t instanceof lS?[null,...c2(t.unwrap())]:t instanceof dG||t instanceof LN?c2(t.unwrap()):t instanceof FN?c2(t._def.innerType):[],UZ=class t extends Po{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==Gn.object)return Nn(n,{code:ln.invalid_type,expected:Gn.object,received:n.parsedType}),pi;let r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Nn(n,{code:ln.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),pi)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let i=new Map;for(let o of n){let s=c2(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:Si.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Co(r)})}};wN=class extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=(o,s)=>{if(QZ(o)||QZ(s))return pi;let a=qSe(o.value,s.value);return a.valid?((kZ(o)||kZ(s))&&n.dirty(),{status:n.value,value:a.data}):(Nn(r,{code:ln.invalid_intersection_types}),pi)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};wN.create=(t,e,n)=>new wN({left:t,right:e,typeName:Si.ZodIntersection,...Co(n)});aS=class t extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.array)return Nn(r,{code:ln.invalid_type,expected:Gn.array,received:r.parsedType}),pi;if(r.data.length<this._def.items.length)return Nn(r,{code:ln.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pi;!this._def.rest&&r.data.length>this._def.items.length&&(Nn(r,{code:ln.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let o=[...r.data].map((s,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new Iy(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>Hp.mergeArray(n,s)):Hp.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};aS.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new aS({items:t,typeName:Si.ZodTuple,rest:null,...Co(e)})};GZ=class t extends Po{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.object)return Nn(r,{code:ln.invalid_type,expected:Gn.object,received:r.parsedType}),pi;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in r.data)i.push({key:o._parse(new Iy(r,a,r.path,a)),value:s._parse(new Iy(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Hp.mergeObjectAsync(n,i):Hp.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Po?new t({keyType:e,valueType:n,typeName:Si.ZodRecord,...Co(r)}):new t({keyType:ax.create(),valueType:e,typeName:Si.ZodRecord,...Co(n)})}},W8=class extends Po{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.map)return Nn(r,{code:ln.invalid_type,expected:Gn.map,received:r.parsedType}),pi;let i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,l],u)=>({key:i._parse(new Iy(r,a,r.path,[u,"key"])),value:o._parse(new Iy(r,l,r.path,[u,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of s){let u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return pi;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of s){let u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return pi;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}};W8.create=(t,e,n)=>new W8({valueType:e,keyType:t,typeName:Si.ZodMap,...Co(n)});z8=class t extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Gn.set)return Nn(r,{code:ln.invalid_type,expected:Gn.set,received:r.parsedType}),pi;let i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Nn(r,{code:ln.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Nn(r,{code:ln.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());let o=this._def.valueType;function s(l){let u=new Set;for(let c of l){if(c.status==="aborted")return pi;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}let a=[...r.data.values()].map((l,u)=>o._parse(new Iy(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new t({...this._def,minSize:{value:e,message:Dr.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:Dr.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};z8.create=(t,e)=>new z8({valueType:t,minSize:null,maxSize:null,typeName:Si.ZodSet,...Co(e)});HZ=class t extends Po{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==Gn.function)return Nn(n,{code:ln.invalid_type,expected:Gn.function,received:n.parsedType}),pi;function r(a,l){return cG({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,q8(),u2].filter(u=>!!u),issueData:{code:ln.invalid_arguments,argumentsError:l}})}function i(a,l){return cG({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,q8(),u2].filter(u=>!!u),issueData:{code:ln.invalid_return_type,returnTypeError:l}})}let o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ux){let a=this;return Mh(async function(...l){let u=new sg([]),c=await a._def.args.parseAsync(l,o).catch(m=>{throw u.addIssue(r(l,m)),u}),d=await Reflect.apply(s,this,c);return await a._def.returns._def.type.parseAsync(d,o).catch(m=>{throw u.addIssue(i(d,m)),u})})}else{let a=this;return Mh(function(...l){let u=a._def.args.safeParse(l,o);if(!u.success)throw new sg([r(l,u.error)]);let c=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(c,o);if(!d.success)throw new sg([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:aS.create(e).rest(d2.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||aS.create([]).rest(d2.create()),returns:n||d2.create(),typeName:Si.ZodFunction,...Co(r)})}},RN=class extends Po{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};RN.create=(t,e)=>new RN({getter:t,typeName:Si.ZodLazy,...Co(e)});BN=class extends Po{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return Nn(n,{received:n.data,code:ln.invalid_literal,expected:this._def.value}),pi}return{status:"valid",value:e.data}}get value(){return this._def.value}};BN.create=(t,e)=>new BN({value:t,typeName:Si.ZodLiteral,...Co(e)});NN=class t extends Po{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return Nn(n,{expected:os.joinValues(r),received:n.parsedType,code:ln.invalid_type}),pi}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return Nn(n,{received:n.data,code:ln.invalid_enum_value,options:r}),pi}return Mh(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};NN.create=hat;ON=class extends Po{_parse(e){let n=os.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Gn.string&&r.parsedType!==Gn.number){let i=os.objectValues(n);return Nn(r,{expected:os.joinValues(i),received:r.parsedType,code:ln.invalid_type}),pi}if(this._cache||(this._cache=new Set(os.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=os.objectValues(n);return Nn(r,{received:r.data,code:ln.invalid_enum_value,options:i}),pi}return Mh(e.data)}get enum(){return this._def.values}};ON.create=(t,e)=>new ON({values:t,typeName:Si.ZodNativeEnum,...Co(e)});ux=class extends Po{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==Gn.promise&&n.common.async===!1)return Nn(n,{code:ln.invalid_type,expected:Gn.promise,received:n.parsedType}),pi;let r=n.parsedType===Gn.promise?n.data:Promise.resolve(n.data);return Mh(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ux.create=(t,e)=>new ux({type:t,typeName:Si.ZodPromise,...Co(e)});Ty=class extends Po{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Si.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{Nn(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return pi;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?pi:l.status==="dirty"?vN(l.value):n.value==="dirty"?vN(l.value):l});{if(n.value==="aborted")return pi;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?pi:a.status==="dirty"?vN(a.value):n.value==="dirty"?vN(a.value):a}}if(i.type==="refinement"){let s=a=>{let l=i.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?pi:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?pi:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!sx(s))return pi;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>sx(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):pi);os.assertNever(i)}};Ty.create=(t,e,n)=>new Ty({schema:t,typeName:Si.ZodEffects,effect:e,...Co(n)});Ty.createWithPreprocess=(t,e,n)=>new Ty({schema:e,effect:{type:"preprocess",transform:t},typeName:Si.ZodEffects,...Co(n)});_y=class extends Po{_parse(e){return this._getType(e)===Gn.undefined?Mh(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};_y.create=(t,e)=>new _y({innerType:t,typeName:Si.ZodOptional,...Co(e)});lS=class extends Po{_parse(e){return this._getType(e)===Gn.null?Mh(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};lS.create=(t,e)=>new lS({innerType:t,typeName:Si.ZodNullable,...Co(e)});MN=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===Gn.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};MN.create=(t,e)=>new MN({innerType:t,typeName:Si.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Co(e)});FN=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return V8(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sg(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sg(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};FN.create=(t,e)=>new FN({innerType:t,typeName:Si.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Co(e)});J8=class extends Po{_parse(e){if(this._getType(e)!==Gn.nan){let r=this._getOrReturnCtx(e);return Nn(r,{code:ln.invalid_type,expected:Gn.nan,received:r.parsedType}),pi}return{status:"valid",value:e.data}}};J8.create=t=>new J8({typeName:Si.ZodNaN,...Co(t)});KFn=Symbol("zod_brand"),dG=class extends Po{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},fG=class t extends Po{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?pi:o.status==="dirty"?(n.dirty(),vN(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{let i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?pi:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:Si.ZodPipeline})}},LN=class extends Po{_parse(e){let n=this._def.innerType._parse(e),r=i=>(sx(i)&&(i.value=Object.freeze(i.value)),i);return V8(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}};LN.create=(t,e)=>new LN({innerType:t,typeName:Si.ZodReadonly,...Co(e)});XFn={object:ag.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Si||(Si={}));ZFn=(t,e={message:`Input not instance of ${t.name}`})=>mat(n=>n instanceof t,e),Aat=ax.create,gat=DN.create,e8n=J8.create,t8n=SN.create,Eat=_N.create,n8n=IN.create,r8n=Y8.create,i8n=TN.create,o8n=bN.create,s8n=lx.create,a8n=d2.create,l8n=OC.create,u8n=j8.create,c8n=f2.create,d8n=ag.create,f8n=ag.strictCreate,p8n=xN.create,h8n=UZ.create,m8n=wN.create,A8n=aS.create,g8n=GZ.create,E8n=W8.create,y8n=z8.create,C8n=HZ.create,v8n=RN.create,D8n=BN.create,S8n=NN.create,_8n=ON.create,I8n=ux.create,T8n=Ty.create,b8n=_y.create,x8n=lS.create,w8n=Ty.createWithPreprocess,R8n=fG.create,B8n=()=>Aat().optional(),N8n=()=>gat().optional(),O8n=()=>Eat().optional(),M8n={string:t=>ax.create({...t,coerce:!0}),number:t=>DN.create({...t,coerce:!0}),boolean:t=>_N.create({...t,coerce:!0}),bigint:t=>SN.create({...t,coerce:!0}),date:t=>IN.create({...t,coerce:!0})},F8n=pi});var Ce={};h0(Ce,{BRAND:()=>KFn,DIRTY:()=>vN,EMPTY_PATH:()=>wFn,INVALID:()=>pi,NEVER:()=>F8n,OK:()=>Mh,ParseStatus:()=>Hp,Schema:()=>Po,ZodAny:()=>lx,ZodArray:()=>f2,ZodBigInt:()=>SN,ZodBoolean:()=>_N,ZodBranded:()=>dG,ZodCatch:()=>FN,ZodDate:()=>IN,ZodDefault:()=>MN,ZodDiscriminatedUnion:()=>UZ,ZodEffects:()=>Ty,ZodEnum:()=>NN,ZodError:()=>sg,ZodFirstPartyTypeKind:()=>Si,ZodFunction:()=>HZ,ZodIntersection:()=>wN,ZodIssueCode:()=>ln,ZodLazy:()=>RN,ZodLiteral:()=>BN,ZodMap:()=>W8,ZodNaN:()=>J8,ZodNativeEnum:()=>ON,ZodNever:()=>OC,ZodNull:()=>bN,ZodNullable:()=>lS,ZodNumber:()=>DN,ZodObject:()=>ag,ZodOptional:()=>_y,ZodParsedType:()=>Gn,ZodPipeline:()=>fG,ZodPromise:()=>ux,ZodReadonly:()=>LN,ZodRecord:()=>GZ,ZodSchema:()=>Po,ZodSet:()=>z8,ZodString:()=>ax,ZodSymbol:()=>Y8,ZodTransformer:()=>Ty,ZodTuple:()=>aS,ZodType:()=>Po,ZodUndefined:()=>TN,ZodUnion:()=>xN,ZodUnknown:()=>d2,ZodVoid:()=>j8,addIssueToContext:()=>Nn,any:()=>s8n,array:()=>c8n,bigint:()=>t8n,boolean:()=>Eat,coerce:()=>M8n,custom:()=>mat,date:()=>n8n,datetimeRegex:()=>pat,defaultErrorMap:()=>u2,discriminatedUnion:()=>h8n,effect:()=>T8n,enum:()=>S8n,function:()=>C8n,getErrorMap:()=>q8,getParsedType:()=>sS,instanceof:()=>ZFn,intersection:()=>m8n,isAborted:()=>QZ,isAsync:()=>V8,isDirty:()=>kZ,isValid:()=>sx,late:()=>XFn,lazy:()=>v8n,literal:()=>D8n,makeIssue:()=>cG,map:()=>E8n,nan:()=>e8n,nativeEnum:()=>_8n,never:()=>l8n,null:()=>o8n,nullable:()=>x8n,number:()=>gat,object:()=>d8n,objectUtil:()=>kSe,oboolean:()=>O8n,onumber:()=>N8n,optional:()=>b8n,ostring:()=>B8n,pipeline:()=>R8n,preprocess:()=>w8n,promise:()=>I8n,quotelessJson:()=>TFn,record:()=>g8n,set:()=>y8n,setErrorMap:()=>xFn,strictObject:()=>f8n,string:()=>Aat,symbol:()=>r8n,transformer:()=>T8n,tuple:()=>A8n,undefined:()=>i8n,union:()=>p8n,unknown:()=>a8n,util:()=>os,void:()=>u8n});var VSe=Le(()=>{PZ();GSe();aat();uG();yat();LZ()});var pG=Le(()=>{VSe();VSe()});var K8,Cat,qZ,vat,Dat,L8n,wy,lg,hG,uS,Ry,VZ,Sat,$Z,_at,Iat,Tat,mG,by,bat,xat,cx,PN,YZ,AG,wat,P8n,Q8n,k8n,$Se,Rat,Bat,jZ,U8n,WZ,zZ,JZ,Nat,Oat,Mat,Fat,G8n,H8n,YSe,q8n,jSe,V8n,WSe,$8n,Y8n,j8n,W8n,z8n,J8n,K8n,gG,X8n,zSe,JSe,KSe,Z8n,eLn,Lat,tLn,EG,nLn,rLn,iLn,oLn,XSe,KZ,ZKr,sLn,aLn,Pat,lLn,uLn,cLn,dLn,fLn,pLn,hLn,mLn,ALn,gLn,ELn,yLn,CLn,vLn,DLn,SLn,_Ln,ZSe,ILn,TLn,bLn,xLn,eXr,tXr,nXr,rXr,iXr,oXr,xy,dx=Le(()=>{pG();K8="2025-06-18",Cat=[K8,"2025-03-26","2024-11-05","2024-10-07"],qZ="2.0",vat=Ce.union([Ce.string(),Ce.number().int()]),Dat=Ce.string(),L8n=Ce.object({progressToken:Ce.optional(vat)}).passthrough(),wy=Ce.object({_meta:Ce.optional(L8n)}).passthrough(),lg=Ce.object({method:Ce.string(),params:Ce.optional(wy)}),hG=Ce.object({_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),uS=Ce.object({method:Ce.string(),params:Ce.optional(hG)}),Ry=Ce.object({_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),VZ=Ce.union([Ce.string(),Ce.number().int()]),Sat=Ce.object({jsonrpc:Ce.literal(qZ),id:VZ}).merge(lg).strict(),$Z=t=>Sat.safeParse(t).success,_at=Ce.object({jsonrpc:Ce.literal(qZ)}).merge(uS).strict(),Iat=t=>_at.safeParse(t).success,Tat=Ce.object({jsonrpc:Ce.literal(qZ),id:VZ,result:Ry}).strict(),mG=t=>Tat.safeParse(t).success;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError"})(by||(by={}));bat=Ce.object({jsonrpc:Ce.literal(qZ),id:VZ,error:Ce.object({code:Ce.number().int(),message:Ce.string(),data:Ce.optional(Ce.unknown())})}).strict(),xat=t=>bat.safeParse(t).success,cx=Ce.union([Sat,_at,Tat,bat]),PN=Ry.strict(),YZ=uS.extend({method:Ce.literal("notifications/cancelled"),params:hG.extend({requestId:VZ,reason:Ce.string().optional()})}),AG=Ce.object({name:Ce.string(),title:Ce.optional(Ce.string())}).passthrough(),wat=AG.extend({version:Ce.string()}),P8n=Ce.object({experimental:Ce.optional(Ce.object({}).passthrough()),sampling:Ce.optional(Ce.object({}).passthrough()),elicitation:Ce.optional(Ce.object({}).passthrough()),roots:Ce.optional(Ce.object({listChanged:Ce.optional(Ce.boolean())}).passthrough())}).passthrough(),Q8n=lg.extend({method:Ce.literal("initialize"),params:wy.extend({protocolVersion:Ce.string(),capabilities:P8n,clientInfo:wat})}),k8n=Ce.object({experimental:Ce.optional(Ce.object({}).passthrough()),logging:Ce.optional(Ce.object({}).passthrough()),completions:Ce.optional(Ce.object({}).passthrough()),prompts:Ce.optional(Ce.object({listChanged:Ce.optional(Ce.boolean())}).passthrough()),resources:Ce.optional(Ce.object({subscribe:Ce.optional(Ce.boolean()),listChanged:Ce.optional(Ce.boolean())}).passthrough()),tools:Ce.optional(Ce.object({listChanged:Ce.optional(Ce.boolean())}).passthrough())}).passthrough(),$Se=Ry.extend({protocolVersion:Ce.string(),capabilities:k8n,serverInfo:wat,instructions:Ce.optional(Ce.string())}),Rat=uS.extend({method:Ce.literal("notifications/initialized")}),Bat=t=>Rat.safeParse(t).success,jZ=lg.extend({method:Ce.literal("ping")}),U8n=Ce.object({progress:Ce.number(),total:Ce.optional(Ce.number()),message:Ce.optional(Ce.string())}).passthrough(),WZ=uS.extend({method:Ce.literal("notifications/progress"),params:hG.merge(U8n).extend({progressToken:vat})}),zZ=lg.extend({params:wy.extend({cursor:Ce.optional(Dat)}).optional()}),JZ=Ry.extend({nextCursor:Ce.optional(Dat)}),Nat=Ce.object({uri:Ce.string(),mimeType:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),Oat=Nat.extend({text:Ce.string()}),Mat=Nat.extend({blob:Ce.string().base64()}),Fat=AG.extend({uri:Ce.string(),description:Ce.optional(Ce.string()),mimeType:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}),G8n=AG.extend({uriTemplate:Ce.string(),description:Ce.optional(Ce.string()),mimeType:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}),H8n=zZ.extend({method:Ce.literal("resources/list")}),YSe=JZ.extend({resources:Ce.array(Fat)}),q8n=zZ.extend({method:Ce.literal("resources/templates/list")}),jSe=JZ.extend({resourceTemplates:Ce.array(G8n)}),V8n=lg.extend({method:Ce.literal("resources/read"),params:wy.extend({uri:Ce.string()})}),WSe=Ry.extend({contents:Ce.array(Ce.union([Oat,Mat]))}),$8n=uS.extend({method:Ce.literal("notifications/resources/list_changed")}),Y8n=lg.extend({method:Ce.literal("resources/subscribe"),params:wy.extend({uri:Ce.string()})}),j8n=lg.extend({method:Ce.literal("resources/unsubscribe"),params:wy.extend({uri:Ce.string()})}),W8n=uS.extend({method:Ce.literal("notifications/resources/updated"),params:hG.extend({uri:Ce.string()})}),z8n=Ce.object({name:Ce.string(),description:Ce.optional(Ce.string()),required:Ce.optional(Ce.boolean())}).passthrough(),J8n=AG.extend({description:Ce.optional(Ce.string()),arguments:Ce.optional(Ce.array(z8n)),_meta:Ce.optional(Ce.object({}).passthrough())}),K8n=zZ.extend({method:Ce.literal("prompts/list")}),gG=JZ.extend({prompts:Ce.array(J8n)}),X8n=lg.extend({method:Ce.literal("prompts/get"),params:wy.extend({name:Ce.string(),arguments:Ce.optional(Ce.record(Ce.string()))})}),zSe=Ce.object({type:Ce.literal("text"),text:Ce.string(),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),JSe=Ce.object({type:Ce.literal("image"),data:Ce.string().base64(),mimeType:Ce.string(),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),KSe=Ce.object({type:Ce.literal("audio"),data:Ce.string().base64(),mimeType:Ce.string(),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),Z8n=Ce.object({type:Ce.literal("resource"),resource:Ce.union([Oat,Mat]),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),eLn=Fat.extend({type:Ce.literal("resource_link")}),Lat=Ce.union([zSe,JSe,KSe,eLn,Z8n]),tLn=Ce.object({role:Ce.enum(["user","assistant"]),content:Lat}).passthrough(),EG=Ry.extend({description:Ce.optional(Ce.string()),messages:Ce.array(tLn)}),nLn=uS.extend({method:Ce.literal("notifications/prompts/list_changed")}),rLn=Ce.object({title:Ce.optional(Ce.string()),readOnlyHint:Ce.optional(Ce.boolean()),destructiveHint:Ce.optional(Ce.boolean()),idempotentHint:Ce.optional(Ce.boolean()),openWorldHint:Ce.optional(Ce.boolean())}).passthrough(),iLn=AG.extend({description:Ce.optional(Ce.string()),inputSchema:Ce.object({type:Ce.literal("object"),properties:Ce.optional(Ce.object({}).passthrough()),required:Ce.optional(Ce.array(Ce.string()))}).passthrough(),outputSchema:Ce.optional(Ce.object({type:Ce.literal("object"),properties:Ce.optional(Ce.object({}).passthrough()),required:Ce.optional(Ce.array(Ce.string()))}).passthrough()),annotations:Ce.optional(rLn),_meta:Ce.optional(Ce.object({}).passthrough())}),oLn=zZ.extend({method:Ce.literal("tools/list")}),XSe=JZ.extend({tools:Ce.array(iLn)}),KZ=Ry.extend({content:Ce.array(Lat).default([]),structuredContent:Ce.object({}).passthrough().optional(),isError:Ce.optional(Ce.boolean())}),ZKr=KZ.or(Ry.extend({toolResult:Ce.unknown()})),sLn=lg.extend({method:Ce.literal("tools/call"),params:wy.extend({name:Ce.string(),arguments:Ce.optional(Ce.record(Ce.unknown()))})}),aLn=uS.extend({method:Ce.literal("notifications/tools/list_changed")}),Pat=Ce.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),lLn=lg.extend({method:Ce.literal("logging/setLevel"),params:wy.extend({level:Pat})}),uLn=uS.extend({method:Ce.literal("notifications/message"),params:hG.extend({level:Pat,logger:Ce.optional(Ce.string()),data:Ce.unknown()})}),cLn=Ce.object({name:Ce.string().optional()}).passthrough(),dLn=Ce.object({hints:Ce.optional(Ce.array(cLn)),costPriority:Ce.optional(Ce.number().min(0).max(1)),speedPriority:Ce.optional(Ce.number().min(0).max(1)),intelligencePriority:Ce.optional(Ce.number().min(0).max(1))}).passthrough(),fLn=Ce.object({role:Ce.enum(["user","assistant"]),content:Ce.union([zSe,JSe,KSe])}).passthrough(),pLn=lg.extend({method:Ce.literal("sampling/createMessage"),params:wy.extend({messages:Ce.array(fLn),systemPrompt:Ce.optional(Ce.string()),includeContext:Ce.optional(Ce.enum(["none","thisServer","allServers"])),temperature:Ce.optional(Ce.number()),maxTokens:Ce.number().int(),stopSequences:Ce.optional(Ce.array(Ce.string())),metadata:Ce.optional(Ce.object({}).passthrough()),modelPreferences:Ce.optional(dLn)})}),hLn=Ry.extend({model:Ce.string(),stopReason:Ce.optional(Ce.enum(["endTurn","stopSequence","maxTokens"]).or(Ce.string())),role:Ce.enum(["user","assistant"]),content:Ce.discriminatedUnion("type",[zSe,JSe,KSe])}),mLn=Ce.object({type:Ce.literal("boolean"),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),default:Ce.optional(Ce.boolean())}).passthrough(),ALn=Ce.object({type:Ce.literal("string"),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),minLength:Ce.optional(Ce.number()),maxLength:Ce.optional(Ce.number()),format:Ce.optional(Ce.enum(["email","uri","date","date-time"]))}).passthrough(),gLn=Ce.object({type:Ce.enum(["number","integer"]),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),minimum:Ce.optional(Ce.number()),maximum:Ce.optional(Ce.number())}).passthrough(),ELn=Ce.object({type:Ce.literal("string"),title:Ce.optional(Ce.string()),description:Ce.optional(Ce.string()),enum:Ce.array(Ce.string()),enumNames:Ce.optional(Ce.array(Ce.string()))}).passthrough(),yLn=Ce.union([mLn,ALn,gLn,ELn]),CLn=lg.extend({method:Ce.literal("elicitation/create"),params:wy.extend({message:Ce.string(),requestedSchema:Ce.object({type:Ce.literal("object"),properties:Ce.record(Ce.string(),yLn),required:Ce.optional(Ce.array(Ce.string()))}).passthrough()})}),vLn=Ry.extend({action:Ce.enum(["accept","decline","cancel"]),content:Ce.optional(Ce.record(Ce.string(),Ce.unknown()))}),DLn=Ce.object({type:Ce.literal("ref/resource"),uri:Ce.string()}).passthrough(),SLn=Ce.object({type:Ce.literal("ref/prompt"),name:Ce.string()}).passthrough(),_Ln=lg.extend({method:Ce.literal("completion/complete"),params:wy.extend({ref:Ce.union([SLn,DLn]),argument:Ce.object({name:Ce.string(),value:Ce.string()}).passthrough(),context:Ce.optional(Ce.object({arguments:Ce.optional(Ce.record(Ce.string(),Ce.string()))}))})}),ZSe=Ry.extend({completion:Ce.object({values:Ce.array(Ce.string()).max(100),total:Ce.optional(Ce.number().int()),hasMore:Ce.optional(Ce.boolean())}).passthrough()}),ILn=Ce.object({uri:Ce.string().startsWith("file://"),name:Ce.optional(Ce.string()),_meta:Ce.optional(Ce.object({}).passthrough())}).passthrough(),TLn=lg.extend({method:Ce.literal("roots/list")}),bLn=Ry.extend({roots:Ce.array(ILn)}),xLn=uS.extend({method:Ce.literal("notifications/roots/list_changed")}),eXr=Ce.union([jZ,Q8n,_Ln,lLn,X8n,K8n,H8n,q8n,V8n,Y8n,j8n,sLn,oLn]),tXr=Ce.union([YZ,WZ,Rat,xLn]),nXr=Ce.union([PN,hLn,vLn,bLn]),rXr=Ce.union([jZ,pLn,CLn,TLn]),iXr=Ce.union([YZ,WZ,uLn,W8n,$8n,aLn,nLn]),oXr=Ce.union([PN,$Se,ZSe,EG,gG,YSe,jSe,WSe,KZ,XSe]),xy=class extends Error{constructor(e,n,r){super(`MCP error ${e}: ${n}`),this.code=e,this.data=r,this.name="McpError"}}});function Qat(t,e){return Object.entries(e).reduce((n,[r,i])=>(i&&typeof i=="object"?n[r]=n[r]?{...n[r],...i}:i:n[r]=i,n),{...t})}var wLn,XZ,kat=Le(()=>{dx();wLn=6e4,XZ=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this.setNotificationHandler(YZ,n=>{let r=this._requestHandlerAbortControllers.get(n.params.requestId);r?.abort(n.params.reason)}),this.setNotificationHandler(WZ,n=>{this._onprogress(n)}),this.setRequestHandler(jZ,n=>({}))}_setupTimeout(e,n,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let n=this._timeoutInfo.get(e);if(!n)return!1;let r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),new xy(by.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){let n=this._timeoutInfo.get(e);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var n,r,i;this._transport=e;let o=(n=this.transport)===null||n===void 0?void 0:n.onclose;this._transport.onclose=()=>{o?.(),this._onclose()};let s=(r=this.transport)===null||r===void 0?void 0:r.onerror;this._transport.onerror=l=>{s?.(l),this._onerror(l)};let a=(i=this._transport)===null||i===void 0?void 0:i.onmessage;this._transport.onmessage=(l,u)=>{a?.(l,u),mG(l)||xat(l)?this._onresponse(l):$Z(l)?this._onrequest(l,u):Iat(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var e;let n=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._transport=void 0,(e=this.onclose)===null||e===void 0||e.call(this);let r=new xy(by.ConnectionClosed,"Connection closed");for(let i of n.values())i(r)}_onerror(e){var n;(n=this.onerror)===null||n===void 0||n.call(this,e)}_onnotification(e){var n;let r=(n=this._notificationHandlers.get(e.method))!==null&&n!==void 0?n:this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(e,n){var r,i,o,s;let a=(r=this._requestHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackRequestHandler;if(a===void 0){(i=this._transport)===null||i===void 0||i.send({jsonrpc:"2.0",id:e.id,error:{code:by.MethodNotFound,message:"Method not found"}}).catch(c=>this._onerror(new Error(`Failed to send an error response: ${c}`)));return}let l=new AbortController;this._requestHandlerAbortControllers.set(e.id,l);let u={signal:l.signal,sessionId:(o=this._transport)===null||o===void 0?void 0:o.sessionId,_meta:(s=e.params)===null||s===void 0?void 0:s._meta,sendNotification:c=>this.notification(c,{relatedRequestId:e.id}),sendRequest:(c,d,h)=>this.request(c,d,{...h,relatedRequestId:e.id}),authInfo:n?.authInfo,requestId:e.id,requestInfo:n?.requestInfo};Promise.resolve().then(()=>a(e,u)).then(c=>{var d;if(!l.signal.aborted)return(d=this._transport)===null||d===void 0?void 0:d.send({result:c,jsonrpc:"2.0",id:e.id})},c=>{var d,h;if(!l.signal.aborted)return(d=this._transport)===null||d===void 0?void 0:d.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(c.code)?c.code:by.InternalError,message:(h=c.message)!==null&&h!==void 0?h:"Internal error"}})}).catch(c=>this._onerror(new Error(`Failed to send response: ${c}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:n,...r}=e.params,i=Number(n),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let s=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(l){s(l);return}o(r)}_onresponse(e){let n=Number(e.id),r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),mG(e))r(e);else{let i=new xy(e.error.code,e.error.message,e.error.data);r(i)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)===null||e===void 0?void 0:e.close())}request(e,n,r){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:s}=r??{};return new Promise((a,l)=>{var u,c,d,h,m,E;if(!this._transport){l(new Error("Not connected"));return}((u=this._options)===null||u===void 0?void 0:u.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),(c=r?.signal)===null||c===void 0||c.throwIfAborted();let y=this._requestMessageId++,C={...e,jsonrpc:"2.0",id:y};r?.onprogress&&(this._progressHandlers.set(y,r.onprogress),C.params={...e.params,_meta:{...((d=e.params)===null||d===void 0?void 0:d._meta)||{},progressToken:y}});let _=R=>{var F;this._responseHandlers.delete(y),this._progressHandlers.delete(y),this._cleanupTimeout(y),(F=this._transport)===null||F===void 0||F.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:y,reason:String(R)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:s}).catch(q=>this._onerror(new Error(`Failed to send cancellation: ${q}`))),l(R)};this._responseHandlers.set(y,R=>{var F;if(!(!((F=r?.signal)===null||F===void 0)&&F.aborted)){if(R instanceof Error)return l(R);try{let q=n.parse(R.result);a(q)}catch(q){l(q)}}}),(h=r?.signal)===null||h===void 0||h.addEventListener("abort",()=>{var R;_((R=r?.signal)===null||R===void 0?void 0:R.reason)});let w=(m=r?.timeout)!==null&&m!==void 0?m:wLn,B=()=>_(new xy(by.RequestTimeout,"Request timed out",{timeout:w}));this._setupTimeout(y,w,r?.maxTotalTimeout,B,(E=r?.resetTimeoutOnProgress)!==null&&E!==void 0?E:!1),this._transport.send(C,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:s}).catch(R=>{this._cleanupTimeout(y),l(R)})})}async notification(e,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let r={...e,jsonrpc:"2.0"};await this._transport.send(r,n)}setRequestHandler(e,n){let r=e.shape.method.value;this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(i,o)=>Promise.resolve(n(e.parse(i),o)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,n){this._notificationHandlers.set(e.shape.method.value,r=>Promise.resolve(n(e.parse(r))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}});var Gat=b((ZZ,Uat)=>{(function(t,e){typeof ZZ=="object"&&typeof Uat<"u"?e(ZZ):typeof define=="function"&&define.amd?define(["exports"],e):e(t.URI=t.URI||{})})(ZZ,function(t){"use strict";function e(){for(var Je=arguments.length,je=Array(Je),ut=0;ut<Je;ut++)je[ut]=arguments[ut];if(je.length>1){je[0]=je[0].slice(0,-1);for(var St=je.length-1,st=1;st<St;++st)je[st]=je[st].slice(1,-1);return je[St]=je[St].slice(1),je.join("")}else return je[0]}function n(Je){return"(?:"+Je+")"}function r(Je){return Je===void 0?"undefined":Je===null?"null":Object.prototype.toString.call(Je).split(" ").pop().split("]").shift().toLowerCase()}function i(Je){return Je.toUpperCase()}function o(Je){return Je!=null?Je instanceof Array?Je:typeof Je.length!="number"||Je.split||Je.setInterval||Je.call?[Je]:Array.prototype.slice.call(Je):[]}function s(Je,je){var ut=Je;if(je)for(var St in je)ut[St]=je[St];return ut}function a(Je){var je="[A-Za-z]",ut="[\\x0D]",St="[0-9]",st="[\\x22]",vn=e(St,"[A-Fa-f]"),Vn="[\\x0A]",li="[\\x20]",Ir=n(n("%[EFef]"+vn+"%"+vn+vn+"%"+vn+vn)+"|"+n("%[89A-Fa-f]"+vn+"%"+vn+vn)+"|"+n("%"+vn+vn)),gs="[\\:\\/\\?\\#\\[\\]\\@]",Pi="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Bo=e(gs,Pi),Gs=Je?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Cr=Je?"[\\uE000-\\uF8FF]":"[]",ni=e(je,St,"[\\-\\.\\_\\~]",Gs),Do=n(je+e(je,St,"[\\+\\-\\.]")+"*"),No=n(n(Ir+"|"+e(ni,Pi,"[\\:]"))+"*"),Ou=n(n("25[0-5]")+"|"+n("2[0-4]"+St)+"|"+n("1"+St+St)+"|"+n("[1-9]"+St)+"|"+St),va=n(n("25[0-5]")+"|"+n("2[0-4]"+St)+"|"+n("1"+St+St)+"|"+n("0?[1-9]"+St)+"|0?0?"+St),Xs=n(va+"\\."+va+"\\."+va+"\\."+va),Ei=n(vn+"{1,4}"),fl=n(n(Ei+"\\:"+Ei)+"|"+Xs),ui=n(n(Ei+"\\:")+"{6}"+fl),ci=n("\\:\\:"+n(Ei+"\\:")+"{5}"+fl),Mu=n(n(Ei)+"?\\:\\:"+n(Ei+"\\:")+"{4}"+fl),Da=n(n(n(Ei+"\\:")+"{0,1}"+Ei)+"?\\:\\:"+n(Ei+"\\:")+"{3}"+fl),ho=n(n(n(Ei+"\\:")+"{0,2}"+Ei)+"?\\:\\:"+n(Ei+"\\:")+"{2}"+fl),Ic=n(n(n(Ei+"\\:")+"{0,3}"+Ei)+"?\\:\\:"+Ei+"\\:"+fl),ca=n(n(n(Ei+"\\:")+"{0,4}"+Ei)+"?\\:\\:"+fl),Es=n(n(n(Ei+"\\:")+"{0,5}"+Ei)+"?\\:\\:"+Ei),ja=n(n(n(Ei+"\\:")+"{0,6}"+Ei)+"?\\:\\:"),Be=n([ui,ci,Mu,Da,ho,Ic,ca,Es,ja].join("|")),Me=n(n(ni+"|"+Ir)+"+"),tt=n(Be+"\\%25"+Me),ct=n(Be+n("\\%25|\\%(?!"+vn+"{2})")+Me),Ct=n("[vV]"+vn+"+\\."+e(ni,Pi,"[\\:]")+"+"),Ft=n("\\["+n(ct+"|"+Be+"|"+Ct)+"\\]"),Jt=n(n(Ir+"|"+e(ni,Pi))+"*"),Vt=n(Ft+"|"+Xs+"(?!"+Jt+")|"+Jt),nn=n(St+"*"),en=n(n(No+"@")+"?"+Vt+n("\\:"+nn)+"?"),hn=n(Ir+"|"+e(ni,Pi,"[\\:\\@]")),sr=n(hn+"*"),Ii=n(hn+"+"),Hs=n(n(Ir+"|"+e(ni,Pi,"[\\@]"))+"+"),hi=n(n("\\/"+sr)+"*"),La=n("\\/"+n(Ii+hi)+"?"),eu=n(Hs+hi),ad=n(Ii+hi),bs="(?!"+hn+")",mE=n(hi+"|"+La+"|"+eu+"|"+ad+"|"+bs),Hd=n(n(hn+"|"+e("[\\/\\?]",Cr))+"*"),ld=n(n(hn+"|[\\/\\?]")+"*"),gm=n(n("\\/\\/"+en+hi)+"|"+La+"|"+ad+"|"+bs),AE=n(Do+"\\:"+gm+n("\\?"+Hd)+"?"+n("\\#"+ld)+"?"),ph=n(n("\\/\\/"+en+hi)+"|"+La+"|"+eu+"|"+bs),Wa=n(ph+n("\\?"+Hd)+"?"+n("\\#"+ld)+"?"),wA=n(AE+"|"+Wa),Ef=n(Do+"\\:"+gm+n("\\?"+Hd)+"?"),Em="^("+Do+")\\:"+n(n("\\/\\/("+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?)")+"?("+hi+"|"+La+"|"+ad+"|"+bs+")")+n("\\?("+Hd+")")+"?"+n("\\#("+ld+")")+"?$",yf="^(){0}"+n(n("\\/\\/("+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?)")+"?("+hi+"|"+La+"|"+eu+"|"+bs+")")+n("\\?("+Hd+")")+"?"+n("\\#("+ld+")")+"?$",ym="^("+Do+")\\:"+n(n("\\/\\/("+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?)")+"?("+hi+"|"+La+"|"+ad+"|"+bs+")")+n("\\?("+Hd+")")+"?$",Fu="^"+n("\\#("+ld+")")+"?$",Vg="^"+n("("+No+")@")+"?("+Vt+")"+n("\\:("+nn+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",je,St,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",ni,Pi),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",ni,Pi),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",ni,Pi),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",ni,Pi),"g"),NOT_QUERY:new RegExp(e("[^\\%]",ni,Pi,"[\\:\\@\\/\\?]",Cr),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",ni,Pi,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",ni,Pi),"g"),UNRESERVED:new RegExp(ni,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",ni,Bo),"g"),PCT_ENCODED:new RegExp(Ir,"g"),IPV4ADDRESS:new RegExp("^("+Xs+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Be+")"+n(n("\\%25|\\%(?!"+vn+"{2})")+"("+Me+")")+"?\\]?$")}}var l=a(!1),u=a(!0),c=function(){function Je(je,ut){var St=[],st=!0,vn=!1,Vn=void 0;try{for(var li=je[Symbol.iterator](),Ir;!(st=(Ir=li.next()).done)&&(St.push(Ir.value),!(ut&&St.length===ut));st=!0);}catch(gs){vn=!0,Vn=gs}finally{try{!st&&li.return&&li.return()}finally{if(vn)throw Vn}}return St}return function(je,ut){if(Array.isArray(je))return je;if(Symbol.iterator in Object(je))return Je(je,ut);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(Je){if(Array.isArray(Je)){for(var je=0,ut=Array(Je.length);je<Je.length;je++)ut[je]=Je[je];return ut}else return Array.from(Je)},h=2147483647,m=36,E=1,y=26,C=38,_=700,w=72,B=128,R="-",F=/^xn--/,q=/[^\0-\x7E]/,J=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=m-E,K=Math.floor,U=String.fromCharCode;function se(Je){throw new RangeError(j[Je])}function V(Je,je){for(var ut=[],St=Je.length;St--;)ut[St]=je(Je[St]);return ut}function O(Je,je){var ut=Je.split("@"),St="";ut.length>1&&(St=ut[0]+"@",Je=ut[1]),Je=Je.replace(J,".");var st=Je.split("."),vn=V(st,je).join(".");return St+vn}function Y(Je){for(var je=[],ut=0,St=Je.length;ut<St;){var st=Je.charCodeAt(ut++);if(st>=55296&&st<=56319&&ut<St){var vn=Je.charCodeAt(ut++);(vn&64512)==56320?je.push(((st&1023)<<10)+(vn&1023)+65536):(je.push(st),ut--)}else je.push(st)}return je}var ee=function(je){return String.fromCodePoint.apply(String,d(je))},ne=function(je){return je-48<10?je-22:je-65<26?je-65:je-97<26?je-97:m},Ae=function(je,ut){return je+22+75*(je<26)-((ut!=0)<<5)},ve=function(je,ut,St){var st=0;for(je=St?K(je/_):je>>1,je+=K(je/ut);je>L*y>>1;st+=m)je=K(je/L);return K(st+(L+1)*je/(je+C))},De=function(je){var ut=[],St=je.length,st=0,vn=B,Vn=w,li=je.lastIndexOf(R);li<0&&(li=0);for(var Ir=0;Ir<li;++Ir)je.charCodeAt(Ir)>=128&&se("not-basic"),ut.push(je.charCodeAt(Ir));for(var gs=li>0?li+1:0;gs<St;){for(var Pi=st,Bo=1,Gs=m;;Gs+=m){gs>=St&&se("invalid-input");var Cr=ne(je.charCodeAt(gs++));(Cr>=m||Cr>K((h-st)/Bo))&&se("overflow"),st+=Cr*Bo;var ni=Gs<=Vn?E:Gs>=Vn+y?y:Gs-Vn;if(Cr<ni)break;var Do=m-ni;Bo>K(h/Do)&&se("overflow"),Bo*=Do}var No=ut.length+1;Vn=ve(st-Pi,No,Pi==0),K(st/No)>h-vn&&se("overflow"),vn+=K(st/No),st%=No,ut.splice(st++,0,vn)}return String.fromCodePoint.apply(String,ut)},Ue=function(je){var ut=[];je=Y(je);var St=je.length,st=B,vn=0,Vn=w,li=!0,Ir=!1,gs=void 0;try{for(var Pi=je[Symbol.iterator](),Bo;!(li=(Bo=Pi.next()).done);li=!0){var Gs=Bo.value;Gs<128&&ut.push(U(Gs))}}catch(ct){Ir=!0,gs=ct}finally{try{!li&&Pi.return&&Pi.return()}finally{if(Ir)throw gs}}var Cr=ut.length,ni=Cr;for(Cr&&ut.push(R);ni<St;){var Do=h,No=!0,Ou=!1,va=void 0;try{for(var Xs=je[Symbol.iterator](),Ei;!(No=(Ei=Xs.next()).done);No=!0){var fl=Ei.value;fl>=st&&fl<Do&&(Do=fl)}}catch(ct){Ou=!0,va=ct}finally{try{!No&&Xs.return&&Xs.return()}finally{if(Ou)throw va}}var ui=ni+1;Do-st>K((h-vn)/ui)&&se("overflow"),vn+=(Do-st)*ui,st=Do;var ci=!0,Mu=!1,Da=void 0;try{for(var ho=je[Symbol.iterator](),Ic;!(ci=(Ic=ho.next()).done);ci=!0){var ca=Ic.value;if(ca<st&&++vn>h&&se("overflow"),ca==st){for(var Es=vn,ja=m;;ja+=m){var Be=ja<=Vn?E:ja>=Vn+y?y:ja-Vn;if(Es<Be)break;var Me=Es-Be,tt=m-Be;ut.push(U(Ae(Be+Me%tt,0))),Es=K(Me/tt)}ut.push(U(Ae(Es,0))),Vn=ve(vn,ui,ni==Cr),vn=0,++ni}}}catch(ct){Mu=!0,Da=ct}finally{try{!ci&&ho.return&&ho.return()}finally{if(Mu)throw Da}}++vn,++st}return ut.join("")},qe=function(je){return O(je,function(ut){return F.test(ut)?De(ut.slice(4).toLowerCase()):ut})},Ie=function(je){return O(je,function(ut){return q.test(ut)?"xn--"+Ue(ut):ut})},xe={version:"2.1.0",ucs2:{decode:Y,encode:ee},decode:De,encode:Ue,toASCII:Ie,toUnicode:qe},Oe={};function ue(Je){var je=Je.charCodeAt(0),ut=void 0;return je<16?ut="%0"+je.toString(16).toUpperCase():je<128?ut="%"+je.toString(16).toUpperCase():je<2048?ut="%"+(je>>6|192).toString(16).toUpperCase()+"%"+(je&63|128).toString(16).toUpperCase():ut="%"+(je>>12|224).toString(16).toUpperCase()+"%"+(je>>6&63|128).toString(16).toUpperCase()+"%"+(je&63|128).toString(16).toUpperCase(),ut}function re(Je){for(var je="",ut=0,St=Je.length;ut<St;){var st=parseInt(Je.substr(ut+1,2),16);if(st<128)je+=String.fromCharCode(st),ut+=3;else if(st>=194&&st<224){if(St-ut>=6){var vn=parseInt(Je.substr(ut+4,2),16);je+=String.fromCharCode((st&31)<<6|vn&63)}else je+=Je.substr(ut,6);ut+=6}else if(st>=224){if(St-ut>=9){var Vn=parseInt(Je.substr(ut+4,2),16),li=parseInt(Je.substr(ut+7,2),16);je+=String.fromCharCode((st&15)<<12|(Vn&63)<<6|li&63)}else je+=Je.substr(ut,9);ut+=9}else je+=Je.substr(ut,3),ut+=3}return je}function ye(Je,je){function ut(St){var st=re(St);return st.match(je.UNRESERVED)?st:St}return Je.scheme&&(Je.scheme=String(Je.scheme).replace(je.PCT_ENCODED,ut).toLowerCase().replace(je.NOT_SCHEME,"")),Je.userinfo!==void 0&&(Je.userinfo=String(Je.userinfo).replace(je.PCT_ENCODED,ut).replace(je.NOT_USERINFO,ue).replace(je.PCT_ENCODED,i)),Je.host!==void 0&&(Je.host=String(Je.host).replace(je.PCT_ENCODED,ut).toLowerCase().replace(je.NOT_HOST,ue).replace(je.PCT_ENCODED,i)),Je.path!==void 0&&(Je.path=String(Je.path).replace(je.PCT_ENCODED,ut).replace(Je.scheme?je.NOT_PATH:je.NOT_PATH_NOSCHEME,ue).replace(je.PCT_ENCODED,i)),Je.query!==void 0&&(Je.query=String(Je.query).replace(je.PCT_ENCODED,ut).replace(je.NOT_QUERY,ue).replace(je.PCT_ENCODED,i)),Je.fragment!==void 0&&(Je.fragment=String(Je.fragment).replace(je.PCT_ENCODED,ut).replace(je.NOT_FRAGMENT,ue).replace(je.PCT_ENCODED,i)),Je}function X(Je){return Je.replace(/^0*(.*)/,"$1")||"0"}function he(Je,je){var ut=Je.match(je.IPV4ADDRESS)||[],St=c(ut,2),st=St[1];return st?st.split(".").map(X).join("."):Je}function ae(Je,je){var ut=Je.match(je.IPV6ADDRESS)||[],St=c(ut,3),st=St[1],vn=St[2];if(st){for(var Vn=st.toLowerCase().split("::").reverse(),li=c(Vn,2),Ir=li[0],gs=li[1],Pi=gs?gs.split(":").map(X):[],Bo=Ir.split(":").map(X),Gs=je.IPV4ADDRESS.test(Bo[Bo.length-1]),Cr=Gs?7:8,ni=Bo.length-Cr,Do=Array(Cr),No=0;No<Cr;++No)Do[No]=Pi[No]||Bo[ni+No]||"";Gs&&(Do[Cr-1]=he(Do[Cr-1],je));var Ou=Do.reduce(function(ui,ci,Mu){if(!ci||ci==="0"){var Da=ui[ui.length-1];Da&&Da.index+Da.length===Mu?Da.length++:ui.push({index:Mu,length:1})}return ui},[]),va=Ou.sort(function(ui,ci){return ci.length-ui.length})[0],Xs=void 0;if(va&&va.length>1){var Ei=Do.slice(0,va.index),fl=Do.slice(va.index+va.length);Xs=Ei.join(":")+"::"+fl.join(":")}else Xs=Do.join(":");return vn&&(Xs+="%"+vn),Xs}else return Je}var me=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Se="".match(/(){0}/)[1]===void 0;function ie(Je){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut={},St=je.iri!==!1?u:l;je.reference==="suffix"&&(Je=(je.scheme?je.scheme+":":"")+"//"+Je);var st=Je.match(me);if(st){Se?(ut.scheme=st[1],ut.userinfo=st[3],ut.host=st[4],ut.port=parseInt(st[5],10),ut.path=st[6]||"",ut.query=st[7],ut.fragment=st[8],isNaN(ut.port)&&(ut.port=st[5])):(ut.scheme=st[1]||void 0,ut.userinfo=Je.indexOf("@")!==-1?st[3]:void 0,ut.host=Je.indexOf("//")!==-1?st[4]:void 0,ut.port=parseInt(st[5],10),ut.path=st[6]||"",ut.query=Je.indexOf("?")!==-1?st[7]:void 0,ut.fragment=Je.indexOf("#")!==-1?st[8]:void 0,isNaN(ut.port)&&(ut.port=Je.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?st[4]:void 0)),ut.host&&(ut.host=ae(he(ut.host,St),St)),ut.scheme===void 0&&ut.userinfo===void 0&&ut.host===void 0&&ut.port===void 0&&!ut.path&&ut.query===void 0?ut.reference="same-document":ut.scheme===void 0?ut.reference="relative":ut.fragment===void 0?ut.reference="absolute":ut.reference="uri",je.reference&&je.reference!=="suffix"&&je.reference!==ut.reference&&(ut.error=ut.error||"URI is not a "+je.reference+" reference.");var vn=Oe[(je.scheme||ut.scheme||"").toLowerCase()];if(!je.unicodeSupport&&(!vn||!vn.unicodeSupport)){if(ut.host&&(je.domainHost||vn&&vn.domainHost))try{ut.host=xe.toASCII(ut.host.replace(St.PCT_ENCODED,re).toLowerCase())}catch(Vn){ut.error=ut.error||"Host's domain name can not be converted to ASCII via punycode: "+Vn}ye(ut,l)}else ye(ut,St);vn&&vn.parse&&vn.parse(ut,je)}else ut.error=ut.error||"URI can not be parsed.";return ut}function k(Je,je){var ut=je.iri!==!1?u:l,St=[];return Je.userinfo!==void 0&&(St.push(Je.userinfo),St.push("@")),Je.host!==void 0&&St.push(ae(he(String(Je.host),ut),ut).replace(ut.IPV6ADDRESS,function(st,vn,Vn){return"["+vn+(Vn?"%25"+Vn:"")+"]"})),(typeof Je.port=="number"||typeof Je.port=="string")&&(St.push(":"),St.push(String(Je.port))),St.length?St.join(""):void 0}var z=/^\.\.?\//,pe=/^\/\.(\/|$)/,te=/^\/\.\.(\/|$)/,H=/^\/?(?:.|\n)*?(?=\/|$)/;function ge(Je){for(var je=[];Je.length;)if(Je.match(z))Je=Je.replace(z,"");else if(Je.match(pe))Je=Je.replace(pe,"/");else if(Je.match(te))Je=Je.replace(te,"/"),je.pop();else if(Je==="."||Je==="..")Je="";else{var ut=Je.match(H);if(ut){var St=ut[0];Je=Je.slice(St.length),je.push(St)}else throw new Error("Unexpected dot segment condition")}return je.join("")}function be(Je){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut=je.iri?u:l,St=[],st=Oe[(je.scheme||Je.scheme||"").toLowerCase()];if(st&&st.serialize&&st.serialize(Je,je),Je.host&&!ut.IPV6ADDRESS.test(Je.host)){if(je.domainHost||st&&st.domainHost)try{Je.host=je.iri?xe.toUnicode(Je.host):xe.toASCII(Je.host.replace(ut.PCT_ENCODED,re).toLowerCase())}catch(li){Je.error=Je.error||"Host's domain name can not be converted to "+(je.iri?"Unicode":"ASCII")+" via punycode: "+li}}ye(Je,ut),je.reference!=="suffix"&&Je.scheme&&(St.push(Je.scheme),St.push(":"));var vn=k(Je,je);if(vn!==void 0&&(je.reference!=="suffix"&&St.push("//"),St.push(vn),Je.path&&Je.path.charAt(0)!=="/"&&St.push("/")),Je.path!==void 0){var Vn=Je.path;!je.absolutePath&&(!st||!st.absolutePath)&&(Vn=ge(Vn)),vn===void 0&&(Vn=Vn.replace(/^\/\//,"/%2F")),St.push(Vn)}return Je.query!==void 0&&(St.push("?"),St.push(Je.query)),Je.fragment!==void 0&&(St.push("#"),St.push(Je.fragment)),St.join("")}function Pe(Je,je){var ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},St=arguments[3],st={};return St||(Je=ie(be(Je,ut),ut),je=ie(be(je,ut),ut)),ut=ut||{},!ut.tolerant&&je.scheme?(st.scheme=je.scheme,st.userinfo=je.userinfo,st.host=je.host,st.port=je.port,st.path=ge(je.path||""),st.query=je.query):(je.userinfo!==void 0||je.host!==void 0||je.port!==void 0?(st.userinfo=je.userinfo,st.host=je.host,st.port=je.port,st.path=ge(je.path||""),st.query=je.query):(je.path?(je.path.charAt(0)==="/"?st.path=ge(je.path):((Je.userinfo!==void 0||Je.host!==void 0||Je.port!==void 0)&&!Je.path?st.path="/"+je.path:Je.path?st.path=Je.path.slice(0,Je.path.lastIndexOf("/")+1)+je.path:st.path=je.path,st.path=ge(st.path)),st.query=je.query):(st.path=Je.path,je.query!==void 0?st.query=je.query:st.query=Je.query),st.userinfo=Je.userinfo,st.host=Je.host,st.port=Je.port),st.scheme=Je.scheme),st.fragment=je.fragment,st}function pt(Je,je,ut){var St=s({scheme:"null"},ut);return be(Pe(ie(Je,St),ie(je,St),St,!0),St)}function Dt(Je,je){return typeof Je=="string"?Je=be(ie(Je,je),je):r(Je)==="object"&&(Je=ie(be(Je,je),je)),Je}function Qt(Je,je,ut){return typeof Je=="string"?Je=be(ie(Je,ut),ut):r(Je)==="object"&&(Je=be(Je,ut)),typeof je=="string"?je=be(ie(je,ut),ut):r(je)==="object"&&(je=be(je,ut)),Je===je}function dt(Je,je){return Je&&Je.toString().replace(!je||!je.iri?l.ESCAPE:u.ESCAPE,ue)}function mt(Je,je){return Je&&Je.toString().replace(!je||!je.iri?l.PCT_ENCODED:u.PCT_ENCODED,re)}var kt={scheme:"http",domainHost:!0,parse:function(je,ut){return je.host||(je.error=je.error||"HTTP URIs must have a host."),je},serialize:function(je,ut){var St=String(je.scheme).toLowerCase()==="https";return(je.port===(St?443:80)||je.port==="")&&(je.port=void 0),je.path||(je.path="/"),je}},Ln={scheme:"https",domainHost:kt.domainHost,parse:kt.parse,serialize:kt.serialize};function si(Je){return typeof Je.secure=="boolean"?Je.secure:String(Je.scheme).toLowerCase()==="wss"}var Ni={scheme:"ws",domainHost:!0,parse:function(je,ut){var St=je;return St.secure=si(St),St.resourceName=(St.path||"/")+(St.query?"?"+St.query:""),St.path=void 0,St.query=void 0,St},serialize:function(je,ut){if((je.port===(si(je)?443:80)||je.port==="")&&(je.port=void 0),typeof je.secure=="boolean"&&(je.scheme=je.secure?"wss":"ws",je.secure=void 0),je.resourceName){var St=je.resourceName.split("?"),st=c(St,2),vn=st[0],Vn=st[1];je.path=vn&&vn!=="/"?vn:void 0,je.query=Vn,je.resourceName=void 0}return je.fragment=void 0,je}},Yi={scheme:"wss",domainHost:Ni.domainHost,parse:Ni.parse,serialize:Ni.serialize},Go={},to=!0,Re="[A-Za-z0-9\\-\\.\\_\\~"+(to?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",ot="[0-9A-Fa-f]",it=n(n("%[EFef]"+ot+"%"+ot+ot+"%"+ot+ot)+"|"+n("%[89A-Fa-f]"+ot+"%"+ot+ot)+"|"+n("%"+ot+ot)),Lt="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Cn="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",On=e(Cn,'[\\"\\\\]'),_n="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ur=new RegExp(Re,"g"),Un=new RegExp(it,"g"),Fa=new RegExp(e("[^]",Lt,"[\\.]",'[\\"]',On),"g"),vl=new RegExp(e("[^]",Re,_n),"g"),Ud=vl;function sd(Je){var je=re(Je);return je.match(ur)?je:Je}var _c={scheme:"mailto",parse:function(je,ut){var St=je,st=St.to=St.path?St.path.split(","):[];if(St.path=void 0,St.query){for(var vn=!1,Vn={},li=St.query.split("&"),Ir=0,gs=li.length;Ir<gs;++Ir){var Pi=li[Ir].split("=");switch(Pi[0]){case"to":for(var Bo=Pi[1].split(","),Gs=0,Cr=Bo.length;Gs<Cr;++Gs)st.push(Bo[Gs]);break;case"subject":St.subject=mt(Pi[1],ut);break;case"body":St.body=mt(Pi[1],ut);break;default:vn=!0,Vn[mt(Pi[0],ut)]=mt(Pi[1],ut);break}}vn&&(St.headers=Vn)}St.query=void 0;for(var ni=0,Do=st.length;ni<Do;++ni){var No=st[ni].split("@");if(No[0]=mt(No[0]),ut.unicodeSupport)No[1]=mt(No[1],ut).toLowerCase();else try{No[1]=xe.toASCII(mt(No[1],ut).toLowerCase())}catch(Ou){St.error=St.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ou}st[ni]=No.join("@")}return St},serialize:function(je,ut){var St=je,st=o(je.to);if(st){for(var vn=0,Vn=st.length;vn<Vn;++vn){var li=String(st[vn]),Ir=li.lastIndexOf("@"),gs=li.slice(0,Ir).replace(Un,sd).replace(Un,i).replace(Fa,ue),Pi=li.slice(Ir+1);try{Pi=ut.iri?xe.toUnicode(Pi):xe.toASCII(mt(Pi,ut).toLowerCase())}catch(ni){St.error=St.error||"Email address's domain name can not be converted to "+(ut.iri?"Unicode":"ASCII")+" via punycode: "+ni}st[vn]=gs+"@"+Pi}St.path=st.join(",")}var Bo=je.headers=je.headers||{};je.subject&&(Bo.subject=je.subject),je.body&&(Bo.body=je.body);var Gs=[];for(var Cr in Bo)Bo[Cr]!==Go[Cr]&&Gs.push(Cr.replace(Un,sd).replace(Un,i).replace(vl,ue)+"="+Bo[Cr].replace(Un,sd).replace(Un,i).replace(Ud,ue));return Gs.length&&(St.query=Gs.join("&")),St}},Nu=/^([^\:]+)\:(.*)/,Ca={scheme:"urn",parse:function(je,ut){var St=je.path&&je.path.match(Nu),st=je;if(St){var vn=ut.scheme||st.scheme||"urn",Vn=St[1].toLowerCase(),li=St[2],Ir=vn+":"+(ut.nid||Vn),gs=Oe[Ir];st.nid=Vn,st.nss=li,st.path=void 0,gs&&(st=gs.parse(st,ut))}else st.error=st.error||"URN can not be parsed.";return st},serialize:function(je,ut){var St=ut.scheme||je.scheme||"urn",st=je.nid,vn=St+":"+(ut.nid||st),Vn=Oe[vn];Vn&&(je=Vn.serialize(je,ut));var li=je,Ir=je.nss;return li.path=(st||ut.nid)+":"+Ir,li}},dl=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Gd={scheme:"urn:uuid",parse:function(je,ut){var St=je;return St.uuid=St.nss,St.nss=void 0,!ut.tolerant&&(!St.uuid||!St.uuid.match(dl))&&(St.error=St.error||"UUID is not valid."),St},serialize:function(je,ut){var St=je;return St.nss=(je.uuid||"").toLowerCase(),St}};Oe[kt.scheme]=kt,Oe[Ln.scheme]=Ln,Oe[Ni.scheme]=Ni,Oe[Yi.scheme]=Yi,Oe[_c.scheme]=_c,Oe[Ca.scheme]=Ca,Oe[Gd.scheme]=Gd,t.SCHEMES=Oe,t.pctEncChar=ue,t.pctDecChars=re,t.parse=ie,t.removeDotSegments=ge,t.serialize=be,t.resolveComponents=Pe,t.resolve=pt,t.normalize=Dt,t.equal=Qt,t.escapeComponent=dt,t.unescapeComponent=mt,Object.defineProperty(t,"__esModule",{value:!0})})});var X8=b((uXr,Hat)=>{"use strict";Hat.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Vat=b((cXr,qat)=>{"use strict";qat.exports=function(e){for(var n=0,r=e.length,i=0,o;i<r;)n++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=e.charCodeAt(i),(o&64512)==56320&&i++);return n}});var QN=b((dXr,jat)=>{"use strict";jat.exports={copy:RLn,checkDataType:e_e,checkDataTypes:BLn,coerceToTypes:NLn,toHash:n_e,getProperty:r_e,escapeQuotes:i_e,equal:X8(),ucs2length:Vat(),varOccurences:FLn,varReplace:LLn,schemaHasRules:PLn,schemaHasRulesExcept:QLn,schemaUnknownRules:kLn,toQuotedString:t_e,getPathExpr:ULn,getPath:GLn,getData:VLn,unescapeFragment:$Ln,unescapeJsonPointer:s_e,escapeFragment:YLn,escapeJsonPointer:o_e};function RLn(t,e){e=e||{};for(var n in t)e[n]=t[n];return e}function e_e(t,e,n,r){var i=r?" !== ":" === ",o=r?" || ":" && ",s=r?"!":"",a=r?"":"!";switch(t){case"null":return e+i+"null";case"array":return s+"Array.isArray("+e+")";case"object":return"("+s+e+o+"typeof "+e+i+'"object"'+o+a+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+i+'"number"'+o+a+"("+e+" % 1)"+o+e+i+e+(n?o+s+"isFinite("+e+")":"")+")";case"number":return"(typeof "+e+i+'"'+t+'"'+(n?o+s+"isFinite("+e+")":"")+")";default:return"typeof "+e+i+'"'+t+'"'}}function BLn(t,e,n){switch(t.length){case 1:return e_e(t[0],e,n,!0);default:var r="",i=n_e(t);i.array&&i.object&&(r=i.null?"(":"(!"+e+" || ",r+="typeof "+e+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer;for(var o in i)r+=(r?" && ":"")+e_e(o,e,n,!0);return r}}var $at=n_e(["string","number","integer","boolean","null"]);function NLn(t,e){if(Array.isArray(e)){for(var n=[],r=0;r<e.length;r++){var i=e[r];($at[i]||t==="array"&&i==="array")&&(n[n.length]=i)}if(n.length)return n}else{if($at[e])return[e];if(t==="array"&&e==="array")return["array"]}}function n_e(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}var OLn=/^[a-z$_][a-z$_0-9]*$/i,MLn=/'|\\/g;function r_e(t){return typeof t=="number"?"["+t+"]":OLn.test(t)?"."+t:"['"+i_e(t)+"']"}function i_e(t){return t.replace(MLn,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function FLn(t,e){e+="[^0-9]";var n=t.match(new RegExp(e,"g"));return n?n.length:0}function LLn(t,e,n){return e+="([^0-9])",n=n.replace(/\$/g,"$$$$"),t.replace(new RegExp(e,"g"),n+"$1")}function PLn(t,e){if(typeof t=="boolean")return!t;for(var n in t)if(e[n])return!0}function QLn(t,e,n){if(typeof t=="boolean")return!t&&n!="not";for(var r in t)if(r!=n&&e[r])return!0}function kLn(t,e){if(typeof t!="boolean"){for(var n in t)if(!e[n])return n}}function t_e(t){return"'"+i_e(t)+"'"}function ULn(t,e,n,r){var i=n?"'/' + "+e+(r?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):r?"'[' + "+e+" + ']'":"'[\\'' + "+e+" + '\\']'";return Yat(t,i)}function GLn(t,e,n){var r=t_e(n?"/"+o_e(e):r_e(e));return Yat(t,r)}var HLn=/^\/(?:[^~]|~0|~1)*$/,qLn=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function VLn(t,e,n){var r,i,o,s;if(t==="")return"rootData";if(t[0]=="/"){if(!HLn.test(t))throw new Error("Invalid JSON-pointer: "+t);i=t,o="rootData"}else{if(s=t.match(qLn),!s)throw new Error("Invalid JSON-pointer: "+t);if(r=+s[1],i=s[2],i=="#"){if(r>=e)throw new Error("Cannot access property/index "+r+" levels up, current level is "+e);return n[e-r]}if(r>e)throw new Error("Cannot access data "+r+" levels up, current level is "+e);if(o="data"+(e-r||""),!i)return o}for(var a=o,l=i.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(o+=r_e(s_e(c)),a+=" && "+o)}return a}function Yat(t,e){return t=='""'?e:(t+" + "+e).replace(/([^\\])' \+ '/g,"$1")}function $Ln(t){return s_e(decodeURIComponent(t))}function YLn(t){return encodeURIComponent(o_e(t))}function o_e(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function s_e(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}});var a_e=b((fXr,Wat)=>{"use strict";var jLn=QN();Wat.exports=WLn;function WLn(t){jLn.copy(t,this)}});var Jat=b((pXr,zat)=>{"use strict";var fx=zat.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};eee(e,r,i,t,"",t)};fx.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};fx.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};fx.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};fx.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 eee(t,e,n,r,i,o,s,a,l,u){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,l,u);for(var c in r){var d=r[c];if(Array.isArray(d)){if(c in fx.arrayKeywords)for(var h=0;h<d.length;h++)eee(t,e,n,d[h],i+"/"+c+"/"+h,o,i,c,r,h)}else if(c in fx.propsKeywords){if(d&&typeof d=="object")for(var m in d)eee(t,e,n,d[m],i+"/"+c+"/"+zLn(m),o,i,c,r,m)}else(c in fx.keywords||t.allKeys&&!(c in fx.skipKeywords))&&eee(t,e,n,d,i+"/"+c,o,i,c,r)}n(r,i,o,s,a,l,u)}}function zLn(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var see=b((hXr,elt)=>{"use strict";var yG=Gat(),Kat=X8(),iee=QN(),tee=a_e(),JLn=Jat();elt.exports=hx;hx.normalizeId=px;hx.fullPath=nee;hx.url=ree;hx.ids=tPn;hx.inlineRef=l_e;hx.schema=oee;function hx(t,e,n){var r=this._refs[n];if(typeof r=="string")if(this._refs[r])r=this._refs[r];else return hx.call(this,t,e,r);if(r=r||this._schemas[n],r instanceof tee)return l_e(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i=oee.call(this,e,n),o,s,a;return i&&(o=i.schema,e=i.root,a=i.baseId),o instanceof tee?s=o.validate||t.call(this,o.schema,e,void 0,a):o!==void 0&&(s=l_e(o,this._opts.inlineRefs)?o:t.call(this,o,e,void 0,a)),s}function oee(t,e){var n=yG.parse(e),r=Zat(n),i=nee(this._getId(t.schema));if(Object.keys(t.schema).length===0||r!==i){var o=px(r),s=this._refs[o];if(typeof s=="string")return KLn.call(this,t,s,n);if(s instanceof tee)s.validate||this._compile(s),t=s;else if(s=this._schemas[o],s instanceof tee){if(s.validate||this._compile(s),o==px(e))return{schema:s,root:t,baseId:i};t=s}else return;if(!t.schema)return;i=nee(this._getId(t.schema))}return Xat.call(this,n,i,t.schema,t)}function KLn(t,e,n){var r=oee.call(this,t,e);if(r){var i=r.schema,o=r.baseId;t=r.root;var s=this._getId(i);return s&&(o=ree(o,s)),Xat.call(this,n,o,i,t)}}var XLn=iee.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Xat(t,e,n,r){if(t.fragment=t.fragment||"",t.fragment.slice(0,1)=="/"){for(var i=t.fragment.split("/"),o=1;o<i.length;o++){var s=i[o];if(s){if(s=iee.unescapeFragment(s),n=n[s],n===void 0)break;var a;if(!XLn[s]&&(a=this._getId(n),a&&(e=ree(e,a)),n.$ref)){var l=ree(e,n.$ref),u=oee.call(this,r,l);u&&(n=u.schema,r=u.root,e=u.baseId)}}}if(n!==void 0&&n!==r.schema)return{schema:n,root:r,baseId:e}}}var ZLn=iee.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function l_e(t,e){if(e===!1)return!1;if(e===void 0||e===!0)return u_e(t);if(e)return c_e(t)<=e}function u_e(t){var e;if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(e=t[n],typeof e=="object"&&!u_e(e))return!1}else for(var r in t)if(r=="$ref"||(e=t[r],typeof e=="object"&&!u_e(e)))return!1;return!0}function c_e(t){var e=0,n;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(n=t[r],typeof n=="object"&&(e+=c_e(n)),e==1/0)return 1/0}else for(var i in t){if(i=="$ref")return 1/0;if(ZLn[i])e++;else if(n=t[i],typeof n=="object"&&(e+=c_e(n)+1),e==1/0)return 1/0}return e}function nee(t,e){e!==!1&&(t=px(t));var n=yG.parse(t);return Zat(n)}function Zat(t){return yG.serialize(t).split("#")[0]+"#"}var ePn=/#\/?$/;function px(t){return t?t.replace(ePn,""):""}function ree(t,e){return e=px(e),yG.resolve(t,e)}function tPn(t){var e=px(this._getId(t)),n={"":e},r={"":nee(e,!1)},i={},o=this;return JLn(t,{allKeys:!0},function(s,a,l,u,c,d,h){if(a!==""){var m=o._getId(s),E=n[u],y=r[u]+"/"+c;if(h!==void 0&&(y+="/"+(typeof h=="number"?h:iee.escapeFragment(h))),typeof m=="string"){m=E=px(E?yG.resolve(E,m):m);var C=o._refs[m];if(typeof C=="string"&&(C=o._refs[C]),C&&C.schema){if(!Kat(s,C.schema))throw new Error('id "'+m+'" resolves to more than one schema')}else if(m!=px(y))if(m[0]=="#"){if(i[m]&&!Kat(s,i[m]))throw new Error('id "'+m+'" resolves to more than one schema');i[m]=s}else o._refs[m]=y}n[a]=E,r[a]=y}}),i}});var aee=b((mXr,nlt)=>{"use strict";var d_e=see();nlt.exports={Validation:tlt(nPn),MissingRef:tlt(f_e)};function nPn(t){this.message="validation failed",this.errors=t,this.ajv=this.validation=!0}f_e.message=function(t,e){return"can't resolve reference "+e+" from id "+t};function f_e(t,e,n){this.message=n||f_e.message(t,e),this.missingRef=d_e.url(t,e),this.missingSchema=d_e.normalizeId(d_e.fullPath(this.missingRef))}function tlt(t){return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}});var p_e=b((AXr,rlt)=>{"use strict";rlt.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var n=typeof e.cycles=="boolean"?e.cycles:!1,r=e.cmp&&function(o){return function(s){return function(a,l){var u={key:a,value:s[a]},c={key:l,value:s[l]};return o(u,c)}}}(e.cmp),i=[];return function o(s){if(s&&s.toJSON&&typeof s.toJSON=="function"&&(s=s.toJSON()),s!==void 0){if(typeof s=="number")return isFinite(s)?""+s:"null";if(typeof s!="object")return JSON.stringify(s);var a,l;if(Array.isArray(s)){for(l="[",a=0;a<s.length;a++)a&&(l+=","),l+=o(s[a])||"null";return l+"]"}if(s===null)return"null";if(i.indexOf(s)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var u=i.push(s)-1,c=Object.keys(s).sort(r&&r(s));for(l="",a=0;a<c.length;a++){var d=c[a],h=o(s[d]);h&&(l&&(l+=","),l+=JSON.stringify(d)+":"+h)}return i.splice(u,1),"{"+l+"}"}}(t)}});var h_e=b((gXr,ilt)=>{"use strict";ilt.exports=function(e,n,r){var i="",o=e.schema.$async===!0,s=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),a=e.self._getId(e.schema);if(e.opts.strictKeywords){var l=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(l){var u="unknown keyword: "+l;if(e.opts.strictKeywords==="log")e.logger.warn(u);else throw new Error(u)}}if(e.isTop&&(i+=" var validate = ",o&&(e.async=!0,i+="async "),i+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(e.opts.sourceCode||e.opts.processCode)&&(i+=" "+("/*# sourceURL="+a+" */")+" ")),typeof e.schema=="boolean"||!(s||e.schema.$ref)){var n="false schema",c=e.level,d=e.dataLevel,h=e.schema[n],m=e.schemaPath+e.util.getProperty(n),E=e.errSchemaPath+"/"+n,F=!e.opts.allErrors,j,y="data"+(d||""),R="valid"+c;if(e.schema===!1){e.isTop?F=!0:i+=" var "+R+" = false; ";var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'boolean schema is false' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?o?i+=" return data; ":i+=" validate.errors = null; return true; ":i+=" var "+R+" = true; ";return e.isTop&&(i+=" }; return validate; "),i}if(e.isTop){var w=e.isTop,c=e.level=0,d=e.dataLevel=0,y="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var B="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(B);else throw new Error(B)}i+=" var vErrors = null; ",i+=" var errors = 0; ",i+=" if (rootData === undefined) rootData = data; "}else{var c=e.level,d=e.dataLevel,y="data"+(d||"");if(a&&(e.baseId=e.resolve.url(e.baseId,a)),o&&!e.async)throw new Error("async schema in sync schema");i+=" var errs_"+c+" = errors;"}var R="valid"+c,F=!e.opts.allErrors,q="",J="",j,L=e.schema.type,K=Array.isArray(L);if(L&&e.opts.nullable&&e.schema.nullable===!0&&(K?L.indexOf("null")==-1&&(L=L.concat("null")):L!="null"&&(L=[L,"null"],K=!0)),K&&L.length==1&&(L=L[0],K=!1),e.schema.$ref&&s){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(s=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(i+=" "+e.RULES.all.$comment.code(e,"$comment")),L){if(e.opts.coerceTypes)var U=e.util.coerceToTypes(e.opts.coerceTypes,L);var se=e.RULES.types[L];if(U||K||se===!0||se&&!H(se)){var m=e.schemaPath+".type",E=e.errSchemaPath+"/type",m=e.schemaPath+".type",E=e.errSchemaPath+"/type",V=K?"checkDataTypes":"checkDataType";if(i+=" if ("+e.util[V](L,y,e.opts.strictNumbers,!0)+") { ",U){var O="dataType"+c,Y="coerced"+c;i+=" var "+O+" = typeof "+y+"; var "+Y+" = undefined; ",e.opts.coerceTypes=="array"&&(i+=" if ("+O+" == 'object' && Array.isArray("+y+") && "+y+".length == 1) { "+y+" = "+y+"[0]; "+O+" = typeof "+y+"; if ("+e.util.checkDataType(e.schema.type,y,e.opts.strictNumbers)+") "+Y+" = "+y+"; } "),i+=" if ("+Y+" !== undefined) ; ";var ee=U;if(ee)for(var ne,Ae=-1,ve=ee.length-1;Ae<ve;)ne=ee[Ae+=1],ne=="string"?i+=" else if ("+O+" == 'number' || "+O+" == 'boolean') "+Y+" = '' + "+y+"; else if ("+y+" === null) "+Y+" = ''; ":ne=="number"||ne=="integer"?(i+=" else if ("+O+" == 'boolean' || "+y+" === null || ("+O+" == 'string' && "+y+" && "+y+" == +"+y+" ",ne=="integer"&&(i+=" && !("+y+" % 1)"),i+=")) "+Y+" = +"+y+"; "):ne=="boolean"?i+=" else if ("+y+" === 'false' || "+y+" === 0 || "+y+" === null) "+Y+" = false; else if ("+y+" === 'true' || "+y+" === 1) "+Y+" = true; ":ne=="null"?i+=" else if ("+y+" === '' || "+y+" === 0 || "+y+" === false) "+Y+" = null; ":e.opts.coerceTypes=="array"&&ne=="array"&&(i+=" else if ("+O+" == 'string' || "+O+" == 'number' || "+O+" == 'boolean' || "+y+" == null) "+Y+" = ["+y+"]; ");i+=" else { ";var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",K?i+=""+L.join(","):i+=""+L,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",K?i+=""+L.join(","):i+=""+L,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } if ("+Y+" !== undefined) { ";var De=d?"data"+(d-1||""):"parentData",Ue=d?e.dataPathArr[d]:"parentDataProperty";i+=" "+y+" = "+Y+"; ",d||(i+="if ("+De+" !== undefined)"),i+=" "+De+"["+Ue+"] = "+Y+"; } "}else{var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",K?i+=""+L.join(","):i+=""+L,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",K?i+=""+L.join(","):i+=""+L,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" } "}}if(e.schema.$ref&&!s)i+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",F&&(i+=" } if (errors === ",w?i+="0":i+="errs_"+c,i+=") { ",J+="}");else{var qe=e.RULES;if(qe){for(var se,Ie=-1,xe=qe.length-1;Ie<xe;)if(se=qe[Ie+=1],H(se)){if(se.type&&(i+=" if ("+e.util.checkDataType(se.type,y,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(se.type=="object"&&e.schema.properties){var h=e.schema.properties,Oe=Object.keys(h),ue=Oe;if(ue)for(var re,ye=-1,X=ue.length-1;ye<X;){re=ue[ye+=1];var he=h[re];if(he.default!==void 0){var ae=y+e.util.getProperty(re);if(e.compositeRule){if(e.opts.strictDefaults){var B="default is ignored for: "+ae;if(e.opts.strictDefaults==="log")e.logger.warn(B);else throw new Error(B)}}else i+=" if ("+ae+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+ae+" === null || "+ae+" === '' "),i+=" ) "+ae+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(he.default)+" ":i+=" "+JSON.stringify(he.default)+" ",i+="; "}}}else if(se.type=="array"&&Array.isArray(e.schema.items)){var me=e.schema.items;if(me){for(var he,Ae=-1,Se=me.length-1;Ae<Se;)if(he=me[Ae+=1],he.default!==void 0){var ae=y+"["+Ae+"]";if(e.compositeRule){if(e.opts.strictDefaults){var B="default is ignored for: "+ae;if(e.opts.strictDefaults==="log")e.logger.warn(B);else throw new Error(B)}}else i+=" if ("+ae+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+ae+" === null || "+ae+" === '' "),i+=" ) "+ae+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(he.default)+" ":i+=" "+JSON.stringify(he.default)+" ",i+="; "}}}}var ie=se.rules;if(ie){for(var k,z=-1,pe=ie.length-1;z<pe;)if(k=ie[z+=1],ge(k)){var te=k.code(e,k.keyword,se.type);te&&(i+=" "+te+" ",F&&(q+="}"))}}if(F&&(i+=" "+q+" ",q=""),se.type&&(i+=" } ",L&&L===se.type&&!U)){i+=" else { ";var m=e.schemaPath+".type",E=e.errSchemaPath+"/type",C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(j||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(E)+" , params: { type: '",K?i+=""+L.join(","):i+=""+L,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",K?i+=""+L.join(","):i+=""+L,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}F&&(i+=" if (errors === ",w?i+="0":i+="errs_"+c,i+=") { ",J+="}")}}}F&&(i+=" "+J+" "),w?(o?(i+=" if (errors === 0) return data; ",i+=" else throw new ValidationError(vErrors); "):(i+=" validate.errors = vErrors; ",i+=" return errors === 0; "),i+=" }; return validate;"):i+=" var "+R+" = errors === errs_"+c+";";function H(Pe){for(var pt=Pe.rules,Dt=0;Dt<pt.length;Dt++)if(ge(pt[Dt]))return!0}function ge(Pe){return e.schema[Pe.keyword]!==void 0||Pe.implements&&be(Pe)}function be(Pe){for(var pt=Pe.implements,Dt=0;Dt<pt.length;Dt++)if(e.schema[pt[Dt]]!==void 0)return!0}return i}});var ult=b((EXr,llt)=>{"use strict";var lee=see(),cee=QN(),slt=aee(),rPn=p_e(),olt=h_e(),iPn=cee.ucs2length,oPn=X8(),sPn=slt.Validation;llt.exports=m_e;function m_e(t,e,n,r){var i=this,o=this._opts,s=[void 0],a={},l=[],u={},c=[],d={},h=[];e=e||{schema:t,refVal:s,refs:a};var m=aPn.call(this,t,e,r),E=this._compilations[m.index];if(m.compiling)return E.callValidate=B;var y=this._formats,C=this.RULES;try{var _=R(t,e,n,r);E.validate=_;var w=E.callValidate;return w&&(w.schema=_.schema,w.errors=null,w.refs=_.refs,w.refVal=_.refVal,w.root=_.root,w.$async=_.$async,o.sourceCode&&(w.source=_.source)),_}finally{lPn.call(this,t,e,r)}function B(){var V=E.validate,O=V.apply(this,arguments);return B.errors=V.errors,O}function R(V,O,Y,ee){var ne=!O||O&&O.schema==V;if(O.schema!=e.schema)return m_e.call(i,V,O,Y,ee);var Ae=V.$async===!0,ve=olt({isTop:!0,schema:V,isRoot:ne,baseId:ee,root:O,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:slt.MissingRef,RULES:C,validate:olt,util:cee,resolve:lee,resolveRef:F,usePattern:K,useDefault:U,useCustomRule:se,opts:o,formats:y,logger:i.logger,self:i});ve=uee(s,dPn)+uee(l,uPn)+uee(c,cPn)+uee(h,fPn)+ve,o.processCode&&(ve=o.processCode(ve,V));var De;try{var Ue=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",ve);De=Ue(i,C,y,e,s,c,h,oPn,iPn,sPn),s[0]=De}catch(qe){throw i.logger.error("Error compiling schema, function code:",ve),qe}return De.schema=V,De.errors=null,De.refs=a,De.refVal=s,De.root=ne?De:O,Ae&&(De.$async=!0),o.sourceCode===!0&&(De.source={code:ve,patterns:l,defaults:c}),De}function F(V,O,Y){O=lee.url(V,O);var ee=a[O],ne,Ae;if(ee!==void 0)return ne=s[ee],Ae="refVal["+ee+"]",L(ne,Ae);if(!Y&&e.refs){var ve=e.refs[O];if(ve!==void 0)return ne=e.refVal[ve],Ae=q(O,ne),L(ne,Ae)}Ae=q(O);var De=lee.call(i,R,e,O);if(De===void 0){var Ue=n&&n[O];Ue&&(De=lee.inlineRef(Ue,o.inlineRefs)?Ue:m_e.call(i,Ue,e,n,V))}if(De===void 0)J(O);else return j(O,De),L(De,Ae)}function q(V,O){var Y=s.length;return s[Y]=O,a[V]=Y,"refVal"+Y}function J(V){delete a[V]}function j(V,O){var Y=a[V];s[Y]=O}function L(V,O){return typeof V=="object"||typeof V=="boolean"?{code:O,schema:V,inline:!0}:{code:O,$async:V&&!!V.$async}}function K(V){var O=u[V];return O===void 0&&(O=u[V]=l.length,l[O]=V),"pattern"+O}function U(V){switch(typeof V){case"boolean":case"number":return""+V;case"string":return cee.toQuotedString(V);case"object":if(V===null)return"null";var O=rPn(V),Y=d[O];return Y===void 0&&(Y=d[O]=c.length,c[Y]=V),"default"+Y}}function se(V,O,Y,ee){if(i._opts.validateSchema!==!1){var ne=V.definition.dependencies;if(ne&&!ne.every(function(ue){return Object.prototype.hasOwnProperty.call(Y,ue)}))throw new Error("parent schema must have all required keywords: "+ne.join(","));var Ae=V.definition.validateSchema;if(Ae){var ve=Ae(O);if(!ve){var De="keyword schema is invalid: "+i.errorsText(Ae.errors);if(i._opts.validateSchema=="log")i.logger.error(De);else throw new Error(De)}}}var Ue=V.definition.compile,qe=V.definition.inline,Ie=V.definition.macro,xe;if(Ue)xe=Ue.call(i,O,Y,ee);else if(Ie)xe=Ie.call(i,O,Y,ee),o.validateSchema!==!1&&i.validateSchema(xe,!0);else if(qe)xe=qe.call(i,ee,V.keyword,O,Y);else if(xe=V.definition.validate,!xe)return;if(xe===void 0)throw new Error('custom keyword "'+V.keyword+'"failed to compile');var Oe=h.length;return h[Oe]=xe,{code:"customRule"+Oe,validate:xe}}}function aPn(t,e,n){var r=alt.call(this,t,e,n);return r>=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:t,root:e,baseId:n},{index:r,compiling:!1})}function lPn(t,e,n){var r=alt.call(this,t,e,n);r>=0&&this._compilations.splice(r,1)}function alt(t,e,n){for(var r=0;r<this._compilations.length;r++){var i=this._compilations[r];if(i.schema==t&&i.root==e&&i.baseId==n)return r}return-1}function uPn(t,e){return"var pattern"+t+" = new RegExp("+cee.toQuotedString(e[t])+");"}function cPn(t){return"var default"+t+" = defaults["+t+"];"}function dPn(t,e){return e[t]===void 0?"":"var refVal"+t+" = refVal["+t+"];"}function fPn(t){return"var customRule"+t+" = customRules["+t+"];"}function uee(t,e){if(!t.length)return"";for(var n="",r=0;r<t.length;r++)n+=e(r,t);return n}});var dlt=b((yXr,clt)=>{"use strict";var dee=clt.exports=function(){this._cache={}};dee.prototype.put=function(e,n){this._cache[e]=n};dee.prototype.get=function(e){return this._cache[e]};dee.prototype.del=function(e){delete this._cache[e]};dee.prototype.clear=function(){this._cache={}}});var Slt=b((CXr,Dlt)=>{"use strict";var pPn=QN(),hPn=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,mPn=[0,31,28,31,30,31,30,31,31,30,31,30,31],APn=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,flt=/^(?=.{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,gPn=/^(?:[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,EPn=/^(?:[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,plt=/^(?:(?:[^\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,hlt=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,mlt=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Alt=/^(?:\/(?:[^~/]|~0|~1)*)*$/,glt=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Elt=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Dlt.exports=fee;function fee(t){return t=t=="full"?"full":"fast",pPn.copy(fee[t])}fee.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\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,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":plt,url:hlt,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,hostname:flt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:vlt,uuid:mlt,"json-pointer":Alt,"json-pointer-uri-fragment":glt,"relative-json-pointer":Elt};fee.full={date:ylt,time:Clt,"date-time":vPn,uri:SPn,"uri-reference":EPn,"uri-template":plt,url:hlt,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:flt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:vlt,uuid:mlt,"json-pointer":Alt,"json-pointer-uri-fragment":glt,"relative-json-pointer":Elt};function yPn(t){return t%4===0&&(t%100!==0||t%400===0)}function ylt(t){var e=t.match(hPn);if(!e)return!1;var n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&yPn(n)?29:mPn[r])}function Clt(t,e){var n=t.match(APn);if(!n)return!1;var r=n[1],i=n[2],o=n[3],s=n[5];return(r<=23&&i<=59&&o<=59||r==23&&i==59&&o==60)&&(!e||s)}var CPn=/t|\s/i;function vPn(t){var e=t.split(CPn);return e.length==2&&ylt(e[0])&&Clt(e[1],!0)}var DPn=/\/|:/;function SPn(t){return DPn.test(t)&&gPn.test(t)}var _Pn=/[^\\]\\Z/;function vlt(t){if(_Pn.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Ilt=b((vXr,_lt)=>{"use strict";_lt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.errSchemaPath+"/"+n,u=!e.opts.allErrors,c="data"+(s||""),d="valid"+o,h,m;if(a=="#"||a=="#/")e.isRoot?(h=e.async,m="validate"):(h=e.root.schema.$async===!0,m="root.refVal[0]");else{var E=e.resolveRef(e.baseId,a,e.isRoot);if(E===void 0){var y=e.MissingRefError.message(e.baseId,a);if(e.opts.missingRefs=="fail"){e.logger.error(y);var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(a)+"' } ",e.opts.messages!==!1&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(a)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var _=i;i=C.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(y),u&&(i+=" if (true) { ");else throw new e.MissingRefError(e.baseId,a,y)}else if(E.inline){var w=e.util.copy(e);w.level++;var B="valid"+w.level;w.schema=E.schema,w.schemaPath="",w.errSchemaPath=a;var R=e.validate(w).replace(/validate\.schema/g,E.code);i+=" "+R+" ",u&&(i+=" if ("+B+") { ")}else h=E.$async===!0||e.async&&E.$async!==!1,m=E.code}if(m){var C=C||[];C.push(i),i="",e.opts.passContext?i+=" "+m+".call(this, ":i+=" "+m+"( ",i+=" "+c+", (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var F=s?"data"+(s-1||""):"parentData",q=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+F+" , "+q+", rootData) ";var J=i;if(i=C.pop(),h){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+d+"; "),i+=" try { await "+J+"; ",u&&(i+=" "+d+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+d+" = false; "),i+=" } ",u&&(i+=" if ("+d+") { ")}else i+=" if (!"+J+") { if (vErrors === null) vErrors = "+m+".errors; else vErrors = vErrors.concat("+m+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i}});var blt=b((DXr,Tlt)=>{"use strict";Tlt.exports=function(e,n,r){var i=" ",o=e.schema[n],s=e.schemaPath+e.util.getProperty(n),a=e.errSchemaPath+"/"+n,l=!e.opts.allErrors,u=e.util.copy(e),c="";u.level++;var d="valid"+u.level,h=u.baseId,m=!0,E=o;if(E)for(var y,C=-1,_=E.length-1;C<_;)y=E[C+=1],(e.opts.strictKeywords?typeof y=="object"&&Object.keys(y).length>0||y===!1:e.util.schemaHasRules(y,e.RULES.all))&&(m=!1,u.schema=y,u.schemaPath=s+"["+C+"]",u.errSchemaPath=a+"/"+C,i+=" "+e.validate(u)+" ",u.baseId=h,l&&(i+=" if ("+d+") { ",c+="}"));return l&&(m?i+=" if (true) { ":i+=" "+c.slice(0,-1)+" "),i}});var wlt=b((SXr,xlt)=>{"use strict";xlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_=a.every(function(j){return e.opts.strictKeywords?typeof j=="object"&&Object.keys(j).length>0||j===!1:e.util.schemaHasRules(j,e.RULES.all)});if(_){var w=E.baseId;i+=" var "+m+" = errors; var "+h+" = false; ";var B=e.compositeRule;e.compositeRule=E.compositeRule=!0;var R=a;if(R)for(var F,q=-1,J=R.length-1;q<J;)F=R[q+=1],E.schema=F,E.schemaPath=l+"["+q+"]",E.errSchemaPath=u+"/"+q,i+=" "+e.validate(E)+" ",E.baseId=w,i+=" "+h+" = "+h+" || "+C+"; if (!"+h+") { ",y+="}";e.compositeRule=E.compositeRule=B,i+=" "+y+" if (!"+h+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else c&&(i+=" if (true) { ");return i}});var Blt=b((_Xr,Rlt)=>{"use strict";Rlt.exports=function(e,n,r){var i=" ",o=e.schema[n],s=e.errSchemaPath+"/"+n,a=!e.opts.allErrors,l=e.util.toQuotedString(o);return e.opts.$comment===!0?i+=" console.log("+l+");":typeof e.opts.$comment=="function"&&(i+=" self._opts.$comment("+l+", "+e.util.toQuotedString(s)+", validate.root.schema);"),i}});var Olt=b((IXr,Nlt)=>{"use strict";Nlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a,m||(i+=" var schema"+o+" = validate.schema"+l+";"),i+="var "+h+" = equal("+d+", schema"+o+"); if (!"+h+") { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+o+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var C=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Flt=b((TXr,Mlt)=>{"use strict";Mlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_="i"+o,w=E.dataLevel=e.dataLevel+1,B="data"+w,R=e.baseId,F=e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all);if(i+="var "+m+" = errors;var "+h+";",F){var q=e.compositeRule;e.compositeRule=E.compositeRule=!0,E.schema=a,E.schemaPath=l,E.errSchemaPath=u,i+=" var "+C+" = false; for (var "+_+" = 0; "+_+" < "+d+".length; "+_+"++) { ",E.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0);var J=d+"["+_+"]";E.dataPathArr[w]=_;var j=e.validate(E);E.baseId=R,e.util.varOccurences(j,B)<2?i+=" "+e.util.varReplace(j,B,J)+" ":i+=" var "+B+" = "+J+"; "+j+" ",i+=" if ("+C+") break; } ",e.compositeRule=E.compositeRule=q,i+=" "+y+" if (!"+C+") {"}else i+=" if ("+d+".length == 0) {";var L=L||[];L.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var K=i;return i=L.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+K+"]); ":i+=" validate.errors = ["+K+"]; return false; ":i+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",F&&(i+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i}});var Plt=b((bXr,Llt)=>{"use strict";Llt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e),E="";m.level++;var y="valid"+m.level,C={},_={},w=e.opts.ownProperties;for(q in a)if(q!="__proto__"){var B=a[q],R=Array.isArray(B)?_:C;R[q]=B}i+="var "+h+" = errors;";var F=e.errorPath;i+="var missing"+o+";";for(var q in _)if(R=_[q],R.length){if(i+=" if ( "+d+e.util.getProperty(q)+" !== undefined ",w&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(q)+"') "),c){i+=" && ( ";var J=R;if(J)for(var j,L=-1,K=J.length-1;L<K;){j=J[L+=1],L&&(i+=" || ");var U=e.util.getProperty(j),se=d+U;i+=" ( ( "+se+" === undefined ",w&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(j)+"') "),i+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:U)+") ) "}i+=")) { ";var V="missing"+o,O="' + "+V+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(F,V,!0):F+" + "+V);var Y=Y||[];Y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(q)+"', missingProperty: '"+O+"', depsCount: "+R.length+", deps: '"+e.util.escapeQuotes(R.length==1?R[0]:R.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",R.length==1?i+="property "+e.util.escapeQuotes(R[0]):i+="properties "+e.util.escapeQuotes(R.join(", ")),i+=" when property "+e.util.escapeQuotes(q)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var ee=i;i=Y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+ee+"]); ":i+=" validate.errors = ["+ee+"]; return false; ":i+=" var err = "+ee+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{i+=" ) { ";var ne=R;if(ne)for(var j,Ae=-1,ve=ne.length-1;Ae<ve;){j=ne[Ae+=1];var U=e.util.getProperty(j),O=e.util.escapeQuotes(j),se=d+U;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(F,j,e.opts.jsonPointers)),i+=" if ( "+se+" === undefined ",w&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(j)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(q)+"', missingProperty: '"+O+"', depsCount: "+R.length+", deps: '"+e.util.escapeQuotes(R.length==1?R[0]:R.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",R.length==1?i+="property "+e.util.escapeQuotes(R[0]):i+="properties "+e.util.escapeQuotes(R.join(", ")),i+=" when property "+e.util.escapeQuotes(q)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}i+=" } ",c&&(E+="}",i+=" else { ")}e.errorPath=F;var De=m.baseId;for(var q in C){var B=C[q];(e.opts.strictKeywords?typeof B=="object"&&Object.keys(B).length>0||B===!1:e.util.schemaHasRules(B,e.RULES.all))&&(i+=" "+y+" = true; if ( "+d+e.util.getProperty(q)+" !== undefined ",w&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(q)+"') "),i+=") { ",m.schema=B,m.schemaPath=l+e.util.getProperty(q),m.errSchemaPath=u+"/"+e.util.escapeFragment(q),i+=" "+e.validate(m)+" ",m.baseId=De,i+=" } ",c&&(i+=" if ("+y+") { ",E+="}"))}return c&&(i+=" "+E+" if ("+h+" == errors) {"),i}});var klt=b((xXr,Qlt)=>{"use strict";Qlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a;var y="i"+o,C="schema"+o;m||(i+=" var "+C+" = validate.schema"+l+";"),i+="var "+h+";",m&&(i+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),i+=""+h+" = false;for (var "+y+"=0; "+y+"<"+C+".length; "+y+"++) if (equal("+d+", "+C+"["+y+"])) { "+h+" = true; break; }",m&&(i+=" } "),i+=" if (!"+h+") { ";var _=_||[];_.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+o+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var w=i;return i=_.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Glt=b((wXr,Ult)=>{"use strict";Ult.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||"");if(e.opts.format===!1)return c&&(i+=" if (true) { "),i;var h=e.opts.$data&&a&&a.$data,m;h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a;var E=e.opts.unknownFormats,y=Array.isArray(E);if(h){var C="format"+o,_="isObject"+o,w="formatType"+o;i+=" var "+C+" = formats["+m+"]; var "+_+" = typeof "+C+" == 'object' && !("+C+" instanceof RegExp) && "+C+".validate; var "+w+" = "+_+" && "+C+".type || 'string'; if ("+_+") { ",e.async&&(i+=" var async"+o+" = "+C+".async; "),i+=" "+C+" = "+C+".validate; } if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'string') || "),i+=" (",E!="ignore"&&(i+=" ("+m+" && !"+C+" ",y&&(i+=" && self._opts.unknownFormats.indexOf("+m+") == -1 "),i+=") || "),i+=" ("+C+" && "+w+" == '"+r+"' && !(typeof "+C+" == 'function' ? ",e.async?i+=" (async"+o+" ? await "+C+"("+d+") : "+C+"("+d+")) ":i+=" "+C+"("+d+") ",i+=" : "+C+".test("+d+"))))) {"}else{var C=e.formats[a];if(!C){if(E=="ignore")return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(i+=" if (true) { "),i;if(y&&E.indexOf(a)>=0)return c&&(i+=" if (true) { "),i;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var _=typeof C=="object"&&!(C instanceof RegExp)&&C.validate,w=_&&C.type||"string";if(_){var B=C.async===!0;C=C.validate}if(w!=r)return c&&(i+=" if (true) { "),i;if(B){if(!e.async)throw new Error("async format in sync schema");var R="formats"+e.util.getProperty(a)+".validate";i+=" if (!(await "+R+"("+d+"))) { "}else{i+=" if (! ";var R="formats"+e.util.getProperty(a);_&&(R+=".validate"),typeof C=="function"?i+=" "+R+"("+d+") ":i+=" "+R+".test("+d+") ",i+=") { "}}var F=F||[];F.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ",h?i+=""+m:i+=""+e.util.toQuotedString(a),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match format "`,h?i+="' + "+m+" + '":i+=""+e.util.escapeQuotes(a),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var q=i;return i=F.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var qlt=b((RXr,Hlt)=>{"use strict";Hlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e);E.level++;var y="valid"+E.level,C=e.schema.then,_=e.schema.else,w=C!==void 0&&(e.opts.strictKeywords?typeof C=="object"&&Object.keys(C).length>0||C===!1:e.util.schemaHasRules(C,e.RULES.all)),B=_!==void 0&&(e.opts.strictKeywords?typeof _=="object"&&Object.keys(_).length>0||_===!1:e.util.schemaHasRules(_,e.RULES.all)),R=E.baseId;if(w||B){var F;E.createErrors=!1,E.schema=a,E.schemaPath=l,E.errSchemaPath=u,i+=" var "+m+" = errors; var "+h+" = true; ";var q=e.compositeRule;e.compositeRule=E.compositeRule=!0,i+=" "+e.validate(E)+" ",E.baseId=R,E.createErrors=!0,i+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=E.compositeRule=q,w?(i+=" if ("+y+") { ",E.schema=e.schema.then,E.schemaPath=e.schemaPath+".then",E.errSchemaPath=e.errSchemaPath+"/then",i+=" "+e.validate(E)+" ",E.baseId=R,i+=" "+h+" = "+y+"; ",w&&B?(F="ifClause"+o,i+=" var "+F+" = 'then'; "):F="'then'",i+=" } ",B&&(i+=" else { ")):i+=" if (!"+y+") { ",B&&(E.schema=e.schema.else,E.schemaPath=e.schemaPath+".else",E.errSchemaPath=e.errSchemaPath+"/else",i+=" "+e.validate(E)+" ",E.baseId=R,i+=" "+h+" = "+y+"; ",w&&B?(F="ifClause"+o,i+=" var "+F+" = 'else'; "):F="'else'",i+=" } "),i+=" if (!"+h+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+F+" } ",e.opts.messages!==!1&&(i+=` , message: 'should match "' + `+F+` + '" schema' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var $lt=b((BXr,Vlt)=>{"use strict";Vlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_="i"+o,w=E.dataLevel=e.dataLevel+1,B="data"+w,R=e.baseId;if(i+="var "+m+" = errors;var "+h+";",Array.isArray(a)){var F=e.schema.additionalItems;if(F===!1){i+=" "+h+" = "+d+".length <= "+a.length+"; ";var q=u;u=e.errSchemaPath+"/additionalItems",i+=" if (!"+h+") { ";var J=J||[];J.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a.length+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var j=i;i=J.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u=q,c&&(y+="}",i+=" else { ")}var L=a;if(L){for(var K,U=-1,se=L.length-1;U<se;)if(K=L[U+=1],e.opts.strictKeywords?typeof K=="object"&&Object.keys(K).length>0||K===!1:e.util.schemaHasRules(K,e.RULES.all)){i+=" "+C+" = true; if ("+d+".length > "+U+") { ";var V=d+"["+U+"]";E.schema=K,E.schemaPath=l+"["+U+"]",E.errSchemaPath=u+"/"+U,E.errorPath=e.util.getPathExpr(e.errorPath,U,e.opts.jsonPointers,!0),E.dataPathArr[w]=U;var O=e.validate(E);E.baseId=R,e.util.varOccurences(O,B)<2?i+=" "+e.util.varReplace(O,B,V)+" ":i+=" var "+B+" = "+V+"; "+O+" ",i+=" } ",c&&(i+=" if ("+C+") { ",y+="}")}}if(typeof F=="object"&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))){E.schema=F,E.schemaPath=e.schemaPath+".additionalItems",E.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+C+" = true; if ("+d+".length > "+a.length+") { for (var "+_+" = "+a.length+"; "+_+" < "+d+".length; "+_+"++) { ",E.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0);var V=d+"["+_+"]";E.dataPathArr[w]=_;var O=e.validate(E);E.baseId=R,e.util.varOccurences(O,B)<2?i+=" "+e.util.varReplace(O,B,V)+" ":i+=" var "+B+" = "+V+"; "+O+" ",c&&(i+=" if (!"+C+") break; "),i+=" } } ",c&&(i+=" if ("+C+") { ",y+="}")}}else if(e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all)){E.schema=a,E.schemaPath=l,E.errSchemaPath=u,i+=" for (var "+_+" = 0; "+_+" < "+d+".length; "+_+"++) { ",E.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0);var V=d+"["+_+"]";E.dataPathArr[w]=_;var O=e.validate(E);E.baseId=R,e.util.varOccurences(O,B)<2?i+=" "+e.util.varReplace(O,B,V)+" ":i+=" var "+B+" = "+V+"; "+O+" ",c&&(i+=" if (!"+C+") break; "),i+=" }"}return c&&(i+=" "+y+" if ("+m+" == errors) {"),i}});var A_e=b((NXr,Ylt)=>{"use strict";Ylt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,R,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a;var E=n=="maximum",y=E?"exclusiveMaximum":"exclusiveMinimum",C=e.schema[y],_=e.opts.$data&&C&&C.$data,w=E?"<":">",B=E?">":"<",R=void 0;if(!(h||typeof a=="number"||a===void 0))throw new Error(n+" must be number");if(!(_||C===void 0||typeof C=="number"||typeof C=="boolean"))throw new Error(y+" must be number or boolean");if(_){var F=e.util.getData(C.$data,s,e.dataPathArr),q="exclusive"+o,J="exclType"+o,j="exclIsNumber"+o,L="op"+o,K="' + "+L+" + '";i+=" var schemaExcl"+o+" = "+F+"; ",F="schemaExcl"+o,i+=" var "+q+"; var "+J+" = typeof "+F+"; if ("+J+" != 'boolean' && "+J+" != 'undefined' && "+J+" != 'number') { ";var R=y,U=U||[];U.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(R||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: '"+y+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var se=i;i=U.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+se+"]); ":i+=" validate.errors = ["+se+"]; return false; ":i+=" var err = "+se+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" "+J+" == 'number' ? ( ("+q+" = "+m+" === undefined || "+F+" "+w+"= "+m+") ? "+d+" "+B+"= "+F+" : "+d+" "+B+" "+m+" ) : ( ("+q+" = "+F+" === true) ? "+d+" "+B+"= "+m+" : "+d+" "+B+" "+m+" ) || "+d+" !== "+d+") { var op"+o+" = "+q+" ? '"+w+"' : '"+w+"='; ",a===void 0&&(R=y,u=e.errSchemaPath+"/"+y,m=F,h=_)}else{var j=typeof C=="number",K=w;if(j&&h){var L="'"+K+"'";i+=" if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" ( "+m+" === undefined || "+C+" "+w+"= "+m+" ? "+d+" "+B+"= "+C+" : "+d+" "+B+" "+m+" ) || "+d+" !== "+d+") { "}else{j&&a===void 0?(q=!0,R=y,u=e.errSchemaPath+"/"+y,m=C,B+="="):(j&&(m=Math[E?"min":"max"](C,a)),C===(j?m:!0)?(q=!0,R=y,u=e.errSchemaPath+"/"+y,B+="="):(q=!1,K+="="));var L="'"+K+"'";i+=" if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" "+d+" "+B+" "+m+" || "+d+" !== "+d+") { "}}R=R||n;var U=U||[];U.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(R||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+L+", limit: "+m+", exclusive: "+q+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be "+K+" ",h?i+="' + "+m:i+=""+m+"'"),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var se=i;return i=U.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+se+"]); ":i+=" validate.errors = ["+se+"]; return false; ":i+=" var err = "+se+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var g_e=b((OXr,jlt)=>{"use strict";jlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,y,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");var E=n=="maxItems"?">":"<";i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" "+d+".length "+E+" "+m+") { ";var y=n,C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",n=="maxItems"?i+="more":i+="fewer",i+=" than ",h?i+="' + "+m+" + '":i+=""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var _=i;return i=C.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var E_e=b((MXr,Wlt)=>{"use strict";Wlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,y,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");var E=n=="maxLength"?">":"<";i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),e.opts.unicode===!1?i+=" "+d+".length ":i+=" ucs2length("+d+") ",i+=" "+E+" "+m+") { ";var y=n,C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be ",n=="maxLength"?i+="longer":i+="shorter",i+=" than ",h?i+="' + "+m+" + '":i+=""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var _=i;return i=C.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var y_e=b((FXr,zlt)=>{"use strict";zlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,y,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");var E=n=="maxProperties"?">":"<";i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),i+=" Object.keys("+d+").length "+E+" "+m+") { ";var y=n,C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",n=="maxProperties"?i+="more":i+="fewer",i+=" than ",h?i+="' + "+m+" + '":i+=""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var _=i;return i=C.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Klt=b((LXr,Jlt)=>{"use strict";Jlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;if(h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a,!(h||typeof a=="number"))throw new Error(n+" must be number");i+="var division"+o+";if (",h&&(i+=" "+m+" !== undefined && ( typeof "+m+" != 'number' || "),i+=" (division"+o+" = "+d+" / "+m+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var E=E||[];E.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+m+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be multiple of ",h?i+="' + "+m:i+=""+m+"'"),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var y=i;return i=E.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Zlt=b((PXr,Xlt)=>{"use strict";Xlt.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e);m.level++;var E="valid"+m.level;if(e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all)){m.schema=a,m.schemaPath=l,m.errSchemaPath=u,i+=" var "+h+" = errors; ";var y=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1;var C;m.opts.allErrors&&(C=m.opts.allErrors,m.opts.allErrors=!1),i+=" "+e.validate(m)+" ",m.createErrors=!0,C&&(m.opts.allErrors=C),e.compositeRule=m.compositeRule=y,i+=" if ("+E+") { ";var _=_||[];_.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var w=i;i=_.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ");return i}});var tut=b((QXr,eut)=>{"use strict";eut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m="errs__"+o,E=e.util.copy(e),y="";E.level++;var C="valid"+E.level,_=E.baseId,w="prevValid"+o,B="passingSchemas"+o;i+="var "+m+" = errors , "+w+" = false , "+h+" = false , "+B+" = null; ";var R=e.compositeRule;e.compositeRule=E.compositeRule=!0;var F=a;if(F)for(var q,J=-1,j=F.length-1;J<j;)q=F[J+=1],(e.opts.strictKeywords?typeof q=="object"&&Object.keys(q).length>0||q===!1:e.util.schemaHasRules(q,e.RULES.all))?(E.schema=q,E.schemaPath=l+"["+J+"]",E.errSchemaPath=u+"/"+J,i+=" "+e.validate(E)+" ",E.baseId=_):i+=" var "+C+" = true; ",J&&(i+=" if ("+C+" && "+w+") { "+h+" = false; "+B+" = ["+B+", "+J+"]; } else { ",y+="}"),i+=" if ("+C+") { "+h+" = "+w+" = true; "+B+" = "+J+"; }";return e.compositeRule=E.compositeRule=R,i+=""+y+"if (!"+h+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+B+" } ",e.opts.messages!==!1&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i}});var rut=b((kXr,nut)=>{"use strict";nut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h=e.opts.$data&&a&&a.$data,m;h?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",m="schema"+o):m=a;var E=h?"(new RegExp("+m+"))":e.usePattern(a);i+="if ( ",h&&(i+=" ("+m+" !== undefined && typeof "+m+" != 'string') || "),i+=" !"+E+".test("+d+") ) { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",h?i+=""+m:i+=""+e.util.toQuotedString(a),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match pattern "`,h?i+="' + "+m+" + '":i+=""+e.util.escapeQuotes(a),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",h?i+="validate.schema"+l:i+=""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var C=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var out=b((UXr,iut)=>{"use strict";iut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e),E="";m.level++;var y="valid"+m.level,C="key"+o,_="idx"+o,w=m.dataLevel=e.dataLevel+1,B="data"+w,R="dataProperties"+o,F=Object.keys(a||{}).filter(Ae),q=e.schema.patternProperties||{},J=Object.keys(q).filter(Ae),j=e.schema.additionalProperties,L=F.length||J.length,K=j===!1,U=typeof j=="object"&&Object.keys(j).length,se=e.opts.removeAdditional,V=K||U||se,O=e.opts.ownProperties,Y=e.baseId,ee=e.schema.required;if(ee&&!(e.opts.$data&&ee.$data)&&ee.length<e.opts.loopRequired)var ne=e.util.toHash(ee);function Ae(mt){return mt!=="__proto__"}if(i+="var "+h+" = errors;var "+y+" = true;",O&&(i+=" var "+R+" = undefined;"),V){if(O?i+=" "+R+" = "+R+" || Object.keys("+d+"); for (var "+_+"=0; "+_+"<"+R+".length; "+_+"++) { var "+C+" = "+R+"["+_+"]; ":i+=" for (var "+C+" in "+d+") { ",L){if(i+=" var isAdditional"+o+" = !(false ",F.length)if(F.length>8)i+=" || validate.schema"+l+".hasOwnProperty("+C+") ";else{var ve=F;if(ve)for(var De,Ue=-1,qe=ve.length-1;Ue<qe;)De=ve[Ue+=1],i+=" || "+C+" == "+e.util.toQuotedString(De)+" "}if(J.length){var Ie=J;if(Ie)for(var xe,Oe=-1,ue=Ie.length-1;Oe<ue;)xe=Ie[Oe+=1],i+=" || "+e.usePattern(xe)+".test("+C+") "}i+=" ); if (isAdditional"+o+") { "}if(se=="all")i+=" delete "+d+"["+C+"]; ";else{var re=e.errorPath,ye="' + "+C+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers)),K)if(se)i+=" delete "+d+"["+C+"]; ";else{i+=" "+y+" = false; ";var X=u;u=e.errSchemaPath+"/additionalProperties";var he=he||[];he.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { additionalProperty: '"+ye+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is an invalid additional property":i+="should NOT have additional properties",i+="' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var ae=i;i=he.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+ae+"]); ":i+=" validate.errors = ["+ae+"]; return false; ":i+=" var err = "+ae+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=X,c&&(i+=" break; ")}else if(U)if(se=="failing"){i+=" var "+h+" = errors; ";var me=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=j,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers);var Se=d+"["+C+"]";m.dataPathArr[w]=C;var ie=e.validate(m);m.baseId=Y,e.util.varOccurences(ie,B)<2?i+=" "+e.util.varReplace(ie,B,Se)+" ":i+=" var "+B+" = "+Se+"; "+ie+" ",i+=" if (!"+y+") { errors = "+h+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+d+"["+C+"]; } ",e.compositeRule=m.compositeRule=me}else{m.schema=j,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers);var Se=d+"["+C+"]";m.dataPathArr[w]=C;var ie=e.validate(m);m.baseId=Y,e.util.varOccurences(ie,B)<2?i+=" "+e.util.varReplace(ie,B,Se)+" ":i+=" var "+B+" = "+Se+"; "+ie+" ",c&&(i+=" if (!"+y+") break; ")}e.errorPath=re}L&&(i+=" } "),i+=" } ",c&&(i+=" if ("+y+") { ",E+="}")}var k=e.opts.useDefaults&&!e.compositeRule;if(F.length){var z=F;if(z)for(var De,pe=-1,te=z.length-1;pe<te;){De=z[pe+=1];var H=a[De];if(e.opts.strictKeywords?typeof H=="object"&&Object.keys(H).length>0||H===!1:e.util.schemaHasRules(H,e.RULES.all)){var ge=e.util.getProperty(De),Se=d+ge,be=k&&H.default!==void 0;m.schema=H,m.schemaPath=l+ge,m.errSchemaPath=u+"/"+e.util.escapeFragment(De),m.errorPath=e.util.getPath(e.errorPath,De,e.opts.jsonPointers),m.dataPathArr[w]=e.util.toQuotedString(De);var ie=e.validate(m);if(m.baseId=Y,e.util.varOccurences(ie,B)<2){ie=e.util.varReplace(ie,B,Se);var Pe=Se}else{var Pe=B;i+=" var "+B+" = "+Se+"; "}if(be)i+=" "+ie+" ";else{if(ne&&ne[De]){i+=" if ( "+Pe+" === undefined ",O&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(De)+"') "),i+=") { "+y+" = false; ";var re=e.errorPath,X=u,pt=e.util.escapeQuotes(De);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(re,De,e.opts.jsonPointers)),u=e.errSchemaPath+"/required";var he=he||[];he.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+pt+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+pt+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var ae=i;i=he.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+ae+"]); ":i+=" validate.errors = ["+ae+"]; return false; ":i+=" var err = "+ae+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=X,e.errorPath=re,i+=" } else { "}else c?(i+=" if ( "+Pe+" === undefined ",O&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(De)+"') "),i+=") { "+y+" = true; } else { "):(i+=" if ("+Pe+" !== undefined ",O&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(De)+"') "),i+=" ) { ");i+=" "+ie+" } "}}c&&(i+=" if ("+y+") { ",E+="}")}}if(J.length){var Dt=J;if(Dt)for(var xe,Qt=-1,dt=Dt.length-1;Qt<dt;){xe=Dt[Qt+=1];var H=q[xe];if(e.opts.strictKeywords?typeof H=="object"&&Object.keys(H).length>0||H===!1:e.util.schemaHasRules(H,e.RULES.all)){m.schema=H,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(xe),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(xe),O?i+=" "+R+" = "+R+" || Object.keys("+d+"); for (var "+_+"=0; "+_+"<"+R+".length; "+_+"++) { var "+C+" = "+R+"["+_+"]; ":i+=" for (var "+C+" in "+d+") { ",i+=" if ("+e.usePattern(xe)+".test("+C+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers);var Se=d+"["+C+"]";m.dataPathArr[w]=C;var ie=e.validate(m);m.baseId=Y,e.util.varOccurences(ie,B)<2?i+=" "+e.util.varReplace(ie,B,Se)+" ":i+=" var "+B+" = "+Se+"; "+ie+" ",c&&(i+=" if (!"+y+") break; "),i+=" } ",c&&(i+=" else "+y+" = true; "),i+=" } ",c&&(i+=" if ("+y+") { ",E+="}")}}}return c&&(i+=" "+E+" if ("+h+" == errors) {"),i}});var aut=b((GXr,sut)=>{"use strict";sut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="errs__"+o,m=e.util.copy(e),E="";m.level++;var y="valid"+m.level;if(i+="var "+h+" = errors;",e.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:e.util.schemaHasRules(a,e.RULES.all)){m.schema=a,m.schemaPath=l,m.errSchemaPath=u;var C="key"+o,_="idx"+o,w="i"+o,B="' + "+C+" + '",R=m.dataLevel=e.dataLevel+1,F="data"+R,q="dataProperties"+o,J=e.opts.ownProperties,j=e.baseId;J&&(i+=" var "+q+" = undefined; "),J?i+=" "+q+" = "+q+" || Object.keys("+d+"); for (var "+_+"=0; "+_+"<"+q+".length; "+_+"++) { var "+C+" = "+q+"["+_+"]; ":i+=" for (var "+C+" in "+d+") { ",i+=" var startErrs"+o+" = errors; ";var L=C,K=e.compositeRule;e.compositeRule=m.compositeRule=!0;var U=e.validate(m);m.baseId=j,e.util.varOccurences(U,F)<2?i+=" "+e.util.varReplace(U,F,L)+" ":i+=" var "+F+" = "+L+"; "+U+" ",e.compositeRule=m.compositeRule=K,i+=" if (!"+y+") { for (var "+w+"=startErrs"+o+"; "+w+"<errors; "+w+"++) { vErrors["+w+"].propertyName = "+C+"; } var err = ",e.createErrors!==!1?(i+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { propertyName: '"+B+"' } ",e.opts.messages!==!1&&(i+=" , message: 'property name \\'"+B+"\\' is invalid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),c&&(i+=" break; "),i+=" } }"}return c&&(i+=" "+E+" if ("+h+" == errors) {"),i}});var uut=b((HXr,lut)=>{"use strict";lut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a;var y="schema"+o;if(!m)if(a.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var C=[],_=a;if(_)for(var w,B=-1,R=_.length-1;B<R;){w=_[B+=1];var F=e.schema.properties[w];F&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))||(C[C.length]=w)}}else var C=a;if(m||C.length){var q=e.errorPath,J=m||C.length>=e.opts.loopRequired,j=e.opts.ownProperties;if(c)if(i+=" var missing"+o+"; ",J){m||(i+=" var "+y+" = validate.schema"+l+"; ");var L="i"+o,K="schema"+o+"["+L+"]",U="' + "+K+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(q,K,e.opts.jsonPointers)),i+=" var "+h+" = true; ",m&&(i+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),i+=" for (var "+L+" = 0; "+L+" < "+y+".length; "+L+"++) { "+h+" = "+d+"["+y+"["+L+"]] !== undefined ",j&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", "+y+"["+L+"]) "),i+="; if (!"+h+") break; } ",m&&(i+=" } "),i+=" if (!"+h+") { ";var se=se||[];se.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var V=i;i=se.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+V+"]); ":i+=" validate.errors = ["+V+"]; return false; ":i+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var O=C;if(O)for(var Y,L=-1,ee=O.length-1;L<ee;){Y=O[L+=1],L&&(i+=" || ");var ne=e.util.getProperty(Y),Ae=d+ne;i+=" ( ( "+Ae+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(Y)+"') "),i+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?Y:ne)+") ) "}i+=") { ";var K="missing"+o,U="' + "+K+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(q,K,!0):q+" + "+K);var se=se||[];se.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var V=i;i=se.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+V+"]); ":i+=" validate.errors = ["+V+"]; return false; ":i+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(J){m||(i+=" var "+y+" = validate.schema"+l+"; ");var L="i"+o,K="schema"+o+"["+L+"]",U="' + "+K+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(q,K,e.opts.jsonPointers)),m&&(i+=" if ("+y+" && !Array.isArray("+y+")) { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+y+" !== undefined) { "),i+=" for (var "+L+" = 0; "+L+" < "+y+".length; "+L+"++) { if ("+d+"["+y+"["+L+"]] === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", "+y+"["+L+"]) "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(i+=" } ")}else{var ve=C;if(ve)for(var Y,De=-1,Ue=ve.length-1;De<Ue;){Y=ve[De+=1];var ne=e.util.getProperty(Y),U=e.util.escapeQuotes(Y),Ae=d+ne;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,Y,e.opts.jsonPointers)),i+=" if ( "+Ae+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(Y)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+U+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+U+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=q}else c&&(i+=" if (true) {");return i}});var dut=b((qXr,cut)=>{"use strict";cut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d="data"+(s||""),h="valid"+o,m=e.opts.$data&&a&&a.$data,E;if(m?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",E="schema"+o):E=a,(a||m)&&e.opts.uniqueItems!==!1){m&&(i+=" var "+h+"; if ("+E+" === false || "+E+" === undefined) "+h+" = true; else if (typeof "+E+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+d+".length , "+h+" = true , j; if (i > 1) { ";var y=e.schema.items&&e.schema.items.type,C=Array.isArray(y);if(!y||y=="object"||y=="array"||C&&(y.indexOf("object")>=0||y.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var _="checkDataType"+(C?"s":"");i+=" if ("+e.util[_](y,"item",e.opts.strictNumbers,!0)+") continue; ",C&&(i+=` if (typeof item == 'string') item = '"' + item; `),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",m&&(i+=" } "),i+=" if (!"+h+") { ";var w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",m?i+="validate.schema"+l:i+=""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var B=i;i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+B+"]); ":i+=" validate.errors = ["+B+"]; return false; ":i+=" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var put=b((VXr,fut)=>{"use strict";fut.exports={$ref:Ilt(),allOf:blt(),anyOf:wlt(),$comment:Blt(),const:Olt(),contains:Flt(),dependencies:Plt(),enum:klt(),format:Glt(),if:qlt(),items:$lt(),maximum:A_e(),minimum:A_e(),maxItems:g_e(),minItems:g_e(),maxLength:E_e(),minLength:E_e(),maxProperties:y_e(),minProperties:y_e(),multipleOf:Klt(),not:Zlt(),oneOf:tut(),pattern:rut(),properties:out(),propertyNames:aut(),required:uut(),uniqueItems:dut(),validate:h_e()}});var Aut=b(($Xr,mut)=>{"use strict";var hut=put(),C_e=QN().toHash;mut.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],n=["type","$comment"],r=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],i=["number","integer","string","array","object","boolean","null"];return e.all=C_e(n),e.types=C_e(i),e.forEach(function(o){o.rules=o.rules.map(function(s){var a;if(typeof s=="object"){var l=Object.keys(s)[0];a=s[l],s=l,a.forEach(function(c){n.push(c),e.all[c]=!0})}n.push(s);var u=e.all[s]={keyword:s,code:hut[s],implements:a};return u}),e.all.$comment={keyword:"$comment",code:hut.$comment},o.type&&(e.types[o.type]=o)}),e.keywords=C_e(n.concat(r)),e.custom={},e}});var yut=b((YXr,Eut)=>{"use strict";var gut=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];Eut.exports=function(t,e){for(var n=0;n<e.length;n++){t=JSON.parse(JSON.stringify(t));var r=e[n].split("/"),i=t,o;for(o=1;o<r.length;o++)i=i[r[o]];for(o=0;o<gut.length;o++){var s=gut[o],a=i[s];a&&(i[s]={anyOf:[a,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return t}});var Dut=b((jXr,vut)=>{"use strict";var IPn=aee().MissingRef;vut.exports=Cut;function Cut(t,e,n){var r=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof e=="function"&&(n=e,e=void 0);var i=o(t).then(function(){var a=r._addSchema(t,void 0,e);return a.validate||s(a)});return n&&i.then(function(a){n(null,a)},n),i;function o(a){var l=a.$schema;return l&&!r.getSchema(l)?Cut.call(r,{$ref:l},!0):Promise.resolve()}function s(a){try{return r._compile(a)}catch(u){if(u instanceof IPn)return l(u);throw u}function l(u){var c=u.missingSchema;if(m(c))throw new Error("Schema "+c+" is loaded but "+u.missingRef+" cannot be resolved");var d=r._loadingSchemas[c];return d||(d=r._loadingSchemas[c]=r._opts.loadSchema(c),d.then(h,h)),d.then(function(E){if(!m(c))return o(E).then(function(){m(c)||r.addSchema(E,c,void 0,e)})}).then(function(){return s(a)});function h(){delete r._loadingSchemas[c]}function m(E){return r._refs[E]||r._schemas[E]}}}}});var _ut=b((WXr,Sut)=>{"use strict";Sut.exports=function(e,n,r){var i=" ",o=e.level,s=e.dataLevel,a=e.schema[n],l=e.schemaPath+e.util.getProperty(n),u=e.errSchemaPath+"/"+n,c=!e.opts.allErrors,d,h="data"+(s||""),m="valid"+o,E="errs__"+o,y=e.opts.$data&&a&&a.$data,C;y?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",C="schema"+o):C=a;var _=this,w="definition"+o,B=_.definition,R="",F,q,J,j,L;if(y&&B.$data){L="keywordValidate"+o;var K=B.validateSchema;i+=" var "+w+" = RULES.custom['"+n+"'].definition; var "+L+" = "+w+".validate;"}else{if(j=e.useCustomRule(_,a,e.schema,e),!j)return;C="validate.schema"+l,L=j.code,F=B.compile,q=B.inline,J=B.macro}var U=L+".errors",se="i"+o,V="ruleErr"+o,O=B.async;if(O&&!e.async)throw new Error("async keyword in sync schema");if(q||J||(i+=""+U+" = null;"),i+="var "+E+" = errors;var "+m+";",y&&B.$data&&(R+="}",i+=" if ("+C+" === undefined) { "+m+" = true; } else { ",K&&(R+="}",i+=" "+m+" = "+w+".validateSchema("+C+"); if ("+m+") { ")),q)B.statements?i+=" "+j.validate+" ":i+=" "+m+" = "+j.validate+"; ";else if(J){var Y=e.util.copy(e),R="";Y.level++;var ee="valid"+Y.level;Y.schema=j.validate,Y.schemaPath="";var ne=e.compositeRule;e.compositeRule=Y.compositeRule=!0;var Ae=e.validate(Y).replace(/validate\.schema/g,L);e.compositeRule=Y.compositeRule=ne,i+=" "+Ae}else{var ve=ve||[];ve.push(i),i="",i+=" "+L+".call( ",e.opts.passContext?i+="this":i+="self",F||B.schema===!1?i+=" , "+h+" ":i+=" , "+C+" , "+h+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var De=s?"data"+(s-1||""):"parentData",Ue=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+De+" , "+Ue+" , rootData ) ";var qe=i;i=ve.pop(),B.errors===!1?(i+=" "+m+" = ",O&&(i+="await "),i+=""+qe+"; "):O?(U="customErrors"+o,i+=" var "+U+" = null; try { "+m+" = await "+qe+"; } catch (e) { "+m+" = false; if (e instanceof ValidationError) "+U+" = e.errors; else throw e; } "):i+=" "+U+" = null; "+m+" = "+qe+"; "}if(B.modifying&&(i+=" if ("+De+") "+h+" = "+De+"["+Ue+"];"),i+=""+R,B.valid)c&&(i+=" if (true) { ");else{i+=" if ( ",B.valid===void 0?(i+=" !",J?i+=""+ee:i+=""+m):i+=" "+!B.valid+" ",i+=") { ",d=_.keyword;var ve=ve||[];ve.push(i),i="";var ve=ve||[];ve.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+_.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+_.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var Ie=i;i=ve.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+Ie+"]); ":i+=" validate.errors = ["+Ie+"]; return false; ":i+=" var err = "+Ie+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var xe=i;i=ve.pop(),q?B.errors?B.errors!="full"&&(i+=" for (var "+se+"="+E+"; "+se+"<errors; "+se+"++) { var "+V+" = vErrors["+se+"]; if ("+V+".dataPath === undefined) "+V+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+V+".schemaPath === undefined) { "+V+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+V+".schema = "+C+"; "+V+".data = "+h+"; "),i+=" } "):B.errors===!1?i+=" "+xe+" ":(i+=" if ("+E+" == errors) { "+xe+" } else { for (var "+se+"="+E+"; "+se+"<errors; "+se+"++) { var "+V+" = vErrors["+se+"]; if ("+V+".dataPath === undefined) "+V+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+V+".schemaPath === undefined) { "+V+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+V+".schema = "+C+"; "+V+".data = "+h+"; "),i+=" } } "):J?(i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: '"+(d||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+_.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+_.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):B.errors===!1?i+=" "+xe+" ":(i+=" if (Array.isArray("+U+")) { if (vErrors === null) vErrors = "+U+"; else vErrors = vErrors.concat("+U+"); errors = vErrors.length; for (var "+se+"="+E+"; "+se+"<errors; "+se+"++) { var "+V+" = vErrors["+se+"]; if ("+V+".dataPath === undefined) "+V+".dataPath = (dataPath || '') + "+e.errorPath+"; "+V+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+V+".schema = "+C+"; "+V+".data = "+h+"; "),i+=" } } else { "+xe+" } "),i+=" } ",c&&(i+=" else { ")}return i}});var v_e=b((zXr,TPn)=>{TPn.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 but=b((JXr,Tut)=>{"use strict";var Iut=v_e();Tut.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Iut.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Iut.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}});var wut=b((KXr,xut)=>{"use strict";var bPn=/^[a-z_$][a-z0-9_$-]*$/i,xPn=_ut(),wPn=but();xut.exports={add:RPn,get:BPn,remove:NPn,validate:D_e};function RPn(t,e){var n=this.RULES;if(n.keywords[t])throw new Error("Keyword "+t+" is already defined");if(!bPn.test(t))throw new Error("Keyword "+t+" is not a valid identifier");if(e){this.validateKeyword(e,!0);var r=e.type;if(Array.isArray(r))for(var i=0;i<r.length;i++)s(t,r[i],e);else s(t,r,e);var o=e.metaSchema;o&&(e.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),e.validateSchema=this.compile(o,!0))}n.keywords[t]=n.all[t]=!0;function s(a,l,u){for(var c,d=0;d<n.length;d++){var h=n[d];if(h.type==l){c=h;break}}c||(c={type:l,rules:[]},n.push(c));var m={keyword:a,definition:u,custom:!0,code:xPn,implements:u.implements};c.rules.push(m),n.custom[a]=m}return this}function BPn(t){var e=this.RULES.custom[t];return e?e.definition:this.RULES.keywords[t]||!1}function NPn(t){var e=this.RULES;delete e.keywords[t],delete e.all[t],delete e.custom[t];for(var n=0;n<e.length;n++)for(var r=e[n].rules,i=0;i<r.length;i++)if(r[i].keyword==t){r.splice(i,1);break}return this}function D_e(t,e){D_e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(wPn,!0);if(n(t))return!0;if(D_e.errors=n.errors,e)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}});var Rut=b((XXr,OPn)=>{OPn.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Uut=b((ZXr,kut)=>{"use strict";var Nut=ult(),kN=see(),MPn=dlt(),Out=a_e(),FPn=p_e(),LPn=Slt(),PPn=Aut(),Mut=yut(),Fut=QN();kut.exports=hc;hc.prototype.validate=kPn;hc.prototype.compile=UPn;hc.prototype.addSchema=GPn;hc.prototype.addMetaSchema=HPn;hc.prototype.validateSchema=qPn;hc.prototype.getSchema=$Pn;hc.prototype.removeSchema=jPn;hc.prototype.addFormat=t5n;hc.prototype.errorsText=e5n;hc.prototype._addSchema=WPn;hc.prototype._compile=zPn;hc.prototype.compileAsync=Dut();var mee=wut();hc.prototype.addKeyword=mee.add;hc.prototype.getKeyword=mee.get;hc.prototype.removeKeyword=mee.remove;hc.prototype.validateKeyword=mee.validate;var Lut=aee();hc.ValidationError=Lut.Validation;hc.MissingRefError=Lut.MissingRef;hc.$dataMetaSchema=Mut;var hee="http://json-schema.org/draft-07/schema",But=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],QPn=["/properties"];function hc(t){if(!(this instanceof hc))return new hc(t);t=this._opts=Fut.copy(t)||{},a5n(this),this._schemas={},this._refs={},this._fragments={},this._formats=LPn(t.format),this._cache=t.cache||new MPn,this._loadingSchemas={},this._compilations=[],this.RULES=PPn(),this._getId=JPn(t),t.loopRequired=t.loopRequired||1/0,t.errorDataPath=="property"&&(t._errorDataPathProperty=!0),t.serialize===void 0&&(t.serialize=FPn),this._metaOpts=s5n(this),t.formats&&i5n(this),t.keywords&&o5n(this),n5n(this),typeof t.meta=="object"&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),r5n(this)}function kPn(t,e){var n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error('no schema with key or ref "'+t+'"')}else{var r=this._addSchema(t);n=r.validate||this._compile(r)}var i=n(e);return n.$async!==!0&&(this.errors=n.errors),i}function UPn(t,e){var n=this._addSchema(t,void 0,e);return n.validate||this._compile(n)}function GPn(t,e,n,r){if(Array.isArray(t)){for(var i=0;i<t.length;i++)this.addSchema(t[i],void 0,n,r);return this}var o=this._getId(t);if(o!==void 0&&typeof o!="string")throw new Error("schema id must be string");return e=kN.normalizeId(e||o),Qut(this,e),this._schemas[e]=this._addSchema(t,n,r,!0),this}function HPn(t,e,n){return this.addSchema(t,e,n,!0),this}function qPn(t,e){var n=t.$schema;if(n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this._opts.defaultMeta||VPn(this),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var r=this.validate(n,t);if(!r&&e){var i="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(i);else throw new Error(i)}return r}function VPn(t){var e=t._opts.meta;return t._opts.defaultMeta=typeof e=="object"?t._getId(e)||e:t.getSchema(hee)?hee:void 0,t._opts.defaultMeta}function $Pn(t){var e=Put(this,t);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return YPn(this,t)}}function YPn(t,e){var n=kN.schema.call(t,{schema:{}},e);if(n){var r=n.schema,i=n.root,o=n.baseId,s=Nut.call(t,r,i,void 0,o);return t._fragments[e]=new Out({ref:e,fragment:!0,schema:r,root:i,baseId:o,validate:s}),s}}function Put(t,e){return e=kN.normalizeId(e),t._schemas[e]||t._refs[e]||t._fragments[e]}function jPn(t){if(t instanceof RegExp)return pee(this,this._schemas,t),pee(this,this._refs,t),this;switch(typeof t){case"undefined":return pee(this,this._schemas),pee(this,this._refs),this._cache.clear(),this;case"string":var e=Put(this,t);return e&&this._cache.del(e.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":var n=this._opts.serialize,r=n?n(t):t;this._cache.del(r);var i=this._getId(t);i&&(i=kN.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this}function pee(t,e,n){for(var r in e){var i=e[r];!i.meta&&(!n||n.test(r))&&(t._cache.del(i.cacheKey),delete e[r])}}function WPn(t,e,n,r){if(typeof t!="object"&&typeof t!="boolean")throw new Error("schema should be object or boolean");var i=this._opts.serialize,o=i?i(t):t,s=this._cache.get(o);if(s)return s;r=r||this._opts.addUsedSchema!==!1;var a=kN.normalizeId(this._getId(t));a&&r&&Qut(this,a);var l=this._opts.validateSchema!==!1&&!e,u;l&&!(u=a&&a==kN.normalizeId(t.$schema))&&this.validateSchema(t,!0);var c=kN.ids.call(this,t),d=new Out({id:a,schema:t,localRefs:c,cacheKey:o,meta:n});return a[0]!="#"&&r&&(this._refs[a]=d),this._cache.put(o,d),l&&u&&this.validateSchema(t,!0),d}function zPn(t,e){if(t.compiling)return t.validate=i,i.schema=t.schema,i.errors=null,i.root=e||i,t.schema.$async===!0&&(i.$async=!0),i;t.compiling=!0;var n;t.meta&&(n=this._opts,this._opts=this._metaOpts);var r;try{r=Nut.call(this,t.schema,e,t.localRefs)}catch(o){throw delete t.validate,o}finally{t.compiling=!1,t.meta&&(this._opts=n)}return t.validate=r,t.refs=r.refs,t.refVal=r.refVal,t.root=r.root,r;function i(){var o=t.validate,s=o.apply(this,arguments);return i.errors=o.errors,s}}function JPn(t){switch(t.schemaId){case"auto":return ZPn;case"id":return KPn;default:return XPn}}function KPn(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function XPn(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function ZPn(t){if(t.$id&&t.id&&t.$id!=t.id)throw new Error("schema $id is different from id");return t.$id||t.id}function e5n(t,e){if(t=t||this.errors,!t)return"No errors";e=e||{};for(var n=e.separator===void 0?", ":e.separator,r=e.dataVar===void 0?"data":e.dataVar,i="",o=0;o<t.length;o++){var s=t[o];s&&(i+=r+s.dataPath+" "+s.message+n)}return i.slice(0,-n.length)}function t5n(t,e){return typeof e=="string"&&(e=new RegExp(e)),this._formats[t]=e,this}function n5n(t){var e;if(t._opts.$data&&(e=Rut(),t.addMetaSchema(e,e.$id,!0)),t._opts.meta!==!1){var n=v_e();t._opts.$data&&(n=Mut(n,QPn)),t.addMetaSchema(n,hee,!0),t._refs["http://json-schema.org/schema"]=hee}}function r5n(t){var e=t._opts.schemas;if(e)if(Array.isArray(e))t.addSchema(e);else for(var n in e)t.addSchema(e[n],n)}function i5n(t){for(var e in t._opts.formats){var n=t._opts.formats[e];t.addFormat(e,n)}}function o5n(t){for(var e in t._opts.keywords){var n=t._opts.keywords[e];t.addKeyword(e,n)}}function Qut(t,e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function s5n(t){for(var e=Fut.copy(t._opts),n=0;n<But.length;n++)delete e[But[n]];return e}function a5n(t){var e=t._opts.logger;if(e===!1)t.logger={log:S_e,warn:S_e,error:S_e};else{if(e===void 0&&(e=console),!(typeof e=="object"&&e.log&&e.warn&&e.error))throw new Error("logger must implement log, warn and error methods");t.logger=e}}function S_e(){}});var Gut,mx,Aee=Le(()=>{kat();dx();Gut=Qe(Uut(),1),mx=class extends XZ{constructor(e,n){var r;super(n),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=(r=n?.capabilities)!==null&&r!==void 0?r:{},this._ajv=new Gut.default}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Qat(this._capabilities,e)}assertCapability(e,n){var r;if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r[e]))throw new Error(`Server does not support ${e} (required for ${n})`)}async connect(e,n){if(await super.connect(e),e.sessionId===void 0)try{let r=await this.request({method:"initialize",params:{protocolVersion:K8,capabilities:this._capabilities,clientInfo:this._clientInfo}},$Se,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!Cat.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"})}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var n,r,i,o,s;switch(e){case"logging/setLevel":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((i=this._serverCapabilities)===null||i===void 0)&&i.resources))throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(!((o=this._serverCapabilities)===null||o===void 0)&&o.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.completions))throw new Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){var n;switch(e){case"notifications/roots/list_changed":if(!(!((n=this._capabilities.roots)===null||n===void 0)&&n.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"ping":break}}async ping(e){return this.request({method:"ping"},PN,e)}async complete(e,n){return this.request({method:"completion/complete",params:e},ZSe,n)}async setLoggingLevel(e,n){return this.request({method:"logging/setLevel",params:{level:e}},PN,n)}async getPrompt(e,n){return this.request({method:"prompts/get",params:e},EG,n)}async listPrompts(e,n){return this.request({method:"prompts/list",params:e},gG,n)}async listResources(e,n){return this.request({method:"resources/list",params:e},YSe,n)}async listResourceTemplates(e,n){return this.request({method:"resources/templates/list",params:e},jSe,n)}async readResource(e,n){return this.request({method:"resources/read",params:e},WSe,n)}async subscribeResource(e,n){return this.request({method:"resources/subscribe",params:e},PN,n)}async unsubscribeResource(e,n){return this.request({method:"resources/unsubscribe",params:e},PN,n)}async callTool(e,n=KZ,r){let i=await this.request({method:"tools/call",params:e},n,r),o=this.getToolOutputValidator(e.name);if(o){if(!i.structuredContent&&!i.isError)throw new xy(by.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent)try{if(!o(i.structuredContent))throw new xy(by.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(o.errors)}`)}catch(s){throw s instanceof xy?s:new xy(by.InvalidParams,`Failed to validate structured content: ${s instanceof Error?s.message:String(s)}`)}}return i}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(let n of e)if(n.outputSchema)try{let r=this._ajv.compile(n.outputSchema);this._cachedToolOutputValidators.set(n.name,r)}catch{}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,n){let r=await this.request({method:"tools/list",params:e},XSe,n);return this.cacheToolOutputSchemas(r.tools),r}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});var Yut=b((rZr,$ut)=>{$ut.exports=Vut;Vut.sync=u5n;var Hut=we("fs");function l5n(t,e){var n=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function qut(t,e,n){return!t.isSymbolicLink()&&!t.isFile()?!1:l5n(e,n)}function Vut(t,e,n){Hut.stat(t,function(r,i){n(r,r?!1:qut(i,t,e))})}function u5n(t,e){return qut(Hut.statSync(t),t,e)}});var Kut=b((iZr,Jut)=>{Jut.exports=Wut;Wut.sync=c5n;var jut=we("fs");function Wut(t,e,n){jut.stat(t,function(r,i){n(r,r?!1:zut(i,e))})}function c5n(t,e){return zut(jut.statSync(t),e)}function zut(t,e){return t.isFile()&&d5n(t,e)}function d5n(t,e){var n=t.mode,r=t.uid,i=t.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),u=parseInt("001",8),c=a|l,d=n&u||n&l&&i===s||n&a&&r===o||n&c&&o===0;return d}});var Zut=b((sZr,Xut)=>{var oZr=we("fs"),gee;process.platform==="win32"||global.TESTING_WINDOWS?gee=Yut():gee=Kut();Xut.exports=__e;__e.sync=f5n;function __e(t,e,n){if(typeof e=="function"&&(n=e,e={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){__e(t,e||{},function(o,s){o?i(o):r(s)})})}gee(t,e||{},function(r,i){r&&(r.code==="EACCES"||e&&e.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function f5n(t,e){try{return gee.sync(t,e||{})}catch(n){if(e&&e.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var sct=b((aZr,oct)=>{var Z8=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ect=we("path"),p5n=Z8?";":":",tct=Zut(),nct=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),rct=(t,e)=>{let n=e.colon||p5n,r=t.match(/\//)||Z8&&t.match(/\\/)?[""]:[...Z8?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(n)],i=Z8?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Z8?i.split(n):[""];return Z8&&t.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},ict=(t,e,n)=>{typeof e=="function"&&(n=e,e={}),e||(e={});let{pathEnv:r,pathExt:i,pathExtExe:o}=rct(t,e),s=[],a=u=>new Promise((c,d)=>{if(u===r.length)return e.all&&s.length?c(s):d(nct(t));let h=r[u],m=/^".*"$/.test(h)?h.slice(1,-1):h,E=ect.join(m,t),y=!m&&/^\.[\\\/]/.test(t)?t.slice(0,2)+E:E;c(l(y,u,0))}),l=(u,c,d)=>new Promise((h,m)=>{if(d===i.length)return h(a(c+1));let E=i[d];tct(u+E,{pathExt:o},(y,C)=>{if(!y&&C)if(e.all)s.push(u+E);else return h(u+E);return h(l(u,c,d+1))})});return n?a(0).then(u=>n(null,u),n):a(0)},h5n=(t,e)=>{e=e||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=rct(t,e),o=[];for(let s=0;s<n.length;s++){let a=n[s],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=ect.join(l,t),c=!l&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let d=0;d<r.length;d++){let h=c+r[d];try{if(tct.sync(h,{pathExt:i}))if(e.all)o.push(h);else return h}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw nct(t)};oct.exports=ict;ict.sync=h5n});var lct=b((lZr,I_e)=>{"use strict";var act=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};I_e.exports=act;I_e.exports.default=act});var fct=b((uZr,dct)=>{"use strict";var uct=we("path"),m5n=sct(),A5n=lct();function cct(t,e){let n=t.options.env||process.env,r=process.cwd(),i=t.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(t.options.cwd)}catch{}let s;try{s=m5n.sync(t.command,{path:n[A5n({env:n})],pathExt:e?uct.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=uct.resolve(i?t.options.cwd:"",s)),s}function g5n(t){return cct(t)||cct(t,!0)}dct.exports=g5n});var pct=b((cZr,b_e)=>{"use strict";var T_e=/([()\][%!^"`<>&|;, *?])/g;function E5n(t){return t=t.replace(T_e,"^$1"),t}function y5n(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(T_e,"^$1"),e&&(t=t.replace(T_e,"^$1")),t}b_e.exports.command=E5n;b_e.exports.argument=y5n});var mct=b((dZr,hct)=>{"use strict";hct.exports=/^#!(.*)/});var gct=b((fZr,Act)=>{"use strict";var C5n=mct();Act.exports=(t="")=>{let e=t.match(C5n);if(!e)return null;let[n,r]=e[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var yct=b((pZr,Ect)=>{"use strict";var x_e=we("fs"),v5n=gct();function D5n(t){let n=Buffer.alloc(150),r;try{r=x_e.openSync(t,"r"),x_e.readSync(r,n,0,150,0),x_e.closeSync(r)}catch{}return v5n(n.toString())}Ect.exports=D5n});var Sct=b((hZr,Dct)=>{"use strict";var S5n=we("path"),Cct=fct(),vct=pct(),_5n=yct(),I5n=process.platform==="win32",T5n=/\.(?:com|exe)$/i,b5n=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function x5n(t){t.file=Cct(t);let e=t.file&&_5n(t.file);return e?(t.args.unshift(t.file),t.command=e,Cct(t)):t.file}function w5n(t){if(!I5n)return t;let e=x5n(t),n=!T5n.test(e);if(t.options.forceShell||n){let r=b5n.test(e);t.command=S5n.normalize(t.command),t.command=vct.command(t.command),t.args=t.args.map(o=>vct.argument(o,r));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function R5n(t,e,n){e&&!Array.isArray(e)&&(n=e,e=null),e=e?e.slice(0):[],n=Object.assign({},n);let r={command:t,args:e,options:n,file:void 0,original:{command:t,args:e}};return n.shell?r:w5n(r)}Dct.exports=R5n});var Tct=b((mZr,Ict)=>{"use strict";var w_e=process.platform==="win32";function R_e(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function B5n(t,e){if(!w_e)return;let n=t.emit;t.emit=function(r,i){if(r==="exit"){let o=_ct(i,e);if(o)return n.call(t,"error",o)}return n.apply(t,arguments)}}function _ct(t,e){return w_e&&t===1&&!e.file?R_e(e.original,"spawn"):null}function N5n(t,e){return w_e&&t===1&&!e.file?R_e(e.original,"spawnSync"):null}Ict.exports={hookChildProcess:B5n,verifyENOENT:_ct,verifyENOENTSync:N5n,notFoundError:R_e}});var wct=b((AZr,eL)=>{"use strict";var bct=we("child_process"),B_e=Sct(),N_e=Tct();function xct(t,e,n){let r=B_e(t,e,n),i=bct.spawn(r.command,r.args,r.options);return N_e.hookChildProcess(i,r),i}function O5n(t,e,n){let r=B_e(t,e,n),i=bct.spawnSync(r.command,r.args,r.options);return i.error=i.error||N_e.verifyENOENTSync(i.status,r),i}eL.exports=xct;eL.exports.spawn=xct;eL.exports.sync=O5n;eL.exports._parse=B_e;eL.exports._enoent=N_e});function M5n(t){return cx.parse(JSON.parse(t))}function Rct(t){return JSON.stringify(t)+`
|
|
545
545
|
`}var Eee,Bct=Le(()=>{dx();Eee=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
546
546
|
`);if(e===-1)return null;let n=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),M5n(n)}clear(){this._buffer=void 0}}});import Cee from"node:process";import{PassThrough as F5n}from"node:stream";function P5n(){let t={};for(let e of L5n){let n=Cee.env[e];n!==void 0&&(n.startsWith("()")||(t[e]=n))}return t}function Q5n(){return"type"in Cee}var Nct,L5n,yee,Oct=Le(()=>{Nct=Qe(wct(),1);Bct();L5n=Cee.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];yee=class{constructor(e){this._abortController=new AbortController,this._readBuffer=new Eee,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new F5n)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{var r,i,o,s,a;this._process=(0,Nct.default)(this._serverParams.command,(r=this._serverParams.args)!==null&&r!==void 0?r:[],{env:{...P5n(),...this._serverParams.env},stdio:["pipe","pipe",(i=this._serverParams.stderr)!==null&&i!==void 0?i:"inherit"],shell:!1,signal:this._abortController.signal,windowsHide:Cee.platform==="win32"&&Q5n(),cwd:this._serverParams.cwd}),this._process.on("error",l=>{var u,c;if(l.name==="AbortError"){(u=this.onclose)===null||u===void 0||u.call(this);return}n(l),(c=this.onerror)===null||c===void 0||c.call(this,l)}),this._process.on("spawn",()=>{e()}),this._process.on("close",l=>{var u;this._process=void 0,(u=this.onclose)===null||u===void 0||u.call(this)}),(o=this._process.stdin)===null||o===void 0||o.on("error",l=>{var u;(u=this.onerror)===null||u===void 0||u.call(this,l)}),(s=this._process.stdout)===null||s===void 0||s.on("data",l=>{this._readBuffer.append(l),this.processReadBuffer()}),(a=this._process.stdout)===null||a===void 0||a.on("error",l=>{var u;(u=this.onerror)===null||u===void 0||u.call(this,l)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){var e,n;return this._stderrStream?this._stderrStream:(n=(e=this._process)===null||e===void 0?void 0:e.stderr)!==null&&n!==void 0?n:null}get pid(){var e,n;return(n=(e=this._process)===null||e===void 0?void 0:e.pid)!==null&&n!==void 0?n:null}processReadBuffer(){for(var e,n;;)try{let r=this._readBuffer.readMessage();if(r===null)break;(e=this.onmessage)===null||e===void 0||e.call(this,r)}catch(r){(n=this.onerror)===null||n===void 0||n.call(this,r)}}async close(){this._abortController.abort(),this._process=void 0,this._readBuffer.clear()}send(e){return new Promise(n=>{var r;if(!(!((r=this._process)===null||r===void 0)&&r.stdin))throw new Error("Not connected");let i=Rct(e);this._process.stdin.write(i)?n():this._process.stdin.once("drain",n)})}}});function O_e(t){}function Dee(t){if(typeof t=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:e=O_e,onError:n=O_e,onRetry:r=O_e,onComment:i}=t,o="",s=!0,a,l="",u="";function c(y){let C=s?y.replace(/^\xEF\xBB\xBF/,""):y,[_,w]=k5n(`${o}${C}`);for(let B of _)d(B);o=w,s=!1}function d(y){if(y===""){m();return}if(y.startsWith(":")){i&&i(y.slice(y.startsWith(": ")?2:1));return}let C=y.indexOf(":");if(C!==-1){let _=y.slice(0,C),w=y[C+1]===" "?2:1,B=y.slice(C+w);h(_,B,y);return}h(y,"",y)}function h(y,C,_){switch(y){case"event":u=C;break;case"data":l=`${l}${C}
|
|
547
547
|
`;break;case"id":a=C.includes("\0")?void 0:C;break;case"retry":/^\d+$/.test(C)?r(parseInt(C,10)):n(new vee(`Invalid \`retry\` value: "${C}"`,{type:"invalid-retry",value:C,line:_}));break;default:n(new vee(`Unknown field "${y.length>20?`${y.slice(0,20)}\u2026`:y}"`,{type:"unknown-field",field:y,value:C,line:_}));break}}function m(){l.length>0&&e({id:a,event:u||void 0,data:l.endsWith(`
|
|
@@ -2089,7 +2089,7 @@ Error: ${i}`}}};gKt={command:"add <name-or-id>",describe:"Add an agent from onli
|
|
|
2089
2089
|
`);let r=n.filter(o=>o.location==="project"),i=n.filter(o=>o.location==="global");if(r.length>0){console.log(`${v4r}Project agents:${Vpe}`);for(let o of r){if(console.log(`\u2022 ${yKt}${o.name}${Vpe} (${o.agentType})`),o.description&&console.log(` Description: ${o.description}`),o.model&&console.log(` Model: ${o.model}`),o.allowedTools&&o.allowedTools.length>0){let s=o.allowedTools.includes("*")?"All tools":o.allowedTools.join(", "),a=o.isInheritTools===!1?" (no inherit)":"";console.log(` Tools: ${s}${a}`)}else o.isInheritTools===!1&&console.log(" Tools: None (no inherit)");o.allowedMcps&&o.allowedMcps.length>0?console.log(` MCPs: ${o.allowedMcps.join(", ")}`):o.isInheritMcps===!1&&console.log(" MCPs: None (no inherit)"),console.log(` Location: ${o.filePath||"unknown"}`),console.log()}}if(i.length>0){console.log(`${C4r}Global agents:${Vpe}`);for(let o of i){if(console.log(`\u2022 ${yKt}${o.name}${Vpe} (${o.agentType})`),o.description&&console.log(` Description: ${o.description}`),o.model&&console.log(` Model: ${o.model}`),o.allowedTools&&o.allowedTools.length>0){let s=o.allowedTools.includes("*")?"All tools":o.allowedTools.join(", "),a=o.isInheritTools===!1?" (no inherit)":"";console.log(` Tools: ${s}${a}`)}else o.isInheritTools===!1&&console.log(" Tools: None (no inherit)");o.allowedMcps&&o.allowedMcps.length>0?console.log(` MCPs: ${o.allowedMcps.join(", ")}`):o.isInheritMcps===!1&&console.log(" MCPs: None (no inherit)"),console.log(` Location: ${o.filePath||"unknown"}`),console.log()}}console.log(`Total: ${n.length} agent(s) configured`)}catch(n){console.error("Error loading agents:",n),process.exit(1)}}var yKt,C4r,v4r,Vpe,CKt,vKt=Le(()=>{"use strict";qn();yKt="\x1B[32m",C4r="\x1B[33m",v4r="\x1B[34m",Vpe="\x1B[0m";CKt={command:"list",describe:"List configured agents",builder:t=>t.usage("Usage: iflow agent list"),handler:async()=>{await D4r()}}});import*as $pe from"fs";async function S4r(t,e){let{scope:n}=e,r=process.cwd(),i=om(r);try{let s=(await i.getAgents()).filter(a=>a.name===t||a.agentType===t);if(n&&n!=="all"&&(s=s.filter(a=>a.location===n)),s.length===0){let a=n&&n!=="all"?` in ${n} scope`:"";console.error(`Error: Agent '${t}' not found${a}`),process.exit(1)}if(s.length>1&&!n){console.error(`Error: Multiple agents found with name '${t}'. Please specify scope:`);for(let a of s)console.error(` - ${a.name} (${a.location}): ${a.filePath}`);console.error("Use --scope to specify which one to remove."),process.exit(1)}for(let a of s)try{a.filePath&&$pe.existsSync(a.filePath)?($pe.unlinkSync(a.filePath),console.log(`Successfully removed agent '${a.name}' from ${a.location} scope`),console.log(`Deleted: ${a.filePath}`)):console.warn(`Warning: Agent file not found: ${a.filePath}`)}catch(l){console.error(`Error removing agent file ${a.filePath}:`,l),process.exit(1)}await i.refresh()}catch(o){console.error("Error removing agent:",o),process.exit(1)}}var DKt,SKt=Le(()=>{"use strict";qn();DKt={command:"remove <name>",describe:"Remove an agent",builder:t=>t.usage("Usage: iflow agent remove <name> [--scope project|global|all]").positional("name",{describe:"Name or type of the agent to remove",type:"string",demandOption:!0}).option("scope",{alias:"s",describe:"Scope to remove from (project, global, or all)",type:"string",choices:["project","global","all"]}),handler:async t=>{await S4r(t.name,{scope:t.scope})}}});import*as Ype from"fs";async function b4r(t){let e=process.cwd(),n=om(e);try{let i=(await n.getAgents()).filter(o=>o.name===t||o.agentType===t);i.length===0&&(console.error(`Error: Agent '${t}' not found`),process.exit(1));for(let o of i){if(console.log(`${_4r}Agent: ${o.name}${pm}`),console.log(`${sE}Type:${pm} ${o.agentType}`),console.log(`${sE}Location:${pm} ${o.location}`),console.log(`${sE}File:${pm} ${o.filePath}`),o.description&&console.log(`${sE}Description:${pm} ${o.description}`),o.whenToUse&&console.log(`${sE}When to use:${pm} ${o.whenToUse}`),o.model&&console.log(`${sE}Model:${pm} ${o.model}`),o.allowedTools&&o.allowedTools.length>0){let s=o.allowedTools.includes("*")?"All tools":o.allowedTools.join(", "),a=o.isInheritTools===!1?" (no inherit)":"";console.log(`${sE}Allowed Tools:${pm} ${s}${a}`)}else o.isInheritTools===!1?console.log(`${sE}Allowed Tools:${pm} None (no inherit)`):console.log(`${sE}Allowed Tools:${pm} All tools (inherit)`);if(o.allowedMcps&&o.allowedMcps.length>0?console.log(`${sE}Allowed MCP Servers:${pm} ${o.allowedMcps.join(", ")}`):o.isInheritMcps===!1?console.log(`${sE}Allowed MCP Servers:${pm} None (no inherit)`):console.log(`${sE}Allowed MCP Servers:${pm} All MCP servers (inherit)`),o.systemPrompt&&(console.log(`${sE}System Prompt:${pm}`),console.log(o.systemPrompt)),o.filePath&&Ype.existsSync(o.filePath))try{let s=Ype.readFileSync(o.filePath,"utf8");console.log(`
|
|
2090
2090
|
${T4r}File Content:${pm}`),console.log("\u2500".repeat(50)),console.log(s),console.log("\u2500".repeat(50))}catch(s){console.warn(`Warning: Could not read file content: ${s}`)}else console.warn(`${I4r}Warning:${pm} Agent file not found at ${o.filePath||"unknown path"}`);i.length>1&&console.log(`
|
|
2091
2091
|
`+"=".repeat(60)+`
|
|
2092
|
-
`)}}catch(r){console.error("Error getting agent details:",r),process.exit(1)}}var _4r,I4r,sE,T4r,pm,_Kt,IKt=Le(()=>{"use strict";qn();_4r="\x1B[32m",I4r="\x1B[33m",sE="\x1B[34m",T4r="\x1B[36m",pm="\x1B[0m";_Kt={command:"get <name>",describe:"Get details about an agent",builder:t=>t.usage("Usage: iflow agent get <name>").positional("name",{describe:"Name or type of the agent",type:"string",demandOption:!0}),handler:async t=>{await b4r(t.name)}}});async function B4r(t={}){let{page:e=1,size:n=20,search:r}=t,o=qa(process.cwd()).merged.apiKey;o||(console.error("Error: API key not found."),console.error("Please authenticate first by running the auth command."),process.exit(1)),console.log("Loading online agents...");try{let s=await R4r(o,e,n);s.success||(console.error(`Error: ${s.message}`),process.exit(1));let a=s.agents||[];if(r&&(a=a.filter(l=>l.name.toLowerCase().includes(r.toLowerCase())||l.description.toLowerCase().includes(r.toLowerCase())||l.category.toLowerCase().includes(r.toLowerCase()))),a.length===0){let l=r?` matching "${r}"`:"";console.log(`No agents found${l}`);return}console.log(`\\n${w4r}Online Agents${r?` (filtered by "${r}")`:""}:${__}\\n`);for(let l of a)console.log(`${x4r}\u2022 ${l.name}${__} (ID: ${l.id})`),console.log(` ${$Q}Description:${__} ${l.description}`),console.log(` ${$Q}Category:${__} ${l.category}`),console.log(` ${$Q}Model:${__} ${l.modelName}`),l.tags&&console.log(` ${$Q}Tags:${__} ${l.tags}`),console.log(` ${$Q}Author:${__} ${l.authorId}`),console.log(` ${$Q}Version:${__} ${l.version}`),console.log();console.log(`${TKt}Total: ${a.length} agent(s) shown${s.total?` (${s.total} total available)`:""}${__}`),console.log(`${TKt}To install an agent, use: iflow agent add <name-or-id>${__}`)}catch(s){console.error("Error browsing online agents:",s),process.exit(1)}}var x4r,TKt,w4r,$Q,__,R4r,bKt,xKt=Le(()=>{"use strict";ju();x4r="\x1B[32m",TKt="\x1B[33m",w4r="\x1B[34m",$Q="\x1B[36m",__="\x1B[0m",R4r=async(t,e=1,n=20)=>{try{if(!t)return{success:!1,message:"Please authenticate first by running the auth command"};let i=await fetch("https://apis.iflow.cn/v1/agents/list",{method:"POST",headers:{Authorization:`Bearer ${t}`,"User-Agent":"iFlow-Cli","Content-Type":"application/json"},body:JSON.stringify({page:e,size:n})});if(!i.ok){let a="Unable to load agents. Please try again later";return i.status===401?a="Authentication failed. Please check your API key or re-authenticate":i.status===403?a="Access denied. Please check your permissions":i.status===404?a="Agents service not found. Please try again later":i.status>=500&&(a="Server error. Please try again later"),{success:!1,message:a}}let o=await i.json();return o.success?{success:!0,agents:Array.isArray(o.data.data)?o.data.data:[],total:o.data.total||0}:{success:!1,message:o.message||"Failed to load agents from server"}}catch(r){let i="Unable to load agents. Please check your connection and try again";return r instanceof Error&&r.message.includes("Failed to fetch")&&(i="Network error. Please check your internet connection"),{success:!1,message:i}}};bKt={command:"online",describe:"Browse online agent repository",builder:t=>t.usage("Usage: iflow agent online [options]").option("page",{alias:"p",describe:"Page number (default: 1)",type:"number",default:1}).option("size",{alias:"s",describe:"Number of agents per page (default: 20)",type:"number",default:20}).option("search",{describe:"Search term to filter agents",type:"string"}),handler:async t=>{await B4r({page:t.page,size:t.size,search:t.search})}}});var wKt={};h0(wKt,{agentCommand:()=>IQe});var IQe,TQe=Le(()=>{"use strict";EKt();vKt();SKt();IKt();xKt();IQe={command:"agent",describe:"Manage agents",builder:t=>t.command(gKt).command(CKt).command(DKt).command(_Kt).command(bKt).demandCommand(1,"You need at least one command before continuing.").version(!1),handler:()=>{}}});var uXt=b((kGi,lXt)=>{"use strict";var dFr=we("os"),aXt=we("tty"),C1=P7(),{env:Ap}=process,cR;C1("no-color")||C1("no-colors")||C1("color=false")||C1("color=never")?cR=0:(C1("color")||C1("colors")||C1("color=true")||C1("color=always"))&&(cR=1);"FORCE_COLOR"in Ap&&(Ap.FORCE_COLOR==="true"?cR=1:Ap.FORCE_COLOR==="false"?cR=0:cR=Ap.FORCE_COLOR.length===0?1:Math.min(parseInt(Ap.FORCE_COLOR,10),3));function QQe(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function kQe(t,e){if(cR===0)return 0;if(C1("color=16m")||C1("color=full")||C1("color=truecolor"))return 3;if(C1("color=256"))return 2;if(t&&!e&&cR===void 0)return 0;let n=cR||0;if(Ap.TERM==="dumb")return n;if(process.platform==="win32"){let r=dFr.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ap)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ap)||Ap.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ap)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ap.TEAMCITY_VERSION)?1:0;if(Ap.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ap){let r=parseInt((Ap.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ap.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ap.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ap.TERM)||"COLORTERM"in Ap?1:n}function fFr(t){let e=kQe(t,t&&t.isTTY);return QQe(e)}lXt.exports={supportsColor:fFr,stdout:QQe(kQe(!0,aXt.isatty(1))),stderr:QQe(kQe(!0,aXt.isatty(2)))}});var fXt=b((UGi,dXt)=>{"use strict";var pFr=uXt(),zQ=P7();function cXt(t){if(/^\d{3,4}$/.test(t)){let n=/(\d{1,2})(\d{2})/.exec(t);return{major:0,minor:parseInt(n[1],10),patch:parseInt(n[2],10)}}let e=(t||"").split(".").map(n=>parseInt(n,10));return{major:e[0],minor:e[1],patch:e[2]}}function UQe(t){let{env:e}=process;if("FORCE_HYPERLINK"in e)return!(e.FORCE_HYPERLINK.length>0&&parseInt(e.FORCE_HYPERLINK,10)===0);if(zQ("no-hyperlink")||zQ("no-hyperlinks")||zQ("hyperlink=false")||zQ("hyperlink=never"))return!1;if(zQ("hyperlink=true")||zQ("hyperlink=always")||"NETLIFY"in e)return!0;if(!pFr.supportsColor(t)||t&&!t.isTTY||process.platform==="win32"||"CI"in e||"TEAMCITY_VERSION"in e)return!1;if("TERM_PROGRAM"in e){let n=cXt(e.TERM_PROGRAM_VERSION);switch(e.TERM_PROGRAM){case"iTerm.app":return n.major===3?n.minor>=1:n.major>3;case"WezTerm":return n.major>=20200620;case"vscode":return n.major>1||n.major===1&&n.minor>=72}}if("VTE_VERSION"in e){if(e.VTE_VERSION==="0.50.0")return!1;let n=cXt(e.VTE_VERSION);return n.major>0||n.minor>=50}return!1}dXt.exports={supportsHyperlink:UQe,stdout:UQe(process.stdout),stderr:UQe(process.stderr)}});var WQe={};h0(WQe,{AuthHandler:()=>jQe});var jQe,zQe=Le(()=>{"use strict";jQe=class{logger;constructor(e={}){this.logger=console}validateToken(e){return e.authToken?e.authToken.length<16?(console.error("Auth token appears to be invalid (too short)"),!1):!0:(console.error("No auth token found in server config"),!1)}buildAuthenticatedUrl(e){if(!this.validateToken(e))throw new Error("Invalid authentication token");return`${e.serverUrl.replace(/^http/,"ws")}/ws?token=${encodeURIComponent(e.authToken)}`}buildAuthHeaders(e){if(!this.validateToken(e))throw new Error("Invalid authentication token");return{Auttion:`Bearer ${e.authToken}`,"X-Auth-Token":e.authToken}}isTokenExpired(e,n=24*60*60*1e3){let i=Date.now()-e.timestamp;return i>n?(console.warn(`Token is ${Math.floor(i/1e3/60)} minutes old`),!0):!1}}});var KQe={};h0(KQe,{WebSocketClientImpl:()=>JQe});import{EventEmitter as HFr}from"events";var JQe,XQe=Le(()=>{"use strict";$4();vde();JQe=class extends HFr{ws;config;isConnectedFlag=!1;heartbeatInterval;reconnectTimer;reconnectAttempts=0;pendingResponses=new Map;options;constructor(e={}){super(),this.options={reconnectAttempts:e.reconnectAttempts??3,reconnectDelay:e.reconnectDelay??1e3,heartbeatInterval:e.heartbeatInterval??3e4,connectionTimeout:e.connectionTimeout??5e3,logger:console}}async connect(e){return this.config=e,this.reconnectAttempts=0,new Promise((n,r)=>{let i=setTimeout(()=>{r(new Error("Connection timeout")),this.disconnect()},this.options.connectionTimeout);try{let o=`${e.serverUrl}?token=${e.authToken}`;this.ws=new V4(o),this.ws.on("open",()=>{clearTimeout(i),this.isConnectedFlag=!0,console.debug("WebSocket connected"),this.sendConnectMessage(),this.startHeartbeat(),n()}),this.ws.on("message",s=>{try{let a=JSON.parse(s.toString());this.handleMessage(a)}catch(a){console.log("error","Failed to parse WebSocket message:",a)}}),this.ws.on("error",s=>{clearTimeout(i),console.log("error","WebSocket error:",s),this.emit("error",s),this.isConnectedFlag||r(s)}),this.ws.on("close",()=>{clearTimeout(i),this.isConnectedFlag=!1,this.stopHeartbeat(),this.emit("close"),this.reconnectAttempts<this.options.reconnectAttempts&&this.scheduleReconnect()})}catch(o){clearTimeout(i),r(o)}})}async disconnect(){this.isConnectedFlag=!1,this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=void 0);for(let[e,n]of this.pendingResponses)clearTimeout(n.timeout),n.reject(new Error("Connection closed"));return this.pendingResponses.clear(),new Promise(e=>{this.ws&&this.ws.readyState===V4.OPEN?(this.ws.once("close",()=>e()),this.ws.close()):e()})}isConnected(){return this.isConnectedFlag&&this.ws?.readyState===V4.OPEN}async send(e){if(!this.isConnected())throw new Error("WebSocket is not connected");return new Promise((n,r)=>{try{let i=JSON.stringify(e);this.ws.send(i,o=>{o?r(o):n()})}catch(i){r(i)}})}async sendRequest(e,n=3e4){return e.id||(e.id=this.generateId()),new Promise((r,i)=>{let o=setTimeout(()=>{this.pendingResponses.delete(e.id),i(new Error(`Timeout for message ${e.id}`))},n);this.pendingResponses.set(e.id,{resolve:r,reject:i,timeout:o}),this.send(e).catch(s=>{this.pendingResponses.delete(e.id),clearTimeout(o),i(s)})})}onMessage(e){this.on("message",e)}onError(e){this.on("error",e)}onClose(e){this.on("close",e)}handleMessage(e){if(e.type==="response"&&e.id){let n=this.pendingResponses.get(e.id);if(n){clearTimeout(n.timeout),this.pendingResponses.delete(e.id);let r=e.payload;r.success?n.resolve(r.data):n.reject(new Error(r.error||"Request failed"));return}}if(e.type!=="pong"){if(e.type==="active_file_changed"){this.emit("activeFileChanged",e.payload);return}if(e.type==="selection_changed"){this.emit("selectionChanged",e.payload);return}this.emit("message",e)}}sendConnectMessage(){let e={clientInfo:{version:"0.2.5-beta.0",platform:process.platform,workingDirectory:process.cwd()}},n={type:"cli_connect",timestamp:Date.now(),payload:e};this.send(n).catch(r=>{console.log("error","Failed to send connect message:",r)})}startHeartbeat(){this.heartbeatInterval=setInterval(()=>{if(this.isConnected()){let e={type:"ping",timestamp:Date.now()};this.send(e).catch(n=>{console.log("error","Failed to send ping:",n)})}},this.options.heartbeatInterval)}stopHeartbeat(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=void 0)}scheduleReconnect(){this.reconnectAttempts++;let e=this.options.reconnectDelay*Math.pow(2,this.reconnectAttempts-1);console.info(`Scheduling reconnect attempt ${this.reconnectAttempts} in ${e}ms`),this.reconnectTimer=setTimeout(()=>{this.config&&this.connect(this.config).catch(n=>{console.log("error","Reconnect failed:",n)})},e)}generateId(){return`${Date.now()}-${Math.random().toString(36).substring(2,11)}`}}});var vZt=b((vji,CZt)=>{var fR=we("constants"),s8r=process.cwd,Che=null,a8r=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Che||(Che=s8r.call(process)),Che};try{process.cwd()}catch{}typeof process.chdir=="function"&&(ike=process.chdir,process.chdir=function(t){Che=null,ike.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ike));var ike;CZt.exports=l8r;function l8r(t){fR.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,d,h){h&&process.nextTick(h)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,d,h,m){m&&process.nextTick(m)},t.lchownSync=function(){}),a8r==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function d(h,m,E){var y=Date.now(),C=0;c(h,m,function _(w){if(w&&(w.code==="EACCES"||w.code==="EPERM"||w.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){t.stat(m,function(B,R){B&&B.code==="ENOENT"?c(h,m,_):E(w)})},C),C<100&&(C+=10);return}E&&E(w)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,c),d}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function d(h,m,E,y,C,_){var w;if(_&&typeof _=="function"){var B=0;w=function(R,F,q){if(R&&R.code==="EAGAIN"&&B<10)return B++,c.call(t,h,m,E,y,C,w);_.apply(this,arguments)}}return c.call(t,h,m,E,y,C,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,c),d}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(d,h,m,E,y){for(var C=0;;)try{return c.call(t,d,h,m,E,y)}catch(_){if(_.code==="EAGAIN"&&C<10){C++;continue}throw _}}}(t.readSync);function e(c){c.lchmod=function(d,h,m){c.open(d,fR.O_WRONLY|fR.O_SYMLINK,h,function(E,y){if(E){m&&m(E);return}c.fchmod(y,h,function(C){c.close(y,function(_){m&&m(C||_)})})})},c.lchmodSync=function(d,h){var m=c.openSync(d,fR.O_WRONLY|fR.O_SYMLINK,h),E=!0,y;try{y=c.fchmodSync(m,h),E=!1}finally{if(E)try{c.closeSync(m)}catch{}else c.closeSync(m)}return y}}function n(c){fR.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(d,h,m,E){c.open(d,fR.O_SYMLINK,function(y,C){if(y){E&&E(y);return}c.futimes(C,h,m,function(_){c.close(C,function(w){E&&E(_||w)})})})},c.lutimesSync=function(d,h,m){var E=c.openSync(d,fR.O_SYMLINK),y,C=!0;try{y=c.futimesSync(E,h,m),C=!1}finally{if(C)try{c.closeSync(E)}catch{}else c.closeSync(E)}return y}):c.futimes&&(c.lutimes=function(d,h,m,E){E&&process.nextTick(E)},c.lutimesSync=function(){})}function r(c){return c&&function(d,h,m){return c.call(t,d,h,function(E){u(E)&&(E=null),m&&m.apply(this,arguments)})}}function i(c){return c&&function(d,h){try{return c.call(t,d,h)}catch(m){if(!u(m))throw m}}}function o(c){return c&&function(d,h,m,E){return c.call(t,d,h,m,function(y){u(y)&&(y=null),E&&E.apply(this,arguments)})}}function s(c){return c&&function(d,h,m){try{return c.call(t,d,h,m)}catch(E){if(!u(E))throw E}}}function a(c){return c&&function(d,h,m){typeof h=="function"&&(m=h,h=null);function E(y,C){C&&(C.uid<0&&(C.uid+=4294967296),C.gid<0&&(C.gid+=4294967296)),m&&m.apply(this,arguments)}return h?c.call(t,d,h,E):c.call(t,d,E)}}function l(c){return c&&function(d,h){var m=h?c.call(t,d,h):c.call(t,d);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function u(c){if(!c||c.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var _Zt=b((Dji,SZt)=>{var DZt=we("stream").Stream;SZt.exports=u8r;function u8r(t){return{ReadStream:e,WriteStream:n};function e(r,i){if(!(this instanceof e))return new e(r,i);DZt.call(this);var o=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,l=s.length;a<l;a++){var u=s[a];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(c,d){if(c){o.emit("error",c),o.readable=!1;return}o.fd=d,o.emit("open",d),o._read()})}function n(r,i){if(!(this instanceof n))return new n(r,i);DZt.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var l=o[s];this[l]=i[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var TZt=b((Sji,IZt)=>{"use strict";IZt.exports=d8r;var c8r=Object.getPrototypeOf||function(t){return t.__proto__};function d8r(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:c8r(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var RZt=b((_ji,ake)=>{var Wu=we("fs"),f8r=vZt(),p8r=_Zt(),h8r=TZt(),vhe=we("util"),dh,She;typeof Symbol=="function"&&typeof Symbol.for=="function"?(dh=Symbol.for("graceful-fs.queue"),She=Symbol.for("graceful-fs.previous")):(dh="___graceful-fs.queue",She="___graceful-fs.previous");function m8r(){}function wZt(t,e){Object.defineProperty(t,dh,{get:function(){return e}})}var eM=m8r;vhe.debuglog?eM=vhe.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(eM=function(){var t=vhe.format.apply(vhe,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
2092
|
+
`)}}catch(r){console.error("Error getting agent details:",r),process.exit(1)}}var _4r,I4r,sE,T4r,pm,_Kt,IKt=Le(()=>{"use strict";qn();_4r="\x1B[32m",I4r="\x1B[33m",sE="\x1B[34m",T4r="\x1B[36m",pm="\x1B[0m";_Kt={command:"get <name>",describe:"Get details about an agent",builder:t=>t.usage("Usage: iflow agent get <name>").positional("name",{describe:"Name or type of the agent",type:"string",demandOption:!0}),handler:async t=>{await b4r(t.name)}}});async function B4r(t={}){let{page:e=1,size:n=20,search:r}=t,o=qa(process.cwd()).merged.apiKey;o||(console.error("Error: API key not found."),console.error("Please authenticate first by running the auth command."),process.exit(1)),console.log("Loading online agents...");try{let s=await R4r(o,e,n);s.success||(console.error(`Error: ${s.message}`),process.exit(1));let a=s.agents||[];if(r&&(a=a.filter(l=>l.name.toLowerCase().includes(r.toLowerCase())||l.description.toLowerCase().includes(r.toLowerCase())||l.category.toLowerCase().includes(r.toLowerCase()))),a.length===0){let l=r?` matching "${r}"`:"";console.log(`No agents found${l}`);return}console.log(`\\n${w4r}Online Agents${r?` (filtered by "${r}")`:""}:${__}\\n`);for(let l of a)console.log(`${x4r}\u2022 ${l.name}${__} (ID: ${l.id})`),console.log(` ${$Q}Description:${__} ${l.description}`),console.log(` ${$Q}Category:${__} ${l.category}`),console.log(` ${$Q}Model:${__} ${l.modelName}`),l.tags&&console.log(` ${$Q}Tags:${__} ${l.tags}`),console.log(` ${$Q}Author:${__} ${l.authorId}`),console.log(` ${$Q}Version:${__} ${l.version}`),console.log();console.log(`${TKt}Total: ${a.length} agent(s) shown${s.total?` (${s.total} total available)`:""}${__}`),console.log(`${TKt}To install an agent, use: iflow agent add <name-or-id>${__}`)}catch(s){console.error("Error browsing online agents:",s),process.exit(1)}}var x4r,TKt,w4r,$Q,__,R4r,bKt,xKt=Le(()=>{"use strict";ju();x4r="\x1B[32m",TKt="\x1B[33m",w4r="\x1B[34m",$Q="\x1B[36m",__="\x1B[0m",R4r=async(t,e=1,n=20)=>{try{if(!t)return{success:!1,message:"Please authenticate first by running the auth command"};let i=await fetch("https://apis.iflow.cn/v1/agents/list",{method:"POST",headers:{Authorization:`Bearer ${t}`,"User-Agent":"iFlow-Cli","Content-Type":"application/json"},body:JSON.stringify({page:e,size:n})});if(!i.ok){let a="Unable to load agents. Please try again later";return i.status===401?a="Authentication failed. Please check your API key or re-authenticate":i.status===403?a="Access denied. Please check your permissions":i.status===404?a="Agents service not found. Please try again later":i.status>=500&&(a="Server error. Please try again later"),{success:!1,message:a}}let o=await i.json();return o.success?{success:!0,agents:Array.isArray(o.data.data)?o.data.data:[],total:o.data.total||0}:{success:!1,message:o.message||"Failed to load agents from server"}}catch(r){let i="Unable to load agents. Please check your connection and try again";return r instanceof Error&&r.message.includes("Failed to fetch")&&(i="Network error. Please check your internet connection"),{success:!1,message:i}}};bKt={command:"online",describe:"Browse online agent repository",builder:t=>t.usage("Usage: iflow agent online [options]").option("page",{alias:"p",describe:"Page number (default: 1)",type:"number",default:1}).option("size",{alias:"s",describe:"Number of agents per page (default: 20)",type:"number",default:20}).option("search",{describe:"Search term to filter agents",type:"string"}),handler:async t=>{await B4r({page:t.page,size:t.size,search:t.search})}}});var wKt={};h0(wKt,{agentCommand:()=>IQe});var IQe,TQe=Le(()=>{"use strict";EKt();vKt();SKt();IKt();xKt();IQe={command:"agent",describe:"Manage agents",builder:t=>t.command(gKt).command(CKt).command(DKt).command(_Kt).command(bKt).demandCommand(1,"You need at least one command before continuing.").version(!1),handler:()=>{}}});var uXt=b((kGi,lXt)=>{"use strict";var dFr=we("os"),aXt=we("tty"),C1=P7(),{env:Ap}=process,cR;C1("no-color")||C1("no-colors")||C1("color=false")||C1("color=never")?cR=0:(C1("color")||C1("colors")||C1("color=true")||C1("color=always"))&&(cR=1);"FORCE_COLOR"in Ap&&(Ap.FORCE_COLOR==="true"?cR=1:Ap.FORCE_COLOR==="false"?cR=0:cR=Ap.FORCE_COLOR.length===0?1:Math.min(parseInt(Ap.FORCE_COLOR,10),3));function QQe(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function kQe(t,e){if(cR===0)return 0;if(C1("color=16m")||C1("color=full")||C1("color=truecolor"))return 3;if(C1("color=256"))return 2;if(t&&!e&&cR===void 0)return 0;let n=cR||0;if(Ap.TERM==="dumb")return n;if(process.platform==="win32"){let r=dFr.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ap)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ap)||Ap.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ap)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ap.TEAMCITY_VERSION)?1:0;if(Ap.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ap){let r=parseInt((Ap.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ap.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ap.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ap.TERM)||"COLORTERM"in Ap?1:n}function fFr(t){let e=kQe(t,t&&t.isTTY);return QQe(e)}lXt.exports={supportsColor:fFr,stdout:QQe(kQe(!0,aXt.isatty(1))),stderr:QQe(kQe(!0,aXt.isatty(2)))}});var fXt=b((UGi,dXt)=>{"use strict";var pFr=uXt(),zQ=P7();function cXt(t){if(/^\d{3,4}$/.test(t)){let n=/(\d{1,2})(\d{2})/.exec(t);return{major:0,minor:parseInt(n[1],10),patch:parseInt(n[2],10)}}let e=(t||"").split(".").map(n=>parseInt(n,10));return{major:e[0],minor:e[1],patch:e[2]}}function UQe(t){let{env:e}=process;if("FORCE_HYPERLINK"in e)return!(e.FORCE_HYPERLINK.length>0&&parseInt(e.FORCE_HYPERLINK,10)===0);if(zQ("no-hyperlink")||zQ("no-hyperlinks")||zQ("hyperlink=false")||zQ("hyperlink=never"))return!1;if(zQ("hyperlink=true")||zQ("hyperlink=always")||"NETLIFY"in e)return!0;if(!pFr.supportsColor(t)||t&&!t.isTTY||process.platform==="win32"||"CI"in e||"TEAMCITY_VERSION"in e)return!1;if("TERM_PROGRAM"in e){let n=cXt(e.TERM_PROGRAM_VERSION);switch(e.TERM_PROGRAM){case"iTerm.app":return n.major===3?n.minor>=1:n.major>3;case"WezTerm":return n.major>=20200620;case"vscode":return n.major>1||n.major===1&&n.minor>=72}}if("VTE_VERSION"in e){if(e.VTE_VERSION==="0.50.0")return!1;let n=cXt(e.VTE_VERSION);return n.major>0||n.minor>=50}return!1}dXt.exports={supportsHyperlink:UQe,stdout:UQe(process.stdout),stderr:UQe(process.stderr)}});var WQe={};h0(WQe,{AuthHandler:()=>jQe});var jQe,zQe=Le(()=>{"use strict";jQe=class{logger;constructor(e={}){this.logger=console}validateToken(e){return e.authToken?e.authToken.length<16?(console.error("Auth token appears to be invalid (too short)"),!1):!0:(console.error("No auth token found in server config"),!1)}buildAuthenticatedUrl(e){if(!this.validateToken(e))throw new Error("Invalid authentication token");return`${e.serverUrl.replace(/^http/,"ws")}/ws?token=${encodeURIComponent(e.authToken)}`}buildAuthHeaders(e){if(!this.validateToken(e))throw new Error("Invalid authentication token");return{Auttion:`Bearer ${e.authToken}`,"X-Auth-Token":e.authToken}}isTokenExpired(e,n=24*60*60*1e3){let i=Date.now()-e.timestamp;return i>n?(console.warn(`Token is ${Math.floor(i/1e3/60)} minutes old`),!0):!1}}});var KQe={};h0(KQe,{WebSocketClientImpl:()=>JQe});import{EventEmitter as HFr}from"events";var JQe,XQe=Le(()=>{"use strict";$4();vde();JQe=class extends HFr{ws;config;isConnectedFlag=!1;heartbeatInterval;reconnectTimer;reconnectAttempts=0;pendingResponses=new Map;options;constructor(e={}){super(),this.options={reconnectAttempts:e.reconnectAttempts??3,reconnectDelay:e.reconnectDelay??1e3,heartbeatInterval:e.heartbeatInterval??3e4,connectionTimeout:e.connectionTimeout??5e3,logger:console}}async connect(e){return this.config=e,this.reconnectAttempts=0,new Promise((n,r)=>{let i=setTimeout(()=>{r(new Error("Connection timeout")),this.disconnect()},this.options.connectionTimeout);try{let o=`${e.serverUrl}?token=${e.authToken}`;this.ws=new V4(o),this.ws.on("open",()=>{clearTimeout(i),this.isConnectedFlag=!0,console.debug("WebSocket connected"),this.sendConnectMessage(),this.startHeartbeat(),n()}),this.ws.on("message",s=>{try{let a=JSON.parse(s.toString());this.handleMessage(a)}catch(a){console.log("error","Failed to parse WebSocket message:",a)}}),this.ws.on("error",s=>{clearTimeout(i),console.log("error","WebSocket error:",s),this.emit("error",s),this.isConnectedFlag||r(s)}),this.ws.on("close",()=>{clearTimeout(i),this.isConnectedFlag=!1,this.stopHeartbeat(),this.emit("close"),this.reconnectAttempts<this.options.reconnectAttempts&&this.scheduleReconnect()})}catch(o){clearTimeout(i),r(o)}})}async disconnect(){this.isConnectedFlag=!1,this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=void 0);for(let[e,n]of this.pendingResponses)clearTimeout(n.timeout),n.reject(new Error("Connection closed"));return this.pendingResponses.clear(),new Promise(e=>{this.ws&&this.ws.readyState===V4.OPEN?(this.ws.once("close",()=>e()),this.ws.close()):e()})}isConnected(){return this.isConnectedFlag&&this.ws?.readyState===V4.OPEN}async send(e){if(!this.isConnected())throw new Error("WebSocket is not connected");return new Promise((n,r)=>{try{let i=JSON.stringify(e);this.ws.send(i,o=>{o?r(o):n()})}catch(i){r(i)}})}async sendRequest(e,n=3e4){return e.id||(e.id=this.generateId()),new Promise((r,i)=>{let o=setTimeout(()=>{this.pendingResponses.delete(e.id),i(new Error(`Timeout for message ${e.id}`))},n);this.pendingResponses.set(e.id,{resolve:r,reject:i,timeout:o}),this.send(e).catch(s=>{this.pendingResponses.delete(e.id),clearTimeout(o),i(s)})})}onMessage(e){this.on("message",e)}onError(e){this.on("error",e)}onClose(e){this.on("close",e)}handleMessage(e){if(e.type==="response"&&e.id){let n=this.pendingResponses.get(e.id);if(n){clearTimeout(n.timeout),this.pendingResponses.delete(e.id);let r=e.payload;r.success?n.resolve(r.data):n.reject(new Error(r.error||"Request failed"));return}}if(e.type!=="pong"){if(e.type==="active_file_changed"){this.emit("activeFileChanged",e.payload);return}if(e.type==="selection_changed"){this.emit("selectionChanged",e.payload);return}this.emit("message",e)}}sendConnectMessage(){let e={clientInfo:{version:"0.2.5",platform:process.platform,workingDirectory:process.cwd()}},n={type:"cli_connect",timestamp:Date.now(),payload:e};this.send(n).catch(r=>{console.log("error","Failed to send connect message:",r)})}startHeartbeat(){this.heartbeatInterval=setInterval(()=>{if(this.isConnected()){let e={type:"ping",timestamp:Date.now()};this.send(e).catch(n=>{console.log("error","Failed to send ping:",n)})}},this.options.heartbeatInterval)}stopHeartbeat(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=void 0)}scheduleReconnect(){this.reconnectAttempts++;let e=this.options.reconnectDelay*Math.pow(2,this.reconnectAttempts-1);console.info(`Scheduling reconnect attempt ${this.reconnectAttempts} in ${e}ms`),this.reconnectTimer=setTimeout(()=>{this.config&&this.connect(this.config).catch(n=>{console.log("error","Reconnect failed:",n)})},e)}generateId(){return`${Date.now()}-${Math.random().toString(36).substring(2,11)}`}}});var vZt=b((vji,CZt)=>{var fR=we("constants"),s8r=process.cwd,Che=null,a8r=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Che||(Che=s8r.call(process)),Che};try{process.cwd()}catch{}typeof process.chdir=="function"&&(ike=process.chdir,process.chdir=function(t){Che=null,ike.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ike));var ike;CZt.exports=l8r;function l8r(t){fR.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,d,h){h&&process.nextTick(h)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,d,h,m){m&&process.nextTick(m)},t.lchownSync=function(){}),a8r==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function d(h,m,E){var y=Date.now(),C=0;c(h,m,function _(w){if(w&&(w.code==="EACCES"||w.code==="EPERM"||w.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){t.stat(m,function(B,R){B&&B.code==="ENOENT"?c(h,m,_):E(w)})},C),C<100&&(C+=10);return}E&&E(w)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,c),d}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function d(h,m,E,y,C,_){var w;if(_&&typeof _=="function"){var B=0;w=function(R,F,q){if(R&&R.code==="EAGAIN"&&B<10)return B++,c.call(t,h,m,E,y,C,w);_.apply(this,arguments)}}return c.call(t,h,m,E,y,C,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,c),d}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(d,h,m,E,y){for(var C=0;;)try{return c.call(t,d,h,m,E,y)}catch(_){if(_.code==="EAGAIN"&&C<10){C++;continue}throw _}}}(t.readSync);function e(c){c.lchmod=function(d,h,m){c.open(d,fR.O_WRONLY|fR.O_SYMLINK,h,function(E,y){if(E){m&&m(E);return}c.fchmod(y,h,function(C){c.close(y,function(_){m&&m(C||_)})})})},c.lchmodSync=function(d,h){var m=c.openSync(d,fR.O_WRONLY|fR.O_SYMLINK,h),E=!0,y;try{y=c.fchmodSync(m,h),E=!1}finally{if(E)try{c.closeSync(m)}catch{}else c.closeSync(m)}return y}}function n(c){fR.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(d,h,m,E){c.open(d,fR.O_SYMLINK,function(y,C){if(y){E&&E(y);return}c.futimes(C,h,m,function(_){c.close(C,function(w){E&&E(_||w)})})})},c.lutimesSync=function(d,h,m){var E=c.openSync(d,fR.O_SYMLINK),y,C=!0;try{y=c.futimesSync(E,h,m),C=!1}finally{if(C)try{c.closeSync(E)}catch{}else c.closeSync(E)}return y}):c.futimes&&(c.lutimes=function(d,h,m,E){E&&process.nextTick(E)},c.lutimesSync=function(){})}function r(c){return c&&function(d,h,m){return c.call(t,d,h,function(E){u(E)&&(E=null),m&&m.apply(this,arguments)})}}function i(c){return c&&function(d,h){try{return c.call(t,d,h)}catch(m){if(!u(m))throw m}}}function o(c){return c&&function(d,h,m,E){return c.call(t,d,h,m,function(y){u(y)&&(y=null),E&&E.apply(this,arguments)})}}function s(c){return c&&function(d,h,m){try{return c.call(t,d,h,m)}catch(E){if(!u(E))throw E}}}function a(c){return c&&function(d,h,m){typeof h=="function"&&(m=h,h=null);function E(y,C){C&&(C.uid<0&&(C.uid+=4294967296),C.gid<0&&(C.gid+=4294967296)),m&&m.apply(this,arguments)}return h?c.call(t,d,h,E):c.call(t,d,E)}}function l(c){return c&&function(d,h){var m=h?c.call(t,d,h):c.call(t,d);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function u(c){if(!c||c.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var _Zt=b((Dji,SZt)=>{var DZt=we("stream").Stream;SZt.exports=u8r;function u8r(t){return{ReadStream:e,WriteStream:n};function e(r,i){if(!(this instanceof e))return new e(r,i);DZt.call(this);var o=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,l=s.length;a<l;a++){var u=s[a];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(c,d){if(c){o.emit("error",c),o.readable=!1;return}o.fd=d,o.emit("open",d),o._read()})}function n(r,i){if(!(this instanceof n))return new n(r,i);DZt.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var l=o[s];this[l]=i[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var TZt=b((Sji,IZt)=>{"use strict";IZt.exports=d8r;var c8r=Object.getPrototypeOf||function(t){return t.__proto__};function d8r(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:c8r(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var RZt=b((_ji,ake)=>{var Wu=we("fs"),f8r=vZt(),p8r=_Zt(),h8r=TZt(),vhe=we("util"),dh,She;typeof Symbol=="function"&&typeof Symbol.for=="function"?(dh=Symbol.for("graceful-fs.queue"),She=Symbol.for("graceful-fs.previous")):(dh="___graceful-fs.queue",She="___graceful-fs.previous");function m8r(){}function wZt(t,e){Object.defineProperty(t,dh,{get:function(){return e}})}var eM=m8r;vhe.debuglog?eM=vhe.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(eM=function(){var t=vhe.format.apply(vhe,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
2093
2093
|
GFS4: `),console.error(t)});Wu[dh]||(bZt=global[dh]||[],wZt(Wu,bZt),Wu.close=function(t){function e(n,r){return t.call(Wu,n,function(i){i||xZt(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,She,{value:t}),e}(Wu.close),Wu.closeSync=function(t){function e(n){t.apply(Wu,arguments),xZt()}return Object.defineProperty(e,She,{value:t}),e}(Wu.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){eM(Wu[dh]),we("assert").equal(Wu[dh].length,0)}));var bZt;global[dh]||wZt(global,Wu[dh]);ake.exports=oke(h8r(Wu));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Wu.__patched&&(ake.exports=oke(Wu),Wu.__patched=!0);function oke(t){f8r(t),t.gracefulify=oke,t.createReadStream=F,t.createWriteStream=q;var e=t.readFile;t.readFile=n;function n(L,K,U){return typeof K=="function"&&(U=K,K=null),se(L,K,U);function se(V,O,Y,ee){return e(V,O,function(ne){ne&&(ne.code==="EMFILE"||ne.code==="ENFILE")?rk([se,[V,O,Y],ne,ee||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments)})}}var r=t.writeFile;t.writeFile=i;function i(L,K,U,se){return typeof U=="function"&&(se=U,U=null),V(L,K,U,se);function V(O,Y,ee,ne,Ae){return r(O,Y,ee,function(ve){ve&&(ve.code==="EMFILE"||ve.code==="ENFILE")?rk([V,[O,Y,ee,ne],ve,Ae||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(L,K,U,se){return typeof U=="function"&&(se=U,U=null),V(L,K,U,se);function V(O,Y,ee,ne,Ae){return o(O,Y,ee,function(ve){ve&&(ve.code==="EMFILE"||ve.code==="ENFILE")?rk([V,[O,Y,ee,ne],ve,Ae||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=l);function l(L,K,U,se){return typeof U=="function"&&(se=U,U=0),V(L,K,U,se);function V(O,Y,ee,ne,Ae){return a(O,Y,ee,function(ve){ve&&(ve.code==="EMFILE"||ve.code==="ENFILE")?rk([V,[O,Y,ee,ne],ve,Ae||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}}var u=t.readdir;t.readdir=d;var c=/^v[0-5]\./;function d(L,K,U){typeof K=="function"&&(U=K,K=null);var se=c.test(process.version)?function(Y,ee,ne,Ae){return u(Y,V(Y,ee,ne,Ae))}:function(Y,ee,ne,Ae){return u(Y,ee,V(Y,ee,ne,Ae))};return se(L,K,U);function V(O,Y,ee,ne){return function(Ae,ve){Ae&&(Ae.code==="EMFILE"||Ae.code==="ENFILE")?rk([se,[O,Y,ee],Ae,ne||Date.now(),Date.now()]):(ve&&ve.sort&&ve.sort(),typeof ee=="function"&&ee.call(this,Ae,ve))}}}if(process.version.substr(0,4)==="v0.8"){var h=p8r(t);_=h.ReadStream,B=h.WriteStream}var m=t.ReadStream;m&&(_.prototype=Object.create(m.prototype),_.prototype.open=w);var E=t.WriteStream;E&&(B.prototype=Object.create(E.prototype),B.prototype.open=R),Object.defineProperty(t,"ReadStream",{get:function(){return _},set:function(L){_=L},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return B},set:function(L){B=L},enumerable:!0,configurable:!0});var y=_;Object.defineProperty(t,"FileReadStream",{get:function(){return y},set:function(L){y=L},enumerable:!0,configurable:!0});var C=B;Object.defineProperty(t,"FileWriteStream",{get:function(){return C},set:function(L){C=L},enumerable:!0,configurable:!0});function _(L,K){return this instanceof _?(m.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function w(){var L=this;j(L.path,L.flags,L.mode,function(K,U){K?(L.autoClose&&L.destroy(),L.emit("error",K)):(L.fd=U,L.emit("open",U),L.read())})}function B(L,K){return this instanceof B?(E.apply(this,arguments),this):B.apply(Object.create(B.prototype),arguments)}function R(){var L=this;j(L.path,L.flags,L.mode,function(K,U){K?(L.destroy(),L.emit("error",K)):(L.fd=U,L.emit("open",U))})}function F(L,K){return new t.ReadStream(L,K)}function q(L,K){return new t.WriteStream(L,K)}var J=t.open;t.open=j;function j(L,K,U,se){return typeof U=="function"&&(se=U,U=null),V(L,K,U,se);function V(O,Y,ee,ne,Ae){return J(O,Y,ee,function(ve,De){ve&&(ve.code==="EMFILE"||ve.code==="ENFILE")?rk([V,[O,Y,ee,ne],ve,Ae||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}}return t}function rk(t){eM("ENQUEUE",t[0].name,t[1]),Wu[dh].push(t),ske()}var Dhe;function xZt(){for(var t=Date.now(),e=0;e<Wu[dh].length;++e)Wu[dh][e].length>2&&(Wu[dh][e][3]=t,Wu[dh][e][4]=t);ske()}function ske(){if(clearTimeout(Dhe),Dhe=void 0,Wu[dh].length!==0){var t=Wu[dh].shift(),e=t[0],n=t[1],r=t[2],i=t[3],o=t[4];if(i===void 0)eM("RETRY",e.name,n),e.apply(null,n);else if(Date.now()-i>=6e4){eM("TIMEOUT",e.name,n);var s=n.pop();typeof s=="function"&&s.call(null,r)}else{var a=Date.now()-o,l=Math.max(o-i,1),u=Math.min(l*1.2,100);a>=u?(eM("RETRY",e.name,n),e.apply(null,n.concat([i]))):Wu[dh].push(t)}Dhe===void 0&&(Dhe=setTimeout(ske,0))}}});var Dke=b(($Wi,pen)=>{"use strict";var H8r=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};pen.exports=H8r});var Ske=b((YWi,hen)=>{"use strict";var q8r="2.0.0",V8r=Number.MAX_SAFE_INTEGER||9007199254740991,$8r=16,Y8r=250,j8r=["major","premajor","minor","preminor","patch","prepatch","prerelease"];hen.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:$8r,MAX_SAFE_BUILD_LENGTH:Y8r,MAX_SAFE_INTEGER:V8r,RELEASE_TYPES:j8r,SEMVER_SPEC_VERSION:q8r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Aen=b((w_,men)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:_ke,MAX_SAFE_BUILD_LENGTH:W8r,MAX_LENGTH:z8r}=Ske(),J8r=Dke();w_=men.exports={};var K8r=w_.re=[],X8r=w_.safeRe=[],Zn=w_.src=[],Z8r=w_.safeSrc=[],er=w_.t={},eLr=0,Ike="[a-zA-Z0-9-]",tLr=[["\\s",1],["\\d",z8r],[Ike,W8r]],nLr=t=>{for(let[e,n]of tLr)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},fo=(t,e,n)=>{let r=nLr(e),i=eLr++;J8r(t,i,e),er[t]=i,Zn[i]=e,Z8r[i]=r,K8r[i]=new RegExp(e,n?"g":void 0),X8r[i]=new RegExp(r,n?"g":void 0)};fo("NUMERICIDENTIFIER","0|[1-9]\\d*");fo("NUMERICIDENTIFIERLOOSE","\\d+");fo("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ike}*`);fo("MAINVERSION",`(${Zn[er.NUMERICIDENTIFIER]})\\.(${Zn[er.NUMERICIDENTIFIER]})\\.(${Zn[er.NUMERICIDENTIFIER]})`);fo("MAINVERSIONLOOSE",`(${Zn[er.NUMERICIDENTIFIERLOOSE]})\\.(${Zn[er.NUMERICIDENTIFIERLOOSE]})\\.(${Zn[er.NUMERICIDENTIFIERLOOSE]})`);fo("PRERELEASEIDENTIFIER",`(?:${Zn[er.NONNUMERICIDENTIFIER]}|${Zn[er.NUMERICIDENTIFIER]})`);fo("PRERELEASEIDENTIFIERLOOSE",`(?:${Zn[er.NONNUMERICIDENTIFIER]}|${Zn[er.NUMERICIDENTIFIERLOOSE]})`);fo("PRERELEASE",`(?:-(${Zn[er.PRERELEASEIDENTIFIER]}(?:\\.${Zn[er.PRERELEASEIDENTIFIER]})*))`);fo("PRERELEASELOOSE",`(?:-?(${Zn[er.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Zn[er.PRERELEASEIDENTIFIERLOOSE]})*))`);fo("BUILDIDENTIFIER",`${Ike}+`);fo("BUILD",`(?:\\+(${Zn[er.BUILDIDENTIFIER]}(?:\\.${Zn[er.BUILDIDENTIFIER]})*))`);fo("FULLPLAIN",`v?${Zn[er.MAINVERSION]}${Zn[er.PRERELEASE]}?${Zn[er.BUILD]}?`);fo("FULL",`^${Zn[er.FULLPLAIN]}$`);fo("LOOSEPLAIN",`[v=\\s]*${Zn[er.MAINVERSIONLOOSE]}${Zn[er.PRERELEASELOOSE]}?${Zn[er.BUILD]}?`);fo("LOOSE",`^${Zn[er.LOOSEPLAIN]}$`);fo("GTLT","((?:<|>)?=?)");fo("XRANGEIDENTIFIERLOOSE",`${Zn[er.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);fo("XRANGEIDENTIFIER",`${Zn[er.NUMERICIDENTIFIER]}|x|X|\\*`);fo("XRANGEPLAIN",`[v=\\s]*(${Zn[er.XRANGEIDENTIFIER]})(?:\\.(${Zn[er.XRANGEIDENTIFIER]})(?:\\.(${Zn[er.XRANGEIDENTIFIER]})(?:${Zn[er.PRERELEASE]})?${Zn[er.BUILD]}?)?)?`);fo("XRANGEPLAINLOOSE",`[v=\\s]*(${Zn[er.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Zn[er.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Zn[er.XRANGEIDENTIFIERLOOSE]})(?:${Zn[er.PRERELEASELOOSE]})?${Zn[er.BUILD]}?)?)?`);fo("XRANGE",`^${Zn[er.GTLT]}\\s*${Zn[er.XRANGEPLAIN]}$`);fo("XRANGELOOSE",`^${Zn[er.GTLT]}\\s*${Zn[er.XRANGEPLAINLOOSE]}$`);fo("COERCEPLAIN",`(^|[^\\d])(\\d{1,${_ke}})(?:\\.(\\d{1,${_ke}}))?(?:\\.(\\d{1,${_ke}}))?`);fo("COERCE",`${Zn[er.COERCEPLAIN]}(?:$|[^\\d])`);fo("COERCEFULL",Zn[er.COERCEPLAIN]+`(?:${Zn[er.PRERELEASE]})?(?:${Zn[er.BUILD]})?(?:$|[^\\d])`);fo("COERCERTL",Zn[er.COERCE],!0);fo("COERCERTLFULL",Zn[er.COERCEFULL],!0);fo("LONETILDE","(?:~>?)");fo("TILDETRIM",`(\\s*)${Zn[er.LONETILDE]}\\s+`,!0);w_.tildeTrimReplace="$1~";fo("TILDE",`^${Zn[er.LONETILDE]}${Zn[er.XRANGEPLAIN]}$`);fo("TILDELOOSE",`^${Zn[er.LONETILDE]}${Zn[er.XRANGEPLAINLOOSE]}$`);fo("LONECARET","(?:\\^)");fo("CARETTRIM",`(\\s*)${Zn[er.LONECARET]}\\s+`,!0);w_.caretTrimReplace="$1^";fo("CARET",`^${Zn[er.LONECARET]}${Zn[er.XRANGEPLAIN]}$`);fo("CARETLOOSE",`^${Zn[er.LONECARET]}${Zn[er.XRANGEPLAINLOOSE]}$`);fo("COMPARATORLOOSE",`^${Zn[er.GTLT]}\\s*(${Zn[er.LOOSEPLAIN]})$|^$`);fo("COMPARATOR",`^${Zn[er.GTLT]}\\s*(${Zn[er.FULLPLAIN]})$|^$`);fo("COMPARATORTRIM",`(\\s*)${Zn[er.GTLT]}\\s*(${Zn[er.LOOSEPLAIN]}|${Zn[er.XRANGEPLAIN]})`,!0);w_.comparatorTrimReplace="$1$2$3";fo("HYPHENRANGE",`^\\s*(${Zn[er.XRANGEPLAIN]})\\s+-\\s+(${Zn[er.XRANGEPLAIN]})\\s*$`);fo("HYPHENRANGELOOSE",`^\\s*(${Zn[er.XRANGEPLAINLOOSE]})\\s+-\\s+(${Zn[er.XRANGEPLAINLOOSE]})\\s*$`);fo("STAR","(<|>)?=?\\s*\\*");fo("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");fo("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Een=b((jWi,gen)=>{"use strict";var rLr=Object.freeze({loose:!0}),iLr=Object.freeze({}),oLr=t=>t?typeof t!="object"?rLr:t:iLr;gen.exports=oLr});var Den=b((WWi,ven)=>{"use strict";var yen=/^[0-9]+$/,Cen=(t,e)=>{let n=yen.test(t),r=yen.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1},sLr=(t,e)=>Cen(e,t);ven.exports={compareIdentifiers:Cen,rcompareIdentifiers:sLr}});var bke=b((zWi,_en)=>{"use strict";var Bhe=Dke(),{MAX_LENGTH:Sen,MAX_SAFE_INTEGER:Nhe}=Ske(),{safeRe:Ohe,t:Mhe}=Aen(),aLr=Een(),{compareIdentifiers:lk}=Den(),Tke=class t{constructor(e,n){if(n=aLr(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Sen)throw new TypeError(`version is longer than ${Sen} characters`);Bhe("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=e.trim().match(n.loose?Ohe[Mhe.LOOSE]:Ohe[Mhe.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Nhe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nhe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nhe||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<Nhe)return o}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Bhe("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),lk(this.major,e.major)||lk(this.minor,e.minor)||lk(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=e.prerelease[n];if(Bhe("prerelease compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return lk(r,i)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let r=this.build[n],i=e.build[n];if(Bhe("build compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return lk(r,i)}while(++n)}inc(e,n,r){if(e.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let i=`-${n}`.match(this.options.loose?Ohe[Mhe.PRERELEASELOOSE]:Ohe[Mhe.PRERELEASE]);if(!i||i[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let o=[n,i];r===!1&&(o=[n]),lk(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};_en.exports=Tke});var ben=b((JWi,Ten)=>{"use strict";var Ien=bke(),lLr=(t,e,n=!1)=>{if(t instanceof Ien)return t;try{return new Ien(t,e)}catch(r){if(!n)return null;throw r}};Ten.exports=lLr});var Ren=b((KWi,wen)=>{"use strict";var xen=ben(),uLr=(t,e)=>{let n=xen(t,null,!0),r=xen(e,null,!0),i=n.compare(r);if(i===0)return null;let o=i>0,s=o?n:r,a=o?r:n,l=!!s.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0)return a.minor&&!a.patch?"minor":"patch"}let c=l?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};wen.exports=uLr});var Oen=b((XWi,Nen)=>{"use strict";var Ben=bke(),cLr=(t,e,n)=>new Ben(t,n).compare(new Ben(e,n));Nen.exports=cLr});var Fen=b((ZWi,Men)=>{"use strict";var dLr=Oen(),fLr=(t,e,n)=>dLr(t,e,n)>0;Men.exports=fLr});var Zen=b(rM=>{rM.parse=rM.decode=yLr;rM.stringify=rM.encode=Jen;rM.safe=dk;rM.unsafe=khe;var Fke=typeof process<"u"&&process.platform==="win32"?`\r
|
|
2094
2094
|
`:`
|
|
2095
2095
|
`;function Jen(t,e){var n=[],r="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(o,s,a){var l=t[o];l&&Array.isArray(l)?l.forEach(function(u){r+=dk(o+"[]")+i+dk(u)+`
|
|
@@ -2300,7 +2300,7 @@ Logging in with Google... Please restart iFlow CLI to continue.
|
|
|
2300
2300
|
`,e-1);return{line:n===-1?0:t.slice(0,n+1).match(/\n/g).length,column:e-n-1}}function APe(t,e,{oneBased:n=!1}={}){if(typeof t!="string")throw new TypeError("Text parameter should be a string");if(!Number.isInteger(e))throw new TypeError("Index parameter should be an integer");if(e<0||e>t.length)throw new RangeError("Index out of bounds");let r=hxr(t,e);return n?{line:r.line+1,column:r.column+1}:r}var mxr=t=>`\\u{${t.codePointAt(0).toString(16)}}`,gPe=class t extends Error{name="JSONError";fileName;#e;#t;#n;#r;#o;constructor(e){if(typeof e=="string")super(),this.#n=e;else{let{jsonParseError:n,fileName:r,input:i}=e;super(void 0,{cause:n}),this.#e=i,this.#t=n,this.fileName=r}Error.captureStackTrace?.(this,t)}get message(){this.#n??=`${gxr(this.#t.message)}${this.#e===""?" while parsing empty string":""}`;let{codeFrame:e}=this;return`${this.#n}${this.fileName?` in ${this.fileName}`:""}${e?`
|
|
2301
2301
|
|
|
2302
2302
|
${e}
|
|
2303
|
-
`:""}`}set message(e){this.#n=e}#i(e){if(!this.#t)return;let n=this.#e,r=Axr(n,this.#t.message);if(r)return(0,QGt.codeFrameColumns)(n,{start:r},{highlightCode:e})}get codeFrame(){return this.#r??=this.#i(!0),this.#r}get rawCodeFrame(){return this.#o??=this.#i(!1),this.#o}},Axr=(t,e)=>{let n=e.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);if(!n)return;let{index:r,line:i,column:o}=n.groups;return i&&o?{line:Number(i),column:Number(o)}:APe(t,Number(r),{oneBased:!0})},gxr=t=>t.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(e,n,r)=>`"${r}"(${mxr(r)})`);function EPe(t,e,n){typeof e=="string"&&(n=e,e=void 0);try{return JSON.parse(t,e)}catch(r){throw new gPe({jsonParseError:r,fileName:n,input:t})}}var eqt=Qe(XHt(),1);import{fileURLToPath as Uwr}from"node:url";function ZHt(t){return t instanceof URL?Uwr(t):t}var qwr=t=>Hwr.resolve(ZHt(t)??".","package.json"),Vwr=(t,e)=>{let n=typeof t=="string"?EPe(t):t;return e&&(0,eqt.default)(n),n};async function tqt({cwd:t,normalize:e=!0}={}){let n=await Gwr.readFile(qwr(t),"utf8");return Vwr(n,e)}async function nqt(t){let e=await pGt("package.json",t);if(e)return{packageJson:await tqt({...t,cwd:$wr.dirname(e)}),path:e}}import{fileURLToPath as Ywr}from"url";import jwr from"path";var Wwr=Ywr(import.meta.url),zwr=jwr.dirname(Wwr),zde;async function dQ(){if(zde)return zde;let t=await nqt({cwd:zwr});if(t)return zde=t.packageJson,zde}async function jw(){let t=await dQ();return"0.2.5
|
|
2303
|
+
`:""}`}set message(e){this.#n=e}#i(e){if(!this.#t)return;let n=this.#e,r=Axr(n,this.#t.message);if(r)return(0,QGt.codeFrameColumns)(n,{start:r},{highlightCode:e})}get codeFrame(){return this.#r??=this.#i(!0),this.#r}get rawCodeFrame(){return this.#o??=this.#i(!1),this.#o}},Axr=(t,e)=>{let n=e.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);if(!n)return;let{index:r,line:i,column:o}=n.groups;return i&&o?{line:Number(i),column:Number(o)}:APe(t,Number(r),{oneBased:!0})},gxr=t=>t.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(e,n,r)=>`"${r}"(${mxr(r)})`);function EPe(t,e,n){typeof e=="string"&&(n=e,e=void 0);try{return JSON.parse(t,e)}catch(r){throw new gPe({jsonParseError:r,fileName:n,input:t})}}var eqt=Qe(XHt(),1);import{fileURLToPath as Uwr}from"node:url";function ZHt(t){return t instanceof URL?Uwr(t):t}var qwr=t=>Hwr.resolve(ZHt(t)??".","package.json"),Vwr=(t,e)=>{let n=typeof t=="string"?EPe(t):t;return e&&(0,eqt.default)(n),n};async function tqt({cwd:t,normalize:e=!0}={}){let n=await Gwr.readFile(qwr(t),"utf8");return Vwr(n,e)}async function nqt(t){let e=await pGt("package.json",t);if(e)return{packageJson:await tqt({...t,cwd:$wr.dirname(e)}),path:e}}import{fileURLToPath as Ywr}from"url";import jwr from"path";var Wwr=Ywr(import.meta.url),zwr=jwr.dirname(Wwr),zde;async function dQ(){if(zde)return zde;let t=await nqt({cwd:zwr});if(t)return zde=t.packageJson,zde}async function jw(){let t=await dQ();return"0.2.5"}Fs();import gO from"node:process";var rqt={name:"about",description:"show version info",kind:"built-in",action:async t=>{let e=gO.platform,n="no sandbox";gO.env.SANDBOX&&gO.env.SANDBOX!=="sandbox-exec"?n=gO.env.SANDBOX:gO.env.SANDBOX==="sandbox-exec"&&(n=`sandbox-exec (${gO.env.SEATBELT_PROFILE||"unknown"})`);let r=t.services.config?.getModel()||"Unknown",i=await jw(),o=t.services.settings.merged.selectedAuthType||"",s=gO.env.GOOGLE_CLOUD_PROJECT||"",a={type:"about",cliVersion:i,osVersion:e,sandboxEnv:n,modelVersion:r,selectedAuthType:o,gcpProject:s};t.ui.addItem(a,Date.now())}};qn();Fs();var Kde="\x1B[32m";var oqt="\x1B[31m",vv="\x1B[36m",ih="\x1B[90m";var Qs="\x1B[0m";function Jde(t,e,n,r=!1){let i="";if(t.length===0)return i="\u{1F534} ",`${i}${e}
|
|
2304
2304
|
${oqt}No agents found${Qs}
|
|
2305
2305
|
`;i="\u{1F7E2} ";let o=`${i}${e}
|
|
2306
2306
|
`;for(let s of t)r?o+=Jwr(s):o+=`${Kde}- ${s.agentType}${Qs}
|