From e0f1724929cf8cd3710562466548b03ba50610e1 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Tue, 22 Sep 2026 11:50:38 +0800 Subject: [PATCH] Clarify sync-test safety and portable skill assets --- dist/mcp/server.js | 116 +++++++++--------- skills/seal-use/SKILL.md | 31 ++--- .../references/staging-simulation-workflow.md | 9 +- src/cli/commands/corps.ts | 11 +- 4 files changed, 83 insertions(+), 84 deletions(-) diff --git a/dist/mcp/server.js b/dist/mcp/server.js index 3a529da..0eb63e1 100644 --- a/dist/mcp/server.js +++ b/dist/mcp/server.js @@ -1,4 +1,4 @@ -import{createRequire as ly0}from"node:module";var fy0=Object.create;var{getPrototypeOf:uy0,defineProperty:IT,getOwnPropertyNames:by0}=Object;var iy0=Object.prototype.hasOwnProperty;function ny0($){return this[$]}var cy0,py0,J6=($,Y,z)=>{var U=$!=null&&typeof $==="object";if(U){var Q=Y?cy0??=new WeakMap:py0??=new WeakMap,J=Q.get($);if(J)return J}z=$!=null?fy0(uy0($)):{};let I=Y||!$||!$.__esModule?IT(z,"default",{value:$,enumerable:!0}):z;for(let K of by0($))if(!iy0.call(I,K))IT(I,K,{get:ny0.bind($,K),enumerable:!0});if(U)Q.set($,I);return I};var E=($,Y)=>()=>(Y||$((Y={exports:{}}).exports,Y),Y.exports);var dy0=($)=>$;function my0($,Y){this[$]=dy0.bind(null,Y)}var D8=($,Y)=>{for(var z in Y)IT($,z,{get:Y[z],enumerable:!0,configurable:!0,set:my0.bind(Y,z)})};var m=($,Y)=>()=>($&&(Y=$($=0)),Y);var I0=ly0(import.meta.url);var oy0,rq,ry0,sy0,ay0,ty0,C0=($,Y)=>()=>(Y||$((Y={exports:{}}).exports,Y),Y.exports),Gr=($,Y)=>{let z={};for(var U in $)rq(z,U,{get:$[U],enumerable:!0});if(Y)rq(z,Symbol.toStringTag,{value:"Module"});return z},ey0=($,Y,z,U)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(var Q=sy0(Y),J=0,I=Q.length,K;JY[G]).bind(null,K),enumerable:!(U=ry0(Y,K))||U.enumerable})}return $},sq=($,Y,z)=>(z=$!=null?oy0(ay0($)):{},ey0(Y||!$||!$.__esModule?rq(z,"default",{value:$,enumerable:!0}):z,$));var KT=m(()=>{oy0=Object.create,rq=Object.defineProperty,ry0=Object.getOwnPropertyDescriptor,sy0=Object.getOwnPropertyNames,ay0=Object.getPrototypeOf,ty0=Object.prototype.hasOwnProperty});function Wr($){return typeof $==="string"&&Hr.has($.replace(/#$/,""))}function Xr($,Y){if(!("$schema"in $)||typeof $.$schema!=="string")return"2020-12";let z=$.$schema.replace(/#$/,"");if($k0.has(z))return"2020-12";if(Hr.has(z))return"2019-09";if(Yk0.has(z)||zk0.has(z))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${$.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${Y}`)}var $k0,Hr,Yk0,zk0;var GT=m(()=>{$k0=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),Hr=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),Yk0=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),zk0=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"])});function W0($,Y,z){function U(K,G){if(!K._zod)Object.defineProperty(K,"_zod",{value:{def:G,constr:I,traits:new Set},enumerable:!1});if(K._zod.traits.has($))return;K._zod.traits.add($),Y(K,G);let H=I.prototype,W=Object.keys(H);for(let X=0;X{if(z?.Parent&&K instanceof z.Parent)return!0;return K?._zod?.traits?.has($)}}),Object.defineProperty(I,"name",{value:$}),I}function a4($){if($)Object.assign(jY,$);return jY}var Zr,sK,HT,n5,TY,jY;var EY=m(()=>{sK=Object.freeze({status:"aborted"});HT=Symbol("zod_brand");n5=class n5 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};TY=class TY extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}};(Zr=globalThis).__zod_globalConfig??(Zr.__zod_globalConfig={});jY=globalThis.__zod_globalConfig});var y0={};D8(y0,{unwrapMessage:()=>aK,uint8ArrayToHex:()=>Ek0,uint8ArrayToBase64url:()=>jk0,uint8ArrayToBase64:()=>Lr,stringifyPrimitive:()=>_0,slugify:()=>ZT,shallowClone:()=>VT,safeExtend:()=>Mk0,required:()=>Ak0,randomString:()=>Zk0,propertyKeyTypes:()=>$G,promiseAllObject:()=>Xk0,primitiveTypes:()=>LT,prefixIssues:()=>f8,pick:()=>Fk0,partial:()=>Dk0,parsedType:()=>S0,optionalKeys:()=>FT,omit:()=>Ok0,objectClone:()=>Gk0,numKeys:()=>qk0,nullish:()=>G7,normalizeParams:()=>u0,mergeDefs:()=>p9,merge:()=>Nk0,jsonStringifyReplacer:()=>dU,joinValues:()=>M0,issue:()=>lU,isPlainObject:()=>W7,isObject:()=>CY,hexToUint8Array:()=>Tk0,getSizableOrigin:()=>YG,getParsedType:()=>Vk0,getLengthableOrigin:()=>zG,getEnumValues:()=>tK,getElementAtPath:()=>Wk0,floatSafeRemainder:()=>XT,finalizeIssue:()=>B8,extend:()=>wk0,explicitlyAborted:()=>MT,escapeRegex:()=>A$,esc:()=>aq,defineLazy:()=>E1,createTransparentProxy:()=>Lk0,cloneDef:()=>Hk0,clone:()=>A8,cleanRegex:()=>eK,cleanEnum:()=>Bk0,captureStackTrace:()=>tq,cached:()=>mU,base64urlToUint8Array:()=>Pk0,base64ToUint8Array:()=>Vr,assignProp:()=>H7,assertNotEqual:()=>Qk0,assertNever:()=>Ik0,assertIs:()=>Jk0,assertEqual:()=>Uk0,assert:()=>Kk0,allowsEval:()=>qT,aborted:()=>X7,NUMBER_FORMAT_RANGES:()=>OT,Class:()=>Fr,BIGINT_FORMAT_RANGES:()=>wT});function Uk0($){return $}function Qk0($){return $}function Jk0($){}function Ik0($){throw Error("Unexpected value in exhaustive check")}function Kk0($){}function tK($){let Y=Object.values($).filter((U)=>typeof U==="number");return Object.entries($).filter(([U,Q])=>Y.indexOf(+U)===-1).map(([U,Q])=>Q)}function M0($,Y="|"){return $.map((z)=>_0(z)).join(Y)}function dU($,Y){if(typeof Y==="bigint")return Y.toString();return Y}function mU($){return{get value(){{let z=$();return Object.defineProperty(this,"value",{value:z}),z}throw Error("cached value already set")}}}function G7($){return $===null||$===void 0}function eK($){let Y=$.startsWith("^")?1:0,z=$.endsWith("$")?$.length-1:$.length;return $.slice(Y,z)}function XT($,Y){let z=$/Y,U=Math.round(z),Q=Number.EPSILON*Math.max(Math.abs(z),1);if(Math.abs(z-U)z?.[U],$)}function Xk0($){let Y=Object.keys($),z=Y.map((U)=>$[U]);return Promise.all(z).then((U)=>{let Q={};for(let J=0;JY};if(Y?.message!==void 0){if(Y?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");Y.error=Y.message}if(delete Y.message,typeof Y.error==="string")return{...Y,error:()=>Y.error};return Y}function Lk0($){let Y;return new Proxy({},{get(z,U,Q){return Y??(Y=$()),Reflect.get(Y,U,Q)},set(z,U,Q,J){return Y??(Y=$()),Reflect.set(Y,U,Q,J)},has(z,U){return Y??(Y=$()),Reflect.has(Y,U)},deleteProperty(z,U){return Y??(Y=$()),Reflect.deleteProperty(Y,U)},ownKeys(z){return Y??(Y=$()),Reflect.ownKeys(Y)},getOwnPropertyDescriptor(z,U){return Y??(Y=$()),Reflect.getOwnPropertyDescriptor(Y,U)},defineProperty(z,U,Q){return Y??(Y=$()),Reflect.defineProperty(Y,U,Q)}})}function _0($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function FT($){return Object.keys($).filter((Y)=>{return $[Y]._zod.optin==="optional"&&$[Y]._zod.optout==="optional"})}function Fk0($,Y){let z=$._zod.def,U=z.checks;if(U&&U.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let J=p9($._zod.def,{get shape(){let I={};for(let K in Y){if(!(K in z.shape))throw Error(`Unrecognized key: "${K}"`);if(!Y[K])continue;I[K]=z.shape[K]}return H7(this,"shape",I),I},checks:[]});return A8($,J)}function Ok0($,Y){let z=$._zod.def,U=z.checks;if(U&&U.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let J=p9($._zod.def,{get shape(){let I={...$._zod.def.shape};for(let K in Y){if(!(K in z.shape))throw Error(`Unrecognized key: "${K}"`);if(!Y[K])continue;delete I[K]}return H7(this,"shape",I),I},checks:[]});return A8($,J)}function wk0($,Y){if(!W7(Y))throw Error("Invalid input to extend: expected a plain object");let z=$._zod.def.checks;if(z&&z.length>0){let J=$._zod.def.shape;for(let I in Y)if(Object.getOwnPropertyDescriptor(J,I)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let Q=p9($._zod.def,{get shape(){let J={...$._zod.def.shape,...Y};return H7(this,"shape",J),J}});return A8($,Q)}function Mk0($,Y){if(!W7(Y))throw Error("Invalid input to safeExtend: expected a plain object");let z=p9($._zod.def,{get shape(){let U={...$._zod.def.shape,...Y};return H7(this,"shape",U),U}});return A8($,z)}function Nk0($,Y){if($._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let z=p9($._zod.def,{get shape(){let U={...$._zod.def.shape,...Y._zod.def.shape};return H7(this,"shape",U),U},get catchall(){return Y._zod.def.catchall},checks:Y._zod.def.checks??[]});return A8($,z)}function Dk0($,Y,z){let Q=Y._zod.def.checks;if(Q&&Q.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let I=p9(Y._zod.def,{get shape(){let K=Y._zod.def.shape,G={...K};if(z)for(let H in z){if(!(H in K))throw Error(`Unrecognized key: "${H}"`);if(!z[H])continue;G[H]=$?new $({type:"optional",innerType:K[H]}):K[H]}else for(let H in K)G[H]=$?new $({type:"optional",innerType:K[H]}):K[H];return H7(this,"shape",G),G},checks:[]});return A8(Y,I)}function Ak0($,Y,z){let U=p9(Y._zod.def,{get shape(){let Q=Y._zod.def.shape,J={...Q};if(z)for(let I in z){if(!(I in J))throw Error(`Unrecognized key: "${I}"`);if(!z[I])continue;J[I]=new $({type:"nonoptional",innerType:Q[I]})}else for(let I in Q)J[I]=new $({type:"nonoptional",innerType:Q[I]});return H7(this,"shape",J),J}});return A8(Y,U)}function X7($,Y=0){if($.aborted===!0)return!0;for(let z=Y;z<$.issues.length;z++)if($.issues[z]?.continue!==!0)return!0;return!1}function MT($,Y=0){if($.aborted===!0)return!0;for(let z=Y;z<$.issues.length;z++)if($.issues[z]?.continue===!1)return!0;return!1}function f8($,Y){return Y.map((z)=>{var U;return(U=z).path??(U.path=[]),z.path.unshift($),z})}function aK($){return typeof $==="string"?$:$?.message}function B8($,Y,z){let U=$.message?$.message:aK($.inst?._zod.def?.error?.($))??aK(Y?.error?.($))??aK(z.customError?.($))??aK(z.localeError?.($))??"Invalid input",{inst:Q,continue:J,input:I,...K}=$;if(K.path??(K.path=[]),K.message=U,Y?.reportInput)K.input=I;return K}function YG($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function zG($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function S0($){let Y=typeof $;switch(Y){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let z=$;if(z&&Object.getPrototypeOf(z)!==Object.prototype&&"constructor"in z&&z.constructor)return z.constructor.name}}return Y}function lU(...$){let[Y,z,U]=$;if(typeof Y==="string")return{message:Y,code:"custom",input:z,inst:U};return{...Y}}function Bk0($){return Object.entries($).filter(([Y,z])=>{return Number.isNaN(Number.parseInt(Y,10))}).map((Y)=>Y[1])}function Vr($){let Y=atob($),z=new Uint8Array(Y.length);for(let U=0;UY.toString(16).padStart(2,"0")).join("")}class Fr{constructor(...$){}}var qr,tq,qT,Vk0=($)=>{let Y=typeof $;switch(Y){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${Y}`)}},$G,LT,OT,wT;var Y1=m(()=>{EY();qr=Symbol("evaluating");tq="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};qT=mU(()=>{if(jY.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});$G=new Set(["string","number","symbol"]),LT=new Set(["string","number","bigint","boolean","symbol","undefined"]);OT={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},wT={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]}});function QG($,Y=(z)=>z.message){let z={},U=[];for(let Q of $.issues)if(Q.path.length>0)z[Q.path[0]]=z[Q.path[0]]||[],z[Q.path[0]].push(Y(Q));else U.push(Y(Q));return{formErrors:U,fieldErrors:z}}function JG($,Y=(z)=>z.message){let z={_errors:[]},U=(Q,J=[])=>{for(let I of Q.issues)if(I.code==="invalid_union"&&I.errors.length)I.errors.map((K)=>U({issues:K},[...J,...I.path]));else if(I.code==="invalid_key")U({issues:I.issues},[...J,...I.path]);else if(I.code==="invalid_element")U({issues:I.issues},[...J,...I.path]);else{let K=[...J,...I.path];if(K.length===0)z._errors.push(Y(I));else{let G=z,H=0;while(Hz.message){let z={errors:[]},U=(Q,J=[])=>{var I,K;for(let G of Q.issues)if(G.code==="invalid_union"&&G.errors.length)G.errors.map((H)=>U({issues:H},[...J,...G.path]));else if(G.code==="invalid_key")U({issues:G.issues},[...J,...G.path]);else if(G.code==="invalid_element")U({issues:G.issues},[...J,...G.path]);else{let H=[...J,...G.path];if(H.length===0){z.errors.push(Y(G));continue}let W=z,X=0;while(Xtypeof U==="object"?U.key:U);for(let U of z)if(typeof U==="number")Y.push(`[${U}]`);else if(typeof U==="symbol")Y.push(`[${JSON.stringify(String(U))}]`);else if(/[^\w$]/.test(U))Y.push(`[${JSON.stringify(U)}]`);else{if(Y.length)Y.push(".");Y.push(U)}return Y.join("")}function DT($){let Y=[],z=[...$.issues].sort((U,Q)=>(U.path??[]).length-(Q.path??[]).length);for(let U of z)if(Y.push(`✖ ${U.message}`),U.path?.length)Y.push(` → at ${wr(U.path)}`);return Y.join(` +import{createRequire as ly0}from"node:module";var fy0=Object.create;var{getPrototypeOf:uy0,defineProperty:IT,getOwnPropertyNames:by0}=Object;var iy0=Object.prototype.hasOwnProperty;function ny0($){return this[$]}var cy0,py0,J6=($,Y,z)=>{var U=$!=null&&typeof $==="object";if(U){var Q=Y?cy0??=new WeakMap:py0??=new WeakMap,J=Q.get($);if(J)return J}z=$!=null?fy0(uy0($)):{};let I=Y||!$||!$.__esModule?IT(z,"default",{value:$,enumerable:!0}):z;for(let K of by0($))if(!iy0.call(I,K))IT(I,K,{get:ny0.bind($,K),enumerable:!0});if(U)Q.set($,I);return I};var E=($,Y)=>()=>(Y||$((Y={exports:{}}).exports,Y),Y.exports);var dy0=($)=>$;function my0($,Y){this[$]=dy0.bind(null,Y)}var D8=($,Y)=>{for(var z in Y)IT($,z,{get:Y[z],enumerable:!0,configurable:!0,set:my0.bind(Y,z)})};var m=($,Y)=>()=>($&&(Y=$($=0)),Y);var I0=ly0(import.meta.url);var oy0,rq,ry0,sy0,ay0,ty0,C0=($,Y)=>()=>(Y||$((Y={exports:{}}).exports,Y),Y.exports),Gr=($,Y)=>{let z={};for(var U in $)rq(z,U,{get:$[U],enumerable:!0});if(Y)rq(z,Symbol.toStringTag,{value:"Module"});return z},ey0=($,Y,z,U)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(var Q=sy0(Y),J=0,I=Q.length,K;JY[G]).bind(null,K),enumerable:!(U=ry0(Y,K))||U.enumerable})}return $},sq=($,Y,z)=>(z=$!=null?oy0(ay0($)):{},ey0(Y||!$||!$.__esModule?rq(z,"default",{value:$,enumerable:!0}):z,$));var KT=m(()=>{oy0=Object.create,rq=Object.defineProperty,ry0=Object.getOwnPropertyDescriptor,sy0=Object.getOwnPropertyNames,ay0=Object.getPrototypeOf,ty0=Object.prototype.hasOwnProperty});function Wr($){return typeof $==="string"&&Hr.has($.replace(/#$/,""))}function Xr($,Y){if(!("$schema"in $)||typeof $.$schema!=="string")return"2020-12";let z=$.$schema.replace(/#$/,"");if($k0.has(z))return"2020-12";if(Hr.has(z))return"2019-09";if(Yk0.has(z)||zk0.has(z))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${$.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${Y}`)}var $k0,Hr,Yk0,zk0;var GT=m(()=>{$k0=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),Hr=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),Yk0=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),zk0=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"])});function W0($,Y,z){function U(K,G){if(!K._zod)Object.defineProperty(K,"_zod",{value:{def:G,constr:I,traits:new Set},enumerable:!1});if(K._zod.traits.has($))return;K._zod.traits.add($),Y(K,G);let H=I.prototype,W=Object.keys(H);for(let X=0;X{if(z?.Parent&&K instanceof z.Parent)return!0;return K?._zod?.traits?.has($)}}),Object.defineProperty(I,"name",{value:$}),I}function a4($){if($)Object.assign(jY,$);return jY}var Zr,sK,HT,n5,TY,jY;var EY=m(()=>{sK=Object.freeze({status:"aborted"});HT=Symbol("zod_brand");n5=class n5 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};TY=class TY extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}};(Zr=globalThis).__zod_globalConfig??(Zr.__zod_globalConfig={});jY=globalThis.__zod_globalConfig});var y0={};D8(y0,{unwrapMessage:()=>aK,uint8ArrayToHex:()=>Ek0,uint8ArrayToBase64url:()=>jk0,uint8ArrayToBase64:()=>Lr,stringifyPrimitive:()=>v0,slugify:()=>ZT,shallowClone:()=>VT,safeExtend:()=>Mk0,required:()=>Ak0,randomString:()=>Zk0,propertyKeyTypes:()=>$G,promiseAllObject:()=>Xk0,primitiveTypes:()=>LT,prefixIssues:()=>f8,pick:()=>Fk0,partial:()=>Dk0,parsedType:()=>S0,optionalKeys:()=>FT,omit:()=>Ok0,objectClone:()=>Gk0,numKeys:()=>qk0,nullish:()=>G7,normalizeParams:()=>u0,mergeDefs:()=>p9,merge:()=>Nk0,jsonStringifyReplacer:()=>dU,joinValues:()=>M0,issue:()=>lU,isPlainObject:()=>W7,isObject:()=>CY,hexToUint8Array:()=>Tk0,getSizableOrigin:()=>YG,getParsedType:()=>Vk0,getLengthableOrigin:()=>zG,getEnumValues:()=>tK,getElementAtPath:()=>Wk0,floatSafeRemainder:()=>XT,finalizeIssue:()=>B8,extend:()=>wk0,explicitlyAborted:()=>MT,escapeRegex:()=>A$,esc:()=>aq,defineLazy:()=>E1,createTransparentProxy:()=>Lk0,cloneDef:()=>Hk0,clone:()=>A8,cleanRegex:()=>eK,cleanEnum:()=>Bk0,captureStackTrace:()=>tq,cached:()=>mU,base64urlToUint8Array:()=>Pk0,base64ToUint8Array:()=>Vr,assignProp:()=>H7,assertNotEqual:()=>Qk0,assertNever:()=>Ik0,assertIs:()=>Jk0,assertEqual:()=>Uk0,assert:()=>Kk0,allowsEval:()=>qT,aborted:()=>X7,NUMBER_FORMAT_RANGES:()=>OT,Class:()=>Fr,BIGINT_FORMAT_RANGES:()=>wT});function Uk0($){return $}function Qk0($){return $}function Jk0($){}function Ik0($){throw Error("Unexpected value in exhaustive check")}function Kk0($){}function tK($){let Y=Object.values($).filter((U)=>typeof U==="number");return Object.entries($).filter(([U,Q])=>Y.indexOf(+U)===-1).map(([U,Q])=>Q)}function M0($,Y="|"){return $.map((z)=>v0(z)).join(Y)}function dU($,Y){if(typeof Y==="bigint")return Y.toString();return Y}function mU($){return{get value(){{let z=$();return Object.defineProperty(this,"value",{value:z}),z}throw Error("cached value already set")}}}function G7($){return $===null||$===void 0}function eK($){let Y=$.startsWith("^")?1:0,z=$.endsWith("$")?$.length-1:$.length;return $.slice(Y,z)}function XT($,Y){let z=$/Y,U=Math.round(z),Q=Number.EPSILON*Math.max(Math.abs(z),1);if(Math.abs(z-U)z?.[U],$)}function Xk0($){let Y=Object.keys($),z=Y.map((U)=>$[U]);return Promise.all(z).then((U)=>{let Q={};for(let J=0;JY};if(Y?.message!==void 0){if(Y?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");Y.error=Y.message}if(delete Y.message,typeof Y.error==="string")return{...Y,error:()=>Y.error};return Y}function Lk0($){let Y;return new Proxy({},{get(z,U,Q){return Y??(Y=$()),Reflect.get(Y,U,Q)},set(z,U,Q,J){return Y??(Y=$()),Reflect.set(Y,U,Q,J)},has(z,U){return Y??(Y=$()),Reflect.has(Y,U)},deleteProperty(z,U){return Y??(Y=$()),Reflect.deleteProperty(Y,U)},ownKeys(z){return Y??(Y=$()),Reflect.ownKeys(Y)},getOwnPropertyDescriptor(z,U){return Y??(Y=$()),Reflect.getOwnPropertyDescriptor(Y,U)},defineProperty(z,U,Q){return Y??(Y=$()),Reflect.defineProperty(Y,U,Q)}})}function v0($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function FT($){return Object.keys($).filter((Y)=>{return $[Y]._zod.optin==="optional"&&$[Y]._zod.optout==="optional"})}function Fk0($,Y){let z=$._zod.def,U=z.checks;if(U&&U.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let J=p9($._zod.def,{get shape(){let I={};for(let K in Y){if(!(K in z.shape))throw Error(`Unrecognized key: "${K}"`);if(!Y[K])continue;I[K]=z.shape[K]}return H7(this,"shape",I),I},checks:[]});return A8($,J)}function Ok0($,Y){let z=$._zod.def,U=z.checks;if(U&&U.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let J=p9($._zod.def,{get shape(){let I={...$._zod.def.shape};for(let K in Y){if(!(K in z.shape))throw Error(`Unrecognized key: "${K}"`);if(!Y[K])continue;delete I[K]}return H7(this,"shape",I),I},checks:[]});return A8($,J)}function wk0($,Y){if(!W7(Y))throw Error("Invalid input to extend: expected a plain object");let z=$._zod.def.checks;if(z&&z.length>0){let J=$._zod.def.shape;for(let I in Y)if(Object.getOwnPropertyDescriptor(J,I)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let Q=p9($._zod.def,{get shape(){let J={...$._zod.def.shape,...Y};return H7(this,"shape",J),J}});return A8($,Q)}function Mk0($,Y){if(!W7(Y))throw Error("Invalid input to safeExtend: expected a plain object");let z=p9($._zod.def,{get shape(){let U={...$._zod.def.shape,...Y};return H7(this,"shape",U),U}});return A8($,z)}function Nk0($,Y){if($._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let z=p9($._zod.def,{get shape(){let U={...$._zod.def.shape,...Y._zod.def.shape};return H7(this,"shape",U),U},get catchall(){return Y._zod.def.catchall},checks:Y._zod.def.checks??[]});return A8($,z)}function Dk0($,Y,z){let Q=Y._zod.def.checks;if(Q&&Q.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let I=p9(Y._zod.def,{get shape(){let K=Y._zod.def.shape,G={...K};if(z)for(let H in z){if(!(H in K))throw Error(`Unrecognized key: "${H}"`);if(!z[H])continue;G[H]=$?new $({type:"optional",innerType:K[H]}):K[H]}else for(let H in K)G[H]=$?new $({type:"optional",innerType:K[H]}):K[H];return H7(this,"shape",G),G},checks:[]});return A8(Y,I)}function Ak0($,Y,z){let U=p9(Y._zod.def,{get shape(){let Q=Y._zod.def.shape,J={...Q};if(z)for(let I in z){if(!(I in J))throw Error(`Unrecognized key: "${I}"`);if(!z[I])continue;J[I]=new $({type:"nonoptional",innerType:Q[I]})}else for(let I in Q)J[I]=new $({type:"nonoptional",innerType:Q[I]});return H7(this,"shape",J),J}});return A8(Y,U)}function X7($,Y=0){if($.aborted===!0)return!0;for(let z=Y;z<$.issues.length;z++)if($.issues[z]?.continue!==!0)return!0;return!1}function MT($,Y=0){if($.aborted===!0)return!0;for(let z=Y;z<$.issues.length;z++)if($.issues[z]?.continue===!1)return!0;return!1}function f8($,Y){return Y.map((z)=>{var U;return(U=z).path??(U.path=[]),z.path.unshift($),z})}function aK($){return typeof $==="string"?$:$?.message}function B8($,Y,z){let U=$.message?$.message:aK($.inst?._zod.def?.error?.($))??aK(Y?.error?.($))??aK(z.customError?.($))??aK(z.localeError?.($))??"Invalid input",{inst:Q,continue:J,input:I,...K}=$;if(K.path??(K.path=[]),K.message=U,Y?.reportInput)K.input=I;return K}function YG($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function zG($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function S0($){let Y=typeof $;switch(Y){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let z=$;if(z&&Object.getPrototypeOf(z)!==Object.prototype&&"constructor"in z&&z.constructor)return z.constructor.name}}return Y}function lU(...$){let[Y,z,U]=$;if(typeof Y==="string")return{message:Y,code:"custom",input:z,inst:U};return{...Y}}function Bk0($){return Object.entries($).filter(([Y,z])=>{return Number.isNaN(Number.parseInt(Y,10))}).map((Y)=>Y[1])}function Vr($){let Y=atob($),z=new Uint8Array(Y.length);for(let U=0;UY.toString(16).padStart(2,"0")).join("")}class Fr{constructor(...$){}}var qr,tq,qT,Vk0=($)=>{let Y=typeof $;switch(Y){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${Y}`)}},$G,LT,OT,wT;var Y1=m(()=>{EY();qr=Symbol("evaluating");tq="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};qT=mU(()=>{if(jY.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});$G=new Set(["string","number","symbol"]),LT=new Set(["string","number","bigint","boolean","symbol","undefined"]);OT={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},wT={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]}});function QG($,Y=(z)=>z.message){let z={},U=[];for(let Q of $.issues)if(Q.path.length>0)z[Q.path[0]]=z[Q.path[0]]||[],z[Q.path[0]].push(Y(Q));else U.push(Y(Q));return{formErrors:U,fieldErrors:z}}function JG($,Y=(z)=>z.message){let z={_errors:[]},U=(Q,J=[])=>{for(let I of Q.issues)if(I.code==="invalid_union"&&I.errors.length)I.errors.map((K)=>U({issues:K},[...J,...I.path]));else if(I.code==="invalid_key")U({issues:I.issues},[...J,...I.path]);else if(I.code==="invalid_element")U({issues:I.issues},[...J,...I.path]);else{let K=[...J,...I.path];if(K.length===0)z._errors.push(Y(I));else{let G=z,H=0;while(Hz.message){let z={errors:[]},U=(Q,J=[])=>{var I,K;for(let G of Q.issues)if(G.code==="invalid_union"&&G.errors.length)G.errors.map((H)=>U({issues:H},[...J,...G.path]));else if(G.code==="invalid_key")U({issues:G.issues},[...J,...G.path]);else if(G.code==="invalid_element")U({issues:G.issues},[...J,...G.path]);else{let H=[...J,...G.path];if(H.length===0){z.errors.push(Y(G));continue}let W=z,X=0;while(Xtypeof U==="object"?U.key:U);for(let U of z)if(typeof U==="number")Y.push(`[${U}]`);else if(typeof U==="symbol")Y.push(`[${JSON.stringify(String(U))}]`);else if(/[^\w$]/.test(U))Y.push(`[${JSON.stringify(U)}]`);else{if(Y.length)Y.push(".");Y.push(U)}return Y.join("")}function DT($){let Y=[],z=[...$.issues].sort((U,Q)=>(U.path??[]).length-(Q.path??[]).length);for(let U of z)if(Y.push(`✖ ${U.message}`),U.path?.length)Y.push(` → at ${wr(U.path)}`);return Y.join(` `)}var Or=($,Y)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:Y,enumerable:!1}),$.message=JSON.stringify(Y,dU,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},UG,u8;var AT=m(()=>{EY();Y1();UG=W0("$ZodError",Or),u8=W0("$ZodError",Or,{Parent:Error})});var oU=($)=>(Y,z,U,Q)=>{let J=U?{...U,async:!1}:{async:!1},I=Y._zod.run({value:z,issues:[]},J);if(I instanceof Promise)throw new n5;if(I.issues.length){let K=new(Q?.Err??$)(I.issues.map((G)=>B8(G,J,a4())));throw tq(K,Q?.callee),K}return I.value},eq,rU=($)=>async(Y,z,U,Q)=>{let J=U?{...U,async:!0}:{async:!0},I=Y._zod.run({value:z,issues:[]},J);if(I instanceof Promise)I=await I;if(I.issues.length){let K=new(Q?.Err??$)(I.issues.map((G)=>B8(G,J,a4())));throw tq(K,Q?.callee),K}return I.value},$V,sU=($)=>(Y,z,U)=>{let Q=U?{...U,async:!1}:{async:!1},J=Y._zod.run({value:z,issues:[]},Q);if(J instanceof Promise)throw new n5;return J.issues.length?{success:!1,error:new($??UG)(J.issues.map((I)=>B8(I,Q,a4())))}:{success:!0,data:J.value}},BT,aU=($)=>async(Y,z,U)=>{let Q=U?{...U,async:!0}:{async:!0},J=Y._zod.run({value:z,issues:[]},Q);if(J instanceof Promise)J=await J;return J.issues.length?{success:!1,error:new $(J.issues.map((I)=>B8(I,Q,a4())))}:{success:!0,data:J.value}},PT,YV=($)=>(Y,z,U)=>{let Q=U?{...U,direction:"backward"}:{direction:"backward"};return oU($)(Y,z,Q)},Rk0,zV=($)=>(Y,z,U)=>{return oU($)(Y,z,U)},_k0,UV=($)=>async(Y,z,U)=>{let Q=U?{...U,direction:"backward"}:{direction:"backward"};return rU($)(Y,z,Q)},vk0,QV=($)=>async(Y,z,U)=>{return rU($)(Y,z,U)},hk0,JV=($)=>(Y,z,U)=>{let Q=U?{...U,direction:"backward"}:{direction:"backward"};return sU($)(Y,z,Q)},Sk0,IV=($)=>(Y,z,U)=>{return sU($)(Y,z,U)},gk0,KV=($)=>async(Y,z,U)=>{let Q=U?{...U,direction:"backward"}:{direction:"backward"};return aU($)(Y,z,Q)},yk0,GV=($)=>async(Y,z,U)=>{return aU($)(Y,z,U)},kk0;var jT=m(()=>{EY();AT();Y1();eq=oU(u8),$V=rU(u8),BT=sU(u8),PT=aU(u8),Rk0=YV(u8),_k0=zV(u8),vk0=UV(u8),hk0=QV(u8),Sk0=JV(u8),gk0=IV(u8),yk0=KV(u8),kk0=GV(u8)});var z$={};D8(z$,{xid:()=>RT,uuid7:()=>bk0,uuid6:()=>uk0,uuid4:()=>fk0,uuid:()=>RY,uppercase:()=>$E,unicodeEmail:()=>Mr,undefined:()=>tT,ulid:()=>CT,time:()=>dT,string:()=>lT,sha512_hex:()=>Kx0,sha512_base64url:()=>Hx0,sha512_base64:()=>Gx0,sha384_hex:()=>Qx0,sha384_base64url:()=>Ix0,sha384_base64:()=>Jx0,sha256_hex:()=>Yx0,sha256_base64url:()=>Ux0,sha256_base64:()=>zx0,sha1_hex:()=>tk0,sha1_base64url:()=>$x0,sha1_base64:()=>ek0,rfc5322Email:()=>nk0,number:()=>IG,null:()=>aT,nanoid:()=>vT,md5_hex:()=>rk0,md5_base64url:()=>ak0,md5_base64:()=>sk0,mac:()=>fT,lowercase:()=>eT,ksuid:()=>_T,ipv6:()=>xT,ipv4:()=>kT,integer:()=>rT,idnEmail:()=>ck0,httpProtocol:()=>nT,html5Email:()=>ik0,hostname:()=>mk0,hex:()=>ok0,guid:()=>ST,extendedDuration:()=>xk0,emoji:()=>yT,email:()=>gT,e164:()=>cT,duration:()=>hT,domain:()=>lk0,datetime:()=>mT,date:()=>pT,cuid2:()=>ET,cuid:()=>TT,cidrv6:()=>bT,cidrv4:()=>uT,browserEmail:()=>pk0,boolean:()=>sT,bigint:()=>oT,base64url:()=>HV,base64:()=>iT});function yT(){return new RegExp(dk0,"u")}function Dr($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function dT($){return new RegExp(`^${Dr($)}$`)}function mT($){let Y=Dr({precision:$.precision}),z=["Z"];if($.local)z.push("");if($.offset)z.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let U=`${Y}(?:${z.join("|")})`;return new RegExp(`^${Nr}T(?:${U})$`)}function KG($,Y){return new RegExp(`^[A-Za-z0-9+/]{${$}}${Y}$`)}function GG($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var TT,ET,CT,RT,_T,vT,hT,xk0,ST,RY=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},fk0,uk0,bk0,gT,ik0,nk0,Mr,ck0,pk0,dk0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",kT,xT,fT=($)=>{let Y=A$($??":");return new RegExp(`^(?:[0-9A-F]{2}${Y}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${Y}){5}[0-9a-f]{2}$`)},uT,bT,iT,HV,mk0,lk0,nT,cT,Nr="(?:(?:\\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])))",pT,lT=($)=>{let Y=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${Y}$`)},oT,rT,IG,sT,aT,tT,eT,$E,ok0,rk0,sk0,ak0,tk0,ek0,$x0,Yx0,zx0,Ux0,Qx0,Jx0,Ix0,Kx0,Gx0,Hx0;var WV=m(()=>{Y1();TT=/^[cC][0-9a-z]{6,}$/,ET=/^[0-9a-z]+$/,CT=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,RT=/^[0-9a-vA-V]{20}$/,_T=/^[A-Za-z0-9]{27}$/,vT=/^[a-zA-Z0-9_-]{21}$/,hT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xk0=/^[-+]?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)?)??$/,ST=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,fk0=RY(4),uk0=RY(6),bk0=RY(7),gT=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ik0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,nk0=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Mr=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ck0=Mr,pk0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;kT=/^(?:(?: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])$/,xT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,uT=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,iT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,HV=/^[A-Za-z0-9_-]*$/,mk0=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,lk0=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,nT=/^https?$/,cT=/^\+[1-9]\d{6,14}$/,pT=new RegExp(`^${Nr}$`);oT=/^-?\d+n?$/,rT=/^-?\d+$/,IG=/^-?\d+(?:\.\d+)?$/,sT=/^(?:true|false)$/i,aT=/^null$/i,tT=/^undefined$/i,eT=/^[^A-Z]*$/,$E=/^[^a-z]*$/,ok0=/^[0-9a-fA-F]*$/;rk0=/^[0-9a-fA-F]{32}$/,sk0=KG(22,"=="),ak0=GG(22),tk0=/^[0-9a-fA-F]{40}$/,ek0=KG(27,"="),$x0=GG(27),Yx0=/^[0-9a-fA-F]{64}$/,zx0=KG(43,"="),Ux0=GG(43),Qx0=/^[0-9a-fA-F]{96}$/,Jx0=KG(64,""),Ix0=GG(64),Kx0=/^[0-9a-fA-F]{128}$/,Gx0=KG(86,"=="),Hx0=GG(86)});function Ar($,Y,z){if($.issues.length)Y.issues.push(...f8(z,$.issues))}var F4,Br,XV,ZV,YE,zE,UE,QE,JE,IE,KE,GE,HE,tU,WE,XE,ZE,qE,VE,LE,FE,OE,wE;var qV=m(()=>{EY();WV();Y1();F4=W0("$ZodCheck",($,Y)=>{var z;$._zod??($._zod={}),$._zod.def=Y,(z=$._zod).onattach??(z.onattach=[])}),Br={number:"number",bigint:"bigint",object:"date"},XV=W0("$ZodCheckLessThan",($,Y)=>{F4.init($,Y);let z=Br[typeof Y.value];$._zod.onattach.push((U)=>{let Q=U._zod.bag,J=(Y.inclusive?Q.maximum:Q.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(Y.value{if(Y.inclusive?U.value<=Y.value:U.value{F4.init($,Y);let z=Br[typeof Y.value];$._zod.onattach.push((U)=>{let Q=U._zod.bag,J=(Y.inclusive?Q.minimum:Q.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(Y.value>J)if(Y.inclusive)Q.minimum=Y.value;else Q.exclusiveMinimum=Y.value}),$._zod.check=(U)=>{if(Y.inclusive?U.value>=Y.value:U.value>Y.value)return;U.issues.push({origin:z,code:"too_small",minimum:typeof Y.value==="object"?Y.value.getTime():Y.value,input:U.value,inclusive:Y.inclusive,inst:$,continue:!Y.abort})}}),YE=W0("$ZodCheckMultipleOf",($,Y)=>{F4.init($,Y),$._zod.onattach.push((z)=>{var U;(U=z._zod.bag).multipleOf??(U.multipleOf=Y.value)}),$._zod.check=(z)=>{if(typeof z.value!==typeof Y.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof z.value==="bigint"?z.value%Y.value===BigInt(0):XT(z.value,Y.value)===0)return;z.issues.push({origin:typeof z.value,code:"not_multiple_of",divisor:Y.value,input:z.value,inst:$,continue:!Y.abort})}}),zE=W0("$ZodCheckNumberFormat",($,Y)=>{F4.init($,Y),Y.format=Y.format||"float64";let z=Y.format?.includes("int"),U=z?"int":"number",[Q,J]=OT[Y.format];$._zod.onattach.push((I)=>{let K=I._zod.bag;if(K.format=Y.format,K.minimum=Q,K.maximum=J,z)K.pattern=rT}),$._zod.check=(I)=>{let K=I.value;if(z){if(!Number.isInteger(K)){I.issues.push({expected:U,format:Y.format,code:"invalid_type",continue:!1,input:K,inst:$});return}if(!Number.isSafeInteger(K)){if(K>0)I.issues.push({input:K,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:U,inclusive:!0,continue:!Y.abort});else I.issues.push({input:K,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:U,inclusive:!0,continue:!Y.abort});return}}if(KJ)I.issues.push({origin:"number",input:K,code:"too_big",maximum:J,inclusive:!0,inst:$,continue:!Y.abort})}}),UE=W0("$ZodCheckBigIntFormat",($,Y)=>{F4.init($,Y);let[z,U]=wT[Y.format];$._zod.onattach.push((Q)=>{let J=Q._zod.bag;J.format=Y.format,J.minimum=z,J.maximum=U}),$._zod.check=(Q)=>{let J=Q.value;if(JU)Q.issues.push({origin:"bigint",input:J,code:"too_big",maximum:U,inclusive:!0,inst:$,continue:!Y.abort})}}),QE=W0("$ZodCheckMaxSize",($,Y)=>{var z;F4.init($,Y),(z=$._zod.def).when??(z.when=(U)=>{let Q=U.value;return!G7(Q)&&Q.size!==void 0}),$._zod.onattach.push((U)=>{let Q=U._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum{let Q=U.value;if(Q.size<=Y.maximum)return;U.issues.push({origin:YG(Q),code:"too_big",maximum:Y.maximum,inclusive:!0,input:Q,inst:$,continue:!Y.abort})}}),JE=W0("$ZodCheckMinSize",($,Y)=>{var z;F4.init($,Y),(z=$._zod.def).when??(z.when=(U)=>{let Q=U.value;return!G7(Q)&&Q.size!==void 0}),$._zod.onattach.push((U)=>{let Q=U._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>Q)U._zod.bag.minimum=Y.minimum}),$._zod.check=(U)=>{let Q=U.value;if(Q.size>=Y.minimum)return;U.issues.push({origin:YG(Q),code:"too_small",minimum:Y.minimum,inclusive:!0,input:Q,inst:$,continue:!Y.abort})}}),IE=W0("$ZodCheckSizeEquals",($,Y)=>{var z;F4.init($,Y),(z=$._zod.def).when??(z.when=(U)=>{let Q=U.value;return!G7(Q)&&Q.size!==void 0}),$._zod.onattach.push((U)=>{let Q=U._zod.bag;Q.minimum=Y.size,Q.maximum=Y.size,Q.size=Y.size}),$._zod.check=(U)=>{let Q=U.value,J=Q.size;if(J===Y.size)return;let I=J>Y.size;U.issues.push({origin:YG(Q),...I?{code:"too_big",maximum:Y.size}:{code:"too_small",minimum:Y.size},inclusive:!0,exact:!0,input:U.value,inst:$,continue:!Y.abort})}}),KE=W0("$ZodCheckMaxLength",($,Y)=>{var z;F4.init($,Y),(z=$._zod.def).when??(z.when=(U)=>{let Q=U.value;return!G7(Q)&&Q.length!==void 0}),$._zod.onattach.push((U)=>{let Q=U._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum{let Q=U.value;if(Q.length<=Y.maximum)return;let I=zG(Q);U.issues.push({origin:I,code:"too_big",maximum:Y.maximum,inclusive:!0,input:Q,inst:$,continue:!Y.abort})}}),GE=W0("$ZodCheckMinLength",($,Y)=>{var z;F4.init($,Y),(z=$._zod.def).when??(z.when=(U)=>{let Q=U.value;return!G7(Q)&&Q.length!==void 0}),$._zod.onattach.push((U)=>{let Q=U._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>Q)U._zod.bag.minimum=Y.minimum}),$._zod.check=(U)=>{let Q=U.value;if(Q.length>=Y.minimum)return;let I=zG(Q);U.issues.push({origin:I,code:"too_small",minimum:Y.minimum,inclusive:!0,input:Q,inst:$,continue:!Y.abort})}}),HE=W0("$ZodCheckLengthEquals",($,Y)=>{var z;F4.init($,Y),(z=$._zod.def).when??(z.when=(U)=>{let Q=U.value;return!G7(Q)&&Q.length!==void 0}),$._zod.onattach.push((U)=>{let Q=U._zod.bag;Q.minimum=Y.length,Q.maximum=Y.length,Q.length=Y.length}),$._zod.check=(U)=>{let Q=U.value,J=Q.length;if(J===Y.length)return;let I=zG(Q),K=J>Y.length;U.issues.push({origin:I,...K?{code:"too_big",maximum:Y.length}:{code:"too_small",minimum:Y.length},inclusive:!0,exact:!0,input:U.value,inst:$,continue:!Y.abort})}}),tU=W0("$ZodCheckStringFormat",($,Y)=>{var z,U;if(F4.init($,Y),$._zod.onattach.push((Q)=>{let J=Q._zod.bag;if(J.format=Y.format,Y.pattern)J.patterns??(J.patterns=new Set),J.patterns.add(Y.pattern)}),Y.pattern)(z=$._zod).check??(z.check=(Q)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(Q.value))return;Q.issues.push({origin:"string",code:"invalid_format",format:Y.format,input:Q.value,...Y.pattern?{pattern:Y.pattern.toString()}:{},inst:$,continue:!Y.abort})});else(U=$._zod).check??(U.check=()=>{})}),WE=W0("$ZodCheckRegex",($,Y)=>{tU.init($,Y),$._zod.check=(z)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(z.value))return;z.issues.push({origin:"string",code:"invalid_format",format:"regex",input:z.value,pattern:Y.pattern.toString(),inst:$,continue:!Y.abort})}}),XE=W0("$ZodCheckLowerCase",($,Y)=>{Y.pattern??(Y.pattern=eT),tU.init($,Y)}),ZE=W0("$ZodCheckUpperCase",($,Y)=>{Y.pattern??(Y.pattern=$E),tU.init($,Y)}),qE=W0("$ZodCheckIncludes",($,Y)=>{F4.init($,Y);let z=A$(Y.includes),U=new RegExp(typeof Y.position==="number"?`^.{${Y.position}}${z}`:z);Y.pattern=U,$._zod.onattach.push((Q)=>{let J=Q._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(U)}),$._zod.check=(Q)=>{if(Q.value.includes(Y.includes,Y.position))return;Q.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:Y.includes,input:Q.value,inst:$,continue:!Y.abort})}}),VE=W0("$ZodCheckStartsWith",($,Y)=>{F4.init($,Y);let z=new RegExp(`^${A$(Y.prefix)}.*`);Y.pattern??(Y.pattern=z),$._zod.onattach.push((U)=>{let Q=U._zod.bag;Q.patterns??(Q.patterns=new Set),Q.patterns.add(z)}),$._zod.check=(U)=>{if(U.value.startsWith(Y.prefix))return;U.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:Y.prefix,input:U.value,inst:$,continue:!Y.abort})}}),LE=W0("$ZodCheckEndsWith",($,Y)=>{F4.init($,Y);let z=new RegExp(`.*${A$(Y.suffix)}$`);Y.pattern??(Y.pattern=z),$._zod.onattach.push((U)=>{let Q=U._zod.bag;Q.patterns??(Q.patterns=new Set),Q.patterns.add(z)}),$._zod.check=(U)=>{if(U.value.endsWith(Y.suffix))return;U.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:Y.suffix,input:U.value,inst:$,continue:!Y.abort})}});FE=W0("$ZodCheckProperty",($,Y)=>{F4.init($,Y),$._zod.check=(z)=>{let U=Y.schema._zod.run({value:z.value[Y.property],issues:[]},{});if(U instanceof Promise)return U.then((Q)=>Ar(Q,z,Y.property));Ar(U,z,Y.property);return}}),OE=W0("$ZodCheckMimeType",($,Y)=>{F4.init($,Y);let z=new Set(Y.mime);$._zod.onattach.push((U)=>{U._zod.bag.mime=Y.mime}),$._zod.check=(U)=>{if(z.has(U.value.type))return;U.issues.push({code:"invalid_value",values:Y.mime,input:U.value.type,inst:$,continue:!Y.abort})}}),wE=W0("$ZodCheckOverwrite",($,Y)=>{F4.init($,Y),$._zod.check=(z)=>{z.value=Y.tx(z.value)}})});class VV{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let z=$.split(` `).filter((J)=>J),U=Math.min(...z.map((J)=>J.length-J.trimStart().length)),Q=z.map((J)=>J.slice(U)).map((J)=>" ".repeat(this.indent*2)+J);for(let J of Q)this.content.push(J)}compile(){let $=Function,Y=this?.args,U=[...(this?.content??[""]).map((Q)=>` ${Q}`)];return new $(...Y,U.join(` `))}}var ME;var NE=m(()=>{ME={major:4,minor:4,patch:3}});function nE($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}function ur($){if(!HV.test($))return!1;let Y=$.replace(/[-_]/g,(U)=>U==="-"?"+":"/"),z=Y.padEnd(Math.ceil(Y.length/4)*4,"=");return nE(z)}function br($,Y=null){try{let z=$.split(".");if(z.length!==3)return!1;let[U]=z;if(!U)return!1;let Q=JSON.parse(atob(U));if("typ"in Q&&Q?.typ!=="JWT")return!1;if(!Q.alg)return!1;if(Y&&(!("alg"in Q)||Q.alg!==Y))return!1;return!0}catch{return!1}}function jr($,Y,z){if($.issues.length)Y.issues.push(...f8(z,$.issues));Y.value[z]=$.value}function wV($,Y,z,U,Q,J){let I=z in U;if($.issues.length){if(Q&&J&&!I)return;Y.issues.push(...f8(z,$.issues))}if(!I&&!Q){if(!$.issues.length)Y.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[z]});return}if($.value===void 0){if(I)Y.value[z]=void 0}else Y.value[z]=$.value}function ir($){let Y=Object.keys($.shape);for(let U of Y)if(!$.shape?.[U]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${U}": expected a Zod schema`);let z=FT($.shape);return{...$,keys:Y,keySet:new Set(Y),numKeys:Y.length,optionalKeys:new Set(z)}}function nr($,Y,z,U,Q,J){let I=[],K=Q.keySet,G=Q.catchall._zod,H=G.def.type,W=G.optin==="optional",X=G.optout==="optional";for(let Z in Y){if(Z==="__proto__")continue;if(K.has(Z))continue;if(H==="never"){I.push(Z);continue}let q=G.run({value:Y[Z],issues:[]},U);if(q instanceof Promise)$.push(q.then((V)=>wV(V,z,Z,Y,W,X)));else wV(q,z,Z,Y,W,X)}if(I.length)z.issues.push({code:"unrecognized_keys",keys:I,input:Y,inst:J});if(!$.length)return z;return Promise.all($).then(()=>{return z})}function Tr($,Y,z,U){for(let J of $)if(J.issues.length===0)return Y.value=J.value,Y;let Q=$.filter((J)=>!X7(J));if(Q.length===1)return Y.value=Q[0].value,Q[0];return Y.issues.push({code:"invalid_union",input:Y.value,inst:z,errors:$.map((J)=>J.issues.map((I)=>B8(I,U,a4())))}),Y}function Er($,Y,z,U){let Q=$.filter((J)=>J.issues.length===0);if(Q.length===1)return Y.value=Q[0].value,Y;if(Q.length===0)Y.issues.push({code:"invalid_union",input:Y.value,inst:z,errors:$.map((J)=>J.issues.map((I)=>B8(I,U,a4())))});else Y.issues.push({code:"invalid_union",input:Y.value,inst:z,errors:[],inclusive:!1});return Y}function DE($,Y){if($===Y)return{valid:!0,data:$};if($ instanceof Date&&Y instanceof Date&&+$===+Y)return{valid:!0,data:$};if(W7($)&&W7(Y)){let z=Object.keys(Y),U=Object.keys($).filter((J)=>z.indexOf(J)!==-1),Q={...$,...Y};for(let J of U){let I=DE($[J],Y[J]);if(!I.valid)return{valid:!1,mergeErrorPath:[J,...I.mergeErrorPath]};Q[J]=I.data}return{valid:!0,data:Q}}if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return{valid:!1,mergeErrorPath:[]};let z=[];for(let U=0;U<$.length;U++){let Q=$[U],J=Y[U],I=DE(Q,J);if(!I.valid)return{valid:!1,mergeErrorPath:[U,...I.mergeErrorPath]};z.push(I.data)}return{valid:!0,data:z}}return{valid:!1,mergeErrorPath:[]}}function Cr($,Y,z){let U=new Map,Q;for(let K of Y.issues)if(K.code==="unrecognized_keys"){Q??(Q=K);for(let G of K.keys){if(!U.has(G))U.set(G,{});U.get(G).l=!0}}else $.issues.push(K);for(let K of z.issues)if(K.code==="unrecognized_keys")for(let G of K.keys){if(!U.has(G))U.set(G,{});U.get(G).r=!0}else $.issues.push(K);let J=[...U].filter(([,K])=>K.l&&K.r).map(([K])=>K);if(J.length&&Q)$.issues.push({...Q,keys:J});if(X7($))return $;let I=DE(Y.value,z.value);if(!I.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(I.mergeErrorPath)}`);return $.value=I.data,$}function Rr($,Y){for(let z=$.length-1;z>=0;z--)if($[z]._zod[Y]!=="optional")return z+1;return 0}function _r($,Y,z){if($.issues.length)Y.issues.push(...f8(z,$.issues));Y.value[z]=$.value}function vr($,Y,z,U,Q){for(let J=0;J=Q){Y.value.length=J;break}Y.issues.push(...f8(J,I.issues))}Y.value[J]=I.value}for(let J=Y.value.length-1;J>=U.length;J--)if(z[J]._zod.optout==="optional"&&Y.value[J]===void 0)Y.value.length=J;else break;return Y}function hr($,Y,z,U,Q,J,I){if($.issues.length)if($G.has(typeof U))z.issues.push(...f8(U,$.issues));else z.issues.push({code:"invalid_key",origin:"map",input:Q,inst:J,issues:$.issues.map((K)=>B8(K,I,a4()))});if(Y.issues.length)if($G.has(typeof U))z.issues.push(...f8(U,Y.issues));else z.issues.push({origin:"map",code:"invalid_element",input:Q,inst:J,key:U,issues:Y.issues.map((K)=>B8(K,I,a4()))});z.value.set($.value,Y.value)}function Sr($,Y){if($.issues.length)Y.issues.push(...$.issues);Y.value.add($.value)}function gr($,Y){if(Y===void 0&&($.issues.length||$.fallback))return{issues:[],value:void 0};return $}function yr($,Y){if($.value===void 0)$.value=Y.defaultValue;return $}function kr($,Y){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:Y});return $}function LV($,Y,z){if($.issues.length)return $.aborted=!0,$;return Y._zod.run({value:$.value,issues:$.issues,fallback:$.fallback},z)}function FV($,Y,z){if($.issues.length)return $.aborted=!0,$;if((z.direction||"forward")==="forward"){let Q=Y.transform($.value,$);if(Q instanceof Promise)return Q.then((J)=>OV($,J,Y.out,z));return OV($,Q,Y.out,z)}else{let Q=Y.reverseTransform($.value,$);if(Q instanceof Promise)return Q.then((J)=>OV($,J,Y.in,z));return OV($,Q,Y.in,z)}}function OV($,Y,z,U){if($.issues.length)return $.aborted=!0,$;return z._zod.run({value:Y,issues:$.issues},U)}function xr($){return $.value=Object.freeze($.value),$}function fr($,Y,z,U){if(!$){let Q={code:"custom",input:z,inst:U,path:[...U._zod.def.path??[]],continue:!U._zod.def.abort};if(U._zod.def.params)Q.params=U._zod.def.params;Y.issues.push(lU(Q))}}var V1,_Y,Z4,AE,BE,PE,jE,TE,EE,CE,RE,_E,vE,hE,SE,gE,yE,kE,xE,fE,uE,bE,iE,cE,pE,dE,mE,lE,MV,oE,HG,NV,rE,sE,aE,tE,eE,$C,YC,zC,UC,QC,cr,JC,WG,IC,KC,GC,DV,HC,WC,XC,ZC,qC,VC,LC,AV,FC,OC,wC,MC,NC,DC,AC,BC,BV,XG,PC,jC,TC,EC,CC,RC,_C;var vC=m(()=>{qV();EY();jT();WV();Y1();NE();Y1();V1=W0("$ZodType",($,Y)=>{var z;$??($={}),$._zod.def=Y,$._zod.bag=$._zod.bag||{},$._zod.version=ME;let U=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))U.unshift($);for(let Q of U)for(let J of Q._zod.onattach)J($);if(U.length===0)(z=$._zod).deferred??(z.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let Q=(I,K,G)=>{let H=X7(I),W;for(let X of K){if(X._zod.def.when){if(MT(I))continue;if(!X._zod.def.when(I))continue}else if(H)continue;let Z=I.issues.length,q=X._zod.check(I);if(q instanceof Promise&&G?.async===!1)throw new n5;if(W||q instanceof Promise)W=(W??Promise.resolve()).then(async()=>{if(await q,I.issues.length===Z)return;if(!H)H=X7(I,Z)});else{if(I.issues.length===Z)continue;if(!H)H=X7(I,Z)}}if(W)return W.then(()=>{return I});return I},J=(I,K,G)=>{if(X7(I))return I.aborted=!0,I;let H=Q(K,U,G);if(H instanceof Promise){if(G.async===!1)throw new n5;return H.then((W)=>$._zod.parse(W,G))}return $._zod.parse(H,G)};$._zod.run=(I,K)=>{if(K.skipChecks)return $._zod.parse(I,K);if(K.direction==="backward"){let H=$._zod.parse({value:I.value,issues:[]},{...K,skipChecks:!0});if(H instanceof Promise)return H.then((W)=>{return J(W,I,K)});return J(H,I,K)}let G=$._zod.parse(I,K);if(G instanceof Promise){if(K.async===!1)throw new n5;return G.then((H)=>Q(H,U,K))}return Q(G,U,K)}}E1($,"~standard",()=>({validate:(Q)=>{try{let J=BT($,Q);return J.success?{value:J.data}:{issues:J.error?.issues}}catch(J){return PT($,Q).then((I)=>I.success?{value:I.data}:{issues:I.error?.issues})}},vendor:"zod",version:1}))}),_Y=W0("$ZodString",($,Y)=>{V1.init($,Y),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??lT($._zod.bag),$._zod.parse=(z,U)=>{if(Y.coerce)try{z.value=String(z.value)}catch(Q){}if(typeof z.value==="string")return z;return z.issues.push({expected:"string",code:"invalid_type",input:z.value,inst:$}),z}}),Z4=W0("$ZodStringFormat",($,Y)=>{tU.init($,Y),_Y.init($,Y)}),AE=W0("$ZodGUID",($,Y)=>{Y.pattern??(Y.pattern=ST),Z4.init($,Y)}),BE=W0("$ZodUUID",($,Y)=>{if(Y.version){let U={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[Y.version];if(U===void 0)throw Error(`Invalid UUID version: "${Y.version}"`);Y.pattern??(Y.pattern=RY(U))}else Y.pattern??(Y.pattern=RY());Z4.init($,Y)}),PE=W0("$ZodEmail",($,Y)=>{Y.pattern??(Y.pattern=gT),Z4.init($,Y)}),jE=W0("$ZodURL",($,Y)=>{Z4.init($,Y),$._zod.check=(z)=>{try{let U=z.value.trim();if(!Y.normalize&&Y.protocol?.source===nT.source){if(!/^https?:\/\//i.test(U)){z.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:z.value,inst:$,continue:!Y.abort});return}}let Q=new URL(U);if(Y.hostname){if(Y.hostname.lastIndex=0,!Y.hostname.test(Q.hostname))z.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Y.hostname.source,input:z.value,inst:$,continue:!Y.abort})}if(Y.protocol){if(Y.protocol.lastIndex=0,!Y.protocol.test(Q.protocol.endsWith(":")?Q.protocol.slice(0,-1):Q.protocol))z.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:Y.protocol.source,input:z.value,inst:$,continue:!Y.abort})}if(Y.normalize)z.value=Q.href;else z.value=U;return}catch(U){z.issues.push({code:"invalid_format",format:"url",input:z.value,inst:$,continue:!Y.abort})}}}),TE=W0("$ZodEmoji",($,Y)=>{Y.pattern??(Y.pattern=yT()),Z4.init($,Y)}),EE=W0("$ZodNanoID",($,Y)=>{Y.pattern??(Y.pattern=vT),Z4.init($,Y)}),CE=W0("$ZodCUID",($,Y)=>{Y.pattern??(Y.pattern=TT),Z4.init($,Y)}),RE=W0("$ZodCUID2",($,Y)=>{Y.pattern??(Y.pattern=ET),Z4.init($,Y)}),_E=W0("$ZodULID",($,Y)=>{Y.pattern??(Y.pattern=CT),Z4.init($,Y)}),vE=W0("$ZodXID",($,Y)=>{Y.pattern??(Y.pattern=RT),Z4.init($,Y)}),hE=W0("$ZodKSUID",($,Y)=>{Y.pattern??(Y.pattern=_T),Z4.init($,Y)}),SE=W0("$ZodISODateTime",($,Y)=>{Y.pattern??(Y.pattern=mT(Y)),Z4.init($,Y)}),gE=W0("$ZodISODate",($,Y)=>{Y.pattern??(Y.pattern=pT),Z4.init($,Y)}),yE=W0("$ZodISOTime",($,Y)=>{Y.pattern??(Y.pattern=dT(Y)),Z4.init($,Y)}),kE=W0("$ZodISODuration",($,Y)=>{Y.pattern??(Y.pattern=hT),Z4.init($,Y)}),xE=W0("$ZodIPv4",($,Y)=>{Y.pattern??(Y.pattern=kT),Z4.init($,Y),$._zod.bag.format="ipv4"}),fE=W0("$ZodIPv6",($,Y)=>{Y.pattern??(Y.pattern=xT),Z4.init($,Y),$._zod.bag.format="ipv6",$._zod.check=(z)=>{try{new URL(`http://[${z.value}]`)}catch{z.issues.push({code:"invalid_format",format:"ipv6",input:z.value,inst:$,continue:!Y.abort})}}}),uE=W0("$ZodMAC",($,Y)=>{Y.pattern??(Y.pattern=fT(Y.delimiter)),Z4.init($,Y),$._zod.bag.format="mac"}),bE=W0("$ZodCIDRv4",($,Y)=>{Y.pattern??(Y.pattern=uT),Z4.init($,Y)}),iE=W0("$ZodCIDRv6",($,Y)=>{Y.pattern??(Y.pattern=bT),Z4.init($,Y),$._zod.check=(z)=>{let U=z.value.split("/");try{if(U.length!==2)throw Error();let[Q,J]=U;if(!J)throw Error();let I=Number(J);if(`${I}`!==J)throw Error();if(I<0||I>128)throw Error();new URL(`http://[${Q}]`)}catch{z.issues.push({code:"invalid_format",format:"cidrv6",input:z.value,inst:$,continue:!Y.abort})}}});cE=W0("$ZodBase64",($,Y)=>{Y.pattern??(Y.pattern=iT),Z4.init($,Y),$._zod.bag.contentEncoding="base64",$._zod.check=(z)=>{if(nE(z.value))return;z.issues.push({code:"invalid_format",format:"base64",input:z.value,inst:$,continue:!Y.abort})}});pE=W0("$ZodBase64URL",($,Y)=>{Y.pattern??(Y.pattern=HV),Z4.init($,Y),$._zod.bag.contentEncoding="base64url",$._zod.check=(z)=>{if(ur(z.value))return;z.issues.push({code:"invalid_format",format:"base64url",input:z.value,inst:$,continue:!Y.abort})}}),dE=W0("$ZodE164",($,Y)=>{Y.pattern??(Y.pattern=cT),Z4.init($,Y)});mE=W0("$ZodJWT",($,Y)=>{Z4.init($,Y),$._zod.check=(z)=>{if(br(z.value,Y.alg))return;z.issues.push({code:"invalid_format",format:"jwt",input:z.value,inst:$,continue:!Y.abort})}}),lE=W0("$ZodCustomStringFormat",($,Y)=>{Z4.init($,Y),$._zod.check=(z)=>{if(Y.fn(z.value))return;z.issues.push({code:"invalid_format",format:Y.format,input:z.value,inst:$,continue:!Y.abort})}}),MV=W0("$ZodNumber",($,Y)=>{V1.init($,Y),$._zod.pattern=$._zod.bag.pattern??IG,$._zod.parse=(z,U)=>{if(Y.coerce)try{z.value=Number(z.value)}catch(I){}let Q=z.value;if(typeof Q==="number"&&!Number.isNaN(Q)&&Number.isFinite(Q))return z;let J=typeof Q==="number"?Number.isNaN(Q)?"NaN":!Number.isFinite(Q)?"Infinity":void 0:void 0;return z.issues.push({expected:"number",code:"invalid_type",input:Q,inst:$,...J?{received:J}:{}}),z}}),oE=W0("$ZodNumberFormat",($,Y)=>{zE.init($,Y),MV.init($,Y)}),HG=W0("$ZodBoolean",($,Y)=>{V1.init($,Y),$._zod.pattern=sT,$._zod.parse=(z,U)=>{if(Y.coerce)try{z.value=Boolean(z.value)}catch(J){}let Q=z.value;if(typeof Q==="boolean")return z;return z.issues.push({expected:"boolean",code:"invalid_type",input:Q,inst:$}),z}}),NV=W0("$ZodBigInt",($,Y)=>{V1.init($,Y),$._zod.pattern=oT,$._zod.parse=(z,U)=>{if(Y.coerce)try{z.value=BigInt(z.value)}catch(Q){}if(typeof z.value==="bigint")return z;return z.issues.push({expected:"bigint",code:"invalid_type",input:z.value,inst:$}),z}}),rE=W0("$ZodBigIntFormat",($,Y)=>{UE.init($,Y),NV.init($,Y)}),sE=W0("$ZodSymbol",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(typeof Q==="symbol")return z;return z.issues.push({expected:"symbol",code:"invalid_type",input:Q,inst:$}),z}}),aE=W0("$ZodUndefined",($,Y)=>{V1.init($,Y),$._zod.pattern=tT,$._zod.values=new Set([void 0]),$._zod.parse=(z,U)=>{let Q=z.value;if(typeof Q>"u")return z;return z.issues.push({expected:"undefined",code:"invalid_type",input:Q,inst:$}),z}}),tE=W0("$ZodNull",($,Y)=>{V1.init($,Y),$._zod.pattern=aT,$._zod.values=new Set([null]),$._zod.parse=(z,U)=>{let Q=z.value;if(Q===null)return z;return z.issues.push({expected:"null",code:"invalid_type",input:Q,inst:$}),z}}),eE=W0("$ZodAny",($,Y)=>{V1.init($,Y),$._zod.parse=(z)=>z}),$C=W0("$ZodUnknown",($,Y)=>{V1.init($,Y),$._zod.parse=(z)=>z}),YC=W0("$ZodNever",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{return z.issues.push({expected:"never",code:"invalid_type",input:z.value,inst:$}),z}}),zC=W0("$ZodVoid",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(typeof Q>"u")return z;return z.issues.push({expected:"void",code:"invalid_type",input:Q,inst:$}),z}}),UC=W0("$ZodDate",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{if(Y.coerce)try{z.value=new Date(z.value)}catch(K){}let Q=z.value,J=Q instanceof Date;if(J&&!Number.isNaN(Q.getTime()))return z;return z.issues.push({expected:"date",code:"invalid_type",input:Q,...J?{received:"Invalid Date"}:{},inst:$}),z}});QC=W0("$ZodArray",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(!Array.isArray(Q))return z.issues.push({expected:"array",code:"invalid_type",input:Q,inst:$}),z;z.value=Array(Q.length);let J=[];for(let I=0;Ijr(H,z,I)));else jr(G,z,I)}if(J.length)return Promise.all(J).then(()=>z);return z}});cr=W0("$ZodObject",($,Y)=>{if(V1.init($,Y),!Object.getOwnPropertyDescriptor(Y,"shape")?.get){let K=Y.shape;Object.defineProperty(Y,"shape",{get:()=>{let G={...K};return Object.defineProperty(Y,"shape",{value:G}),G}})}let U=mU(()=>ir(Y));E1($._zod,"propValues",()=>{let K=Y.shape,G={};for(let H in K){let W=K[H]._zod;if(W.values){G[H]??(G[H]=new Set);for(let X of W.values)G[H].add(X)}}return G});let Q=CY,J=Y.catchall,I;$._zod.parse=(K,G)=>{I??(I=U.value);let H=K.value;if(!Q(H))return K.issues.push({expected:"object",code:"invalid_type",input:H,inst:$}),K;K.value={};let W=[],X=I.shape;for(let Z of I.keys){let q=X[Z],V=q._zod.optin==="optional",F=q._zod.optout==="optional",w=q._zod.run({value:H[Z],issues:[]},G);if(w instanceof Promise)W.push(w.then((O)=>wV(O,K,Z,H,V,F)));else wV(w,K,Z,H,V,F)}if(!J)return W.length?Promise.all(W).then(()=>K):K;return nr(W,H,K,G,U.value,$)}}),JC=W0("$ZodObjectJIT",($,Y)=>{cr.init($,Y);let z=$._zod.parse,U=mU(()=>ir(Y)),Q=(Z)=>{let q=new VV(["shape","payload","ctx"]),V=U.value,F=(M)=>{let D=aq(M);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};q.write("const input = payload.value;");let w=Object.create(null),O=0;for(let M of V.keys)w[M]=`key_${O++}`;q.write("const newResult = {};");for(let M of V.keys){let D=w[M],P=aq(M),j=Z[M],A=j?._zod?.optin==="optional",T=j?._zod?.optout==="optional";if(q.write(`const ${D} = ${F(M)};`),A&&T)q.write(` @@ -60,22 +60,22 @@ import{createRequire as ly0}from"node:module";var fy0=Object.create;var{getProto newResult[${P}] = ${D}.value; } - `)}q.write("payload.value = newResult;"),q.write("return payload;");let N=q.compile();return(M,D)=>N(Z,M,D)},J,I=CY,K=!jY.jitless,H=K&&qT.value,W=Y.catchall,X;$._zod.parse=(Z,q)=>{X??(X=U.value);let V=Z.value;if(!I(V))return Z.issues.push({expected:"object",code:"invalid_type",input:V,inst:$}),Z;if(K&&H&&q?.async===!1&&q.jitless!==!0){if(!J)J=Q(Y.shape);if(Z=J(Z,q),!W)return Z;return nr([],V,Z,q,X,$)}return z(Z,q)}});WG=W0("$ZodUnion",($,Y)=>{V1.init($,Y),E1($._zod,"optin",()=>Y.options.some((U)=>U._zod.optin==="optional")?"optional":void 0),E1($._zod,"optout",()=>Y.options.some((U)=>U._zod.optout==="optional")?"optional":void 0),E1($._zod,"values",()=>{if(Y.options.every((U)=>U._zod.values))return new Set(Y.options.flatMap((U)=>Array.from(U._zod.values)));return}),E1($._zod,"pattern",()=>{if(Y.options.every((U)=>U._zod.pattern)){let U=Y.options.map((Q)=>Q._zod.pattern);return new RegExp(`^(${U.map((Q)=>eK(Q.source)).join("|")})$`)}return});let z=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(U,Q)=>{if(z)return z(U,Q);let J=!1,I=[];for(let K of Y.options){let G=K._zod.run({value:U.value,issues:[]},Q);if(G instanceof Promise)I.push(G),J=!0;else{if(G.issues.length===0)return G;I.push(G)}}if(!J)return Tr(I,U,$,Q);return Promise.all(I).then((K)=>{return Tr(K,U,$,Q)})}});IC=W0("$ZodXor",($,Y)=>{WG.init($,Y),Y.inclusive=!1;let z=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(U,Q)=>{if(z)return z(U,Q);let J=!1,I=[];for(let K of Y.options){let G=K._zod.run({value:U.value,issues:[]},Q);if(G instanceof Promise)I.push(G),J=!0;else I.push(G)}if(!J)return Er(I,U,$,Q);return Promise.all(I).then((K)=>{return Er(K,U,$,Q)})}}),KC=W0("$ZodDiscriminatedUnion",($,Y)=>{Y.inclusive=!1,WG.init($,Y);let z=$._zod.parse;E1($._zod,"propValues",()=>{let Q={};for(let J of Y.options){let I=J._zod.propValues;if(!I||Object.keys(I).length===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(J)}"`);for(let[K,G]of Object.entries(I)){if(!Q[K])Q[K]=new Set;for(let H of G)Q[K].add(H)}}return Q});let U=mU(()=>{let Q=Y.options,J=new Map;for(let I of Q){let K=I._zod.propValues?.[Y.discriminator];if(!K||K.size===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(I)}"`);for(let G of K){if(J.has(G))throw Error(`Duplicate discriminator value "${String(G)}"`);J.set(G,I)}}return J});$._zod.parse=(Q,J)=>{let I=Q.value;if(!CY(I))return Q.issues.push({code:"invalid_type",expected:"object",input:I,inst:$}),Q;let K=U.value.get(I?.[Y.discriminator]);if(K)return K._zod.run(Q,J);if(Y.unionFallback||J.direction==="backward")return z(Q,J);return Q.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:Y.discriminator,options:Array.from(U.value.keys()),input:I,path:[Y.discriminator],inst:$}),Q}}),GC=W0("$ZodIntersection",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value,J=Y.left._zod.run({value:Q,issues:[]},U),I=Y.right._zod.run({value:Q,issues:[]},U);if(J instanceof Promise||I instanceof Promise)return Promise.all([J,I]).then(([G,H])=>{return Cr(z,G,H)});return Cr(z,J,I)}});DV=W0("$ZodTuple",($,Y)=>{V1.init($,Y);let z=Y.items;$._zod.parse=(U,Q)=>{let J=U.value;if(!Array.isArray(J))return U.issues.push({input:J,inst:$,expected:"tuple",code:"invalid_type"}),U;U.value=[];let I=[],K=Rr(z,"optin"),G=Rr(z,"optout");if(!Y.rest){if(J.lengthz.length)U.issues.push({code:"too_big",maximum:z.length,inclusive:!0,input:J,inst:$,origin:"array"})}let H=Array(z.length);for(let W=0;W{H[W]=Z}));else H[W]=X}if(Y.rest){let W=z.length-1,X=J.slice(z.length);for(let Z of X){W++;let q=Y.rest._zod.run({value:Z,issues:[]},Q);if(q instanceof Promise)I.push(q.then((V)=>_r(V,U,W)));else _r(q,U,W)}}if(I.length)return Promise.all(I).then(()=>vr(H,U,z,J,G));return vr(H,U,z,J,G)}});HC=W0("$ZodRecord",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(!W7(Q))return z.issues.push({expected:"record",code:"invalid_type",input:Q,inst:$}),z;let J=[],I=Y.keyType._zod.values;if(I){z.value={};let K=new Set;for(let H of I)if(typeof H==="string"||typeof H==="number"||typeof H==="symbol"){K.add(typeof H==="number"?H.toString():H);let W=Y.keyType._zod.run({value:H,issues:[]},U);if(W instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(W.issues.length){z.issues.push({code:"invalid_key",origin:"record",issues:W.issues.map((q)=>B8(q,U,a4())),input:H,path:[H],inst:$});continue}let X=W.value,Z=Y.valueType._zod.run({value:Q[H],issues:[]},U);if(Z instanceof Promise)J.push(Z.then((q)=>{if(q.issues.length)z.issues.push(...f8(H,q.issues));z.value[X]=q.value}));else{if(Z.issues.length)z.issues.push(...f8(H,Z.issues));z.value[X]=Z.value}}let G;for(let H in Q)if(!K.has(H))G=G??[],G.push(H);if(G&&G.length>0)z.issues.push({code:"unrecognized_keys",input:Q,inst:$,keys:G})}else{z.value={};for(let K of Reflect.ownKeys(Q)){if(K==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(Q,K))continue;let G=Y.keyType._zod.run({value:K,issues:[]},U);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof K==="string"&&IG.test(K)&&G.issues.length){let X=Y.keyType._zod.run({value:Number(K),issues:[]},U);if(X instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(X.issues.length===0)G=X}if(G.issues.length){if(Y.mode==="loose")z.value[K]=Q[K];else z.issues.push({code:"invalid_key",origin:"record",issues:G.issues.map((X)=>B8(X,U,a4())),input:K,path:[K],inst:$});continue}let W=Y.valueType._zod.run({value:Q[K],issues:[]},U);if(W instanceof Promise)J.push(W.then((X)=>{if(X.issues.length)z.issues.push(...f8(K,X.issues));z.value[G.value]=X.value}));else{if(W.issues.length)z.issues.push(...f8(K,W.issues));z.value[G.value]=W.value}}}if(J.length)return Promise.all(J).then(()=>z);return z}}),WC=W0("$ZodMap",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(!(Q instanceof Map))return z.issues.push({expected:"map",code:"invalid_type",input:Q,inst:$}),z;let J=[];z.value=new Map;for(let[I,K]of Q){let G=Y.keyType._zod.run({value:I,issues:[]},U),H=Y.valueType._zod.run({value:K,issues:[]},U);if(G instanceof Promise||H instanceof Promise)J.push(Promise.all([G,H]).then(([W,X])=>{hr(W,X,z,I,Q,$,U)}));else hr(G,H,z,I,Q,$,U)}if(J.length)return Promise.all(J).then(()=>z);return z}});XC=W0("$ZodSet",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(!(Q instanceof Set))return z.issues.push({input:Q,inst:$,expected:"set",code:"invalid_type"}),z;let J=[];z.value=new Set;for(let I of Q){let K=Y.valueType._zod.run({value:I,issues:[]},U);if(K instanceof Promise)J.push(K.then((G)=>Sr(G,z)));else Sr(K,z)}if(J.length)return Promise.all(J).then(()=>z);return z}});ZC=W0("$ZodEnum",($,Y)=>{V1.init($,Y);let z=tK(Y.entries),U=new Set(z);$._zod.values=U,$._zod.pattern=new RegExp(`^(${z.filter((Q)=>$G.has(typeof Q)).map((Q)=>typeof Q==="string"?A$(Q):Q.toString()).join("|")})$`),$._zod.parse=(Q,J)=>{let I=Q.value;if(U.has(I))return Q;return Q.issues.push({code:"invalid_value",values:z,input:I,inst:$}),Q}}),qC=W0("$ZodLiteral",($,Y)=>{if(V1.init($,Y),Y.values.length===0)throw Error("Cannot create literal schema with no valid values");let z=new Set(Y.values);$._zod.values=z,$._zod.pattern=new RegExp(`^(${Y.values.map((U)=>typeof U==="string"?A$(U):U?A$(U.toString()):String(U)).join("|")})$`),$._zod.parse=(U,Q)=>{let J=U.value;if(z.has(J))return U;return U.issues.push({code:"invalid_value",values:Y.values,input:J,inst:$}),U}}),VC=W0("$ZodFile",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(Q instanceof File)return z;return z.issues.push({expected:"file",code:"invalid_type",input:Q,inst:$}),z}}),LC=W0("$ZodTransform",($,Y)=>{V1.init($,Y),$._zod.optin="optional",$._zod.parse=(z,U)=>{if(U.direction==="backward")throw new TY($.constructor.name);let Q=Y.transform(z.value,z);if(U.async)return(Q instanceof Promise?Q:Promise.resolve(Q)).then((I)=>{return z.value=I,z.fallback=!0,z});if(Q instanceof Promise)throw new n5;return z.value=Q,z.fallback=!0,z}});AV=W0("$ZodOptional",($,Y)=>{V1.init($,Y),$._zod.optin="optional",$._zod.optout="optional",E1($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,void 0]):void 0}),E1($._zod,"pattern",()=>{let z=Y.innerType._zod.pattern;return z?new RegExp(`^(${eK(z.source)})?$`):void 0}),$._zod.parse=(z,U)=>{if(Y.innerType._zod.optin==="optional"){let Q=z.value,J=Y.innerType._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>gr(I,Q));return gr(J,Q)}if(z.value===void 0)return z;return Y.innerType._zod.run(z,U)}}),FC=W0("$ZodExactOptional",($,Y)=>{AV.init($,Y),E1($._zod,"values",()=>Y.innerType._zod.values),E1($._zod,"pattern",()=>Y.innerType._zod.pattern),$._zod.parse=(z,U)=>{return Y.innerType._zod.run(z,U)}}),OC=W0("$ZodNullable",($,Y)=>{V1.init($,Y),E1($._zod,"optin",()=>Y.innerType._zod.optin),E1($._zod,"optout",()=>Y.innerType._zod.optout),E1($._zod,"pattern",()=>{let z=Y.innerType._zod.pattern;return z?new RegExp(`^(${eK(z.source)}|null)$`):void 0}),E1($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,null]):void 0}),$._zod.parse=(z,U)=>{if(z.value===null)return z;return Y.innerType._zod.run(z,U)}}),wC=W0("$ZodDefault",($,Y)=>{V1.init($,Y),$._zod.optin="optional",E1($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);if(z.value===void 0)return z.value=Y.defaultValue,z;let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>yr(J,Y));return yr(Q,Y)}});MC=W0("$ZodPrefault",($,Y)=>{V1.init($,Y),$._zod.optin="optional",E1($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);if(z.value===void 0)z.value=Y.defaultValue;return Y.innerType._zod.run(z,U)}}),NC=W0("$ZodNonOptional",($,Y)=>{V1.init($,Y),E1($._zod,"values",()=>{let z=Y.innerType._zod.values;return z?new Set([...z].filter((U)=>U!==void 0)):void 0}),$._zod.parse=(z,U)=>{let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>kr(J,$));return kr(Q,$)}});DC=W0("$ZodSuccess",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{if(U.direction==="backward")throw new TY("ZodSuccess");let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>{return z.value=J.issues.length===0,z});return z.value=Q.issues.length===0,z}}),AC=W0("$ZodCatch",($,Y)=>{V1.init($,Y),$._zod.optin="optional",E1($._zod,"optout",()=>Y.innerType._zod.optout),E1($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>{if(z.value=J.value,J.issues.length)z.value=Y.catchValue({...z,error:{issues:J.issues.map((I)=>B8(I,U,a4()))},input:z.value}),z.issues=[],z.fallback=!0;return z});if(z.value=Q.value,Q.issues.length)z.value=Y.catchValue({...z,error:{issues:Q.issues.map((J)=>B8(J,U,a4()))},input:z.value}),z.issues=[],z.fallback=!0;return z}}),BC=W0("$ZodNaN",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{if(typeof z.value!=="number"||!Number.isNaN(z.value))return z.issues.push({input:z.value,inst:$,expected:"nan",code:"invalid_type"}),z;return z}}),BV=W0("$ZodPipe",($,Y)=>{V1.init($,Y),E1($._zod,"values",()=>Y.in._zod.values),E1($._zod,"optin",()=>Y.in._zod.optin),E1($._zod,"optout",()=>Y.out._zod.optout),E1($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(z,U)=>{if(U.direction==="backward"){let J=Y.out._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>LV(I,Y.in,U));return LV(J,Y.in,U)}let Q=Y.in._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>LV(J,Y.out,U));return LV(Q,Y.out,U)}});XG=W0("$ZodCodec",($,Y)=>{V1.init($,Y),E1($._zod,"values",()=>Y.in._zod.values),E1($._zod,"optin",()=>Y.in._zod.optin),E1($._zod,"optout",()=>Y.out._zod.optout),E1($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(z,U)=>{if((U.direction||"forward")==="forward"){let J=Y.in._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>FV(I,Y,U));return FV(J,Y,U)}else{let J=Y.out._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>FV(I,Y,U));return FV(J,Y,U)}}});PC=W0("$ZodPreprocess",($,Y)=>{BV.init($,Y)}),jC=W0("$ZodReadonly",($,Y)=>{V1.init($,Y),E1($._zod,"propValues",()=>Y.innerType._zod.propValues),E1($._zod,"values",()=>Y.innerType._zod.values),E1($._zod,"optin",()=>Y.innerType?._zod?.optin),E1($._zod,"optout",()=>Y.innerType?._zod?.optout),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then(xr);return xr(Q)}});TC=W0("$ZodTemplateLiteral",($,Y)=>{V1.init($,Y);let z=[];for(let U of Y.parts)if(typeof U==="object"&&U!==null){if(!U._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...U._zod.traits].shift()}`);let Q=U._zod.pattern instanceof RegExp?U._zod.pattern.source:U._zod.pattern;if(!Q)throw Error(`Invalid template literal part: ${U._zod.traits}`);let J=Q.startsWith("^")?1:0,I=Q.endsWith("$")?Q.length-1:Q.length;z.push(Q.slice(J,I))}else if(U===null||LT.has(typeof U))z.push(A$(`${U}`));else throw Error(`Invalid template literal part: ${U}`);$._zod.pattern=new RegExp(`^${z.join("")}$`),$._zod.parse=(U,Q)=>{if(typeof U.value!=="string")return U.issues.push({input:U.value,inst:$,expected:"string",code:"invalid_type"}),U;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(U.value))return U.issues.push({input:U.value,inst:$,code:"invalid_format",format:Y.format??"template_literal",pattern:$._zod.pattern.source}),U;return U}}),EC=W0("$ZodFunction",($,Y)=>{return V1.init($,Y),$._def=Y,$._zod.def=Y,$.implement=(z)=>{if(typeof z!=="function")throw Error("implement() must be called with a function");return function(...U){let Q=$._def.input?eq($._def.input,U):U,J=Reflect.apply(z,this,Q);if($._def.output)return eq($._def.output,J);return J}},$.implementAsync=(z)=>{if(typeof z!=="function")throw Error("implementAsync() must be called with a function");return async function(...U){let Q=$._def.input?await $V($._def.input,U):U,J=await Reflect.apply(z,this,Q);if($._def.output)return await $V($._def.output,J);return J}},$._zod.parse=(z,U)=>{if(typeof z.value!=="function")return z.issues.push({code:"invalid_type",expected:"function",input:z.value,inst:$}),z;if($._def.output&&$._def.output._zod.def.type==="promise")z.value=$.implementAsync(z.value);else z.value=$.implement(z.value);return z},$.input=(...z)=>{let U=$.constructor;if(Array.isArray(z[0]))return new U({type:"function",input:new DV({type:"tuple",items:z[0],rest:z[1]}),output:$._def.output});return new U({type:"function",input:z[0],output:$._def.output})},$.output=(z)=>{return new $.constructor({type:"function",input:$._def.input,output:z})},$}),CC=W0("$ZodPromise",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{return Promise.resolve(z.value).then((Q)=>Y.innerType._zod.run({value:Q,issues:[]},U))}}),RC=W0("$ZodLazy",($,Y)=>{V1.init($,Y),E1($._zod,"innerType",()=>{let z=Y;if(!z._cachedInner)z._cachedInner=Y.getter();return z._cachedInner}),E1($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),E1($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),E1($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),E1($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(z,U)=>{return $._zod.innerType._zod.run(z,U)}}),_C=W0("$ZodCustom",($,Y)=>{F4.init($,Y),V1.init($,Y),$._zod.parse=(z,U)=>{return z},$._zod.check=(z)=>{let U=z.value,Q=Y.fn(U);if(Q instanceof Promise)return Q.then((J)=>fr(J,z,U,$));fr(Q,z,U,$);return}})});function hC(){return{localeError:Xx0()}}var Xx0=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function Y(Q){return $[Q]??null}let z={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${Q.expected}، ولكن تم إدخال ${K}`;return`مدخلات غير مقبولة: يفترض إدخال ${J}، ولكن تم إدخال ${K}`}case"invalid_value":if(Q.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${_0(Q.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return` أكبر من اللازم: يفترض أن تكون ${Q.origin??"القيمة"} ${J} ${Q.maximum.toString()} ${I.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${Q.origin??"القيمة"} ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`أصغر من اللازم: يفترض لـ ${Q.origin} أن يكون ${J} ${Q.minimum.toString()} ${I.unit}`;return`أصغر من اللازم: يفترض لـ ${Q.origin} أن يكون ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${Q.prefix}"`;if(J.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${J.suffix}"`;if(J.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${J.includes}"`;if(J.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${J.pattern}`;return`${z[J.format]??Q.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${Q.divisor}`;case"unrecognized_keys":return`معرف${Q.keys.length>1?"ات":""} غريب${Q.keys.length>1?"ة":""}: ${M0(Q.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${Q.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${Q.origin}`;default:return"مدخل غير مقبول"}}};var pr=m(()=>{Y1()});function SC(){return{localeError:Zx0()}}var Zx0=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Yanlış dəyər: gözlənilən instanceof ${Q.expected}, daxil olan ${K}`;return`Yanlış dəyər: gözlənilən ${J}, daxil olan ${K}`}case"invalid_value":if(Q.values.length===1)return`Yanlış dəyər: gözlənilən ${_0(Q.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Çox böyük: gözlənilən ${Q.origin??"dəyər"} ${J}${Q.maximum.toString()} ${I.unit??"element"}`;return`Çox böyük: gözlənilən ${Q.origin??"dəyər"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Çox kiçik: gözlənilən ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit}`;return`Çox kiçik: gözlənilən ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Yanlış mətn: "${J.prefix}" ilə başlamalıdır`;if(J.format==="ends_with")return`Yanlış mətn: "${J.suffix}" ilə bitməlidir`;if(J.format==="includes")return`Yanlış mətn: "${J.includes}" daxil olmalıdır`;if(J.format==="regex")return`Yanlış mətn: ${J.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${z[J.format]??Q.format}`}case"not_multiple_of":return`Yanlış ədəd: ${Q.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${Q.keys.length>1?"lar":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${Q.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};var dr=m(()=>{Y1()});function mr($,Y,z,U){let Q=Math.abs($),J=Q%10,I=Q%100;if(I>=11&&I<=19)return U;if(J===1)return Y;if(J>=2&&J<=4)return z;return U}function gC(){return{localeError:qx0()}}var qx0=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function Y(Q){return $[Q]??null}let z={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},U={nan:"NaN",number:"лік",array:"масіў"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Няправільны ўвод: чакаўся instanceof ${Q.expected}, атрымана ${K}`;return`Няправільны ўвод: чакаўся ${J}, атрымана ${K}`}case"invalid_value":if(Q.values.length===1)return`Няправільны ўвод: чакалася ${_0(Q.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I){let K=Number(Q.maximum),G=mr(K,I.unit.one,I.unit.few,I.unit.many);return`Занадта вялікі: чакалася, што ${Q.origin??"значэнне"} павінна ${I.verb} ${J}${Q.maximum.toString()} ${G}`}return`Занадта вялікі: чакалася, што ${Q.origin??"значэнне"} павінна быць ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I){let K=Number(Q.minimum),G=mr(K,I.unit.one,I.unit.few,I.unit.many);return`Занадта малы: чакалася, што ${Q.origin} павінна ${I.verb} ${J}${Q.minimum.toString()} ${G}`}return`Занадта малы: чакалася, што ${Q.origin} павінна быць ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${J.prefix}"`;if(J.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${J.suffix}"`;if(J.format==="includes")return`Няправільны радок: павінен змяшчаць "${J.includes}"`;if(J.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${J.pattern}`;return`Няправільны ${z[J.format]??Q.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${Q.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${Q.keys.length>1?"ключы":"ключ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${Q.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${Q.origin}`;default:return"Няправільны ўвод"}}};var lr=m(()=>{Y1()});function yC(){return{localeError:Vx0()}}var Vx0=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function Y(Q){return $[Q]??null}let z={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},U={nan:"NaN",number:"число",array:"масив"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Невалиден вход: очакван instanceof ${Q.expected}, получен ${K}`;return`Невалиден вход: очакван ${J}, получен ${K}`}case"invalid_value":if(Q.values.length===1)return`Невалиден вход: очакван ${_0(Q.values[0])}`;return`Невалидна опция: очаквано едно от ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Твърде голямо: очаква се ${Q.origin??"стойност"} да съдържа ${J}${Q.maximum.toString()} ${I.unit??"елемента"}`;return`Твърде голямо: очаква се ${Q.origin??"стойност"} да бъде ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Твърде малко: очаква се ${Q.origin} да съдържа ${J}${Q.minimum.toString()} ${I.unit}`;return`Твърде малко: очаква се ${Q.origin} да бъде ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Невалиден низ: трябва да започва с "${J.prefix}"`;if(J.format==="ends_with")return`Невалиден низ: трябва да завършва с "${J.suffix}"`;if(J.format==="includes")return`Невалиден низ: трябва да включва "${J.includes}"`;if(J.format==="regex")return`Невалиден низ: трябва да съвпада с ${J.pattern}`;let I="Невалиден";if(J.format==="emoji")I="Невалидно";if(J.format==="datetime")I="Невалидно";if(J.format==="date")I="Невалидна";if(J.format==="time")I="Невалидно";if(J.format==="duration")I="Невалидна";return`${I} ${z[J.format]??Q.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${Q.divisor}`;case"unrecognized_keys":return`Неразпознат${Q.keys.length>1?"и":""} ключ${Q.keys.length>1?"ове":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${Q.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${Q.origin}`;default:return"Невалиден вход"}}};var or=m(()=>{Y1()});function kC(){return{localeError:Lx0()}}var Lx0=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function Y(Q){return $[Q]??null}let z={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Tipus invàlid: s'esperava instanceof ${Q.expected}, s'ha rebut ${K}`;return`Tipus invàlid: s'esperava ${J}, s'ha rebut ${K}`}case"invalid_value":if(Q.values.length===1)return`Valor invàlid: s'esperava ${_0(Q.values[0])}`;return`Opció invàlida: s'esperava una de ${M0(Q.values," o ")}`;case"too_big":{let J=Q.inclusive?"com a màxim":"menys de",I=Y(Q.origin);if(I)return`Massa gran: s'esperava que ${Q.origin??"el valor"} contingués ${J} ${Q.maximum.toString()} ${I.unit??"elements"}`;return`Massa gran: s'esperava que ${Q.origin??"el valor"} fos ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?"com a mínim":"més de",I=Y(Q.origin);if(I)return`Massa petit: s'esperava que ${Q.origin} contingués ${J} ${Q.minimum.toString()} ${I.unit}`;return`Massa petit: s'esperava que ${Q.origin} fos ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Format invàlid: ha de començar amb "${J.prefix}"`;if(J.format==="ends_with")return`Format invàlid: ha d'acabar amb "${J.suffix}"`;if(J.format==="includes")return`Format invàlid: ha d'incloure "${J.includes}"`;if(J.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${J.pattern}`;return`Format invàlid per a ${z[J.format]??Q.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${Q.divisor}`;case"unrecognized_keys":return`Clau${Q.keys.length>1?"s":""} no reconeguda${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${Q.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${Q.origin}`;default:return"Entrada invàlida"}}};var rr=m(()=>{Y1()});function xC(){return{localeError:Fx0()}}var Fx0=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function Y(Q){return $[Q]??null}let z={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},U={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Neplatný vstup: očekáváno instanceof ${Q.expected}, obdrženo ${K}`;return`Neplatný vstup: očekáváno ${J}, obdrženo ${K}`}case"invalid_value":if(Q.values.length===1)return`Neplatný vstup: očekáváno ${_0(Q.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Hodnota je příliš velká: ${Q.origin??"hodnota"} musí mít ${J}${Q.maximum.toString()} ${I.unit??"prvků"}`;return`Hodnota je příliš velká: ${Q.origin??"hodnota"} musí být ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Hodnota je příliš malá: ${Q.origin??"hodnota"} musí mít ${J}${Q.minimum.toString()} ${I.unit??"prvků"}`;return`Hodnota je příliš malá: ${Q.origin??"hodnota"} musí být ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Neplatný řetězec: musí začínat na "${J.prefix}"`;if(J.format==="ends_with")return`Neplatný řetězec: musí končit na "${J.suffix}"`;if(J.format==="includes")return`Neplatný řetězec: musí obsahovat "${J.includes}"`;if(J.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${J.pattern}`;return`Neplatný formát ${z[J.format]??Q.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${Q.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${M0(Q.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${Q.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${Q.origin}`;default:return"Neplatný vstup"}}};var sr=m(()=>{Y1()});function fC(){return{localeError:Ox0()}}var Ox0=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},U={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ugyldigt input: forventede instanceof ${Q.expected}, fik ${K}`;return`Ugyldigt input: forventede ${J}, fik ${K}`}case"invalid_value":if(Q.values.length===1)return`Ugyldig værdi: forventede ${_0(Q.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`For stor: forventede ${K??"value"} ${I.verb} ${J} ${Q.maximum.toString()} ${I.unit??"elementer"}`;return`For stor: forventede ${K??"value"} havde ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`For lille: forventede ${K} ${I.verb} ${J} ${Q.minimum.toString()} ${I.unit}`;return`For lille: forventede ${K} havde ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ugyldig streng: skal starte med "${J.prefix}"`;if(J.format==="ends_with")return`Ugyldig streng: skal ende med "${J.suffix}"`;if(J.format==="includes")return`Ugyldig streng: skal indeholde "${J.includes}"`;if(J.format==="regex")return`Ugyldig streng: skal matche mønsteret ${J.pattern}`;return`Ugyldig ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${Q.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${Q.origin}`;default:return"Ugyldigt input"}}};var ar=m(()=>{Y1()});function uC(){return{localeError:wx0()}}var wx0=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function Y(Q){return $[Q]??null}let z={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},U={nan:"NaN",number:"Zahl",array:"Array"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ungültige Eingabe: erwartet instanceof ${Q.expected}, erhalten ${K}`;return`Ungültige Eingabe: erwartet ${J}, erhalten ${K}`}case"invalid_value":if(Q.values.length===1)return`Ungültige Eingabe: erwartet ${_0(Q.values[0])}`;return`Ungültige Option: erwartet eine von ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Zu groß: erwartet, dass ${Q.origin??"Wert"} ${J}${Q.maximum.toString()} ${I.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${Q.origin??"Wert"} ${J}${Q.maximum.toString()} ist`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Zu klein: erwartet, dass ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} hat`;return`Zu klein: erwartet, dass ${Q.origin} ${J}${Q.minimum.toString()} ist`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ungültiger String: muss mit "${J.prefix}" beginnen`;if(J.format==="ends_with")return`Ungültiger String: muss mit "${J.suffix}" enden`;if(J.format==="includes")return`Ungültiger String: muss "${J.includes}" enthalten`;if(J.format==="regex")return`Ungültiger String: muss dem Muster ${J.pattern} entsprechen`;return`Ungültig: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${Q.divisor} sein`;case"unrecognized_keys":return`${Q.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${Q.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${Q.origin}`;default:return"Ungültige Eingabe"}}};var tr=m(()=>{Y1()});function bC(){return{localeError:Mx0()}}var Mx0=()=>{let $={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function Y(Q){return $[Q]??null}let z={regex:"είσοδος",email:"διεύθυνση email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(typeof Q.expected==="string"&&/^[A-Z]/.test(Q.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${Q.expected}, λήφθηκε ${K}`;return`Μη έγκυρη είσοδος: αναμενόταν ${J}, λήφθηκε ${K}`}case"invalid_value":if(Q.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${_0(Q.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Πολύ μεγάλο: αναμενόταν ${Q.origin??"τιμή"} να έχει ${J}${Q.maximum.toString()} ${I.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${Q.origin??"τιμή"} να είναι ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Πολύ μικρό: αναμενόταν ${Q.origin} να έχει ${J}${Q.minimum.toString()} ${I.unit}`;return`Πολύ μικρό: αναμενόταν ${Q.origin} να είναι ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${J.prefix}"`;if(J.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${J.suffix}"`;if(J.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${J.includes}"`;if(J.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${J.pattern}`;return`Μη έγκυρο: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${Q.divisor}`;case"unrecognized_keys":return`Άγνωστ${Q.keys.length>1?"α":"ο"} κλειδ${Q.keys.length>1?"ιά":"ί"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${Q.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${Q.origin}`;default:return"Μη έγκυρη είσοδος"}}};var er=m(()=>{Y1()});function ZG(){return{localeError:Nx0()}}var Nx0=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;return`Invalid input: expected ${J}, received ${K}`}case"invalid_value":if(Q.values.length===1)return`Invalid input: expected ${_0(Q.values[0])}`;return`Invalid option: expected one of ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Too big: expected ${Q.origin??"value"} to have ${J}${Q.maximum.toString()} ${I.unit??"elements"}`;return`Too big: expected ${Q.origin??"value"} to be ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Too small: expected ${Q.origin} to have ${J}${Q.minimum.toString()} ${I.unit}`;return`Too small: expected ${Q.origin} to be ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Invalid string: must start with "${J.prefix}"`;if(J.format==="ends_with")return`Invalid string: must end with "${J.suffix}"`;if(J.format==="includes")return`Invalid string: must include "${J.includes}"`;if(J.format==="regex")return`Invalid string: must match pattern ${J.pattern}`;return`Invalid ${z[J.format]??Q.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${Q.divisor}`;case"unrecognized_keys":return`Unrecognized key${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Invalid key in ${Q.origin}`;case"invalid_union":if(Q.options&&Array.isArray(Q.options)&&Q.options.length>0)return`Invalid discriminator value. Expected ${Q.options.map((I)=>`'${I}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${Q.origin}`;default:return"Invalid input"}}};var iC=m(()=>{Y1()});function nC(){return{localeError:Dx0()}}var Dx0=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function Y(Q){return $[Q]??null}let z={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},U={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Nevalida enigo: atendiĝis instanceof ${Q.expected}, riceviĝis ${K}`;return`Nevalida enigo: atendiĝis ${J}, riceviĝis ${K}`}case"invalid_value":if(Q.values.length===1)return`Nevalida enigo: atendiĝis ${_0(Q.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Tro granda: atendiĝis ke ${Q.origin??"valoro"} havu ${J}${Q.maximum.toString()} ${I.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${Q.origin??"valoro"} havu ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Tro malgranda: atendiĝis ke ${Q.origin} havu ${J}${Q.minimum.toString()} ${I.unit}`;return`Tro malgranda: atendiĝis ke ${Q.origin} estu ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${J.prefix}"`;if(J.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${J.suffix}"`;if(J.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${J.includes}"`;if(J.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${J.pattern}`;return`Nevalida ${z[J.format]??Q.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${Q.divisor}`;case"unrecognized_keys":return`Nekonata${Q.keys.length>1?"j":""} ŝlosilo${Q.keys.length>1?"j":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${Q.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${Q.origin}`;default:return"Nevalida enigo"}}};var $s=m(()=>{Y1()});function cC(){return{localeError:Ax0()}}var Ax0=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function Y(Q){return $[Q]??null}let z={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},U={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Entrada inválida: se esperaba instanceof ${Q.expected}, recibido ${K}`;return`Entrada inválida: se esperaba ${J}, recibido ${K}`}case"invalid_value":if(Q.values.length===1)return`Entrada inválida: se esperaba ${_0(Q.values[0])}`;return`Opción inválida: se esperaba una de ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Demasiado grande: se esperaba que ${K??"valor"} tuviera ${J}${Q.maximum.toString()} ${I.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${K??"valor"} fuera ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Demasiado pequeño: se esperaba que ${K} tuviera ${J}${Q.minimum.toString()} ${I.unit}`;return`Demasiado pequeño: se esperaba que ${K} fuera ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Cadena inválida: debe comenzar con "${J.prefix}"`;if(J.format==="ends_with")return`Cadena inválida: debe terminar en "${J.suffix}"`;if(J.format==="includes")return`Cadena inválida: debe incluir "${J.includes}"`;if(J.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${J.pattern}`;return`Inválido ${z[J.format]??Q.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${Q.divisor}`;case"unrecognized_keys":return`Llave${Q.keys.length>1?"s":""} desconocida${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Llave inválida en ${U[Q.origin]??Q.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${U[Q.origin]??Q.origin}`;default:return"Entrada inválida"}}};var Ys=m(()=>{Y1()});function pC(){return{localeError:Bx0()}}var Bx0=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function Y(Q){return $[Q]??null}let z={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},U={nan:"NaN",number:"عدد",array:"آرایه"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ورودی نامعتبر: می‌بایست instanceof ${Q.expected} می‌بود، ${K} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${J} می‌بود، ${K} دریافت شد`}case"invalid_value":if(Q.values.length===1)return`ورودی نامعتبر: می‌بایست ${_0(Q.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${M0(Q.values,"|")} می‌بود`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`خیلی بزرگ: ${Q.origin??"مقدار"} باید ${J}${Q.maximum.toString()} ${I.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${Q.origin??"مقدار"} باید ${J}${Q.maximum.toString()} باشد`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`خیلی کوچک: ${Q.origin} باید ${J}${Q.minimum.toString()} ${I.unit} باشد`;return`خیلی کوچک: ${Q.origin} باید ${J}${Q.minimum.toString()} باشد`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`رشته نامعتبر: باید با "${J.prefix}" شروع شود`;if(J.format==="ends_with")return`رشته نامعتبر: باید با "${J.suffix}" تمام شود`;if(J.format==="includes")return`رشته نامعتبر: باید شامل "${J.includes}" باشد`;if(J.format==="regex")return`رشته نامعتبر: باید با الگوی ${J.pattern} مطابقت داشته باشد`;return`${z[J.format]??Q.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${Q.divisor} باشد`;case"unrecognized_keys":return`کلید${Q.keys.length>1?"های":""} ناشناس: ${M0(Q.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${Q.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${Q.origin}`;default:return"ورودی نامعتبر"}}};var zs=m(()=>{Y1()});function dC(){return{localeError:Px0()}}var Px0=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function Y(Q){return $[Q]??null}let z={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Virheellinen tyyppi: odotettiin instanceof ${Q.expected}, oli ${K}`;return`Virheellinen tyyppi: odotettiin ${J}, oli ${K}`}case"invalid_value":if(Q.values.length===1)return`Virheellinen syöte: täytyy olla ${_0(Q.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Liian suuri: ${I.subject} täytyy olla ${J}${Q.maximum.toString()} ${I.unit}`.trim();return`Liian suuri: arvon täytyy olla ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Liian pieni: ${I.subject} täytyy olla ${J}${Q.minimum.toString()} ${I.unit}`.trim();return`Liian pieni: arvon täytyy olla ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${J.prefix}"`;if(J.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${J.suffix}"`;if(J.format==="includes")return`Virheellinen syöte: täytyy sisältää "${J.includes}"`;if(J.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${J.pattern}`;return`Virheellinen ${z[J.format]??Q.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${Q.divisor} monikerta`;case"unrecognized_keys":return`${Q.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${M0(Q.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};var Us=m(()=>{Y1()});function mC(){return{localeError:jx0()}}var jx0=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function Y(Q){return $[Q]??null}let z={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},U={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Entrée invalide : instanceof ${Q.expected} attendu, ${K} reçu`;return`Entrée invalide : ${J} attendu, ${K} reçu`}case"invalid_value":if(Q.values.length===1)return`Entrée invalide : ${_0(Q.values[0])} attendu`;return`Option invalide : une valeur parmi ${M0(Q.values,"|")} attendue`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Trop grand : ${U[Q.origin]??"valeur"} doit ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"élément(s)"}`;return`Trop grand : ${U[Q.origin]??"valeur"} doit être ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Trop petit : ${U[Q.origin]??"valeur"} doit ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Trop petit : ${U[Q.origin]??"valeur"} doit être ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Chaîne invalide : doit commencer par "${J.prefix}"`;if(J.format==="ends_with")return`Chaîne invalide : doit se terminer par "${J.suffix}"`;if(J.format==="includes")return`Chaîne invalide : doit inclure "${J.includes}"`;if(J.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${J.pattern}`;return`${z[J.format]??Q.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${Q.divisor}`;case"unrecognized_keys":return`Clé${Q.keys.length>1?"s":""} non reconnue${Q.keys.length>1?"s":""} : ${M0(Q.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${Q.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${Q.origin}`;default:return"Entrée invalide"}}};var Qs=m(()=>{Y1()});function lC(){return{localeError:Tx0()}}var Tx0=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function Y(Q){return $[Q]??null}let z={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Entrée invalide : attendu instanceof ${Q.expected}, reçu ${K}`;return`Entrée invalide : attendu ${J}, reçu ${K}`}case"invalid_value":if(Q.values.length===1)return`Entrée invalide : attendu ${_0(Q.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"≤":"<",I=Y(Q.origin);if(I)return`Trop grand : attendu que ${Q.origin??"la valeur"} ait ${J}${Q.maximum.toString()} ${I.unit}`;return`Trop grand : attendu que ${Q.origin??"la valeur"} soit ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?"≥":">",I=Y(Q.origin);if(I)return`Trop petit : attendu que ${Q.origin} ait ${J}${Q.minimum.toString()} ${I.unit}`;return`Trop petit : attendu que ${Q.origin} soit ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Chaîne invalide : doit commencer par "${J.prefix}"`;if(J.format==="ends_with")return`Chaîne invalide : doit se terminer par "${J.suffix}"`;if(J.format==="includes")return`Chaîne invalide : doit inclure "${J.includes}"`;if(J.format==="regex")return`Chaîne invalide : doit correspondre au motif ${J.pattern}`;return`${z[J.format]??Q.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${Q.divisor}`;case"unrecognized_keys":return`Clé${Q.keys.length>1?"s":""} non reconnue${Q.keys.length>1?"s":""} : ${M0(Q.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${Q.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${Q.origin}`;default:return"Entrée invalide"}}};var Js=m(()=>{Y1()});function oC(){return{localeError:Ex0()}}var Ex0=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},Y={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},z=(H)=>H?$[H]:void 0,U=(H)=>{let W=z(H);if(W)return W.label;return H??$.unknown.label},Q=(H)=>`ה${U(H)}`,J=(H)=>{return(z(H)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},I=(H)=>{if(!H)return null;return Y[H]??null},K={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},G={nan:"NaN"};return(H)=>{switch(H.code){case"invalid_type":{let W=H.expected,X=G[W??""]??U(W),Z=S0(H.input),q=G[Z]??$[Z]?.label??Z;if(/^[A-Z]/.test(H.expected))return`קלט לא תקין: צריך להיות instanceof ${H.expected}, התקבל ${q}`;return`קלט לא תקין: צריך להיות ${X}, התקבל ${q}`}case"invalid_value":{if(H.values.length===1)return`ערך לא תקין: הערך חייב להיות ${_0(H.values[0])}`;let W=H.values.map((q)=>_0(q));if(H.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${W[0]} או ${W[1]}`;let X=W[W.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${W.slice(0,-1).join(", ")} או ${X}`}case"too_big":{let W=I(H.origin),X=Q(H.origin??"value");if(H.origin==="string")return`${W?.longLabel??"ארוך"} מדי: ${X} צריכה להכיל ${H.maximum.toString()} ${W?.unit??""} ${H.inclusive?"או פחות":"לכל היותר"}`.trim();if(H.origin==="number"){let V=H.inclusive?`קטן או שווה ל-${H.maximum}`:`קטן מ-${H.maximum}`;return`גדול מדי: ${X} צריך להיות ${V}`}if(H.origin==="array"||H.origin==="set"){let V=H.origin==="set"?"צריכה":"צריך",F=H.inclusive?`${H.maximum} ${W?.unit??""} או פחות`:`פחות מ-${H.maximum} ${W?.unit??""}`;return`גדול מדי: ${X} ${V} להכיל ${F}`.trim()}let Z=H.inclusive?"<=":"<",q=J(H.origin??"value");if(W?.unit)return`${W.longLabel} מדי: ${X} ${q} ${Z}${H.maximum.toString()} ${W.unit}`;return`${W?.longLabel??"גדול"} מדי: ${X} ${q} ${Z}${H.maximum.toString()}`}case"too_small":{let W=I(H.origin),X=Q(H.origin??"value");if(H.origin==="string")return`${W?.shortLabel??"קצר"} מדי: ${X} צריכה להכיל ${H.minimum.toString()} ${W?.unit??""} ${H.inclusive?"או יותר":"לפחות"}`.trim();if(H.origin==="number"){let V=H.inclusive?`גדול או שווה ל-${H.minimum}`:`גדול מ-${H.minimum}`;return`קטן מדי: ${X} צריך להיות ${V}`}if(H.origin==="array"||H.origin==="set"){let V=H.origin==="set"?"צריכה":"צריך";if(H.minimum===1&&H.inclusive){let w=H.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${X} ${V} להכיל ${w}`}let F=H.inclusive?`${H.minimum} ${W?.unit??""} או יותר`:`יותר מ-${H.minimum} ${W?.unit??""}`;return`קטן מדי: ${X} ${V} להכיל ${F}`.trim()}let Z=H.inclusive?">=":">",q=J(H.origin??"value");if(W?.unit)return`${W.shortLabel} מדי: ${X} ${q} ${Z}${H.minimum.toString()} ${W.unit}`;return`${W?.shortLabel??"קטן"} מדי: ${X} ${q} ${Z}${H.minimum.toString()}`}case"invalid_format":{let W=H;if(W.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${W.prefix}"`;if(W.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${W.suffix}"`;if(W.format==="includes")return`המחרוזת חייבת לכלול "${W.includes}"`;if(W.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${W.pattern}`;let X=K[W.format],Z=X?.label??W.format,V=(X?.gender??"m")==="f"?"תקינה":"תקין";return`${Z} לא ${V}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${H.divisor}`;case"unrecognized_keys":return`מפתח${H.keys.length>1?"ות":""} לא מזוה${H.keys.length>1?"ים":"ה"}: ${M0(H.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${Q(H.origin??"array")}`;default:return"קלט לא תקין"}}};var Is=m(()=>{Y1()});function rC(){return{localeError:Cx0()}}var Cx0=()=>{let $={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function Y(Q){return $[Q]??null}let z={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},U={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Neispravan unos: očekuje se instanceof ${Q.expected}, a primljeno je ${K}`;return`Neispravan unos: očekuje se ${J}, a primljeno je ${K}`}case"invalid_value":if(Q.values.length===1)return`Neispravna vrijednost: očekivano ${_0(Q.values[0])}`;return`Neispravna opcija: očekivano jedno od ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Preveliko: očekivano da ${K??"vrijednost"} ima ${J}${Q.maximum.toString()} ${I.unit??"elemenata"}`;return`Preveliko: očekivano da ${K??"vrijednost"} bude ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Premalo: očekivano da ${K} ima ${J}${Q.minimum.toString()} ${I.unit}`;return`Premalo: očekivano da ${K} bude ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Neispravan tekst: mora započinjati s "${J.prefix}"`;if(J.format==="ends_with")return`Neispravan tekst: mora završavati s "${J.suffix}"`;if(J.format==="includes")return`Neispravan tekst: mora sadržavati "${J.includes}"`;if(J.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${J.pattern}`;return`Neispravna ${z[J.format]??Q.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${Q.divisor}`;case"unrecognized_keys":return`Neprepoznat${Q.keys.length>1?"i ključevi":" ključ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${U[Q.origin]??Q.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${U[Q.origin]??Q.origin}`;default:return"Neispravan unos"}}};var Ks=m(()=>{Y1()});function sC(){return{localeError:Rx0()}}var Rx0=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function Y(Q){return $[Q]??null}let z={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},U={nan:"NaN",number:"szám",array:"tömb"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Érvénytelen bemenet: a várt érték instanceof ${Q.expected}, a kapott érték ${K}`;return`Érvénytelen bemenet: a várt érték ${J}, a kapott érték ${K}`}case"invalid_value":if(Q.values.length===1)return`Érvénytelen bemenet: a várt érték ${_0(Q.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Túl nagy: ${Q.origin??"érték"} mérete túl nagy ${J}${Q.maximum.toString()} ${I.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${Q.origin??"érték"} túl nagy: ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Túl kicsi: a bemeneti érték ${Q.origin} mérete túl kicsi ${J}${Q.minimum.toString()} ${I.unit}`;return`Túl kicsi: a bemeneti érték ${Q.origin} túl kicsi ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Érvénytelen string: "${J.prefix}" értékkel kell kezdődnie`;if(J.format==="ends_with")return`Érvénytelen string: "${J.suffix}" értékkel kell végződnie`;if(J.format==="includes")return`Érvénytelen string: "${J.includes}" értéket kell tartalmaznia`;if(J.format==="regex")return`Érvénytelen string: ${J.pattern} mintának kell megfelelnie`;return`Érvénytelen ${z[J.format]??Q.format}`}case"not_multiple_of":return`Érvénytelen szám: ${Q.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${Q.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${Q.origin}`;default:return"Érvénytelen bemenet"}}};var Gs=m(()=>{Y1()});function Hs($,Y,z){return Math.abs($)===1?Y:z}function eU($){if(!$)return"";let Y=["ա","ե","ը","ի","ո","ու","օ"],z=$[$.length-1];return $+(Y.includes(z)?"ն":"ը")}function aC(){return{localeError:_x0()}}var _x0=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function Y(Q){return $[Q]??null}let z={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},U={nan:"NaN",number:"թիվ",array:"զանգված"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${Q.expected}, ստացվել է ${K}`;return`Սխալ մուտքագրում․ սպասվում էր ${J}, ստացվել է ${K}`}case"invalid_value":if(Q.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${_0(Q.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I){let K=Number(Q.maximum),G=Hs(K,I.unit.one,I.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${eU(Q.origin??"արժեք")} կունենա ${J}${Q.maximum.toString()} ${G}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${eU(Q.origin??"արժեք")} լինի ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I){let K=Number(Q.minimum),G=Hs(K,I.unit.one,I.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${eU(Q.origin)} կունենա ${J}${Q.minimum.toString()} ${G}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${eU(Q.origin)} լինի ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${J.prefix}"-ով`;if(J.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${J.suffix}"-ով`;if(J.format==="includes")return`Սխալ տող․ պետք է պարունակի "${J.includes}"`;if(J.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${J.pattern} ձևաչափին`;return`Սխալ ${z[J.format]??Q.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${Q.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${Q.keys.length>1?"ներ":""}. ${M0(Q.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${eU(Q.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${eU(Q.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};var Ws=m(()=>{Y1()});function tC(){return{localeError:vx0()}}var vx0=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Input tidak valid: diharapkan instanceof ${Q.expected}, diterima ${K}`;return`Input tidak valid: diharapkan ${J}, diterima ${K}`}case"invalid_value":if(Q.values.length===1)return`Input tidak valid: diharapkan ${_0(Q.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Terlalu besar: diharapkan ${Q.origin??"value"} memiliki ${J}${Q.maximum.toString()} ${I.unit??"elemen"}`;return`Terlalu besar: diharapkan ${Q.origin??"value"} menjadi ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Terlalu kecil: diharapkan ${Q.origin} memiliki ${J}${Q.minimum.toString()} ${I.unit}`;return`Terlalu kecil: diharapkan ${Q.origin} menjadi ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`String tidak valid: harus dimulai dengan "${J.prefix}"`;if(J.format==="ends_with")return`String tidak valid: harus berakhir dengan "${J.suffix}"`;if(J.format==="includes")return`String tidak valid: harus menyertakan "${J.includes}"`;if(J.format==="regex")return`String tidak valid: harus sesuai pola ${J.pattern}`;return`${z[J.format]??Q.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${Q.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${Q.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${Q.origin}`;default:return"Input tidak valid"}}};var Xs=m(()=>{Y1()});function eC(){return{localeError:hx0()}}var hx0=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function Y(Q){return $[Q]??null}let z={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},U={nan:"NaN",number:"númer",array:"fylki"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Rangt gildi: Þú slóst inn ${K} þar sem á að vera instanceof ${Q.expected}`;return`Rangt gildi: Þú slóst inn ${K} þar sem á að vera ${J}`}case"invalid_value":if(Q.values.length===1)return`Rangt gildi: gert ráð fyrir ${_0(Q.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Of stórt: gert er ráð fyrir að ${Q.origin??"gildi"} hafi ${J}${Q.maximum.toString()} ${I.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${Q.origin??"gildi"} sé ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Of lítið: gert er ráð fyrir að ${Q.origin} hafi ${J}${Q.minimum.toString()} ${I.unit}`;return`Of lítið: gert er ráð fyrir að ${Q.origin} sé ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ógildur strengur: verður að byrja á "${J.prefix}"`;if(J.format==="ends_with")return`Ógildur strengur: verður að enda á "${J.suffix}"`;if(J.format==="includes")return`Ógildur strengur: verður að innihalda "${J.includes}"`;if(J.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${J.pattern}`;return`Rangt ${z[J.format]??Q.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${Q.divisor}`;case"unrecognized_keys":return`Óþekkt ${Q.keys.length>1?"ir lyklar":"ur lykill"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${Q.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${Q.origin}`;default:return"Rangt gildi"}}};var Zs=m(()=>{Y1()});function $R(){return{localeError:Sx0()}}var Sx0=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"numero",array:"vettore"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Input non valido: atteso instanceof ${Q.expected}, ricevuto ${K}`;return`Input non valido: atteso ${J}, ricevuto ${K}`}case"invalid_value":if(Q.values.length===1)return`Input non valido: atteso ${_0(Q.values[0])}`;return`Opzione non valida: atteso uno tra ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Troppo grande: ${Q.origin??"valore"} deve avere ${J}${Q.maximum.toString()} ${I.unit??"elementi"}`;return`Troppo grande: ${Q.origin??"valore"} deve essere ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Troppo piccolo: ${Q.origin} deve avere ${J}${Q.minimum.toString()} ${I.unit}`;return`Troppo piccolo: ${Q.origin} deve essere ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Stringa non valida: deve iniziare con "${J.prefix}"`;if(J.format==="ends_with")return`Stringa non valida: deve terminare con "${J.suffix}"`;if(J.format==="includes")return`Stringa non valida: deve includere "${J.includes}"`;if(J.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${J.pattern}`;return`Input non valido: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${Q.divisor}`;case"unrecognized_keys":return`Chiav${Q.keys.length>1?"i":"e"} non riconosciut${Q.keys.length>1?"e":"a"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${Q.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${Q.origin}`;default:return"Input non valido"}}};var qs=m(()=>{Y1()});function YR(){return{localeError:gx0()}}var gx0=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function Y(Q){return $[Q]??null}let z={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},U={nan:"NaN",number:"数値",array:"配列"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`無効な入力: instanceof ${Q.expected}が期待されましたが、${K}が入力されました`;return`無効な入力: ${J}が期待されましたが、${K}が入力されました`}case"invalid_value":if(Q.values.length===1)return`無効な入力: ${_0(Q.values[0])}が期待されました`;return`無効な選択: ${M0(Q.values,"、")}のいずれかである必要があります`;case"too_big":{let J=Q.inclusive?"以下である":"より小さい",I=Y(Q.origin);if(I)return`大きすぎる値: ${Q.origin??"値"}は${Q.maximum.toString()}${I.unit??"要素"}${J}必要があります`;return`大きすぎる値: ${Q.origin??"値"}は${Q.maximum.toString()}${J}必要があります`}case"too_small":{let J=Q.inclusive?"以上である":"より大きい",I=Y(Q.origin);if(I)return`小さすぎる値: ${Q.origin}は${Q.minimum.toString()}${I.unit}${J}必要があります`;return`小さすぎる値: ${Q.origin}は${Q.minimum.toString()}${J}必要があります`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`無効な文字列: "${J.prefix}"で始まる必要があります`;if(J.format==="ends_with")return`無効な文字列: "${J.suffix}"で終わる必要があります`;if(J.format==="includes")return`無効な文字列: "${J.includes}"を含む必要があります`;if(J.format==="regex")return`無効な文字列: パターン${J.pattern}に一致する必要があります`;return`無効な${z[J.format]??Q.format}`}case"not_multiple_of":return`無効な数値: ${Q.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${Q.keys.length>1?"群":""}: ${M0(Q.keys,"、")}`;case"invalid_key":return`${Q.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${Q.origin}内の無効な値`;default:return"無効な入力"}}};var Vs=m(()=>{Y1()});function zR(){return{localeError:yx0()}}var yx0=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function Y(Q){return $[Q]??null}let z={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},U={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${Q.expected}, მიღებული ${K}`;return`არასწორი შეყვანა: მოსალოდნელი ${J}, მიღებული ${K}`}case"invalid_value":if(Q.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${_0(Q.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${M0(Q.values,"|")}-დან`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`ზედმეტად დიდი: მოსალოდნელი ${Q.origin??"მნიშვნელობა"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${Q.origin??"მნიშვნელობა"} იყოს ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`ზედმეტად პატარა: მოსალოდნელი ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${Q.origin} იყოს ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${J.prefix}"-ით`;if(J.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${J.suffix}"-ით`;if(J.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${J.includes}"-ს`;if(J.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${J.pattern}`;return`არასწორი ${z[J.format]??Q.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${Q.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${Q.keys.length>1?"ები":"ი"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${Q.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${Q.origin}-ში`;default:return"არასწორი შეყვანა"}}};var Ls=m(()=>{Y1()});function qG(){return{localeError:kx0()}}var kx0=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function Y(Q){return $[Q]??null}let z={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},U={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${Q.expected} ប៉ុន្តែទទួលបាន ${K}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${J} ប៉ុន្តែទទួលបាន ${K}`}case"invalid_value":if(Q.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${_0(Q.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`ធំពេក៖ ត្រូវការ ${Q.origin??"តម្លៃ"} ${J} ${Q.maximum.toString()} ${I.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${Q.origin??"តម្លៃ"} ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`តូចពេក៖ ត្រូវការ ${Q.origin} ${J} ${Q.minimum.toString()} ${I.unit}`;return`តូចពេក៖ ត្រូវការ ${Q.origin} ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${J.prefix}"`;if(J.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${J.suffix}"`;if(J.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${J.includes}"`;if(J.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${J.pattern}`;return`មិនត្រឹមត្រូវ៖ ${z[J.format]??Q.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${Q.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${M0(Q.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${Q.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${Q.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};var UR=m(()=>{Y1()});function QR(){return qG()}var Fs=m(()=>{UR()});function JR(){return{localeError:xx0()}}var xx0=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function Y(Q){return $[Q]??null}let z={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`잘못된 입력: 예상 타입은 instanceof ${Q.expected}, 받은 타입은 ${K}입니다`;return`잘못된 입력: 예상 타입은 ${J}, 받은 타입은 ${K}입니다`}case"invalid_value":if(Q.values.length===1)return`잘못된 입력: 값은 ${_0(Q.values[0])} 이어야 합니다`;return`잘못된 옵션: ${M0(Q.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let J=Q.inclusive?"이하":"미만",I=J==="미만"?"이어야 합니다":"여야 합니다",K=Y(Q.origin),G=K?.unit??"요소";if(K)return`${Q.origin??"값"}이 너무 큽니다: ${Q.maximum.toString()}${G} ${J}${I}`;return`${Q.origin??"값"}이 너무 큽니다: ${Q.maximum.toString()} ${J}${I}`}case"too_small":{let J=Q.inclusive?"이상":"초과",I=J==="이상"?"이어야 합니다":"여야 합니다",K=Y(Q.origin),G=K?.unit??"요소";if(K)return`${Q.origin??"값"}이 너무 작습니다: ${Q.minimum.toString()}${G} ${J}${I}`;return`${Q.origin??"값"}이 너무 작습니다: ${Q.minimum.toString()} ${J}${I}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`잘못된 문자열: "${J.prefix}"(으)로 시작해야 합니다`;if(J.format==="ends_with")return`잘못된 문자열: "${J.suffix}"(으)로 끝나야 합니다`;if(J.format==="includes")return`잘못된 문자열: "${J.includes}"을(를) 포함해야 합니다`;if(J.format==="regex")return`잘못된 문자열: 정규식 ${J.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${z[J.format]??Q.format}`}case"not_multiple_of":return`잘못된 숫자: ${Q.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${M0(Q.keys,", ")}`;case"invalid_key":return`잘못된 키: ${Q.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${Q.origin}`;default:return"잘못된 입력"}}};var Os=m(()=>{Y1()});function ws($){let Y=Math.abs($),z=Y%10,U=Y%100;if(U>=11&&U<=19||z===0)return"many";if(z===1)return"one";return"few"}function IR(){return{localeError:fx0()}}var VG=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)},fx0=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function Y(Q,J,I,K){let G=$[Q]??null;if(G===null)return G;return{unit:G.unit[J],verb:G.verb[K][I?"inclusive":"notInclusive"]}}let z={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},U={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Gautas tipas ${K}, o tikėtasi - instanceof ${Q.expected}`;return`Gautas tipas ${K}, o tikėtasi - ${J}`}case"invalid_value":if(Q.values.length===1)return`Privalo būti ${_0(Q.values[0])}`;return`Privalo būti vienas iš ${M0(Q.values,"|")} pasirinkimų`;case"too_big":{let J=U[Q.origin]??Q.origin,I=Y(Q.origin,ws(Number(Q.maximum)),Q.inclusive??!1,"smaller");if(I?.verb)return`${VG(J??Q.origin??"reikšmė")} ${I.verb} ${Q.maximum.toString()} ${I.unit??"elementų"}`;let K=Q.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${VG(J??Q.origin??"reikšmė")} turi būti ${K} ${Q.maximum.toString()} ${I?.unit}`}case"too_small":{let J=U[Q.origin]??Q.origin,I=Y(Q.origin,ws(Number(Q.minimum)),Q.inclusive??!1,"bigger");if(I?.verb)return`${VG(J??Q.origin??"reikšmė")} ${I.verb} ${Q.minimum.toString()} ${I.unit??"elementų"}`;let K=Q.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${VG(J??Q.origin??"reikšmė")} turi būti ${K} ${Q.minimum.toString()} ${I?.unit}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Eilutė privalo prasidėti "${J.prefix}"`;if(J.format==="ends_with")return`Eilutė privalo pasibaigti "${J.suffix}"`;if(J.format==="includes")return`Eilutė privalo įtraukti "${J.includes}"`;if(J.format==="regex")return`Eilutė privalo atitikti ${J.pattern}`;return`Neteisingas ${z[J.format]??Q.format}`}case"not_multiple_of":return`Skaičius privalo būti ${Q.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${Q.keys.length>1?"i":"as"} rakt${Q.keys.length>1?"ai":"as"}: ${M0(Q.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let J=U[Q.origin]??Q.origin;return`${VG(J??Q.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};var Ms=m(()=>{Y1()});function KR(){return{localeError:ux0()}}var ux0=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function Y(Q){return $[Q]??null}let z={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},U={nan:"NaN",number:"број",array:"низа"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Грешен внес: се очекува instanceof ${Q.expected}, примено ${K}`;return`Грешен внес: се очекува ${J}, примено ${K}`}case"invalid_value":if(Q.values.length===1)return`Invalid input: expected ${_0(Q.values[0])}`;return`Грешана опција: се очекува една ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Премногу голем: се очекува ${Q.origin??"вредноста"} да има ${J}${Q.maximum.toString()} ${I.unit??"елементи"}`;return`Премногу голем: се очекува ${Q.origin??"вредноста"} да биде ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Премногу мал: се очекува ${Q.origin} да има ${J}${Q.minimum.toString()} ${I.unit}`;return`Премногу мал: се очекува ${Q.origin} да биде ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Неважечка низа: мора да започнува со "${J.prefix}"`;if(J.format==="ends_with")return`Неважечка низа: мора да завршува со "${J.suffix}"`;if(J.format==="includes")return`Неважечка низа: мора да вклучува "${J.includes}"`;if(J.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${J.pattern}`;return`Invalid ${z[J.format]??Q.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${Q.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${Q.origin}`;default:return"Грешен внес"}}};var Ns=m(()=>{Y1()});function GR(){return{localeError:bx0()}}var bx0=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"nombor"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Input tidak sah: dijangka instanceof ${Q.expected}, diterima ${K}`;return`Input tidak sah: dijangka ${J}, diterima ${K}`}case"invalid_value":if(Q.values.length===1)return`Input tidak sah: dijangka ${_0(Q.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Terlalu besar: dijangka ${Q.origin??"nilai"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"elemen"}`;return`Terlalu besar: dijangka ${Q.origin??"nilai"} adalah ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Terlalu kecil: dijangka ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Terlalu kecil: dijangka ${Q.origin} adalah ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`String tidak sah: mesti bermula dengan "${J.prefix}"`;if(J.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${J.suffix}"`;if(J.format==="includes")return`String tidak sah: mesti mengandungi "${J.includes}"`;if(J.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${J.pattern}`;return`${z[J.format]??Q.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${Q.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${M0(Q.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${Q.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${Q.origin}`;default:return"Input tidak sah"}}};var Ds=m(()=>{Y1()});function HR(){return{localeError:ix0()}}var ix0=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function Y(Q){return $[Q]??null}let z={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},U={nan:"NaN",number:"getal"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ongeldige invoer: verwacht instanceof ${Q.expected}, ontving ${K}`;return`Ongeldige invoer: verwacht ${J}, ontving ${K}`}case"invalid_value":if(Q.values.length===1)return`Ongeldige invoer: verwacht ${_0(Q.values[0])}`;return`Ongeldige optie: verwacht één van ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=Q.origin==="date"?"laat":Q.origin==="string"?"lang":"groot";if(I)return`Te ${K}: verwacht dat ${Q.origin??"waarde"} ${J}${Q.maximum.toString()} ${I.unit??"elementen"} ${I.verb}`;return`Te ${K}: verwacht dat ${Q.origin??"waarde"} ${J}${Q.maximum.toString()} is`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=Q.origin==="date"?"vroeg":Q.origin==="string"?"kort":"klein";if(I)return`Te ${K}: verwacht dat ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} ${I.verb}`;return`Te ${K}: verwacht dat ${Q.origin} ${J}${Q.minimum.toString()} is`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ongeldige tekst: moet met "${J.prefix}" beginnen`;if(J.format==="ends_with")return`Ongeldige tekst: moet op "${J.suffix}" eindigen`;if(J.format==="includes")return`Ongeldige tekst: moet "${J.includes}" bevatten`;if(J.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${J.pattern}`;return`Ongeldig: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${Q.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${Q.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${Q.origin}`;default:return"Ongeldige invoer"}}};var As=m(()=>{Y1()});function WR(){return{localeError:nx0()}}var nx0=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"tall",array:"liste"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ugyldig input: forventet instanceof ${Q.expected}, fikk ${K}`;return`Ugyldig input: forventet ${J}, fikk ${K}`}case"invalid_value":if(Q.values.length===1)return`Ugyldig verdi: forventet ${_0(Q.values[0])}`;return`Ugyldig valg: forventet en av ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`For stor(t): forventet ${Q.origin??"value"} til å ha ${J}${Q.maximum.toString()} ${I.unit??"elementer"}`;return`For stor(t): forventet ${Q.origin??"value"} til å ha ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`For lite(n): forventet ${Q.origin} til å ha ${J}${Q.minimum.toString()} ${I.unit}`;return`For lite(n): forventet ${Q.origin} til å ha ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ugyldig streng: må starte med "${J.prefix}"`;if(J.format==="ends_with")return`Ugyldig streng: må ende med "${J.suffix}"`;if(J.format==="includes")return`Ugyldig streng: må inneholde "${J.includes}"`;if(J.format==="regex")return`Ugyldig streng: må matche mønsteret ${J.pattern}`;return`Ugyldig ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${Q.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${Q.origin}`;default:return"Ugyldig input"}}};var Bs=m(()=>{Y1()});function XR(){return{localeError:cx0()}}var cx0=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function Y(Q){return $[Q]??null}let z={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},U={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Fâsit giren: umulan instanceof ${Q.expected}, alınan ${K}`;return`Fâsit giren: umulan ${J}, alınan ${K}`}case"invalid_value":if(Q.values.length===1)return`Fâsit giren: umulan ${_0(Q.values[0])}`;return`Fâsit tercih: mûteberler ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Fazla büyük: ${Q.origin??"value"}, ${J}${Q.maximum.toString()} ${I.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${Q.origin??"value"}, ${J}${Q.maximum.toString()} olmalıydı.`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Fazla küçük: ${Q.origin}, ${J}${Q.minimum.toString()} ${I.unit} sahip olmalıydı.`;return`Fazla küçük: ${Q.origin}, ${J}${Q.minimum.toString()} olmalıydı.`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Fâsit metin: "${J.prefix}" ile başlamalı.`;if(J.format==="ends_with")return`Fâsit metin: "${J.suffix}" ile bitmeli.`;if(J.format==="includes")return`Fâsit metin: "${J.includes}" ihtivâ etmeli.`;if(J.format==="regex")return`Fâsit metin: ${J.pattern} nakşına uymalı.`;return`Fâsit ${z[J.format]??Q.format}`}case"not_multiple_of":return`Fâsit sayı: ${Q.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${Q.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};var Ps=m(()=>{Y1()});function ZR(){return{localeError:px0()}}var px0=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function Y(Q){return $[Q]??null}let z={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},U={nan:"NaN",number:"عدد",array:"ارې"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ناسم ورودي: باید instanceof ${Q.expected} وای, مګر ${K} ترلاسه شو`;return`ناسم ورودي: باید ${J} وای, مګر ${K} ترلاسه شو`}case"invalid_value":if(Q.values.length===1)return`ناسم ورودي: باید ${_0(Q.values[0])} وای`;return`ناسم انتخاب: باید یو له ${M0(Q.values,"|")} څخه وای`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`ډیر لوی: ${Q.origin??"ارزښت"} باید ${J}${Q.maximum.toString()} ${I.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${Q.origin??"ارزښت"} باید ${J}${Q.maximum.toString()} وي`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`ډیر کوچنی: ${Q.origin} باید ${J}${Q.minimum.toString()} ${I.unit} ولري`;return`ډیر کوچنی: ${Q.origin} باید ${J}${Q.minimum.toString()} وي`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`ناسم متن: باید د "${J.prefix}" سره پیل شي`;if(J.format==="ends_with")return`ناسم متن: باید د "${J.suffix}" سره پای ته ورسيږي`;if(J.format==="includes")return`ناسم متن: باید "${J.includes}" ولري`;if(J.format==="regex")return`ناسم متن: باید د ${J.pattern} سره مطابقت ولري`;return`${z[J.format]??Q.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${Q.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${Q.keys.length>1?"کلیډونه":"کلیډ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${Q.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${Q.origin} کې`;default:return"ناسمه ورودي"}}};var js=m(()=>{Y1()});function qR(){return{localeError:dx0()}}var dx0=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function Y(Q){return $[Q]??null}let z={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},U={nan:"NaN",number:"liczba",array:"tablica"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${Q.expected}, otrzymano ${K}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${J}, otrzymano ${K}`}case"invalid_value":if(Q.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${_0(Q.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Za duża wartość: oczekiwano, że ${Q.origin??"wartość"} będzie mieć ${J}${Q.maximum.toString()} ${I.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${Q.origin??"wartość"} będzie wynosić ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Za mała wartość: oczekiwano, że ${Q.origin??"wartość"} będzie mieć ${J}${Q.minimum.toString()} ${I.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${Q.origin??"wartość"} będzie wynosić ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${J.prefix}"`;if(J.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${J.suffix}"`;if(J.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${J.includes}"`;if(J.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${J.pattern}`;return`Nieprawidłow(y/a/e) ${z[J.format]??Q.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${Q.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${Q.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${Q.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};var Ts=m(()=>{Y1()});function VR(){return{localeError:mx0()}}var mx0=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function Y(Q){return $[Q]??null}let z={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},U={nan:"NaN",number:"número",null:"nulo"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Tipo inválido: esperado instanceof ${Q.expected}, recebido ${K}`;return`Tipo inválido: esperado ${J}, recebido ${K}`}case"invalid_value":if(Q.values.length===1)return`Entrada inválida: esperado ${_0(Q.values[0])}`;return`Opção inválida: esperada uma das ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Muito grande: esperado que ${Q.origin??"valor"} tivesse ${J}${Q.maximum.toString()} ${I.unit??"elementos"}`;return`Muito grande: esperado que ${Q.origin??"valor"} fosse ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Muito pequeno: esperado que ${Q.origin} tivesse ${J}${Q.minimum.toString()} ${I.unit}`;return`Muito pequeno: esperado que ${Q.origin} fosse ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Texto inválido: deve começar com "${J.prefix}"`;if(J.format==="ends_with")return`Texto inválido: deve terminar com "${J.suffix}"`;if(J.format==="includes")return`Texto inválido: deve incluir "${J.includes}"`;if(J.format==="regex")return`Texto inválido: deve corresponder ao padrão ${J.pattern}`;return`${z[J.format]??Q.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${Q.divisor}`;case"unrecognized_keys":return`Chave${Q.keys.length>1?"s":""} desconhecida${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Chave inválida em ${Q.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${Q.origin}`;default:return"Campo inválido"}}};var Es=m(()=>{Y1()});function LR(){return{localeError:lx0()}}var lx0=()=>{let $={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function Y(Q){return $[Q]??null}let z={regex:"intrare",email:"adresă de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},U={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;return`Intrare invalidă: așteptat ${J}, primit ${K}`}case"invalid_value":if(Q.values.length===1)return`Intrare invalidă: așteptat ${_0(Q.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Prea mare: așteptat ca ${Q.origin??"valoarea"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"elemente"}`;return`Prea mare: așteptat ca ${Q.origin??"valoarea"} să fie ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Prea mic: așteptat ca ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Prea mic: așteptat ca ${Q.origin} să fie ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${J.prefix}"`;if(J.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${J.suffix}"`;if(J.format==="includes")return`Șir invalid: trebuie să includă "${J.includes}"`;if(J.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${J.pattern}`;return`Format invalid: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${Q.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${M0(Q.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${Q.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${Q.origin}`;default:return"Intrare invalidă"}}};var Cs=m(()=>{Y1()});function Rs($,Y,z,U){let Q=Math.abs($),J=Q%10,I=Q%100;if(I>=11&&I<=19)return U;if(J===1)return Y;if(J>=2&&J<=4)return z;return U}function FR(){return{localeError:ox0()}}var ox0=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function Y(Q){return $[Q]??null}let z={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},U={nan:"NaN",number:"число",array:"массив"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Неверный ввод: ожидалось instanceof ${Q.expected}, получено ${K}`;return`Неверный ввод: ожидалось ${J}, получено ${K}`}case"invalid_value":if(Q.values.length===1)return`Неверный ввод: ожидалось ${_0(Q.values[0])}`;return`Неверный вариант: ожидалось одно из ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I){let K=Number(Q.maximum),G=Rs(K,I.unit.one,I.unit.few,I.unit.many);return`Слишком большое значение: ожидалось, что ${Q.origin??"значение"} будет иметь ${J}${Q.maximum.toString()} ${G}`}return`Слишком большое значение: ожидалось, что ${Q.origin??"значение"} будет ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I){let K=Number(Q.minimum),G=Rs(K,I.unit.one,I.unit.few,I.unit.many);return`Слишком маленькое значение: ожидалось, что ${Q.origin} будет иметь ${J}${Q.minimum.toString()} ${G}`}return`Слишком маленькое значение: ожидалось, что ${Q.origin} будет ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Неверная строка: должна начинаться с "${J.prefix}"`;if(J.format==="ends_with")return`Неверная строка: должна заканчиваться на "${J.suffix}"`;if(J.format==="includes")return`Неверная строка: должна содержать "${J.includes}"`;if(J.format==="regex")return`Неверная строка: должна соответствовать шаблону ${J.pattern}`;return`Неверный ${z[J.format]??Q.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${Q.divisor}`;case"unrecognized_keys":return`Нераспознанн${Q.keys.length>1?"ые":"ый"} ключ${Q.keys.length>1?"и":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${Q.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${Q.origin}`;default:return"Неверные входные данные"}}};var _s=m(()=>{Y1()});function OR(){return{localeError:rx0()}}var rx0=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function Y(Q){return $[Q]??null}let z={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},U={nan:"NaN",number:"število",array:"tabela"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Neveljaven vnos: pričakovano instanceof ${Q.expected}, prejeto ${K}`;return`Neveljaven vnos: pričakovano ${J}, prejeto ${K}`}case"invalid_value":if(Q.values.length===1)return`Neveljaven vnos: pričakovano ${_0(Q.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Preveliko: pričakovano, da bo ${Q.origin??"vrednost"} imelo ${J}${Q.maximum.toString()} ${I.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${Q.origin??"vrednost"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Premajhno: pričakovano, da bo ${Q.origin} imelo ${J}${Q.minimum.toString()} ${I.unit}`;return`Premajhno: pričakovano, da bo ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Neveljaven niz: mora se začeti z "${J.prefix}"`;if(J.format==="ends_with")return`Neveljaven niz: mora se končati z "${J.suffix}"`;if(J.format==="includes")return`Neveljaven niz: mora vsebovati "${J.includes}"`;if(J.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${J.pattern}`;return`Neveljaven ${z[J.format]??Q.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${Q.divisor}`;case"unrecognized_keys":return`Neprepoznan${Q.keys.length>1?"i ključi":" ključ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${Q.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${Q.origin}`;default:return"Neveljaven vnos"}}};var vs=m(()=>{Y1()});function wR(){return{localeError:sx0()}}var sx0=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function Y(Q){return $[Q]??null}let z={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},U={nan:"NaN",number:"antal",array:"lista"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ogiltig inmatning: förväntat instanceof ${Q.expected}, fick ${K}`;return`Ogiltig inmatning: förväntat ${J}, fick ${K}`}case"invalid_value":if(Q.values.length===1)return`Ogiltig inmatning: förväntat ${_0(Q.values[0])}`;return`Ogiltigt val: förväntade en av ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`För stor(t): förväntade ${Q.origin??"värdet"} att ha ${J}${Q.maximum.toString()} ${I.unit??"element"}`;return`För stor(t): förväntat ${Q.origin??"värdet"} att ha ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`För lite(t): förväntade ${Q.origin??"värdet"} att ha ${J}${Q.minimum.toString()} ${I.unit}`;return`För lite(t): förväntade ${Q.origin??"värdet"} att ha ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ogiltig sträng: måste börja med "${J.prefix}"`;if(J.format==="ends_with")return`Ogiltig sträng: måste sluta med "${J.suffix}"`;if(J.format==="includes")return`Ogiltig sträng: måste innehålla "${J.includes}"`;if(J.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${J.pattern}"`;return`Ogiltig(t) ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${Q.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${Q.origin??"värdet"}`;default:return"Ogiltig input"}}};var hs=m(()=>{Y1()});function MR(){return{localeError:ax0()}}var ax0=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function Y(Q){return $[Q]??null}let z={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${Q.expected}, பெறப்பட்டது ${K}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${J}, பெறப்பட்டது ${K}`}case"invalid_value":if(Q.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${_0(Q.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${M0(Q.values,"|")} இல் ஒன்று`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${Q.origin??"மதிப்பு"} ${J}${Q.maximum.toString()} ${I.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${Q.origin??"மதிப்பு"} ${J}${Q.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${Q.origin} ${J}${Q.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`தவறான சரம்: "${J.prefix}" இல் தொடங்க வேண்டும்`;if(J.format==="ends_with")return`தவறான சரம்: "${J.suffix}" இல் முடிவடைய வேண்டும்`;if(J.format==="includes")return`தவறான சரம்: "${J.includes}" ஐ உள்ளடக்க வேண்டும்`;if(J.format==="regex")return`தவறான சரம்: ${J.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${z[J.format]??Q.format}`}case"not_multiple_of":return`தவறான எண்: ${Q.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${Q.keys.length>1?"கள்":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${Q.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};var Ss=m(()=>{Y1()});function NR(){return{localeError:tx0()}}var tx0=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function Y(Q){return $[Q]??null}let z={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},U={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${Q.expected} แต่ได้รับ ${K}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${J} แต่ได้รับ ${K}`}case"invalid_value":if(Q.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${_0(Q.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"ไม่เกิน":"น้อยกว่า",I=Y(Q.origin);if(I)return`เกินกำหนด: ${Q.origin??"ค่า"} ควรมี${J} ${Q.maximum.toString()} ${I.unit??"รายการ"}`;return`เกินกำหนด: ${Q.origin??"ค่า"} ควรมี${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?"อย่างน้อย":"มากกว่า",I=Y(Q.origin);if(I)return`น้อยกว่ากำหนด: ${Q.origin} ควรมี${J} ${Q.minimum.toString()} ${I.unit}`;return`น้อยกว่ากำหนด: ${Q.origin} ควรมี${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${J.prefix}"`;if(J.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${J.suffix}"`;if(J.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${J.includes}" อยู่ในข้อความ`;if(J.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${J.pattern}`;return`รูปแบบไม่ถูกต้อง: ${z[J.format]??Q.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${Q.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${M0(Q.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${Q.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${Q.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};var gs=m(()=>{Y1()});function DR(){return{localeError:ex0()}}var ex0=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function Y(Q){return $[Q]??null}let z={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Geçersiz değer: beklenen instanceof ${Q.expected}, alınan ${K}`;return`Geçersiz değer: beklenen ${J}, alınan ${K}`}case"invalid_value":if(Q.values.length===1)return`Geçersiz değer: beklenen ${_0(Q.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Çok büyük: beklenen ${Q.origin??"değer"} ${J}${Q.maximum.toString()} ${I.unit??"öğe"}`;return`Çok büyük: beklenen ${Q.origin??"değer"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Çok küçük: beklenen ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit}`;return`Çok küçük: beklenen ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Geçersiz metin: "${J.prefix}" ile başlamalı`;if(J.format==="ends_with")return`Geçersiz metin: "${J.suffix}" ile bitmeli`;if(J.format==="includes")return`Geçersiz metin: "${J.includes}" içermeli`;if(J.format==="regex")return`Geçersiz metin: ${J.pattern} desenine uymalı`;return`Geçersiz ${z[J.format]??Q.format}`}case"not_multiple_of":return`Geçersiz sayı: ${Q.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${Q.keys.length>1?"lar":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${Q.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};var ys=m(()=>{Y1()});function LG(){return{localeError:$f0()}}var $f0=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function Y(Q){return $[Q]??null}let z={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},U={nan:"NaN",number:"число",array:"масив"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Неправильні вхідні дані: очікується instanceof ${Q.expected}, отримано ${K}`;return`Неправильні вхідні дані: очікується ${J}, отримано ${K}`}case"invalid_value":if(Q.values.length===1)return`Неправильні вхідні дані: очікується ${_0(Q.values[0])}`;return`Неправильна опція: очікується одне з ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Занадто велике: очікується, що ${Q.origin??"значення"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"елементів"}`;return`Занадто велике: очікується, що ${Q.origin??"значення"} буде ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Занадто мале: очікується, що ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Занадто мале: очікується, що ${Q.origin} буде ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Неправильний рядок: повинен починатися з "${J.prefix}"`;if(J.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${J.suffix}"`;if(J.format==="includes")return`Неправильний рядок: повинен містити "${J.includes}"`;if(J.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${J.pattern}`;return`Неправильний ${z[J.format]??Q.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${Q.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${Q.keys.length>1?"і":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${Q.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${Q.origin}`;default:return"Неправильні вхідні дані"}}};var AR=m(()=>{Y1()});function BR(){return LG()}var ks=m(()=>{AR()});function PR(){return{localeError:Yf0()}}var Yf0=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function Y(Q){return $[Q]??null}let z={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},U={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`غلط ان پٹ: instanceof ${Q.expected} متوقع تھا، ${K} موصول ہوا`;return`غلط ان پٹ: ${J} متوقع تھا، ${K} موصول ہوا`}case"invalid_value":if(Q.values.length===1)return`غلط ان پٹ: ${_0(Q.values[0])} متوقع تھا`;return`غلط آپشن: ${M0(Q.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`بہت بڑا: ${Q.origin??"ویلیو"} کے ${J}${Q.maximum.toString()} ${I.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${Q.origin??"ویلیو"} کا ${J}${Q.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`بہت چھوٹا: ${Q.origin} کے ${J}${Q.minimum.toString()} ${I.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${Q.origin} کا ${J}${Q.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`غلط سٹرنگ: "${J.prefix}" سے شروع ہونا چاہیے`;if(J.format==="ends_with")return`غلط سٹرنگ: "${J.suffix}" پر ختم ہونا چاہیے`;if(J.format==="includes")return`غلط سٹرنگ: "${J.includes}" شامل ہونا چاہیے`;if(J.format==="regex")return`غلط سٹرنگ: پیٹرن ${J.pattern} سے میچ ہونا چاہیے`;return`غلط ${z[J.format]??Q.format}`}case"not_multiple_of":return`غلط نمبر: ${Q.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${Q.keys.length>1?"ز":""}: ${M0(Q.keys,"، ")}`;case"invalid_key":return`${Q.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${Q.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};var xs=m(()=>{Y1()});function jR(){return{localeError:zf0()}}var zf0=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function Y(Q){return $[Q]??null}let z={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},U={nan:"NaN",number:"raqam",array:"massiv"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${Q.expected}, qabul qilingan ${K}`;return`Noto‘g‘ri kirish: kutilgan ${J}, qabul qilingan ${K}`}case"invalid_value":if(Q.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${_0(Q.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Juda katta: kutilgan ${Q.origin??"qiymat"} ${J}${Q.maximum.toString()} ${I.unit} ${I.verb}`;return`Juda katta: kutilgan ${Q.origin??"qiymat"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Juda kichik: kutilgan ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} ${I.verb}`;return`Juda kichik: kutilgan ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Noto‘g‘ri satr: "${J.prefix}" bilan boshlanishi kerak`;if(J.format==="ends_with")return`Noto‘g‘ri satr: "${J.suffix}" bilan tugashi kerak`;if(J.format==="includes")return`Noto‘g‘ri satr: "${J.includes}" ni o‘z ichiga olishi kerak`;if(J.format==="regex")return`Noto‘g‘ri satr: ${J.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${z[J.format]??Q.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${Q.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${Q.keys.length>1?"lar":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${Q.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};var fs=m(()=>{Y1()});function TR(){return{localeError:Uf0()}}var Uf0=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function Y(Q){return $[Q]??null}let z={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},U={nan:"NaN",number:"số",array:"mảng"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${Q.expected}, nhận được ${K}`;return`Đầu vào không hợp lệ: mong đợi ${J}, nhận được ${K}`}case"invalid_value":if(Q.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${_0(Q.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Quá lớn: mong đợi ${Q.origin??"giá trị"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"phần tử"}`;return`Quá lớn: mong đợi ${Q.origin??"giá trị"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Quá nhỏ: mong đợi ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Quá nhỏ: mong đợi ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${J.prefix}"`;if(J.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${J.suffix}"`;if(J.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${J.includes}"`;if(J.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${J.pattern}`;return`${z[J.format]??Q.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${Q.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${M0(Q.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${Q.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${Q.origin}`;default:return"Đầu vào không hợp lệ"}}};var us=m(()=>{Y1()});function ER(){return{localeError:Qf0()}}var Qf0=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function Y(Q){return $[Q]??null}let z={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},U={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`无效输入:期望 instanceof ${Q.expected},实际接收 ${K}`;return`无效输入:期望 ${J},实际接收 ${K}`}case"invalid_value":if(Q.values.length===1)return`无效输入:期望 ${_0(Q.values[0])}`;return`无效选项:期望以下之一 ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`数值过大:期望 ${Q.origin??"值"} ${J}${Q.maximum.toString()} ${I.unit??"个元素"}`;return`数值过大:期望 ${Q.origin??"值"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`数值过小:期望 ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit}`;return`数值过小:期望 ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`无效字符串:必须以 "${J.prefix}" 开头`;if(J.format==="ends_with")return`无效字符串:必须以 "${J.suffix}" 结尾`;if(J.format==="includes")return`无效字符串:必须包含 "${J.includes}"`;if(J.format==="regex")return`无效字符串:必须满足正则表达式 ${J.pattern}`;return`无效${z[J.format]??Q.format}`}case"not_multiple_of":return`无效数字:必须是 ${Q.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${Q.origin} 中包含无效值(value)`;default:return"无效输入"}}};var bs=m(()=>{Y1()});function CR(){return{localeError:Jf0()}}var Jf0=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function Y(Q){return $[Q]??null}let z={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`無效的輸入值:預期為 instanceof ${Q.expected},但收到 ${K}`;return`無效的輸入值:預期為 ${J},但收到 ${K}`}case"invalid_value":if(Q.values.length===1)return`無效的輸入值:預期為 ${_0(Q.values[0])}`;return`無效的選項:預期為以下其中之一 ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`數值過大:預期 ${Q.origin??"值"} 應為 ${J}${Q.maximum.toString()} ${I.unit??"個元素"}`;return`數值過大:預期 ${Q.origin??"值"} 應為 ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`數值過小:預期 ${Q.origin} 應為 ${J}${Q.minimum.toString()} ${I.unit}`;return`數值過小:預期 ${Q.origin} 應為 ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`無效的字串:必須以 "${J.prefix}" 開頭`;if(J.format==="ends_with")return`無效的字串:必須以 "${J.suffix}" 結尾`;if(J.format==="includes")return`無效的字串:必須包含 "${J.includes}"`;if(J.format==="regex")return`無效的字串:必須符合格式 ${J.pattern}`;return`無效的 ${z[J.format]??Q.format}`}case"not_multiple_of":return`無效的數字:必須為 ${Q.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${Q.keys.length>1?"們":""}:${M0(Q.keys,"、")}`;case"invalid_key":return`${Q.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${Q.origin} 中有無效的值`;default:return"無效的輸入值"}}};var is=m(()=>{Y1()});function RR(){return{localeError:If0()}}var If0=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function Y(Q){return $[Q]??null}let z={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},U={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${Q.expected}, àmọ̀ a rí ${K}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${J}, àmọ̀ a rí ${K}`}case"invalid_value":if(Q.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${_0(Q.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${Q.origin??"iye"} ${I.verb} ${J}${Q.maximum} ${I.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${J}${Q.maximum}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Kéré ju: a ní láti jẹ́ pé ${Q.origin} ${I.verb} ${J}${Q.minimum} ${I.unit}`;return`Kéré ju: a ní láti jẹ́ ${J}${Q.minimum}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${J.prefix}"`;if(J.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${J.suffix}"`;if(J.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${J.includes}"`;if(J.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${J.pattern}`;return`Aṣìṣe: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${Q.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${M0(Q.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${Q.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${Q.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};var ns=m(()=>{Y1()});var FG={};D8(FG,{zhTW:()=>CR,zhCN:()=>ER,yo:()=>RR,vi:()=>TR,uz:()=>jR,ur:()=>PR,uk:()=>LG,ua:()=>BR,tr:()=>DR,th:()=>NR,ta:()=>MR,sv:()=>wR,sl:()=>OR,ru:()=>FR,ro:()=>LR,pt:()=>VR,ps:()=>ZR,pl:()=>qR,ota:()=>XR,no:()=>WR,nl:()=>HR,ms:()=>GR,mk:()=>KR,lt:()=>IR,ko:()=>JR,km:()=>qG,kh:()=>QR,ka:()=>zR,ja:()=>YR,it:()=>$R,is:()=>eC,id:()=>tC,hy:()=>aC,hu:()=>sC,hr:()=>rC,he:()=>oC,frCA:()=>lC,fr:()=>mC,fi:()=>dC,fa:()=>pC,es:()=>cC,eo:()=>nC,en:()=>ZG,el:()=>bC,de:()=>uC,da:()=>fC,cs:()=>xC,ca:()=>kC,bg:()=>yC,be:()=>gC,az:()=>SC,ar:()=>hC});var _R=m(()=>{pr();dr();lr();or();rr();sr();ar();tr();er();iC();$s();Ys();zs();Us();Qs();Js();Is();Ks();Gs();Ws();Xs();Zs();qs();Vs();Ls();Fs();UR();Os();Ms();Ns();Ds();As();Bs();Ps();js();Ts();Es();Cs();_s();vs();hs();Ss();gs();ys();ks();AR();xs();fs();us();bs();is();ns()});class SR{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...Y){let z=Y[0];if(this._map.set($,z),z&&typeof z==="object"&&"id"in z)this._idmap.set(z.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let Y=this._map.get($);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete($),this}get($){let Y=$._zod.parent;if(Y){let z={...this.get(Y)??{}};delete z.id;let U={...z,...this._map.get($)};return Object.keys(U).length?U:void 0}return this._map.get($)}has($){return this._map.has($)}}function PV(){return new SR}var cs,vR,hR,d6;var OG=m(()=>{vR=Symbol("ZodOutput"),hR=Symbol("ZodInput");(cs=globalThis).__zod_globalRegistry??(cs.__zod_globalRegistry=PV());d6=globalThis.__zod_globalRegistry});function gR($,Y){return new $({type:"string",...u0(Y)})}function yR($,Y){return new $({type:"string",coerce:!0,...u0(Y)})}function jV($,Y){return new $({type:"string",format:"email",check:"string_format",abort:!1,...u0(Y)})}function wG($,Y){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...u0(Y)})}function TV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...u0(Y)})}function EV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...u0(Y)})}function CV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...u0(Y)})}function RV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...u0(Y)})}function MG($,Y){return new $({type:"string",format:"url",check:"string_format",abort:!1,...u0(Y)})}function _V($,Y){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...u0(Y)})}function vV($,Y){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...u0(Y)})}function hV($,Y){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...u0(Y)})}function SV($,Y){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...u0(Y)})}function gV($,Y){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...u0(Y)})}function yV($,Y){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...u0(Y)})}function kV($,Y){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...u0(Y)})}function xV($,Y){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...u0(Y)})}function fV($,Y){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...u0(Y)})}function kR($,Y){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...u0(Y)})}function uV($,Y){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...u0(Y)})}function bV($,Y){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...u0(Y)})}function iV($,Y){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...u0(Y)})}function nV($,Y){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...u0(Y)})}function cV($,Y){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...u0(Y)})}function pV($,Y){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...u0(Y)})}function fR($,Y){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...u0(Y)})}function uR($,Y){return new $({type:"string",format:"date",check:"string_format",...u0(Y)})}function bR($,Y){return new $({type:"string",format:"time",check:"string_format",precision:null,...u0(Y)})}function iR($,Y){return new $({type:"string",format:"duration",check:"string_format",...u0(Y)})}function nR($,Y){return new $({type:"number",checks:[],...u0(Y)})}function cR($,Y){return new $({type:"number",coerce:!0,checks:[],...u0(Y)})}function pR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...u0(Y)})}function dR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...u0(Y)})}function mR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...u0(Y)})}function lR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...u0(Y)})}function oR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...u0(Y)})}function rR($,Y){return new $({type:"boolean",...u0(Y)})}function sR($,Y){return new $({type:"boolean",coerce:!0,...u0(Y)})}function aR($,Y){return new $({type:"bigint",...u0(Y)})}function tR($,Y){return new $({type:"bigint",coerce:!0,...u0(Y)})}function eR($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...u0(Y)})}function $_($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...u0(Y)})}function Y_($,Y){return new $({type:"symbol",...u0(Y)})}function z_($,Y){return new $({type:"undefined",...u0(Y)})}function U_($,Y){return new $({type:"null",...u0(Y)})}function Q_($){return new $({type:"any"})}function J_($){return new $({type:"unknown"})}function I_($,Y){return new $({type:"never",...u0(Y)})}function K_($,Y){return new $({type:"void",...u0(Y)})}function G_($,Y){return new $({type:"date",...u0(Y)})}function H_($,Y){return new $({type:"date",coerce:!0,...u0(Y)})}function W_($,Y){return new $({type:"nan",...u0(Y)})}function c5($,Y){return new XV({check:"less_than",...u0(Y),value:$,inclusive:!1})}function U$($,Y){return new XV({check:"less_than",...u0(Y),value:$,inclusive:!0})}function p5($,Y){return new ZV({check:"greater_than",...u0(Y),value:$,inclusive:!1})}function P8($,Y){return new ZV({check:"greater_than",...u0(Y),value:$,inclusive:!0})}function dV($){return p5(0,$)}function mV($){return c5(0,$)}function lV($){return U$(0,$)}function oV($){return P8(0,$)}function Z7($,Y){return new YE({check:"multiple_of",...u0(Y),value:$})}function q7($,Y){return new QE({check:"max_size",...u0(Y),maximum:$})}function d5($,Y){return new JE({check:"min_size",...u0(Y),minimum:$})}function vY($,Y){return new IE({check:"size_equals",...u0(Y),size:$})}function hY($,Y){return new KE({check:"max_length",...u0(Y),maximum:$})}function d9($,Y){return new GE({check:"min_length",...u0(Y),minimum:$})}function SY($,Y){return new HE({check:"length_equals",...u0(Y),length:$})}function $Q($,Y){return new WE({check:"string_format",format:"regex",...u0(Y),pattern:$})}function YQ($){return new XE({check:"string_format",format:"lowercase",...u0($)})}function zQ($){return new ZE({check:"string_format",format:"uppercase",...u0($)})}function UQ($,Y){return new qE({check:"string_format",format:"includes",...u0(Y),includes:$})}function QQ($,Y){return new VE({check:"string_format",format:"starts_with",...u0(Y),prefix:$})}function JQ($,Y){return new LE({check:"string_format",format:"ends_with",...u0(Y),suffix:$})}function rV($,Y,z){return new FE({check:"property",property:$,schema:Y,...u0(z)})}function IQ($,Y){return new OE({check:"mime_type",mime:$,...u0(Y)})}function z5($){return new wE({check:"overwrite",tx:$})}function KQ($){return z5((Y)=>Y.normalize($))}function GQ(){return z5(($)=>$.trim())}function HQ(){return z5(($)=>$.toLowerCase())}function WQ(){return z5(($)=>$.toUpperCase())}function XQ(){return z5(($)=>ZT($))}function X_($,Y,z){return new $({type:"array",element:Y,...u0(z)})}function Gf0($,Y,z){return new $({type:"union",options:Y,...u0(z)})}function Hf0($,Y,z){return new $({type:"union",options:Y,inclusive:!1,...u0(z)})}function Wf0($,Y,z,U){return new $({type:"union",options:z,discriminator:Y,...u0(U)})}function Xf0($,Y,z){return new $({type:"intersection",left:Y,right:z})}function Zf0($,Y,z,U){let Q=z instanceof V1;return new $({type:"tuple",items:Y,rest:Q?z:null,...u0(Q?U:z)})}function qf0($,Y,z,U){return new $({type:"record",keyType:Y,valueType:z,...u0(U)})}function Vf0($,Y,z,U){return new $({type:"map",keyType:Y,valueType:z,...u0(U)})}function Lf0($,Y,z){return new $({type:"set",valueType:Y,...u0(z)})}function Ff0($,Y,z){let U=Array.isArray(Y)?Object.fromEntries(Y.map((Q)=>[Q,Q])):Y;return new $({type:"enum",entries:U,...u0(z)})}function Of0($,Y,z){return new $({type:"enum",entries:Y,...u0(z)})}function wf0($,Y,z){return new $({type:"literal",values:Array.isArray(Y)?Y:[Y],...u0(z)})}function Z_($,Y){return new $({type:"file",...u0(Y)})}function Mf0($,Y){return new $({type:"transform",transform:Y})}function Nf0($,Y){return new $({type:"optional",innerType:Y})}function Df0($,Y){return new $({type:"nullable",innerType:Y})}function Af0($,Y,z){return new $({type:"default",innerType:Y,get defaultValue(){return typeof z==="function"?z():VT(z)}})}function Bf0($,Y,z){return new $({type:"nonoptional",innerType:Y,...u0(z)})}function Pf0($,Y){return new $({type:"success",innerType:Y})}function jf0($,Y,z){return new $({type:"catch",innerType:Y,catchValue:typeof z==="function"?z:()=>z})}function Tf0($,Y,z){return new $({type:"pipe",in:Y,out:z})}function Ef0($,Y){return new $({type:"readonly",innerType:Y})}function Cf0($,Y,z){return new $({type:"template_literal",parts:Y,...u0(z)})}function Rf0($,Y){return new $({type:"lazy",getter:Y})}function _f0($,Y){return new $({type:"promise",innerType:Y})}function q_($,Y,z){let U=u0(z);return U.abort??(U.abort=!0),new $({type:"custom",check:"custom",fn:Y,...U})}function V_($,Y,z){return new $({type:"custom",check:"custom",fn:Y,...u0(z)})}function L_($,Y){let z=ps((U)=>{return U.addIssue=(Q)=>{if(typeof Q==="string")U.issues.push(lU(Q,U.value,z._zod.def));else{let J=Q;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=U.value),J.inst??(J.inst=z),J.continue??(J.continue=!z._zod.def.abort),U.issues.push(lU(J))}},$(U.value,U)},Y);return z}function ps($,Y){let z=new F4({check:"custom",...u0(Y)});return z._zod.check=$,z}function F_($){let Y=new F4({check:"describe"});return Y._zod.onattach=[(z)=>{let U=d6.get(z)??{};d6.add(z,{...U,description:$})}],Y._zod.check=()=>{},Y}function O_($){let Y=new F4({check:"meta"});return Y._zod.onattach=[(z)=>{let U=d6.get(z)??{};d6.add(z,{...U,...$})}],Y._zod.check=()=>{},Y}function w_($,Y){let z=u0(Y),U=z.truthy??["true","1","yes","on","y","enabled"],Q=z.falsy??["false","0","no","off","n","disabled"];if(z.case!=="sensitive")U=U.map((q)=>typeof q==="string"?q.toLowerCase():q),Q=Q.map((q)=>typeof q==="string"?q.toLowerCase():q);let J=new Set(U),I=new Set(Q),K=$.Codec??XG,G=$.Boolean??HG,W=new($.String??_Y)({type:"string",error:z.error}),X=new G({type:"boolean",error:z.error}),Z=new K({type:"pipe",in:W,out:X,transform:(q,V)=>{let F=q;if(z.case!=="sensitive")F=F.toLowerCase();if(J.has(F))return!0;else if(I.has(F))return!1;else return V.issues.push({code:"invalid_value",expected:"stringbool",values:[...J,...I],input:V.value,inst:Z,continue:!1}),{}},reverseTransform:(q,V)=>{if(q===!0)return U[0]||"true";else return Q[0]||"false"},error:z.error});return Z}function ZQ($,Y,z,U={}){let Q=u0(U),J={...u0(U),check:"string_format",type:"string",format:Y,fn:typeof z==="function"?z:(K)=>z.test(K),...Q};if(z instanceof RegExp)J.pattern=z;return new $(J)}var xR;var ds=m(()=>{qV();OG();vC();Y1();xR={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function V7($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??d6,target:Y,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function J4($,Y,z={path:[],schemaPath:[]}){var U;let Q=$._zod.def,J=Y.seen.get($);if(J){if(J.count++,z.schemaPath.includes($))J.cycle=z.path;return J.schema}let I={schema:{},count:1,cycle:void 0,path:z.path};Y.seen.set($,I);let K=$._zod.toJSONSchema?.();if(K)I.schema=K;else{let W={...z,schemaPath:[...z.schemaPath,$],path:z.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(Y,I.schema,W);else{let Z=I.schema,q=Y.processors[Q.type];if(!q)throw Error(`[toJSONSchema]: Non-representable type encountered: ${Q.type}`);q($,Y,Z,W)}let X=$._zod.parent;if(X){if(!I.ref)I.ref=X;J4(X,Y,W),Y.seen.get(X).isParent=!0}}let G=Y.metadataRegistry.get($);if(G)Object.assign(I.schema,G);if(Y.io==="input"&&j8($))delete I.schema.examples,delete I.schema.default;if(Y.io==="input"&&"_prefault"in I.schema)(U=I.schema).default??(U.default=I.schema._prefault);return delete I.schema._prefault,Y.seen.get($).schema}function L7($,Y){let z=$.seen.get(Y);if(!z)throw Error("Unprocessed schema. This is a bug in Zod.");let U=new Map;for(let I of $.seen.entries()){let K=$.metadataRegistry.get(I[0])?.id;if(K){let G=U.get(K);if(G&&G!==I[0])throw Error(`Duplicate schema id "${K}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);U.set(K,I[0])}}let Q=(I)=>{let K=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let X=$.external.registry.get(I[0])?.id,Z=$.external.uri??((V)=>V);if(X)return{ref:Z(X)};let q=I[1].defId??I[1].schema.id??`schema${$.counter++}`;return I[1].defId=q,{defId:q,ref:`${Z("__shared")}#/${K}/${q}`}}if(I[1]===z)return{ref:"#"};let H=`${"#"}/${K}/`,W=I[1].schema.id??`__schema${$.counter++}`;return{defId:W,ref:H+W}},J=(I)=>{if(I[1].schema.$ref)return;let K=I[1],{ref:G,defId:H}=Q(I);if(K.def={...K.schema},H)K.defId=H;let W=K.schema;for(let X in W)delete W[X];W.$ref=G};if($.cycles==="throw")for(let I of $.seen.entries()){let K=I[1];if(K.cycle)throw Error(`Cycle detected: #/${K.cycle?.join("/")}/ + `)}q.write("payload.value = newResult;"),q.write("return payload;");let N=q.compile();return(M,D)=>N(Z,M,D)},J,I=CY,K=!jY.jitless,H=K&&qT.value,W=Y.catchall,X;$._zod.parse=(Z,q)=>{X??(X=U.value);let V=Z.value;if(!I(V))return Z.issues.push({expected:"object",code:"invalid_type",input:V,inst:$}),Z;if(K&&H&&q?.async===!1&&q.jitless!==!0){if(!J)J=Q(Y.shape);if(Z=J(Z,q),!W)return Z;return nr([],V,Z,q,X,$)}return z(Z,q)}});WG=W0("$ZodUnion",($,Y)=>{V1.init($,Y),E1($._zod,"optin",()=>Y.options.some((U)=>U._zod.optin==="optional")?"optional":void 0),E1($._zod,"optout",()=>Y.options.some((U)=>U._zod.optout==="optional")?"optional":void 0),E1($._zod,"values",()=>{if(Y.options.every((U)=>U._zod.values))return new Set(Y.options.flatMap((U)=>Array.from(U._zod.values)));return}),E1($._zod,"pattern",()=>{if(Y.options.every((U)=>U._zod.pattern)){let U=Y.options.map((Q)=>Q._zod.pattern);return new RegExp(`^(${U.map((Q)=>eK(Q.source)).join("|")})$`)}return});let z=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(U,Q)=>{if(z)return z(U,Q);let J=!1,I=[];for(let K of Y.options){let G=K._zod.run({value:U.value,issues:[]},Q);if(G instanceof Promise)I.push(G),J=!0;else{if(G.issues.length===0)return G;I.push(G)}}if(!J)return Tr(I,U,$,Q);return Promise.all(I).then((K)=>{return Tr(K,U,$,Q)})}});IC=W0("$ZodXor",($,Y)=>{WG.init($,Y),Y.inclusive=!1;let z=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(U,Q)=>{if(z)return z(U,Q);let J=!1,I=[];for(let K of Y.options){let G=K._zod.run({value:U.value,issues:[]},Q);if(G instanceof Promise)I.push(G),J=!0;else I.push(G)}if(!J)return Er(I,U,$,Q);return Promise.all(I).then((K)=>{return Er(K,U,$,Q)})}}),KC=W0("$ZodDiscriminatedUnion",($,Y)=>{Y.inclusive=!1,WG.init($,Y);let z=$._zod.parse;E1($._zod,"propValues",()=>{let Q={};for(let J of Y.options){let I=J._zod.propValues;if(!I||Object.keys(I).length===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(J)}"`);for(let[K,G]of Object.entries(I)){if(!Q[K])Q[K]=new Set;for(let H of G)Q[K].add(H)}}return Q});let U=mU(()=>{let Q=Y.options,J=new Map;for(let I of Q){let K=I._zod.propValues?.[Y.discriminator];if(!K||K.size===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(I)}"`);for(let G of K){if(J.has(G))throw Error(`Duplicate discriminator value "${String(G)}"`);J.set(G,I)}}return J});$._zod.parse=(Q,J)=>{let I=Q.value;if(!CY(I))return Q.issues.push({code:"invalid_type",expected:"object",input:I,inst:$}),Q;let K=U.value.get(I?.[Y.discriminator]);if(K)return K._zod.run(Q,J);if(Y.unionFallback||J.direction==="backward")return z(Q,J);return Q.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:Y.discriminator,options:Array.from(U.value.keys()),input:I,path:[Y.discriminator],inst:$}),Q}}),GC=W0("$ZodIntersection",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value,J=Y.left._zod.run({value:Q,issues:[]},U),I=Y.right._zod.run({value:Q,issues:[]},U);if(J instanceof Promise||I instanceof Promise)return Promise.all([J,I]).then(([G,H])=>{return Cr(z,G,H)});return Cr(z,J,I)}});DV=W0("$ZodTuple",($,Y)=>{V1.init($,Y);let z=Y.items;$._zod.parse=(U,Q)=>{let J=U.value;if(!Array.isArray(J))return U.issues.push({input:J,inst:$,expected:"tuple",code:"invalid_type"}),U;U.value=[];let I=[],K=Rr(z,"optin"),G=Rr(z,"optout");if(!Y.rest){if(J.lengthz.length)U.issues.push({code:"too_big",maximum:z.length,inclusive:!0,input:J,inst:$,origin:"array"})}let H=Array(z.length);for(let W=0;W{H[W]=Z}));else H[W]=X}if(Y.rest){let W=z.length-1,X=J.slice(z.length);for(let Z of X){W++;let q=Y.rest._zod.run({value:Z,issues:[]},Q);if(q instanceof Promise)I.push(q.then((V)=>_r(V,U,W)));else _r(q,U,W)}}if(I.length)return Promise.all(I).then(()=>vr(H,U,z,J,G));return vr(H,U,z,J,G)}});HC=W0("$ZodRecord",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(!W7(Q))return z.issues.push({expected:"record",code:"invalid_type",input:Q,inst:$}),z;let J=[],I=Y.keyType._zod.values;if(I){z.value={};let K=new Set;for(let H of I)if(typeof H==="string"||typeof H==="number"||typeof H==="symbol"){K.add(typeof H==="number"?H.toString():H);let W=Y.keyType._zod.run({value:H,issues:[]},U);if(W instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(W.issues.length){z.issues.push({code:"invalid_key",origin:"record",issues:W.issues.map((q)=>B8(q,U,a4())),input:H,path:[H],inst:$});continue}let X=W.value,Z=Y.valueType._zod.run({value:Q[H],issues:[]},U);if(Z instanceof Promise)J.push(Z.then((q)=>{if(q.issues.length)z.issues.push(...f8(H,q.issues));z.value[X]=q.value}));else{if(Z.issues.length)z.issues.push(...f8(H,Z.issues));z.value[X]=Z.value}}let G;for(let H in Q)if(!K.has(H))G=G??[],G.push(H);if(G&&G.length>0)z.issues.push({code:"unrecognized_keys",input:Q,inst:$,keys:G})}else{z.value={};for(let K of Reflect.ownKeys(Q)){if(K==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(Q,K))continue;let G=Y.keyType._zod.run({value:K,issues:[]},U);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof K==="string"&&IG.test(K)&&G.issues.length){let X=Y.keyType._zod.run({value:Number(K),issues:[]},U);if(X instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(X.issues.length===0)G=X}if(G.issues.length){if(Y.mode==="loose")z.value[K]=Q[K];else z.issues.push({code:"invalid_key",origin:"record",issues:G.issues.map((X)=>B8(X,U,a4())),input:K,path:[K],inst:$});continue}let W=Y.valueType._zod.run({value:Q[K],issues:[]},U);if(W instanceof Promise)J.push(W.then((X)=>{if(X.issues.length)z.issues.push(...f8(K,X.issues));z.value[G.value]=X.value}));else{if(W.issues.length)z.issues.push(...f8(K,W.issues));z.value[G.value]=W.value}}}if(J.length)return Promise.all(J).then(()=>z);return z}}),WC=W0("$ZodMap",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(!(Q instanceof Map))return z.issues.push({expected:"map",code:"invalid_type",input:Q,inst:$}),z;let J=[];z.value=new Map;for(let[I,K]of Q){let G=Y.keyType._zod.run({value:I,issues:[]},U),H=Y.valueType._zod.run({value:K,issues:[]},U);if(G instanceof Promise||H instanceof Promise)J.push(Promise.all([G,H]).then(([W,X])=>{hr(W,X,z,I,Q,$,U)}));else hr(G,H,z,I,Q,$,U)}if(J.length)return Promise.all(J).then(()=>z);return z}});XC=W0("$ZodSet",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(!(Q instanceof Set))return z.issues.push({input:Q,inst:$,expected:"set",code:"invalid_type"}),z;let J=[];z.value=new Set;for(let I of Q){let K=Y.valueType._zod.run({value:I,issues:[]},U);if(K instanceof Promise)J.push(K.then((G)=>Sr(G,z)));else Sr(K,z)}if(J.length)return Promise.all(J).then(()=>z);return z}});ZC=W0("$ZodEnum",($,Y)=>{V1.init($,Y);let z=tK(Y.entries),U=new Set(z);$._zod.values=U,$._zod.pattern=new RegExp(`^(${z.filter((Q)=>$G.has(typeof Q)).map((Q)=>typeof Q==="string"?A$(Q):Q.toString()).join("|")})$`),$._zod.parse=(Q,J)=>{let I=Q.value;if(U.has(I))return Q;return Q.issues.push({code:"invalid_value",values:z,input:I,inst:$}),Q}}),qC=W0("$ZodLiteral",($,Y)=>{if(V1.init($,Y),Y.values.length===0)throw Error("Cannot create literal schema with no valid values");let z=new Set(Y.values);$._zod.values=z,$._zod.pattern=new RegExp(`^(${Y.values.map((U)=>typeof U==="string"?A$(U):U?A$(U.toString()):String(U)).join("|")})$`),$._zod.parse=(U,Q)=>{let J=U.value;if(z.has(J))return U;return U.issues.push({code:"invalid_value",values:Y.values,input:J,inst:$}),U}}),VC=W0("$ZodFile",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{let Q=z.value;if(Q instanceof File)return z;return z.issues.push({expected:"file",code:"invalid_type",input:Q,inst:$}),z}}),LC=W0("$ZodTransform",($,Y)=>{V1.init($,Y),$._zod.optin="optional",$._zod.parse=(z,U)=>{if(U.direction==="backward")throw new TY($.constructor.name);let Q=Y.transform(z.value,z);if(U.async)return(Q instanceof Promise?Q:Promise.resolve(Q)).then((I)=>{return z.value=I,z.fallback=!0,z});if(Q instanceof Promise)throw new n5;return z.value=Q,z.fallback=!0,z}});AV=W0("$ZodOptional",($,Y)=>{V1.init($,Y),$._zod.optin="optional",$._zod.optout="optional",E1($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,void 0]):void 0}),E1($._zod,"pattern",()=>{let z=Y.innerType._zod.pattern;return z?new RegExp(`^(${eK(z.source)})?$`):void 0}),$._zod.parse=(z,U)=>{if(Y.innerType._zod.optin==="optional"){let Q=z.value,J=Y.innerType._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>gr(I,Q));return gr(J,Q)}if(z.value===void 0)return z;return Y.innerType._zod.run(z,U)}}),FC=W0("$ZodExactOptional",($,Y)=>{AV.init($,Y),E1($._zod,"values",()=>Y.innerType._zod.values),E1($._zod,"pattern",()=>Y.innerType._zod.pattern),$._zod.parse=(z,U)=>{return Y.innerType._zod.run(z,U)}}),OC=W0("$ZodNullable",($,Y)=>{V1.init($,Y),E1($._zod,"optin",()=>Y.innerType._zod.optin),E1($._zod,"optout",()=>Y.innerType._zod.optout),E1($._zod,"pattern",()=>{let z=Y.innerType._zod.pattern;return z?new RegExp(`^(${eK(z.source)}|null)$`):void 0}),E1($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,null]):void 0}),$._zod.parse=(z,U)=>{if(z.value===null)return z;return Y.innerType._zod.run(z,U)}}),wC=W0("$ZodDefault",($,Y)=>{V1.init($,Y),$._zod.optin="optional",E1($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);if(z.value===void 0)return z.value=Y.defaultValue,z;let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>yr(J,Y));return yr(Q,Y)}});MC=W0("$ZodPrefault",($,Y)=>{V1.init($,Y),$._zod.optin="optional",E1($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);if(z.value===void 0)z.value=Y.defaultValue;return Y.innerType._zod.run(z,U)}}),NC=W0("$ZodNonOptional",($,Y)=>{V1.init($,Y),E1($._zod,"values",()=>{let z=Y.innerType._zod.values;return z?new Set([...z].filter((U)=>U!==void 0)):void 0}),$._zod.parse=(z,U)=>{let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>kr(J,$));return kr(Q,$)}});DC=W0("$ZodSuccess",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{if(U.direction==="backward")throw new TY("ZodSuccess");let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>{return z.value=J.issues.length===0,z});return z.value=Q.issues.length===0,z}}),AC=W0("$ZodCatch",($,Y)=>{V1.init($,Y),$._zod.optin="optional",E1($._zod,"optout",()=>Y.innerType._zod.optout),E1($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>{if(z.value=J.value,J.issues.length)z.value=Y.catchValue({...z,error:{issues:J.issues.map((I)=>B8(I,U,a4()))},input:z.value}),z.issues=[],z.fallback=!0;return z});if(z.value=Q.value,Q.issues.length)z.value=Y.catchValue({...z,error:{issues:Q.issues.map((J)=>B8(J,U,a4()))},input:z.value}),z.issues=[],z.fallback=!0;return z}}),BC=W0("$ZodNaN",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{if(typeof z.value!=="number"||!Number.isNaN(z.value))return z.issues.push({input:z.value,inst:$,expected:"nan",code:"invalid_type"}),z;return z}}),BV=W0("$ZodPipe",($,Y)=>{V1.init($,Y),E1($._zod,"values",()=>Y.in._zod.values),E1($._zod,"optin",()=>Y.in._zod.optin),E1($._zod,"optout",()=>Y.out._zod.optout),E1($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(z,U)=>{if(U.direction==="backward"){let J=Y.out._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>LV(I,Y.in,U));return LV(J,Y.in,U)}let Q=Y.in._zod.run(z,U);if(Q instanceof Promise)return Q.then((J)=>LV(J,Y.out,U));return LV(Q,Y.out,U)}});XG=W0("$ZodCodec",($,Y)=>{V1.init($,Y),E1($._zod,"values",()=>Y.in._zod.values),E1($._zod,"optin",()=>Y.in._zod.optin),E1($._zod,"optout",()=>Y.out._zod.optout),E1($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(z,U)=>{if((U.direction||"forward")==="forward"){let J=Y.in._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>FV(I,Y,U));return FV(J,Y,U)}else{let J=Y.out._zod.run(z,U);if(J instanceof Promise)return J.then((I)=>FV(I,Y,U));return FV(J,Y,U)}}});PC=W0("$ZodPreprocess",($,Y)=>{BV.init($,Y)}),jC=W0("$ZodReadonly",($,Y)=>{V1.init($,Y),E1($._zod,"propValues",()=>Y.innerType._zod.propValues),E1($._zod,"values",()=>Y.innerType._zod.values),E1($._zod,"optin",()=>Y.innerType?._zod?.optin),E1($._zod,"optout",()=>Y.innerType?._zod?.optout),$._zod.parse=(z,U)=>{if(U.direction==="backward")return Y.innerType._zod.run(z,U);let Q=Y.innerType._zod.run(z,U);if(Q instanceof Promise)return Q.then(xr);return xr(Q)}});TC=W0("$ZodTemplateLiteral",($,Y)=>{V1.init($,Y);let z=[];for(let U of Y.parts)if(typeof U==="object"&&U!==null){if(!U._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...U._zod.traits].shift()}`);let Q=U._zod.pattern instanceof RegExp?U._zod.pattern.source:U._zod.pattern;if(!Q)throw Error(`Invalid template literal part: ${U._zod.traits}`);let J=Q.startsWith("^")?1:0,I=Q.endsWith("$")?Q.length-1:Q.length;z.push(Q.slice(J,I))}else if(U===null||LT.has(typeof U))z.push(A$(`${U}`));else throw Error(`Invalid template literal part: ${U}`);$._zod.pattern=new RegExp(`^${z.join("")}$`),$._zod.parse=(U,Q)=>{if(typeof U.value!=="string")return U.issues.push({input:U.value,inst:$,expected:"string",code:"invalid_type"}),U;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(U.value))return U.issues.push({input:U.value,inst:$,code:"invalid_format",format:Y.format??"template_literal",pattern:$._zod.pattern.source}),U;return U}}),EC=W0("$ZodFunction",($,Y)=>{return V1.init($,Y),$._def=Y,$._zod.def=Y,$.implement=(z)=>{if(typeof z!=="function")throw Error("implement() must be called with a function");return function(...U){let Q=$._def.input?eq($._def.input,U):U,J=Reflect.apply(z,this,Q);if($._def.output)return eq($._def.output,J);return J}},$.implementAsync=(z)=>{if(typeof z!=="function")throw Error("implementAsync() must be called with a function");return async function(...U){let Q=$._def.input?await $V($._def.input,U):U,J=await Reflect.apply(z,this,Q);if($._def.output)return await $V($._def.output,J);return J}},$._zod.parse=(z,U)=>{if(typeof z.value!=="function")return z.issues.push({code:"invalid_type",expected:"function",input:z.value,inst:$}),z;if($._def.output&&$._def.output._zod.def.type==="promise")z.value=$.implementAsync(z.value);else z.value=$.implement(z.value);return z},$.input=(...z)=>{let U=$.constructor;if(Array.isArray(z[0]))return new U({type:"function",input:new DV({type:"tuple",items:z[0],rest:z[1]}),output:$._def.output});return new U({type:"function",input:z[0],output:$._def.output})},$.output=(z)=>{return new $.constructor({type:"function",input:$._def.input,output:z})},$}),CC=W0("$ZodPromise",($,Y)=>{V1.init($,Y),$._zod.parse=(z,U)=>{return Promise.resolve(z.value).then((Q)=>Y.innerType._zod.run({value:Q,issues:[]},U))}}),RC=W0("$ZodLazy",($,Y)=>{V1.init($,Y),E1($._zod,"innerType",()=>{let z=Y;if(!z._cachedInner)z._cachedInner=Y.getter();return z._cachedInner}),E1($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),E1($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),E1($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),E1($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(z,U)=>{return $._zod.innerType._zod.run(z,U)}}),_C=W0("$ZodCustom",($,Y)=>{F4.init($,Y),V1.init($,Y),$._zod.parse=(z,U)=>{return z},$._zod.check=(z)=>{let U=z.value,Q=Y.fn(U);if(Q instanceof Promise)return Q.then((J)=>fr(J,z,U,$));fr(Q,z,U,$);return}})});function hC(){return{localeError:Xx0()}}var Xx0=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function Y(Q){return $[Q]??null}let z={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${Q.expected}، ولكن تم إدخال ${K}`;return`مدخلات غير مقبولة: يفترض إدخال ${J}، ولكن تم إدخال ${K}`}case"invalid_value":if(Q.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${v0(Q.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return` أكبر من اللازم: يفترض أن تكون ${Q.origin??"القيمة"} ${J} ${Q.maximum.toString()} ${I.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${Q.origin??"القيمة"} ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`أصغر من اللازم: يفترض لـ ${Q.origin} أن يكون ${J} ${Q.minimum.toString()} ${I.unit}`;return`أصغر من اللازم: يفترض لـ ${Q.origin} أن يكون ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${Q.prefix}"`;if(J.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${J.suffix}"`;if(J.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${J.includes}"`;if(J.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${J.pattern}`;return`${z[J.format]??Q.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${Q.divisor}`;case"unrecognized_keys":return`معرف${Q.keys.length>1?"ات":""} غريب${Q.keys.length>1?"ة":""}: ${M0(Q.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${Q.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${Q.origin}`;default:return"مدخل غير مقبول"}}};var pr=m(()=>{Y1()});function SC(){return{localeError:Zx0()}}var Zx0=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Yanlış dəyər: gözlənilən instanceof ${Q.expected}, daxil olan ${K}`;return`Yanlış dəyər: gözlənilən ${J}, daxil olan ${K}`}case"invalid_value":if(Q.values.length===1)return`Yanlış dəyər: gözlənilən ${v0(Q.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Çox böyük: gözlənilən ${Q.origin??"dəyər"} ${J}${Q.maximum.toString()} ${I.unit??"element"}`;return`Çox böyük: gözlənilən ${Q.origin??"dəyər"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Çox kiçik: gözlənilən ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit}`;return`Çox kiçik: gözlənilən ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Yanlış mətn: "${J.prefix}" ilə başlamalıdır`;if(J.format==="ends_with")return`Yanlış mətn: "${J.suffix}" ilə bitməlidir`;if(J.format==="includes")return`Yanlış mətn: "${J.includes}" daxil olmalıdır`;if(J.format==="regex")return`Yanlış mətn: ${J.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${z[J.format]??Q.format}`}case"not_multiple_of":return`Yanlış ədəd: ${Q.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${Q.keys.length>1?"lar":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${Q.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};var dr=m(()=>{Y1()});function mr($,Y,z,U){let Q=Math.abs($),J=Q%10,I=Q%100;if(I>=11&&I<=19)return U;if(J===1)return Y;if(J>=2&&J<=4)return z;return U}function gC(){return{localeError:qx0()}}var qx0=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function Y(Q){return $[Q]??null}let z={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},U={nan:"NaN",number:"лік",array:"масіў"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Няправільны ўвод: чакаўся instanceof ${Q.expected}, атрымана ${K}`;return`Няправільны ўвод: чакаўся ${J}, атрымана ${K}`}case"invalid_value":if(Q.values.length===1)return`Няправільны ўвод: чакалася ${v0(Q.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I){let K=Number(Q.maximum),G=mr(K,I.unit.one,I.unit.few,I.unit.many);return`Занадта вялікі: чакалася, што ${Q.origin??"значэнне"} павінна ${I.verb} ${J}${Q.maximum.toString()} ${G}`}return`Занадта вялікі: чакалася, што ${Q.origin??"значэнне"} павінна быць ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I){let K=Number(Q.minimum),G=mr(K,I.unit.one,I.unit.few,I.unit.many);return`Занадта малы: чакалася, што ${Q.origin} павінна ${I.verb} ${J}${Q.minimum.toString()} ${G}`}return`Занадта малы: чакалася, што ${Q.origin} павінна быць ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${J.prefix}"`;if(J.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${J.suffix}"`;if(J.format==="includes")return`Няправільны радок: павінен змяшчаць "${J.includes}"`;if(J.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${J.pattern}`;return`Няправільны ${z[J.format]??Q.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${Q.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${Q.keys.length>1?"ключы":"ключ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${Q.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${Q.origin}`;default:return"Няправільны ўвод"}}};var lr=m(()=>{Y1()});function yC(){return{localeError:Vx0()}}var Vx0=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function Y(Q){return $[Q]??null}let z={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},U={nan:"NaN",number:"число",array:"масив"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Невалиден вход: очакван instanceof ${Q.expected}, получен ${K}`;return`Невалиден вход: очакван ${J}, получен ${K}`}case"invalid_value":if(Q.values.length===1)return`Невалиден вход: очакван ${v0(Q.values[0])}`;return`Невалидна опция: очаквано едно от ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Твърде голямо: очаква се ${Q.origin??"стойност"} да съдържа ${J}${Q.maximum.toString()} ${I.unit??"елемента"}`;return`Твърде голямо: очаква се ${Q.origin??"стойност"} да бъде ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Твърде малко: очаква се ${Q.origin} да съдържа ${J}${Q.minimum.toString()} ${I.unit}`;return`Твърде малко: очаква се ${Q.origin} да бъде ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Невалиден низ: трябва да започва с "${J.prefix}"`;if(J.format==="ends_with")return`Невалиден низ: трябва да завършва с "${J.suffix}"`;if(J.format==="includes")return`Невалиден низ: трябва да включва "${J.includes}"`;if(J.format==="regex")return`Невалиден низ: трябва да съвпада с ${J.pattern}`;let I="Невалиден";if(J.format==="emoji")I="Невалидно";if(J.format==="datetime")I="Невалидно";if(J.format==="date")I="Невалидна";if(J.format==="time")I="Невалидно";if(J.format==="duration")I="Невалидна";return`${I} ${z[J.format]??Q.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${Q.divisor}`;case"unrecognized_keys":return`Неразпознат${Q.keys.length>1?"и":""} ключ${Q.keys.length>1?"ове":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${Q.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${Q.origin}`;default:return"Невалиден вход"}}};var or=m(()=>{Y1()});function kC(){return{localeError:Lx0()}}var Lx0=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function Y(Q){return $[Q]??null}let z={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Tipus invàlid: s'esperava instanceof ${Q.expected}, s'ha rebut ${K}`;return`Tipus invàlid: s'esperava ${J}, s'ha rebut ${K}`}case"invalid_value":if(Q.values.length===1)return`Valor invàlid: s'esperava ${v0(Q.values[0])}`;return`Opció invàlida: s'esperava una de ${M0(Q.values," o ")}`;case"too_big":{let J=Q.inclusive?"com a màxim":"menys de",I=Y(Q.origin);if(I)return`Massa gran: s'esperava que ${Q.origin??"el valor"} contingués ${J} ${Q.maximum.toString()} ${I.unit??"elements"}`;return`Massa gran: s'esperava que ${Q.origin??"el valor"} fos ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?"com a mínim":"més de",I=Y(Q.origin);if(I)return`Massa petit: s'esperava que ${Q.origin} contingués ${J} ${Q.minimum.toString()} ${I.unit}`;return`Massa petit: s'esperava que ${Q.origin} fos ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Format invàlid: ha de començar amb "${J.prefix}"`;if(J.format==="ends_with")return`Format invàlid: ha d'acabar amb "${J.suffix}"`;if(J.format==="includes")return`Format invàlid: ha d'incloure "${J.includes}"`;if(J.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${J.pattern}`;return`Format invàlid per a ${z[J.format]??Q.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${Q.divisor}`;case"unrecognized_keys":return`Clau${Q.keys.length>1?"s":""} no reconeguda${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${Q.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${Q.origin}`;default:return"Entrada invàlida"}}};var rr=m(()=>{Y1()});function xC(){return{localeError:Fx0()}}var Fx0=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function Y(Q){return $[Q]??null}let z={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},U={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Neplatný vstup: očekáváno instanceof ${Q.expected}, obdrženo ${K}`;return`Neplatný vstup: očekáváno ${J}, obdrženo ${K}`}case"invalid_value":if(Q.values.length===1)return`Neplatný vstup: očekáváno ${v0(Q.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Hodnota je příliš velká: ${Q.origin??"hodnota"} musí mít ${J}${Q.maximum.toString()} ${I.unit??"prvků"}`;return`Hodnota je příliš velká: ${Q.origin??"hodnota"} musí být ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Hodnota je příliš malá: ${Q.origin??"hodnota"} musí mít ${J}${Q.minimum.toString()} ${I.unit??"prvků"}`;return`Hodnota je příliš malá: ${Q.origin??"hodnota"} musí být ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Neplatný řetězec: musí začínat na "${J.prefix}"`;if(J.format==="ends_with")return`Neplatný řetězec: musí končit na "${J.suffix}"`;if(J.format==="includes")return`Neplatný řetězec: musí obsahovat "${J.includes}"`;if(J.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${J.pattern}`;return`Neplatný formát ${z[J.format]??Q.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${Q.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${M0(Q.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${Q.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${Q.origin}`;default:return"Neplatný vstup"}}};var sr=m(()=>{Y1()});function fC(){return{localeError:Ox0()}}var Ox0=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},U={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ugyldigt input: forventede instanceof ${Q.expected}, fik ${K}`;return`Ugyldigt input: forventede ${J}, fik ${K}`}case"invalid_value":if(Q.values.length===1)return`Ugyldig værdi: forventede ${v0(Q.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`For stor: forventede ${K??"value"} ${I.verb} ${J} ${Q.maximum.toString()} ${I.unit??"elementer"}`;return`For stor: forventede ${K??"value"} havde ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`For lille: forventede ${K} ${I.verb} ${J} ${Q.minimum.toString()} ${I.unit}`;return`For lille: forventede ${K} havde ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ugyldig streng: skal starte med "${J.prefix}"`;if(J.format==="ends_with")return`Ugyldig streng: skal ende med "${J.suffix}"`;if(J.format==="includes")return`Ugyldig streng: skal indeholde "${J.includes}"`;if(J.format==="regex")return`Ugyldig streng: skal matche mønsteret ${J.pattern}`;return`Ugyldig ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${Q.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${Q.origin}`;default:return"Ugyldigt input"}}};var ar=m(()=>{Y1()});function uC(){return{localeError:wx0()}}var wx0=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function Y(Q){return $[Q]??null}let z={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},U={nan:"NaN",number:"Zahl",array:"Array"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ungültige Eingabe: erwartet instanceof ${Q.expected}, erhalten ${K}`;return`Ungültige Eingabe: erwartet ${J}, erhalten ${K}`}case"invalid_value":if(Q.values.length===1)return`Ungültige Eingabe: erwartet ${v0(Q.values[0])}`;return`Ungültige Option: erwartet eine von ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Zu groß: erwartet, dass ${Q.origin??"Wert"} ${J}${Q.maximum.toString()} ${I.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${Q.origin??"Wert"} ${J}${Q.maximum.toString()} ist`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Zu klein: erwartet, dass ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} hat`;return`Zu klein: erwartet, dass ${Q.origin} ${J}${Q.minimum.toString()} ist`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ungültiger String: muss mit "${J.prefix}" beginnen`;if(J.format==="ends_with")return`Ungültiger String: muss mit "${J.suffix}" enden`;if(J.format==="includes")return`Ungültiger String: muss "${J.includes}" enthalten`;if(J.format==="regex")return`Ungültiger String: muss dem Muster ${J.pattern} entsprechen`;return`Ungültig: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${Q.divisor} sein`;case"unrecognized_keys":return`${Q.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${Q.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${Q.origin}`;default:return"Ungültige Eingabe"}}};var tr=m(()=>{Y1()});function bC(){return{localeError:Mx0()}}var Mx0=()=>{let $={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function Y(Q){return $[Q]??null}let z={regex:"είσοδος",email:"διεύθυνση email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(typeof Q.expected==="string"&&/^[A-Z]/.test(Q.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${Q.expected}, λήφθηκε ${K}`;return`Μη έγκυρη είσοδος: αναμενόταν ${J}, λήφθηκε ${K}`}case"invalid_value":if(Q.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${v0(Q.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Πολύ μεγάλο: αναμενόταν ${Q.origin??"τιμή"} να έχει ${J}${Q.maximum.toString()} ${I.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${Q.origin??"τιμή"} να είναι ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Πολύ μικρό: αναμενόταν ${Q.origin} να έχει ${J}${Q.minimum.toString()} ${I.unit}`;return`Πολύ μικρό: αναμενόταν ${Q.origin} να είναι ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${J.prefix}"`;if(J.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${J.suffix}"`;if(J.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${J.includes}"`;if(J.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${J.pattern}`;return`Μη έγκυρο: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${Q.divisor}`;case"unrecognized_keys":return`Άγνωστ${Q.keys.length>1?"α":"ο"} κλειδ${Q.keys.length>1?"ιά":"ί"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${Q.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${Q.origin}`;default:return"Μη έγκυρη είσοδος"}}};var er=m(()=>{Y1()});function ZG(){return{localeError:Nx0()}}var Nx0=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;return`Invalid input: expected ${J}, received ${K}`}case"invalid_value":if(Q.values.length===1)return`Invalid input: expected ${v0(Q.values[0])}`;return`Invalid option: expected one of ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Too big: expected ${Q.origin??"value"} to have ${J}${Q.maximum.toString()} ${I.unit??"elements"}`;return`Too big: expected ${Q.origin??"value"} to be ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Too small: expected ${Q.origin} to have ${J}${Q.minimum.toString()} ${I.unit}`;return`Too small: expected ${Q.origin} to be ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Invalid string: must start with "${J.prefix}"`;if(J.format==="ends_with")return`Invalid string: must end with "${J.suffix}"`;if(J.format==="includes")return`Invalid string: must include "${J.includes}"`;if(J.format==="regex")return`Invalid string: must match pattern ${J.pattern}`;return`Invalid ${z[J.format]??Q.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${Q.divisor}`;case"unrecognized_keys":return`Unrecognized key${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Invalid key in ${Q.origin}`;case"invalid_union":if(Q.options&&Array.isArray(Q.options)&&Q.options.length>0)return`Invalid discriminator value. Expected ${Q.options.map((I)=>`'${I}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${Q.origin}`;default:return"Invalid input"}}};var iC=m(()=>{Y1()});function nC(){return{localeError:Dx0()}}var Dx0=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function Y(Q){return $[Q]??null}let z={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},U={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Nevalida enigo: atendiĝis instanceof ${Q.expected}, riceviĝis ${K}`;return`Nevalida enigo: atendiĝis ${J}, riceviĝis ${K}`}case"invalid_value":if(Q.values.length===1)return`Nevalida enigo: atendiĝis ${v0(Q.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Tro granda: atendiĝis ke ${Q.origin??"valoro"} havu ${J}${Q.maximum.toString()} ${I.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${Q.origin??"valoro"} havu ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Tro malgranda: atendiĝis ke ${Q.origin} havu ${J}${Q.minimum.toString()} ${I.unit}`;return`Tro malgranda: atendiĝis ke ${Q.origin} estu ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${J.prefix}"`;if(J.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${J.suffix}"`;if(J.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${J.includes}"`;if(J.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${J.pattern}`;return`Nevalida ${z[J.format]??Q.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${Q.divisor}`;case"unrecognized_keys":return`Nekonata${Q.keys.length>1?"j":""} ŝlosilo${Q.keys.length>1?"j":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${Q.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${Q.origin}`;default:return"Nevalida enigo"}}};var $s=m(()=>{Y1()});function cC(){return{localeError:Ax0()}}var Ax0=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function Y(Q){return $[Q]??null}let z={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},U={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Entrada inválida: se esperaba instanceof ${Q.expected}, recibido ${K}`;return`Entrada inválida: se esperaba ${J}, recibido ${K}`}case"invalid_value":if(Q.values.length===1)return`Entrada inválida: se esperaba ${v0(Q.values[0])}`;return`Opción inválida: se esperaba una de ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Demasiado grande: se esperaba que ${K??"valor"} tuviera ${J}${Q.maximum.toString()} ${I.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${K??"valor"} fuera ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Demasiado pequeño: se esperaba que ${K} tuviera ${J}${Q.minimum.toString()} ${I.unit}`;return`Demasiado pequeño: se esperaba que ${K} fuera ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Cadena inválida: debe comenzar con "${J.prefix}"`;if(J.format==="ends_with")return`Cadena inválida: debe terminar en "${J.suffix}"`;if(J.format==="includes")return`Cadena inválida: debe incluir "${J.includes}"`;if(J.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${J.pattern}`;return`Inválido ${z[J.format]??Q.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${Q.divisor}`;case"unrecognized_keys":return`Llave${Q.keys.length>1?"s":""} desconocida${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Llave inválida en ${U[Q.origin]??Q.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${U[Q.origin]??Q.origin}`;default:return"Entrada inválida"}}};var Ys=m(()=>{Y1()});function pC(){return{localeError:Bx0()}}var Bx0=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function Y(Q){return $[Q]??null}let z={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},U={nan:"NaN",number:"عدد",array:"آرایه"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ورودی نامعتبر: می‌بایست instanceof ${Q.expected} می‌بود، ${K} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${J} می‌بود، ${K} دریافت شد`}case"invalid_value":if(Q.values.length===1)return`ورودی نامعتبر: می‌بایست ${v0(Q.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${M0(Q.values,"|")} می‌بود`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`خیلی بزرگ: ${Q.origin??"مقدار"} باید ${J}${Q.maximum.toString()} ${I.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${Q.origin??"مقدار"} باید ${J}${Q.maximum.toString()} باشد`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`خیلی کوچک: ${Q.origin} باید ${J}${Q.minimum.toString()} ${I.unit} باشد`;return`خیلی کوچک: ${Q.origin} باید ${J}${Q.minimum.toString()} باشد`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`رشته نامعتبر: باید با "${J.prefix}" شروع شود`;if(J.format==="ends_with")return`رشته نامعتبر: باید با "${J.suffix}" تمام شود`;if(J.format==="includes")return`رشته نامعتبر: باید شامل "${J.includes}" باشد`;if(J.format==="regex")return`رشته نامعتبر: باید با الگوی ${J.pattern} مطابقت داشته باشد`;return`${z[J.format]??Q.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${Q.divisor} باشد`;case"unrecognized_keys":return`کلید${Q.keys.length>1?"های":""} ناشناس: ${M0(Q.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${Q.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${Q.origin}`;default:return"ورودی نامعتبر"}}};var zs=m(()=>{Y1()});function dC(){return{localeError:Px0()}}var Px0=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function Y(Q){return $[Q]??null}let z={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Virheellinen tyyppi: odotettiin instanceof ${Q.expected}, oli ${K}`;return`Virheellinen tyyppi: odotettiin ${J}, oli ${K}`}case"invalid_value":if(Q.values.length===1)return`Virheellinen syöte: täytyy olla ${v0(Q.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Liian suuri: ${I.subject} täytyy olla ${J}${Q.maximum.toString()} ${I.unit}`.trim();return`Liian suuri: arvon täytyy olla ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Liian pieni: ${I.subject} täytyy olla ${J}${Q.minimum.toString()} ${I.unit}`.trim();return`Liian pieni: arvon täytyy olla ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${J.prefix}"`;if(J.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${J.suffix}"`;if(J.format==="includes")return`Virheellinen syöte: täytyy sisältää "${J.includes}"`;if(J.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${J.pattern}`;return`Virheellinen ${z[J.format]??Q.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${Q.divisor} monikerta`;case"unrecognized_keys":return`${Q.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${M0(Q.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};var Us=m(()=>{Y1()});function mC(){return{localeError:jx0()}}var jx0=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function Y(Q){return $[Q]??null}let z={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},U={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Entrée invalide : instanceof ${Q.expected} attendu, ${K} reçu`;return`Entrée invalide : ${J} attendu, ${K} reçu`}case"invalid_value":if(Q.values.length===1)return`Entrée invalide : ${v0(Q.values[0])} attendu`;return`Option invalide : une valeur parmi ${M0(Q.values,"|")} attendue`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Trop grand : ${U[Q.origin]??"valeur"} doit ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"élément(s)"}`;return`Trop grand : ${U[Q.origin]??"valeur"} doit être ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Trop petit : ${U[Q.origin]??"valeur"} doit ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Trop petit : ${U[Q.origin]??"valeur"} doit être ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Chaîne invalide : doit commencer par "${J.prefix}"`;if(J.format==="ends_with")return`Chaîne invalide : doit se terminer par "${J.suffix}"`;if(J.format==="includes")return`Chaîne invalide : doit inclure "${J.includes}"`;if(J.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${J.pattern}`;return`${z[J.format]??Q.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${Q.divisor}`;case"unrecognized_keys":return`Clé${Q.keys.length>1?"s":""} non reconnue${Q.keys.length>1?"s":""} : ${M0(Q.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${Q.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${Q.origin}`;default:return"Entrée invalide"}}};var Qs=m(()=>{Y1()});function lC(){return{localeError:Tx0()}}var Tx0=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function Y(Q){return $[Q]??null}let z={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Entrée invalide : attendu instanceof ${Q.expected}, reçu ${K}`;return`Entrée invalide : attendu ${J}, reçu ${K}`}case"invalid_value":if(Q.values.length===1)return`Entrée invalide : attendu ${v0(Q.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"≤":"<",I=Y(Q.origin);if(I)return`Trop grand : attendu que ${Q.origin??"la valeur"} ait ${J}${Q.maximum.toString()} ${I.unit}`;return`Trop grand : attendu que ${Q.origin??"la valeur"} soit ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?"≥":">",I=Y(Q.origin);if(I)return`Trop petit : attendu que ${Q.origin} ait ${J}${Q.minimum.toString()} ${I.unit}`;return`Trop petit : attendu que ${Q.origin} soit ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Chaîne invalide : doit commencer par "${J.prefix}"`;if(J.format==="ends_with")return`Chaîne invalide : doit se terminer par "${J.suffix}"`;if(J.format==="includes")return`Chaîne invalide : doit inclure "${J.includes}"`;if(J.format==="regex")return`Chaîne invalide : doit correspondre au motif ${J.pattern}`;return`${z[J.format]??Q.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${Q.divisor}`;case"unrecognized_keys":return`Clé${Q.keys.length>1?"s":""} non reconnue${Q.keys.length>1?"s":""} : ${M0(Q.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${Q.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${Q.origin}`;default:return"Entrée invalide"}}};var Js=m(()=>{Y1()});function oC(){return{localeError:Ex0()}}var Ex0=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},Y={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},z=(H)=>H?$[H]:void 0,U=(H)=>{let W=z(H);if(W)return W.label;return H??$.unknown.label},Q=(H)=>`ה${U(H)}`,J=(H)=>{return(z(H)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},I=(H)=>{if(!H)return null;return Y[H]??null},K={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},G={nan:"NaN"};return(H)=>{switch(H.code){case"invalid_type":{let W=H.expected,X=G[W??""]??U(W),Z=S0(H.input),q=G[Z]??$[Z]?.label??Z;if(/^[A-Z]/.test(H.expected))return`קלט לא תקין: צריך להיות instanceof ${H.expected}, התקבל ${q}`;return`קלט לא תקין: צריך להיות ${X}, התקבל ${q}`}case"invalid_value":{if(H.values.length===1)return`ערך לא תקין: הערך חייב להיות ${v0(H.values[0])}`;let W=H.values.map((q)=>v0(q));if(H.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${W[0]} או ${W[1]}`;let X=W[W.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${W.slice(0,-1).join(", ")} או ${X}`}case"too_big":{let W=I(H.origin),X=Q(H.origin??"value");if(H.origin==="string")return`${W?.longLabel??"ארוך"} מדי: ${X} צריכה להכיל ${H.maximum.toString()} ${W?.unit??""} ${H.inclusive?"או פחות":"לכל היותר"}`.trim();if(H.origin==="number"){let V=H.inclusive?`קטן או שווה ל-${H.maximum}`:`קטן מ-${H.maximum}`;return`גדול מדי: ${X} צריך להיות ${V}`}if(H.origin==="array"||H.origin==="set"){let V=H.origin==="set"?"צריכה":"צריך",F=H.inclusive?`${H.maximum} ${W?.unit??""} או פחות`:`פחות מ-${H.maximum} ${W?.unit??""}`;return`גדול מדי: ${X} ${V} להכיל ${F}`.trim()}let Z=H.inclusive?"<=":"<",q=J(H.origin??"value");if(W?.unit)return`${W.longLabel} מדי: ${X} ${q} ${Z}${H.maximum.toString()} ${W.unit}`;return`${W?.longLabel??"גדול"} מדי: ${X} ${q} ${Z}${H.maximum.toString()}`}case"too_small":{let W=I(H.origin),X=Q(H.origin??"value");if(H.origin==="string")return`${W?.shortLabel??"קצר"} מדי: ${X} צריכה להכיל ${H.minimum.toString()} ${W?.unit??""} ${H.inclusive?"או יותר":"לפחות"}`.trim();if(H.origin==="number"){let V=H.inclusive?`גדול או שווה ל-${H.minimum}`:`גדול מ-${H.minimum}`;return`קטן מדי: ${X} צריך להיות ${V}`}if(H.origin==="array"||H.origin==="set"){let V=H.origin==="set"?"צריכה":"צריך";if(H.minimum===1&&H.inclusive){let w=H.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${X} ${V} להכיל ${w}`}let F=H.inclusive?`${H.minimum} ${W?.unit??""} או יותר`:`יותר מ-${H.minimum} ${W?.unit??""}`;return`קטן מדי: ${X} ${V} להכיל ${F}`.trim()}let Z=H.inclusive?">=":">",q=J(H.origin??"value");if(W?.unit)return`${W.shortLabel} מדי: ${X} ${q} ${Z}${H.minimum.toString()} ${W.unit}`;return`${W?.shortLabel??"קטן"} מדי: ${X} ${q} ${Z}${H.minimum.toString()}`}case"invalid_format":{let W=H;if(W.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${W.prefix}"`;if(W.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${W.suffix}"`;if(W.format==="includes")return`המחרוזת חייבת לכלול "${W.includes}"`;if(W.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${W.pattern}`;let X=K[W.format],Z=X?.label??W.format,V=(X?.gender??"m")==="f"?"תקינה":"תקין";return`${Z} לא ${V}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${H.divisor}`;case"unrecognized_keys":return`מפתח${H.keys.length>1?"ות":""} לא מזוה${H.keys.length>1?"ים":"ה"}: ${M0(H.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${Q(H.origin??"array")}`;default:return"קלט לא תקין"}}};var Is=m(()=>{Y1()});function rC(){return{localeError:Cx0()}}var Cx0=()=>{let $={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function Y(Q){return $[Q]??null}let z={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},U={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Neispravan unos: očekuje se instanceof ${Q.expected}, a primljeno je ${K}`;return`Neispravan unos: očekuje se ${J}, a primljeno je ${K}`}case"invalid_value":if(Q.values.length===1)return`Neispravna vrijednost: očekivano ${v0(Q.values[0])}`;return`Neispravna opcija: očekivano jedno od ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Preveliko: očekivano da ${K??"vrijednost"} ima ${J}${Q.maximum.toString()} ${I.unit??"elemenata"}`;return`Preveliko: očekivano da ${K??"vrijednost"} bude ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=U[Q.origin]??Q.origin;if(I)return`Premalo: očekivano da ${K} ima ${J}${Q.minimum.toString()} ${I.unit}`;return`Premalo: očekivano da ${K} bude ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Neispravan tekst: mora započinjati s "${J.prefix}"`;if(J.format==="ends_with")return`Neispravan tekst: mora završavati s "${J.suffix}"`;if(J.format==="includes")return`Neispravan tekst: mora sadržavati "${J.includes}"`;if(J.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${J.pattern}`;return`Neispravna ${z[J.format]??Q.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${Q.divisor}`;case"unrecognized_keys":return`Neprepoznat${Q.keys.length>1?"i ključevi":" ključ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${U[Q.origin]??Q.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${U[Q.origin]??Q.origin}`;default:return"Neispravan unos"}}};var Ks=m(()=>{Y1()});function sC(){return{localeError:Rx0()}}var Rx0=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function Y(Q){return $[Q]??null}let z={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},U={nan:"NaN",number:"szám",array:"tömb"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Érvénytelen bemenet: a várt érték instanceof ${Q.expected}, a kapott érték ${K}`;return`Érvénytelen bemenet: a várt érték ${J}, a kapott érték ${K}`}case"invalid_value":if(Q.values.length===1)return`Érvénytelen bemenet: a várt érték ${v0(Q.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Túl nagy: ${Q.origin??"érték"} mérete túl nagy ${J}${Q.maximum.toString()} ${I.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${Q.origin??"érték"} túl nagy: ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Túl kicsi: a bemeneti érték ${Q.origin} mérete túl kicsi ${J}${Q.minimum.toString()} ${I.unit}`;return`Túl kicsi: a bemeneti érték ${Q.origin} túl kicsi ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Érvénytelen string: "${J.prefix}" értékkel kell kezdődnie`;if(J.format==="ends_with")return`Érvénytelen string: "${J.suffix}" értékkel kell végződnie`;if(J.format==="includes")return`Érvénytelen string: "${J.includes}" értéket kell tartalmaznia`;if(J.format==="regex")return`Érvénytelen string: ${J.pattern} mintának kell megfelelnie`;return`Érvénytelen ${z[J.format]??Q.format}`}case"not_multiple_of":return`Érvénytelen szám: ${Q.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${Q.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${Q.origin}`;default:return"Érvénytelen bemenet"}}};var Gs=m(()=>{Y1()});function Hs($,Y,z){return Math.abs($)===1?Y:z}function eU($){if(!$)return"";let Y=["ա","ե","ը","ի","ո","ու","օ"],z=$[$.length-1];return $+(Y.includes(z)?"ն":"ը")}function aC(){return{localeError:_x0()}}var _x0=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function Y(Q){return $[Q]??null}let z={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},U={nan:"NaN",number:"թիվ",array:"զանգված"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${Q.expected}, ստացվել է ${K}`;return`Սխալ մուտքագրում․ սպասվում էր ${J}, ստացվել է ${K}`}case"invalid_value":if(Q.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${v0(Q.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I){let K=Number(Q.maximum),G=Hs(K,I.unit.one,I.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${eU(Q.origin??"արժեք")} կունենա ${J}${Q.maximum.toString()} ${G}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${eU(Q.origin??"արժեք")} լինի ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I){let K=Number(Q.minimum),G=Hs(K,I.unit.one,I.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${eU(Q.origin)} կունենա ${J}${Q.minimum.toString()} ${G}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${eU(Q.origin)} լինի ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${J.prefix}"-ով`;if(J.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${J.suffix}"-ով`;if(J.format==="includes")return`Սխալ տող․ պետք է պարունակի "${J.includes}"`;if(J.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${J.pattern} ձևաչափին`;return`Սխալ ${z[J.format]??Q.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${Q.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${Q.keys.length>1?"ներ":""}. ${M0(Q.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${eU(Q.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${eU(Q.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};var Ws=m(()=>{Y1()});function tC(){return{localeError:vx0()}}var vx0=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Input tidak valid: diharapkan instanceof ${Q.expected}, diterima ${K}`;return`Input tidak valid: diharapkan ${J}, diterima ${K}`}case"invalid_value":if(Q.values.length===1)return`Input tidak valid: diharapkan ${v0(Q.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Terlalu besar: diharapkan ${Q.origin??"value"} memiliki ${J}${Q.maximum.toString()} ${I.unit??"elemen"}`;return`Terlalu besar: diharapkan ${Q.origin??"value"} menjadi ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Terlalu kecil: diharapkan ${Q.origin} memiliki ${J}${Q.minimum.toString()} ${I.unit}`;return`Terlalu kecil: diharapkan ${Q.origin} menjadi ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`String tidak valid: harus dimulai dengan "${J.prefix}"`;if(J.format==="ends_with")return`String tidak valid: harus berakhir dengan "${J.suffix}"`;if(J.format==="includes")return`String tidak valid: harus menyertakan "${J.includes}"`;if(J.format==="regex")return`String tidak valid: harus sesuai pola ${J.pattern}`;return`${z[J.format]??Q.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${Q.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${Q.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${Q.origin}`;default:return"Input tidak valid"}}};var Xs=m(()=>{Y1()});function eC(){return{localeError:hx0()}}var hx0=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function Y(Q){return $[Q]??null}let z={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},U={nan:"NaN",number:"númer",array:"fylki"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Rangt gildi: Þú slóst inn ${K} þar sem á að vera instanceof ${Q.expected}`;return`Rangt gildi: Þú slóst inn ${K} þar sem á að vera ${J}`}case"invalid_value":if(Q.values.length===1)return`Rangt gildi: gert ráð fyrir ${v0(Q.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Of stórt: gert er ráð fyrir að ${Q.origin??"gildi"} hafi ${J}${Q.maximum.toString()} ${I.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${Q.origin??"gildi"} sé ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Of lítið: gert er ráð fyrir að ${Q.origin} hafi ${J}${Q.minimum.toString()} ${I.unit}`;return`Of lítið: gert er ráð fyrir að ${Q.origin} sé ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ógildur strengur: verður að byrja á "${J.prefix}"`;if(J.format==="ends_with")return`Ógildur strengur: verður að enda á "${J.suffix}"`;if(J.format==="includes")return`Ógildur strengur: verður að innihalda "${J.includes}"`;if(J.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${J.pattern}`;return`Rangt ${z[J.format]??Q.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${Q.divisor}`;case"unrecognized_keys":return`Óþekkt ${Q.keys.length>1?"ir lyklar":"ur lykill"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${Q.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${Q.origin}`;default:return"Rangt gildi"}}};var Zs=m(()=>{Y1()});function $R(){return{localeError:Sx0()}}var Sx0=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"numero",array:"vettore"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Input non valido: atteso instanceof ${Q.expected}, ricevuto ${K}`;return`Input non valido: atteso ${J}, ricevuto ${K}`}case"invalid_value":if(Q.values.length===1)return`Input non valido: atteso ${v0(Q.values[0])}`;return`Opzione non valida: atteso uno tra ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Troppo grande: ${Q.origin??"valore"} deve avere ${J}${Q.maximum.toString()} ${I.unit??"elementi"}`;return`Troppo grande: ${Q.origin??"valore"} deve essere ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Troppo piccolo: ${Q.origin} deve avere ${J}${Q.minimum.toString()} ${I.unit}`;return`Troppo piccolo: ${Q.origin} deve essere ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Stringa non valida: deve iniziare con "${J.prefix}"`;if(J.format==="ends_with")return`Stringa non valida: deve terminare con "${J.suffix}"`;if(J.format==="includes")return`Stringa non valida: deve includere "${J.includes}"`;if(J.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${J.pattern}`;return`Input non valido: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${Q.divisor}`;case"unrecognized_keys":return`Chiav${Q.keys.length>1?"i":"e"} non riconosciut${Q.keys.length>1?"e":"a"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${Q.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${Q.origin}`;default:return"Input non valido"}}};var qs=m(()=>{Y1()});function YR(){return{localeError:gx0()}}var gx0=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function Y(Q){return $[Q]??null}let z={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},U={nan:"NaN",number:"数値",array:"配列"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`無効な入力: instanceof ${Q.expected}が期待されましたが、${K}が入力されました`;return`無効な入力: ${J}が期待されましたが、${K}が入力されました`}case"invalid_value":if(Q.values.length===1)return`無効な入力: ${v0(Q.values[0])}が期待されました`;return`無効な選択: ${M0(Q.values,"、")}のいずれかである必要があります`;case"too_big":{let J=Q.inclusive?"以下である":"より小さい",I=Y(Q.origin);if(I)return`大きすぎる値: ${Q.origin??"値"}は${Q.maximum.toString()}${I.unit??"要素"}${J}必要があります`;return`大きすぎる値: ${Q.origin??"値"}は${Q.maximum.toString()}${J}必要があります`}case"too_small":{let J=Q.inclusive?"以上である":"より大きい",I=Y(Q.origin);if(I)return`小さすぎる値: ${Q.origin}は${Q.minimum.toString()}${I.unit}${J}必要があります`;return`小さすぎる値: ${Q.origin}は${Q.minimum.toString()}${J}必要があります`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`無効な文字列: "${J.prefix}"で始まる必要があります`;if(J.format==="ends_with")return`無効な文字列: "${J.suffix}"で終わる必要があります`;if(J.format==="includes")return`無効な文字列: "${J.includes}"を含む必要があります`;if(J.format==="regex")return`無効な文字列: パターン${J.pattern}に一致する必要があります`;return`無効な${z[J.format]??Q.format}`}case"not_multiple_of":return`無効な数値: ${Q.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${Q.keys.length>1?"群":""}: ${M0(Q.keys,"、")}`;case"invalid_key":return`${Q.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${Q.origin}内の無効な値`;default:return"無効な入力"}}};var Vs=m(()=>{Y1()});function zR(){return{localeError:yx0()}}var yx0=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function Y(Q){return $[Q]??null}let z={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},U={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${Q.expected}, მიღებული ${K}`;return`არასწორი შეყვანა: მოსალოდნელი ${J}, მიღებული ${K}`}case"invalid_value":if(Q.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${v0(Q.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${M0(Q.values,"|")}-დან`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`ზედმეტად დიდი: მოსალოდნელი ${Q.origin??"მნიშვნელობა"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${Q.origin??"მნიშვნელობა"} იყოს ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`ზედმეტად პატარა: მოსალოდნელი ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${Q.origin} იყოს ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${J.prefix}"-ით`;if(J.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${J.suffix}"-ით`;if(J.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${J.includes}"-ს`;if(J.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${J.pattern}`;return`არასწორი ${z[J.format]??Q.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${Q.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${Q.keys.length>1?"ები":"ი"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${Q.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${Q.origin}-ში`;default:return"არასწორი შეყვანა"}}};var Ls=m(()=>{Y1()});function qG(){return{localeError:kx0()}}var kx0=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function Y(Q){return $[Q]??null}let z={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},U={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${Q.expected} ប៉ុន្តែទទួលបាន ${K}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${J} ប៉ុន្តែទទួលបាន ${K}`}case"invalid_value":if(Q.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${v0(Q.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`ធំពេក៖ ត្រូវការ ${Q.origin??"តម្លៃ"} ${J} ${Q.maximum.toString()} ${I.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${Q.origin??"តម្លៃ"} ${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`តូចពេក៖ ត្រូវការ ${Q.origin} ${J} ${Q.minimum.toString()} ${I.unit}`;return`តូចពេក៖ ត្រូវការ ${Q.origin} ${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${J.prefix}"`;if(J.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${J.suffix}"`;if(J.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${J.includes}"`;if(J.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${J.pattern}`;return`មិនត្រឹមត្រូវ៖ ${z[J.format]??Q.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${Q.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${M0(Q.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${Q.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${Q.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};var UR=m(()=>{Y1()});function QR(){return qG()}var Fs=m(()=>{UR()});function JR(){return{localeError:xx0()}}var xx0=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function Y(Q){return $[Q]??null}let z={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`잘못된 입력: 예상 타입은 instanceof ${Q.expected}, 받은 타입은 ${K}입니다`;return`잘못된 입력: 예상 타입은 ${J}, 받은 타입은 ${K}입니다`}case"invalid_value":if(Q.values.length===1)return`잘못된 입력: 값은 ${v0(Q.values[0])} 이어야 합니다`;return`잘못된 옵션: ${M0(Q.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let J=Q.inclusive?"이하":"미만",I=J==="미만"?"이어야 합니다":"여야 합니다",K=Y(Q.origin),G=K?.unit??"요소";if(K)return`${Q.origin??"값"}이 너무 큽니다: ${Q.maximum.toString()}${G} ${J}${I}`;return`${Q.origin??"값"}이 너무 큽니다: ${Q.maximum.toString()} ${J}${I}`}case"too_small":{let J=Q.inclusive?"이상":"초과",I=J==="이상"?"이어야 합니다":"여야 합니다",K=Y(Q.origin),G=K?.unit??"요소";if(K)return`${Q.origin??"값"}이 너무 작습니다: ${Q.minimum.toString()}${G} ${J}${I}`;return`${Q.origin??"값"}이 너무 작습니다: ${Q.minimum.toString()} ${J}${I}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`잘못된 문자열: "${J.prefix}"(으)로 시작해야 합니다`;if(J.format==="ends_with")return`잘못된 문자열: "${J.suffix}"(으)로 끝나야 합니다`;if(J.format==="includes")return`잘못된 문자열: "${J.includes}"을(를) 포함해야 합니다`;if(J.format==="regex")return`잘못된 문자열: 정규식 ${J.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${z[J.format]??Q.format}`}case"not_multiple_of":return`잘못된 숫자: ${Q.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${M0(Q.keys,", ")}`;case"invalid_key":return`잘못된 키: ${Q.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${Q.origin}`;default:return"잘못된 입력"}}};var Os=m(()=>{Y1()});function ws($){let Y=Math.abs($),z=Y%10,U=Y%100;if(U>=11&&U<=19||z===0)return"many";if(z===1)return"one";return"few"}function IR(){return{localeError:fx0()}}var VG=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)},fx0=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function Y(Q,J,I,K){let G=$[Q]??null;if(G===null)return G;return{unit:G.unit[J],verb:G.verb[K][I?"inclusive":"notInclusive"]}}let z={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},U={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Gautas tipas ${K}, o tikėtasi - instanceof ${Q.expected}`;return`Gautas tipas ${K}, o tikėtasi - ${J}`}case"invalid_value":if(Q.values.length===1)return`Privalo būti ${v0(Q.values[0])}`;return`Privalo būti vienas iš ${M0(Q.values,"|")} pasirinkimų`;case"too_big":{let J=U[Q.origin]??Q.origin,I=Y(Q.origin,ws(Number(Q.maximum)),Q.inclusive??!1,"smaller");if(I?.verb)return`${VG(J??Q.origin??"reikšmė")} ${I.verb} ${Q.maximum.toString()} ${I.unit??"elementų"}`;let K=Q.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${VG(J??Q.origin??"reikšmė")} turi būti ${K} ${Q.maximum.toString()} ${I?.unit}`}case"too_small":{let J=U[Q.origin]??Q.origin,I=Y(Q.origin,ws(Number(Q.minimum)),Q.inclusive??!1,"bigger");if(I?.verb)return`${VG(J??Q.origin??"reikšmė")} ${I.verb} ${Q.minimum.toString()} ${I.unit??"elementų"}`;let K=Q.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${VG(J??Q.origin??"reikšmė")} turi būti ${K} ${Q.minimum.toString()} ${I?.unit}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Eilutė privalo prasidėti "${J.prefix}"`;if(J.format==="ends_with")return`Eilutė privalo pasibaigti "${J.suffix}"`;if(J.format==="includes")return`Eilutė privalo įtraukti "${J.includes}"`;if(J.format==="regex")return`Eilutė privalo atitikti ${J.pattern}`;return`Neteisingas ${z[J.format]??Q.format}`}case"not_multiple_of":return`Skaičius privalo būti ${Q.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${Q.keys.length>1?"i":"as"} rakt${Q.keys.length>1?"ai":"as"}: ${M0(Q.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let J=U[Q.origin]??Q.origin;return`${VG(J??Q.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};var Ms=m(()=>{Y1()});function KR(){return{localeError:ux0()}}var ux0=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function Y(Q){return $[Q]??null}let z={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},U={nan:"NaN",number:"број",array:"низа"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Грешен внес: се очекува instanceof ${Q.expected}, примено ${K}`;return`Грешен внес: се очекува ${J}, примено ${K}`}case"invalid_value":if(Q.values.length===1)return`Invalid input: expected ${v0(Q.values[0])}`;return`Грешана опција: се очекува една ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Премногу голем: се очекува ${Q.origin??"вредноста"} да има ${J}${Q.maximum.toString()} ${I.unit??"елементи"}`;return`Премногу голем: се очекува ${Q.origin??"вредноста"} да биде ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Премногу мал: се очекува ${Q.origin} да има ${J}${Q.minimum.toString()} ${I.unit}`;return`Премногу мал: се очекува ${Q.origin} да биде ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Неважечка низа: мора да започнува со "${J.prefix}"`;if(J.format==="ends_with")return`Неважечка низа: мора да завршува со "${J.suffix}"`;if(J.format==="includes")return`Неважечка низа: мора да вклучува "${J.includes}"`;if(J.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${J.pattern}`;return`Invalid ${z[J.format]??Q.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${Q.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${Q.origin}`;default:return"Грешен внес"}}};var Ns=m(()=>{Y1()});function GR(){return{localeError:bx0()}}var bx0=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"nombor"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Input tidak sah: dijangka instanceof ${Q.expected}, diterima ${K}`;return`Input tidak sah: dijangka ${J}, diterima ${K}`}case"invalid_value":if(Q.values.length===1)return`Input tidak sah: dijangka ${v0(Q.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Terlalu besar: dijangka ${Q.origin??"nilai"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"elemen"}`;return`Terlalu besar: dijangka ${Q.origin??"nilai"} adalah ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Terlalu kecil: dijangka ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Terlalu kecil: dijangka ${Q.origin} adalah ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`String tidak sah: mesti bermula dengan "${J.prefix}"`;if(J.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${J.suffix}"`;if(J.format==="includes")return`String tidak sah: mesti mengandungi "${J.includes}"`;if(J.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${J.pattern}`;return`${z[J.format]??Q.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${Q.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${M0(Q.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${Q.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${Q.origin}`;default:return"Input tidak sah"}}};var Ds=m(()=>{Y1()});function HR(){return{localeError:ix0()}}var ix0=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function Y(Q){return $[Q]??null}let z={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},U={nan:"NaN",number:"getal"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ongeldige invoer: verwacht instanceof ${Q.expected}, ontving ${K}`;return`Ongeldige invoer: verwacht ${J}, ontving ${K}`}case"invalid_value":if(Q.values.length===1)return`Ongeldige invoer: verwacht ${v0(Q.values[0])}`;return`Ongeldige optie: verwacht één van ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin),K=Q.origin==="date"?"laat":Q.origin==="string"?"lang":"groot";if(I)return`Te ${K}: verwacht dat ${Q.origin??"waarde"} ${J}${Q.maximum.toString()} ${I.unit??"elementen"} ${I.verb}`;return`Te ${K}: verwacht dat ${Q.origin??"waarde"} ${J}${Q.maximum.toString()} is`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin),K=Q.origin==="date"?"vroeg":Q.origin==="string"?"kort":"klein";if(I)return`Te ${K}: verwacht dat ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} ${I.verb}`;return`Te ${K}: verwacht dat ${Q.origin} ${J}${Q.minimum.toString()} is`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ongeldige tekst: moet met "${J.prefix}" beginnen`;if(J.format==="ends_with")return`Ongeldige tekst: moet op "${J.suffix}" eindigen`;if(J.format==="includes")return`Ongeldige tekst: moet "${J.includes}" bevatten`;if(J.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${J.pattern}`;return`Ongeldig: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${Q.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${Q.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${Q.origin}`;default:return"Ongeldige invoer"}}};var As=m(()=>{Y1()});function WR(){return{localeError:nx0()}}var nx0=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function Y(Q){return $[Q]??null}let z={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"tall",array:"liste"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ugyldig input: forventet instanceof ${Q.expected}, fikk ${K}`;return`Ugyldig input: forventet ${J}, fikk ${K}`}case"invalid_value":if(Q.values.length===1)return`Ugyldig verdi: forventet ${v0(Q.values[0])}`;return`Ugyldig valg: forventet en av ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`For stor(t): forventet ${Q.origin??"value"} til å ha ${J}${Q.maximum.toString()} ${I.unit??"elementer"}`;return`For stor(t): forventet ${Q.origin??"value"} til å ha ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`For lite(n): forventet ${Q.origin} til å ha ${J}${Q.minimum.toString()} ${I.unit}`;return`For lite(n): forventet ${Q.origin} til å ha ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ugyldig streng: må starte med "${J.prefix}"`;if(J.format==="ends_with")return`Ugyldig streng: må ende med "${J.suffix}"`;if(J.format==="includes")return`Ugyldig streng: må inneholde "${J.includes}"`;if(J.format==="regex")return`Ugyldig streng: må matche mønsteret ${J.pattern}`;return`Ugyldig ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${Q.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${Q.origin}`;default:return"Ugyldig input"}}};var Bs=m(()=>{Y1()});function XR(){return{localeError:cx0()}}var cx0=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function Y(Q){return $[Q]??null}let z={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},U={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Fâsit giren: umulan instanceof ${Q.expected}, alınan ${K}`;return`Fâsit giren: umulan ${J}, alınan ${K}`}case"invalid_value":if(Q.values.length===1)return`Fâsit giren: umulan ${v0(Q.values[0])}`;return`Fâsit tercih: mûteberler ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Fazla büyük: ${Q.origin??"value"}, ${J}${Q.maximum.toString()} ${I.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${Q.origin??"value"}, ${J}${Q.maximum.toString()} olmalıydı.`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Fazla küçük: ${Q.origin}, ${J}${Q.minimum.toString()} ${I.unit} sahip olmalıydı.`;return`Fazla küçük: ${Q.origin}, ${J}${Q.minimum.toString()} olmalıydı.`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Fâsit metin: "${J.prefix}" ile başlamalı.`;if(J.format==="ends_with")return`Fâsit metin: "${J.suffix}" ile bitmeli.`;if(J.format==="includes")return`Fâsit metin: "${J.includes}" ihtivâ etmeli.`;if(J.format==="regex")return`Fâsit metin: ${J.pattern} nakşına uymalı.`;return`Fâsit ${z[J.format]??Q.format}`}case"not_multiple_of":return`Fâsit sayı: ${Q.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${Q.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};var Ps=m(()=>{Y1()});function ZR(){return{localeError:px0()}}var px0=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function Y(Q){return $[Q]??null}let z={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},U={nan:"NaN",number:"عدد",array:"ارې"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ناسم ورودي: باید instanceof ${Q.expected} وای, مګر ${K} ترلاسه شو`;return`ناسم ورودي: باید ${J} وای, مګر ${K} ترلاسه شو`}case"invalid_value":if(Q.values.length===1)return`ناسم ورودي: باید ${v0(Q.values[0])} وای`;return`ناسم انتخاب: باید یو له ${M0(Q.values,"|")} څخه وای`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`ډیر لوی: ${Q.origin??"ارزښت"} باید ${J}${Q.maximum.toString()} ${I.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${Q.origin??"ارزښت"} باید ${J}${Q.maximum.toString()} وي`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`ډیر کوچنی: ${Q.origin} باید ${J}${Q.minimum.toString()} ${I.unit} ولري`;return`ډیر کوچنی: ${Q.origin} باید ${J}${Q.minimum.toString()} وي`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`ناسم متن: باید د "${J.prefix}" سره پیل شي`;if(J.format==="ends_with")return`ناسم متن: باید د "${J.suffix}" سره پای ته ورسيږي`;if(J.format==="includes")return`ناسم متن: باید "${J.includes}" ولري`;if(J.format==="regex")return`ناسم متن: باید د ${J.pattern} سره مطابقت ولري`;return`${z[J.format]??Q.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${Q.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${Q.keys.length>1?"کلیډونه":"کلیډ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${Q.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${Q.origin} کې`;default:return"ناسمه ورودي"}}};var js=m(()=>{Y1()});function qR(){return{localeError:dx0()}}var dx0=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function Y(Q){return $[Q]??null}let z={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},U={nan:"NaN",number:"liczba",array:"tablica"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${Q.expected}, otrzymano ${K}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${J}, otrzymano ${K}`}case"invalid_value":if(Q.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${v0(Q.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Za duża wartość: oczekiwano, że ${Q.origin??"wartość"} będzie mieć ${J}${Q.maximum.toString()} ${I.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${Q.origin??"wartość"} będzie wynosić ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Za mała wartość: oczekiwano, że ${Q.origin??"wartość"} będzie mieć ${J}${Q.minimum.toString()} ${I.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${Q.origin??"wartość"} będzie wynosić ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${J.prefix}"`;if(J.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${J.suffix}"`;if(J.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${J.includes}"`;if(J.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${J.pattern}`;return`Nieprawidłow(y/a/e) ${z[J.format]??Q.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${Q.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${Q.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${Q.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};var Ts=m(()=>{Y1()});function VR(){return{localeError:mx0()}}var mx0=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function Y(Q){return $[Q]??null}let z={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},U={nan:"NaN",number:"número",null:"nulo"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Tipo inválido: esperado instanceof ${Q.expected}, recebido ${K}`;return`Tipo inválido: esperado ${J}, recebido ${K}`}case"invalid_value":if(Q.values.length===1)return`Entrada inválida: esperado ${v0(Q.values[0])}`;return`Opção inválida: esperada uma das ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Muito grande: esperado que ${Q.origin??"valor"} tivesse ${J}${Q.maximum.toString()} ${I.unit??"elementos"}`;return`Muito grande: esperado que ${Q.origin??"valor"} fosse ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Muito pequeno: esperado que ${Q.origin} tivesse ${J}${Q.minimum.toString()} ${I.unit}`;return`Muito pequeno: esperado que ${Q.origin} fosse ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Texto inválido: deve começar com "${J.prefix}"`;if(J.format==="ends_with")return`Texto inválido: deve terminar com "${J.suffix}"`;if(J.format==="includes")return`Texto inválido: deve incluir "${J.includes}"`;if(J.format==="regex")return`Texto inválido: deve corresponder ao padrão ${J.pattern}`;return`${z[J.format]??Q.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${Q.divisor}`;case"unrecognized_keys":return`Chave${Q.keys.length>1?"s":""} desconhecida${Q.keys.length>1?"s":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Chave inválida em ${Q.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${Q.origin}`;default:return"Campo inválido"}}};var Es=m(()=>{Y1()});function LR(){return{localeError:lx0()}}var lx0=()=>{let $={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function Y(Q){return $[Q]??null}let z={regex:"intrare",email:"adresă de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},U={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;return`Intrare invalidă: așteptat ${J}, primit ${K}`}case"invalid_value":if(Q.values.length===1)return`Intrare invalidă: așteptat ${v0(Q.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Prea mare: așteptat ca ${Q.origin??"valoarea"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"elemente"}`;return`Prea mare: așteptat ca ${Q.origin??"valoarea"} să fie ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Prea mic: așteptat ca ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Prea mic: așteptat ca ${Q.origin} să fie ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${J.prefix}"`;if(J.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${J.suffix}"`;if(J.format==="includes")return`Șir invalid: trebuie să includă "${J.includes}"`;if(J.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${J.pattern}`;return`Format invalid: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${Q.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${M0(Q.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${Q.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${Q.origin}`;default:return"Intrare invalidă"}}};var Cs=m(()=>{Y1()});function Rs($,Y,z,U){let Q=Math.abs($),J=Q%10,I=Q%100;if(I>=11&&I<=19)return U;if(J===1)return Y;if(J>=2&&J<=4)return z;return U}function FR(){return{localeError:ox0()}}var ox0=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function Y(Q){return $[Q]??null}let z={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},U={nan:"NaN",number:"число",array:"массив"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Неверный ввод: ожидалось instanceof ${Q.expected}, получено ${K}`;return`Неверный ввод: ожидалось ${J}, получено ${K}`}case"invalid_value":if(Q.values.length===1)return`Неверный ввод: ожидалось ${v0(Q.values[0])}`;return`Неверный вариант: ожидалось одно из ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I){let K=Number(Q.maximum),G=Rs(K,I.unit.one,I.unit.few,I.unit.many);return`Слишком большое значение: ожидалось, что ${Q.origin??"значение"} будет иметь ${J}${Q.maximum.toString()} ${G}`}return`Слишком большое значение: ожидалось, что ${Q.origin??"значение"} будет ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I){let K=Number(Q.minimum),G=Rs(K,I.unit.one,I.unit.few,I.unit.many);return`Слишком маленькое значение: ожидалось, что ${Q.origin} будет иметь ${J}${Q.minimum.toString()} ${G}`}return`Слишком маленькое значение: ожидалось, что ${Q.origin} будет ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Неверная строка: должна начинаться с "${J.prefix}"`;if(J.format==="ends_with")return`Неверная строка: должна заканчиваться на "${J.suffix}"`;if(J.format==="includes")return`Неверная строка: должна содержать "${J.includes}"`;if(J.format==="regex")return`Неверная строка: должна соответствовать шаблону ${J.pattern}`;return`Неверный ${z[J.format]??Q.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${Q.divisor}`;case"unrecognized_keys":return`Нераспознанн${Q.keys.length>1?"ые":"ый"} ключ${Q.keys.length>1?"и":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${Q.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${Q.origin}`;default:return"Неверные входные данные"}}};var _s=m(()=>{Y1()});function OR(){return{localeError:rx0()}}var rx0=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function Y(Q){return $[Q]??null}let z={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},U={nan:"NaN",number:"število",array:"tabela"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Neveljaven vnos: pričakovano instanceof ${Q.expected}, prejeto ${K}`;return`Neveljaven vnos: pričakovano ${J}, prejeto ${K}`}case"invalid_value":if(Q.values.length===1)return`Neveljaven vnos: pričakovano ${v0(Q.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Preveliko: pričakovano, da bo ${Q.origin??"vrednost"} imelo ${J}${Q.maximum.toString()} ${I.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${Q.origin??"vrednost"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Premajhno: pričakovano, da bo ${Q.origin} imelo ${J}${Q.minimum.toString()} ${I.unit}`;return`Premajhno: pričakovano, da bo ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Neveljaven niz: mora se začeti z "${J.prefix}"`;if(J.format==="ends_with")return`Neveljaven niz: mora se končati z "${J.suffix}"`;if(J.format==="includes")return`Neveljaven niz: mora vsebovati "${J.includes}"`;if(J.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${J.pattern}`;return`Neveljaven ${z[J.format]??Q.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${Q.divisor}`;case"unrecognized_keys":return`Neprepoznan${Q.keys.length>1?"i ključi":" ključ"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${Q.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${Q.origin}`;default:return"Neveljaven vnos"}}};var vs=m(()=>{Y1()});function wR(){return{localeError:sx0()}}var sx0=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function Y(Q){return $[Q]??null}let z={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},U={nan:"NaN",number:"antal",array:"lista"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ogiltig inmatning: förväntat instanceof ${Q.expected}, fick ${K}`;return`Ogiltig inmatning: förväntat ${J}, fick ${K}`}case"invalid_value":if(Q.values.length===1)return`Ogiltig inmatning: förväntat ${v0(Q.values[0])}`;return`Ogiltigt val: förväntade en av ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`För stor(t): förväntade ${Q.origin??"värdet"} att ha ${J}${Q.maximum.toString()} ${I.unit??"element"}`;return`För stor(t): förväntat ${Q.origin??"värdet"} att ha ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`För lite(t): förväntade ${Q.origin??"värdet"} att ha ${J}${Q.minimum.toString()} ${I.unit}`;return`För lite(t): förväntade ${Q.origin??"värdet"} att ha ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ogiltig sträng: måste börja med "${J.prefix}"`;if(J.format==="ends_with")return`Ogiltig sträng: måste sluta med "${J.suffix}"`;if(J.format==="includes")return`Ogiltig sträng: måste innehålla "${J.includes}"`;if(J.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${J.pattern}"`;return`Ogiltig(t) ${z[J.format]??Q.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${Q.divisor}`;case"unrecognized_keys":return`${Q.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${Q.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${Q.origin??"värdet"}`;default:return"Ogiltig input"}}};var hs=m(()=>{Y1()});function MR(){return{localeError:ax0()}}var ax0=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function Y(Q){return $[Q]??null}let z={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},U={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${Q.expected}, பெறப்பட்டது ${K}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${J}, பெறப்பட்டது ${K}`}case"invalid_value":if(Q.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${v0(Q.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${M0(Q.values,"|")} இல் ஒன்று`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${Q.origin??"மதிப்பு"} ${J}${Q.maximum.toString()} ${I.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${Q.origin??"மதிப்பு"} ${J}${Q.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${Q.origin} ${J}${Q.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`தவறான சரம்: "${J.prefix}" இல் தொடங்க வேண்டும்`;if(J.format==="ends_with")return`தவறான சரம்: "${J.suffix}" இல் முடிவடைய வேண்டும்`;if(J.format==="includes")return`தவறான சரம்: "${J.includes}" ஐ உள்ளடக்க வேண்டும்`;if(J.format==="regex")return`தவறான சரம்: ${J.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${z[J.format]??Q.format}`}case"not_multiple_of":return`தவறான எண்: ${Q.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${Q.keys.length>1?"கள்":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${Q.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};var Ss=m(()=>{Y1()});function NR(){return{localeError:tx0()}}var tx0=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function Y(Q){return $[Q]??null}let z={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},U={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${Q.expected} แต่ได้รับ ${K}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${J} แต่ได้รับ ${K}`}case"invalid_value":if(Q.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${v0(Q.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"ไม่เกิน":"น้อยกว่า",I=Y(Q.origin);if(I)return`เกินกำหนด: ${Q.origin??"ค่า"} ควรมี${J} ${Q.maximum.toString()} ${I.unit??"รายการ"}`;return`เกินกำหนด: ${Q.origin??"ค่า"} ควรมี${J} ${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?"อย่างน้อย":"มากกว่า",I=Y(Q.origin);if(I)return`น้อยกว่ากำหนด: ${Q.origin} ควรมี${J} ${Q.minimum.toString()} ${I.unit}`;return`น้อยกว่ากำหนด: ${Q.origin} ควรมี${J} ${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${J.prefix}"`;if(J.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${J.suffix}"`;if(J.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${J.includes}" อยู่ในข้อความ`;if(J.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${J.pattern}`;return`รูปแบบไม่ถูกต้อง: ${z[J.format]??Q.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${Q.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${M0(Q.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${Q.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${Q.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};var gs=m(()=>{Y1()});function DR(){return{localeError:ex0()}}var ex0=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function Y(Q){return $[Q]??null}let z={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Geçersiz değer: beklenen instanceof ${Q.expected}, alınan ${K}`;return`Geçersiz değer: beklenen ${J}, alınan ${K}`}case"invalid_value":if(Q.values.length===1)return`Geçersiz değer: beklenen ${v0(Q.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Çok büyük: beklenen ${Q.origin??"değer"} ${J}${Q.maximum.toString()} ${I.unit??"öğe"}`;return`Çok büyük: beklenen ${Q.origin??"değer"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Çok küçük: beklenen ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit}`;return`Çok küçük: beklenen ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Geçersiz metin: "${J.prefix}" ile başlamalı`;if(J.format==="ends_with")return`Geçersiz metin: "${J.suffix}" ile bitmeli`;if(J.format==="includes")return`Geçersiz metin: "${J.includes}" içermeli`;if(J.format==="regex")return`Geçersiz metin: ${J.pattern} desenine uymalı`;return`Geçersiz ${z[J.format]??Q.format}`}case"not_multiple_of":return`Geçersiz sayı: ${Q.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${Q.keys.length>1?"lar":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${Q.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};var ys=m(()=>{Y1()});function LG(){return{localeError:$f0()}}var $f0=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function Y(Q){return $[Q]??null}let z={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},U={nan:"NaN",number:"число",array:"масив"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Неправильні вхідні дані: очікується instanceof ${Q.expected}, отримано ${K}`;return`Неправильні вхідні дані: очікується ${J}, отримано ${K}`}case"invalid_value":if(Q.values.length===1)return`Неправильні вхідні дані: очікується ${v0(Q.values[0])}`;return`Неправильна опція: очікується одне з ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Занадто велике: очікується, що ${Q.origin??"значення"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"елементів"}`;return`Занадто велике: очікується, що ${Q.origin??"значення"} буде ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Занадто мале: очікується, що ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Занадто мале: очікується, що ${Q.origin} буде ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Неправильний рядок: повинен починатися з "${J.prefix}"`;if(J.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${J.suffix}"`;if(J.format==="includes")return`Неправильний рядок: повинен містити "${J.includes}"`;if(J.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${J.pattern}`;return`Неправильний ${z[J.format]??Q.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${Q.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${Q.keys.length>1?"і":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${Q.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${Q.origin}`;default:return"Неправильні вхідні дані"}}};var AR=m(()=>{Y1()});function BR(){return LG()}var ks=m(()=>{AR()});function PR(){return{localeError:Yf0()}}var Yf0=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function Y(Q){return $[Q]??null}let z={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},U={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`غلط ان پٹ: instanceof ${Q.expected} متوقع تھا، ${K} موصول ہوا`;return`غلط ان پٹ: ${J} متوقع تھا، ${K} موصول ہوا`}case"invalid_value":if(Q.values.length===1)return`غلط ان پٹ: ${v0(Q.values[0])} متوقع تھا`;return`غلط آپشن: ${M0(Q.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`بہت بڑا: ${Q.origin??"ویلیو"} کے ${J}${Q.maximum.toString()} ${I.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${Q.origin??"ویلیو"} کا ${J}${Q.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`بہت چھوٹا: ${Q.origin} کے ${J}${Q.minimum.toString()} ${I.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${Q.origin} کا ${J}${Q.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`غلط سٹرنگ: "${J.prefix}" سے شروع ہونا چاہیے`;if(J.format==="ends_with")return`غلط سٹرنگ: "${J.suffix}" پر ختم ہونا چاہیے`;if(J.format==="includes")return`غلط سٹرنگ: "${J.includes}" شامل ہونا چاہیے`;if(J.format==="regex")return`غلط سٹرنگ: پیٹرن ${J.pattern} سے میچ ہونا چاہیے`;return`غلط ${z[J.format]??Q.format}`}case"not_multiple_of":return`غلط نمبر: ${Q.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${Q.keys.length>1?"ز":""}: ${M0(Q.keys,"، ")}`;case"invalid_key":return`${Q.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${Q.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};var xs=m(()=>{Y1()});function jR(){return{localeError:zf0()}}var zf0=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function Y(Q){return $[Q]??null}let z={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},U={nan:"NaN",number:"raqam",array:"massiv"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${Q.expected}, qabul qilingan ${K}`;return`Noto‘g‘ri kirish: kutilgan ${J}, qabul qilingan ${K}`}case"invalid_value":if(Q.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${v0(Q.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Juda katta: kutilgan ${Q.origin??"qiymat"} ${J}${Q.maximum.toString()} ${I.unit} ${I.verb}`;return`Juda katta: kutilgan ${Q.origin??"qiymat"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Juda kichik: kutilgan ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit} ${I.verb}`;return`Juda kichik: kutilgan ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Noto‘g‘ri satr: "${J.prefix}" bilan boshlanishi kerak`;if(J.format==="ends_with")return`Noto‘g‘ri satr: "${J.suffix}" bilan tugashi kerak`;if(J.format==="includes")return`Noto‘g‘ri satr: "${J.includes}" ni o‘z ichiga olishi kerak`;if(J.format==="regex")return`Noto‘g‘ri satr: ${J.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${z[J.format]??Q.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${Q.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${Q.keys.length>1?"lar":""}: ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${Q.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};var fs=m(()=>{Y1()});function TR(){return{localeError:Uf0()}}var Uf0=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function Y(Q){return $[Q]??null}let z={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},U={nan:"NaN",number:"số",array:"mảng"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${Q.expected}, nhận được ${K}`;return`Đầu vào không hợp lệ: mong đợi ${J}, nhận được ${K}`}case"invalid_value":if(Q.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${v0(Q.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Quá lớn: mong đợi ${Q.origin??"giá trị"} ${I.verb} ${J}${Q.maximum.toString()} ${I.unit??"phần tử"}`;return`Quá lớn: mong đợi ${Q.origin??"giá trị"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Quá nhỏ: mong đợi ${Q.origin} ${I.verb} ${J}${Q.minimum.toString()} ${I.unit}`;return`Quá nhỏ: mong đợi ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${J.prefix}"`;if(J.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${J.suffix}"`;if(J.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${J.includes}"`;if(J.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${J.pattern}`;return`${z[J.format]??Q.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${Q.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${M0(Q.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${Q.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${Q.origin}`;default:return"Đầu vào không hợp lệ"}}};var us=m(()=>{Y1()});function ER(){return{localeError:Qf0()}}var Qf0=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function Y(Q){return $[Q]??null}let z={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},U={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`无效输入:期望 instanceof ${Q.expected},实际接收 ${K}`;return`无效输入:期望 ${J},实际接收 ${K}`}case"invalid_value":if(Q.values.length===1)return`无效输入:期望 ${v0(Q.values[0])}`;return`无效选项:期望以下之一 ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`数值过大:期望 ${Q.origin??"值"} ${J}${Q.maximum.toString()} ${I.unit??"个元素"}`;return`数值过大:期望 ${Q.origin??"值"} ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`数值过小:期望 ${Q.origin} ${J}${Q.minimum.toString()} ${I.unit}`;return`数值过小:期望 ${Q.origin} ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`无效字符串:必须以 "${J.prefix}" 开头`;if(J.format==="ends_with")return`无效字符串:必须以 "${J.suffix}" 结尾`;if(J.format==="includes")return`无效字符串:必须包含 "${J.includes}"`;if(J.format==="regex")return`无效字符串:必须满足正则表达式 ${J.pattern}`;return`无效${z[J.format]??Q.format}`}case"not_multiple_of":return`无效数字:必须是 ${Q.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${M0(Q.keys,", ")}`;case"invalid_key":return`${Q.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${Q.origin} 中包含无效值(value)`;default:return"无效输入"}}};var bs=m(()=>{Y1()});function CR(){return{localeError:Jf0()}}var Jf0=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function Y(Q){return $[Q]??null}let z={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},U={nan:"NaN"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`無效的輸入值:預期為 instanceof ${Q.expected},但收到 ${K}`;return`無效的輸入值:預期為 ${J},但收到 ${K}`}case"invalid_value":if(Q.values.length===1)return`無效的輸入值:預期為 ${v0(Q.values[0])}`;return`無效的選項:預期為以下其中之一 ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`數值過大:預期 ${Q.origin??"值"} 應為 ${J}${Q.maximum.toString()} ${I.unit??"個元素"}`;return`數值過大:預期 ${Q.origin??"值"} 應為 ${J}${Q.maximum.toString()}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`數值過小:預期 ${Q.origin} 應為 ${J}${Q.minimum.toString()} ${I.unit}`;return`數值過小:預期 ${Q.origin} 應為 ${J}${Q.minimum.toString()}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`無效的字串:必須以 "${J.prefix}" 開頭`;if(J.format==="ends_with")return`無效的字串:必須以 "${J.suffix}" 結尾`;if(J.format==="includes")return`無效的字串:必須包含 "${J.includes}"`;if(J.format==="regex")return`無效的字串:必須符合格式 ${J.pattern}`;return`無效的 ${z[J.format]??Q.format}`}case"not_multiple_of":return`無效的數字:必須為 ${Q.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${Q.keys.length>1?"們":""}:${M0(Q.keys,"、")}`;case"invalid_key":return`${Q.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${Q.origin} 中有無效的值`;default:return"無效的輸入值"}}};var is=m(()=>{Y1()});function RR(){return{localeError:If0()}}var If0=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function Y(Q){return $[Q]??null}let z={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},U={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(Q)=>{switch(Q.code){case"invalid_type":{let J=U[Q.expected]??Q.expected,I=S0(Q.input),K=U[I]??I;if(/^[A-Z]/.test(Q.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${Q.expected}, àmọ̀ a rí ${K}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${J}, àmọ̀ a rí ${K}`}case"invalid_value":if(Q.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${v0(Q.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${M0(Q.values,"|")}`;case"too_big":{let J=Q.inclusive?"<=":"<",I=Y(Q.origin);if(I)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${Q.origin??"iye"} ${I.verb} ${J}${Q.maximum} ${I.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${J}${Q.maximum}`}case"too_small":{let J=Q.inclusive?">=":">",I=Y(Q.origin);if(I)return`Kéré ju: a ní láti jẹ́ pé ${Q.origin} ${I.verb} ${J}${Q.minimum} ${I.unit}`;return`Kéré ju: a ní láti jẹ́ ${J}${Q.minimum}`}case"invalid_format":{let J=Q;if(J.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${J.prefix}"`;if(J.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${J.suffix}"`;if(J.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${J.includes}"`;if(J.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${J.pattern}`;return`Aṣìṣe: ${z[J.format]??Q.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${Q.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${M0(Q.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${Q.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${Q.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};var ns=m(()=>{Y1()});var FG={};D8(FG,{zhTW:()=>CR,zhCN:()=>ER,yo:()=>RR,vi:()=>TR,uz:()=>jR,ur:()=>PR,uk:()=>LG,ua:()=>BR,tr:()=>DR,th:()=>NR,ta:()=>MR,sv:()=>wR,sl:()=>OR,ru:()=>FR,ro:()=>LR,pt:()=>VR,ps:()=>ZR,pl:()=>qR,ota:()=>XR,no:()=>WR,nl:()=>HR,ms:()=>GR,mk:()=>KR,lt:()=>IR,ko:()=>JR,km:()=>qG,kh:()=>QR,ka:()=>zR,ja:()=>YR,it:()=>$R,is:()=>eC,id:()=>tC,hy:()=>aC,hu:()=>sC,hr:()=>rC,he:()=>oC,frCA:()=>lC,fr:()=>mC,fi:()=>dC,fa:()=>pC,es:()=>cC,eo:()=>nC,en:()=>ZG,el:()=>bC,de:()=>uC,da:()=>fC,cs:()=>xC,ca:()=>kC,bg:()=>yC,be:()=>gC,az:()=>SC,ar:()=>hC});var _R=m(()=>{pr();dr();lr();or();rr();sr();ar();tr();er();iC();$s();Ys();zs();Us();Qs();Js();Is();Ks();Gs();Ws();Xs();Zs();qs();Vs();Ls();Fs();UR();Os();Ms();Ns();Ds();As();Bs();Ps();js();Ts();Es();Cs();_s();vs();hs();Ss();gs();ys();ks();AR();xs();fs();us();bs();is();ns()});class SR{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...Y){let z=Y[0];if(this._map.set($,z),z&&typeof z==="object"&&"id"in z)this._idmap.set(z.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let Y=this._map.get($);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete($),this}get($){let Y=$._zod.parent;if(Y){let z={...this.get(Y)??{}};delete z.id;let U={...z,...this._map.get($)};return Object.keys(U).length?U:void 0}return this._map.get($)}has($){return this._map.has($)}}function PV(){return new SR}var cs,vR,hR,d6;var OG=m(()=>{vR=Symbol("ZodOutput"),hR=Symbol("ZodInput");(cs=globalThis).__zod_globalRegistry??(cs.__zod_globalRegistry=PV());d6=globalThis.__zod_globalRegistry});function gR($,Y){return new $({type:"string",...u0(Y)})}function yR($,Y){return new $({type:"string",coerce:!0,...u0(Y)})}function jV($,Y){return new $({type:"string",format:"email",check:"string_format",abort:!1,...u0(Y)})}function wG($,Y){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...u0(Y)})}function TV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...u0(Y)})}function EV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...u0(Y)})}function CV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...u0(Y)})}function RV($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...u0(Y)})}function MG($,Y){return new $({type:"string",format:"url",check:"string_format",abort:!1,...u0(Y)})}function _V($,Y){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...u0(Y)})}function vV($,Y){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...u0(Y)})}function hV($,Y){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...u0(Y)})}function SV($,Y){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...u0(Y)})}function gV($,Y){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...u0(Y)})}function yV($,Y){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...u0(Y)})}function kV($,Y){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...u0(Y)})}function xV($,Y){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...u0(Y)})}function fV($,Y){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...u0(Y)})}function kR($,Y){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...u0(Y)})}function uV($,Y){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...u0(Y)})}function bV($,Y){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...u0(Y)})}function iV($,Y){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...u0(Y)})}function nV($,Y){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...u0(Y)})}function cV($,Y){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...u0(Y)})}function pV($,Y){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...u0(Y)})}function fR($,Y){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...u0(Y)})}function uR($,Y){return new $({type:"string",format:"date",check:"string_format",...u0(Y)})}function bR($,Y){return new $({type:"string",format:"time",check:"string_format",precision:null,...u0(Y)})}function iR($,Y){return new $({type:"string",format:"duration",check:"string_format",...u0(Y)})}function nR($,Y){return new $({type:"number",checks:[],...u0(Y)})}function cR($,Y){return new $({type:"number",coerce:!0,checks:[],...u0(Y)})}function pR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...u0(Y)})}function dR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...u0(Y)})}function mR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...u0(Y)})}function lR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...u0(Y)})}function oR($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...u0(Y)})}function rR($,Y){return new $({type:"boolean",...u0(Y)})}function sR($,Y){return new $({type:"boolean",coerce:!0,...u0(Y)})}function aR($,Y){return new $({type:"bigint",...u0(Y)})}function tR($,Y){return new $({type:"bigint",coerce:!0,...u0(Y)})}function eR($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...u0(Y)})}function $_($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...u0(Y)})}function Y_($,Y){return new $({type:"symbol",...u0(Y)})}function z_($,Y){return new $({type:"undefined",...u0(Y)})}function U_($,Y){return new $({type:"null",...u0(Y)})}function Q_($){return new $({type:"any"})}function J_($){return new $({type:"unknown"})}function I_($,Y){return new $({type:"never",...u0(Y)})}function K_($,Y){return new $({type:"void",...u0(Y)})}function G_($,Y){return new $({type:"date",...u0(Y)})}function H_($,Y){return new $({type:"date",coerce:!0,...u0(Y)})}function W_($,Y){return new $({type:"nan",...u0(Y)})}function c5($,Y){return new XV({check:"less_than",...u0(Y),value:$,inclusive:!1})}function U$($,Y){return new XV({check:"less_than",...u0(Y),value:$,inclusive:!0})}function p5($,Y){return new ZV({check:"greater_than",...u0(Y),value:$,inclusive:!1})}function P8($,Y){return new ZV({check:"greater_than",...u0(Y),value:$,inclusive:!0})}function dV($){return p5(0,$)}function mV($){return c5(0,$)}function lV($){return U$(0,$)}function oV($){return P8(0,$)}function Z7($,Y){return new YE({check:"multiple_of",...u0(Y),value:$})}function q7($,Y){return new QE({check:"max_size",...u0(Y),maximum:$})}function d5($,Y){return new JE({check:"min_size",...u0(Y),minimum:$})}function vY($,Y){return new IE({check:"size_equals",...u0(Y),size:$})}function hY($,Y){return new KE({check:"max_length",...u0(Y),maximum:$})}function d9($,Y){return new GE({check:"min_length",...u0(Y),minimum:$})}function SY($,Y){return new HE({check:"length_equals",...u0(Y),length:$})}function $Q($,Y){return new WE({check:"string_format",format:"regex",...u0(Y),pattern:$})}function YQ($){return new XE({check:"string_format",format:"lowercase",...u0($)})}function zQ($){return new ZE({check:"string_format",format:"uppercase",...u0($)})}function UQ($,Y){return new qE({check:"string_format",format:"includes",...u0(Y),includes:$})}function QQ($,Y){return new VE({check:"string_format",format:"starts_with",...u0(Y),prefix:$})}function JQ($,Y){return new LE({check:"string_format",format:"ends_with",...u0(Y),suffix:$})}function rV($,Y,z){return new FE({check:"property",property:$,schema:Y,...u0(z)})}function IQ($,Y){return new OE({check:"mime_type",mime:$,...u0(Y)})}function z5($){return new wE({check:"overwrite",tx:$})}function KQ($){return z5((Y)=>Y.normalize($))}function GQ(){return z5(($)=>$.trim())}function HQ(){return z5(($)=>$.toLowerCase())}function WQ(){return z5(($)=>$.toUpperCase())}function XQ(){return z5(($)=>ZT($))}function X_($,Y,z){return new $({type:"array",element:Y,...u0(z)})}function Gf0($,Y,z){return new $({type:"union",options:Y,...u0(z)})}function Hf0($,Y,z){return new $({type:"union",options:Y,inclusive:!1,...u0(z)})}function Wf0($,Y,z,U){return new $({type:"union",options:z,discriminator:Y,...u0(U)})}function Xf0($,Y,z){return new $({type:"intersection",left:Y,right:z})}function Zf0($,Y,z,U){let Q=z instanceof V1;return new $({type:"tuple",items:Y,rest:Q?z:null,...u0(Q?U:z)})}function qf0($,Y,z,U){return new $({type:"record",keyType:Y,valueType:z,...u0(U)})}function Vf0($,Y,z,U){return new $({type:"map",keyType:Y,valueType:z,...u0(U)})}function Lf0($,Y,z){return new $({type:"set",valueType:Y,...u0(z)})}function Ff0($,Y,z){let U=Array.isArray(Y)?Object.fromEntries(Y.map((Q)=>[Q,Q])):Y;return new $({type:"enum",entries:U,...u0(z)})}function Of0($,Y,z){return new $({type:"enum",entries:Y,...u0(z)})}function wf0($,Y,z){return new $({type:"literal",values:Array.isArray(Y)?Y:[Y],...u0(z)})}function Z_($,Y){return new $({type:"file",...u0(Y)})}function Mf0($,Y){return new $({type:"transform",transform:Y})}function Nf0($,Y){return new $({type:"optional",innerType:Y})}function Df0($,Y){return new $({type:"nullable",innerType:Y})}function Af0($,Y,z){return new $({type:"default",innerType:Y,get defaultValue(){return typeof z==="function"?z():VT(z)}})}function Bf0($,Y,z){return new $({type:"nonoptional",innerType:Y,...u0(z)})}function Pf0($,Y){return new $({type:"success",innerType:Y})}function jf0($,Y,z){return new $({type:"catch",innerType:Y,catchValue:typeof z==="function"?z:()=>z})}function Tf0($,Y,z){return new $({type:"pipe",in:Y,out:z})}function Ef0($,Y){return new $({type:"readonly",innerType:Y})}function Cf0($,Y,z){return new $({type:"template_literal",parts:Y,...u0(z)})}function Rf0($,Y){return new $({type:"lazy",getter:Y})}function _f0($,Y){return new $({type:"promise",innerType:Y})}function q_($,Y,z){let U=u0(z);return U.abort??(U.abort=!0),new $({type:"custom",check:"custom",fn:Y,...U})}function V_($,Y,z){return new $({type:"custom",check:"custom",fn:Y,...u0(z)})}function L_($,Y){let z=ps((U)=>{return U.addIssue=(Q)=>{if(typeof Q==="string")U.issues.push(lU(Q,U.value,z._zod.def));else{let J=Q;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=U.value),J.inst??(J.inst=z),J.continue??(J.continue=!z._zod.def.abort),U.issues.push(lU(J))}},$(U.value,U)},Y);return z}function ps($,Y){let z=new F4({check:"custom",...u0(Y)});return z._zod.check=$,z}function F_($){let Y=new F4({check:"describe"});return Y._zod.onattach=[(z)=>{let U=d6.get(z)??{};d6.add(z,{...U,description:$})}],Y._zod.check=()=>{},Y}function O_($){let Y=new F4({check:"meta"});return Y._zod.onattach=[(z)=>{let U=d6.get(z)??{};d6.add(z,{...U,...$})}],Y._zod.check=()=>{},Y}function w_($,Y){let z=u0(Y),U=z.truthy??["true","1","yes","on","y","enabled"],Q=z.falsy??["false","0","no","off","n","disabled"];if(z.case!=="sensitive")U=U.map((q)=>typeof q==="string"?q.toLowerCase():q),Q=Q.map((q)=>typeof q==="string"?q.toLowerCase():q);let J=new Set(U),I=new Set(Q),K=$.Codec??XG,G=$.Boolean??HG,W=new($.String??_Y)({type:"string",error:z.error}),X=new G({type:"boolean",error:z.error}),Z=new K({type:"pipe",in:W,out:X,transform:(q,V)=>{let F=q;if(z.case!=="sensitive")F=F.toLowerCase();if(J.has(F))return!0;else if(I.has(F))return!1;else return V.issues.push({code:"invalid_value",expected:"stringbool",values:[...J,...I],input:V.value,inst:Z,continue:!1}),{}},reverseTransform:(q,V)=>{if(q===!0)return U[0]||"true";else return Q[0]||"false"},error:z.error});return Z}function ZQ($,Y,z,U={}){let Q=u0(U),J={...u0(U),check:"string_format",type:"string",format:Y,fn:typeof z==="function"?z:(K)=>z.test(K),...Q};if(z instanceof RegExp)J.pattern=z;return new $(J)}var xR;var ds=m(()=>{qV();OG();vC();Y1();xR={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function V7($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??d6,target:Y,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function J4($,Y,z={path:[],schemaPath:[]}){var U;let Q=$._zod.def,J=Y.seen.get($);if(J){if(J.count++,z.schemaPath.includes($))J.cycle=z.path;return J.schema}let I={schema:{},count:1,cycle:void 0,path:z.path};Y.seen.set($,I);let K=$._zod.toJSONSchema?.();if(K)I.schema=K;else{let W={...z,schemaPath:[...z.schemaPath,$],path:z.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(Y,I.schema,W);else{let Z=I.schema,q=Y.processors[Q.type];if(!q)throw Error(`[toJSONSchema]: Non-representable type encountered: ${Q.type}`);q($,Y,Z,W)}let X=$._zod.parent;if(X){if(!I.ref)I.ref=X;J4(X,Y,W),Y.seen.get(X).isParent=!0}}let G=Y.metadataRegistry.get($);if(G)Object.assign(I.schema,G);if(Y.io==="input"&&j8($))delete I.schema.examples,delete I.schema.default;if(Y.io==="input"&&"_prefault"in I.schema)(U=I.schema).default??(U.default=I.schema._prefault);return delete I.schema._prefault,Y.seen.get($).schema}function L7($,Y){let z=$.seen.get(Y);if(!z)throw Error("Unprocessed schema. This is a bug in Zod.");let U=new Map;for(let I of $.seen.entries()){let K=$.metadataRegistry.get(I[0])?.id;if(K){let G=U.get(K);if(G&&G!==I[0])throw Error(`Duplicate schema id "${K}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);U.set(K,I[0])}}let Q=(I)=>{let K=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let X=$.external.registry.get(I[0])?.id,Z=$.external.uri??((V)=>V);if(X)return{ref:Z(X)};let q=I[1].defId??I[1].schema.id??`schema${$.counter++}`;return I[1].defId=q,{defId:q,ref:`${Z("__shared")}#/${K}/${q}`}}if(I[1]===z)return{ref:"#"};let H=`${"#"}/${K}/`,W=I[1].schema.id??`__schema${$.counter++}`;return{defId:W,ref:H+W}},J=(I)=>{if(I[1].schema.$ref)return;let K=I[1],{ref:G,defId:H}=Q(I);if(K.def={...K.schema},H)K.defId=H;let W=K.schema;for(let X in W)delete W[X];W.$ref=G};if($.cycles==="throw")for(let I of $.seen.entries()){let K=I[1];if(K.cycle)throw Error(`Cycle detected: #/${K.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let I of $.seen.entries()){let K=I[1];if(Y===I[0]){J(I);continue}if($.external){let H=$.external.registry.get(I[0])?.id;if(Y!==I[0]&&H){J(I);continue}}if($.metadataRegistry.get(I[0])?.id){J(I);continue}if(K.cycle){J(I);continue}if(K.count>1){if($.reused==="ref"){J(I);continue}}}}function F7($,Y){let z=$.seen.get(Y);if(!z)throw Error("Unprocessed schema. This is a bug in Zod.");let U=(K)=>{let G=$.seen.get(K);if(G.ref===null)return;let H=G.def??G.schema,W={...H},X=G.ref;if(G.ref=null,X){U(X);let q=$.seen.get(X),V=q.schema;if(V.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))H.allOf=H.allOf??[],H.allOf.push(V);else Object.assign(H,V);if(Object.assign(H,W),K._zod.parent===X)for(let w in H){if(w==="$ref"||w==="allOf")continue;if(!(w in W))delete H[w]}if(V.$ref&&q.def)for(let w in H){if(w==="$ref"||w==="allOf")continue;if(w in q.def&&JSON.stringify(H[w])===JSON.stringify(q.def[w]))delete H[w]}}let Z=K._zod.parent;if(Z&&Z!==X){U(Z);let q=$.seen.get(Z);if(q?.schema.$ref){if(H.$ref=q.schema.$ref,q.def)for(let V in H){if(V==="$ref"||V==="allOf")continue;if(V in q.def&&JSON.stringify(H[V])===JSON.stringify(q.def[V]))delete H[V]}}}$.override({zodSchema:K,jsonSchema:H,path:G.path??[]})};for(let K of[...$.seen.entries()].reverse())U(K[0]);let Q={};if($.target==="draft-2020-12")Q.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")Q.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")Q.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let K=$.external.registry.get(Y)?.id;if(!K)throw Error("Schema is missing an `id` property");Q.$id=$.external.uri(K)}Object.assign(Q,z.def??z.schema);let J=$.metadataRegistry.get(Y)?.id;if(J!==void 0&&Q.id===J)delete Q.id;let I=$.external?.defs??{};for(let K of $.seen.entries()){let G=K[1];if(G.def&&G.defId){if(G.def.id===G.defId)delete G.def.id;I[G.defId]=G.def}}if($.external);else if(Object.keys(I).length>0)if($.target==="draft-2020-12")Q.$defs=I;else Q.definitions=I;try{let K=JSON.parse(JSON.stringify(Q));return Object.defineProperty(K,"~standard",{value:{...Y["~standard"],jsonSchema:{input:qQ(Y,"input",$.processors),output:qQ(Y,"output",$.processors)}},enumerable:!1,writable:!1}),K}catch(K){throw Error("Error converting schema to JSON.")}}function j8($,Y){let z=Y??{seen:new Set};if(z.seen.has($))return!1;z.seen.add($);let U=$._zod.def;if(U.type==="transform")return!0;if(U.type==="array")return j8(U.element,z);if(U.type==="set")return j8(U.valueType,z);if(U.type==="lazy")return j8(U.getter(),z);if(U.type==="promise"||U.type==="optional"||U.type==="nonoptional"||U.type==="nullable"||U.type==="readonly"||U.type==="default"||U.type==="prefault")return j8(U.innerType,z);if(U.type==="intersection")return j8(U.left,z)||j8(U.right,z);if(U.type==="record"||U.type==="map")return j8(U.keyType,z)||j8(U.valueType,z);if(U.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return j8(U.in,z)||j8(U.out,z)}if(U.type==="object"){for(let Q in U.shape)if(j8(U.shape[Q],z))return!0;return!1}if(U.type==="union"){for(let Q of U.options)if(j8(Q,z))return!0;return!1}if(U.type==="tuple"){for(let Q of U.items)if(j8(Q,z))return!0;if(U.rest&&j8(U.rest,z))return!0;return!1}return!1}var M_=($,Y={})=>(z)=>{let U=V7({...z,processors:Y});return J4($,U),L7(U,$),F7(U,$)},qQ=($,Y,z={})=>(U)=>{let{libraryOptions:Q,target:J}=U??{},I=V7({...Q??{},target:J,io:Y,processors:z});return J4($,I),L7(I,$),F7(I,$)};var NG=m(()=>{OG()});function gY($,Y){if("_idmap"in $){let U=$,Q=V7({...Y,processors:sV}),J={};for(let G of U._idmap.entries()){let[H,W]=G;J4(W,Q)}let I={},K={registry:U,uri:Y?.uri,defs:J};Q.external=K;for(let G of U._idmap.entries()){let[H,W]=G;L7(Q,W),I[H]=F7(Q,W)}if(Object.keys(J).length>0){let G=Q.target==="draft-2020-12"?"$defs":"definitions";I.__shared={[G]:J}}return{schemas:I}}let z=V7({...Y,processors:sV});return J4($,z),L7(z,$),F7(z,$)}var vf0,N_=($,Y,z,U)=>{let Q=z;Q.type="string";let{minimum:J,maximum:I,format:K,patterns:G,contentEncoding:H}=$._zod.bag;if(typeof J==="number")Q.minLength=J;if(typeof I==="number")Q.maxLength=I;if(K){if(Q.format=vf0[K]??K,Q.format==="")delete Q.format;if(K==="time")delete Q.format}if(H)Q.contentEncoding=H;if(G&&G.size>0){let W=[...G];if(W.length===1)Q.pattern=W[0].source;else if(W.length>1)Q.allOf=[...W.map((X)=>({...Y.target==="draft-07"||Y.target==="draft-04"||Y.target==="openapi-3.0"?{type:"string"}:{},pattern:X.source}))]}},D_=($,Y,z,U)=>{let Q=z,{minimum:J,maximum:I,format:K,multipleOf:G,exclusiveMaximum:H,exclusiveMinimum:W}=$._zod.bag;if(typeof K==="string"&&K.includes("int"))Q.type="integer";else Q.type="number";let X=typeof W==="number"&&W>=(J??Number.NEGATIVE_INFINITY),Z=typeof H==="number"&&H<=(I??Number.POSITIVE_INFINITY),q=Y.target==="draft-04"||Y.target==="openapi-3.0";if(X)if(q)Q.minimum=W,Q.exclusiveMinimum=!0;else Q.exclusiveMinimum=W;else if(typeof J==="number")Q.minimum=J;if(Z)if(q)Q.maximum=H,Q.exclusiveMaximum=!0;else Q.exclusiveMaximum=H;else if(typeof I==="number")Q.maximum=I;if(typeof G==="number")Q.multipleOf=G},A_=($,Y,z,U)=>{z.type="boolean"},B_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},P_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},j_=($,Y,z,U)=>{if(Y.target==="openapi-3.0")z.type="string",z.nullable=!0,z.enum=[null];else z.type="null"},T_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},E_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},C_=($,Y,z,U)=>{z.not={}},R_=($,Y,z,U)=>{},__=($,Y,z,U)=>{},v_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},h_=($,Y,z,U)=>{let Q=$._zod.def,J=tK(Q.entries);if(J.every((I)=>typeof I==="number"))z.type="number";if(J.every((I)=>typeof I==="string"))z.type="string";z.enum=J},S_=($,Y,z,U)=>{let Q=$._zod.def,J=[];for(let I of Q.values)if(I===void 0){if(Y.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof I==="bigint")if(Y.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else J.push(Number(I));else J.push(I);if(J.length===0);else if(J.length===1){let I=J[0];if(z.type=I===null?"null":typeof I,Y.target==="draft-04"||Y.target==="openapi-3.0")z.enum=[I];else z.const=I}else{if(J.every((I)=>typeof I==="number"))z.type="number";if(J.every((I)=>typeof I==="string"))z.type="string";if(J.every((I)=>typeof I==="boolean"))z.type="boolean";if(J.every((I)=>I===null))z.type="null";z.enum=J}},g_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},y_=($,Y,z,U)=>{let Q=z,J=$._zod.pattern;if(!J)throw Error("Pattern not found in template literal");Q.type="string",Q.pattern=J.source},k_=($,Y,z,U)=>{let Q=z,J={type:"string",format:"binary",contentEncoding:"binary"},{minimum:I,maximum:K,mime:G}=$._zod.bag;if(I!==void 0)J.minLength=I;if(K!==void 0)J.maxLength=K;if(G)if(G.length===1)J.contentMediaType=G[0],Object.assign(Q,J);else Object.assign(Q,J),Q.anyOf=G.map((H)=>({contentMediaType:H}));else Object.assign(Q,J)},x_=($,Y,z,U)=>{z.type="boolean"},f_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},u_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},b_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},i_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},n_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},c_=($,Y,z,U)=>{let Q=z,J=$._zod.def,{minimum:I,maximum:K}=$._zod.bag;if(typeof I==="number")Q.minItems=I;if(typeof K==="number")Q.maxItems=K;Q.type="array",Q.items=J4(J.element,Y,{...U,path:[...U.path,"items"]})},p_=($,Y,z,U)=>{let Q=z,J=$._zod.def;Q.type="object",Q.properties={};let I=J.shape;for(let H in I)Q.properties[H]=J4(I[H],Y,{...U,path:[...U.path,"properties",H]});let K=new Set(Object.keys(I)),G=new Set([...K].filter((H)=>{let W=J.shape[H]._zod;if(Y.io==="input")return W.optin===void 0;else return W.optout===void 0}));if(G.size>0)Q.required=Array.from(G);if(J.catchall?._zod.def.type==="never")Q.additionalProperties=!1;else if(!J.catchall){if(Y.io==="output")Q.additionalProperties=!1}else if(J.catchall)Q.additionalProperties=J4(J.catchall,Y,{...U,path:[...U.path,"additionalProperties"]})},aV=($,Y,z,U)=>{let Q=$._zod.def,J=Q.inclusive===!1,I=Q.options.map((K,G)=>J4(K,Y,{...U,path:[...U.path,J?"oneOf":"anyOf",G]}));if(J)z.oneOf=I;else z.anyOf=I},d_=($,Y,z,U)=>{let Q=$._zod.def,J=J4(Q.left,Y,{...U,path:[...U.path,"allOf",0]}),I=J4(Q.right,Y,{...U,path:[...U.path,"allOf",1]}),K=(H)=>("allOf"in H)&&Object.keys(H).length===1,G=[...K(J)?J.allOf:[J],...K(I)?I.allOf:[I]];z.allOf=G},m_=($,Y,z,U)=>{let Q=z,J=$._zod.def;Q.type="array";let I=Y.target==="draft-2020-12"?"prefixItems":"items",K=Y.target==="draft-2020-12"?"items":Y.target==="openapi-3.0"?"items":"additionalItems",G=J.items.map((Z,q)=>J4(Z,Y,{...U,path:[...U.path,I,q]})),H=J.rest?J4(J.rest,Y,{...U,path:[...U.path,K,...Y.target==="openapi-3.0"?[J.items.length]:[]]}):null;if(Y.target==="draft-2020-12"){if(Q.prefixItems=G,H)Q.items=H}else if(Y.target==="openapi-3.0"){if(Q.items={anyOf:G},H)Q.items.anyOf.push(H);if(Q.minItems=G.length,!H)Q.maxItems=G.length}else if(Q.items=G,H)Q.additionalItems=H;let{minimum:W,maximum:X}=$._zod.bag;if(typeof W==="number")Q.minItems=W;if(typeof X==="number")Q.maxItems=X},l_=($,Y,z,U)=>{let Q=z,J=$._zod.def;Q.type="object";let I=J.keyType,G=I._zod.bag?.patterns;if(J.mode==="loose"&&G&&G.size>0){let W=J4(J.valueType,Y,{...U,path:[...U.path,"patternProperties","*"]});Q.patternProperties={};for(let X of G)Q.patternProperties[X.source]=W}else{if(Y.target==="draft-07"||Y.target==="draft-2020-12")Q.propertyNames=J4(J.keyType,Y,{...U,path:[...U.path,"propertyNames"]});Q.additionalProperties=J4(J.valueType,Y,{...U,path:[...U.path,"additionalProperties"]})}let H=I._zod.values;if(H){let W=[...H].filter((X)=>typeof X==="string"||typeof X==="number");if(W.length>0)Q.required=W}},o_=($,Y,z,U)=>{let Q=$._zod.def,J=J4(Q.innerType,Y,U),I=Y.seen.get($);if(Y.target==="openapi-3.0")I.ref=Q.innerType,z.nullable=!0;else z.anyOf=[J,{type:"null"}]},r_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType},s_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType,z.default=JSON.parse(JSON.stringify(Q.defaultValue))},a_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);if(J.ref=Q.innerType,Y.io==="input")z._prefault=JSON.parse(JSON.stringify(Q.defaultValue))},t_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType;let I;try{I=Q.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}z.default=I},e_=($,Y,z,U)=>{let Q=$._zod.def,J=Q.in._zod.traits.has("$ZodTransform"),I=Y.io==="input"?J?Q.out:Q.in:Q.out;J4(I,Y,U);let K=Y.seen.get($);K.ref=I},$v=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType,z.readOnly=!0},Yv=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType},tV=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType},zv=($,Y,z,U)=>{let Q=$._zod.innerType;J4(Q,Y,U);let J=Y.seen.get($);J.ref=Q},sV;var DG=m(()=>{NG();Y1();vf0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},sV={string:N_,number:D_,boolean:A_,bigint:B_,symbol:P_,null:j_,undefined:T_,void:E_,never:C_,any:R_,unknown:__,date:v_,enum:h_,literal:S_,nan:g_,template_literal:y_,file:k_,success:x_,custom:f_,function:u_,transform:b_,map:i_,set:n_,array:c_,object:p_,union:aV,intersection:d_,tuple:m_,record:l_,nullable:o_,nonoptional:r_,default:s_,prefault:a_,catch:t_,pipe:e_,readonly:$v,promise:Yv,optional:tV,lazy:zv}});class Uv{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";this.ctx=V7({processors:sV,target:Y,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,Y={path:[],schemaPath:[]}){return J4($,this.ctx,Y)}emit($,Y){if(Y){if(Y.cycles)this.ctx.cycles=Y.cycles;if(Y.reused)this.ctx.reused=Y.reused;if(Y.external)this.ctx.external=Y.external}L7(this.ctx,$);let z=F7(this.ctx,$),{"~standard":U,...Q}=z;return Q}}var ms=m(()=>{DG();NG()});var ls={};var os=()=>{};var m9={};D8(m9,{version:()=>ME,util:()=>y0,treeifyError:()=>NT,toJSONSchema:()=>gY,toDotPath:()=>wr,safeParseAsync:()=>PT,safeParse:()=>BT,safeEncodeAsync:()=>yk0,safeEncode:()=>Sk0,safeDecodeAsync:()=>kk0,safeDecode:()=>gk0,registry:()=>PV,regexes:()=>z$,process:()=>J4,prettifyError:()=>DT,parseAsync:()=>$V,parse:()=>eq,meta:()=>O_,locales:()=>FG,isValidJWT:()=>br,isValidBase64URL:()=>ur,isValidBase64:()=>nE,initializeContext:()=>V7,globalRegistry:()=>d6,globalConfig:()=>jY,formatError:()=>JG,flattenError:()=>QG,finalize:()=>F7,extractDefs:()=>L7,encodeAsync:()=>vk0,encode:()=>Rk0,describe:()=>F_,decodeAsync:()=>hk0,decode:()=>_k0,createToJSONSchemaMethod:()=>M_,createStandardJSONSchemaMethod:()=>qQ,config:()=>a4,clone:()=>A8,_xor:()=>Hf0,_xid:()=>yV,_void:()=>K_,_uuidv7:()=>RV,_uuidv6:()=>CV,_uuidv4:()=>EV,_uuid:()=>TV,_url:()=>MG,_uppercase:()=>zQ,_unknown:()=>J_,_union:()=>Gf0,_undefined:()=>z_,_ulid:()=>gV,_uint64:()=>$_,_uint32:()=>oR,_tuple:()=>Zf0,_trim:()=>GQ,_transform:()=>Mf0,_toUpperCase:()=>WQ,_toLowerCase:()=>HQ,_templateLiteral:()=>Cf0,_symbol:()=>Y_,_superRefine:()=>L_,_success:()=>Pf0,_stringbool:()=>w_,_stringFormat:()=>ZQ,_string:()=>gR,_startsWith:()=>QQ,_slugify:()=>XQ,_size:()=>vY,_set:()=>Lf0,_safeParseAsync:()=>aU,_safeParse:()=>sU,_safeEncodeAsync:()=>KV,_safeEncode:()=>JV,_safeDecodeAsync:()=>GV,_safeDecode:()=>IV,_regex:()=>$Q,_refine:()=>V_,_record:()=>qf0,_readonly:()=>Ef0,_property:()=>rV,_promise:()=>_f0,_positive:()=>dV,_pipe:()=>Tf0,_parseAsync:()=>rU,_parse:()=>oU,_overwrite:()=>z5,_optional:()=>Nf0,_number:()=>nR,_nullable:()=>Df0,_null:()=>U_,_normalize:()=>KQ,_nonpositive:()=>lV,_nonoptional:()=>Bf0,_nonnegative:()=>oV,_never:()=>I_,_negative:()=>mV,_nativeEnum:()=>Of0,_nanoid:()=>vV,_nan:()=>W_,_multipleOf:()=>Z7,_minSize:()=>d5,_minLength:()=>d9,_min:()=>P8,_mime:()=>IQ,_maxSize:()=>q7,_maxLength:()=>hY,_max:()=>U$,_map:()=>Vf0,_mac:()=>kR,_lte:()=>U$,_lt:()=>c5,_lowercase:()=>YQ,_literal:()=>wf0,_length:()=>SY,_lazy:()=>Rf0,_ksuid:()=>kV,_jwt:()=>pV,_isoTime:()=>bR,_isoDuration:()=>iR,_isoDateTime:()=>fR,_isoDate:()=>uR,_ipv6:()=>fV,_ipv4:()=>xV,_intersection:()=>Xf0,_int64:()=>eR,_int32:()=>lR,_int:()=>pR,_includes:()=>UQ,_guid:()=>wG,_gte:()=>P8,_gt:()=>p5,_float64:()=>mR,_float32:()=>dR,_file:()=>Z_,_enum:()=>Ff0,_endsWith:()=>JQ,_encodeAsync:()=>UV,_encode:()=>YV,_emoji:()=>_V,_email:()=>jV,_e164:()=>cV,_discriminatedUnion:()=>Wf0,_default:()=>Af0,_decodeAsync:()=>QV,_decode:()=>zV,_date:()=>G_,_custom:()=>q_,_cuid2:()=>SV,_cuid:()=>hV,_coercedString:()=>yR,_coercedNumber:()=>cR,_coercedDate:()=>H_,_coercedBoolean:()=>sR,_coercedBigint:()=>tR,_cidrv6:()=>bV,_cidrv4:()=>uV,_check:()=>ps,_catch:()=>jf0,_boolean:()=>rR,_bigint:()=>aR,_base64url:()=>nV,_base64:()=>iV,_array:()=>X_,_any:()=>Q_,TimePrecision:()=>xR,NEVER:()=>sK,JSONSchemaGenerator:()=>Uv,JSONSchema:()=>ls,Doc:()=>VV,$output:()=>vR,$input:()=>hR,$constructor:()=>W0,$brand:()=>HT,$ZodXor:()=>IC,$ZodXID:()=>vE,$ZodVoid:()=>zC,$ZodUnknown:()=>$C,$ZodUnion:()=>WG,$ZodUndefined:()=>aE,$ZodUUID:()=>BE,$ZodURL:()=>jE,$ZodULID:()=>_E,$ZodType:()=>V1,$ZodTuple:()=>DV,$ZodTransform:()=>LC,$ZodTemplateLiteral:()=>TC,$ZodSymbol:()=>sE,$ZodSuccess:()=>DC,$ZodStringFormat:()=>Z4,$ZodString:()=>_Y,$ZodSet:()=>XC,$ZodRegistry:()=>SR,$ZodRecord:()=>HC,$ZodRealError:()=>u8,$ZodReadonly:()=>jC,$ZodPromise:()=>CC,$ZodPreprocess:()=>PC,$ZodPrefault:()=>MC,$ZodPipe:()=>BV,$ZodOptional:()=>AV,$ZodObjectJIT:()=>JC,$ZodObject:()=>cr,$ZodNumberFormat:()=>oE,$ZodNumber:()=>MV,$ZodNullable:()=>OC,$ZodNull:()=>tE,$ZodNonOptional:()=>NC,$ZodNever:()=>YC,$ZodNanoID:()=>EE,$ZodNaN:()=>BC,$ZodMap:()=>WC,$ZodMAC:()=>uE,$ZodLiteral:()=>qC,$ZodLazy:()=>RC,$ZodKSUID:()=>hE,$ZodJWT:()=>mE,$ZodIntersection:()=>GC,$ZodISOTime:()=>yE,$ZodISODuration:()=>kE,$ZodISODateTime:()=>SE,$ZodISODate:()=>gE,$ZodIPv6:()=>fE,$ZodIPv4:()=>xE,$ZodGUID:()=>AE,$ZodFunction:()=>EC,$ZodFile:()=>VC,$ZodExactOptional:()=>FC,$ZodError:()=>UG,$ZodEnum:()=>ZC,$ZodEncodeError:()=>TY,$ZodEmoji:()=>TE,$ZodEmail:()=>PE,$ZodE164:()=>dE,$ZodDiscriminatedUnion:()=>KC,$ZodDefault:()=>wC,$ZodDate:()=>UC,$ZodCustomStringFormat:()=>lE,$ZodCustom:()=>_C,$ZodCodec:()=>XG,$ZodCheckUpperCase:()=>ZE,$ZodCheckStringFormat:()=>tU,$ZodCheckStartsWith:()=>VE,$ZodCheckSizeEquals:()=>IE,$ZodCheckRegex:()=>WE,$ZodCheckProperty:()=>FE,$ZodCheckOverwrite:()=>wE,$ZodCheckNumberFormat:()=>zE,$ZodCheckMultipleOf:()=>YE,$ZodCheckMinSize:()=>JE,$ZodCheckMinLength:()=>GE,$ZodCheckMimeType:()=>OE,$ZodCheckMaxSize:()=>QE,$ZodCheckMaxLength:()=>KE,$ZodCheckLowerCase:()=>XE,$ZodCheckLessThan:()=>XV,$ZodCheckLengthEquals:()=>HE,$ZodCheckIncludes:()=>qE,$ZodCheckGreaterThan:()=>ZV,$ZodCheckEndsWith:()=>LE,$ZodCheckBigIntFormat:()=>UE,$ZodCheck:()=>F4,$ZodCatch:()=>AC,$ZodCUID2:()=>RE,$ZodCUID:()=>CE,$ZodCIDRv6:()=>iE,$ZodCIDRv4:()=>bE,$ZodBoolean:()=>HG,$ZodBigIntFormat:()=>rE,$ZodBigInt:()=>NV,$ZodBase64URL:()=>pE,$ZodBase64:()=>cE,$ZodAsyncError:()=>n5,$ZodArray:()=>QC,$ZodAny:()=>eE});var Q$=m(()=>{Y1();WV();_R();DG();ms();os();EY();jT();AT();vC();qV();NE();OG();ds();NG()});var eV={};D8(eV,{uppercase:()=>zQ,trim:()=>GQ,toUpperCase:()=>WQ,toLowerCase:()=>HQ,startsWith:()=>QQ,slugify:()=>XQ,size:()=>vY,regex:()=>$Q,property:()=>rV,positive:()=>dV,overwrite:()=>z5,normalize:()=>KQ,nonpositive:()=>lV,nonnegative:()=>oV,negative:()=>mV,multipleOf:()=>Z7,minSize:()=>d5,minLength:()=>d9,mime:()=>IQ,maxSize:()=>q7,maxLength:()=>hY,lte:()=>U$,lt:()=>c5,lowercase:()=>YQ,length:()=>SY,includes:()=>UQ,gte:()=>P8,gt:()=>p5,endsWith:()=>JQ});var $L=m(()=>{Q$()});var J$={};D8(J$,{time:()=>Iv,duration:()=>Kv,datetime:()=>Qv,date:()=>Jv,ZodISOTime:()=>UL,ZodISODuration:()=>QL,ZodISODateTime:()=>YL,ZodISODate:()=>zL});function Qv($){return fR(YL,$)}function Jv($){return uR(zL,$)}function Iv($){return bR(UL,$)}function Kv($){return iR(QL,$)}var YL,zL,UL,QL;var AG=m(()=>{Q$();PG();YL=W0("ZodISODateTime",($,Y)=>{SE.init($,Y),q4.init($,Y)});zL=W0("ZodISODate",($,Y)=>{gE.init($,Y),q4.init($,Y)});UL=W0("ZodISOTime",($,Y)=>{yE.init($,Y),q4.init($,Y)});QL=W0("ZodISODuration",($,Y)=>{kE.init($,Y),q4.init($,Y)})});var rs=($,Y)=>{UG.init($,Y),$.name="ZodError",Object.defineProperties($,{format:{value:(z)=>JG($,z)},flatten:{value:(z)=>QG($,z)},addIssue:{value:(z)=>{$.issues.push(z),$.message=JSON.stringify($.issues,dU,2)}},addIssues:{value:(z)=>{$.issues.push(...z),$.message=JSON.stringify($.issues,dU,2)}},isEmpty:{get(){return $.issues.length===0}}})},Sf0,b8;var Gv=m(()=>{Q$();Q$();Y1();Sf0=W0("ZodError",rs),b8=W0("ZodError",rs,{Parent:Error})});var Hv,Wv,jG,Xv,Zv,qv,Vv,Lv,Fv,Ov,wv,Mv;var Nv=m(()=>{Q$();Gv();Hv=oU(b8),Wv=rU(b8),jG=sU(b8),Xv=aU(b8),Zv=YV(b8),qv=zV(b8),Vv=UV(b8),Lv=QV(b8),Fv=JV(b8),Ov=IV(b8),wv=KV(b8),Mv=GV(b8)});var BG={};D8(BG,{xor:()=>ka,xid:()=>Ga,void:()=>ha,uuidv7:()=>Ya,uuidv6:()=>$a,uuidv4:()=>es,uuid:()=>ts,url:()=>OQ,unknown:()=>a0,union:()=>o0,undefined:()=>va,ulid:()=>Ka,uint64:()=>Ra,uint32:()=>Ta,tuple:()=>gv,transform:()=>CL,templateLiteral:()=>oa,symbol:()=>_a,superRefine:()=>Ih,success:()=>pa,stringbool:()=>zt,stringFormat:()=>Ma,string:()=>R,strictObject:()=>ya,set:()=>ba,refine:()=>Jh,record:()=>p0,readonly:()=>$h,promise:()=>ra,preprocess:()=>l9,prefault:()=>mv,pipe:()=>IL,partialRecord:()=>xa,optional:()=>t0,object:()=>z0,number:()=>R0,nullish:()=>ca,nullable:()=>EG,null:()=>l5,nonoptional:()=>lv,never:()=>EL,nativeEnum:()=>ia,nanoid:()=>Qa,nan:()=>da,meta:()=>$t,map:()=>ua,mac:()=>Xa,looseRecord:()=>fa,looseObject:()=>Q1,literal:()=>L0,lazy:()=>w7,ksuid:()=>Ha,keyof:()=>ga,jwt:()=>wa,json:()=>Ut,ipv6:()=>Za,ipv4:()=>Wa,invertCodec:()=>la,intersection:()=>U5,int64:()=>Ca,int32:()=>ja,int:()=>JL,instanceof:()=>Yt,httpUrl:()=>za,hostname:()=>Na,hex:()=>Da,hash:()=>Aa,guid:()=>as,function:()=>sa,float64:()=>Pa,float32:()=>Ba,file:()=>na,exactOptional:()=>iv,enum:()=>W1,emoji:()=>Ua,email:()=>HL,e164:()=>Oa,discriminatedUnion:()=>O7,describe:()=>ea,date:()=>Sa,custom:()=>ta,cuid2:()=>Ia,cuid:()=>Ja,codec:()=>ma,cidrv6:()=>Va,cidrv4:()=>qa,check:()=>aa,catch:()=>sv,boolean:()=>m0,bigint:()=>Ea,base64url:()=>Fa,base64:()=>La,array:()=>V0,any:()=>TL,_function:()=>sa,_default:()=>pv,_ZodString:()=>KL,ZodXor:()=>_v,ZodXID:()=>LL,ZodVoid:()=>Cv,ZodUnknown:()=>Tv,ZodUnion:()=>hG,ZodUndefined:()=>Bv,ZodUUID:()=>m5,ZodURL:()=>RG,ZodULID:()=>VL,ZodType:()=>M1,ZodTuple:()=>Sv,ZodTransform:()=>uv,ZodTemplateLiteral:()=>Yh,ZodSymbol:()=>Av,ZodSuccess:()=>ov,ZodStringFormat:()=>q4,ZodString:()=>FQ,ZodSet:()=>kv,ZodRecord:()=>VQ,ZodReadonly:()=>ev,ZodPromise:()=>Uh,ZodPreprocess:()=>tv,ZodPrefault:()=>dv,ZodPipe:()=>SG,ZodOptional:()=>RL,ZodObject:()=>vG,ZodNumberFormat:()=>yY,ZodNumber:()=>MQ,ZodNullable:()=>nv,ZodNull:()=>Pv,ZodNonOptional:()=>_L,ZodNever:()=>Ev,ZodNanoID:()=>XL,ZodNaN:()=>av,ZodMap:()=>yv,ZodMAC:()=>Dv,ZodLiteral:()=>xv,ZodLazy:()=>zh,ZodKSUID:()=>FL,ZodJWT:()=>PL,ZodIntersection:()=>hv,ZodIPv6:()=>wL,ZodIPv4:()=>OL,ZodGUID:()=>TG,ZodFunction:()=>Qh,ZodFile:()=>fv,ZodExactOptional:()=>bv,ZodEnum:()=>LQ,ZodEmoji:()=>WL,ZodEmail:()=>GL,ZodE164:()=>BL,ZodDiscriminatedUnion:()=>vv,ZodDefault:()=>cv,ZodDate:()=>_G,ZodCustomStringFormat:()=>wQ,ZodCustom:()=>yG,ZodCodec:()=>gG,ZodCatch:()=>rv,ZodCUID2:()=>qL,ZodCUID:()=>ZL,ZodCIDRv6:()=>NL,ZodCIDRv4:()=>ML,ZodBoolean:()=>NQ,ZodBigIntFormat:()=>jL,ZodBigInt:()=>DQ,ZodBase64URL:()=>AL,ZodBase64:()=>DL,ZodArray:()=>Rv,ZodAny:()=>jv});function CG($,Y,z){let U=Object.getPrototypeOf($),Q=ss.get(U);if(!Q)Q=new Set,ss.set(U,Q);if(Q.has(Y))return;Q.add(Y);for(let J in z){let I=z[J];Object.defineProperty(U,J,{configurable:!0,enumerable:!1,get(){let K=I.bind(this);return Object.defineProperty(this,J,{configurable:!0,writable:!0,enumerable:!0,value:K}),K},set(K){Object.defineProperty(this,J,{configurable:!0,writable:!0,enumerable:!0,value:K})}})}}function R($){return gR(FQ,$)}function HL($){return jV(GL,$)}function as($){return wG(TG,$)}function ts($){return TV(m5,$)}function es($){return EV(m5,$)}function $a($){return CV(m5,$)}function Ya($){return RV(m5,$)}function OQ($){return MG(RG,$)}function za($){return MG(RG,{protocol:z$.httpProtocol,hostname:z$.domain,...y0.normalizeParams($)})}function Ua($){return _V(WL,$)}function Qa($){return vV(XL,$)}function Ja($){return hV(ZL,$)}function Ia($){return SV(qL,$)}function Ka($){return gV(VL,$)}function Ga($){return yV(LL,$)}function Ha($){return kV(FL,$)}function Wa($){return xV(OL,$)}function Xa($){return kR(Dv,$)}function Za($){return fV(wL,$)}function qa($){return uV(ML,$)}function Va($){return bV(NL,$)}function La($){return iV(DL,$)}function Fa($){return nV(AL,$)}function Oa($){return cV(BL,$)}function wa($){return pV(PL,$)}function Ma($,Y,z={}){return ZQ(wQ,$,Y,z)}function Na($){return ZQ(wQ,"hostname",z$.hostname,$)}function Da($){return ZQ(wQ,"hex",z$.hex,$)}function Aa($,Y){let z=Y?.enc??"hex",U=`${$}_${z}`,Q=z$[U];if(!Q)throw Error(`Unrecognized hash format: ${U}`);return ZQ(wQ,U,Q,Y)}function R0($){return nR(MQ,$)}function JL($){return pR(yY,$)}function Ba($){return dR(yY,$)}function Pa($){return mR(yY,$)}function ja($){return lR(yY,$)}function Ta($){return oR(yY,$)}function m0($){return rR(NQ,$)}function Ea($){return aR(DQ,$)}function Ca($){return eR(jL,$)}function Ra($){return $_(jL,$)}function _a($){return Y_(Av,$)}function va($){return z_(Bv,$)}function l5($){return U_(Pv,$)}function TL(){return Q_(jv)}function a0(){return J_(Tv)}function EL($){return I_(Ev,$)}function ha($){return K_(Cv,$)}function Sa($){return G_(_G,$)}function V0($,Y){return X_(Rv,$,Y)}function ga($){let Y=$._zod.def.shape;return W1(Object.keys(Y))}function z0($,Y){let z={type:"object",shape:$??{},...y0.normalizeParams(Y)};return new vG(z)}function ya($,Y){return new vG({type:"object",shape:$,catchall:EL(),...y0.normalizeParams(Y)})}function Q1($,Y){return new vG({type:"object",shape:$,catchall:a0(),...y0.normalizeParams(Y)})}function o0($,Y){return new hG({type:"union",options:$,...y0.normalizeParams(Y)})}function ka($,Y){return new _v({type:"union",options:$,inclusive:!1,...y0.normalizeParams(Y)})}function O7($,Y,z){return new vv({type:"union",options:Y,discriminator:$,...y0.normalizeParams(z)})}function U5($,Y){return new hv({type:"intersection",left:$,right:Y})}function gv($,Y,z){let U=Y instanceof V1,Q=U?z:Y;return new Sv({type:"tuple",items:$,rest:U?Y:null,...y0.normalizeParams(Q)})}function p0($,Y,z){if(!Y||!Y._zod)return new VQ({type:"record",keyType:R(),valueType:$,...y0.normalizeParams(Y)});return new VQ({type:"record",keyType:$,valueType:Y,...y0.normalizeParams(z)})}function xa($,Y,z){let U=A8($);return U._zod.values=void 0,new VQ({type:"record",keyType:U,valueType:Y,...y0.normalizeParams(z)})}function fa($,Y,z){return new VQ({type:"record",keyType:$,valueType:Y,mode:"loose",...y0.normalizeParams(z)})}function ua($,Y,z){return new yv({type:"map",keyType:$,valueType:Y,...y0.normalizeParams(z)})}function ba($,Y){return new kv({type:"set",valueType:$,...y0.normalizeParams(Y)})}function W1($,Y){let z=Array.isArray($)?Object.fromEntries($.map((U)=>[U,U])):$;return new LQ({type:"enum",entries:z,...y0.normalizeParams(Y)})}function ia($,Y){return new LQ({type:"enum",entries:$,...y0.normalizeParams(Y)})}function L0($,Y){return new xv({type:"literal",values:Array.isArray($)?$:[$],...y0.normalizeParams(Y)})}function na($){return Z_(fv,$)}function CL($){return new uv({type:"transform",transform:$})}function t0($){return new RL({type:"optional",innerType:$})}function iv($){return new bv({type:"optional",innerType:$})}function EG($){return new nv({type:"nullable",innerType:$})}function ca($){return t0(EG($))}function pv($,Y){return new cv({type:"default",innerType:$,get defaultValue(){return typeof Y==="function"?Y():y0.shallowClone(Y)}})}function mv($,Y){return new dv({type:"prefault",innerType:$,get defaultValue(){return typeof Y==="function"?Y():y0.shallowClone(Y)}})}function lv($,Y){return new _L({type:"nonoptional",innerType:$,...y0.normalizeParams(Y)})}function pa($){return new ov({type:"success",innerType:$})}function sv($,Y){return new rv({type:"catch",innerType:$,catchValue:typeof Y==="function"?Y:()=>Y})}function da($){return W_(av,$)}function IL($,Y){return new SG({type:"pipe",in:$,out:Y})}function ma($,Y,z){return new gG({type:"pipe",in:$,out:Y,transform:z.decode,reverseTransform:z.encode})}function la($){let Y=$._zod.def;return new gG({type:"pipe",in:Y.out,out:Y.in,transform:Y.reverseTransform,reverseTransform:Y.transform})}function $h($){return new ev({type:"readonly",innerType:$})}function oa($,Y){return new Yh({type:"template_literal",parts:$,...y0.normalizeParams(Y)})}function w7($){return new zh({type:"lazy",getter:$})}function ra($){return new Uh({type:"promise",innerType:$})}function sa($){return new Qh({type:"function",input:Array.isArray($?.input)?gv($?.input):$?.input??V0(a0()),output:$?.output??a0()})}function aa($){let Y=new F4({check:"custom"});return Y._zod.check=$,Y}function ta($,Y){return q_(yG,$??(()=>!0),Y)}function Jh($,Y={}){return V_(yG,$,Y)}function Ih($,Y){return L_($,Y)}function Yt($,Y={}){let z=new yG({type:"custom",check:"custom",fn:(U)=>U instanceof $,abort:!0,...y0.normalizeParams(Y)});return z._zod.bag.Class=$,z._zod.check=(U)=>{if(!(U.value instanceof $))U.issues.push({code:"invalid_type",expected:$.name,input:U.value,inst:z,path:[...z._zod.def.path??[]]})},z}function Ut($){let Y=w7(()=>{return o0([R($),R0(),m0(),l5(),V0(Y),p0(R(),Y)])});return Y}function l9($,Y){return new tv({type:"pipe",in:CL($),out:Y})}var ss,M1,KL,FQ,q4,GL,TG,m5,RG,WL,XL,ZL,qL,VL,LL,FL,OL,Dv,wL,ML,NL,DL,AL,BL,PL,wQ,MQ,yY,NQ,DQ,jL,Av,Bv,Pv,jv,Tv,Ev,Cv,_G,Rv,vG,hG,_v,vv,hv,Sv,VQ,yv,kv,LQ,xv,fv,uv,RL,bv,nv,cv,dv,_L,ov,rv,av,SG,gG,tv,ev,Yh,zh,Uh,Qh,yG,ea,$t,zt=(...$)=>w_({Codec:gG,Boolean:NQ,String:FQ},...$);var PG=m(()=>{Q$();Q$();DG();NG();$L();AG();Nv();ss=new WeakMap;M1=W0("ZodType",($,Y)=>{return V1.init($,Y),Object.assign($["~standard"],{jsonSchema:{input:qQ($,"input"),output:qQ($,"output")}}),$.toJSONSchema=M_($,{}),$.def=Y,$.type=Y.type,Object.defineProperty($,"_def",{value:Y}),$.parse=(z,U)=>Hv($,z,U,{callee:$.parse}),$.safeParse=(z,U)=>jG($,z,U),$.parseAsync=async(z,U)=>Wv($,z,U,{callee:$.parseAsync}),$.safeParseAsync=async(z,U)=>Xv($,z,U),$.spa=$.safeParseAsync,$.encode=(z,U)=>Zv($,z,U),$.decode=(z,U)=>qv($,z,U),$.encodeAsync=async(z,U)=>Vv($,z,U),$.decodeAsync=async(z,U)=>Lv($,z,U),$.safeEncode=(z,U)=>Fv($,z,U),$.safeDecode=(z,U)=>Ov($,z,U),$.safeEncodeAsync=async(z,U)=>wv($,z,U),$.safeDecodeAsync=async(z,U)=>Mv($,z,U),CG($,"ZodType",{check(...z){let U=this.def;return this.clone(y0.mergeDefs(U,{checks:[...U.checks??[],...z.map((Q)=>typeof Q==="function"?{_zod:{check:Q,def:{check:"custom"},onattach:[]}}:Q)]}),{parent:!0})},with(...z){return this.check(...z)},clone(z,U){return A8(this,z,U)},brand(){return this},register(z,U){return z.add(this,U),this},refine(z,U){return this.check(Jh(z,U))},superRefine(z,U){return this.check(Ih(z,U))},overwrite(z){return this.check(z5(z))},optional(){return t0(this)},exactOptional(){return iv(this)},nullable(){return EG(this)},nullish(){return t0(EG(this))},nonoptional(z){return lv(this,z)},array(){return V0(this)},or(z){return o0([this,z])},and(z){return U5(this,z)},transform(z){return IL(this,CL(z))},default(z){return pv(this,z)},prefault(z){return mv(this,z)},catch(z){return sv(this,z)},pipe(z){return IL(this,z)},readonly(){return $h(this)},describe(z){let U=this.clone();return d6.add(U,{description:z}),U},meta(...z){if(z.length===0)return d6.get(this);let U=this.clone();return d6.add(U,z[0]),U},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(z){return z(this)}}),Object.defineProperty($,"description",{get(){return d6.get($)?.description},configurable:!0}),$}),KL=W0("_ZodString",($,Y)=>{_Y.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>N_($,U,Q,J);let z=$._zod.bag;$.format=z.format??null,$.minLength=z.minimum??null,$.maxLength=z.maximum??null,CG($,"_ZodString",{regex(...U){return this.check($Q(...U))},includes(...U){return this.check(UQ(...U))},startsWith(...U){return this.check(QQ(...U))},endsWith(...U){return this.check(JQ(...U))},min(...U){return this.check(d9(...U))},max(...U){return this.check(hY(...U))},length(...U){return this.check(SY(...U))},nonempty(...U){return this.check(d9(1,...U))},lowercase(U){return this.check(YQ(U))},uppercase(U){return this.check(zQ(U))},trim(){return this.check(GQ())},normalize(...U){return this.check(KQ(...U))},toLowerCase(){return this.check(HQ())},toUpperCase(){return this.check(WQ())},slugify(){return this.check(XQ())}})}),FQ=W0("ZodString",($,Y)=>{_Y.init($,Y),KL.init($,Y),$.email=(z)=>$.check(jV(GL,z)),$.url=(z)=>$.check(MG(RG,z)),$.jwt=(z)=>$.check(pV(PL,z)),$.emoji=(z)=>$.check(_V(WL,z)),$.guid=(z)=>$.check(wG(TG,z)),$.uuid=(z)=>$.check(TV(m5,z)),$.uuidv4=(z)=>$.check(EV(m5,z)),$.uuidv6=(z)=>$.check(CV(m5,z)),$.uuidv7=(z)=>$.check(RV(m5,z)),$.nanoid=(z)=>$.check(vV(XL,z)),$.guid=(z)=>$.check(wG(TG,z)),$.cuid=(z)=>$.check(hV(ZL,z)),$.cuid2=(z)=>$.check(SV(qL,z)),$.ulid=(z)=>$.check(gV(VL,z)),$.base64=(z)=>$.check(iV(DL,z)),$.base64url=(z)=>$.check(nV(AL,z)),$.xid=(z)=>$.check(yV(LL,z)),$.ksuid=(z)=>$.check(kV(FL,z)),$.ipv4=(z)=>$.check(xV(OL,z)),$.ipv6=(z)=>$.check(fV(wL,z)),$.cidrv4=(z)=>$.check(uV(ML,z)),$.cidrv6=(z)=>$.check(bV(NL,z)),$.e164=(z)=>$.check(cV(BL,z)),$.datetime=(z)=>$.check(Qv(z)),$.date=(z)=>$.check(Jv(z)),$.time=(z)=>$.check(Iv(z)),$.duration=(z)=>$.check(Kv(z))});q4=W0("ZodStringFormat",($,Y)=>{Z4.init($,Y),KL.init($,Y)}),GL=W0("ZodEmail",($,Y)=>{PE.init($,Y),q4.init($,Y)});TG=W0("ZodGUID",($,Y)=>{AE.init($,Y),q4.init($,Y)});m5=W0("ZodUUID",($,Y)=>{BE.init($,Y),q4.init($,Y)});RG=W0("ZodURL",($,Y)=>{jE.init($,Y),q4.init($,Y)});WL=W0("ZodEmoji",($,Y)=>{TE.init($,Y),q4.init($,Y)});XL=W0("ZodNanoID",($,Y)=>{EE.init($,Y),q4.init($,Y)});ZL=W0("ZodCUID",($,Y)=>{CE.init($,Y),q4.init($,Y)});qL=W0("ZodCUID2",($,Y)=>{RE.init($,Y),q4.init($,Y)});VL=W0("ZodULID",($,Y)=>{_E.init($,Y),q4.init($,Y)});LL=W0("ZodXID",($,Y)=>{vE.init($,Y),q4.init($,Y)});FL=W0("ZodKSUID",($,Y)=>{hE.init($,Y),q4.init($,Y)});OL=W0("ZodIPv4",($,Y)=>{xE.init($,Y),q4.init($,Y)});Dv=W0("ZodMAC",($,Y)=>{uE.init($,Y),q4.init($,Y)});wL=W0("ZodIPv6",($,Y)=>{fE.init($,Y),q4.init($,Y)});ML=W0("ZodCIDRv4",($,Y)=>{bE.init($,Y),q4.init($,Y)});NL=W0("ZodCIDRv6",($,Y)=>{iE.init($,Y),q4.init($,Y)});DL=W0("ZodBase64",($,Y)=>{cE.init($,Y),q4.init($,Y)});AL=W0("ZodBase64URL",($,Y)=>{pE.init($,Y),q4.init($,Y)});BL=W0("ZodE164",($,Y)=>{dE.init($,Y),q4.init($,Y)});PL=W0("ZodJWT",($,Y)=>{mE.init($,Y),q4.init($,Y)});wQ=W0("ZodCustomStringFormat",($,Y)=>{lE.init($,Y),q4.init($,Y)});MQ=W0("ZodNumber",($,Y)=>{MV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>D_($,U,Q,J),CG($,"ZodNumber",{gt(U,Q){return this.check(p5(U,Q))},gte(U,Q){return this.check(P8(U,Q))},min(U,Q){return this.check(P8(U,Q))},lt(U,Q){return this.check(c5(U,Q))},lte(U,Q){return this.check(U$(U,Q))},max(U,Q){return this.check(U$(U,Q))},int(U){return this.check(JL(U))},safe(U){return this.check(JL(U))},positive(U){return this.check(p5(0,U))},nonnegative(U){return this.check(P8(0,U))},negative(U){return this.check(c5(0,U))},nonpositive(U){return this.check(U$(0,U))},multipleOf(U,Q){return this.check(Z7(U,Q))},step(U,Q){return this.check(Z7(U,Q))},finite(){return this}});let z=$._zod.bag;$.minValue=Math.max(z.minimum??Number.NEGATIVE_INFINITY,z.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(z.maximum??Number.POSITIVE_INFINITY,z.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(z.format??"").includes("int")||Number.isSafeInteger(z.multipleOf??0.5),$.isFinite=!0,$.format=z.format??null});yY=W0("ZodNumberFormat",($,Y)=>{oE.init($,Y),MQ.init($,Y)});NQ=W0("ZodBoolean",($,Y)=>{HG.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>A_($,z,U,Q)});DQ=W0("ZodBigInt",($,Y)=>{NV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>B_($,U,Q,J),$.gte=(U,Q)=>$.check(P8(U,Q)),$.min=(U,Q)=>$.check(P8(U,Q)),$.gt=(U,Q)=>$.check(p5(U,Q)),$.gte=(U,Q)=>$.check(P8(U,Q)),$.min=(U,Q)=>$.check(P8(U,Q)),$.lt=(U,Q)=>$.check(c5(U,Q)),$.lte=(U,Q)=>$.check(U$(U,Q)),$.max=(U,Q)=>$.check(U$(U,Q)),$.positive=(U)=>$.check(p5(BigInt(0),U)),$.negative=(U)=>$.check(c5(BigInt(0),U)),$.nonpositive=(U)=>$.check(U$(BigInt(0),U)),$.nonnegative=(U)=>$.check(P8(BigInt(0),U)),$.multipleOf=(U,Q)=>$.check(Z7(U,Q));let z=$._zod.bag;$.minValue=z.minimum??null,$.maxValue=z.maximum??null,$.format=z.format??null});jL=W0("ZodBigIntFormat",($,Y)=>{rE.init($,Y),DQ.init($,Y)});Av=W0("ZodSymbol",($,Y)=>{sE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>P_($,z,U,Q)});Bv=W0("ZodUndefined",($,Y)=>{aE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>T_($,z,U,Q)});Pv=W0("ZodNull",($,Y)=>{tE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>j_($,z,U,Q)});jv=W0("ZodAny",($,Y)=>{eE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>R_($,z,U,Q)});Tv=W0("ZodUnknown",($,Y)=>{$C.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>__($,z,U,Q)});Ev=W0("ZodNever",($,Y)=>{YC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>C_($,z,U,Q)});Cv=W0("ZodVoid",($,Y)=>{zC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>E_($,z,U,Q)});_G=W0("ZodDate",($,Y)=>{UC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>v_($,U,Q,J),$.min=(U,Q)=>$.check(P8(U,Q)),$.max=(U,Q)=>$.check(U$(U,Q));let z=$._zod.bag;$.minDate=z.minimum?new Date(z.minimum):null,$.maxDate=z.maximum?new Date(z.maximum):null});Rv=W0("ZodArray",($,Y)=>{QC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>c_($,z,U,Q),$.element=Y.element,CG($,"ZodArray",{min(z,U){return this.check(d9(z,U))},nonempty(z){return this.check(d9(1,z))},max(z,U){return this.check(hY(z,U))},length(z,U){return this.check(SY(z,U))},unwrap(){return this.element}})});vG=W0("ZodObject",($,Y)=>{JC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>p_($,z,U,Q),y0.defineLazy($,"shape",()=>{return Y.shape}),CG($,"ZodObject",{keyof(){return W1(Object.keys(this._zod.def.shape))},catchall(z){return this.clone({...this._zod.def,catchall:z})},passthrough(){return this.clone({...this._zod.def,catchall:a0()})},loose(){return this.clone({...this._zod.def,catchall:a0()})},strict(){return this.clone({...this._zod.def,catchall:EL()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(z){return y0.extend(this,z)},safeExtend(z){return y0.safeExtend(this,z)},merge(z){return y0.merge(this,z)},pick(z){return y0.pick(this,z)},omit(z){return y0.omit(this,z)},partial(...z){return y0.partial(RL,this,z[0])},required(...z){return y0.required(_L,this,z[0])}})});hG=W0("ZodUnion",($,Y)=>{WG.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>aV($,z,U,Q),$.options=Y.options});_v=W0("ZodXor",($,Y)=>{hG.init($,Y),IC.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>aV($,z,U,Q),$.options=Y.options});vv=W0("ZodDiscriminatedUnion",($,Y)=>{hG.init($,Y),KC.init($,Y)});hv=W0("ZodIntersection",($,Y)=>{GC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>d_($,z,U,Q)});Sv=W0("ZodTuple",($,Y)=>{DV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>m_($,z,U,Q),$.rest=(z)=>$.clone({...$._zod.def,rest:z})});VQ=W0("ZodRecord",($,Y)=>{HC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>l_($,z,U,Q),$.keyType=Y.keyType,$.valueType=Y.valueType});yv=W0("ZodMap",($,Y)=>{WC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>i_($,z,U,Q),$.keyType=Y.keyType,$.valueType=Y.valueType,$.min=(...z)=>$.check(d5(...z)),$.nonempty=(z)=>$.check(d5(1,z)),$.max=(...z)=>$.check(q7(...z)),$.size=(...z)=>$.check(vY(...z))});kv=W0("ZodSet",($,Y)=>{XC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>n_($,z,U,Q),$.min=(...z)=>$.check(d5(...z)),$.nonempty=(z)=>$.check(d5(1,z)),$.max=(...z)=>$.check(q7(...z)),$.size=(...z)=>$.check(vY(...z))});LQ=W0("ZodEnum",($,Y)=>{ZC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>h_($,U,Q,J),$.enum=Y.entries,$.options=Object.values(Y.entries);let z=new Set(Object.keys(Y.entries));$.extract=(U,Q)=>{let J={};for(let I of U)if(z.has(I))J[I]=Y.entries[I];else throw Error(`Key ${I} not found in enum`);return new LQ({...Y,checks:[],...y0.normalizeParams(Q),entries:J})},$.exclude=(U,Q)=>{let J={...Y.entries};for(let I of U)if(z.has(I))delete J[I];else throw Error(`Key ${I} not found in enum`);return new LQ({...Y,checks:[],...y0.normalizeParams(Q),entries:J})}});xv=W0("ZodLiteral",($,Y)=>{qC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>S_($,z,U,Q),$.values=new Set(Y.values),Object.defineProperty($,"value",{get(){if(Y.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return Y.values[0]}})});fv=W0("ZodFile",($,Y)=>{VC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>k_($,z,U,Q),$.min=(z,U)=>$.check(d5(z,U)),$.max=(z,U)=>$.check(q7(z,U)),$.mime=(z,U)=>$.check(IQ(Array.isArray(z)?z:[z],U))});uv=W0("ZodTransform",($,Y)=>{LC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>b_($,z,U,Q),$._zod.parse=(z,U)=>{if(U.direction==="backward")throw new TY($.constructor.name);z.addIssue=(J)=>{if(typeof J==="string")z.issues.push(y0.issue(J,z.value,Y));else{let I=J;if(I.fatal)I.continue=!1;I.code??(I.code="custom"),I.input??(I.input=z.value),I.inst??(I.inst=$),z.issues.push(y0.issue(I))}};let Q=Y.transform(z.value,z);if(Q instanceof Promise)return Q.then((J)=>{return z.value=J,z.fallback=!0,z});return z.value=Q,z.fallback=!0,z}});RL=W0("ZodOptional",($,Y)=>{AV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>tV($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});bv=W0("ZodExactOptional",($,Y)=>{FC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>tV($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});nv=W0("ZodNullable",($,Y)=>{OC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>o_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});cv=W0("ZodDefault",($,Y)=>{wC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>s_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});dv=W0("ZodPrefault",($,Y)=>{MC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>a_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});_L=W0("ZodNonOptional",($,Y)=>{NC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>r_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});ov=W0("ZodSuccess",($,Y)=>{DC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>x_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});rv=W0("ZodCatch",($,Y)=>{AC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>t_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});av=W0("ZodNaN",($,Y)=>{BC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>g_($,z,U,Q)});SG=W0("ZodPipe",($,Y)=>{BV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>e_($,z,U,Q),$.in=Y.in,$.out=Y.out});gG=W0("ZodCodec",($,Y)=>{SG.init($,Y),XG.init($,Y)});tv=W0("ZodPreprocess",($,Y)=>{SG.init($,Y),PC.init($,Y)}),ev=W0("ZodReadonly",($,Y)=>{jC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>$v($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});Yh=W0("ZodTemplateLiteral",($,Y)=>{TC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>y_($,z,U,Q)});zh=W0("ZodLazy",($,Y)=>{RC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>zv($,z,U,Q),$.unwrap=()=>$._zod.def.getter()});Uh=W0("ZodPromise",($,Y)=>{CC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>Yv($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});Qh=W0("ZodFunction",($,Y)=>{EC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>u_($,z,U,Q)});yG=W0("ZodCustom",($,Y)=>{_C.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>f_($,z,U,Q)});ea=F_,$t=O_});function yf0($){a4({customError:$})}function kf0(){return a4().customError}var Gh,Kh;var Qt=m(()=>{Q$();Gh={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function($){})(Kh||(Kh={}))});function ff0($,Y){let z=$.$schema;if(z==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(z==="http://json-schema.org/draft-07/schema#")return"draft-7";if(z==="http://json-schema.org/draft-04/schema#")return"draft-4";return Y??"draft-2020-12"}function uf0($,Y){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let z=$.slice(1).split("/").filter(Boolean);if(z.length===0)return Y.rootSchema;let U=Y.version==="draft-2020-12"?"$defs":"definitions";if(z[0]===U){let Q=z[1];if(!Q||!Y.defs[Q])throw Error(`Reference not found: ${$}`);return Y.defs[Q]}throw Error(`Reference not found: ${$}`)}function Jt($,Y){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return l0.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let Q=$.$ref;if(Y.refs.has(Q))return Y.refs.get(Q);if(Y.processing.has(Q))return l0.lazy(()=>{if(!Y.refs.has(Q))throw Error(`Circular reference not resolved: ${Q}`);return Y.refs.get(Q)});Y.processing.add(Q);let J=uf0(Q,Y),I=G8(J,Y);return Y.refs.set(Q,I),Y.processing.delete(Q),I}if($.enum!==void 0){let Q=$.enum;if(Y.version==="openapi-3.0"&&$.nullable===!0&&Q.length===1&&Q[0]===null)return l0.null();if(Q.length===0)return l0.never();if(Q.length===1)return l0.literal(Q[0]);if(Q.every((I)=>typeof I==="string"))return l0.enum(Q);let J=Q.map((I)=>l0.literal(I));if(J.length<2)return J[0];return l0.union([J[0],J[1],...J.slice(2)])}if($.const!==void 0)return l0.literal($.const);let z=$.type;if(Array.isArray(z)){let Q=z.map((J)=>{let I={...$,type:J};return Jt(I,Y)});if(Q.length===0)return l0.never();if(Q.length===1)return Q[0];return l0.union(Q)}if(!z)return l0.any();let U;switch(z){case"string":{let Q=l0.string();if($.format){let J=$.format;if(J==="email")Q=Q.check(l0.email());else if(J==="uri"||J==="uri-reference")Q=Q.check(l0.url());else if(J==="uuid"||J==="guid")Q=Q.check(l0.uuid());else if(J==="date-time")Q=Q.check(l0.iso.datetime());else if(J==="date")Q=Q.check(l0.iso.date());else if(J==="time")Q=Q.check(l0.iso.time());else if(J==="duration")Q=Q.check(l0.iso.duration());else if(J==="ipv4")Q=Q.check(l0.ipv4());else if(J==="ipv6")Q=Q.check(l0.ipv6());else if(J==="mac")Q=Q.check(l0.mac());else if(J==="cidr")Q=Q.check(l0.cidrv4());else if(J==="cidr-v6")Q=Q.check(l0.cidrv6());else if(J==="base64")Q=Q.check(l0.base64());else if(J==="base64url")Q=Q.check(l0.base64url());else if(J==="e164")Q=Q.check(l0.e164());else if(J==="jwt")Q=Q.check(l0.jwt());else if(J==="emoji")Q=Q.check(l0.emoji());else if(J==="nanoid")Q=Q.check(l0.nanoid());else if(J==="cuid")Q=Q.check(l0.cuid());else if(J==="cuid2")Q=Q.check(l0.cuid2());else if(J==="ulid")Q=Q.check(l0.ulid());else if(J==="xid")Q=Q.check(l0.xid());else if(J==="ksuid")Q=Q.check(l0.ksuid())}if(typeof $.minLength==="number")Q=Q.min($.minLength);if(typeof $.maxLength==="number")Q=Q.max($.maxLength);if($.pattern)Q=Q.regex(new RegExp($.pattern));U=Q;break}case"number":case"integer":{let Q=z==="integer"?l0.number().int():l0.number();if(typeof $.minimum==="number")Q=Q.min($.minimum);if(typeof $.maximum==="number")Q=Q.max($.maximum);if(typeof $.exclusiveMinimum==="number")Q=Q.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")Q=Q.gt($.minimum);if(typeof $.exclusiveMaximum==="number")Q=Q.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")Q=Q.lt($.maximum);if(typeof $.multipleOf==="number")Q=Q.multipleOf($.multipleOf);U=Q;break}case"boolean":{U=l0.boolean();break}case"null":{U=l0.null();break}case"object":{let Q={},J=$.properties||{},I=new Set($.required||[]);for(let[G,H]of Object.entries(J)){let W=G8(H,Y);Q[G]=I.has(G)?W:W.optional()}if($.propertyNames){let G=G8($.propertyNames,Y),H=$.additionalProperties&&typeof $.additionalProperties==="object"?G8($.additionalProperties,Y):l0.any();if(Object.keys(Q).length===0){U=l0.record(G,H);break}let W=l0.object(Q).passthrough(),X=l0.looseRecord(G,H);U=l0.intersection(W,X);break}if($.patternProperties){let G=$.patternProperties,H=Object.keys(G),W=[];for(let Z of H){let q=G8(G[Z],Y),V=l0.string().regex(new RegExp(Z));W.push(l0.looseRecord(V,q))}let X=[];if(Object.keys(Q).length>0)X.push(l0.object(Q).passthrough());if(X.push(...W),X.length===0)U=l0.object({}).passthrough();else if(X.length===1)U=X[0];else{let Z=l0.intersection(X[0],X[1]);for(let q=2;qG8(G,Y)),K=J&&typeof J==="object"&&!Array.isArray(J)?G8(J,Y):void 0;if(K)U=l0.tuple(I).rest(K);else U=l0.tuple(I);if(typeof $.minItems==="number")U=U.check(l0.minLength($.minItems));if(typeof $.maxItems==="number")U=U.check(l0.maxLength($.maxItems))}else if(Array.isArray(J)){let I=J.map((G)=>G8(G,Y)),K=$.additionalItems&&typeof $.additionalItems==="object"?G8($.additionalItems,Y):void 0;if(K)U=l0.tuple(I).rest(K);else U=l0.tuple(I);if(typeof $.minItems==="number")U=U.check(l0.minLength($.minItems));if(typeof $.maxItems==="number")U=U.check(l0.maxLength($.maxItems))}else if(J!==void 0){let I=G8(J,Y),K=l0.array(I);if(typeof $.minItems==="number")K=K.min($.minItems);if(typeof $.maxItems==="number")K=K.max($.maxItems);U=K}else U=l0.array(l0.any());break}default:throw Error(`Unsupported type: ${z}`)}return U}function G8($,Y){if(typeof $==="boolean")return $?l0.any():l0.never();let z=Jt($,Y),U=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let K=$.anyOf.map((H)=>G8(H,Y)),G=l0.union(K);z=U?l0.intersection(z,G):G}if($.oneOf&&Array.isArray($.oneOf)){let K=$.oneOf.map((H)=>G8(H,Y)),G=l0.xor(K);z=U?l0.intersection(z,G):G}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)z=U?z:l0.any();else{let K=U?z:G8($.allOf[0],Y),G=U?0:1;for(let H=G;H<$.allOf.length;H++)K=l0.intersection(K,G8($.allOf[H],Y));z=K}if($.nullable===!0&&Y.version==="openapi-3.0")z=l0.nullable(z);if($.readOnly===!0)z=l0.readonly(z);if($.default!==void 0)z=z.default($.default);let Q={},J=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let K of J)if(K in $)Q[K]=$[K];let I=["contentEncoding","contentMediaType","contentSchema"];for(let K of I)if(K in $)Q[K]=$[K];for(let K of Object.keys($))if(!xf0.has(K))Q[K]=$[K];if(Object.keys(Q).length>0)Y.registry.add(z,Q);if($.description)z=z.describe($.description);return z}function It($,Y){if(typeof $==="boolean")return $?l0.any():l0.never();let z;try{z=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let U=ff0(z,Y?.defaultTarget),Q=z.$defs||z.definitions||{},J={version:U,defs:Q,refs:new Map,processing:new Set,rootSchema:z,registry:Y?.registry??d6};return G8(z,J)}var l0,xf0;var Kt=m(()=>{OG();$L();AG();PG();l0={...BG,...eV,iso:J$},xf0=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var kG={};D8(kG,{string:()=>bf0,number:()=>if0,date:()=>pf0,boolean:()=>nf0,bigint:()=>cf0});function bf0($){return yR(FQ,$)}function if0($){return cR(MQ,$)}function nf0($){return sR(NQ,$)}function cf0($){return tR(DQ,$)}function pf0($){return H_(_G,$)}var Gt=m(()=>{Q$();PG()});var L={};D8(L,{xor:()=>ka,xid:()=>Ga,void:()=>ha,uuidv7:()=>Ya,uuidv6:()=>$a,uuidv4:()=>es,uuid:()=>ts,util:()=>y0,url:()=>OQ,uppercase:()=>zQ,unknown:()=>a0,union:()=>o0,undefined:()=>va,ulid:()=>Ka,uint64:()=>Ra,uint32:()=>Ta,tuple:()=>gv,trim:()=>GQ,treeifyError:()=>NT,transform:()=>CL,toUpperCase:()=>WQ,toLowerCase:()=>HQ,toJSONSchema:()=>gY,templateLiteral:()=>oa,symbol:()=>_a,superRefine:()=>Ih,success:()=>pa,stringbool:()=>zt,stringFormat:()=>Ma,string:()=>R,strictObject:()=>ya,startsWith:()=>QQ,slugify:()=>XQ,size:()=>vY,setErrorMap:()=>yf0,set:()=>ba,safeParseAsync:()=>Xv,safeParse:()=>jG,safeEncodeAsync:()=>wv,safeEncode:()=>Fv,safeDecodeAsync:()=>Mv,safeDecode:()=>Ov,registry:()=>PV,regexes:()=>z$,regex:()=>$Q,refine:()=>Jh,record:()=>p0,readonly:()=>$h,property:()=>rV,promise:()=>ra,prettifyError:()=>DT,preprocess:()=>l9,prefault:()=>mv,positive:()=>dV,pipe:()=>IL,partialRecord:()=>xa,parseAsync:()=>Wv,parse:()=>Hv,overwrite:()=>z5,optional:()=>t0,object:()=>z0,number:()=>R0,nullish:()=>ca,nullable:()=>EG,null:()=>l5,normalize:()=>KQ,nonpositive:()=>lV,nonoptional:()=>lv,nonnegative:()=>oV,never:()=>EL,negative:()=>mV,nativeEnum:()=>ia,nanoid:()=>Qa,nan:()=>da,multipleOf:()=>Z7,minSize:()=>d5,minLength:()=>d9,mime:()=>IQ,meta:()=>$t,maxSize:()=>q7,maxLength:()=>hY,map:()=>ua,mac:()=>Xa,lte:()=>U$,lt:()=>c5,lowercase:()=>YQ,looseRecord:()=>fa,looseObject:()=>Q1,locales:()=>FG,literal:()=>L0,length:()=>SY,lazy:()=>w7,ksuid:()=>Ha,keyof:()=>ga,jwt:()=>wa,json:()=>Ut,iso:()=>J$,ipv6:()=>Za,ipv4:()=>Wa,invertCodec:()=>la,intersection:()=>U5,int64:()=>Ca,int32:()=>ja,int:()=>JL,instanceof:()=>Yt,includes:()=>UQ,httpUrl:()=>za,hostname:()=>Na,hex:()=>Da,hash:()=>Aa,guid:()=>as,gte:()=>P8,gt:()=>p5,globalRegistry:()=>d6,getErrorMap:()=>kf0,function:()=>sa,fromJSONSchema:()=>It,formatError:()=>JG,float64:()=>Pa,float32:()=>Ba,flattenError:()=>QG,file:()=>na,exactOptional:()=>iv,enum:()=>W1,endsWith:()=>JQ,encodeAsync:()=>Vv,encode:()=>Zv,emoji:()=>Ua,email:()=>HL,e164:()=>Oa,discriminatedUnion:()=>O7,describe:()=>ea,decodeAsync:()=>Lv,decode:()=>qv,date:()=>Sa,custom:()=>ta,cuid2:()=>Ia,cuid:()=>Ja,core:()=>m9,config:()=>a4,coerce:()=>kG,codec:()=>ma,clone:()=>A8,cidrv6:()=>Va,cidrv4:()=>qa,check:()=>aa,catch:()=>sv,boolean:()=>m0,bigint:()=>Ea,base64url:()=>Fa,base64:()=>La,array:()=>V0,any:()=>TL,_function:()=>sa,_default:()=>pv,_ZodString:()=>KL,ZodXor:()=>_v,ZodXID:()=>LL,ZodVoid:()=>Cv,ZodUnknown:()=>Tv,ZodUnion:()=>hG,ZodUndefined:()=>Bv,ZodUUID:()=>m5,ZodURL:()=>RG,ZodULID:()=>VL,ZodType:()=>M1,ZodTuple:()=>Sv,ZodTransform:()=>uv,ZodTemplateLiteral:()=>Yh,ZodSymbol:()=>Av,ZodSuccess:()=>ov,ZodStringFormat:()=>q4,ZodString:()=>FQ,ZodSet:()=>kv,ZodRecord:()=>VQ,ZodRealError:()=>b8,ZodReadonly:()=>ev,ZodPromise:()=>Uh,ZodPreprocess:()=>tv,ZodPrefault:()=>dv,ZodPipe:()=>SG,ZodOptional:()=>RL,ZodObject:()=>vG,ZodNumberFormat:()=>yY,ZodNumber:()=>MQ,ZodNullable:()=>nv,ZodNull:()=>Pv,ZodNonOptional:()=>_L,ZodNever:()=>Ev,ZodNanoID:()=>XL,ZodNaN:()=>av,ZodMap:()=>yv,ZodMAC:()=>Dv,ZodLiteral:()=>xv,ZodLazy:()=>zh,ZodKSUID:()=>FL,ZodJWT:()=>PL,ZodIssueCode:()=>Gh,ZodIntersection:()=>hv,ZodISOTime:()=>UL,ZodISODuration:()=>QL,ZodISODateTime:()=>YL,ZodISODate:()=>zL,ZodIPv6:()=>wL,ZodIPv4:()=>OL,ZodGUID:()=>TG,ZodFunction:()=>Qh,ZodFirstPartyTypeKind:()=>Kh,ZodFile:()=>fv,ZodExactOptional:()=>bv,ZodError:()=>Sf0,ZodEnum:()=>LQ,ZodEmoji:()=>WL,ZodEmail:()=>GL,ZodE164:()=>BL,ZodDiscriminatedUnion:()=>vv,ZodDefault:()=>cv,ZodDate:()=>_G,ZodCustomStringFormat:()=>wQ,ZodCustom:()=>yG,ZodCodec:()=>gG,ZodCatch:()=>rv,ZodCUID2:()=>qL,ZodCUID:()=>ZL,ZodCIDRv6:()=>NL,ZodCIDRv4:()=>ML,ZodBoolean:()=>NQ,ZodBigIntFormat:()=>jL,ZodBigInt:()=>DQ,ZodBase64URL:()=>AL,ZodBase64:()=>DL,ZodArray:()=>Rv,ZodAny:()=>jv,TimePrecision:()=>xR,NEVER:()=>sK,$output:()=>vR,$input:()=>hR,$brand:()=>HT});var vL=m(()=>{Q$();Q$();iC();Q$();DG();Kt();_R();AG();AG();Gt();PG();$L();Gv();Nv();Qt();a4(ZG())});var Ht=m(()=>{vL()});var Hh=m(()=>{Ht()});var xY="2025-11-25",hL,SL="io.modelcontextprotocol/related-task",r9="io.modelcontextprotocol/protocolVersion",AQ="io.modelcontextprotocol/clientInfo",o5="io.modelcontextprotocol/serverInfo",s9="io.modelcontextprotocol/clientCapabilities",fY="io.modelcontextprotocol/subscriptionId",N7="io.modelcontextprotocol/logLevel",uY="2.0",M7,t4,Xh,xG,fG,gL,yL,uG,g6,bY,e4,H8,W8,bG,$6,D7,iG,nG,BQ,PQ,cG,Zh,pG,kL,dG,xL,A7,o9,jQ,df0,mf0,fL,uL,bL,iL,nL,mG,cL,pL,dL,mL,lG,lL,oL,oG,rL,B7,P7,rG,sG,qh,aG,j7,a9,tG,sL,aL,tL,eL,$F,TQ,YF,zF,UF,QF,JF,IF,KF,GF,eG,HF,WF,XF,ZF,qF,VF,LF,FF,OF,wF,MF,NF,DF,AF,EQ,CQ,RQ,BF,PF,jF,_Q,TF,EF,CF,RF,_F,$H,vF,hF,YH,Vh,SF,gF,yF,Lh,T7,kF,xF,fF,uF,bF,iF,nF,cF,pF,kY,dF,mF,lF,oF,rF,zH,vQ,hQ,UH,QH,JH,sF,IH,KH,aF,tF,GH,SQ,eF,$O,YO,zO,UO,QO,JO,IO,KO,GO,HO,WO,XO,ZO,qO,Fh,VO,E7,Oh,LO,wh,Mh,Nh,Dh,Ah,Bh,Ph,jh,Th,Eh,Ch,Rh,_h,vh,hh,S6,Sh,FO,OO,gh,yh,kh,xh,Wh,wO,MO,fh,uh,bh;var Xt=m(()=>{Hh();hL=[xY,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],M7=w7(()=>o0([R(),R0(),m0(),l5(),p0(R(),M7),V0(M7)])),t4=p0(R(),M7),Xh=V0(M7),xG=o0([R(),R0().int()]),fG=R(),gL=z0({ttl:R0().optional()}),yL=z0({taskId:R()}),uG=Q1({progressToken:xG.optional(),[SL]:yL.optional()}),g6=z0({_meta:uG.optional()}),bY=g6.extend({task:gL.optional()}),e4=z0({method:R(),params:g6.loose().optional()}),H8=z0({_meta:uG.optional()}),W8=z0({method:R(),params:H8.loose().optional()}),bG=Q1({get[o5](){return jQ.optional().catch(void 0)}}),$6=Q1({_meta:bG.optional()}),D7=o0([R(),R0().int()]),iG=z0({jsonrpc:L0(uY),id:D7,...e4.shape}).strict(),nG=z0({jsonrpc:L0(uY),...W8.shape}).strict(),BQ=z0({jsonrpc:L0(uY),id:D7,result:$6}).strict(),PQ=z0({jsonrpc:L0(uY),id:D7.optional(),error:z0({code:R0().int(),message:R(),data:a0().optional()})}).strict(),cG=o0([iG,nG,BQ,PQ]),Zh=o0([BQ,PQ]),pG=$6.strict(),kL=H8.extend({requestId:D7.optional(),reason:R().optional()}),dG=W8.extend({method:L0("notifications/cancelled"),params:kL}),xL=z0({src:R(),mimeType:R().optional(),sizes:V0(R()).optional(),theme:W1(["light","dark"]).optional()}),A7=z0({icons:V0(xL).optional()}),o9=z0({name:R(),title:R().optional()}),jQ=o9.extend({...o9.shape,...A7.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),df0=U5(z0({applyDefaults:m0().optional()}),t4),mf0=l9(($)=>{if($&&typeof $==="object"&&!Array.isArray($)&&Object.keys($).length===0)return{form:{}};return $},U5(z0({form:df0.optional(),url:t4.optional()}),t4.optional())),fL=Q1({list:t4.optional(),cancel:t4.optional(),requests:Q1({sampling:Q1({createMessage:t4.optional()}).optional(),elicitation:Q1({create:t4.optional()}).optional()}).optional()}),uL=Q1({list:t4.optional(),cancel:t4.optional(),requests:Q1({tools:Q1({call:t4.optional()}).optional()}).optional()}),bL=z0({experimental:p0(R(),t4).optional(),sampling:z0({context:t4.optional(),tools:t4.optional()}).optional(),elicitation:mf0.optional(),roots:z0({listChanged:m0().optional()}).optional(),tasks:fL.optional(),extensions:p0(R(),t4).optional()}),iL=g6.extend({protocolVersion:R(),capabilities:bL,clientInfo:jQ}),nL=e4.extend({method:L0("initialize"),params:iL}),mG=z0({experimental:p0(R(),t4).optional(),logging:t4.optional(),completions:t4.optional(),prompts:z0({listChanged:m0().optional()}).optional(),resources:z0({subscribe:m0().optional(),listChanged:m0().optional()}).optional(),tools:z0({listChanged:m0().optional()}).optional(),tasks:uL.optional(),extensions:p0(R(),t4).optional()}),cL=$6.extend({protocolVersion:R(),capabilities:mG,serverInfo:jQ,instructions:R().optional()}),pL=W8.extend({method:L0("notifications/initialized"),params:H8.optional()}),dL=e4.extend({method:L0("server/discover"),params:g6.optional()}),mL=$6.extend({supportedVersions:V0(R()),capabilities:mG,instructions:R().optional()}),lG=e4.extend({method:L0("ping"),params:g6.optional()}),lL=z0({progress:R0(),total:t0(R0()),message:t0(R())}),oL=z0({...H8.shape,...lL.shape,progressToken:xG}),oG=W8.extend({method:L0("notifications/progress"),params:oL}),rL=g6.extend({cursor:fG.optional()}),B7=e4.extend({params:rL.optional()}),P7=$6.extend({nextCursor:fG.optional()}),rG=z0({uri:R(),mimeType:t0(R()),_meta:p0(R(),a0()).optional()}),sG=rG.extend({text:R()}),qh=R().refine(($)=>{try{return atob($),!0}catch{return!1}},{message:"Invalid Base64 string"}),aG=rG.extend({blob:qh}),j7=W1(["user","assistant"]),a9=z0({audience:V0(j7).optional(),priority:R0().min(0).max(1).optional(),lastModified:J$.datetime({offset:!0}).optional()}),tG=z0({...o9.shape,...A7.shape,uri:R(),description:t0(R()),mimeType:t0(R()),size:t0(R0()),annotations:a9.optional(),_meta:t0(Q1({}))}),sL=z0({...o9.shape,...A7.shape,uriTemplate:R(),description:t0(R()),mimeType:t0(R()),annotations:a9.optional(),_meta:t0(Q1({}))}),aL=B7.extend({method:L0("resources/list")}),tL=P7.extend({resources:V0(tG)}),eL=B7.extend({method:L0("resources/templates/list")}),$F=P7.extend({resourceTemplates:V0(sL)}),TQ=g6.extend({uri:R()}),YF=TQ,zF=e4.extend({method:L0("resources/read"),params:YF}),UF=$6.extend({contents:V0(o0([sG,aG]))}),QF=W8.extend({method:L0("notifications/resources/list_changed"),params:H8.optional()}),JF=TQ,IF=e4.extend({method:L0("resources/subscribe"),params:JF}),KF=TQ,GF=e4.extend({method:L0("resources/unsubscribe"),params:KF}),eG=z0({toolsListChanged:m0().optional(),promptsListChanged:m0().optional(),resourcesListChanged:m0().optional(),resourceSubscriptions:V0(R()).optional()}),HF=g6.extend({notifications:eG}),WF=e4.extend({method:L0("subscriptions/listen"),params:HF}),XF=H8.extend({notifications:eG}),ZF=W8.extend({method:L0("notifications/subscriptions/acknowledged"),params:XF}),qF=bG.extend({[fY]:D7}),VF=$6.extend({_meta:qF}),LF=H8.extend({uri:R()}),FF=W8.extend({method:L0("notifications/resources/updated"),params:LF}),OF=z0({name:R(),description:t0(R()),required:t0(m0())}),wF=z0({...o9.shape,...A7.shape,description:t0(R()),arguments:t0(V0(OF)),_meta:t0(Q1({}))}),MF=B7.extend({method:L0("prompts/list")}),NF=P7.extend({prompts:V0(wF)}),DF=g6.extend({name:R(),arguments:p0(R(),R()).optional()}),AF=e4.extend({method:L0("prompts/get"),params:DF}),EQ=z0({type:L0("text"),text:R(),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),CQ=z0({type:L0("image"),data:qh,mimeType:R(),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),RQ=z0({type:L0("audio"),data:qh,mimeType:R(),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),BF=z0({type:L0("tool_use"),name:R(),id:R(),input:p0(R(),a0()),_meta:p0(R(),a0()).optional()}),PF=z0({type:L0("resource"),resource:o0([sG,aG]),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),jF=tG.extend({type:L0("resource_link")}),_Q=o0([EQ,CQ,RQ,jF,PF]),TF=z0({role:j7,content:_Q}),EF=$6.extend({description:R().optional(),messages:V0(TF)}),CF=W8.extend({method:L0("notifications/prompts/list_changed"),params:H8.optional()}),RF=z0({title:R().optional(),readOnlyHint:m0().optional(),destructiveHint:m0().optional(),idempotentHint:m0().optional(),openWorldHint:m0().optional()}),_F=z0({taskSupport:W1(["required","optional","forbidden"]).optional()}),$H=z0({...o9.shape,...A7.shape,description:R().optional(),inputSchema:z0({type:L0("object"),properties:p0(R(),M7).optional(),required:V0(R()).optional()}).catchall(a0()),outputSchema:Q1({$schema:R().optional()}).optional(),annotations:RF.optional(),execution:_F.optional(),_meta:p0(R(),a0()).optional()}),vF=B7.extend({method:L0("tools/list")}),hF=P7.extend({tools:V0($H)}),YH=$6.extend({content:V0(_Q).default([]),structuredContent:a0().optional(),isError:m0().optional()}),Vh=YH.or($6.extend({toolResult:a0()})),SF=bY.extend({name:R(),arguments:p0(R(),a0()).optional()}),gF=e4.extend({method:L0("tools/call"),params:SF}),yF=W8.extend({method:L0("notifications/tools/list_changed"),params:H8.optional()}),Lh=z0({autoRefresh:m0().default(!0),debounceMs:R0().int().nonnegative().default(300)}),T7=W1(["debug","info","notice","warning","error","critical","alert","emergency"]),kF=g6.extend({level:T7}),xF=e4.extend({method:L0("logging/setLevel"),params:kF}),fF=H8.extend({level:T7,logger:R().optional(),data:a0()}),uF=W8.extend({method:L0("notifications/message"),params:fF}),bF=z0({name:R().optional()}),iF=z0({hints:V0(bF).optional(),costPriority:R0().min(0).max(1).optional(),speedPriority:R0().min(0).max(1).optional(),intelligencePriority:R0().min(0).max(1).optional()}),nF=z0({mode:W1(["auto","required","none"]).optional()}),cF=z0({type:L0("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:V0(_Q),structuredContent:a0().optional(),isError:m0().optional(),_meta:p0(R(),a0()).optional()}),pF=O7("type",[EQ,CQ,RQ]),kY=O7("type",[EQ,CQ,RQ,BF,cF]),dF=z0({role:j7,content:o0([kY,V0(kY)]),_meta:p0(R(),a0()).optional()}),mF=bY.extend({messages:V0(dF),modelPreferences:iF.optional(),systemPrompt:R().optional(),includeContext:W1(["none","thisServer","allServers"]).optional(),temperature:R0().optional(),maxTokens:R0().int(),stopSequences:V0(R()).optional(),metadata:t4.optional(),tools:V0($H).optional(),toolChoice:nF.optional()}),lF=e4.extend({method:L0("sampling/createMessage"),params:mF}),oF=$6.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens"]).or(R())),role:j7,content:pF}),rF=$6.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:j7,content:o0([kY,V0(kY)])}),zH=z0({type:L0("boolean"),title:R().optional(),description:R().optional(),default:m0().optional()}),vQ=z0({type:L0("string"),title:R().optional(),description:R().optional(),minLength:R0().optional(),maxLength:R0().optional(),format:W1(["email","uri","date","date-time"]).optional(),default:R().optional()}),hQ=z0({type:W1(["number","integer"]),title:R().optional(),description:R().optional(),minimum:R0().optional(),maximum:R0().optional(),default:R0().optional()}),UH=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),default:R().optional()}),QH=z0({type:L0("string"),title:R().optional(),description:R().optional(),oneOf:V0(z0({const:R(),title:R()})),default:R().optional()}),JH=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),enumNames:V0(R()).optional(),default:R().optional()}),sF=o0([UH,QH]),IH=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({type:L0("string"),enum:V0(R())}),default:V0(R()).optional()}),KH=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({anyOf:V0(z0({const:R(),title:R()}))}),default:V0(R()).optional()}),aF=o0([IH,KH]),tF=o0([JH,sF,aF]),GH=o0([tF,zH,vQ,hQ]),SQ=bY.extend({mode:L0("form").optional(),message:R(),requestedSchema:z0({type:L0("object"),properties:p0(R(),GH),required:V0(R()).optional()}).catchall(a0())}),eF=bY.extend({mode:L0("url"),message:R(),elicitationId:R(),url:R().url()}),$O=o0([SQ,eF]),YO=e4.extend({method:L0("elicitation/create"),params:$O}),zO=H8.extend({elicitationId:R()}),UO=W8.extend({method:L0("notifications/elicitation/complete"),params:zO}),QO=$6.extend({action:W1(["accept","decline","cancel"]),content:l9(($)=>$===null?void 0:$,p0(R(),o0([R(),R0(),m0(),V0(R())])).optional())}),JO=z0({type:L0("ref/resource"),uri:R()}),IO=z0({type:L0("ref/prompt"),name:R()}),KO=g6.extend({ref:o0([IO,JO]),argument:z0({name:R(),value:R()}),context:z0({arguments:p0(R(),R()).optional()}).optional()}),GO=e4.extend({method:L0("completion/complete"),params:KO}),HO=$6.extend({completion:Q1({values:V0(R()).max(100),total:t0(R0().int()),hasMore:t0(m0())})}),WO=z0({uri:R().startsWith("file://"),name:R().optional(),_meta:p0(R(),a0()).optional()}),XO=e4.extend({method:L0("roots/list"),params:g6.optional()}),ZO=$6.extend({roots:V0(WO)}),qO=W8.extend({method:L0("notifications/roots/list_changed"),params:H8.optional()}),Fh=Q1({ttl:R0().optional(),pollInterval:R0().optional()}),VO=W1(["working","input_required","completed","failed","cancelled"]),E7=z0({taskId:R(),status:VO,ttl:o0([R0(),l5()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:t0(R0()),statusMessage:t0(R())}),Oh=$6.extend({task:E7}),LO=H8.merge(E7),wh=W8.extend({method:L0("notifications/tasks/status"),params:LO}),Mh=e4.extend({method:L0("tasks/get"),params:g6.extend({taskId:R()})}),Nh=$6.merge(E7),Dh=e4.extend({method:L0("tasks/result"),params:g6.extend({taskId:R()})}),Ah=$6.loose(),Bh=B7.extend({method:L0("tasks/list")}),Ph=P7.extend({tasks:V0(E7)}),jh=e4.extend({method:L0("tasks/cancel"),params:g6.extend({taskId:R()})}),Th=$6.merge(E7),Eh=o0([lG,nL,dL,GO,xF,AF,MF,aL,eL,zF,IF,GF,WF,gF,vF]),Ch=o0([dG,oG,pL,qO]),Rh=o0([pG,oF,rF,QO,ZO]),_h=o0([lG,lF,YO,XO]),vh=o0([dG,oG,uF,FF,QF,yF,CF,ZF,UO]),hh=o0([pG,cL,mL,HO,EF,NF,tL,$F,UF,YH,hF,VF]),S6=OQ().superRefine(($,Y)=>{if(!URL.canParse($))return Y.addIssue({code:Gh.custom,message:"URL must be parseable",fatal:!0}),sK}).refine(($)=>{let Y=new URL($);return Y.protocol!=="javascript:"&&Y.protocol!=="data:"&&Y.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Sh=Q1({resource:R().url(),authorization_servers:V0(S6).optional(),jwks_uri:R().url().optional(),scopes_supported:V0(R()).optional(),bearer_methods_supported:V0(R()).optional(),resource_signing_alg_values_supported:V0(R()).optional(),resource_name:R().optional(),resource_documentation:R().optional(),resource_policy_uri:R().url().optional(),resource_tos_uri:R().url().optional(),tls_client_certificate_bound_access_tokens:m0().optional(),authorization_details_types_supported:V0(R()).optional(),dpop_signing_alg_values_supported:V0(R()).optional(),dpop_bound_access_tokens_required:m0().optional()}),FO=Q1({issuer:R(),authorization_endpoint:S6,token_endpoint:S6,registration_endpoint:S6.optional(),scopes_supported:V0(R()).optional(),response_types_supported:V0(R()),response_modes_supported:V0(R()).optional(),grant_types_supported:V0(R()).optional(),token_endpoint_auth_methods_supported:V0(R()).optional(),token_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),service_documentation:S6.optional(),revocation_endpoint:S6.optional(),revocation_endpoint_auth_methods_supported:V0(R()).optional(),revocation_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),introspection_endpoint:R().optional(),introspection_endpoint_auth_methods_supported:V0(R()).optional(),introspection_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),code_challenge_methods_supported:V0(R()).optional(),client_id_metadata_document_supported:m0().optional(),authorization_response_iss_parameter_supported:m0().optional().catch(void 0)}),OO=Q1({issuer:R(),authorization_endpoint:S6,token_endpoint:S6,userinfo_endpoint:S6.optional(),jwks_uri:S6,registration_endpoint:S6.optional(),scopes_supported:V0(R()).optional(),response_types_supported:V0(R()),response_modes_supported:V0(R()).optional(),grant_types_supported:V0(R()).optional(),acr_values_supported:V0(R()).optional(),subject_types_supported:V0(R()),id_token_signing_alg_values_supported:V0(R()),id_token_encryption_alg_values_supported:V0(R()).optional(),id_token_encryption_enc_values_supported:V0(R()).optional(),userinfo_signing_alg_values_supported:V0(R()).optional(),userinfo_encryption_alg_values_supported:V0(R()).optional(),userinfo_encryption_enc_values_supported:V0(R()).optional(),request_object_signing_alg_values_supported:V0(R()).optional(),request_object_encryption_alg_values_supported:V0(R()).optional(),request_object_encryption_enc_values_supported:V0(R()).optional(),token_endpoint_auth_methods_supported:V0(R()).optional(),token_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),display_values_supported:V0(R()).optional(),claim_types_supported:V0(R()).optional(),claims_supported:V0(R()).optional(),service_documentation:R().optional(),claims_locales_supported:V0(R()).optional(),ui_locales_supported:V0(R()).optional(),claims_parameter_supported:m0().optional(),request_parameter_supported:m0().optional(),request_uri_parameter_supported:m0().optional(),require_request_uri_registration:m0().optional(),op_policy_uri:S6.optional(),op_tos_uri:S6.optional(),client_id_metadata_document_supported:m0().optional(),authorization_response_iss_parameter_supported:m0().optional().catch(void 0)}),gh=z0({...OO.shape,...FO.pick({code_challenge_methods_supported:!0}).shape}),yh=z0({access_token:R(),id_token:R().optional(),token_type:R(),expires_in:kG.number().optional(),scope:R().optional(),refresh_token:R().optional()}).strip(),kh=z0({issued_token_type:L0("urn:ietf:params:oauth:token-type:id-jag"),access_token:R(),token_type:R().optional(),expires_in:R0().optional(),scope:R().optional()}).strip(),xh=z0({error:R(),error_description:R().optional(),error_uri:R().optional()}),Wh=S6.optional().or(L0("").transform(()=>{return})),wO=z0({redirect_uris:V0(S6),token_endpoint_auth_method:R().optional(),grant_types:V0(R()).optional(),response_types:V0(R()).optional(),application_type:R().optional(),client_name:R().optional(),client_uri:S6.optional(),logo_uri:Wh,scope:R().optional(),contacts:V0(R()).optional(),tos_uri:Wh,policy_uri:R().optional(),jwks_uri:S6.optional(),jwks:TL().optional(),software_id:R().optional(),software_version:R().optional(),software_statement:R().optional()}).strip(),MO=z0({client_id:R(),client_secret:R().optional(),client_id_issued_at:R0().optional(),client_secret_expires_at:R0().optional()}).strip(),fh=wO.merge(MO),uh=z0({error:R(),error_description:R().optional()}).strip(),bh=z0({token:R(),token_type_hint:R().optional()}).strip()});var Dt=m(()=>{Xt()});function oh($,Y){let z=new Set,U=Y;while(typeof U==="function"){let Q=U.mcpBrand;if(Object.prototype.hasOwnProperty.call(U,"mcpBrand")&&typeof Q==="string")z.add(Q);U=Object.getPrototypeOf(U)}if(z.size===0)return;Object.defineProperty($,ph,{value:z,enumerable:!1,configurable:!0})}function yQ($,Y){try{if(typeof Y==="object"&&Y!==null&&Object.prototype.hasOwnProperty.call($,"mcpBrand")&&typeof $.mcpBrand==="string"&&Object.prototype.hasOwnProperty.call(Y,ph)){let z=Y[ph];if(z&&typeof z.has==="function"&&z.has($.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call($,Y)}function At($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function rf0($,Y,z){return $==="elicitation"&&Y==="form"&&z.form===void 0&&z.url===void 0}function yt($){switch($.method){case"elicitation/create":if($.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let Y=$.params;if(Y!==void 0&&(Y.tools!==void 0||Y.toolChoice!==void 0))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}function EO($,Y){let z={};for(let[U,Q]of Object.entries($)){if(Q===void 0)continue;let J=Y===void 0?void 0:Y[U];if(J===void 0){z[U]=Q;continue}if(At(Q)&&At(J)){let I={};for(let[K,G]of Object.entries(Q))if(G!==void 0&&J[K]===void 0&&!rf0(U,K,J))I[K]=G;if(Object.keys(I).length>0)z[U]=I}}return Object.keys(z).length>0?z:void 0}function xQ($){return $>=kt}function xt($){return $.filter((Y)=>!xQ(Y))}function rh($){return $.filter((Y)=>xQ(Y))}function ft($){let Y=$.structuredContent;if(Y===void 0)return $;if(!(typeof Y!=="object"||Y===null||Array.isArray(Y)))return $;if($.content?.some((z)=>z.type==="text")??!1)return $;return{...$,content:[...$.content??[],{type:"text",text:JSON.stringify(Y)}]}}function sh($){if($===null||typeof $!=="object"||Array.isArray($)||$.content!==void 0||ut.some((Y)=>(Y in $)))return $;return{...$,content:[]}}function sf0(){let $=w7(()=>o0([R(),R0(),m0(),l5(),p0(R(),$),V0($)])),Y=p0(R(),$),z=o0([R(),R0().int()]),U=R(),Q=z0({ttl:R0().optional()}),J=z0({taskId:R()}),I=Q1({progressToken:z.optional(),"io.modelcontextprotocol/related-task":J.optional()}),K=z0({_meta:I.optional()}),G=K.extend({task:Q.optional()}),H=z0({method:R(),params:K.loose().optional()}),W=z0({_meta:I.optional()}),X=z0({method:R(),params:W.loose().optional()}),Z=Q1({_meta:I.optional()}),q=o0([R(),R0().int()]),V=Z.strict(),F=W.extend({requestId:q.optional(),reason:R().optional()}),w=X.extend({method:L0("notifications/cancelled"),params:F}),O=z0({src:R(),mimeType:R().optional(),sizes:V0(R()).optional(),theme:W1(["light","dark"]).optional()}),N=z0({icons:V0(O).optional()}),M=z0({name:R(),title:R().optional()}),D=M.extend({...M.shape,...N.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),P=U5(z0({applyDefaults:m0().optional()}),Y),j=l9((N6)=>{if(N6&&typeof N6==="object"&&!Array.isArray(N6)&&Object.keys(N6).length===0)return{form:{}};return N6},U5(z0({form:P.optional(),url:Y.optional()}),Y.optional())),A=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({sampling:Q1({createMessage:Y.optional()}).optional(),elicitation:Q1({create:Y.optional()}).optional()}).optional()}),T=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({tools:Q1({call:Y.optional()}).optional()}).optional()}),C=z0({experimental:p0(R(),Y).optional(),sampling:z0({context:Y.optional(),tools:Y.optional()}).optional(),elicitation:j.optional(),roots:z0({listChanged:m0().optional()}).optional(),tasks:A.optional(),extensions:p0(R(),Y).optional()}),b=K.extend({protocolVersion:R(),capabilities:C,clientInfo:D}),k=H.extend({method:L0("initialize"),params:b}),S=z0({experimental:p0(R(),Y).optional(),logging:Y.optional(),completions:Y.optional(),prompts:z0({listChanged:m0().optional()}).optional(),resources:z0({subscribe:m0().optional(),listChanged:m0().optional()}).optional(),tools:z0({listChanged:m0().optional()}).optional(),tasks:T.optional(),extensions:p0(R(),Y).optional()}),i=Z.extend({protocolVersion:R(),capabilities:S,serverInfo:D,instructions:R().optional()}),n=X.extend({method:L0("notifications/initialized"),params:W.optional()}),U0=H.extend({method:L0("ping"),params:K.optional()}),x=z0({progress:R0(),total:t0(R0()),message:t0(R())}),d=z0({...W.shape,...x.shape,progressToken:z}),t=X.extend({method:L0("notifications/progress"),params:d}),e=K.extend({cursor:U.optional()}),y=H.extend({params:e.optional()}),p=Z.extend({nextCursor:U.optional()}),Y0=z0({uri:R(),mimeType:t0(R()),_meta:p0(R(),a0()).optional()}),g=Y0.extend({text:R()}),a=R().refine((N6)=>{try{return atob(N6),!0}catch{return!1}},{message:"Invalid Base64 string"}),$0=Y0.extend({blob:a}),N0=W1(["user","assistant"]),T0=z0({audience:V0(N0).optional(),priority:R0().min(0).max(1).optional(),lastModified:J$.datetime({offset:!0}).optional()}),v0=z0({...M.shape,...N.shape,uri:R(),description:t0(R()),mimeType:t0(R()),size:t0(R0()),annotations:T0.optional(),_meta:t0(Q1({}))}),G0=z0({...M.shape,...N.shape,uriTemplate:R(),description:t0(R()),mimeType:t0(R()),annotations:T0.optional(),_meta:t0(Q1({}))}),f0=y.extend({method:L0("resources/list")}),e0=p.extend({resources:V0(v0)}),r=y.extend({method:L0("resources/templates/list")}),H0=p.extend({resourceTemplates:V0(G0)}),F0=K.extend({uri:R()}),b0=F0,i0=H.extend({method:L0("resources/read"),params:b0}),n0=Z.extend({contents:V0(o0([g,$0]))}),w1=X.extend({method:L0("notifications/resources/list_changed"),params:W.optional()}),k1=F0,u1=H.extend({method:L0("resources/subscribe"),params:k1}),b1=F0,A0=H.extend({method:L0("resources/unsubscribe"),params:b1}),Q0=W.extend({uri:R()}),B=X.extend({method:L0("notifications/resources/updated"),params:Q0}),v=z0({name:R(),description:t0(R()),required:t0(m0())}),u=z0({...M.shape,...N.shape,description:t0(R()),arguments:t0(V0(v)),_meta:t0(Q1({}))}),s=y.extend({method:L0("prompts/list")}),X0=p.extend({prompts:V0(u)}),J0=K.extend({name:R(),arguments:p0(R(),R()).optional()}),q0=H.extend({method:L0("prompts/get"),params:J0}),w0=z0({type:L0("text"),text:R(),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),B0=z0({type:L0("image"),data:a,mimeType:R(),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),r0=z0({type:L0("audio"),data:a,mimeType:R(),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),I1=z0({type:L0("tool_use"),name:R(),id:R(),input:p0(R(),a0()),_meta:p0(R(),a0()).optional()}),U1=z0({type:L0("resource"),resource:o0([g,$0]),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),A1=v0.extend({type:L0("resource_link")}),S1=o0([w0,B0,r0,A1,U1]),u4=z0({role:N0,content:S1}),N8=Z.extend({description:R().optional(),messages:V0(u4)}),$$=X.extend({method:L0("notifications/prompts/list_changed"),params:W.optional()}),v5=z0({title:R().optional(),readOnlyHint:m0().optional(),destructiveHint:m0().optional(),idempotentHint:m0().optional(),openWorldHint:m0().optional()}),a3=z0({taskSupport:W1(["required","optional","forbidden"]).optional()}),M$=z0({...M.shape,...N.shape,description:R().optional(),inputSchema:z0({type:L0("object"),properties:p0(R(),$).optional(),required:V0(R()).optional()}).catchall(a0()),outputSchema:z0({type:L0("object"),properties:p0(R(),$).optional(),required:V0(R()).optional()}).catchall(a0()).optional(),annotations:v5.optional(),execution:a3.optional(),_meta:p0(R(),a0()).optional()}),y9=y.extend({method:L0("tools/list")}),k9=p.extend({tools:V0(M$)}),t3=Z.extend({content:V0(S1),structuredContent:p0(R(),a0()).optional(),isError:m0().optional()}),s4=G.extend({name:R(),arguments:p0(R(),a0()).optional()}),e3=H.extend({method:L0("tools/call"),params:s4}),zY=X.extend({method:L0("notifications/tools/list_changed"),params:W.optional()}),$7=W1(["debug","info","notice","warning","error","critical","alert","emergency"]),h5=K.extend({level:$7}),UY=H.extend({method:L0("logging/setLevel"),params:h5}),e$=W.extend({level:$7,logger:R().optional(),data:a0()}),QY=X.extend({method:L0("notifications/message"),params:e$}),$5=z0({name:R().optional()}),x9=z0({hints:V0($5).optional(),costPriority:R0().min(0).max(1).optional(),speedPriority:R0().min(0).max(1).optional(),intelligencePriority:R0().min(0).max(1).optional()}),JY=z0({mode:W1(["auto","required","none"]).optional()}),f9=z0({type:L0("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:V0(S1),structuredContent:z0({}).loose().optional(),isError:m0().optional(),_meta:p0(R(),a0()).optional()}),IY=O7("type",[w0,B0,r0]),Y$=O7("type",[w0,B0,r0,I1,f9]),KY=z0({role:N0,content:o0([Y$,V0(Y$)]),_meta:p0(R(),a0()).optional()}),S5=G.extend({messages:V0(KY),modelPreferences:x9.optional(),systemPrompt:R().optional(),includeContext:W1(["none","thisServer","allServers"]).optional(),temperature:R0().optional(),maxTokens:R0().int(),stopSequences:V0(R()).optional(),metadata:Y.optional(),tools:V0(M$).optional(),toolChoice:JY.optional()}),GY=H.extend({method:L0("sampling/createMessage"),params:S5}),HY=Z.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens"]).or(R())),role:N0,content:IY}),g5=Z.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:N0,content:o0([Y$,V0(Y$)])}),WY=z0({type:L0("boolean"),title:R().optional(),description:R().optional(),default:m0().optional()}),y5=z0({type:L0("string"),title:R().optional(),description:R().optional(),minLength:R0().optional(),maxLength:R0().optional(),format:W1(["email","uri","date","date-time"]).optional(),default:R().optional()}),XY=z0({type:W1(["number","integer"]),title:R().optional(),description:R().optional(),minimum:R0().optional(),maximum:R0().optional(),default:R0().optional()}),k5=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),default:R().optional()}),ZY=z0({type:L0("string"),title:R().optional(),description:R().optional(),oneOf:V0(z0({const:R(),title:R()})),default:R().optional()}),x5=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),enumNames:V0(R()).optional(),default:R().optional()}),qY=o0([k5,ZY]),f5=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({type:L0("string"),enum:V0(R())}),default:V0(R()).optional()}),u9=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({anyOf:V0(z0({const:R(),title:R()}))}),default:V0(R()).optional()}),b9=o0([f5,u9]),VY=o0([x5,qY,b9]),J8=o0([VY,WY,y5,XY]),I8=G.extend({mode:L0("form").optional(),message:R(),requestedSchema:z0({type:L0("object"),properties:p0(R(),J8),required:V0(R()).optional()}).catchall(a0())}),LY=G.extend({mode:L0("url"),message:R(),elicitationId:R(),url:R().url()}),K8=o0([I8,LY]),FY=H.extend({method:L0("elicitation/create"),params:K8}),OY=W.extend({elicitationId:R()}),wY=X.extend({method:L0("notifications/elicitation/complete"),params:OY}),i9=Z.extend({action:W1(["accept","decline","cancel"]),content:l9((N6)=>N6===null?void 0:N6,p0(R(),o0([R(),R0(),m0(),V0(R())])).optional())}),MY=z0({type:L0("ref/resource"),uri:R()}),Y7=z0({type:L0("ref/prompt"),name:R()}),NY=K.extend({ref:o0([Y7,MY]),argument:z0({name:R(),value:R()}),context:z0({arguments:p0(R(),R()).optional()}).optional()}),z7=H.extend({method:L0("completion/complete"),params:NY}),U7=Z.extend({completion:Q1({values:V0(R()).max(100),total:t0(R0().int()),hasMore:t0(m0())})}),DY=z0({uri:R().startsWith("file://"),name:R().optional(),_meta:p0(R(),a0()).optional()}),Q7=H.extend({method:L0("roots/list"),params:K.optional()}),J7=Z.extend({roots:V0(DY)}),I7=X.extend({method:L0("notifications/roots/list_changed"),params:W.optional()}),AY=Q1({ttl:R0().optional(),pollInterval:R0().optional()}),nU=W1(["working","input_required","completed","failed","cancelled"]),Y5=z0({taskId:R(),status:nU,ttl:o0([R0(),l5()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:t0(R0()),statusMessage:t0(R())}),M6=Z.extend({task:Y5}),n9=W.merge(Y5),u5=X.extend({method:L0("notifications/tasks/status"),params:n9}),b5=H.extend({method:L0("tasks/get"),params:K.extend({taskId:R()})}),K7=Z.merge(Y5),c9=H.extend({method:L0("tasks/result"),params:K.extend({taskId:R()})}),pK=Z.loose(),p6=y.extend({method:L0("tasks/list")}),b4=p.extend({tasks:V0(Y5)}),i5=H.extend({method:L0("tasks/cancel"),params:K.extend({taskId:R()})});return{JSONValueSchema:$,JSONObjectSchema:Y,ProgressTokenSchema:z,CursorSchema:U,TaskMetadataSchema:Q,RelatedTaskMetadataSchema:J,RequestMetaSchema:I,BaseRequestParamsSchema:K,TaskAugmentedRequestParamsSchema:G,RequestSchema:H,NotificationsParamsSchema:W,NotificationSchema:X,ResultSchema:Z,RequestIdSchema:q,EmptyResultSchema:V,CancelledNotificationParamsSchema:F,CancelledNotificationSchema:w,IconSchema:O,IconsSchema:N,BaseMetadataSchema:M,ImplementationSchema:D,ClientTasksCapabilitySchema:A,ServerTasksCapabilitySchema:T,ClientCapabilitiesSchema:C,InitializeRequestParamsSchema:b,InitializeRequestSchema:k,ServerCapabilitiesSchema:S,InitializeResultSchema:i,InitializedNotificationSchema:n,PingRequestSchema:U0,ProgressSchema:x,ProgressNotificationParamsSchema:d,ProgressNotificationSchema:t,PaginatedRequestParamsSchema:e,PaginatedRequestSchema:y,PaginatedResultSchema:p,ResourceContentsSchema:Y0,TextResourceContentsSchema:g,BlobResourceContentsSchema:$0,RoleSchema:N0,AnnotationsSchema:T0,ResourceSchema:v0,ResourceTemplateSchema:G0,ListResourcesRequestSchema:f0,ListResourcesResultSchema:e0,ListResourceTemplatesRequestSchema:r,ListResourceTemplatesResultSchema:H0,ResourceRequestParamsSchema:F0,ReadResourceRequestParamsSchema:b0,ReadResourceRequestSchema:i0,ReadResourceResultSchema:n0,ResourceListChangedNotificationSchema:w1,SubscribeRequestParamsSchema:k1,SubscribeRequestSchema:u1,UnsubscribeRequestParamsSchema:b1,UnsubscribeRequestSchema:A0,ResourceUpdatedNotificationParamsSchema:Q0,ResourceUpdatedNotificationSchema:B,PromptArgumentSchema:v,PromptSchema:u,ListPromptsRequestSchema:s,ListPromptsResultSchema:X0,GetPromptRequestParamsSchema:J0,GetPromptRequestSchema:q0,TextContentSchema:w0,ImageContentSchema:B0,AudioContentSchema:r0,ToolUseContentSchema:I1,EmbeddedResourceSchema:U1,ResourceLinkSchema:A1,ContentBlockSchema:S1,PromptMessageSchema:u4,GetPromptResultSchema:N8,PromptListChangedNotificationSchema:$$,ToolAnnotationsSchema:v5,ToolExecutionSchema:a3,ToolSchema:M$,ListToolsRequestSchema:y9,ListToolsResultSchema:k9,CallToolResultSchema:t3,CallToolRequestParamsSchema:s4,CallToolRequestSchema:e3,ToolListChangedNotificationSchema:zY,LoggingLevelSchema:$7,SetLevelRequestParamsSchema:h5,SetLevelRequestSchema:UY,LoggingMessageNotificationParamsSchema:e$,LoggingMessageNotificationSchema:QY,ModelHintSchema:$5,ModelPreferencesSchema:x9,ToolChoiceSchema:JY,ToolResultContentSchema:f9,SamplingContentSchema:IY,SamplingMessageContentBlockSchema:Y$,SamplingMessageSchema:KY,CreateMessageRequestParamsSchema:S5,CreateMessageRequestSchema:GY,CreateMessageResultSchema:HY,CreateMessageResultWithToolsSchema:g5,BooleanSchemaSchema:WY,StringSchemaSchema:y5,NumberSchemaSchema:XY,UntitledSingleSelectEnumSchemaSchema:k5,TitledSingleSelectEnumSchemaSchema:ZY,LegacyTitledEnumSchemaSchema:x5,SingleSelectEnumSchemaSchema:qY,UntitledMultiSelectEnumSchemaSchema:f5,TitledMultiSelectEnumSchemaSchema:u9,MultiSelectEnumSchemaSchema:b9,EnumSchemaSchema:VY,PrimitiveSchemaDefinitionSchema:J8,ElicitRequestFormParamsSchema:I8,ElicitRequestURLParamsSchema:LY,ElicitRequestParamsSchema:K8,ElicitRequestSchema:FY,ElicitationCompleteNotificationParamsSchema:OY,ElicitationCompleteNotificationSchema:wY,ElicitResultSchema:i9,ResourceTemplateReferenceSchema:MY,PromptReferenceSchema:Y7,CompleteRequestParamsSchema:NY,CompleteRequestSchema:z7,CompleteResultSchema:U7,RootSchema:DY,ListRootsRequestSchema:Q7,ListRootsResultSchema:J7,RootsListChangedNotificationSchema:I7,TaskCreationParamsSchema:AY,TaskStatusSchema:nU,TaskSchema:Y5,CreateTaskResultSchema:M6,TaskStatusNotificationParamsSchema:n9,TaskStatusNotificationSchema:u5,GetTaskRequestSchema:b5,GetTaskResultSchema:K7,GetTaskPayloadRequestSchema:c9,GetTaskPayloadResultSchema:pK,ListTasksRequestSchema:p6,ListTasksResultSchema:b4,CancelTaskRequestSchema:i5,CancelTaskResultSchema:Z.merge(Y5),ClientRequestSchema:o0([U0,k,z7,UY,q0,s,f0,r,i0,u1,A0,e3,y9,b5,c9,p6,i5]),ClientNotificationSchema:o0([w,t,n,I7,u5]),ClientResultSchema:o0([V,HY,g5,i9,J7,K7,b4,M6]),ServerRequestSchema:o0([U0,GY,FY,Q7,b5,c9,p6,i5]),ServerNotificationSchema:o0([w,t,QY,B,w1,zY,$$,u5,wY]),ServerResultSchema:o0([V,i,U7,N8,X0,e0,H0,n0,t3,k9,K7,b4,M6]),CallToolResultWireSchema:a0().superRefine((N6,dK)=>{if(typeof N6!=="object"||N6===null||Array.isArray(N6)||N6.content!==void 0)return;for(let mK of ut)if(mK in N6){dK.addIssue({code:"custom",message:`content is required when the body carries '${mK}' — another result family cannot default into an empty tools/call success`});return}}).transform(sh).pipe(t3)}}function bt(){return af0??=sf0()}function it($){return $.type!=="object"}function Bt($){return $!==void 0&&!(typeof $==="string"&&$.startsWith("#"))}function $u0($){let Y=typeof $.$schema==="string"?$.$schema:void 0;if(Bt($.$id))return{...Y!==void 0&&{$schema:Y},type:"object",properties:{result:$},required:["result"]};let z=Wr($.$schema)&&$.$recursiveAnchor!==!0,U=(Q,J)=>{if(Array.isArray(Q))return Q.map((G)=>U(G,!1));if(Q===null||typeof Q!=="object")return Q;if(!J&&Bt(Q.$id))return Q;let I={},K=!1;for(let[G,H]of Object.entries(Q))if(J)I[G]=U(H,!1);else if((G==="$ref"||G==="$dynamicRef")&&typeof H==="string")I[G]=H==="#"?"#/properties/result":H.startsWith("#/")?`#/properties/result${H.slice(1)}`:H;else if(G==="$recursiveRef"&&H==="#"&&z)K=!0;else if(tf0.has(G))I[G]=H;else if(ef0.has(G))I[G]=U(H,!0);else I[G]=U(H,!1);if(K)if("$ref"in I)I.allOf=[...Array.isArray(I.allOf)?I.allOf:[],{$ref:"#/properties/result"}];else I.$ref="#/properties/result";return I};return{...Y!==void 0&&{$schema:Y},type:"object",properties:{result:U($,!1)},required:["result"]}}function ah(){if(NO)return NO;let $=bt();return NO={requestSchemas:{ping:$.PingRequestSchema,initialize:$.InitializeRequestSchema,"completion/complete":$.CompleteRequestSchema,"logging/setLevel":$.SetLevelRequestSchema,"prompts/get":$.GetPromptRequestSchema,"prompts/list":$.ListPromptsRequestSchema,"resources/list":$.ListResourcesRequestSchema,"resources/templates/list":$.ListResourceTemplatesRequestSchema,"resources/read":$.ReadResourceRequestSchema,"resources/subscribe":$.SubscribeRequestSchema,"resources/unsubscribe":$.UnsubscribeRequestSchema,"tools/call":$.CallToolRequestSchema,"tools/list":$.ListToolsRequestSchema,"tasks/get":$.GetTaskRequestSchema,"tasks/result":$.GetTaskPayloadRequestSchema,"tasks/list":$.ListTasksRequestSchema,"tasks/cancel":$.CancelTaskRequestSchema,"sampling/createMessage":$.CreateMessageRequestSchema,"elicitation/create":$.ElicitRequestSchema,"roots/list":$.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":$.CancelledNotificationSchema,"notifications/progress":$.ProgressNotificationSchema,"notifications/initialized":$.InitializedNotificationSchema,"notifications/roots/list_changed":$.RootsListChangedNotificationSchema,"notifications/tasks/status":$.TaskStatusNotificationSchema,"notifications/message":$.LoggingMessageNotificationSchema,"notifications/resources/updated":$.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":$.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":$.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":$.PromptListChangedNotificationSchema,"notifications/elicitation/complete":$.ElicitationCompleteNotificationSchema},resultSchemas:{ping:$.EmptyResultSchema,initialize:$.InitializeResultSchema,"completion/complete":$.CompleteResultSchema,"logging/setLevel":$.EmptyResultSchema,"prompts/get":$.GetPromptResultSchema,"prompts/list":$.ListPromptsResultSchema,"resources/list":$.ListResourcesResultSchema,"resources/templates/list":$.ListResourceTemplatesResultSchema,"resources/read":$.ReadResourceResultSchema,"resources/subscribe":$.EmptyResultSchema,"resources/unsubscribe":$.EmptyResultSchema,"tools/call":$.CallToolResultWireSchema,"tools/list":$.ListToolsResultSchema,"sampling/createMessage":$.CreateMessageResultWithToolsSchema,"elicitation/create":$.ElicitResultSchema,"roots/list":$.ListRootsResultSchema}},NO}function pt($){return Object.prototype.hasOwnProperty.call(nt,$)}function dt($){return Object.prototype.hasOwnProperty.call(ct,$)}function zu0($){return Object.prototype.hasOwnProperty.call(Yu0,$)}function Uu0($){return zu0($)?ah().resultSchemas[$]:void 0}function Qu0($){return pt($)?ah().requestSchemas[$]:void 0}function Ju0($){return dt($)?ah().notificationSchemas[$]:void 0}function dh($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function DO($,Y){if($===void 0)return{ok:!1,reason:"not-in-era"};let z=$.safeParse(Y);return z.success?{ok:!0,value:z.data}:{ok:!1,reason:"invalid",message:String(z.error)}}function jt($){return dh($)&&dh($.outputSchema)&&it($.outputSchema)}function Tt($){return $}function Iu0(){let $=w7(()=>o0([R(),R0(),m0(),l5(),p0(R(),$),V0($)])),Y=p0(R(),$),z=o0([R(),R0().int()]),U=R(),Q=o0([R(),R0().int()]),J=W1(["user","assistant"]),I=W1(["debug","info","notice","warning","error","critical","alert","emergency"]),K=R().refine((b4)=>{try{return atob(b4),!0}catch{return!1}},{message:"Invalid Base64 string"}),G=z0({ttl:R0().optional()}),H=z0({taskId:R()}),W=Q1({progressToken:z.optional(),"io.modelcontextprotocol/related-task":H.optional()}),X=z0({_meta:W.optional()}),Z=X.extend({task:G.optional()}),q=z0({_meta:W.optional()}),V=z0({method:R(),params:q.loose().optional()}),F=z0({src:R(),mimeType:R().optional(),sizes:V0(R()).optional(),theme:W1(["light","dark"]).optional()}),w=z0({icons:V0(F).optional()}),O=z0({name:R(),title:R().optional()}),N=O.extend({...O.shape,...w.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),M=U5(z0({applyDefaults:m0().optional()}),Y),D=l9((b4)=>{if(b4&&typeof b4==="object"&&!Array.isArray(b4)&&Object.keys(b4).length===0)return{form:{}};return b4},U5(z0({form:M.optional(),url:Y.optional()}),Y.optional())),P=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({sampling:Q1({createMessage:Y.optional()}).optional(),elicitation:Q1({create:Y.optional()}).optional()}).optional()}),j=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({tools:Q1({call:Y.optional()}).optional()}).optional()}),A=z0({experimental:p0(R(),Y).optional(),sampling:z0({context:Y.optional(),tools:Y.optional()}).optional(),elicitation:D.optional(),roots:z0({listChanged:m0().optional()}).optional(),tasks:P.optional(),extensions:p0(R(),Y).optional()}),T=z0({experimental:p0(R(),Y).optional(),logging:Y.optional(),completions:Y.optional(),prompts:z0({listChanged:m0().optional()}).optional(),resources:z0({subscribe:m0().optional(),listChanged:m0().optional()}).optional(),tools:z0({listChanged:m0().optional()}).optional(),tasks:j.optional(),extensions:p0(R(),Y).optional()}),C=z0({progress:R0(),total:t0(R0()),message:t0(R())}),b=z0({...q.shape,...C.shape,progressToken:z}),k=V.extend({method:L0("notifications/progress"),params:b}),S=q.extend({level:I,logger:R().optional(),data:a0()}),i=V.extend({method:L0("notifications/message"),params:S}),n=z0({uri:R(),mimeType:t0(R()),_meta:p0(R(),a0()).optional()}),U0=n.extend({text:R()}),x=n.extend({blob:K}),d=z0({audience:V0(J).optional(),priority:R0().min(0).max(1).optional(),lastModified:J$.datetime({offset:!0}).optional()}),t=z0({...O.shape,...w.shape,uri:R(),description:t0(R()),mimeType:t0(R()),size:t0(R0()),annotations:d.optional(),_meta:t0(Q1({}))}),e=z0({...O.shape,...w.shape,uriTemplate:R(),description:t0(R()),mimeType:t0(R()),annotations:d.optional(),_meta:t0(Q1({}))}),y=V.extend({method:L0("notifications/resources/list_changed"),params:q.optional()}),p=q.extend({uri:R()}),Y0=V.extend({method:L0("notifications/resources/updated"),params:p}),g=z0({name:R(),description:t0(R()),required:t0(m0())}),a=z0({...O.shape,...w.shape,description:t0(R()),arguments:t0(V0(g)),_meta:t0(Q1({}))}),$0=V.extend({method:L0("notifications/prompts/list_changed"),params:q.optional()}),N0=z0({type:L0("text"),text:R(),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),T0=z0({type:L0("image"),data:K,mimeType:R(),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),v0=z0({type:L0("audio"),data:K,mimeType:R(),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),G0=z0({type:L0("tool_use"),name:R(),id:R(),input:p0(R(),a0()),_meta:p0(R(),a0()).optional()}),f0=z0({type:L0("resource"),resource:o0([U0,x]),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),e0=t.extend({type:L0("resource_link")}),r=o0([N0,T0,v0,e0,f0]),H0=z0({role:J,content:r}),F0=z0({title:R().optional(),readOnlyHint:m0().optional(),destructiveHint:m0().optional(),idempotentHint:m0().optional(),openWorldHint:m0().optional()}),b0=V.extend({method:L0("notifications/tools/list_changed"),params:q.optional()}),i0=z0({name:R().optional()}),n0=z0({hints:V0(i0).optional(),costPriority:R0().min(0).max(1).optional(),speedPriority:R0().min(0).max(1).optional(),intelligencePriority:R0().min(0).max(1).optional()}),w1=z0({mode:W1(["auto","required","none"]).optional()}),k1=z0({type:L0("boolean"),title:R().optional(),description:R().optional(),default:m0().optional()}),u1=z0({type:L0("string"),title:R().optional(),description:R().optional(),minLength:R0().optional(),maxLength:R0().optional(),format:W1(["email","uri","date","date-time"]).optional(),default:R().optional()}),b1=z0({type:W1(["number","integer"]),title:R().optional(),description:R().optional(),minimum:R0().optional(),maximum:R0().optional(),default:R0().optional()}),A0=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),default:R().optional()}),Q0=z0({type:L0("string"),title:R().optional(),description:R().optional(),oneOf:V0(z0({const:R(),title:R()})),default:R().optional()}),B=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),enumNames:V0(R()).optional(),default:R().optional()}),v=o0([A0,Q0]),u=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({type:L0("string"),enum:V0(R())}),default:V0(R()).optional()}),s=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({anyOf:V0(z0({const:R(),title:R()}))}),default:V0(R()).optional()}),X0=o0([u,s]),J0=o0([B,v,X0]),q0=o0([J0,k1,u1,b1]),w0=Z.extend({mode:L0("form").optional(),message:R(),requestedSchema:z0({type:L0("object"),properties:p0(R(),q0),required:V0(R()).optional()}).catchall(a0())}),B0=z0({type:L0("ref/resource"),uri:R()}),r0=z0({type:L0("ref/prompt"),name:R()}),I1=z0({uri:R().startsWith("file://"),name:R().optional(),_meta:p0(R(),a0()).optional()}),U1=A.shape,A1=z0({experimental:U1.experimental,sampling:U1.sampling,elicitation:U1.elicitation,roots:U1.roots,extensions:U1.extensions}),S1=T.shape,u4=z0({experimental:S1.experimental,logging:S1.logging,completions:S1.completions,prompts:S1.prompts,resources:S1.resources,tools:S1.tools,extensions:S1.extensions}),N8=Q1({progressToken:z.optional(),[r9]:R(),[AQ]:N.optional(),[s9]:A1,[N7]:I.optional()}),$$=z0({...O.shape,...w.shape,description:R().optional(),inputSchema:Q1({$schema:R().optional(),type:L0("object")}),outputSchema:Q1({$schema:R().optional()}).optional(),annotations:F0.optional(),_meta:p0(R(),a0()).optional()}),v5=z0({type:L0("tool_result"),toolUseId:R(),content:V0(r),structuredContent:a0().optional(),isError:m0().optional(),_meta:p0(R(),a0()).optional()}),a3=o0([N0,T0,v0,G0,v5]),M$=z0({role:J,content:o0([a3,V0(a3)]),_meta:p0(R(),a0()).optional()}),y9=R(),k9=Q1({[o5]:N.optional().catch(void 0)}),t3=k9.optional();function s4(b4){return Q1({_meta:t3,resultType:y9.default("complete"),...b4})}let e3=s4({}),zY=s4({nextCursor:U.optional()}),$7=s4({content:V0(r),structuredContent:a0().optional(),isError:m0().optional()}),h5=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),tools:V0($$),nextCursor:U.optional()}),UY=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),prompts:V0(a),nextCursor:U.optional()}),e$=s4({description:R().optional(),messages:V0(H0)}),QY=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resources:V0(t),nextCursor:U.optional()}),$5=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resourceTemplates:V0(e),nextCursor:U.optional()}),x9=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),contents:V0(o0([U0,x]))}),JY=s4({completion:z0({values:V0(R()).max(100),total:R0().int().optional(),hasMore:m0().optional()}).loose()}),f9=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"])}),IY=s4({ttlMs:R0().int().min(0).catch(0),cacheScope:W1(["public","private"]).catch("private"),supportedVersions:V0(R()),capabilities:u4,instructions:R().optional()}),Y$=z0({messages:V0(M$),modelPreferences:n0.optional(),systemPrompt:R().optional(),includeContext:W1(["none","thisServer","allServers"]).optional(),temperature:R0().optional(),maxTokens:R0().int(),stopSequences:V0(R()).optional(),metadata:Y.optional(),tools:V0($$).optional(),toolChoice:w1.optional()}),KY=z0({method:L0("sampling/createMessage"),params:Y$}),S5=z0({method:L0("roots/list"),params:z0({_meta:p0(R(),a0()).optional()}).optional()}),GY=z0({...M$.shape,model:R(),stopReason:R().optional()}),HY=z0({roots:V0(I1)}),g5=z0({action:W1(["accept","decline","cancel"]),content:p0(R(),o0([R(),R0(),m0(),V0(R())])).optional()}),WY=z0({mode:L0("url"),message:R(),url:R().url()}),y5=o0([w0,WY]),XY=z0({method:L0("elicitation/create"),params:y5}),k5=o0([KY,S5,XY]),ZY=o0([GY,HY,g5]),x5=p0(R(),k5),qY=p0(R(),ZY),f5=s4({inputRequests:x5.optional(),requestState:R().optional()}),u9={inputResponses:qY.optional(),requestState:R().optional()},b9=z0({_meta:N8,...u9}),VY=Q1({progressToken:z.optional()});function J8(b4,i5){return z0({method:L0(b4),params:z0({_meta:N8,...i5})})}function I8(b4,i5){return z0({method:L0(b4),params:z0({_meta:VY.optional(),...i5}).optional()})}let LY={name:R(),arguments:p0(R(),a0()).optional(),...u9},K8={cursor:U.optional()},FY=J8("tools/call",LY),OY=J8("tools/list",K8),wY=J8("prompts/list",K8),i9=J8("prompts/get",{name:R(),arguments:p0(R(),R()).optional(),...u9}),MY=J8("resources/list",K8),Y7=J8("resources/templates/list",K8),NY=J8("resources/read",{uri:R(),...u9}),z7={ref:o0([r0,B0]),argument:z0({name:R(),value:R()}),context:z0({arguments:p0(R(),R()).optional()}).optional()},U7=J8("completion/complete",z7),DY=J8("server/discover",{}),Q7=z0({toolsListChanged:m0().optional(),promptsListChanged:m0().optional(),resourcesListChanged:m0().optional(),resourceSubscriptions:V0(R()).optional()}),J7={notifications:Q7},I7=J8("subscriptions/listen",J7),AY=k9.extend({"io.modelcontextprotocol/subscriptionId":Q}),nU=Q1({_meta:AY,resultType:y9.default("complete")}),Y5={"tools/call":I8("tools/call",LY),"tools/list":I8("tools/list",K8),"prompts/get":I8("prompts/get",{name:R(),arguments:p0(R(),R()).optional()}),"prompts/list":I8("prompts/list",K8),"resources/list":I8("resources/list",K8),"resources/templates/list":I8("resources/templates/list",K8),"resources/read":I8("resources/read",{uri:R()}),"completion/complete":I8("completion/complete",z7),"server/discover":I8("server/discover",{}),"subscriptions/listen":I8("subscriptions/listen",J7)};function M6(b4){return Q1({_meta:t3,...b4})}let n9={"tools/call":M6({content:V0(r),structuredContent:a0().optional(),isError:m0().optional()}),"tools/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),tools:V0($$),nextCursor:U.optional()}),"prompts/get":M6({description:R().optional(),messages:V0(H0)}),"prompts/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),prompts:V0(a),nextCursor:U.optional()}),"resources/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resources:V0(t),nextCursor:U.optional()}),"resources/templates/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resourceTemplates:V0(e),nextCursor:U.optional()}),"resources/read":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),contents:V0(o0([U0,x]))}),"completion/complete":M6({completion:z0({values:V0(R()).max(100),total:R0().int().optional(),hasMore:m0().optional()}).loose()}),"server/discover":M6({ttlMs:R0().int().min(0).catch(0),cacheScope:W1(["public","private"]).catch("private"),supportedVersions:V0(R()),capabilities:u4,instructions:R().optional()}),"subscriptions/listen":M6({})},u5=Q1({"io.modelcontextprotocol/subscriptionId":Q.optional()}),b5=z0({method:L0("notifications/subscriptions/acknowledged"),params:z0({_meta:u5.optional(),notifications:Q7})}),K7=z0({_meta:u5.optional(),requestId:Q,reason:R().optional()}),c9=z0({method:L0("notifications/cancelled"),params:K7}),pK={"notifications/cancelled":c9,"notifications/progress":k,"notifications/message":i,"notifications/resources/updated":Y0,"notifications/resources/list_changed":y,"notifications/tools/list_changed":b0,"notifications/prompts/list_changed":$0,"notifications/subscriptions/acknowledged":b5},p6=(b4)=>z0({jsonrpc:L0("2.0"),id:o0([R(),R0().int()]),result:b4}).strict();return{JSONValueSchema:$,JSONObjectSchema:Y,ProgressTokenSchema:z,CursorSchema:U,RequestIdSchema:Q,RoleSchema:J,LoggingLevelSchema:I,TaskMetadataSchema:G,RelatedTaskMetadataSchema:H,RequestMetaSchema:W,BaseRequestParamsSchema:X,TaskAugmentedRequestParamsSchema:Z,NotificationsParamsSchema:q,NotificationSchema:V,IconSchema:F,IconsSchema:w,BaseMetadataSchema:O,ImplementationSchema:N,ClientTasksCapabilitySchema:P,ServerTasksCapabilitySchema:j,ClientCapabilitiesSchema:A,ServerCapabilitiesSchema:T,ProgressSchema:C,ProgressNotificationParamsSchema:b,ProgressNotificationSchema:k,LoggingMessageNotificationParamsSchema:S,LoggingMessageNotificationSchema:i,ResourceContentsSchema:n,TextResourceContentsSchema:U0,BlobResourceContentsSchema:x,AnnotationsSchema:d,ResourceSchema:t,ResourceTemplateSchema:e,ResourceListChangedNotificationSchema:y,ResourceUpdatedNotificationParamsSchema:p,ResourceUpdatedNotificationSchema:Y0,PromptArgumentSchema:g,PromptSchema:a,PromptListChangedNotificationSchema:$0,TextContentSchema:N0,ImageContentSchema:T0,AudioContentSchema:v0,ToolUseContentSchema:G0,EmbeddedResourceSchema:f0,ResourceLinkSchema:e0,ContentBlockSchema:r,PromptMessageSchema:H0,ToolAnnotationsSchema:F0,ToolListChangedNotificationSchema:b0,ModelHintSchema:i0,ModelPreferencesSchema:n0,ToolChoiceSchema:w1,BooleanSchemaSchema:k1,StringSchemaSchema:u1,NumberSchemaSchema:b1,UntitledSingleSelectEnumSchemaSchema:A0,TitledSingleSelectEnumSchemaSchema:Q0,LegacyTitledEnumSchemaSchema:B,SingleSelectEnumSchemaSchema:v,UntitledMultiSelectEnumSchemaSchema:u,TitledMultiSelectEnumSchemaSchema:s,MultiSelectEnumSchemaSchema:X0,EnumSchemaSchema:J0,PrimitiveSchemaDefinitionSchema:q0,ElicitRequestFormParamsSchema:w0,ResourceTemplateReferenceSchema:B0,PromptReferenceSchema:r0,RootSchema:I1,ClientCapabilities2026Schema:A1,ServerCapabilities2026Schema:u4,RequestMetaEnvelopeSchema:N8,ToolSchema:$$,ToolResultContentSchema:v5,SamplingMessageContentBlockSchema:a3,SamplingMessageSchema:M$,ResultTypeSchema:y9,ResultMetaSchema:k9,ResultSchema:e3,PaginatedResultSchema:zY,CallToolResultSchema:$7,ListToolsResultSchema:h5,ListPromptsResultSchema:UY,GetPromptResultSchema:e$,ListResourcesResultSchema:QY,ListResourceTemplatesResultSchema:$5,ReadResourceResultSchema:x9,CompleteResultSchema:JY,CacheableResultSchema:f9,DiscoverResultSchema:IY,CreateMessageRequestParamsSchema:Y$,CreateMessageRequestSchema:KY,ListRootsRequestSchema:S5,CreateMessageResultSchema:GY,ListRootsResultSchema:HY,ElicitResultSchema:g5,ElicitRequestURLParamsSchema:WY,ElicitRequestParamsSchema:y5,ElicitRequestSchema:XY,InputRequestSchema:k5,InputResponseSchema:ZY,InputRequestsSchema:x5,InputResponsesSchema:qY,InputRequiredResultSchema:f5,InputResponseRequestParamsSchema:b9,CallToolRequestSchema:FY,ListToolsRequestSchema:OY,ListPromptsRequestSchema:wY,GetPromptRequestSchema:i9,ListResourcesRequestSchema:MY,ListResourceTemplatesRequestSchema:Y7,ReadResourceRequestSchema:NY,CompleteRequestSchema:U7,DiscoverRequestSchema:DY,SubscriptionFilterSchema:Q7,SubscriptionsListenRequestSchema:I7,SubscriptionsListenResultMetaSchema:AY,SubscriptionsListenResultSchema:nU,dispatchRequestSchemas:Y5,dispatchResultSchemas:n9,NotificationMetaSchema:u5,SubscriptionsAcknowledgedNotificationSchema:b5,CancelledNotificationParamsSchema:K7,CancelledNotificationSchema:c9,notificationSchemas2026:pK,JSONRPCResultResponseSchema:p6(e3),CallToolResultResponseSchema:p6(o0([$7,f5])),ListToolsResultResponseSchema:p6(h5),ListPromptsResultResponseSchema:p6(UY),GetPromptResultResponseSchema:p6(o0([e$,f5])),ListResourcesResultResponseSchema:p6(QY),ListResourceTemplatesResultResponseSchema:p6($5),ReadResourceResultResponseSchema:p6(o0([x9,f5])),CompleteResultResponseSchema:p6(JY),DiscoverResultResponseSchema:p6(IY)}}function nY(){return Ku0??=Iu0()}function Hu0($){return Gu0.includes($)}function CO($,Y){if(Y===void 0)return $;let z=$[gQ];if(z===void 0)return{...$,[gQ]:Y};let U={},Q=z.ttlMs??Y.ttlMs;if(Q!==void 0)U.ttlMs=Q;let J=z.cacheScope??Y.cacheScope;if(J!==void 0)U.cacheScope=J;return{...$,[gQ]:U}}function Wu0($){return $[gQ]}function eh($){return typeof $==="number"&&Number.isSafeInteger($)&&$>=0}function $S($){return $==="public"||$==="private"}function YS($,Y){if($.ttlMs!==void 0&&!eh($.ttlMs))throw RangeError(`Invalid cache hint for ${Y}: ttlMs must be a non-negative safe integer (got ${String($.ttlMs)})`);if($.cacheScope!==void 0&&!$S($.cacheScope))throw RangeError(`Invalid cache hint for ${Y}: cacheScope must be 'public' or 'private' (got ${String($.cacheScope)})`)}function Vu0($,Y){let z=Y.resultType;if(z===void 0)return{...Y,resultType:"complete"};if(z==="complete")return Y;if(qu0.includes($))return Y;throw new J1(c0.InternalError,`Handler for ${$} returned resultType '${String(z)}', but results of ${$} only support 'complete' on protocol revision 2026-07-28`)}function Lu0($,Y){let z=Wu0(Y);if(Y.resultType!=="complete"||!Hu0($))return z===void 0?Y:Nu0(Y);let U=Y,Q=eh(U.ttlMs)?U.ttlMs:wu0(z),J=$S(U.cacheScope)?U.cacheScope:Mu0(z),I={...U,ttlMs:Q,cacheScope:J};return delete I[gQ],I}function Fu0($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function Ou0($,Y){if(Y===void 0)return $;let z=$._meta;if(z===void 0)return{...$,_meta:{[o5]:Y}};if(!Fu0(z))return $;if(z[o5]!==void 0)return $;return{...$,_meta:{...z,[o5]:Y}}}function wu0($){return $!==void 0&&eh($.ttlMs)?$.ttlMs:Xu0}function Mu0($){return $!==void 0&&$S($.cacheScope)?$.cacheScope:Zu0}function Nu0($){let Y={...$};return delete Y[gQ],Y}function lt(){if(AO)return AO;let $=nY();return AO={request:{"elicitation/create":z0({method:L0("elicitation/create"),params:$.ElicitRequestParamsSchema}),"sampling/createMessage":z0({method:L0("sampling/createMessage"),params:$.CreateMessageRequestParamsSchema}),"roots/list":z0({method:L0("roots/list"),params:Q1({}).optional()})},response:{"elicitation/create":$.ElicitResultSchema,"sampling/createMessage":$.CreateMessageResultSchema,"roots/list":$.ListRootsResultSchema}},AO}function ot($){return Du0.includes($)}function ih($){return ot($)?lt().request[$]:void 0}function Au0($){return ot($)?lt().response[$]:void 0}function st($){return Object.prototype.hasOwnProperty.call(zS,$)}function at($){return Object.prototype.hasOwnProperty.call(rt,$)}function Bu0($){return Object.prototype.hasOwnProperty.call(zS,$)}function Pu0($){return st($)?nY().dispatchRequestSchemas[$]:void 0}function ju0($){return Bu0($)?nY().dispatchResultSchemas[$]:void 0}function Tu0($){return at($)?nY().notificationSchemas2026[$]:void 0}function XH($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function HH($,Y){if($===void 0)return{ok:!1,reason:"not-in-era"};let z=$.safeParse(Y);return z.success?{ok:!0,value:z.data}:{ok:!1,reason:"invalid",message:String(z.error)}}function Ru0($,Y){let z=Y,U=!1,Q=()=>{if(!U)z={...z},U=!0;return z},J=Y.tools;if($==="tools/list"&&Array.isArray(J)&&J.some((K)=>XH(K)&&("execution"in K)))Q().tools=J.map((K)=>{if(!XH(K)||!("execution"in K))return K;let G={...K};return delete G.execution,G});let I=Y.capabilities;if(XH(I)&&"tasks"in I){let K={...I};delete K.tasks,Q().capabilities=K}return z}function _u0(){if(BO)return BO;let $=nY();return BO={"tools/call":$.CallToolResultSchema,"tools/list":$.ListToolsResultSchema,"prompts/get":$.GetPromptResultSchema,"prompts/list":$.ListPromptsResultSchema,"resources/list":$.ListResourcesResultSchema,"resources/templates/list":$.ListResourceTemplatesResultSchema,"resources/read":$.ReadResourceResultSchema,"completion/complete":$.CompleteResultSchema,"server/discover":$.DiscoverResultSchema},BO}function C7($){return $!==void 0&&xQ($)?US:th}function Et($){if($.revision!==void 0)return C7($.revision).era;return $.era==="modern"?US.era:th.era}function nh($){return tt.some((Y)=>Y.hasRequestMethod($))}function ch($){return tt.some((Y)=>Y.hasNotificationMethod($))}function Ct($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function cY($){if(!Ct($))return;let Y=$._meta;return Ct(Y)?Y:void 0}function vO($){let Y=cY($);return Y!==void 0&&r9 in Y}function hO($){let Y=cY($)?.[r9];return typeof Y==="string"?Y:void 0}function SO($){return C7(LH).validateEnvelopeMeta($)}function QS($){if($.params.ref.type!=="ref/prompt")throw TypeError(`Expected CompleteRequestPrompt, but got ${$.params.ref.type}`)}function JS($){if($.params.ref.type!=="ref/resource")throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${$.params.ref.type}`)}function IS($){let Y=[],z=new Map,U=(J,I,K)=>{if(J===null||typeof J!=="object")return;let G=J;if(Rt in G){if(!K||I.length===0)return`${PO(I)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let W=G[Rt];if(typeof W!=="string"||W.length===0)return`${PO(I)}: x-mcp-header MUST be a non-empty string`;if(!hu0.test(W))return`${PO(I)}: x-mcp-header '${W}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let X=typeof G.type==="string"?G.type:void 0;if(X===void 0||!Su0.has(X))return`${PO(I)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${X??""}`;let Z=W.toLowerCase(),q=z.get(Z);if(q!==void 0)return`x-mcp-header '${W}' is not case-insensitively unique (also declared as '${q}')`;z.set(Z,W),Y.push({path:I,headerName:W,type:X})}let H=G.properties;if(H!==null&&typeof H==="object")for(let[W,X]of Object.entries(H)){let Z=U(X,[...I,W],K);if(Z!==void 0)return Z}for(let W of gu0){let X=G[W];if(X===void 0)continue;let Z=Array.isArray(X)?X:X!==null&&typeof X==="object"&&yu0.has(W)?Object.values(X):[X];for(let q of Z){let V=U(q,[...I,`<${W}>`],!1);if(V!==void 0)return V}}},Q=U($,[],!0);return Q===void 0?{valid:!0,declarations:Y}:{valid:!1,reason:Q}}function PO($){return $.length===0?"":$.join(".")}function jO($,Y,z,U,Q){return{kind:"reject",rung:$,cell:Y,httpStatus:z,code:U.code,message:U.message,...U.data!==void 0&&{data:U.data},settled:Q}}function KS($){if(!vO($))return!1;let Y=hO($);if(Y===void 0||!xQ(Y))return!1;let z=cY($);return z!==void 0&&SO(z).length===0}function GS($,Y){switch($.reason){case"http-method":return jO("http-method","modern-only-method-not-allowed",405,new J1(-32000,"Method not allowed."),!0);case"batch":return jO("jsonrpc-shape","modern-only-batch-not-supported",400,new J1(c0.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),!0);case"response":return jO("jsonrpc-shape","modern-only-response-post",400,new J1(c0.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),!0);case"notification":return;case"initialize":case"no-claim":{let z=$.requestedVersion;return jO("era-classification","modern-only-missing-envelope",400,z===void 0?new J1(c0.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...Y]}):new fQ({supported:[...Y],requested:z}),!0)}}}function yO($,Y){return jG($,Y)}function WH($){return new Set($.flatMap((Y)=>Object.keys(Y.shape)))}function kQ($){if($==null)return!1;let Y=typeof $;if(Y!=="object"&&Y!=="function")return!1;if(!("~standard"in $))return!1;return typeof $["~standard"]?.validate==="function"}function v7($,Y="input"){let z=$["~standard"],U;if(z.jsonSchema)U=z.jsonSchema[Y]({target:mh});else if(z.vendor==="zod"){if(!("_zod"in $))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");if(!_t)_t=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.");U=gY($,{target:mh,io:Y})}else throw Error(`Schema library "${z.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(Y==="output"){if(U.type!==void 0)return U;return et(U)?{type:"object",...U}:U}if(U.type!==void 0&&U.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(U.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...U}}function et($){if("properties"in $||"patternProperties"in $||"additionalProperties"in $||"required"in $)return!0;for(let Y of["oneOf","anyOf","allOf"]){let z=$[Y];if(Array.isArray(z)&&z.length>0)return z.every((U)=>U!==null&&typeof U==="object"&&(U.type==="object"||et(U)))}return!1}function xu0($){if(!$.path?.length)return $.message;return`${$.path.map((Y)=>String(typeof Y==="object"?Y.key:Y)).join(".")}: ${$.message}`}async function iY($,Y){let z=await $["~standard"].validate(Y);if(z.issues&&z.issues.length>0)return{success:!1,error:z.issues.map((U)=>xu0(U)).join(", ")};return{success:!0,data:z.value}}function fu0($){let Y=gY($,{target:mh,io:"input"});return typeof Y.pattern==="string"?Y.pattern:void 0}function bu0($){let Y=uu0.exec($),z=[void 0,-1,0];if(Y)z.push(Number(Y[1]));return[!1,!0].flatMap((U)=>[!1,!0].flatMap((Q)=>z.map((J)=>J$.datetime({local:U,offset:Q,precision:J}))))}function iu0($,Y){let z;switch($){case"email":z=[HL()];break;case"uri":z=[OQ()];break;case"date":z=[J$.date()];break;case"date-time":z=bu0(Y);break}return new Set(z.map((U)=>fu0(U)).filter((U)=>U!==void 0))}function nu0($,Y,z){if(z!=="zod")return!0;return iu0($,Y).has(Y)}function $e($){let Y=v7($,"input"),z=Y.properties||{},U=Y.required||[];return Object.entries(z).map(([Q,J])=>({name:Q,description:J?.description,required:U.includes(Q)}))}function VH($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function cu0($){try{return v7($,"input")}catch(Y){let z=Y instanceof Error?Y.message:String(Y);throw new J1(c0.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${z}`)}}function HS($){return pu0.has($)||$.startsWith("x-")}function lu0($,Y,z,U){if(!VH($))return $;let Q=typeof $.type==="string"&&Object.hasOwn(vt,$.type)?vt[$.type]:void 0;if(Q===void 0)return $;let J={};for(let[I,K]of Object.entries($))if(Q.has(I)||HS(I))J[I]=K;else if(I==="pattern"&&$.type==="string"&&typeof $.format==="string"){if(!mu0.has($.format))J[I]=K;else if(typeof K!=="string"||!nu0($.format,K,z))U.push(`${Y}.${I}`)}else U.push(`${Y}.${I}`);return J}function ou0($,Y){let z={},U=[];for(let[Q,J]of Object.entries($))if(Q==="properties"&&VH(J))z[Q]=Object.fromEntries(Object.entries(J).map(([I,K])=>[I,lu0(K,`properties.${I}`,Y,U)]));else if(du0.has(Q))z[Q]=J;else if(!HS(Q))U.push(Q);if(U.length>0)throw new J1(c0.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${U.join(", ")}`);return z}function ru0($,Y){if(!VH($.properties))return Y;let z=Object.entries($.properties).filter(([,U])=>!yO(GH,U).success).map(([U])=>`properties.${U}`);return z.length>0?z.join(", "):Y}function lh($,Y,z=""){if(Array.isArray($)&&Array.isArray(Y))return $.flatMap((U,Q)=>lh(U,Y[Q],`${z}[${Q}]`));if(!VH($)||!VH(Y))return[];return Object.entries($).flatMap(([U,Q])=>{let J=z?`${z}.${U}`:U;if(!Object.prototype.hasOwnProperty.call(Y,U))return HS(U)?[]:[J];return lh(Q,Y[U],J)})}function su0($){if(!kQ($.requestedSchema))return{...$,mode:"form",requestedSchema:$.requestedSchema};let Y=$.requestedSchema["~standard"].vendor,z=ou0(cu0($.requestedSchema),Y),U=yO(SQ.shape.requestedSchema,z);if(!U.success)throw new J1(c0.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${ru0(z,U.error.message)}`);let Q=lh(z,U.data);if(Q.length>0)throw new J1(c0.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${Q.join(", ")}`);let J=(U.data.required??[]).filter((I)=>!Object.prototype.hasOwnProperty.call(U.data.properties,I));if(J.length>0)throw new J1(c0.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${J.join(", ")}`);return{...$,mode:"form",requestedSchema:U.data}}function au0($){let Y=$.inputRequests!==void 0&&Object.keys($.inputRequests).length>0,z=typeof $.requestState==="string";if(!Y&&!z)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...$.inputRequests!==void 0&&{inputRequests:$.inputRequests},...$.requestState!==void 0&&{requestState:$.requestState}}}function ze($,Y){return`Multi-round-trip request '${$}' still required input after ${Y} rounds (inputRequired.maxRounds)`}function Ue($,Y){return new Promise((z,U)=>{if(Y?.aborted){U(Y.reason instanceof L1?Y.reason:new L1(B1.RequestTimeout,String(Y.reason)));return}let Q=setTimeout(()=>{Y?.removeEventListener("abort",J),z()},$),J=()=>{clearTimeout(Q),U(Y?.reason instanceof L1?Y.reason:new L1(B1.RequestTimeout,String(Y?.reason)))};Y?.addEventListener("abort",J,{once:!0})})}function Qe($){let Y=new AbortController,z=()=>Y.abort($?.reason);if($?.addEventListener("abort",z,{once:!0}),$?.aborted)Y.abort($.reason);return{signal:Y.signal,abort:(U)=>Y.abort(U),dispose:()=>$?.removeEventListener("abort",z)}}function Ke($,Y){let z=$.slice(0,-6);Je[z]=Y,Ie[z]=(U)=>Y.safeParse(U).success}function Ub0($){switch($){case"initialize":case"notifications/initialized":return C7(void 0);case"server/discover":return C7(LH);default:return}}function ht($,Y){let z=$.params;if(!ZH(z))return{message:$,lifted:{}};let U=z._meta,Q=ZH(U)?Qb0.filter((G)=>(G in U)):[],J=Y==="request"?Jb0.filter((G)=>(G in z)):[];if(Q.length===0&&J.length===0)return{message:$,lifted:{}};let I={},K={...z};if(Q.length>0&&ZH(U)){let G={},H={...U};for(let W of Q)G[W]=U[W],delete H[W];if(I.envelope=G,Object.keys(H).length>0)K._meta=H;else delete K._meta}for(let G of J){if(G==="inputResponses")I.inputResponses=K[G];if(G==="requestState")I.requestState=K[G];delete K[G]}return{message:{...$,params:K},lifted:I}}function St($,Y){let z=$.validateResult(Y,void 0);if(!z.ok&&z.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(U){let Q=$.validateResult(Y,U);if(Q.ok)return{value:Q.value};return{issues:[{message:Q.reason==="invalid"?Q.message:`not-in-era: ${Y}`}]}}}}}function FH($){return()=>$}function WS($,Y){return{...$,mcpReq:{...$.mcpReq,requestState:FH(Y)}}}function XS($,Y){He($,Y)}function ZH($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function qS($,Y){let z={...$};for(let U in Y){let Q=U,J=Y[Q];if(J===void 0)continue;let I=z[Q];z[Q]=ZH(I)&&ZH(J)?{...I,...J}:J}return z}function gt($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function Kb0($){let Y={},z=[];if(!gt($))return{accepted:Y,droppedKeys:z};for(let[U,Q]of Object.entries($)){if(!gt(Q)||"method"in Q||"result"in Q){z.push(U);continue}Y[U]=Q}return{accepted:Y,droppedKeys:z}}function Gb0($){return{resultType:"input_required",inputRequests:$.inputRequests,...$.requestState!==void 0&&{requestState:$.requestState}}}function Xe($){return cG.parse(JSON.parse($))}function LS($){return JSON.stringify($)+` +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let I of $.seen.entries()){let K=I[1];if(Y===I[0]){J(I);continue}if($.external){let H=$.external.registry.get(I[0])?.id;if(Y!==I[0]&&H){J(I);continue}}if($.metadataRegistry.get(I[0])?.id){J(I);continue}if(K.cycle){J(I);continue}if(K.count>1){if($.reused==="ref"){J(I);continue}}}}function F7($,Y){let z=$.seen.get(Y);if(!z)throw Error("Unprocessed schema. This is a bug in Zod.");let U=(K)=>{let G=$.seen.get(K);if(G.ref===null)return;let H=G.def??G.schema,W={...H},X=G.ref;if(G.ref=null,X){U(X);let q=$.seen.get(X),V=q.schema;if(V.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))H.allOf=H.allOf??[],H.allOf.push(V);else Object.assign(H,V);if(Object.assign(H,W),K._zod.parent===X)for(let w in H){if(w==="$ref"||w==="allOf")continue;if(!(w in W))delete H[w]}if(V.$ref&&q.def)for(let w in H){if(w==="$ref"||w==="allOf")continue;if(w in q.def&&JSON.stringify(H[w])===JSON.stringify(q.def[w]))delete H[w]}}let Z=K._zod.parent;if(Z&&Z!==X){U(Z);let q=$.seen.get(Z);if(q?.schema.$ref){if(H.$ref=q.schema.$ref,q.def)for(let V in H){if(V==="$ref"||V==="allOf")continue;if(V in q.def&&JSON.stringify(H[V])===JSON.stringify(q.def[V]))delete H[V]}}}$.override({zodSchema:K,jsonSchema:H,path:G.path??[]})};for(let K of[...$.seen.entries()].reverse())U(K[0]);let Q={};if($.target==="draft-2020-12")Q.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")Q.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")Q.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let K=$.external.registry.get(Y)?.id;if(!K)throw Error("Schema is missing an `id` property");Q.$id=$.external.uri(K)}Object.assign(Q,z.def??z.schema);let J=$.metadataRegistry.get(Y)?.id;if(J!==void 0&&Q.id===J)delete Q.id;let I=$.external?.defs??{};for(let K of $.seen.entries()){let G=K[1];if(G.def&&G.defId){if(G.def.id===G.defId)delete G.def.id;I[G.defId]=G.def}}if($.external);else if(Object.keys(I).length>0)if($.target==="draft-2020-12")Q.$defs=I;else Q.definitions=I;try{let K=JSON.parse(JSON.stringify(Q));return Object.defineProperty(K,"~standard",{value:{...Y["~standard"],jsonSchema:{input:qQ(Y,"input",$.processors),output:qQ(Y,"output",$.processors)}},enumerable:!1,writable:!1}),K}catch(K){throw Error("Error converting schema to JSON.")}}function j8($,Y){let z=Y??{seen:new Set};if(z.seen.has($))return!1;z.seen.add($);let U=$._zod.def;if(U.type==="transform")return!0;if(U.type==="array")return j8(U.element,z);if(U.type==="set")return j8(U.valueType,z);if(U.type==="lazy")return j8(U.getter(),z);if(U.type==="promise"||U.type==="optional"||U.type==="nonoptional"||U.type==="nullable"||U.type==="readonly"||U.type==="default"||U.type==="prefault")return j8(U.innerType,z);if(U.type==="intersection")return j8(U.left,z)||j8(U.right,z);if(U.type==="record"||U.type==="map")return j8(U.keyType,z)||j8(U.valueType,z);if(U.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return j8(U.in,z)||j8(U.out,z)}if(U.type==="object"){for(let Q in U.shape)if(j8(U.shape[Q],z))return!0;return!1}if(U.type==="union"){for(let Q of U.options)if(j8(Q,z))return!0;return!1}if(U.type==="tuple"){for(let Q of U.items)if(j8(Q,z))return!0;if(U.rest&&j8(U.rest,z))return!0;return!1}return!1}var M_=($,Y={})=>(z)=>{let U=V7({...z,processors:Y});return J4($,U),L7(U,$),F7(U,$)},qQ=($,Y,z={})=>(U)=>{let{libraryOptions:Q,target:J}=U??{},I=V7({...Q??{},target:J,io:Y,processors:z});return J4($,I),L7(I,$),F7(I,$)};var NG=m(()=>{OG()});function gY($,Y){if("_idmap"in $){let U=$,Q=V7({...Y,processors:sV}),J={};for(let G of U._idmap.entries()){let[H,W]=G;J4(W,Q)}let I={},K={registry:U,uri:Y?.uri,defs:J};Q.external=K;for(let G of U._idmap.entries()){let[H,W]=G;L7(Q,W),I[H]=F7(Q,W)}if(Object.keys(J).length>0){let G=Q.target==="draft-2020-12"?"$defs":"definitions";I.__shared={[G]:J}}return{schemas:I}}let z=V7({...Y,processors:sV});return J4($,z),L7(z,$),F7(z,$)}var vf0,N_=($,Y,z,U)=>{let Q=z;Q.type="string";let{minimum:J,maximum:I,format:K,patterns:G,contentEncoding:H}=$._zod.bag;if(typeof J==="number")Q.minLength=J;if(typeof I==="number")Q.maxLength=I;if(K){if(Q.format=vf0[K]??K,Q.format==="")delete Q.format;if(K==="time")delete Q.format}if(H)Q.contentEncoding=H;if(G&&G.size>0){let W=[...G];if(W.length===1)Q.pattern=W[0].source;else if(W.length>1)Q.allOf=[...W.map((X)=>({...Y.target==="draft-07"||Y.target==="draft-04"||Y.target==="openapi-3.0"?{type:"string"}:{},pattern:X.source}))]}},D_=($,Y,z,U)=>{let Q=z,{minimum:J,maximum:I,format:K,multipleOf:G,exclusiveMaximum:H,exclusiveMinimum:W}=$._zod.bag;if(typeof K==="string"&&K.includes("int"))Q.type="integer";else Q.type="number";let X=typeof W==="number"&&W>=(J??Number.NEGATIVE_INFINITY),Z=typeof H==="number"&&H<=(I??Number.POSITIVE_INFINITY),q=Y.target==="draft-04"||Y.target==="openapi-3.0";if(X)if(q)Q.minimum=W,Q.exclusiveMinimum=!0;else Q.exclusiveMinimum=W;else if(typeof J==="number")Q.minimum=J;if(Z)if(q)Q.maximum=H,Q.exclusiveMaximum=!0;else Q.exclusiveMaximum=H;else if(typeof I==="number")Q.maximum=I;if(typeof G==="number")Q.multipleOf=G},A_=($,Y,z,U)=>{z.type="boolean"},B_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},P_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},j_=($,Y,z,U)=>{if(Y.target==="openapi-3.0")z.type="string",z.nullable=!0,z.enum=[null];else z.type="null"},T_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},E_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},C_=($,Y,z,U)=>{z.not={}},R_=($,Y,z,U)=>{},__=($,Y,z,U)=>{},v_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},h_=($,Y,z,U)=>{let Q=$._zod.def,J=tK(Q.entries);if(J.every((I)=>typeof I==="number"))z.type="number";if(J.every((I)=>typeof I==="string"))z.type="string";z.enum=J},S_=($,Y,z,U)=>{let Q=$._zod.def,J=[];for(let I of Q.values)if(I===void 0){if(Y.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof I==="bigint")if(Y.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else J.push(Number(I));else J.push(I);if(J.length===0);else if(J.length===1){let I=J[0];if(z.type=I===null?"null":typeof I,Y.target==="draft-04"||Y.target==="openapi-3.0")z.enum=[I];else z.const=I}else{if(J.every((I)=>typeof I==="number"))z.type="number";if(J.every((I)=>typeof I==="string"))z.type="string";if(J.every((I)=>typeof I==="boolean"))z.type="boolean";if(J.every((I)=>I===null))z.type="null";z.enum=J}},g_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},y_=($,Y,z,U)=>{let Q=z,J=$._zod.pattern;if(!J)throw Error("Pattern not found in template literal");Q.type="string",Q.pattern=J.source},k_=($,Y,z,U)=>{let Q=z,J={type:"string",format:"binary",contentEncoding:"binary"},{minimum:I,maximum:K,mime:G}=$._zod.bag;if(I!==void 0)J.minLength=I;if(K!==void 0)J.maxLength=K;if(G)if(G.length===1)J.contentMediaType=G[0],Object.assign(Q,J);else Object.assign(Q,J),Q.anyOf=G.map((H)=>({contentMediaType:H}));else Object.assign(Q,J)},x_=($,Y,z,U)=>{z.type="boolean"},f_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},u_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},b_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},i_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},n_=($,Y,z,U)=>{if(Y.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},c_=($,Y,z,U)=>{let Q=z,J=$._zod.def,{minimum:I,maximum:K}=$._zod.bag;if(typeof I==="number")Q.minItems=I;if(typeof K==="number")Q.maxItems=K;Q.type="array",Q.items=J4(J.element,Y,{...U,path:[...U.path,"items"]})},p_=($,Y,z,U)=>{let Q=z,J=$._zod.def;Q.type="object",Q.properties={};let I=J.shape;for(let H in I)Q.properties[H]=J4(I[H],Y,{...U,path:[...U.path,"properties",H]});let K=new Set(Object.keys(I)),G=new Set([...K].filter((H)=>{let W=J.shape[H]._zod;if(Y.io==="input")return W.optin===void 0;else return W.optout===void 0}));if(G.size>0)Q.required=Array.from(G);if(J.catchall?._zod.def.type==="never")Q.additionalProperties=!1;else if(!J.catchall){if(Y.io==="output")Q.additionalProperties=!1}else if(J.catchall)Q.additionalProperties=J4(J.catchall,Y,{...U,path:[...U.path,"additionalProperties"]})},aV=($,Y,z,U)=>{let Q=$._zod.def,J=Q.inclusive===!1,I=Q.options.map((K,G)=>J4(K,Y,{...U,path:[...U.path,J?"oneOf":"anyOf",G]}));if(J)z.oneOf=I;else z.anyOf=I},d_=($,Y,z,U)=>{let Q=$._zod.def,J=J4(Q.left,Y,{...U,path:[...U.path,"allOf",0]}),I=J4(Q.right,Y,{...U,path:[...U.path,"allOf",1]}),K=(H)=>("allOf"in H)&&Object.keys(H).length===1,G=[...K(J)?J.allOf:[J],...K(I)?I.allOf:[I]];z.allOf=G},m_=($,Y,z,U)=>{let Q=z,J=$._zod.def;Q.type="array";let I=Y.target==="draft-2020-12"?"prefixItems":"items",K=Y.target==="draft-2020-12"?"items":Y.target==="openapi-3.0"?"items":"additionalItems",G=J.items.map((Z,q)=>J4(Z,Y,{...U,path:[...U.path,I,q]})),H=J.rest?J4(J.rest,Y,{...U,path:[...U.path,K,...Y.target==="openapi-3.0"?[J.items.length]:[]]}):null;if(Y.target==="draft-2020-12"){if(Q.prefixItems=G,H)Q.items=H}else if(Y.target==="openapi-3.0"){if(Q.items={anyOf:G},H)Q.items.anyOf.push(H);if(Q.minItems=G.length,!H)Q.maxItems=G.length}else if(Q.items=G,H)Q.additionalItems=H;let{minimum:W,maximum:X}=$._zod.bag;if(typeof W==="number")Q.minItems=W;if(typeof X==="number")Q.maxItems=X},l_=($,Y,z,U)=>{let Q=z,J=$._zod.def;Q.type="object";let I=J.keyType,G=I._zod.bag?.patterns;if(J.mode==="loose"&&G&&G.size>0){let W=J4(J.valueType,Y,{...U,path:[...U.path,"patternProperties","*"]});Q.patternProperties={};for(let X of G)Q.patternProperties[X.source]=W}else{if(Y.target==="draft-07"||Y.target==="draft-2020-12")Q.propertyNames=J4(J.keyType,Y,{...U,path:[...U.path,"propertyNames"]});Q.additionalProperties=J4(J.valueType,Y,{...U,path:[...U.path,"additionalProperties"]})}let H=I._zod.values;if(H){let W=[...H].filter((X)=>typeof X==="string"||typeof X==="number");if(W.length>0)Q.required=W}},o_=($,Y,z,U)=>{let Q=$._zod.def,J=J4(Q.innerType,Y,U),I=Y.seen.get($);if(Y.target==="openapi-3.0")I.ref=Q.innerType,z.nullable=!0;else z.anyOf=[J,{type:"null"}]},r_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType},s_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType,z.default=JSON.parse(JSON.stringify(Q.defaultValue))},a_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);if(J.ref=Q.innerType,Y.io==="input")z._prefault=JSON.parse(JSON.stringify(Q.defaultValue))},t_=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType;let I;try{I=Q.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}z.default=I},e_=($,Y,z,U)=>{let Q=$._zod.def,J=Q.in._zod.traits.has("$ZodTransform"),I=Y.io==="input"?J?Q.out:Q.in:Q.out;J4(I,Y,U);let K=Y.seen.get($);K.ref=I},$v=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType,z.readOnly=!0},Yv=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType},tV=($,Y,z,U)=>{let Q=$._zod.def;J4(Q.innerType,Y,U);let J=Y.seen.get($);J.ref=Q.innerType},zv=($,Y,z,U)=>{let Q=$._zod.innerType;J4(Q,Y,U);let J=Y.seen.get($);J.ref=Q},sV;var DG=m(()=>{NG();Y1();vf0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},sV={string:N_,number:D_,boolean:A_,bigint:B_,symbol:P_,null:j_,undefined:T_,void:E_,never:C_,any:R_,unknown:__,date:v_,enum:h_,literal:S_,nan:g_,template_literal:y_,file:k_,success:x_,custom:f_,function:u_,transform:b_,map:i_,set:n_,array:c_,object:p_,union:aV,intersection:d_,tuple:m_,record:l_,nullable:o_,nonoptional:r_,default:s_,prefault:a_,catch:t_,pipe:e_,readonly:$v,promise:Yv,optional:tV,lazy:zv}});class Uv{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";this.ctx=V7({processors:sV,target:Y,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,Y={path:[],schemaPath:[]}){return J4($,this.ctx,Y)}emit($,Y){if(Y){if(Y.cycles)this.ctx.cycles=Y.cycles;if(Y.reused)this.ctx.reused=Y.reused;if(Y.external)this.ctx.external=Y.external}L7(this.ctx,$);let z=F7(this.ctx,$),{"~standard":U,...Q}=z;return Q}}var ms=m(()=>{DG();NG()});var ls={};var os=()=>{};var m9={};D8(m9,{version:()=>ME,util:()=>y0,treeifyError:()=>NT,toJSONSchema:()=>gY,toDotPath:()=>wr,safeParseAsync:()=>PT,safeParse:()=>BT,safeEncodeAsync:()=>yk0,safeEncode:()=>Sk0,safeDecodeAsync:()=>kk0,safeDecode:()=>gk0,registry:()=>PV,regexes:()=>z$,process:()=>J4,prettifyError:()=>DT,parseAsync:()=>$V,parse:()=>eq,meta:()=>O_,locales:()=>FG,isValidJWT:()=>br,isValidBase64URL:()=>ur,isValidBase64:()=>nE,initializeContext:()=>V7,globalRegistry:()=>d6,globalConfig:()=>jY,formatError:()=>JG,flattenError:()=>QG,finalize:()=>F7,extractDefs:()=>L7,encodeAsync:()=>vk0,encode:()=>Rk0,describe:()=>F_,decodeAsync:()=>hk0,decode:()=>_k0,createToJSONSchemaMethod:()=>M_,createStandardJSONSchemaMethod:()=>qQ,config:()=>a4,clone:()=>A8,_xor:()=>Hf0,_xid:()=>yV,_void:()=>K_,_uuidv7:()=>RV,_uuidv6:()=>CV,_uuidv4:()=>EV,_uuid:()=>TV,_url:()=>MG,_uppercase:()=>zQ,_unknown:()=>J_,_union:()=>Gf0,_undefined:()=>z_,_ulid:()=>gV,_uint64:()=>$_,_uint32:()=>oR,_tuple:()=>Zf0,_trim:()=>GQ,_transform:()=>Mf0,_toUpperCase:()=>WQ,_toLowerCase:()=>HQ,_templateLiteral:()=>Cf0,_symbol:()=>Y_,_superRefine:()=>L_,_success:()=>Pf0,_stringbool:()=>w_,_stringFormat:()=>ZQ,_string:()=>gR,_startsWith:()=>QQ,_slugify:()=>XQ,_size:()=>vY,_set:()=>Lf0,_safeParseAsync:()=>aU,_safeParse:()=>sU,_safeEncodeAsync:()=>KV,_safeEncode:()=>JV,_safeDecodeAsync:()=>GV,_safeDecode:()=>IV,_regex:()=>$Q,_refine:()=>V_,_record:()=>qf0,_readonly:()=>Ef0,_property:()=>rV,_promise:()=>_f0,_positive:()=>dV,_pipe:()=>Tf0,_parseAsync:()=>rU,_parse:()=>oU,_overwrite:()=>z5,_optional:()=>Nf0,_number:()=>nR,_nullable:()=>Df0,_null:()=>U_,_normalize:()=>KQ,_nonpositive:()=>lV,_nonoptional:()=>Bf0,_nonnegative:()=>oV,_never:()=>I_,_negative:()=>mV,_nativeEnum:()=>Of0,_nanoid:()=>vV,_nan:()=>W_,_multipleOf:()=>Z7,_minSize:()=>d5,_minLength:()=>d9,_min:()=>P8,_mime:()=>IQ,_maxSize:()=>q7,_maxLength:()=>hY,_max:()=>U$,_map:()=>Vf0,_mac:()=>kR,_lte:()=>U$,_lt:()=>c5,_lowercase:()=>YQ,_literal:()=>wf0,_length:()=>SY,_lazy:()=>Rf0,_ksuid:()=>kV,_jwt:()=>pV,_isoTime:()=>bR,_isoDuration:()=>iR,_isoDateTime:()=>fR,_isoDate:()=>uR,_ipv6:()=>fV,_ipv4:()=>xV,_intersection:()=>Xf0,_int64:()=>eR,_int32:()=>lR,_int:()=>pR,_includes:()=>UQ,_guid:()=>wG,_gte:()=>P8,_gt:()=>p5,_float64:()=>mR,_float32:()=>dR,_file:()=>Z_,_enum:()=>Ff0,_endsWith:()=>JQ,_encodeAsync:()=>UV,_encode:()=>YV,_emoji:()=>_V,_email:()=>jV,_e164:()=>cV,_discriminatedUnion:()=>Wf0,_default:()=>Af0,_decodeAsync:()=>QV,_decode:()=>zV,_date:()=>G_,_custom:()=>q_,_cuid2:()=>SV,_cuid:()=>hV,_coercedString:()=>yR,_coercedNumber:()=>cR,_coercedDate:()=>H_,_coercedBoolean:()=>sR,_coercedBigint:()=>tR,_cidrv6:()=>bV,_cidrv4:()=>uV,_check:()=>ps,_catch:()=>jf0,_boolean:()=>rR,_bigint:()=>aR,_base64url:()=>nV,_base64:()=>iV,_array:()=>X_,_any:()=>Q_,TimePrecision:()=>xR,NEVER:()=>sK,JSONSchemaGenerator:()=>Uv,JSONSchema:()=>ls,Doc:()=>VV,$output:()=>vR,$input:()=>hR,$constructor:()=>W0,$brand:()=>HT,$ZodXor:()=>IC,$ZodXID:()=>vE,$ZodVoid:()=>zC,$ZodUnknown:()=>$C,$ZodUnion:()=>WG,$ZodUndefined:()=>aE,$ZodUUID:()=>BE,$ZodURL:()=>jE,$ZodULID:()=>_E,$ZodType:()=>V1,$ZodTuple:()=>DV,$ZodTransform:()=>LC,$ZodTemplateLiteral:()=>TC,$ZodSymbol:()=>sE,$ZodSuccess:()=>DC,$ZodStringFormat:()=>Z4,$ZodString:()=>_Y,$ZodSet:()=>XC,$ZodRegistry:()=>SR,$ZodRecord:()=>HC,$ZodRealError:()=>u8,$ZodReadonly:()=>jC,$ZodPromise:()=>CC,$ZodPreprocess:()=>PC,$ZodPrefault:()=>MC,$ZodPipe:()=>BV,$ZodOptional:()=>AV,$ZodObjectJIT:()=>JC,$ZodObject:()=>cr,$ZodNumberFormat:()=>oE,$ZodNumber:()=>MV,$ZodNullable:()=>OC,$ZodNull:()=>tE,$ZodNonOptional:()=>NC,$ZodNever:()=>YC,$ZodNanoID:()=>EE,$ZodNaN:()=>BC,$ZodMap:()=>WC,$ZodMAC:()=>uE,$ZodLiteral:()=>qC,$ZodLazy:()=>RC,$ZodKSUID:()=>hE,$ZodJWT:()=>mE,$ZodIntersection:()=>GC,$ZodISOTime:()=>yE,$ZodISODuration:()=>kE,$ZodISODateTime:()=>SE,$ZodISODate:()=>gE,$ZodIPv6:()=>fE,$ZodIPv4:()=>xE,$ZodGUID:()=>AE,$ZodFunction:()=>EC,$ZodFile:()=>VC,$ZodExactOptional:()=>FC,$ZodError:()=>UG,$ZodEnum:()=>ZC,$ZodEncodeError:()=>TY,$ZodEmoji:()=>TE,$ZodEmail:()=>PE,$ZodE164:()=>dE,$ZodDiscriminatedUnion:()=>KC,$ZodDefault:()=>wC,$ZodDate:()=>UC,$ZodCustomStringFormat:()=>lE,$ZodCustom:()=>_C,$ZodCodec:()=>XG,$ZodCheckUpperCase:()=>ZE,$ZodCheckStringFormat:()=>tU,$ZodCheckStartsWith:()=>VE,$ZodCheckSizeEquals:()=>IE,$ZodCheckRegex:()=>WE,$ZodCheckProperty:()=>FE,$ZodCheckOverwrite:()=>wE,$ZodCheckNumberFormat:()=>zE,$ZodCheckMultipleOf:()=>YE,$ZodCheckMinSize:()=>JE,$ZodCheckMinLength:()=>GE,$ZodCheckMimeType:()=>OE,$ZodCheckMaxSize:()=>QE,$ZodCheckMaxLength:()=>KE,$ZodCheckLowerCase:()=>XE,$ZodCheckLessThan:()=>XV,$ZodCheckLengthEquals:()=>HE,$ZodCheckIncludes:()=>qE,$ZodCheckGreaterThan:()=>ZV,$ZodCheckEndsWith:()=>LE,$ZodCheckBigIntFormat:()=>UE,$ZodCheck:()=>F4,$ZodCatch:()=>AC,$ZodCUID2:()=>RE,$ZodCUID:()=>CE,$ZodCIDRv6:()=>iE,$ZodCIDRv4:()=>bE,$ZodBoolean:()=>HG,$ZodBigIntFormat:()=>rE,$ZodBigInt:()=>NV,$ZodBase64URL:()=>pE,$ZodBase64:()=>cE,$ZodAsyncError:()=>n5,$ZodArray:()=>QC,$ZodAny:()=>eE});var Q$=m(()=>{Y1();WV();_R();DG();ms();os();EY();jT();AT();vC();qV();NE();OG();ds();NG()});var eV={};D8(eV,{uppercase:()=>zQ,trim:()=>GQ,toUpperCase:()=>WQ,toLowerCase:()=>HQ,startsWith:()=>QQ,slugify:()=>XQ,size:()=>vY,regex:()=>$Q,property:()=>rV,positive:()=>dV,overwrite:()=>z5,normalize:()=>KQ,nonpositive:()=>lV,nonnegative:()=>oV,negative:()=>mV,multipleOf:()=>Z7,minSize:()=>d5,minLength:()=>d9,mime:()=>IQ,maxSize:()=>q7,maxLength:()=>hY,lte:()=>U$,lt:()=>c5,lowercase:()=>YQ,length:()=>SY,includes:()=>UQ,gte:()=>P8,gt:()=>p5,endsWith:()=>JQ});var $L=m(()=>{Q$()});var J$={};D8(J$,{time:()=>Iv,duration:()=>Kv,datetime:()=>Qv,date:()=>Jv,ZodISOTime:()=>UL,ZodISODuration:()=>QL,ZodISODateTime:()=>YL,ZodISODate:()=>zL});function Qv($){return fR(YL,$)}function Jv($){return uR(zL,$)}function Iv($){return bR(UL,$)}function Kv($){return iR(QL,$)}var YL,zL,UL,QL;var AG=m(()=>{Q$();PG();YL=W0("ZodISODateTime",($,Y)=>{SE.init($,Y),q4.init($,Y)});zL=W0("ZodISODate",($,Y)=>{gE.init($,Y),q4.init($,Y)});UL=W0("ZodISOTime",($,Y)=>{yE.init($,Y),q4.init($,Y)});QL=W0("ZodISODuration",($,Y)=>{kE.init($,Y),q4.init($,Y)})});var rs=($,Y)=>{UG.init($,Y),$.name="ZodError",Object.defineProperties($,{format:{value:(z)=>JG($,z)},flatten:{value:(z)=>QG($,z)},addIssue:{value:(z)=>{$.issues.push(z),$.message=JSON.stringify($.issues,dU,2)}},addIssues:{value:(z)=>{$.issues.push(...z),$.message=JSON.stringify($.issues,dU,2)}},isEmpty:{get(){return $.issues.length===0}}})},Sf0,b8;var Gv=m(()=>{Q$();Q$();Y1();Sf0=W0("ZodError",rs),b8=W0("ZodError",rs,{Parent:Error})});var Hv,Wv,jG,Xv,Zv,qv,Vv,Lv,Fv,Ov,wv,Mv;var Nv=m(()=>{Q$();Gv();Hv=oU(b8),Wv=rU(b8),jG=sU(b8),Xv=aU(b8),Zv=YV(b8),qv=zV(b8),Vv=UV(b8),Lv=QV(b8),Fv=JV(b8),Ov=IV(b8),wv=KV(b8),Mv=GV(b8)});var BG={};D8(BG,{xor:()=>ka,xid:()=>Ga,void:()=>ha,uuidv7:()=>Ya,uuidv6:()=>$a,uuidv4:()=>es,uuid:()=>ts,url:()=>OQ,unknown:()=>a0,union:()=>o0,undefined:()=>va,ulid:()=>Ka,uint64:()=>Ra,uint32:()=>Ta,tuple:()=>gv,transform:()=>CL,templateLiteral:()=>oa,symbol:()=>_a,superRefine:()=>Ih,success:()=>pa,stringbool:()=>zt,stringFormat:()=>Ma,string:()=>R,strictObject:()=>ya,set:()=>ba,refine:()=>Jh,record:()=>p0,readonly:()=>$h,promise:()=>ra,preprocess:()=>l9,prefault:()=>mv,pipe:()=>IL,partialRecord:()=>xa,optional:()=>t0,object:()=>z0,number:()=>R0,nullish:()=>ca,nullable:()=>EG,null:()=>l5,nonoptional:()=>lv,never:()=>EL,nativeEnum:()=>ia,nanoid:()=>Qa,nan:()=>da,meta:()=>$t,map:()=>ua,mac:()=>Xa,looseRecord:()=>fa,looseObject:()=>Q1,literal:()=>L0,lazy:()=>w7,ksuid:()=>Ha,keyof:()=>ga,jwt:()=>wa,json:()=>Ut,ipv6:()=>Za,ipv4:()=>Wa,invertCodec:()=>la,intersection:()=>U5,int64:()=>Ca,int32:()=>ja,int:()=>JL,instanceof:()=>Yt,httpUrl:()=>za,hostname:()=>Na,hex:()=>Da,hash:()=>Aa,guid:()=>as,function:()=>sa,float64:()=>Pa,float32:()=>Ba,file:()=>na,exactOptional:()=>iv,enum:()=>W1,emoji:()=>Ua,email:()=>HL,e164:()=>Oa,discriminatedUnion:()=>O7,describe:()=>ea,date:()=>Sa,custom:()=>ta,cuid2:()=>Ia,cuid:()=>Ja,codec:()=>ma,cidrv6:()=>Va,cidrv4:()=>qa,check:()=>aa,catch:()=>sv,boolean:()=>m0,bigint:()=>Ea,base64url:()=>Fa,base64:()=>La,array:()=>V0,any:()=>TL,_function:()=>sa,_default:()=>pv,_ZodString:()=>KL,ZodXor:()=>_v,ZodXID:()=>LL,ZodVoid:()=>Cv,ZodUnknown:()=>Tv,ZodUnion:()=>hG,ZodUndefined:()=>Bv,ZodUUID:()=>m5,ZodURL:()=>RG,ZodULID:()=>VL,ZodType:()=>M1,ZodTuple:()=>Sv,ZodTransform:()=>uv,ZodTemplateLiteral:()=>Yh,ZodSymbol:()=>Av,ZodSuccess:()=>ov,ZodStringFormat:()=>q4,ZodString:()=>FQ,ZodSet:()=>kv,ZodRecord:()=>VQ,ZodReadonly:()=>ev,ZodPromise:()=>Uh,ZodPreprocess:()=>tv,ZodPrefault:()=>dv,ZodPipe:()=>SG,ZodOptional:()=>RL,ZodObject:()=>vG,ZodNumberFormat:()=>yY,ZodNumber:()=>MQ,ZodNullable:()=>nv,ZodNull:()=>Pv,ZodNonOptional:()=>_L,ZodNever:()=>Ev,ZodNanoID:()=>XL,ZodNaN:()=>av,ZodMap:()=>yv,ZodMAC:()=>Dv,ZodLiteral:()=>xv,ZodLazy:()=>zh,ZodKSUID:()=>FL,ZodJWT:()=>PL,ZodIntersection:()=>hv,ZodIPv6:()=>wL,ZodIPv4:()=>OL,ZodGUID:()=>TG,ZodFunction:()=>Qh,ZodFile:()=>fv,ZodExactOptional:()=>bv,ZodEnum:()=>LQ,ZodEmoji:()=>WL,ZodEmail:()=>GL,ZodE164:()=>BL,ZodDiscriminatedUnion:()=>vv,ZodDefault:()=>cv,ZodDate:()=>_G,ZodCustomStringFormat:()=>wQ,ZodCustom:()=>yG,ZodCodec:()=>gG,ZodCatch:()=>rv,ZodCUID2:()=>qL,ZodCUID:()=>ZL,ZodCIDRv6:()=>NL,ZodCIDRv4:()=>ML,ZodBoolean:()=>NQ,ZodBigIntFormat:()=>jL,ZodBigInt:()=>DQ,ZodBase64URL:()=>AL,ZodBase64:()=>DL,ZodArray:()=>Rv,ZodAny:()=>jv});function CG($,Y,z){let U=Object.getPrototypeOf($),Q=ss.get(U);if(!Q)Q=new Set,ss.set(U,Q);if(Q.has(Y))return;Q.add(Y);for(let J in z){let I=z[J];Object.defineProperty(U,J,{configurable:!0,enumerable:!1,get(){let K=I.bind(this);return Object.defineProperty(this,J,{configurable:!0,writable:!0,enumerable:!0,value:K}),K},set(K){Object.defineProperty(this,J,{configurable:!0,writable:!0,enumerable:!0,value:K})}})}}function R($){return gR(FQ,$)}function HL($){return jV(GL,$)}function as($){return wG(TG,$)}function ts($){return TV(m5,$)}function es($){return EV(m5,$)}function $a($){return CV(m5,$)}function Ya($){return RV(m5,$)}function OQ($){return MG(RG,$)}function za($){return MG(RG,{protocol:z$.httpProtocol,hostname:z$.domain,...y0.normalizeParams($)})}function Ua($){return _V(WL,$)}function Qa($){return vV(XL,$)}function Ja($){return hV(ZL,$)}function Ia($){return SV(qL,$)}function Ka($){return gV(VL,$)}function Ga($){return yV(LL,$)}function Ha($){return kV(FL,$)}function Wa($){return xV(OL,$)}function Xa($){return kR(Dv,$)}function Za($){return fV(wL,$)}function qa($){return uV(ML,$)}function Va($){return bV(NL,$)}function La($){return iV(DL,$)}function Fa($){return nV(AL,$)}function Oa($){return cV(BL,$)}function wa($){return pV(PL,$)}function Ma($,Y,z={}){return ZQ(wQ,$,Y,z)}function Na($){return ZQ(wQ,"hostname",z$.hostname,$)}function Da($){return ZQ(wQ,"hex",z$.hex,$)}function Aa($,Y){let z=Y?.enc??"hex",U=`${$}_${z}`,Q=z$[U];if(!Q)throw Error(`Unrecognized hash format: ${U}`);return ZQ(wQ,U,Q,Y)}function R0($){return nR(MQ,$)}function JL($){return pR(yY,$)}function Ba($){return dR(yY,$)}function Pa($){return mR(yY,$)}function ja($){return lR(yY,$)}function Ta($){return oR(yY,$)}function m0($){return rR(NQ,$)}function Ea($){return aR(DQ,$)}function Ca($){return eR(jL,$)}function Ra($){return $_(jL,$)}function _a($){return Y_(Av,$)}function va($){return z_(Bv,$)}function l5($){return U_(Pv,$)}function TL(){return Q_(jv)}function a0(){return J_(Tv)}function EL($){return I_(Ev,$)}function ha($){return K_(Cv,$)}function Sa($){return G_(_G,$)}function V0($,Y){return X_(Rv,$,Y)}function ga($){let Y=$._zod.def.shape;return W1(Object.keys(Y))}function z0($,Y){let z={type:"object",shape:$??{},...y0.normalizeParams(Y)};return new vG(z)}function ya($,Y){return new vG({type:"object",shape:$,catchall:EL(),...y0.normalizeParams(Y)})}function Q1($,Y){return new vG({type:"object",shape:$,catchall:a0(),...y0.normalizeParams(Y)})}function o0($,Y){return new hG({type:"union",options:$,...y0.normalizeParams(Y)})}function ka($,Y){return new _v({type:"union",options:$,inclusive:!1,...y0.normalizeParams(Y)})}function O7($,Y,z){return new vv({type:"union",options:Y,discriminator:$,...y0.normalizeParams(z)})}function U5($,Y){return new hv({type:"intersection",left:$,right:Y})}function gv($,Y,z){let U=Y instanceof V1,Q=U?z:Y;return new Sv({type:"tuple",items:$,rest:U?Y:null,...y0.normalizeParams(Q)})}function p0($,Y,z){if(!Y||!Y._zod)return new VQ({type:"record",keyType:R(),valueType:$,...y0.normalizeParams(Y)});return new VQ({type:"record",keyType:$,valueType:Y,...y0.normalizeParams(z)})}function xa($,Y,z){let U=A8($);return U._zod.values=void 0,new VQ({type:"record",keyType:U,valueType:Y,...y0.normalizeParams(z)})}function fa($,Y,z){return new VQ({type:"record",keyType:$,valueType:Y,mode:"loose",...y0.normalizeParams(z)})}function ua($,Y,z){return new yv({type:"map",keyType:$,valueType:Y,...y0.normalizeParams(z)})}function ba($,Y){return new kv({type:"set",valueType:$,...y0.normalizeParams(Y)})}function W1($,Y){let z=Array.isArray($)?Object.fromEntries($.map((U)=>[U,U])):$;return new LQ({type:"enum",entries:z,...y0.normalizeParams(Y)})}function ia($,Y){return new LQ({type:"enum",entries:$,...y0.normalizeParams(Y)})}function L0($,Y){return new xv({type:"literal",values:Array.isArray($)?$:[$],...y0.normalizeParams(Y)})}function na($){return Z_(fv,$)}function CL($){return new uv({type:"transform",transform:$})}function t0($){return new RL({type:"optional",innerType:$})}function iv($){return new bv({type:"optional",innerType:$})}function EG($){return new nv({type:"nullable",innerType:$})}function ca($){return t0(EG($))}function pv($,Y){return new cv({type:"default",innerType:$,get defaultValue(){return typeof Y==="function"?Y():y0.shallowClone(Y)}})}function mv($,Y){return new dv({type:"prefault",innerType:$,get defaultValue(){return typeof Y==="function"?Y():y0.shallowClone(Y)}})}function lv($,Y){return new _L({type:"nonoptional",innerType:$,...y0.normalizeParams(Y)})}function pa($){return new ov({type:"success",innerType:$})}function sv($,Y){return new rv({type:"catch",innerType:$,catchValue:typeof Y==="function"?Y:()=>Y})}function da($){return W_(av,$)}function IL($,Y){return new SG({type:"pipe",in:$,out:Y})}function ma($,Y,z){return new gG({type:"pipe",in:$,out:Y,transform:z.decode,reverseTransform:z.encode})}function la($){let Y=$._zod.def;return new gG({type:"pipe",in:Y.out,out:Y.in,transform:Y.reverseTransform,reverseTransform:Y.transform})}function $h($){return new ev({type:"readonly",innerType:$})}function oa($,Y){return new Yh({type:"template_literal",parts:$,...y0.normalizeParams(Y)})}function w7($){return new zh({type:"lazy",getter:$})}function ra($){return new Uh({type:"promise",innerType:$})}function sa($){return new Qh({type:"function",input:Array.isArray($?.input)?gv($?.input):$?.input??V0(a0()),output:$?.output??a0()})}function aa($){let Y=new F4({check:"custom"});return Y._zod.check=$,Y}function ta($,Y){return q_(yG,$??(()=>!0),Y)}function Jh($,Y={}){return V_(yG,$,Y)}function Ih($,Y){return L_($,Y)}function Yt($,Y={}){let z=new yG({type:"custom",check:"custom",fn:(U)=>U instanceof $,abort:!0,...y0.normalizeParams(Y)});return z._zod.bag.Class=$,z._zod.check=(U)=>{if(!(U.value instanceof $))U.issues.push({code:"invalid_type",expected:$.name,input:U.value,inst:z,path:[...z._zod.def.path??[]]})},z}function Ut($){let Y=w7(()=>{return o0([R($),R0(),m0(),l5(),V0(Y),p0(R(),Y)])});return Y}function l9($,Y){return new tv({type:"pipe",in:CL($),out:Y})}var ss,M1,KL,FQ,q4,GL,TG,m5,RG,WL,XL,ZL,qL,VL,LL,FL,OL,Dv,wL,ML,NL,DL,AL,BL,PL,wQ,MQ,yY,NQ,DQ,jL,Av,Bv,Pv,jv,Tv,Ev,Cv,_G,Rv,vG,hG,_v,vv,hv,Sv,VQ,yv,kv,LQ,xv,fv,uv,RL,bv,nv,cv,dv,_L,ov,rv,av,SG,gG,tv,ev,Yh,zh,Uh,Qh,yG,ea,$t,zt=(...$)=>w_({Codec:gG,Boolean:NQ,String:FQ},...$);var PG=m(()=>{Q$();Q$();DG();NG();$L();AG();Nv();ss=new WeakMap;M1=W0("ZodType",($,Y)=>{return V1.init($,Y),Object.assign($["~standard"],{jsonSchema:{input:qQ($,"input"),output:qQ($,"output")}}),$.toJSONSchema=M_($,{}),$.def=Y,$.type=Y.type,Object.defineProperty($,"_def",{value:Y}),$.parse=(z,U)=>Hv($,z,U,{callee:$.parse}),$.safeParse=(z,U)=>jG($,z,U),$.parseAsync=async(z,U)=>Wv($,z,U,{callee:$.parseAsync}),$.safeParseAsync=async(z,U)=>Xv($,z,U),$.spa=$.safeParseAsync,$.encode=(z,U)=>Zv($,z,U),$.decode=(z,U)=>qv($,z,U),$.encodeAsync=async(z,U)=>Vv($,z,U),$.decodeAsync=async(z,U)=>Lv($,z,U),$.safeEncode=(z,U)=>Fv($,z,U),$.safeDecode=(z,U)=>Ov($,z,U),$.safeEncodeAsync=async(z,U)=>wv($,z,U),$.safeDecodeAsync=async(z,U)=>Mv($,z,U),CG($,"ZodType",{check(...z){let U=this.def;return this.clone(y0.mergeDefs(U,{checks:[...U.checks??[],...z.map((Q)=>typeof Q==="function"?{_zod:{check:Q,def:{check:"custom"},onattach:[]}}:Q)]}),{parent:!0})},with(...z){return this.check(...z)},clone(z,U){return A8(this,z,U)},brand(){return this},register(z,U){return z.add(this,U),this},refine(z,U){return this.check(Jh(z,U))},superRefine(z,U){return this.check(Ih(z,U))},overwrite(z){return this.check(z5(z))},optional(){return t0(this)},exactOptional(){return iv(this)},nullable(){return EG(this)},nullish(){return t0(EG(this))},nonoptional(z){return lv(this,z)},array(){return V0(this)},or(z){return o0([this,z])},and(z){return U5(this,z)},transform(z){return IL(this,CL(z))},default(z){return pv(this,z)},prefault(z){return mv(this,z)},catch(z){return sv(this,z)},pipe(z){return IL(this,z)},readonly(){return $h(this)},describe(z){let U=this.clone();return d6.add(U,{description:z}),U},meta(...z){if(z.length===0)return d6.get(this);let U=this.clone();return d6.add(U,z[0]),U},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(z){return z(this)}}),Object.defineProperty($,"description",{get(){return d6.get($)?.description},configurable:!0}),$}),KL=W0("_ZodString",($,Y)=>{_Y.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>N_($,U,Q,J);let z=$._zod.bag;$.format=z.format??null,$.minLength=z.minimum??null,$.maxLength=z.maximum??null,CG($,"_ZodString",{regex(...U){return this.check($Q(...U))},includes(...U){return this.check(UQ(...U))},startsWith(...U){return this.check(QQ(...U))},endsWith(...U){return this.check(JQ(...U))},min(...U){return this.check(d9(...U))},max(...U){return this.check(hY(...U))},length(...U){return this.check(SY(...U))},nonempty(...U){return this.check(d9(1,...U))},lowercase(U){return this.check(YQ(U))},uppercase(U){return this.check(zQ(U))},trim(){return this.check(GQ())},normalize(...U){return this.check(KQ(...U))},toLowerCase(){return this.check(HQ())},toUpperCase(){return this.check(WQ())},slugify(){return this.check(XQ())}})}),FQ=W0("ZodString",($,Y)=>{_Y.init($,Y),KL.init($,Y),$.email=(z)=>$.check(jV(GL,z)),$.url=(z)=>$.check(MG(RG,z)),$.jwt=(z)=>$.check(pV(PL,z)),$.emoji=(z)=>$.check(_V(WL,z)),$.guid=(z)=>$.check(wG(TG,z)),$.uuid=(z)=>$.check(TV(m5,z)),$.uuidv4=(z)=>$.check(EV(m5,z)),$.uuidv6=(z)=>$.check(CV(m5,z)),$.uuidv7=(z)=>$.check(RV(m5,z)),$.nanoid=(z)=>$.check(vV(XL,z)),$.guid=(z)=>$.check(wG(TG,z)),$.cuid=(z)=>$.check(hV(ZL,z)),$.cuid2=(z)=>$.check(SV(qL,z)),$.ulid=(z)=>$.check(gV(VL,z)),$.base64=(z)=>$.check(iV(DL,z)),$.base64url=(z)=>$.check(nV(AL,z)),$.xid=(z)=>$.check(yV(LL,z)),$.ksuid=(z)=>$.check(kV(FL,z)),$.ipv4=(z)=>$.check(xV(OL,z)),$.ipv6=(z)=>$.check(fV(wL,z)),$.cidrv4=(z)=>$.check(uV(ML,z)),$.cidrv6=(z)=>$.check(bV(NL,z)),$.e164=(z)=>$.check(cV(BL,z)),$.datetime=(z)=>$.check(Qv(z)),$.date=(z)=>$.check(Jv(z)),$.time=(z)=>$.check(Iv(z)),$.duration=(z)=>$.check(Kv(z))});q4=W0("ZodStringFormat",($,Y)=>{Z4.init($,Y),KL.init($,Y)}),GL=W0("ZodEmail",($,Y)=>{PE.init($,Y),q4.init($,Y)});TG=W0("ZodGUID",($,Y)=>{AE.init($,Y),q4.init($,Y)});m5=W0("ZodUUID",($,Y)=>{BE.init($,Y),q4.init($,Y)});RG=W0("ZodURL",($,Y)=>{jE.init($,Y),q4.init($,Y)});WL=W0("ZodEmoji",($,Y)=>{TE.init($,Y),q4.init($,Y)});XL=W0("ZodNanoID",($,Y)=>{EE.init($,Y),q4.init($,Y)});ZL=W0("ZodCUID",($,Y)=>{CE.init($,Y),q4.init($,Y)});qL=W0("ZodCUID2",($,Y)=>{RE.init($,Y),q4.init($,Y)});VL=W0("ZodULID",($,Y)=>{_E.init($,Y),q4.init($,Y)});LL=W0("ZodXID",($,Y)=>{vE.init($,Y),q4.init($,Y)});FL=W0("ZodKSUID",($,Y)=>{hE.init($,Y),q4.init($,Y)});OL=W0("ZodIPv4",($,Y)=>{xE.init($,Y),q4.init($,Y)});Dv=W0("ZodMAC",($,Y)=>{uE.init($,Y),q4.init($,Y)});wL=W0("ZodIPv6",($,Y)=>{fE.init($,Y),q4.init($,Y)});ML=W0("ZodCIDRv4",($,Y)=>{bE.init($,Y),q4.init($,Y)});NL=W0("ZodCIDRv6",($,Y)=>{iE.init($,Y),q4.init($,Y)});DL=W0("ZodBase64",($,Y)=>{cE.init($,Y),q4.init($,Y)});AL=W0("ZodBase64URL",($,Y)=>{pE.init($,Y),q4.init($,Y)});BL=W0("ZodE164",($,Y)=>{dE.init($,Y),q4.init($,Y)});PL=W0("ZodJWT",($,Y)=>{mE.init($,Y),q4.init($,Y)});wQ=W0("ZodCustomStringFormat",($,Y)=>{lE.init($,Y),q4.init($,Y)});MQ=W0("ZodNumber",($,Y)=>{MV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>D_($,U,Q,J),CG($,"ZodNumber",{gt(U,Q){return this.check(p5(U,Q))},gte(U,Q){return this.check(P8(U,Q))},min(U,Q){return this.check(P8(U,Q))},lt(U,Q){return this.check(c5(U,Q))},lte(U,Q){return this.check(U$(U,Q))},max(U,Q){return this.check(U$(U,Q))},int(U){return this.check(JL(U))},safe(U){return this.check(JL(U))},positive(U){return this.check(p5(0,U))},nonnegative(U){return this.check(P8(0,U))},negative(U){return this.check(c5(0,U))},nonpositive(U){return this.check(U$(0,U))},multipleOf(U,Q){return this.check(Z7(U,Q))},step(U,Q){return this.check(Z7(U,Q))},finite(){return this}});let z=$._zod.bag;$.minValue=Math.max(z.minimum??Number.NEGATIVE_INFINITY,z.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(z.maximum??Number.POSITIVE_INFINITY,z.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(z.format??"").includes("int")||Number.isSafeInteger(z.multipleOf??0.5),$.isFinite=!0,$.format=z.format??null});yY=W0("ZodNumberFormat",($,Y)=>{oE.init($,Y),MQ.init($,Y)});NQ=W0("ZodBoolean",($,Y)=>{HG.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>A_($,z,U,Q)});DQ=W0("ZodBigInt",($,Y)=>{NV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>B_($,U,Q,J),$.gte=(U,Q)=>$.check(P8(U,Q)),$.min=(U,Q)=>$.check(P8(U,Q)),$.gt=(U,Q)=>$.check(p5(U,Q)),$.gte=(U,Q)=>$.check(P8(U,Q)),$.min=(U,Q)=>$.check(P8(U,Q)),$.lt=(U,Q)=>$.check(c5(U,Q)),$.lte=(U,Q)=>$.check(U$(U,Q)),$.max=(U,Q)=>$.check(U$(U,Q)),$.positive=(U)=>$.check(p5(BigInt(0),U)),$.negative=(U)=>$.check(c5(BigInt(0),U)),$.nonpositive=(U)=>$.check(U$(BigInt(0),U)),$.nonnegative=(U)=>$.check(P8(BigInt(0),U)),$.multipleOf=(U,Q)=>$.check(Z7(U,Q));let z=$._zod.bag;$.minValue=z.minimum??null,$.maxValue=z.maximum??null,$.format=z.format??null});jL=W0("ZodBigIntFormat",($,Y)=>{rE.init($,Y),DQ.init($,Y)});Av=W0("ZodSymbol",($,Y)=>{sE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>P_($,z,U,Q)});Bv=W0("ZodUndefined",($,Y)=>{aE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>T_($,z,U,Q)});Pv=W0("ZodNull",($,Y)=>{tE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>j_($,z,U,Q)});jv=W0("ZodAny",($,Y)=>{eE.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>R_($,z,U,Q)});Tv=W0("ZodUnknown",($,Y)=>{$C.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>__($,z,U,Q)});Ev=W0("ZodNever",($,Y)=>{YC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>C_($,z,U,Q)});Cv=W0("ZodVoid",($,Y)=>{zC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>E_($,z,U,Q)});_G=W0("ZodDate",($,Y)=>{UC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>v_($,U,Q,J),$.min=(U,Q)=>$.check(P8(U,Q)),$.max=(U,Q)=>$.check(U$(U,Q));let z=$._zod.bag;$.minDate=z.minimum?new Date(z.minimum):null,$.maxDate=z.maximum?new Date(z.maximum):null});Rv=W0("ZodArray",($,Y)=>{QC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>c_($,z,U,Q),$.element=Y.element,CG($,"ZodArray",{min(z,U){return this.check(d9(z,U))},nonempty(z){return this.check(d9(1,z))},max(z,U){return this.check(hY(z,U))},length(z,U){return this.check(SY(z,U))},unwrap(){return this.element}})});vG=W0("ZodObject",($,Y)=>{JC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>p_($,z,U,Q),y0.defineLazy($,"shape",()=>{return Y.shape}),CG($,"ZodObject",{keyof(){return W1(Object.keys(this._zod.def.shape))},catchall(z){return this.clone({...this._zod.def,catchall:z})},passthrough(){return this.clone({...this._zod.def,catchall:a0()})},loose(){return this.clone({...this._zod.def,catchall:a0()})},strict(){return this.clone({...this._zod.def,catchall:EL()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(z){return y0.extend(this,z)},safeExtend(z){return y0.safeExtend(this,z)},merge(z){return y0.merge(this,z)},pick(z){return y0.pick(this,z)},omit(z){return y0.omit(this,z)},partial(...z){return y0.partial(RL,this,z[0])},required(...z){return y0.required(_L,this,z[0])}})});hG=W0("ZodUnion",($,Y)=>{WG.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>aV($,z,U,Q),$.options=Y.options});_v=W0("ZodXor",($,Y)=>{hG.init($,Y),IC.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>aV($,z,U,Q),$.options=Y.options});vv=W0("ZodDiscriminatedUnion",($,Y)=>{hG.init($,Y),KC.init($,Y)});hv=W0("ZodIntersection",($,Y)=>{GC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>d_($,z,U,Q)});Sv=W0("ZodTuple",($,Y)=>{DV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>m_($,z,U,Q),$.rest=(z)=>$.clone({...$._zod.def,rest:z})});VQ=W0("ZodRecord",($,Y)=>{HC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>l_($,z,U,Q),$.keyType=Y.keyType,$.valueType=Y.valueType});yv=W0("ZodMap",($,Y)=>{WC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>i_($,z,U,Q),$.keyType=Y.keyType,$.valueType=Y.valueType,$.min=(...z)=>$.check(d5(...z)),$.nonempty=(z)=>$.check(d5(1,z)),$.max=(...z)=>$.check(q7(...z)),$.size=(...z)=>$.check(vY(...z))});kv=W0("ZodSet",($,Y)=>{XC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>n_($,z,U,Q),$.min=(...z)=>$.check(d5(...z)),$.nonempty=(z)=>$.check(d5(1,z)),$.max=(...z)=>$.check(q7(...z)),$.size=(...z)=>$.check(vY(...z))});LQ=W0("ZodEnum",($,Y)=>{ZC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(U,Q,J)=>h_($,U,Q,J),$.enum=Y.entries,$.options=Object.values(Y.entries);let z=new Set(Object.keys(Y.entries));$.extract=(U,Q)=>{let J={};for(let I of U)if(z.has(I))J[I]=Y.entries[I];else throw Error(`Key ${I} not found in enum`);return new LQ({...Y,checks:[],...y0.normalizeParams(Q),entries:J})},$.exclude=(U,Q)=>{let J={...Y.entries};for(let I of U)if(z.has(I))delete J[I];else throw Error(`Key ${I} not found in enum`);return new LQ({...Y,checks:[],...y0.normalizeParams(Q),entries:J})}});xv=W0("ZodLiteral",($,Y)=>{qC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>S_($,z,U,Q),$.values=new Set(Y.values),Object.defineProperty($,"value",{get(){if(Y.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return Y.values[0]}})});fv=W0("ZodFile",($,Y)=>{VC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>k_($,z,U,Q),$.min=(z,U)=>$.check(d5(z,U)),$.max=(z,U)=>$.check(q7(z,U)),$.mime=(z,U)=>$.check(IQ(Array.isArray(z)?z:[z],U))});uv=W0("ZodTransform",($,Y)=>{LC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>b_($,z,U,Q),$._zod.parse=(z,U)=>{if(U.direction==="backward")throw new TY($.constructor.name);z.addIssue=(J)=>{if(typeof J==="string")z.issues.push(y0.issue(J,z.value,Y));else{let I=J;if(I.fatal)I.continue=!1;I.code??(I.code="custom"),I.input??(I.input=z.value),I.inst??(I.inst=$),z.issues.push(y0.issue(I))}};let Q=Y.transform(z.value,z);if(Q instanceof Promise)return Q.then((J)=>{return z.value=J,z.fallback=!0,z});return z.value=Q,z.fallback=!0,z}});RL=W0("ZodOptional",($,Y)=>{AV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>tV($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});bv=W0("ZodExactOptional",($,Y)=>{FC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>tV($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});nv=W0("ZodNullable",($,Y)=>{OC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>o_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});cv=W0("ZodDefault",($,Y)=>{wC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>s_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});dv=W0("ZodPrefault",($,Y)=>{MC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>a_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});_L=W0("ZodNonOptional",($,Y)=>{NC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>r_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});ov=W0("ZodSuccess",($,Y)=>{DC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>x_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});rv=W0("ZodCatch",($,Y)=>{AC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>t_($,z,U,Q),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});av=W0("ZodNaN",($,Y)=>{BC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>g_($,z,U,Q)});SG=W0("ZodPipe",($,Y)=>{BV.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>e_($,z,U,Q),$.in=Y.in,$.out=Y.out});gG=W0("ZodCodec",($,Y)=>{SG.init($,Y),XG.init($,Y)});tv=W0("ZodPreprocess",($,Y)=>{SG.init($,Y),PC.init($,Y)}),ev=W0("ZodReadonly",($,Y)=>{jC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>$v($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});Yh=W0("ZodTemplateLiteral",($,Y)=>{TC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>y_($,z,U,Q)});zh=W0("ZodLazy",($,Y)=>{RC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>zv($,z,U,Q),$.unwrap=()=>$._zod.def.getter()});Uh=W0("ZodPromise",($,Y)=>{CC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>Yv($,z,U,Q),$.unwrap=()=>$._zod.def.innerType});Qh=W0("ZodFunction",($,Y)=>{EC.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>u_($,z,U,Q)});yG=W0("ZodCustom",($,Y)=>{_C.init($,Y),M1.init($,Y),$._zod.processJSONSchema=(z,U,Q)=>f_($,z,U,Q)});ea=F_,$t=O_});function yf0($){a4({customError:$})}function kf0(){return a4().customError}var Gh,Kh;var Qt=m(()=>{Q$();Gh={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function($){})(Kh||(Kh={}))});function ff0($,Y){let z=$.$schema;if(z==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(z==="http://json-schema.org/draft-07/schema#")return"draft-7";if(z==="http://json-schema.org/draft-04/schema#")return"draft-4";return Y??"draft-2020-12"}function uf0($,Y){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let z=$.slice(1).split("/").filter(Boolean);if(z.length===0)return Y.rootSchema;let U=Y.version==="draft-2020-12"?"$defs":"definitions";if(z[0]===U){let Q=z[1];if(!Q||!Y.defs[Q])throw Error(`Reference not found: ${$}`);return Y.defs[Q]}throw Error(`Reference not found: ${$}`)}function Jt($,Y){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return l0.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let Q=$.$ref;if(Y.refs.has(Q))return Y.refs.get(Q);if(Y.processing.has(Q))return l0.lazy(()=>{if(!Y.refs.has(Q))throw Error(`Circular reference not resolved: ${Q}`);return Y.refs.get(Q)});Y.processing.add(Q);let J=uf0(Q,Y),I=G8(J,Y);return Y.refs.set(Q,I),Y.processing.delete(Q),I}if($.enum!==void 0){let Q=$.enum;if(Y.version==="openapi-3.0"&&$.nullable===!0&&Q.length===1&&Q[0]===null)return l0.null();if(Q.length===0)return l0.never();if(Q.length===1)return l0.literal(Q[0]);if(Q.every((I)=>typeof I==="string"))return l0.enum(Q);let J=Q.map((I)=>l0.literal(I));if(J.length<2)return J[0];return l0.union([J[0],J[1],...J.slice(2)])}if($.const!==void 0)return l0.literal($.const);let z=$.type;if(Array.isArray(z)){let Q=z.map((J)=>{let I={...$,type:J};return Jt(I,Y)});if(Q.length===0)return l0.never();if(Q.length===1)return Q[0];return l0.union(Q)}if(!z)return l0.any();let U;switch(z){case"string":{let Q=l0.string();if($.format){let J=$.format;if(J==="email")Q=Q.check(l0.email());else if(J==="uri"||J==="uri-reference")Q=Q.check(l0.url());else if(J==="uuid"||J==="guid")Q=Q.check(l0.uuid());else if(J==="date-time")Q=Q.check(l0.iso.datetime());else if(J==="date")Q=Q.check(l0.iso.date());else if(J==="time")Q=Q.check(l0.iso.time());else if(J==="duration")Q=Q.check(l0.iso.duration());else if(J==="ipv4")Q=Q.check(l0.ipv4());else if(J==="ipv6")Q=Q.check(l0.ipv6());else if(J==="mac")Q=Q.check(l0.mac());else if(J==="cidr")Q=Q.check(l0.cidrv4());else if(J==="cidr-v6")Q=Q.check(l0.cidrv6());else if(J==="base64")Q=Q.check(l0.base64());else if(J==="base64url")Q=Q.check(l0.base64url());else if(J==="e164")Q=Q.check(l0.e164());else if(J==="jwt")Q=Q.check(l0.jwt());else if(J==="emoji")Q=Q.check(l0.emoji());else if(J==="nanoid")Q=Q.check(l0.nanoid());else if(J==="cuid")Q=Q.check(l0.cuid());else if(J==="cuid2")Q=Q.check(l0.cuid2());else if(J==="ulid")Q=Q.check(l0.ulid());else if(J==="xid")Q=Q.check(l0.xid());else if(J==="ksuid")Q=Q.check(l0.ksuid())}if(typeof $.minLength==="number")Q=Q.min($.minLength);if(typeof $.maxLength==="number")Q=Q.max($.maxLength);if($.pattern)Q=Q.regex(new RegExp($.pattern));U=Q;break}case"number":case"integer":{let Q=z==="integer"?l0.number().int():l0.number();if(typeof $.minimum==="number")Q=Q.min($.minimum);if(typeof $.maximum==="number")Q=Q.max($.maximum);if(typeof $.exclusiveMinimum==="number")Q=Q.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")Q=Q.gt($.minimum);if(typeof $.exclusiveMaximum==="number")Q=Q.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")Q=Q.lt($.maximum);if(typeof $.multipleOf==="number")Q=Q.multipleOf($.multipleOf);U=Q;break}case"boolean":{U=l0.boolean();break}case"null":{U=l0.null();break}case"object":{let Q={},J=$.properties||{},I=new Set($.required||[]);for(let[G,H]of Object.entries(J)){let W=G8(H,Y);Q[G]=I.has(G)?W:W.optional()}if($.propertyNames){let G=G8($.propertyNames,Y),H=$.additionalProperties&&typeof $.additionalProperties==="object"?G8($.additionalProperties,Y):l0.any();if(Object.keys(Q).length===0){U=l0.record(G,H);break}let W=l0.object(Q).passthrough(),X=l0.looseRecord(G,H);U=l0.intersection(W,X);break}if($.patternProperties){let G=$.patternProperties,H=Object.keys(G),W=[];for(let Z of H){let q=G8(G[Z],Y),V=l0.string().regex(new RegExp(Z));W.push(l0.looseRecord(V,q))}let X=[];if(Object.keys(Q).length>0)X.push(l0.object(Q).passthrough());if(X.push(...W),X.length===0)U=l0.object({}).passthrough();else if(X.length===1)U=X[0];else{let Z=l0.intersection(X[0],X[1]);for(let q=2;qG8(G,Y)),K=J&&typeof J==="object"&&!Array.isArray(J)?G8(J,Y):void 0;if(K)U=l0.tuple(I).rest(K);else U=l0.tuple(I);if(typeof $.minItems==="number")U=U.check(l0.minLength($.minItems));if(typeof $.maxItems==="number")U=U.check(l0.maxLength($.maxItems))}else if(Array.isArray(J)){let I=J.map((G)=>G8(G,Y)),K=$.additionalItems&&typeof $.additionalItems==="object"?G8($.additionalItems,Y):void 0;if(K)U=l0.tuple(I).rest(K);else U=l0.tuple(I);if(typeof $.minItems==="number")U=U.check(l0.minLength($.minItems));if(typeof $.maxItems==="number")U=U.check(l0.maxLength($.maxItems))}else if(J!==void 0){let I=G8(J,Y),K=l0.array(I);if(typeof $.minItems==="number")K=K.min($.minItems);if(typeof $.maxItems==="number")K=K.max($.maxItems);U=K}else U=l0.array(l0.any());break}default:throw Error(`Unsupported type: ${z}`)}return U}function G8($,Y){if(typeof $==="boolean")return $?l0.any():l0.never();let z=Jt($,Y),U=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let K=$.anyOf.map((H)=>G8(H,Y)),G=l0.union(K);z=U?l0.intersection(z,G):G}if($.oneOf&&Array.isArray($.oneOf)){let K=$.oneOf.map((H)=>G8(H,Y)),G=l0.xor(K);z=U?l0.intersection(z,G):G}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)z=U?z:l0.any();else{let K=U?z:G8($.allOf[0],Y),G=U?0:1;for(let H=G;H<$.allOf.length;H++)K=l0.intersection(K,G8($.allOf[H],Y));z=K}if($.nullable===!0&&Y.version==="openapi-3.0")z=l0.nullable(z);if($.readOnly===!0)z=l0.readonly(z);if($.default!==void 0)z=z.default($.default);let Q={},J=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let K of J)if(K in $)Q[K]=$[K];let I=["contentEncoding","contentMediaType","contentSchema"];for(let K of I)if(K in $)Q[K]=$[K];for(let K of Object.keys($))if(!xf0.has(K))Q[K]=$[K];if(Object.keys(Q).length>0)Y.registry.add(z,Q);if($.description)z=z.describe($.description);return z}function It($,Y){if(typeof $==="boolean")return $?l0.any():l0.never();let z;try{z=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let U=ff0(z,Y?.defaultTarget),Q=z.$defs||z.definitions||{},J={version:U,defs:Q,refs:new Map,processing:new Set,rootSchema:z,registry:Y?.registry??d6};return G8(z,J)}var l0,xf0;var Kt=m(()=>{OG();$L();AG();PG();l0={...BG,...eV,iso:J$},xf0=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var kG={};D8(kG,{string:()=>bf0,number:()=>if0,date:()=>pf0,boolean:()=>nf0,bigint:()=>cf0});function bf0($){return yR(FQ,$)}function if0($){return cR(MQ,$)}function nf0($){return sR(NQ,$)}function cf0($){return tR(DQ,$)}function pf0($){return H_(_G,$)}var Gt=m(()=>{Q$();PG()});var L={};D8(L,{xor:()=>ka,xid:()=>Ga,void:()=>ha,uuidv7:()=>Ya,uuidv6:()=>$a,uuidv4:()=>es,uuid:()=>ts,util:()=>y0,url:()=>OQ,uppercase:()=>zQ,unknown:()=>a0,union:()=>o0,undefined:()=>va,ulid:()=>Ka,uint64:()=>Ra,uint32:()=>Ta,tuple:()=>gv,trim:()=>GQ,treeifyError:()=>NT,transform:()=>CL,toUpperCase:()=>WQ,toLowerCase:()=>HQ,toJSONSchema:()=>gY,templateLiteral:()=>oa,symbol:()=>_a,superRefine:()=>Ih,success:()=>pa,stringbool:()=>zt,stringFormat:()=>Ma,string:()=>R,strictObject:()=>ya,startsWith:()=>QQ,slugify:()=>XQ,size:()=>vY,setErrorMap:()=>yf0,set:()=>ba,safeParseAsync:()=>Xv,safeParse:()=>jG,safeEncodeAsync:()=>wv,safeEncode:()=>Fv,safeDecodeAsync:()=>Mv,safeDecode:()=>Ov,registry:()=>PV,regexes:()=>z$,regex:()=>$Q,refine:()=>Jh,record:()=>p0,readonly:()=>$h,property:()=>rV,promise:()=>ra,prettifyError:()=>DT,preprocess:()=>l9,prefault:()=>mv,positive:()=>dV,pipe:()=>IL,partialRecord:()=>xa,parseAsync:()=>Wv,parse:()=>Hv,overwrite:()=>z5,optional:()=>t0,object:()=>z0,number:()=>R0,nullish:()=>ca,nullable:()=>EG,null:()=>l5,normalize:()=>KQ,nonpositive:()=>lV,nonoptional:()=>lv,nonnegative:()=>oV,never:()=>EL,negative:()=>mV,nativeEnum:()=>ia,nanoid:()=>Qa,nan:()=>da,multipleOf:()=>Z7,minSize:()=>d5,minLength:()=>d9,mime:()=>IQ,meta:()=>$t,maxSize:()=>q7,maxLength:()=>hY,map:()=>ua,mac:()=>Xa,lte:()=>U$,lt:()=>c5,lowercase:()=>YQ,looseRecord:()=>fa,looseObject:()=>Q1,locales:()=>FG,literal:()=>L0,length:()=>SY,lazy:()=>w7,ksuid:()=>Ha,keyof:()=>ga,jwt:()=>wa,json:()=>Ut,iso:()=>J$,ipv6:()=>Za,ipv4:()=>Wa,invertCodec:()=>la,intersection:()=>U5,int64:()=>Ca,int32:()=>ja,int:()=>JL,instanceof:()=>Yt,includes:()=>UQ,httpUrl:()=>za,hostname:()=>Na,hex:()=>Da,hash:()=>Aa,guid:()=>as,gte:()=>P8,gt:()=>p5,globalRegistry:()=>d6,getErrorMap:()=>kf0,function:()=>sa,fromJSONSchema:()=>It,formatError:()=>JG,float64:()=>Pa,float32:()=>Ba,flattenError:()=>QG,file:()=>na,exactOptional:()=>iv,enum:()=>W1,endsWith:()=>JQ,encodeAsync:()=>Vv,encode:()=>Zv,emoji:()=>Ua,email:()=>HL,e164:()=>Oa,discriminatedUnion:()=>O7,describe:()=>ea,decodeAsync:()=>Lv,decode:()=>qv,date:()=>Sa,custom:()=>ta,cuid2:()=>Ia,cuid:()=>Ja,core:()=>m9,config:()=>a4,coerce:()=>kG,codec:()=>ma,clone:()=>A8,cidrv6:()=>Va,cidrv4:()=>qa,check:()=>aa,catch:()=>sv,boolean:()=>m0,bigint:()=>Ea,base64url:()=>Fa,base64:()=>La,array:()=>V0,any:()=>TL,_function:()=>sa,_default:()=>pv,_ZodString:()=>KL,ZodXor:()=>_v,ZodXID:()=>LL,ZodVoid:()=>Cv,ZodUnknown:()=>Tv,ZodUnion:()=>hG,ZodUndefined:()=>Bv,ZodUUID:()=>m5,ZodURL:()=>RG,ZodULID:()=>VL,ZodType:()=>M1,ZodTuple:()=>Sv,ZodTransform:()=>uv,ZodTemplateLiteral:()=>Yh,ZodSymbol:()=>Av,ZodSuccess:()=>ov,ZodStringFormat:()=>q4,ZodString:()=>FQ,ZodSet:()=>kv,ZodRecord:()=>VQ,ZodRealError:()=>b8,ZodReadonly:()=>ev,ZodPromise:()=>Uh,ZodPreprocess:()=>tv,ZodPrefault:()=>dv,ZodPipe:()=>SG,ZodOptional:()=>RL,ZodObject:()=>vG,ZodNumberFormat:()=>yY,ZodNumber:()=>MQ,ZodNullable:()=>nv,ZodNull:()=>Pv,ZodNonOptional:()=>_L,ZodNever:()=>Ev,ZodNanoID:()=>XL,ZodNaN:()=>av,ZodMap:()=>yv,ZodMAC:()=>Dv,ZodLiteral:()=>xv,ZodLazy:()=>zh,ZodKSUID:()=>FL,ZodJWT:()=>PL,ZodIssueCode:()=>Gh,ZodIntersection:()=>hv,ZodISOTime:()=>UL,ZodISODuration:()=>QL,ZodISODateTime:()=>YL,ZodISODate:()=>zL,ZodIPv6:()=>wL,ZodIPv4:()=>OL,ZodGUID:()=>TG,ZodFunction:()=>Qh,ZodFirstPartyTypeKind:()=>Kh,ZodFile:()=>fv,ZodExactOptional:()=>bv,ZodError:()=>Sf0,ZodEnum:()=>LQ,ZodEmoji:()=>WL,ZodEmail:()=>GL,ZodE164:()=>BL,ZodDiscriminatedUnion:()=>vv,ZodDefault:()=>cv,ZodDate:()=>_G,ZodCustomStringFormat:()=>wQ,ZodCustom:()=>yG,ZodCodec:()=>gG,ZodCatch:()=>rv,ZodCUID2:()=>qL,ZodCUID:()=>ZL,ZodCIDRv6:()=>NL,ZodCIDRv4:()=>ML,ZodBoolean:()=>NQ,ZodBigIntFormat:()=>jL,ZodBigInt:()=>DQ,ZodBase64URL:()=>AL,ZodBase64:()=>DL,ZodArray:()=>Rv,ZodAny:()=>jv,TimePrecision:()=>xR,NEVER:()=>sK,$output:()=>vR,$input:()=>hR,$brand:()=>HT});var vL=m(()=>{Q$();Q$();iC();Q$();DG();Kt();_R();AG();AG();Gt();PG();$L();Gv();Nv();Qt();a4(ZG())});var Ht=m(()=>{vL()});var Hh=m(()=>{Ht()});var xY="2025-11-25",hL,SL="io.modelcontextprotocol/related-task",r9="io.modelcontextprotocol/protocolVersion",AQ="io.modelcontextprotocol/clientInfo",o5="io.modelcontextprotocol/serverInfo",s9="io.modelcontextprotocol/clientCapabilities",fY="io.modelcontextprotocol/subscriptionId",N7="io.modelcontextprotocol/logLevel",uY="2.0",M7,t4,Xh,xG,fG,gL,yL,uG,g6,bY,e4,H8,W8,bG,$6,D7,iG,nG,BQ,PQ,cG,Zh,pG,kL,dG,xL,A7,o9,jQ,df0,mf0,fL,uL,bL,iL,nL,mG,cL,pL,dL,mL,lG,lL,oL,oG,rL,B7,P7,rG,sG,qh,aG,j7,a9,tG,sL,aL,tL,eL,$F,TQ,YF,zF,UF,QF,JF,IF,KF,GF,eG,HF,WF,XF,ZF,qF,VF,LF,FF,OF,wF,MF,NF,DF,AF,EQ,CQ,RQ,BF,PF,jF,_Q,TF,EF,CF,RF,_F,$H,vF,hF,YH,Vh,SF,gF,yF,Lh,T7,kF,xF,fF,uF,bF,iF,nF,cF,pF,kY,dF,mF,lF,oF,rF,zH,vQ,hQ,UH,QH,JH,sF,IH,KH,aF,tF,GH,SQ,eF,$O,YO,zO,UO,QO,JO,IO,KO,GO,HO,WO,XO,ZO,qO,Fh,VO,E7,Oh,LO,wh,Mh,Nh,Dh,Ah,Bh,Ph,jh,Th,Eh,Ch,Rh,_h,vh,hh,S6,Sh,FO,OO,gh,yh,kh,xh,Wh,wO,MO,fh,uh,bh;var Xt=m(()=>{Hh();hL=[xY,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],M7=w7(()=>o0([R(),R0(),m0(),l5(),p0(R(),M7),V0(M7)])),t4=p0(R(),M7),Xh=V0(M7),xG=o0([R(),R0().int()]),fG=R(),gL=z0({ttl:R0().optional()}),yL=z0({taskId:R()}),uG=Q1({progressToken:xG.optional(),[SL]:yL.optional()}),g6=z0({_meta:uG.optional()}),bY=g6.extend({task:gL.optional()}),e4=z0({method:R(),params:g6.loose().optional()}),H8=z0({_meta:uG.optional()}),W8=z0({method:R(),params:H8.loose().optional()}),bG=Q1({get[o5](){return jQ.optional().catch(void 0)}}),$6=Q1({_meta:bG.optional()}),D7=o0([R(),R0().int()]),iG=z0({jsonrpc:L0(uY),id:D7,...e4.shape}).strict(),nG=z0({jsonrpc:L0(uY),...W8.shape}).strict(),BQ=z0({jsonrpc:L0(uY),id:D7,result:$6}).strict(),PQ=z0({jsonrpc:L0(uY),id:D7.optional(),error:z0({code:R0().int(),message:R(),data:a0().optional()})}).strict(),cG=o0([iG,nG,BQ,PQ]),Zh=o0([BQ,PQ]),pG=$6.strict(),kL=H8.extend({requestId:D7.optional(),reason:R().optional()}),dG=W8.extend({method:L0("notifications/cancelled"),params:kL}),xL=z0({src:R(),mimeType:R().optional(),sizes:V0(R()).optional(),theme:W1(["light","dark"]).optional()}),A7=z0({icons:V0(xL).optional()}),o9=z0({name:R(),title:R().optional()}),jQ=o9.extend({...o9.shape,...A7.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),df0=U5(z0({applyDefaults:m0().optional()}),t4),mf0=l9(($)=>{if($&&typeof $==="object"&&!Array.isArray($)&&Object.keys($).length===0)return{form:{}};return $},U5(z0({form:df0.optional(),url:t4.optional()}),t4.optional())),fL=Q1({list:t4.optional(),cancel:t4.optional(),requests:Q1({sampling:Q1({createMessage:t4.optional()}).optional(),elicitation:Q1({create:t4.optional()}).optional()}).optional()}),uL=Q1({list:t4.optional(),cancel:t4.optional(),requests:Q1({tools:Q1({call:t4.optional()}).optional()}).optional()}),bL=z0({experimental:p0(R(),t4).optional(),sampling:z0({context:t4.optional(),tools:t4.optional()}).optional(),elicitation:mf0.optional(),roots:z0({listChanged:m0().optional()}).optional(),tasks:fL.optional(),extensions:p0(R(),t4).optional()}),iL=g6.extend({protocolVersion:R(),capabilities:bL,clientInfo:jQ}),nL=e4.extend({method:L0("initialize"),params:iL}),mG=z0({experimental:p0(R(),t4).optional(),logging:t4.optional(),completions:t4.optional(),prompts:z0({listChanged:m0().optional()}).optional(),resources:z0({subscribe:m0().optional(),listChanged:m0().optional()}).optional(),tools:z0({listChanged:m0().optional()}).optional(),tasks:uL.optional(),extensions:p0(R(),t4).optional()}),cL=$6.extend({protocolVersion:R(),capabilities:mG,serverInfo:jQ,instructions:R().optional()}),pL=W8.extend({method:L0("notifications/initialized"),params:H8.optional()}),dL=e4.extend({method:L0("server/discover"),params:g6.optional()}),mL=$6.extend({supportedVersions:V0(R()),capabilities:mG,instructions:R().optional()}),lG=e4.extend({method:L0("ping"),params:g6.optional()}),lL=z0({progress:R0(),total:t0(R0()),message:t0(R())}),oL=z0({...H8.shape,...lL.shape,progressToken:xG}),oG=W8.extend({method:L0("notifications/progress"),params:oL}),rL=g6.extend({cursor:fG.optional()}),B7=e4.extend({params:rL.optional()}),P7=$6.extend({nextCursor:fG.optional()}),rG=z0({uri:R(),mimeType:t0(R()),_meta:p0(R(),a0()).optional()}),sG=rG.extend({text:R()}),qh=R().refine(($)=>{try{return atob($),!0}catch{return!1}},{message:"Invalid Base64 string"}),aG=rG.extend({blob:qh}),j7=W1(["user","assistant"]),a9=z0({audience:V0(j7).optional(),priority:R0().min(0).max(1).optional(),lastModified:J$.datetime({offset:!0}).optional()}),tG=z0({...o9.shape,...A7.shape,uri:R(),description:t0(R()),mimeType:t0(R()),size:t0(R0()),annotations:a9.optional(),_meta:t0(Q1({}))}),sL=z0({...o9.shape,...A7.shape,uriTemplate:R(),description:t0(R()),mimeType:t0(R()),annotations:a9.optional(),_meta:t0(Q1({}))}),aL=B7.extend({method:L0("resources/list")}),tL=P7.extend({resources:V0(tG)}),eL=B7.extend({method:L0("resources/templates/list")}),$F=P7.extend({resourceTemplates:V0(sL)}),TQ=g6.extend({uri:R()}),YF=TQ,zF=e4.extend({method:L0("resources/read"),params:YF}),UF=$6.extend({contents:V0(o0([sG,aG]))}),QF=W8.extend({method:L0("notifications/resources/list_changed"),params:H8.optional()}),JF=TQ,IF=e4.extend({method:L0("resources/subscribe"),params:JF}),KF=TQ,GF=e4.extend({method:L0("resources/unsubscribe"),params:KF}),eG=z0({toolsListChanged:m0().optional(),promptsListChanged:m0().optional(),resourcesListChanged:m0().optional(),resourceSubscriptions:V0(R()).optional()}),HF=g6.extend({notifications:eG}),WF=e4.extend({method:L0("subscriptions/listen"),params:HF}),XF=H8.extend({notifications:eG}),ZF=W8.extend({method:L0("notifications/subscriptions/acknowledged"),params:XF}),qF=bG.extend({[fY]:D7}),VF=$6.extend({_meta:qF}),LF=H8.extend({uri:R()}),FF=W8.extend({method:L0("notifications/resources/updated"),params:LF}),OF=z0({name:R(),description:t0(R()),required:t0(m0())}),wF=z0({...o9.shape,...A7.shape,description:t0(R()),arguments:t0(V0(OF)),_meta:t0(Q1({}))}),MF=B7.extend({method:L0("prompts/list")}),NF=P7.extend({prompts:V0(wF)}),DF=g6.extend({name:R(),arguments:p0(R(),R()).optional()}),AF=e4.extend({method:L0("prompts/get"),params:DF}),EQ=z0({type:L0("text"),text:R(),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),CQ=z0({type:L0("image"),data:qh,mimeType:R(),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),RQ=z0({type:L0("audio"),data:qh,mimeType:R(),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),BF=z0({type:L0("tool_use"),name:R(),id:R(),input:p0(R(),a0()),_meta:p0(R(),a0()).optional()}),PF=z0({type:L0("resource"),resource:o0([sG,aG]),annotations:a9.optional(),_meta:p0(R(),a0()).optional()}),jF=tG.extend({type:L0("resource_link")}),_Q=o0([EQ,CQ,RQ,jF,PF]),TF=z0({role:j7,content:_Q}),EF=$6.extend({description:R().optional(),messages:V0(TF)}),CF=W8.extend({method:L0("notifications/prompts/list_changed"),params:H8.optional()}),RF=z0({title:R().optional(),readOnlyHint:m0().optional(),destructiveHint:m0().optional(),idempotentHint:m0().optional(),openWorldHint:m0().optional()}),_F=z0({taskSupport:W1(["required","optional","forbidden"]).optional()}),$H=z0({...o9.shape,...A7.shape,description:R().optional(),inputSchema:z0({type:L0("object"),properties:p0(R(),M7).optional(),required:V0(R()).optional()}).catchall(a0()),outputSchema:Q1({$schema:R().optional()}).optional(),annotations:RF.optional(),execution:_F.optional(),_meta:p0(R(),a0()).optional()}),vF=B7.extend({method:L0("tools/list")}),hF=P7.extend({tools:V0($H)}),YH=$6.extend({content:V0(_Q).default([]),structuredContent:a0().optional(),isError:m0().optional()}),Vh=YH.or($6.extend({toolResult:a0()})),SF=bY.extend({name:R(),arguments:p0(R(),a0()).optional()}),gF=e4.extend({method:L0("tools/call"),params:SF}),yF=W8.extend({method:L0("notifications/tools/list_changed"),params:H8.optional()}),Lh=z0({autoRefresh:m0().default(!0),debounceMs:R0().int().nonnegative().default(300)}),T7=W1(["debug","info","notice","warning","error","critical","alert","emergency"]),kF=g6.extend({level:T7}),xF=e4.extend({method:L0("logging/setLevel"),params:kF}),fF=H8.extend({level:T7,logger:R().optional(),data:a0()}),uF=W8.extend({method:L0("notifications/message"),params:fF}),bF=z0({name:R().optional()}),iF=z0({hints:V0(bF).optional(),costPriority:R0().min(0).max(1).optional(),speedPriority:R0().min(0).max(1).optional(),intelligencePriority:R0().min(0).max(1).optional()}),nF=z0({mode:W1(["auto","required","none"]).optional()}),cF=z0({type:L0("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:V0(_Q),structuredContent:a0().optional(),isError:m0().optional(),_meta:p0(R(),a0()).optional()}),pF=O7("type",[EQ,CQ,RQ]),kY=O7("type",[EQ,CQ,RQ,BF,cF]),dF=z0({role:j7,content:o0([kY,V0(kY)]),_meta:p0(R(),a0()).optional()}),mF=bY.extend({messages:V0(dF),modelPreferences:iF.optional(),systemPrompt:R().optional(),includeContext:W1(["none","thisServer","allServers"]).optional(),temperature:R0().optional(),maxTokens:R0().int(),stopSequences:V0(R()).optional(),metadata:t4.optional(),tools:V0($H).optional(),toolChoice:nF.optional()}),lF=e4.extend({method:L0("sampling/createMessage"),params:mF}),oF=$6.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens"]).or(R())),role:j7,content:pF}),rF=$6.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:j7,content:o0([kY,V0(kY)])}),zH=z0({type:L0("boolean"),title:R().optional(),description:R().optional(),default:m0().optional()}),vQ=z0({type:L0("string"),title:R().optional(),description:R().optional(),minLength:R0().optional(),maxLength:R0().optional(),format:W1(["email","uri","date","date-time"]).optional(),default:R().optional()}),hQ=z0({type:W1(["number","integer"]),title:R().optional(),description:R().optional(),minimum:R0().optional(),maximum:R0().optional(),default:R0().optional()}),UH=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),default:R().optional()}),QH=z0({type:L0("string"),title:R().optional(),description:R().optional(),oneOf:V0(z0({const:R(),title:R()})),default:R().optional()}),JH=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),enumNames:V0(R()).optional(),default:R().optional()}),sF=o0([UH,QH]),IH=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({type:L0("string"),enum:V0(R())}),default:V0(R()).optional()}),KH=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({anyOf:V0(z0({const:R(),title:R()}))}),default:V0(R()).optional()}),aF=o0([IH,KH]),tF=o0([JH,sF,aF]),GH=o0([tF,zH,vQ,hQ]),SQ=bY.extend({mode:L0("form").optional(),message:R(),requestedSchema:z0({type:L0("object"),properties:p0(R(),GH),required:V0(R()).optional()}).catchall(a0())}),eF=bY.extend({mode:L0("url"),message:R(),elicitationId:R(),url:R().url()}),$O=o0([SQ,eF]),YO=e4.extend({method:L0("elicitation/create"),params:$O}),zO=H8.extend({elicitationId:R()}),UO=W8.extend({method:L0("notifications/elicitation/complete"),params:zO}),QO=$6.extend({action:W1(["accept","decline","cancel"]),content:l9(($)=>$===null?void 0:$,p0(R(),o0([R(),R0(),m0(),V0(R())])).optional())}),JO=z0({type:L0("ref/resource"),uri:R()}),IO=z0({type:L0("ref/prompt"),name:R()}),KO=g6.extend({ref:o0([IO,JO]),argument:z0({name:R(),value:R()}),context:z0({arguments:p0(R(),R()).optional()}).optional()}),GO=e4.extend({method:L0("completion/complete"),params:KO}),HO=$6.extend({completion:Q1({values:V0(R()).max(100),total:t0(R0().int()),hasMore:t0(m0())})}),WO=z0({uri:R().startsWith("file://"),name:R().optional(),_meta:p0(R(),a0()).optional()}),XO=e4.extend({method:L0("roots/list"),params:g6.optional()}),ZO=$6.extend({roots:V0(WO)}),qO=W8.extend({method:L0("notifications/roots/list_changed"),params:H8.optional()}),Fh=Q1({ttl:R0().optional(),pollInterval:R0().optional()}),VO=W1(["working","input_required","completed","failed","cancelled"]),E7=z0({taskId:R(),status:VO,ttl:o0([R0(),l5()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:t0(R0()),statusMessage:t0(R())}),Oh=$6.extend({task:E7}),LO=H8.merge(E7),wh=W8.extend({method:L0("notifications/tasks/status"),params:LO}),Mh=e4.extend({method:L0("tasks/get"),params:g6.extend({taskId:R()})}),Nh=$6.merge(E7),Dh=e4.extend({method:L0("tasks/result"),params:g6.extend({taskId:R()})}),Ah=$6.loose(),Bh=B7.extend({method:L0("tasks/list")}),Ph=P7.extend({tasks:V0(E7)}),jh=e4.extend({method:L0("tasks/cancel"),params:g6.extend({taskId:R()})}),Th=$6.merge(E7),Eh=o0([lG,nL,dL,GO,xF,AF,MF,aL,eL,zF,IF,GF,WF,gF,vF]),Ch=o0([dG,oG,pL,qO]),Rh=o0([pG,oF,rF,QO,ZO]),_h=o0([lG,lF,YO,XO]),vh=o0([dG,oG,uF,FF,QF,yF,CF,ZF,UO]),hh=o0([pG,cL,mL,HO,EF,NF,tL,$F,UF,YH,hF,VF]),S6=OQ().superRefine(($,Y)=>{if(!URL.canParse($))return Y.addIssue({code:Gh.custom,message:"URL must be parseable",fatal:!0}),sK}).refine(($)=>{let Y=new URL($);return Y.protocol!=="javascript:"&&Y.protocol!=="data:"&&Y.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Sh=Q1({resource:R().url(),authorization_servers:V0(S6).optional(),jwks_uri:R().url().optional(),scopes_supported:V0(R()).optional(),bearer_methods_supported:V0(R()).optional(),resource_signing_alg_values_supported:V0(R()).optional(),resource_name:R().optional(),resource_documentation:R().optional(),resource_policy_uri:R().url().optional(),resource_tos_uri:R().url().optional(),tls_client_certificate_bound_access_tokens:m0().optional(),authorization_details_types_supported:V0(R()).optional(),dpop_signing_alg_values_supported:V0(R()).optional(),dpop_bound_access_tokens_required:m0().optional()}),FO=Q1({issuer:R(),authorization_endpoint:S6,token_endpoint:S6,registration_endpoint:S6.optional(),scopes_supported:V0(R()).optional(),response_types_supported:V0(R()),response_modes_supported:V0(R()).optional(),grant_types_supported:V0(R()).optional(),token_endpoint_auth_methods_supported:V0(R()).optional(),token_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),service_documentation:S6.optional(),revocation_endpoint:S6.optional(),revocation_endpoint_auth_methods_supported:V0(R()).optional(),revocation_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),introspection_endpoint:R().optional(),introspection_endpoint_auth_methods_supported:V0(R()).optional(),introspection_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),code_challenge_methods_supported:V0(R()).optional(),client_id_metadata_document_supported:m0().optional(),authorization_response_iss_parameter_supported:m0().optional().catch(void 0)}),OO=Q1({issuer:R(),authorization_endpoint:S6,token_endpoint:S6,userinfo_endpoint:S6.optional(),jwks_uri:S6,registration_endpoint:S6.optional(),scopes_supported:V0(R()).optional(),response_types_supported:V0(R()),response_modes_supported:V0(R()).optional(),grant_types_supported:V0(R()).optional(),acr_values_supported:V0(R()).optional(),subject_types_supported:V0(R()),id_token_signing_alg_values_supported:V0(R()),id_token_encryption_alg_values_supported:V0(R()).optional(),id_token_encryption_enc_values_supported:V0(R()).optional(),userinfo_signing_alg_values_supported:V0(R()).optional(),userinfo_encryption_alg_values_supported:V0(R()).optional(),userinfo_encryption_enc_values_supported:V0(R()).optional(),request_object_signing_alg_values_supported:V0(R()).optional(),request_object_encryption_alg_values_supported:V0(R()).optional(),request_object_encryption_enc_values_supported:V0(R()).optional(),token_endpoint_auth_methods_supported:V0(R()).optional(),token_endpoint_auth_signing_alg_values_supported:V0(R()).optional(),display_values_supported:V0(R()).optional(),claim_types_supported:V0(R()).optional(),claims_supported:V0(R()).optional(),service_documentation:R().optional(),claims_locales_supported:V0(R()).optional(),ui_locales_supported:V0(R()).optional(),claims_parameter_supported:m0().optional(),request_parameter_supported:m0().optional(),request_uri_parameter_supported:m0().optional(),require_request_uri_registration:m0().optional(),op_policy_uri:S6.optional(),op_tos_uri:S6.optional(),client_id_metadata_document_supported:m0().optional(),authorization_response_iss_parameter_supported:m0().optional().catch(void 0)}),gh=z0({...OO.shape,...FO.pick({code_challenge_methods_supported:!0}).shape}),yh=z0({access_token:R(),id_token:R().optional(),token_type:R(),expires_in:kG.number().optional(),scope:R().optional(),refresh_token:R().optional()}).strip(),kh=z0({issued_token_type:L0("urn:ietf:params:oauth:token-type:id-jag"),access_token:R(),token_type:R().optional(),expires_in:R0().optional(),scope:R().optional()}).strip(),xh=z0({error:R(),error_description:R().optional(),error_uri:R().optional()}),Wh=S6.optional().or(L0("").transform(()=>{return})),wO=z0({redirect_uris:V0(S6),token_endpoint_auth_method:R().optional(),grant_types:V0(R()).optional(),response_types:V0(R()).optional(),application_type:R().optional(),client_name:R().optional(),client_uri:S6.optional(),logo_uri:Wh,scope:R().optional(),contacts:V0(R()).optional(),tos_uri:Wh,policy_uri:R().optional(),jwks_uri:S6.optional(),jwks:TL().optional(),software_id:R().optional(),software_version:R().optional(),software_statement:R().optional()}).strip(),MO=z0({client_id:R(),client_secret:R().optional(),client_id_issued_at:R0().optional(),client_secret_expires_at:R0().optional()}).strip(),fh=wO.merge(MO),uh=z0({error:R(),error_description:R().optional()}).strip(),bh=z0({token:R(),token_type_hint:R().optional()}).strip()});var Dt=m(()=>{Xt()});function oh($,Y){let z=new Set,U=Y;while(typeof U==="function"){let Q=U.mcpBrand;if(Object.prototype.hasOwnProperty.call(U,"mcpBrand")&&typeof Q==="string")z.add(Q);U=Object.getPrototypeOf(U)}if(z.size===0)return;Object.defineProperty($,ph,{value:z,enumerable:!1,configurable:!0})}function yQ($,Y){try{if(typeof Y==="object"&&Y!==null&&Object.prototype.hasOwnProperty.call($,"mcpBrand")&&typeof $.mcpBrand==="string"&&Object.prototype.hasOwnProperty.call(Y,ph)){let z=Y[ph];if(z&&typeof z.has==="function"&&z.has($.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call($,Y)}function At($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function rf0($,Y,z){return $==="elicitation"&&Y==="form"&&z.form===void 0&&z.url===void 0}function yt($){switch($.method){case"elicitation/create":if($.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let Y=$.params;if(Y!==void 0&&(Y.tools!==void 0||Y.toolChoice!==void 0))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}function EO($,Y){let z={};for(let[U,Q]of Object.entries($)){if(Q===void 0)continue;let J=Y===void 0?void 0:Y[U];if(J===void 0){z[U]=Q;continue}if(At(Q)&&At(J)){let I={};for(let[K,G]of Object.entries(Q))if(G!==void 0&&J[K]===void 0&&!rf0(U,K,J))I[K]=G;if(Object.keys(I).length>0)z[U]=I}}return Object.keys(z).length>0?z:void 0}function xQ($){return $>=kt}function xt($){return $.filter((Y)=>!xQ(Y))}function rh($){return $.filter((Y)=>xQ(Y))}function ft($){let Y=$.structuredContent;if(Y===void 0)return $;if(!(typeof Y!=="object"||Y===null||Array.isArray(Y)))return $;if($.content?.some((z)=>z.type==="text")??!1)return $;return{...$,content:[...$.content??[],{type:"text",text:JSON.stringify(Y)}]}}function sh($){if($===null||typeof $!=="object"||Array.isArray($)||$.content!==void 0||ut.some((Y)=>(Y in $)))return $;return{...$,content:[]}}function sf0(){let $=w7(()=>o0([R(),R0(),m0(),l5(),p0(R(),$),V0($)])),Y=p0(R(),$),z=o0([R(),R0().int()]),U=R(),Q=z0({ttl:R0().optional()}),J=z0({taskId:R()}),I=Q1({progressToken:z.optional(),"io.modelcontextprotocol/related-task":J.optional()}),K=z0({_meta:I.optional()}),G=K.extend({task:Q.optional()}),H=z0({method:R(),params:K.loose().optional()}),W=z0({_meta:I.optional()}),X=z0({method:R(),params:W.loose().optional()}),Z=Q1({_meta:I.optional()}),q=o0([R(),R0().int()]),V=Z.strict(),F=W.extend({requestId:q.optional(),reason:R().optional()}),w=X.extend({method:L0("notifications/cancelled"),params:F}),O=z0({src:R(),mimeType:R().optional(),sizes:V0(R()).optional(),theme:W1(["light","dark"]).optional()}),N=z0({icons:V0(O).optional()}),M=z0({name:R(),title:R().optional()}),D=M.extend({...M.shape,...N.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),P=U5(z0({applyDefaults:m0().optional()}),Y),j=l9((N6)=>{if(N6&&typeof N6==="object"&&!Array.isArray(N6)&&Object.keys(N6).length===0)return{form:{}};return N6},U5(z0({form:P.optional(),url:Y.optional()}),Y.optional())),A=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({sampling:Q1({createMessage:Y.optional()}).optional(),elicitation:Q1({create:Y.optional()}).optional()}).optional()}),T=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({tools:Q1({call:Y.optional()}).optional()}).optional()}),C=z0({experimental:p0(R(),Y).optional(),sampling:z0({context:Y.optional(),tools:Y.optional()}).optional(),elicitation:j.optional(),roots:z0({listChanged:m0().optional()}).optional(),tasks:A.optional(),extensions:p0(R(),Y).optional()}),b=K.extend({protocolVersion:R(),capabilities:C,clientInfo:D}),k=H.extend({method:L0("initialize"),params:b}),S=z0({experimental:p0(R(),Y).optional(),logging:Y.optional(),completions:Y.optional(),prompts:z0({listChanged:m0().optional()}).optional(),resources:z0({subscribe:m0().optional(),listChanged:m0().optional()}).optional(),tools:z0({listChanged:m0().optional()}).optional(),tasks:T.optional(),extensions:p0(R(),Y).optional()}),i=Z.extend({protocolVersion:R(),capabilities:S,serverInfo:D,instructions:R().optional()}),n=X.extend({method:L0("notifications/initialized"),params:W.optional()}),U0=H.extend({method:L0("ping"),params:K.optional()}),x=z0({progress:R0(),total:t0(R0()),message:t0(R())}),d=z0({...W.shape,...x.shape,progressToken:z}),t=X.extend({method:L0("notifications/progress"),params:d}),e=K.extend({cursor:U.optional()}),g=H.extend({params:e.optional()}),p=Z.extend({nextCursor:U.optional()}),Y0=z0({uri:R(),mimeType:t0(R()),_meta:p0(R(),a0()).optional()}),y=Y0.extend({text:R()}),r=R().refine((N6)=>{try{return atob(N6),!0}catch{return!1}},{message:"Invalid Base64 string"}),$0=Y0.extend({blob:r}),N0=W1(["user","assistant"]),T0=z0({audience:V0(N0).optional(),priority:R0().min(0).max(1).optional(),lastModified:J$.datetime({offset:!0}).optional()}),_0=z0({...M.shape,...N.shape,uri:R(),description:t0(R()),mimeType:t0(R()),size:t0(R0()),annotations:T0.optional(),_meta:t0(Q1({}))}),G0=z0({...M.shape,...N.shape,uriTemplate:R(),description:t0(R()),mimeType:t0(R()),annotations:T0.optional(),_meta:t0(Q1({}))}),f0=g.extend({method:L0("resources/list")}),e0=p.extend({resources:V0(_0)}),s=g.extend({method:L0("resources/templates/list")}),H0=p.extend({resourceTemplates:V0(G0)}),F0=K.extend({uri:R()}),b0=F0,i0=H.extend({method:L0("resources/read"),params:b0}),n0=Z.extend({contents:V0(o0([y,$0]))}),w1=X.extend({method:L0("notifications/resources/list_changed"),params:W.optional()}),k1=F0,u1=H.extend({method:L0("resources/subscribe"),params:k1}),b1=F0,A0=H.extend({method:L0("resources/unsubscribe"),params:b1}),Q0=W.extend({uri:R()}),B=X.extend({method:L0("notifications/resources/updated"),params:Q0}),v=z0({name:R(),description:t0(R()),required:t0(m0())}),u=z0({...M.shape,...N.shape,description:t0(R()),arguments:t0(V0(v)),_meta:t0(Q1({}))}),a=g.extend({method:L0("prompts/list")}),X0=p.extend({prompts:V0(u)}),J0=K.extend({name:R(),arguments:p0(R(),R()).optional()}),q0=H.extend({method:L0("prompts/get"),params:J0}),w0=z0({type:L0("text"),text:R(),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),B0=z0({type:L0("image"),data:r,mimeType:R(),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),r0=z0({type:L0("audio"),data:r,mimeType:R(),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),I1=z0({type:L0("tool_use"),name:R(),id:R(),input:p0(R(),a0()),_meta:p0(R(),a0()).optional()}),U1=z0({type:L0("resource"),resource:o0([y,$0]),annotations:T0.optional(),_meta:p0(R(),a0()).optional()}),A1=_0.extend({type:L0("resource_link")}),S1=o0([w0,B0,r0,A1,U1]),u4=z0({role:N0,content:S1}),N8=Z.extend({description:R().optional(),messages:V0(u4)}),$$=X.extend({method:L0("notifications/prompts/list_changed"),params:W.optional()}),v5=z0({title:R().optional(),readOnlyHint:m0().optional(),destructiveHint:m0().optional(),idempotentHint:m0().optional(),openWorldHint:m0().optional()}),a3=z0({taskSupport:W1(["required","optional","forbidden"]).optional()}),M$=z0({...M.shape,...N.shape,description:R().optional(),inputSchema:z0({type:L0("object"),properties:p0(R(),$).optional(),required:V0(R()).optional()}).catchall(a0()),outputSchema:z0({type:L0("object"),properties:p0(R(),$).optional(),required:V0(R()).optional()}).catchall(a0()).optional(),annotations:v5.optional(),execution:a3.optional(),_meta:p0(R(),a0()).optional()}),y9=g.extend({method:L0("tools/list")}),k9=p.extend({tools:V0(M$)}),t3=Z.extend({content:V0(S1),structuredContent:p0(R(),a0()).optional(),isError:m0().optional()}),s4=G.extend({name:R(),arguments:p0(R(),a0()).optional()}),e3=H.extend({method:L0("tools/call"),params:s4}),zY=X.extend({method:L0("notifications/tools/list_changed"),params:W.optional()}),$7=W1(["debug","info","notice","warning","error","critical","alert","emergency"]),h5=K.extend({level:$7}),UY=H.extend({method:L0("logging/setLevel"),params:h5}),e$=W.extend({level:$7,logger:R().optional(),data:a0()}),QY=X.extend({method:L0("notifications/message"),params:e$}),$5=z0({name:R().optional()}),x9=z0({hints:V0($5).optional(),costPriority:R0().min(0).max(1).optional(),speedPriority:R0().min(0).max(1).optional(),intelligencePriority:R0().min(0).max(1).optional()}),JY=z0({mode:W1(["auto","required","none"]).optional()}),f9=z0({type:L0("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:V0(S1),structuredContent:z0({}).loose().optional(),isError:m0().optional(),_meta:p0(R(),a0()).optional()}),IY=O7("type",[w0,B0,r0]),Y$=O7("type",[w0,B0,r0,I1,f9]),KY=z0({role:N0,content:o0([Y$,V0(Y$)]),_meta:p0(R(),a0()).optional()}),S5=G.extend({messages:V0(KY),modelPreferences:x9.optional(),systemPrompt:R().optional(),includeContext:W1(["none","thisServer","allServers"]).optional(),temperature:R0().optional(),maxTokens:R0().int(),stopSequences:V0(R()).optional(),metadata:Y.optional(),tools:V0(M$).optional(),toolChoice:JY.optional()}),GY=H.extend({method:L0("sampling/createMessage"),params:S5}),HY=Z.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens"]).or(R())),role:N0,content:IY}),g5=Z.extend({model:R(),stopReason:t0(W1(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:N0,content:o0([Y$,V0(Y$)])}),WY=z0({type:L0("boolean"),title:R().optional(),description:R().optional(),default:m0().optional()}),y5=z0({type:L0("string"),title:R().optional(),description:R().optional(),minLength:R0().optional(),maxLength:R0().optional(),format:W1(["email","uri","date","date-time"]).optional(),default:R().optional()}),XY=z0({type:W1(["number","integer"]),title:R().optional(),description:R().optional(),minimum:R0().optional(),maximum:R0().optional(),default:R0().optional()}),k5=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),default:R().optional()}),ZY=z0({type:L0("string"),title:R().optional(),description:R().optional(),oneOf:V0(z0({const:R(),title:R()})),default:R().optional()}),x5=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),enumNames:V0(R()).optional(),default:R().optional()}),qY=o0([k5,ZY]),f5=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({type:L0("string"),enum:V0(R())}),default:V0(R()).optional()}),u9=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({anyOf:V0(z0({const:R(),title:R()}))}),default:V0(R()).optional()}),b9=o0([f5,u9]),VY=o0([x5,qY,b9]),J8=o0([VY,WY,y5,XY]),I8=G.extend({mode:L0("form").optional(),message:R(),requestedSchema:z0({type:L0("object"),properties:p0(R(),J8),required:V0(R()).optional()}).catchall(a0())}),LY=G.extend({mode:L0("url"),message:R(),elicitationId:R(),url:R().url()}),K8=o0([I8,LY]),FY=H.extend({method:L0("elicitation/create"),params:K8}),OY=W.extend({elicitationId:R()}),wY=X.extend({method:L0("notifications/elicitation/complete"),params:OY}),i9=Z.extend({action:W1(["accept","decline","cancel"]),content:l9((N6)=>N6===null?void 0:N6,p0(R(),o0([R(),R0(),m0(),V0(R())])).optional())}),MY=z0({type:L0("ref/resource"),uri:R()}),Y7=z0({type:L0("ref/prompt"),name:R()}),NY=K.extend({ref:o0([Y7,MY]),argument:z0({name:R(),value:R()}),context:z0({arguments:p0(R(),R()).optional()}).optional()}),z7=H.extend({method:L0("completion/complete"),params:NY}),U7=Z.extend({completion:Q1({values:V0(R()).max(100),total:t0(R0().int()),hasMore:t0(m0())})}),DY=z0({uri:R().startsWith("file://"),name:R().optional(),_meta:p0(R(),a0()).optional()}),Q7=H.extend({method:L0("roots/list"),params:K.optional()}),J7=Z.extend({roots:V0(DY)}),I7=X.extend({method:L0("notifications/roots/list_changed"),params:W.optional()}),AY=Q1({ttl:R0().optional(),pollInterval:R0().optional()}),nU=W1(["working","input_required","completed","failed","cancelled"]),Y5=z0({taskId:R(),status:nU,ttl:o0([R0(),l5()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:t0(R0()),statusMessage:t0(R())}),M6=Z.extend({task:Y5}),n9=W.merge(Y5),u5=X.extend({method:L0("notifications/tasks/status"),params:n9}),b5=H.extend({method:L0("tasks/get"),params:K.extend({taskId:R()})}),K7=Z.merge(Y5),c9=H.extend({method:L0("tasks/result"),params:K.extend({taskId:R()})}),pK=Z.loose(),p6=g.extend({method:L0("tasks/list")}),b4=p.extend({tasks:V0(Y5)}),i5=H.extend({method:L0("tasks/cancel"),params:K.extend({taskId:R()})});return{JSONValueSchema:$,JSONObjectSchema:Y,ProgressTokenSchema:z,CursorSchema:U,TaskMetadataSchema:Q,RelatedTaskMetadataSchema:J,RequestMetaSchema:I,BaseRequestParamsSchema:K,TaskAugmentedRequestParamsSchema:G,RequestSchema:H,NotificationsParamsSchema:W,NotificationSchema:X,ResultSchema:Z,RequestIdSchema:q,EmptyResultSchema:V,CancelledNotificationParamsSchema:F,CancelledNotificationSchema:w,IconSchema:O,IconsSchema:N,BaseMetadataSchema:M,ImplementationSchema:D,ClientTasksCapabilitySchema:A,ServerTasksCapabilitySchema:T,ClientCapabilitiesSchema:C,InitializeRequestParamsSchema:b,InitializeRequestSchema:k,ServerCapabilitiesSchema:S,InitializeResultSchema:i,InitializedNotificationSchema:n,PingRequestSchema:U0,ProgressSchema:x,ProgressNotificationParamsSchema:d,ProgressNotificationSchema:t,PaginatedRequestParamsSchema:e,PaginatedRequestSchema:g,PaginatedResultSchema:p,ResourceContentsSchema:Y0,TextResourceContentsSchema:y,BlobResourceContentsSchema:$0,RoleSchema:N0,AnnotationsSchema:T0,ResourceSchema:_0,ResourceTemplateSchema:G0,ListResourcesRequestSchema:f0,ListResourcesResultSchema:e0,ListResourceTemplatesRequestSchema:s,ListResourceTemplatesResultSchema:H0,ResourceRequestParamsSchema:F0,ReadResourceRequestParamsSchema:b0,ReadResourceRequestSchema:i0,ReadResourceResultSchema:n0,ResourceListChangedNotificationSchema:w1,SubscribeRequestParamsSchema:k1,SubscribeRequestSchema:u1,UnsubscribeRequestParamsSchema:b1,UnsubscribeRequestSchema:A0,ResourceUpdatedNotificationParamsSchema:Q0,ResourceUpdatedNotificationSchema:B,PromptArgumentSchema:v,PromptSchema:u,ListPromptsRequestSchema:a,ListPromptsResultSchema:X0,GetPromptRequestParamsSchema:J0,GetPromptRequestSchema:q0,TextContentSchema:w0,ImageContentSchema:B0,AudioContentSchema:r0,ToolUseContentSchema:I1,EmbeddedResourceSchema:U1,ResourceLinkSchema:A1,ContentBlockSchema:S1,PromptMessageSchema:u4,GetPromptResultSchema:N8,PromptListChangedNotificationSchema:$$,ToolAnnotationsSchema:v5,ToolExecutionSchema:a3,ToolSchema:M$,ListToolsRequestSchema:y9,ListToolsResultSchema:k9,CallToolResultSchema:t3,CallToolRequestParamsSchema:s4,CallToolRequestSchema:e3,ToolListChangedNotificationSchema:zY,LoggingLevelSchema:$7,SetLevelRequestParamsSchema:h5,SetLevelRequestSchema:UY,LoggingMessageNotificationParamsSchema:e$,LoggingMessageNotificationSchema:QY,ModelHintSchema:$5,ModelPreferencesSchema:x9,ToolChoiceSchema:JY,ToolResultContentSchema:f9,SamplingContentSchema:IY,SamplingMessageContentBlockSchema:Y$,SamplingMessageSchema:KY,CreateMessageRequestParamsSchema:S5,CreateMessageRequestSchema:GY,CreateMessageResultSchema:HY,CreateMessageResultWithToolsSchema:g5,BooleanSchemaSchema:WY,StringSchemaSchema:y5,NumberSchemaSchema:XY,UntitledSingleSelectEnumSchemaSchema:k5,TitledSingleSelectEnumSchemaSchema:ZY,LegacyTitledEnumSchemaSchema:x5,SingleSelectEnumSchemaSchema:qY,UntitledMultiSelectEnumSchemaSchema:f5,TitledMultiSelectEnumSchemaSchema:u9,MultiSelectEnumSchemaSchema:b9,EnumSchemaSchema:VY,PrimitiveSchemaDefinitionSchema:J8,ElicitRequestFormParamsSchema:I8,ElicitRequestURLParamsSchema:LY,ElicitRequestParamsSchema:K8,ElicitRequestSchema:FY,ElicitationCompleteNotificationParamsSchema:OY,ElicitationCompleteNotificationSchema:wY,ElicitResultSchema:i9,ResourceTemplateReferenceSchema:MY,PromptReferenceSchema:Y7,CompleteRequestParamsSchema:NY,CompleteRequestSchema:z7,CompleteResultSchema:U7,RootSchema:DY,ListRootsRequestSchema:Q7,ListRootsResultSchema:J7,RootsListChangedNotificationSchema:I7,TaskCreationParamsSchema:AY,TaskStatusSchema:nU,TaskSchema:Y5,CreateTaskResultSchema:M6,TaskStatusNotificationParamsSchema:n9,TaskStatusNotificationSchema:u5,GetTaskRequestSchema:b5,GetTaskResultSchema:K7,GetTaskPayloadRequestSchema:c9,GetTaskPayloadResultSchema:pK,ListTasksRequestSchema:p6,ListTasksResultSchema:b4,CancelTaskRequestSchema:i5,CancelTaskResultSchema:Z.merge(Y5),ClientRequestSchema:o0([U0,k,z7,UY,q0,a,f0,s,i0,u1,A0,e3,y9,b5,c9,p6,i5]),ClientNotificationSchema:o0([w,t,n,I7,u5]),ClientResultSchema:o0([V,HY,g5,i9,J7,K7,b4,M6]),ServerRequestSchema:o0([U0,GY,FY,Q7,b5,c9,p6,i5]),ServerNotificationSchema:o0([w,t,QY,B,w1,zY,$$,u5,wY]),ServerResultSchema:o0([V,i,U7,N8,X0,e0,H0,n0,t3,k9,K7,b4,M6]),CallToolResultWireSchema:a0().superRefine((N6,dK)=>{if(typeof N6!=="object"||N6===null||Array.isArray(N6)||N6.content!==void 0)return;for(let mK of ut)if(mK in N6){dK.addIssue({code:"custom",message:`content is required when the body carries '${mK}' — another result family cannot default into an empty tools/call success`});return}}).transform(sh).pipe(t3)}}function bt(){return af0??=sf0()}function it($){return $.type!=="object"}function Bt($){return $!==void 0&&!(typeof $==="string"&&$.startsWith("#"))}function $u0($){let Y=typeof $.$schema==="string"?$.$schema:void 0;if(Bt($.$id))return{...Y!==void 0&&{$schema:Y},type:"object",properties:{result:$},required:["result"]};let z=Wr($.$schema)&&$.$recursiveAnchor!==!0,U=(Q,J)=>{if(Array.isArray(Q))return Q.map((G)=>U(G,!1));if(Q===null||typeof Q!=="object")return Q;if(!J&&Bt(Q.$id))return Q;let I={},K=!1;for(let[G,H]of Object.entries(Q))if(J)I[G]=U(H,!1);else if((G==="$ref"||G==="$dynamicRef")&&typeof H==="string")I[G]=H==="#"?"#/properties/result":H.startsWith("#/")?`#/properties/result${H.slice(1)}`:H;else if(G==="$recursiveRef"&&H==="#"&&z)K=!0;else if(tf0.has(G))I[G]=H;else if(ef0.has(G))I[G]=U(H,!0);else I[G]=U(H,!1);if(K)if("$ref"in I)I.allOf=[...Array.isArray(I.allOf)?I.allOf:[],{$ref:"#/properties/result"}];else I.$ref="#/properties/result";return I};return{...Y!==void 0&&{$schema:Y},type:"object",properties:{result:U($,!1)},required:["result"]}}function ah(){if(NO)return NO;let $=bt();return NO={requestSchemas:{ping:$.PingRequestSchema,initialize:$.InitializeRequestSchema,"completion/complete":$.CompleteRequestSchema,"logging/setLevel":$.SetLevelRequestSchema,"prompts/get":$.GetPromptRequestSchema,"prompts/list":$.ListPromptsRequestSchema,"resources/list":$.ListResourcesRequestSchema,"resources/templates/list":$.ListResourceTemplatesRequestSchema,"resources/read":$.ReadResourceRequestSchema,"resources/subscribe":$.SubscribeRequestSchema,"resources/unsubscribe":$.UnsubscribeRequestSchema,"tools/call":$.CallToolRequestSchema,"tools/list":$.ListToolsRequestSchema,"tasks/get":$.GetTaskRequestSchema,"tasks/result":$.GetTaskPayloadRequestSchema,"tasks/list":$.ListTasksRequestSchema,"tasks/cancel":$.CancelTaskRequestSchema,"sampling/createMessage":$.CreateMessageRequestSchema,"elicitation/create":$.ElicitRequestSchema,"roots/list":$.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":$.CancelledNotificationSchema,"notifications/progress":$.ProgressNotificationSchema,"notifications/initialized":$.InitializedNotificationSchema,"notifications/roots/list_changed":$.RootsListChangedNotificationSchema,"notifications/tasks/status":$.TaskStatusNotificationSchema,"notifications/message":$.LoggingMessageNotificationSchema,"notifications/resources/updated":$.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":$.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":$.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":$.PromptListChangedNotificationSchema,"notifications/elicitation/complete":$.ElicitationCompleteNotificationSchema},resultSchemas:{ping:$.EmptyResultSchema,initialize:$.InitializeResultSchema,"completion/complete":$.CompleteResultSchema,"logging/setLevel":$.EmptyResultSchema,"prompts/get":$.GetPromptResultSchema,"prompts/list":$.ListPromptsResultSchema,"resources/list":$.ListResourcesResultSchema,"resources/templates/list":$.ListResourceTemplatesResultSchema,"resources/read":$.ReadResourceResultSchema,"resources/subscribe":$.EmptyResultSchema,"resources/unsubscribe":$.EmptyResultSchema,"tools/call":$.CallToolResultWireSchema,"tools/list":$.ListToolsResultSchema,"sampling/createMessage":$.CreateMessageResultWithToolsSchema,"elicitation/create":$.ElicitResultSchema,"roots/list":$.ListRootsResultSchema}},NO}function pt($){return Object.prototype.hasOwnProperty.call(nt,$)}function dt($){return Object.prototype.hasOwnProperty.call(ct,$)}function zu0($){return Object.prototype.hasOwnProperty.call(Yu0,$)}function Uu0($){return zu0($)?ah().resultSchemas[$]:void 0}function Qu0($){return pt($)?ah().requestSchemas[$]:void 0}function Ju0($){return dt($)?ah().notificationSchemas[$]:void 0}function dh($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function DO($,Y){if($===void 0)return{ok:!1,reason:"not-in-era"};let z=$.safeParse(Y);return z.success?{ok:!0,value:z.data}:{ok:!1,reason:"invalid",message:String(z.error)}}function jt($){return dh($)&&dh($.outputSchema)&&it($.outputSchema)}function Tt($){return $}function Iu0(){let $=w7(()=>o0([R(),R0(),m0(),l5(),p0(R(),$),V0($)])),Y=p0(R(),$),z=o0([R(),R0().int()]),U=R(),Q=o0([R(),R0().int()]),J=W1(["user","assistant"]),I=W1(["debug","info","notice","warning","error","critical","alert","emergency"]),K=R().refine((b4)=>{try{return atob(b4),!0}catch{return!1}},{message:"Invalid Base64 string"}),G=z0({ttl:R0().optional()}),H=z0({taskId:R()}),W=Q1({progressToken:z.optional(),"io.modelcontextprotocol/related-task":H.optional()}),X=z0({_meta:W.optional()}),Z=X.extend({task:G.optional()}),q=z0({_meta:W.optional()}),V=z0({method:R(),params:q.loose().optional()}),F=z0({src:R(),mimeType:R().optional(),sizes:V0(R()).optional(),theme:W1(["light","dark"]).optional()}),w=z0({icons:V0(F).optional()}),O=z0({name:R(),title:R().optional()}),N=O.extend({...O.shape,...w.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),M=U5(z0({applyDefaults:m0().optional()}),Y),D=l9((b4)=>{if(b4&&typeof b4==="object"&&!Array.isArray(b4)&&Object.keys(b4).length===0)return{form:{}};return b4},U5(z0({form:M.optional(),url:Y.optional()}),Y.optional())),P=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({sampling:Q1({createMessage:Y.optional()}).optional(),elicitation:Q1({create:Y.optional()}).optional()}).optional()}),j=Q1({list:Y.optional(),cancel:Y.optional(),requests:Q1({tools:Q1({call:Y.optional()}).optional()}).optional()}),A=z0({experimental:p0(R(),Y).optional(),sampling:z0({context:Y.optional(),tools:Y.optional()}).optional(),elicitation:D.optional(),roots:z0({listChanged:m0().optional()}).optional(),tasks:P.optional(),extensions:p0(R(),Y).optional()}),T=z0({experimental:p0(R(),Y).optional(),logging:Y.optional(),completions:Y.optional(),prompts:z0({listChanged:m0().optional()}).optional(),resources:z0({subscribe:m0().optional(),listChanged:m0().optional()}).optional(),tools:z0({listChanged:m0().optional()}).optional(),tasks:j.optional(),extensions:p0(R(),Y).optional()}),C=z0({progress:R0(),total:t0(R0()),message:t0(R())}),b=z0({...q.shape,...C.shape,progressToken:z}),k=V.extend({method:L0("notifications/progress"),params:b}),S=q.extend({level:I,logger:R().optional(),data:a0()}),i=V.extend({method:L0("notifications/message"),params:S}),n=z0({uri:R(),mimeType:t0(R()),_meta:p0(R(),a0()).optional()}),U0=n.extend({text:R()}),x=n.extend({blob:K}),d=z0({audience:V0(J).optional(),priority:R0().min(0).max(1).optional(),lastModified:J$.datetime({offset:!0}).optional()}),t=z0({...O.shape,...w.shape,uri:R(),description:t0(R()),mimeType:t0(R()),size:t0(R0()),annotations:d.optional(),_meta:t0(Q1({}))}),e=z0({...O.shape,...w.shape,uriTemplate:R(),description:t0(R()),mimeType:t0(R()),annotations:d.optional(),_meta:t0(Q1({}))}),g=V.extend({method:L0("notifications/resources/list_changed"),params:q.optional()}),p=q.extend({uri:R()}),Y0=V.extend({method:L0("notifications/resources/updated"),params:p}),y=z0({name:R(),description:t0(R()),required:t0(m0())}),r=z0({...O.shape,...w.shape,description:t0(R()),arguments:t0(V0(y)),_meta:t0(Q1({}))}),$0=V.extend({method:L0("notifications/prompts/list_changed"),params:q.optional()}),N0=z0({type:L0("text"),text:R(),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),T0=z0({type:L0("image"),data:K,mimeType:R(),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),_0=z0({type:L0("audio"),data:K,mimeType:R(),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),G0=z0({type:L0("tool_use"),name:R(),id:R(),input:p0(R(),a0()),_meta:p0(R(),a0()).optional()}),f0=z0({type:L0("resource"),resource:o0([U0,x]),annotations:d.optional(),_meta:p0(R(),a0()).optional()}),e0=t.extend({type:L0("resource_link")}),s=o0([N0,T0,_0,e0,f0]),H0=z0({role:J,content:s}),F0=z0({title:R().optional(),readOnlyHint:m0().optional(),destructiveHint:m0().optional(),idempotentHint:m0().optional(),openWorldHint:m0().optional()}),b0=V.extend({method:L0("notifications/tools/list_changed"),params:q.optional()}),i0=z0({name:R().optional()}),n0=z0({hints:V0(i0).optional(),costPriority:R0().min(0).max(1).optional(),speedPriority:R0().min(0).max(1).optional(),intelligencePriority:R0().min(0).max(1).optional()}),w1=z0({mode:W1(["auto","required","none"]).optional()}),k1=z0({type:L0("boolean"),title:R().optional(),description:R().optional(),default:m0().optional()}),u1=z0({type:L0("string"),title:R().optional(),description:R().optional(),minLength:R0().optional(),maxLength:R0().optional(),format:W1(["email","uri","date","date-time"]).optional(),default:R().optional()}),b1=z0({type:W1(["number","integer"]),title:R().optional(),description:R().optional(),minimum:R0().optional(),maximum:R0().optional(),default:R0().optional()}),A0=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),default:R().optional()}),Q0=z0({type:L0("string"),title:R().optional(),description:R().optional(),oneOf:V0(z0({const:R(),title:R()})),default:R().optional()}),B=z0({type:L0("string"),title:R().optional(),description:R().optional(),enum:V0(R()),enumNames:V0(R()).optional(),default:R().optional()}),v=o0([A0,Q0]),u=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({type:L0("string"),enum:V0(R())}),default:V0(R()).optional()}),a=z0({type:L0("array"),title:R().optional(),description:R().optional(),minItems:R0().optional(),maxItems:R0().optional(),items:z0({anyOf:V0(z0({const:R(),title:R()}))}),default:V0(R()).optional()}),X0=o0([u,a]),J0=o0([B,v,X0]),q0=o0([J0,k1,u1,b1]),w0=Z.extend({mode:L0("form").optional(),message:R(),requestedSchema:z0({type:L0("object"),properties:p0(R(),q0),required:V0(R()).optional()}).catchall(a0())}),B0=z0({type:L0("ref/resource"),uri:R()}),r0=z0({type:L0("ref/prompt"),name:R()}),I1=z0({uri:R().startsWith("file://"),name:R().optional(),_meta:p0(R(),a0()).optional()}),U1=A.shape,A1=z0({experimental:U1.experimental,sampling:U1.sampling,elicitation:U1.elicitation,roots:U1.roots,extensions:U1.extensions}),S1=T.shape,u4=z0({experimental:S1.experimental,logging:S1.logging,completions:S1.completions,prompts:S1.prompts,resources:S1.resources,tools:S1.tools,extensions:S1.extensions}),N8=Q1({progressToken:z.optional(),[r9]:R(),[AQ]:N.optional(),[s9]:A1,[N7]:I.optional()}),$$=z0({...O.shape,...w.shape,description:R().optional(),inputSchema:Q1({$schema:R().optional(),type:L0("object")}),outputSchema:Q1({$schema:R().optional()}).optional(),annotations:F0.optional(),_meta:p0(R(),a0()).optional()}),v5=z0({type:L0("tool_result"),toolUseId:R(),content:V0(s),structuredContent:a0().optional(),isError:m0().optional(),_meta:p0(R(),a0()).optional()}),a3=o0([N0,T0,_0,G0,v5]),M$=z0({role:J,content:o0([a3,V0(a3)]),_meta:p0(R(),a0()).optional()}),y9=R(),k9=Q1({[o5]:N.optional().catch(void 0)}),t3=k9.optional();function s4(b4){return Q1({_meta:t3,resultType:y9.default("complete"),...b4})}let e3=s4({}),zY=s4({nextCursor:U.optional()}),$7=s4({content:V0(s),structuredContent:a0().optional(),isError:m0().optional()}),h5=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),tools:V0($$),nextCursor:U.optional()}),UY=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),prompts:V0(r),nextCursor:U.optional()}),e$=s4({description:R().optional(),messages:V0(H0)}),QY=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resources:V0(t),nextCursor:U.optional()}),$5=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resourceTemplates:V0(e),nextCursor:U.optional()}),x9=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),contents:V0(o0([U0,x]))}),JY=s4({completion:z0({values:V0(R()).max(100),total:R0().int().optional(),hasMore:m0().optional()}).loose()}),f9=s4({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"])}),IY=s4({ttlMs:R0().int().min(0).catch(0),cacheScope:W1(["public","private"]).catch("private"),supportedVersions:V0(R()),capabilities:u4,instructions:R().optional()}),Y$=z0({messages:V0(M$),modelPreferences:n0.optional(),systemPrompt:R().optional(),includeContext:W1(["none","thisServer","allServers"]).optional(),temperature:R0().optional(),maxTokens:R0().int(),stopSequences:V0(R()).optional(),metadata:Y.optional(),tools:V0($$).optional(),toolChoice:w1.optional()}),KY=z0({method:L0("sampling/createMessage"),params:Y$}),S5=z0({method:L0("roots/list"),params:z0({_meta:p0(R(),a0()).optional()}).optional()}),GY=z0({...M$.shape,model:R(),stopReason:R().optional()}),HY=z0({roots:V0(I1)}),g5=z0({action:W1(["accept","decline","cancel"]),content:p0(R(),o0([R(),R0(),m0(),V0(R())])).optional()}),WY=z0({mode:L0("url"),message:R(),url:R().url()}),y5=o0([w0,WY]),XY=z0({method:L0("elicitation/create"),params:y5}),k5=o0([KY,S5,XY]),ZY=o0([GY,HY,g5]),x5=p0(R(),k5),qY=p0(R(),ZY),f5=s4({inputRequests:x5.optional(),requestState:R().optional()}),u9={inputResponses:qY.optional(),requestState:R().optional()},b9=z0({_meta:N8,...u9}),VY=Q1({progressToken:z.optional()});function J8(b4,i5){return z0({method:L0(b4),params:z0({_meta:N8,...i5})})}function I8(b4,i5){return z0({method:L0(b4),params:z0({_meta:VY.optional(),...i5}).optional()})}let LY={name:R(),arguments:p0(R(),a0()).optional(),...u9},K8={cursor:U.optional()},FY=J8("tools/call",LY),OY=J8("tools/list",K8),wY=J8("prompts/list",K8),i9=J8("prompts/get",{name:R(),arguments:p0(R(),R()).optional(),...u9}),MY=J8("resources/list",K8),Y7=J8("resources/templates/list",K8),NY=J8("resources/read",{uri:R(),...u9}),z7={ref:o0([r0,B0]),argument:z0({name:R(),value:R()}),context:z0({arguments:p0(R(),R()).optional()}).optional()},U7=J8("completion/complete",z7),DY=J8("server/discover",{}),Q7=z0({toolsListChanged:m0().optional(),promptsListChanged:m0().optional(),resourcesListChanged:m0().optional(),resourceSubscriptions:V0(R()).optional()}),J7={notifications:Q7},I7=J8("subscriptions/listen",J7),AY=k9.extend({"io.modelcontextprotocol/subscriptionId":Q}),nU=Q1({_meta:AY,resultType:y9.default("complete")}),Y5={"tools/call":I8("tools/call",LY),"tools/list":I8("tools/list",K8),"prompts/get":I8("prompts/get",{name:R(),arguments:p0(R(),R()).optional()}),"prompts/list":I8("prompts/list",K8),"resources/list":I8("resources/list",K8),"resources/templates/list":I8("resources/templates/list",K8),"resources/read":I8("resources/read",{uri:R()}),"completion/complete":I8("completion/complete",z7),"server/discover":I8("server/discover",{}),"subscriptions/listen":I8("subscriptions/listen",J7)};function M6(b4){return Q1({_meta:t3,...b4})}let n9={"tools/call":M6({content:V0(s),structuredContent:a0().optional(),isError:m0().optional()}),"tools/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),tools:V0($$),nextCursor:U.optional()}),"prompts/get":M6({description:R().optional(),messages:V0(H0)}),"prompts/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),prompts:V0(r),nextCursor:U.optional()}),"resources/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resources:V0(t),nextCursor:U.optional()}),"resources/templates/list":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),resourceTemplates:V0(e),nextCursor:U.optional()}),"resources/read":M6({ttlMs:R0().int().min(0),cacheScope:W1(["public","private"]),contents:V0(o0([U0,x]))}),"completion/complete":M6({completion:z0({values:V0(R()).max(100),total:R0().int().optional(),hasMore:m0().optional()}).loose()}),"server/discover":M6({ttlMs:R0().int().min(0).catch(0),cacheScope:W1(["public","private"]).catch("private"),supportedVersions:V0(R()),capabilities:u4,instructions:R().optional()}),"subscriptions/listen":M6({})},u5=Q1({"io.modelcontextprotocol/subscriptionId":Q.optional()}),b5=z0({method:L0("notifications/subscriptions/acknowledged"),params:z0({_meta:u5.optional(),notifications:Q7})}),K7=z0({_meta:u5.optional(),requestId:Q,reason:R().optional()}),c9=z0({method:L0("notifications/cancelled"),params:K7}),pK={"notifications/cancelled":c9,"notifications/progress":k,"notifications/message":i,"notifications/resources/updated":Y0,"notifications/resources/list_changed":g,"notifications/tools/list_changed":b0,"notifications/prompts/list_changed":$0,"notifications/subscriptions/acknowledged":b5},p6=(b4)=>z0({jsonrpc:L0("2.0"),id:o0([R(),R0().int()]),result:b4}).strict();return{JSONValueSchema:$,JSONObjectSchema:Y,ProgressTokenSchema:z,CursorSchema:U,RequestIdSchema:Q,RoleSchema:J,LoggingLevelSchema:I,TaskMetadataSchema:G,RelatedTaskMetadataSchema:H,RequestMetaSchema:W,BaseRequestParamsSchema:X,TaskAugmentedRequestParamsSchema:Z,NotificationsParamsSchema:q,NotificationSchema:V,IconSchema:F,IconsSchema:w,BaseMetadataSchema:O,ImplementationSchema:N,ClientTasksCapabilitySchema:P,ServerTasksCapabilitySchema:j,ClientCapabilitiesSchema:A,ServerCapabilitiesSchema:T,ProgressSchema:C,ProgressNotificationParamsSchema:b,ProgressNotificationSchema:k,LoggingMessageNotificationParamsSchema:S,LoggingMessageNotificationSchema:i,ResourceContentsSchema:n,TextResourceContentsSchema:U0,BlobResourceContentsSchema:x,AnnotationsSchema:d,ResourceSchema:t,ResourceTemplateSchema:e,ResourceListChangedNotificationSchema:g,ResourceUpdatedNotificationParamsSchema:p,ResourceUpdatedNotificationSchema:Y0,PromptArgumentSchema:y,PromptSchema:r,PromptListChangedNotificationSchema:$0,TextContentSchema:N0,ImageContentSchema:T0,AudioContentSchema:_0,ToolUseContentSchema:G0,EmbeddedResourceSchema:f0,ResourceLinkSchema:e0,ContentBlockSchema:s,PromptMessageSchema:H0,ToolAnnotationsSchema:F0,ToolListChangedNotificationSchema:b0,ModelHintSchema:i0,ModelPreferencesSchema:n0,ToolChoiceSchema:w1,BooleanSchemaSchema:k1,StringSchemaSchema:u1,NumberSchemaSchema:b1,UntitledSingleSelectEnumSchemaSchema:A0,TitledSingleSelectEnumSchemaSchema:Q0,LegacyTitledEnumSchemaSchema:B,SingleSelectEnumSchemaSchema:v,UntitledMultiSelectEnumSchemaSchema:u,TitledMultiSelectEnumSchemaSchema:a,MultiSelectEnumSchemaSchema:X0,EnumSchemaSchema:J0,PrimitiveSchemaDefinitionSchema:q0,ElicitRequestFormParamsSchema:w0,ResourceTemplateReferenceSchema:B0,PromptReferenceSchema:r0,RootSchema:I1,ClientCapabilities2026Schema:A1,ServerCapabilities2026Schema:u4,RequestMetaEnvelopeSchema:N8,ToolSchema:$$,ToolResultContentSchema:v5,SamplingMessageContentBlockSchema:a3,SamplingMessageSchema:M$,ResultTypeSchema:y9,ResultMetaSchema:k9,ResultSchema:e3,PaginatedResultSchema:zY,CallToolResultSchema:$7,ListToolsResultSchema:h5,ListPromptsResultSchema:UY,GetPromptResultSchema:e$,ListResourcesResultSchema:QY,ListResourceTemplatesResultSchema:$5,ReadResourceResultSchema:x9,CompleteResultSchema:JY,CacheableResultSchema:f9,DiscoverResultSchema:IY,CreateMessageRequestParamsSchema:Y$,CreateMessageRequestSchema:KY,ListRootsRequestSchema:S5,CreateMessageResultSchema:GY,ListRootsResultSchema:HY,ElicitResultSchema:g5,ElicitRequestURLParamsSchema:WY,ElicitRequestParamsSchema:y5,ElicitRequestSchema:XY,InputRequestSchema:k5,InputResponseSchema:ZY,InputRequestsSchema:x5,InputResponsesSchema:qY,InputRequiredResultSchema:f5,InputResponseRequestParamsSchema:b9,CallToolRequestSchema:FY,ListToolsRequestSchema:OY,ListPromptsRequestSchema:wY,GetPromptRequestSchema:i9,ListResourcesRequestSchema:MY,ListResourceTemplatesRequestSchema:Y7,ReadResourceRequestSchema:NY,CompleteRequestSchema:U7,DiscoverRequestSchema:DY,SubscriptionFilterSchema:Q7,SubscriptionsListenRequestSchema:I7,SubscriptionsListenResultMetaSchema:AY,SubscriptionsListenResultSchema:nU,dispatchRequestSchemas:Y5,dispatchResultSchemas:n9,NotificationMetaSchema:u5,SubscriptionsAcknowledgedNotificationSchema:b5,CancelledNotificationParamsSchema:K7,CancelledNotificationSchema:c9,notificationSchemas2026:pK,JSONRPCResultResponseSchema:p6(e3),CallToolResultResponseSchema:p6(o0([$7,f5])),ListToolsResultResponseSchema:p6(h5),ListPromptsResultResponseSchema:p6(UY),GetPromptResultResponseSchema:p6(o0([e$,f5])),ListResourcesResultResponseSchema:p6(QY),ListResourceTemplatesResultResponseSchema:p6($5),ReadResourceResultResponseSchema:p6(o0([x9,f5])),CompleteResultResponseSchema:p6(JY),DiscoverResultResponseSchema:p6(IY)}}function nY(){return Ku0??=Iu0()}function Hu0($){return Gu0.includes($)}function CO($,Y){if(Y===void 0)return $;let z=$[gQ];if(z===void 0)return{...$,[gQ]:Y};let U={},Q=z.ttlMs??Y.ttlMs;if(Q!==void 0)U.ttlMs=Q;let J=z.cacheScope??Y.cacheScope;if(J!==void 0)U.cacheScope=J;return{...$,[gQ]:U}}function Wu0($){return $[gQ]}function eh($){return typeof $==="number"&&Number.isSafeInteger($)&&$>=0}function $S($){return $==="public"||$==="private"}function YS($,Y){if($.ttlMs!==void 0&&!eh($.ttlMs))throw RangeError(`Invalid cache hint for ${Y}: ttlMs must be a non-negative safe integer (got ${String($.ttlMs)})`);if($.cacheScope!==void 0&&!$S($.cacheScope))throw RangeError(`Invalid cache hint for ${Y}: cacheScope must be 'public' or 'private' (got ${String($.cacheScope)})`)}function Vu0($,Y){let z=Y.resultType;if(z===void 0)return{...Y,resultType:"complete"};if(z==="complete")return Y;if(qu0.includes($))return Y;throw new J1(c0.InternalError,`Handler for ${$} returned resultType '${String(z)}', but results of ${$} only support 'complete' on protocol revision 2026-07-28`)}function Lu0($,Y){let z=Wu0(Y);if(Y.resultType!=="complete"||!Hu0($))return z===void 0?Y:Nu0(Y);let U=Y,Q=eh(U.ttlMs)?U.ttlMs:wu0(z),J=$S(U.cacheScope)?U.cacheScope:Mu0(z),I={...U,ttlMs:Q,cacheScope:J};return delete I[gQ],I}function Fu0($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function Ou0($,Y){if(Y===void 0)return $;let z=$._meta;if(z===void 0)return{...$,_meta:{[o5]:Y}};if(!Fu0(z))return $;if(z[o5]!==void 0)return $;return{...$,_meta:{...z,[o5]:Y}}}function wu0($){return $!==void 0&&eh($.ttlMs)?$.ttlMs:Xu0}function Mu0($){return $!==void 0&&$S($.cacheScope)?$.cacheScope:Zu0}function Nu0($){let Y={...$};return delete Y[gQ],Y}function lt(){if(AO)return AO;let $=nY();return AO={request:{"elicitation/create":z0({method:L0("elicitation/create"),params:$.ElicitRequestParamsSchema}),"sampling/createMessage":z0({method:L0("sampling/createMessage"),params:$.CreateMessageRequestParamsSchema}),"roots/list":z0({method:L0("roots/list"),params:Q1({}).optional()})},response:{"elicitation/create":$.ElicitResultSchema,"sampling/createMessage":$.CreateMessageResultSchema,"roots/list":$.ListRootsResultSchema}},AO}function ot($){return Du0.includes($)}function ih($){return ot($)?lt().request[$]:void 0}function Au0($){return ot($)?lt().response[$]:void 0}function st($){return Object.prototype.hasOwnProperty.call(zS,$)}function at($){return Object.prototype.hasOwnProperty.call(rt,$)}function Bu0($){return Object.prototype.hasOwnProperty.call(zS,$)}function Pu0($){return st($)?nY().dispatchRequestSchemas[$]:void 0}function ju0($){return Bu0($)?nY().dispatchResultSchemas[$]:void 0}function Tu0($){return at($)?nY().notificationSchemas2026[$]:void 0}function XH($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function HH($,Y){if($===void 0)return{ok:!1,reason:"not-in-era"};let z=$.safeParse(Y);return z.success?{ok:!0,value:z.data}:{ok:!1,reason:"invalid",message:String(z.error)}}function Ru0($,Y){let z=Y,U=!1,Q=()=>{if(!U)z={...z},U=!0;return z},J=Y.tools;if($==="tools/list"&&Array.isArray(J)&&J.some((K)=>XH(K)&&("execution"in K)))Q().tools=J.map((K)=>{if(!XH(K)||!("execution"in K))return K;let G={...K};return delete G.execution,G});let I=Y.capabilities;if(XH(I)&&"tasks"in I){let K={...I};delete K.tasks,Q().capabilities=K}return z}function _u0(){if(BO)return BO;let $=nY();return BO={"tools/call":$.CallToolResultSchema,"tools/list":$.ListToolsResultSchema,"prompts/get":$.GetPromptResultSchema,"prompts/list":$.ListPromptsResultSchema,"resources/list":$.ListResourcesResultSchema,"resources/templates/list":$.ListResourceTemplatesResultSchema,"resources/read":$.ReadResourceResultSchema,"completion/complete":$.CompleteResultSchema,"server/discover":$.DiscoverResultSchema},BO}function C7($){return $!==void 0&&xQ($)?US:th}function Et($){if($.revision!==void 0)return C7($.revision).era;return $.era==="modern"?US.era:th.era}function nh($){return tt.some((Y)=>Y.hasRequestMethod($))}function ch($){return tt.some((Y)=>Y.hasNotificationMethod($))}function Ct($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function cY($){if(!Ct($))return;let Y=$._meta;return Ct(Y)?Y:void 0}function vO($){let Y=cY($);return Y!==void 0&&r9 in Y}function hO($){let Y=cY($)?.[r9];return typeof Y==="string"?Y:void 0}function SO($){return C7(LH).validateEnvelopeMeta($)}function QS($){if($.params.ref.type!=="ref/prompt")throw TypeError(`Expected CompleteRequestPrompt, but got ${$.params.ref.type}`)}function JS($){if($.params.ref.type!=="ref/resource")throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${$.params.ref.type}`)}function IS($){let Y=[],z=new Map,U=(J,I,K)=>{if(J===null||typeof J!=="object")return;let G=J;if(Rt in G){if(!K||I.length===0)return`${PO(I)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let W=G[Rt];if(typeof W!=="string"||W.length===0)return`${PO(I)}: x-mcp-header MUST be a non-empty string`;if(!hu0.test(W))return`${PO(I)}: x-mcp-header '${W}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let X=typeof G.type==="string"?G.type:void 0;if(X===void 0||!Su0.has(X))return`${PO(I)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${X??""}`;let Z=W.toLowerCase(),q=z.get(Z);if(q!==void 0)return`x-mcp-header '${W}' is not case-insensitively unique (also declared as '${q}')`;z.set(Z,W),Y.push({path:I,headerName:W,type:X})}let H=G.properties;if(H!==null&&typeof H==="object")for(let[W,X]of Object.entries(H)){let Z=U(X,[...I,W],K);if(Z!==void 0)return Z}for(let W of gu0){let X=G[W];if(X===void 0)continue;let Z=Array.isArray(X)?X:X!==null&&typeof X==="object"&&yu0.has(W)?Object.values(X):[X];for(let q of Z){let V=U(q,[...I,`<${W}>`],!1);if(V!==void 0)return V}}},Q=U($,[],!0);return Q===void 0?{valid:!0,declarations:Y}:{valid:!1,reason:Q}}function PO($){return $.length===0?"":$.join(".")}function jO($,Y,z,U,Q){return{kind:"reject",rung:$,cell:Y,httpStatus:z,code:U.code,message:U.message,...U.data!==void 0&&{data:U.data},settled:Q}}function KS($){if(!vO($))return!1;let Y=hO($);if(Y===void 0||!xQ(Y))return!1;let z=cY($);return z!==void 0&&SO(z).length===0}function GS($,Y){switch($.reason){case"http-method":return jO("http-method","modern-only-method-not-allowed",405,new J1(-32000,"Method not allowed."),!0);case"batch":return jO("jsonrpc-shape","modern-only-batch-not-supported",400,new J1(c0.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),!0);case"response":return jO("jsonrpc-shape","modern-only-response-post",400,new J1(c0.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),!0);case"notification":return;case"initialize":case"no-claim":{let z=$.requestedVersion;return jO("era-classification","modern-only-missing-envelope",400,z===void 0?new J1(c0.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...Y]}):new fQ({supported:[...Y],requested:z}),!0)}}}function yO($,Y){return jG($,Y)}function WH($){return new Set($.flatMap((Y)=>Object.keys(Y.shape)))}function kQ($){if($==null)return!1;let Y=typeof $;if(Y!=="object"&&Y!=="function")return!1;if(!("~standard"in $))return!1;return typeof $["~standard"]?.validate==="function"}function v7($,Y="input"){let z=$["~standard"],U;if(z.jsonSchema)U=z.jsonSchema[Y]({target:mh});else if(z.vendor==="zod"){if(!("_zod"in $))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");if(!_t)_t=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.");U=gY($,{target:mh,io:Y})}else throw Error(`Schema library "${z.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(Y==="output"){if(U.type!==void 0)return U;return et(U)?{type:"object",...U}:U}if(U.type!==void 0&&U.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(U.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...U}}function et($){if("properties"in $||"patternProperties"in $||"additionalProperties"in $||"required"in $)return!0;for(let Y of["oneOf","anyOf","allOf"]){let z=$[Y];if(Array.isArray(z)&&z.length>0)return z.every((U)=>U!==null&&typeof U==="object"&&(U.type==="object"||et(U)))}return!1}function xu0($){if(!$.path?.length)return $.message;return`${$.path.map((Y)=>String(typeof Y==="object"?Y.key:Y)).join(".")}: ${$.message}`}async function iY($,Y){let z=await $["~standard"].validate(Y);if(z.issues&&z.issues.length>0)return{success:!1,error:z.issues.map((U)=>xu0(U)).join(", ")};return{success:!0,data:z.value}}function fu0($){let Y=gY($,{target:mh,io:"input"});return typeof Y.pattern==="string"?Y.pattern:void 0}function bu0($){let Y=uu0.exec($),z=[void 0,-1,0];if(Y)z.push(Number(Y[1]));return[!1,!0].flatMap((U)=>[!1,!0].flatMap((Q)=>z.map((J)=>J$.datetime({local:U,offset:Q,precision:J}))))}function iu0($,Y){let z;switch($){case"email":z=[HL()];break;case"uri":z=[OQ()];break;case"date":z=[J$.date()];break;case"date-time":z=bu0(Y);break}return new Set(z.map((U)=>fu0(U)).filter((U)=>U!==void 0))}function nu0($,Y,z){if(z!=="zod")return!0;return iu0($,Y).has(Y)}function $e($){let Y=v7($,"input"),z=Y.properties||{},U=Y.required||[];return Object.entries(z).map(([Q,J])=>({name:Q,description:J?.description,required:U.includes(Q)}))}function VH($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function cu0($){try{return v7($,"input")}catch(Y){let z=Y instanceof Error?Y.message:String(Y);throw new J1(c0.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${z}`)}}function HS($){return pu0.has($)||$.startsWith("x-")}function lu0($,Y,z,U){if(!VH($))return $;let Q=typeof $.type==="string"&&Object.hasOwn(vt,$.type)?vt[$.type]:void 0;if(Q===void 0)return $;let J={};for(let[I,K]of Object.entries($))if(Q.has(I)||HS(I))J[I]=K;else if(I==="pattern"&&$.type==="string"&&typeof $.format==="string"){if(!mu0.has($.format))J[I]=K;else if(typeof K!=="string"||!nu0($.format,K,z))U.push(`${Y}.${I}`)}else U.push(`${Y}.${I}`);return J}function ou0($,Y){let z={},U=[];for(let[Q,J]of Object.entries($))if(Q==="properties"&&VH(J))z[Q]=Object.fromEntries(Object.entries(J).map(([I,K])=>[I,lu0(K,`properties.${I}`,Y,U)]));else if(du0.has(Q))z[Q]=J;else if(!HS(Q))U.push(Q);if(U.length>0)throw new J1(c0.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${U.join(", ")}`);return z}function ru0($,Y){if(!VH($.properties))return Y;let z=Object.entries($.properties).filter(([,U])=>!yO(GH,U).success).map(([U])=>`properties.${U}`);return z.length>0?z.join(", "):Y}function lh($,Y,z=""){if(Array.isArray($)&&Array.isArray(Y))return $.flatMap((U,Q)=>lh(U,Y[Q],`${z}[${Q}]`));if(!VH($)||!VH(Y))return[];return Object.entries($).flatMap(([U,Q])=>{let J=z?`${z}.${U}`:U;if(!Object.prototype.hasOwnProperty.call(Y,U))return HS(U)?[]:[J];return lh(Q,Y[U],J)})}function su0($){if(!kQ($.requestedSchema))return{...$,mode:"form",requestedSchema:$.requestedSchema};let Y=$.requestedSchema["~standard"].vendor,z=ou0(cu0($.requestedSchema),Y),U=yO(SQ.shape.requestedSchema,z);if(!U.success)throw new J1(c0.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${ru0(z,U.error.message)}`);let Q=lh(z,U.data);if(Q.length>0)throw new J1(c0.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${Q.join(", ")}`);let J=(U.data.required??[]).filter((I)=>!Object.prototype.hasOwnProperty.call(U.data.properties,I));if(J.length>0)throw new J1(c0.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${J.join(", ")}`);return{...$,mode:"form",requestedSchema:U.data}}function au0($){let Y=$.inputRequests!==void 0&&Object.keys($.inputRequests).length>0,z=typeof $.requestState==="string";if(!Y&&!z)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...$.inputRequests!==void 0&&{inputRequests:$.inputRequests},...$.requestState!==void 0&&{requestState:$.requestState}}}function ze($,Y){return`Multi-round-trip request '${$}' still required input after ${Y} rounds (inputRequired.maxRounds)`}function Ue($,Y){return new Promise((z,U)=>{if(Y?.aborted){U(Y.reason instanceof L1?Y.reason:new L1(B1.RequestTimeout,String(Y.reason)));return}let Q=setTimeout(()=>{Y?.removeEventListener("abort",J),z()},$),J=()=>{clearTimeout(Q),U(Y?.reason instanceof L1?Y.reason:new L1(B1.RequestTimeout,String(Y?.reason)))};Y?.addEventListener("abort",J,{once:!0})})}function Qe($){let Y=new AbortController,z=()=>Y.abort($?.reason);if($?.addEventListener("abort",z,{once:!0}),$?.aborted)Y.abort($.reason);return{signal:Y.signal,abort:(U)=>Y.abort(U),dispose:()=>$?.removeEventListener("abort",z)}}function Ke($,Y){let z=$.slice(0,-6);Je[z]=Y,Ie[z]=(U)=>Y.safeParse(U).success}function Ub0($){switch($){case"initialize":case"notifications/initialized":return C7(void 0);case"server/discover":return C7(LH);default:return}}function ht($,Y){let z=$.params;if(!ZH(z))return{message:$,lifted:{}};let U=z._meta,Q=ZH(U)?Qb0.filter((G)=>(G in U)):[],J=Y==="request"?Jb0.filter((G)=>(G in z)):[];if(Q.length===0&&J.length===0)return{message:$,lifted:{}};let I={},K={...z};if(Q.length>0&&ZH(U)){let G={},H={...U};for(let W of Q)G[W]=U[W],delete H[W];if(I.envelope=G,Object.keys(H).length>0)K._meta=H;else delete K._meta}for(let G of J){if(G==="inputResponses")I.inputResponses=K[G];if(G==="requestState")I.requestState=K[G];delete K[G]}return{message:{...$,params:K},lifted:I}}function St($,Y){let z=$.validateResult(Y,void 0);if(!z.ok&&z.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(U){let Q=$.validateResult(Y,U);if(Q.ok)return{value:Q.value};return{issues:[{message:Q.reason==="invalid"?Q.message:`not-in-era: ${Y}`}]}}}}}function FH($){return()=>$}function WS($,Y){return{...$,mcpReq:{...$.mcpReq,requestState:FH(Y)}}}function XS($,Y){He($,Y)}function ZH($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function qS($,Y){let z={...$};for(let U in Y){let Q=U,J=Y[Q];if(J===void 0)continue;let I=z[Q];z[Q]=ZH(I)&&ZH(J)?{...I,...J}:J}return z}function gt($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function Kb0($){let Y={},z=[];if(!gt($))return{accepted:Y,droppedKeys:z};for(let[U,Q]of Object.entries($)){if(!gt(Q)||"method"in Q||"result"in Q){z.push(U);continue}Y[U]=Q}return{accepted:Y,droppedKeys:z}}function Gb0($){return{resultType:"input_required",inputRequests:$.inputRequests,...$.requestState!==void 0&&{requestState:$.requestState}}}function Xe($){return cG.parse(JSON.parse($))}function LS($){return JSON.stringify($)+` `}function Xb0($){let Y=[];if($.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if($.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${$.length})`]};if($.includes(" "))Y.push("Tool name contains spaces, which may cause parsing issues");if($.includes(","))Y.push("Tool name contains commas, which may cause parsing issues");if($.startsWith("-")||$.endsWith("-"))Y.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");if($.startsWith(".")||$.endsWith("."))Y.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");if(!Wb0.test($)){let z=[...$].filter((U)=>!/[A-Za-z0-9._-]/.test(U)).filter((U,Q,J)=>J.indexOf(U)===Q);return Y.push(`Tool name contains invalid characters: ${z.map((U)=>`"${U}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:Y}}return{isValid:!0,warnings:Y}}function Zb0($,Y){if(Y.length>0){console.warn(`Tool name validation warning for "${$}":`);for(let z of Y)console.warn(` - ${z}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function FS($){let Y=Xb0($);return Zb0($,Y.warnings),Y.isValid}function qb0($){return typeof $==="object"&&$!==null&&"_zod"in $}function Vb0($){return typeof $==="object"&&$!==null&&!("_zod"in $)&&"_def"in $&&typeof $._def?.typeName==="string"}function Lb0($){if(typeof $!=="object"||$===null)return!1;if(kQ($))return!1;let Y=Object.getPrototypeOf($);if(Y!==Object.prototype&&Y!==null)return!1;return Object.values($).every((z)=>qb0(z))}function kO($){if($===void 0)return;if(Lb0($))return z0($);if(typeof $==="object"&&$!==null&&!kQ($)&&Object.values($).some((Y)=>Vb0(Y)))throw TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!kQ($))throw TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return $}var ph,lf0,B1,L1,of0,kt="2026-07-28",R7,ut,af0,tf0,ef0,nt,ct,Yu0,NO,su1,au1,Pt,th,Ku0,Gu0,gQ,c0,J1,RO,mt,fQ,_O,Xu0=0,Zu0="private",qu0,Du0,AO,zS,rt,tu1,eu1,Eu0,Cu0,US,BO,LH="2026-07-28",tt,vu0,B$=($)=>iG.safeParse($).success,_7=($)=>nG.safeParse($).success,qH=($)=>BQ.safeParse($).success,gO=($)=>PQ.safeParse($).success,t9=($)=>typeof $==="object"&&$!==null&&!Array.isArray($)&&$.resultType==="input_required",Rt="x-mcp-header",hu0,Su0,gu0,yu0,TO=-32020,$b1,ku0,_t=!1,mh="draft-2020-12",uu0,pu0,du0,vt,mu0,tu0,Ye=250,eu0,$b0,Je,Ie,Yb0,zb0,Ge=60000,Qb0,Jb0,Ib0,He,ZS,Hb0,Yb1,We=10485760,VS=class{_buffer;_maxBufferSize;constructor($){this._maxBufferSize=$?.maxBufferSize??We}append($){if((this._buffer?.length??0)+$.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,$]):$}readMessage(){while(this._buffer){let $=this._buffer.indexOf(` `);if($===-1)return null;let Y=this._buffer.toString("utf8",0,$).replace(/\r$/,"");this._buffer=this._buffer.subarray($+1);try{return Xe(Y)}catch(z){if(z instanceof SyntaxError)continue;throw z}}return null}clear(){this._buffer=void 0}},Wb0;var xO=m(()=>{KT();GT();Dt();Hh();ph=Symbol.for("mcp.sdk.errorBrands");lf0=class $ extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](Y){return yQ(this,Y)}static isInstance(Y){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yQ(this,Y)}constructor(Y,z,U){super(z);this.code=Y,this.errorUri=U,this.name="OAuthError",oh(this,new.target)}toResponseObject(){let Y={error:this.code,error_description:this.message};if(this.errorUri)Y.error_uri=this.errorUri;return Y}static fromResponse(Y){return new $(Y.error,Y.error_description??Y.error,Y.error_uri)}},B1=function($){return $.NotConnected="NOT_CONNECTED",$.AlreadyConnected="ALREADY_CONNECTED",$.NotInitialized="NOT_INITIALIZED",$.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",$.RequestTimeout="REQUEST_TIMEOUT",$.ConnectionClosed="CONNECTION_CLOSED",$.SendFailed="SEND_FAILED",$.InvalidResult="INVALID_RESULT",$.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",$.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",$.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",$.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",$.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",$.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",$.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",$.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",$.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",$.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",$.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",$}({}),L1=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance]($){return yQ(this,$)}static isInstance($){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yQ(this,$)}constructor($,Y,z){super(Y);this.code=$,this.data=z,this.name="SdkError",oh(this,new.target)}},of0=class extends L1{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor($,Y,z){super($,Y,z);this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};R7=[kt];ut=["task","inputRequests","requestState"];tf0=new Set(["const","enum","default","examples"]),ef0=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);nt={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},ct={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Yu0={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};su1=Object.keys(nt),au1=Object.keys(ct);Pt={ok:!1,reason:"not-in-era"};th={era:"2025-11-25",hasRequestMethod:pt,hasNotificationMethod:dt,validateRequest:($,Y)=>DO(Qu0($),Y),validateResult:($,Y)=>DO(Uu0($),Y),validateNotification:($,Y)=>DO(Ju0($),Y),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pt,validateInputResponse:()=>Pt,samplingResultVariant:($,Y)=>{let z=bt();return DO($?z.CreateMessageResultWithToolsSchema:z.CreateMessageResultSchema,Y)},outboundEnvelope:($)=>{return},validateEnvelopeMeta:($)=>[],projectCallToolResult($,Y){let z=ft($),U=z.structuredContent;if(U===void 0)return z;let Q=typeof U!=="object"||U===null||Array.isArray(U),J=Y!==void 0&&it(Y);if(!Q&&!J)return z;return{...z,structuredContent:{result:U}}},decodeResult($,Y){if(dh(Y)&&"resultType"in Y){let z={...Y};return delete z.resultType,{kind:"complete",result:Tt(z)}}return{kind:"complete",result:Tt(Y)}},encodeResult($,Y){if($!=="tools/list")return Y;let z=Y.tools;if(!Array.isArray(z)||!z.some((U)=>jt(U)))return Y;return{...Y,tools:z.map((U)=>jt(U)?{...U,outputSchema:$u0(U.outputSchema)}:U)}},encodeErrorCode:($)=>$===-32002?-32602:$,checkInboundEnvelope:($)=>{return}};Gu0=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];gQ=Symbol("modelcontextprotocol.resultCacheHintFallback");c0=function($){return $[$.ParseError=-32700]="ParseError",$[$.InvalidRequest=-32600]="InvalidRequest",$[$.MethodNotFound=-32601]="MethodNotFound",$[$.InvalidParams=-32602]="InvalidParams",$[$.InternalError=-32603]="InternalError",$[$.ResourceNotFound=-32002]="ResourceNotFound",$[$.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",$[$.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",$[$.UrlElicitationRequired=-32042]="UrlElicitationRequired",$}({}),J1=class $ extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](Y){return yQ(this,Y)}static isInstance(Y){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yQ(this,Y)}constructor(Y,z,U){super(z);this.code=Y,this.data=U,this.name="ProtocolError",oh(this,new.target)}static fromError(Y,z,U){if(Y===c0.UrlElicitationRequired&&U){let Q=U;if(Q.elicitations)return new mt(Q.elicitations,z)}if(Y===c0.UnsupportedProtocolVersion&&U){let Q=U;if(Array.isArray(Q.supported)&&typeof Q.requested==="string")return new fQ({supported:Q.supported,requested:Q.requested},z)}if(Y===c0.InvalidParams||Y===c0.ResourceNotFound){let Q=U;if(typeof Q?.uri==="string"&&(Y===c0.ResourceNotFound||Object.keys(Q).length===1))return new RO(Q.uri,z)}if(Y===c0.MissingRequiredClientCapability&&U){let Q=U;if(Q.requiredCapabilities!==null&&typeof Q.requiredCapabilities==="object"&&!Array.isArray(Q.requiredCapabilities))return new _O({requiredCapabilities:Q.requiredCapabilities},z)}return new $(Y,z,U)}},RO=class extends J1{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor($,Y=`Resource not found: ${$}`){super(c0.InvalidParams,Y,{uri:$})}get uri(){return this.data.uri}},mt=class extends J1{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor($,Y=`URL elicitation${$.length>1?"s":""} required`){super(c0.UrlElicitationRequired,Y,{elicitations:$})}get elicitations(){return this.data?.elicitations??[]}},fQ=class extends J1{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor($,Y=`Unsupported protocol version: ${$.requested}`){super(c0.UnsupportedProtocolVersion,Y,$)}get supported(){return this.data.supported}get requested(){return this.data.requested}},_O=class extends J1{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor($,Y=`Missing required client capabilities: ${Object.keys($.requiredCapabilities).join(", ")}`){super(c0.MissingRequiredClientCapability,Y,$)}get requiredCapabilities(){return this.data.requiredCapabilities}},qu0=["tools/call","prompts/get","resources/read"];Du0=["elicitation/create","sampling/createMessage","roots/list"];zS={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},rt={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};tu1=Object.keys(zS),eu1=Object.keys(rt);Eu0={ok:!1,reason:"not-in-era"},Cu0=[r9,s9];US={era:"2026-07-28",hasRequestMethod:st,hasNotificationMethod:at,hasInputRequestMethod:($)=>ih($)!==void 0,validateRequest:($,Y)=>HH(Pu0($),Y),validateResult:($,Y)=>HH(ju0($),Y),validateNotification:($,Y)=>HH(Tu0($),Y),validateInputRequest:($,Y)=>HH(ih($),Y),validateInputResponse:($,Y)=>HH(Au0($),Y),samplingResultVariant:()=>Eu0,outboundEnvelope($){return{[r9]:$.protocolVersion,[AQ]:$.clientInfo,[s9]:$.clientCapabilities,...$.logLevel!==void 0&&{[N7]:$.logLevel}}},validateEnvelopeMeta($){let Y=[];for(let U of Cu0)if(!(U in $))Y.push({key:U,problem:"missing"});let z=nY().RequestMetaEnvelopeSchema.safeParse($);if(!z.success)for(let U of z.error.issues){let Q=U.path.map(String),J=Q.length>0?Q.join("."):"_meta";if(Q.length===1&&Y.some((I)=>I.key===J&&I.problem==="missing"))continue;Y.push({key:J,problem:U.message})}return Y},projectCallToolResult:($)=>ft($),inputRequestSchema:ih,decodeResult($,Y){if(!XH(Y))return{kind:"invalid",error:new L1(B1.InvalidResult,`Invalid result for ${$}: not an object`,{method:$})};let z=Y.resultType;if(z===void 0)return{kind:"invalid",error:new L1(B1.InvalidResult,`Invalid result for ${$}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:$,violation:"missing-resultType"})};if(typeof z!=="string")return{kind:"invalid",error:new L1(B1.InvalidResult,`Invalid result for ${$}: non-string resultType`,{method:$,resultType:z})};if(z==="input_required"){let I=Y.inputRequests,K=XH(I)?I:{},G=Y.requestState;if(Object.keys(K).length===0&&typeof G!=="string")return{kind:"invalid",error:new L1(B1.InvalidResult,`Invalid result for ${$}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:$,violation:"input-required-missing-both"})};return{kind:"input_required",inputRequests:K,...typeof G==="string"&&{requestState:G}}}if(z!=="complete")return{kind:"invalid",error:new L1(B1.UnsupportedResultType,`Unsupported result type '${z}' for ${$}`,{resultType:z,method:$})};let U=_u0(),Q=Object.hasOwn(U,$)?U[$]:void 0;if(Q!==void 0){let I=Q.safeParse(Y);if(!I.success)return{kind:"invalid",error:new L1(B1.InvalidResult,`Invalid result for ${$}: ${I.error}`,{method:$})}}let J={...Y};return delete J.resultType,{kind:"complete",result:J}},encodeResult($,Y,z){return Ou0(Lu0($,Vu0($,Ru0($,Y))),z)},encodeErrorCode:($)=>$===-32002?-32602:$,checkInboundEnvelope($){if($.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let Y=nY().RequestMetaEnvelopeSchema.safeParse($.envelope);if(!Y.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${Y.error.issues.map((z)=>z.message).join("; ")}`}};tt=[th,US];vu0=Gr({AnnotationsSchema:()=>a9,AudioContentSchema:()=>RQ,BaseMetadataSchema:()=>o9,BaseRequestParamsSchema:()=>g6,BlobResourceContentsSchema:()=>aG,BooleanSchemaSchema:()=>zH,CallToolRequestParamsSchema:()=>SF,CallToolRequestSchema:()=>gF,CallToolResultSchema:()=>YH,CancelTaskRequestSchema:()=>jh,CancelTaskResultSchema:()=>Th,CancelledNotificationParamsSchema:()=>kL,CancelledNotificationSchema:()=>dG,ClientCapabilitiesSchema:()=>bL,ClientNotificationSchema:()=>Ch,ClientRequestSchema:()=>Eh,ClientResultSchema:()=>Rh,ClientTasksCapabilitySchema:()=>fL,CompatibilityCallToolResultSchema:()=>Vh,CompleteRequestParamsSchema:()=>KO,CompleteRequestSchema:()=>GO,CompleteResultSchema:()=>HO,ContentBlockSchema:()=>_Q,CreateMessageRequestParamsSchema:()=>mF,CreateMessageRequestSchema:()=>lF,CreateMessageResultSchema:()=>oF,CreateMessageResultWithToolsSchema:()=>rF,CreateTaskResultSchema:()=>Oh,CursorSchema:()=>fG,DiscoverRequestSchema:()=>dL,DiscoverResultSchema:()=>mL,ElicitRequestFormParamsSchema:()=>SQ,ElicitRequestParamsSchema:()=>$O,ElicitRequestSchema:()=>YO,ElicitRequestURLParamsSchema:()=>eF,ElicitResultSchema:()=>QO,ElicitationCompleteNotificationParamsSchema:()=>zO,ElicitationCompleteNotificationSchema:()=>UO,EmbeddedResourceSchema:()=>PF,EmptyResultSchema:()=>pG,EnumSchemaSchema:()=>tF,GetPromptRequestParamsSchema:()=>DF,GetPromptRequestSchema:()=>AF,GetPromptResultSchema:()=>EF,GetTaskPayloadRequestSchema:()=>Dh,GetTaskPayloadResultSchema:()=>Ah,GetTaskRequestSchema:()=>Mh,GetTaskResultSchema:()=>Nh,IconSchema:()=>xL,IconsSchema:()=>A7,ImageContentSchema:()=>CQ,ImplementationSchema:()=>jQ,InitializeRequestParamsSchema:()=>iL,InitializeRequestSchema:()=>nL,InitializeResultSchema:()=>cL,InitializedNotificationSchema:()=>pL,JSONArraySchema:()=>Xh,JSONObjectSchema:()=>t4,JSONRPCErrorResponseSchema:()=>PQ,JSONRPCMessageSchema:()=>cG,JSONRPCNotificationSchema:()=>nG,JSONRPCRequestSchema:()=>iG,JSONRPCResponseSchema:()=>Zh,JSONRPCResultResponseSchema:()=>BQ,JSONValueSchema:()=>M7,LegacyTitledEnumSchemaSchema:()=>JH,ListChangedOptionsBaseSchema:()=>Lh,ListPromptsRequestSchema:()=>MF,ListPromptsResultSchema:()=>NF,ListResourceTemplatesRequestSchema:()=>eL,ListResourceTemplatesResultSchema:()=>$F,ListResourcesRequestSchema:()=>aL,ListResourcesResultSchema:()=>tL,ListRootsRequestSchema:()=>XO,ListRootsResultSchema:()=>ZO,ListTasksRequestSchema:()=>Bh,ListTasksResultSchema:()=>Ph,ListToolsRequestSchema:()=>vF,ListToolsResultSchema:()=>hF,LoggingLevelSchema:()=>T7,LoggingMessageNotificationParamsSchema:()=>fF,LoggingMessageNotificationSchema:()=>uF,ModelHintSchema:()=>bF,ModelPreferencesSchema:()=>iF,MultiSelectEnumSchemaSchema:()=>aF,NotificationSchema:()=>W8,NotificationsParamsSchema:()=>H8,NumberSchemaSchema:()=>hQ,PaginatedRequestParamsSchema:()=>rL,PaginatedRequestSchema:()=>B7,PaginatedResultSchema:()=>P7,PingRequestSchema:()=>lG,PrimitiveSchemaDefinitionSchema:()=>GH,ProgressNotificationParamsSchema:()=>oL,ProgressNotificationSchema:()=>oG,ProgressSchema:()=>lL,ProgressTokenSchema:()=>xG,PromptArgumentSchema:()=>OF,PromptListChangedNotificationSchema:()=>CF,PromptMessageSchema:()=>TF,PromptReferenceSchema:()=>IO,PromptSchema:()=>wF,ReadResourceRequestParamsSchema:()=>YF,ReadResourceRequestSchema:()=>zF,ReadResourceResultSchema:()=>UF,RelatedTaskMetadataSchema:()=>yL,RequestIdSchema:()=>D7,RequestMetaSchema:()=>uG,RequestSchema:()=>e4,ResourceContentsSchema:()=>rG,ResourceLinkSchema:()=>jF,ResourceListChangedNotificationSchema:()=>QF,ResourceRequestParamsSchema:()=>TQ,ResourceSchema:()=>tG,ResourceTemplateReferenceSchema:()=>JO,ResourceTemplateSchema:()=>sL,ResourceUpdatedNotificationParamsSchema:()=>LF,ResourceUpdatedNotificationSchema:()=>FF,ResultMetaObjectSchema:()=>bG,ResultSchema:()=>$6,RoleSchema:()=>j7,RootSchema:()=>WO,RootsListChangedNotificationSchema:()=>qO,SamplingContentSchema:()=>pF,SamplingMessageContentBlockSchema:()=>kY,SamplingMessageSchema:()=>dF,ServerCapabilitiesSchema:()=>mG,ServerNotificationSchema:()=>vh,ServerRequestSchema:()=>_h,ServerResultSchema:()=>hh,ServerTasksCapabilitySchema:()=>uL,SetLevelRequestParamsSchema:()=>kF,SetLevelRequestSchema:()=>xF,SingleSelectEnumSchemaSchema:()=>sF,StringSchemaSchema:()=>vQ,SubscribeRequestParamsSchema:()=>JF,SubscribeRequestSchema:()=>IF,SubscriptionFilterSchema:()=>eG,SubscriptionsAcknowledgedNotificationParamsSchema:()=>XF,SubscriptionsAcknowledgedNotificationSchema:()=>ZF,SubscriptionsListenRequestParamsSchema:()=>HF,SubscriptionsListenRequestSchema:()=>WF,SubscriptionsListenResultMetaSchema:()=>qF,SubscriptionsListenResultSchema:()=>VF,TaskAugmentedRequestParamsSchema:()=>bY,TaskCreationParamsSchema:()=>Fh,TaskMetadataSchema:()=>gL,TaskSchema:()=>E7,TaskStatusNotificationParamsSchema:()=>LO,TaskStatusNotificationSchema:()=>wh,TaskStatusSchema:()=>VO,TextContentSchema:()=>EQ,TextResourceContentsSchema:()=>sG,TitledMultiSelectEnumSchemaSchema:()=>KH,TitledSingleSelectEnumSchemaSchema:()=>QH,ToolAnnotationsSchema:()=>RF,ToolChoiceSchema:()=>nF,ToolExecutionSchema:()=>_F,ToolListChangedNotificationSchema:()=>yF,ToolResultContentSchema:()=>cF,ToolSchema:()=>$H,ToolUseContentSchema:()=>BF,UnsubscribeRequestParamsSchema:()=>KF,UnsubscribeRequestSchema:()=>GF,UntitledMultiSelectEnumSchemaSchema:()=>IH,UntitledSingleSelectEnumSchemaSchema:()=>UH});hu0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Su0=new Set(["string","integer","boolean","number"]);gu0=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],yu0=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);$b1=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32000],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[c0.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[TO,c0.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[c0.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[c0.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[c0.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[TO],conformance:["http-header-validation"],rationale:"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[c0.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[TO],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],ku0={[c0.ParseError]:400,[c0.InvalidRequest]:400,[c0.MethodNotFound]:404,[c0.UnsupportedProtocolVersion]:400,[c0.MissingRequiredClientCapability]:400,[TO]:400};uu0=/\\\.\\d\{(\d+)\}/;pu0=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);du0=new Set(["$schema",...Object.keys(SQ.shape.requestedSchema.shape)]),vt={string:WH([vQ,UH,QH,JH]),number:WH([hQ]),integer:WH([hQ]),boolean:WH([zH]),array:WH([IH,KH])},mu0=new Set(vQ.shape.format.unwrap().options);tu0=Object.assign(au0,{elicit($){try{return{method:"elicitation/create",params:su0($)}}catch(Y){throw Y instanceof J1?TypeError(Y.message,{cause:Y}):Y}},elicitUrl($){return{method:"elicitation/create",params:{...$,mode:"url"}}},createMessage($){return{method:"sampling/createMessage",params:$}},listRoots(){return{method:"roots/list"}}});eu0=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],$b0={IdJagTokenExchangeResponseSchema:kh,OAuthClientInformationFullSchema:fh,OAuthClientInformationSchema:MO,OAuthClientMetadataSchema:wO,OAuthClientRegistrationErrorSchema:uh,OAuthErrorResponseSchema:xh,OAuthMetadataSchema:FO,OAuthProtectedResourceMetadataSchema:Sh,OAuthTokenRevocationRequestSchema:bh,OAuthTokensSchema:yh,OpenIdProviderDiscoveryMetadataSchema:gh,OpenIdProviderMetadataSchema:OO},Je={},Ie={};for(let $ of eu0)Ke($,vu0[$]);for(let[$,Y]of Object.entries($b0))Ke($,Y);Yb0=Object.freeze(Je),zb0=Object.freeze(Ie);Qb0=[r9,AQ,s9,N7],Jb0=["inputResponses","requestState"];Ib0=FH(void 0);ZS=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{He=($,Y)=>{$._negotiatedProtocolVersion=Y}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor($){this._options=$,this._supportedProtocolVersions=$?.supportedProtocolVersions??hL,this.setNotificationHandler("notifications/cancelled",(Y)=>{this._oncancel(Y)}),this.setNotificationHandler("notifications/progress",(Y)=>{this._onprogress(Y)}),this.setRequestHandler("ping",(Y)=>({}))}_shouldDropInbound($){}_outboundMetaEnvelope(){}_envelopeOutbound($){let Y=this._outboundMetaEnvelope();if(Y===void 0)return $;let z=$.params??{};return{...$,params:{...z,_meta:{...Y,...z._meta}}}}_resolveNonCompleteResult($,Y){return Promise.reject(new L1(B1.UnsupportedResultType,`Unsupported result type '${$.kind}' for ${Y.request.method}`,{resultType:$.kind,method:Y.request.method}))}_getRequestHandler($){return this._requestHandlers.get($)}async _oncancel($){if(!$.params.requestId)return;this._requestHandlerAbortControllers.get($.params.requestId)?.abort($.params.reason)}_setupTimeout($,Y,z,U,Q=!1){this._timeoutInfo.set($,{timeoutId:setTimeout(U,Y),startTime:Date.now(),timeout:Y,maxTotalTimeout:z,resetTimeoutOnProgress:Q,onTimeout:U})}_resetTimeout($){let Y=this._timeoutInfo.get($);if(!Y)return!1;let z=Date.now()-Y.startTime;if(Y.maxTotalTimeout&&z>=Y.maxTotalTimeout)throw this._timeoutInfo.delete($),new L1(B1.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:Y.maxTotalTimeout,totalElapsed:z});return clearTimeout(Y.timeoutId),Y.timeoutId=setTimeout(Y.onTimeout,Y.timeout),!0}_cleanupTimeout($){let Y=this._timeoutInfo.get($);if(Y)clearTimeout(Y.timeoutId),this._timeoutInfo.delete($)}async connect($){this._transport=$;let Y=this.transport?.onclose;this._transport.onclose=()=>{try{Y?.()}finally{this._onclose()}};let z=this.transport?.onerror;this._transport.onerror=(Q)=>{z?.(Q),this._onerror(Q)};let U=this._transport?.onmessage;this._transport.onmessage=(Q,J)=>{if(U?.(Q,J),qH(Q)||gO(Q))this._onresponse(Q);else if(B$(Q))this._onrequest(Q,J);else if(_7(Q))this._onnotification(Q,J);else this._onerror(Error(`Unknown message type: ${JSON.stringify(Q)}`))},$.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let $=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let U of this._timeoutInfo.values())clearTimeout(U.timeoutId);this._timeoutInfo.clear();let Y=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let z=new L1(B1.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let U of $.values())U(z);for(let U of Y.values())U.abort(z)}}_onerror($){this.onerror?.($)}_onnotification($,Y){let{message:z}=ht($,"notification"),U=this._negotiatedWireCodec();if(Y?.classification===void 0&&this._shouldDropInbound($)==="drop")return;if(Y?.classification!==void 0){let I=Et(Y.classification);if(I!==U.era){this._onerror(Error(`Era mismatch on inbound notification '${z.method}': classified as ${I} but this instance serves ${U.era}`));return}}if(ch(z.method)&&!U.hasNotificationMethod(z.method))return;let Q=this._notificationHandlers.get(z.method),J=this.fallbackNotificationHandler;if(Q===void 0&&J===void 0)return;Promise.resolve().then(()=>Q===void 0?J(z):Q(z,U)).catch((I)=>this._onerror(Error(`Uncaught error in notification handler: ${I}`)))}_onrequest($,Y){let{message:z,lifted:U}=ht($,"request"),Q=this._negotiatedWireCodec();if(Y?.classification===void 0&&this._shouldDropInbound($)==="drop"){this._onerror(Error(`Dropped inbound request '${$.method}': not servable on this connection's protocol era`));return}let J=this._transport,I=(F,w,O)=>{let N={jsonrpc:"2.0",id:z.id,error:{code:F,message:w,...O!==void 0&&{data:O}}};J?.send(N).catch((M)=>this._onerror(Error(`Failed to send an error response: ${M}`)))};if(Y?.classification!==void 0){let F=Et(Y.classification);if(F!==Q.era){this._onerror(Error(`Era mismatch on inbound request '${z.method}': classified as ${F} but this instance serves ${Q.era}`));let w=Y.classification.revision??F;I(c0.UnsupportedProtocolVersion,`Unsupported protocol version: ${w}`,{supported:this._supportedProtocolVersions,requested:w});return}}if(nh(z.method)&&!Q.hasRequestMethod(z.method)){I(c0.MethodNotFound,"Method not found");return}let K=this._requestHandlers.get(z.method)??this.fallbackRequestHandler;if(K===void 0){I(c0.MethodNotFound,"Method not found");return}let G=Q.checkInboundEnvelope(U);if(G!==void 0){I(c0.InvalidParams,G);return}let H=(F,w)=>this._notificationViaCodec(this._resolveOutboundCodec(F.method),F,{...w,relatedRequestId:z.id}),W=(F,w,O)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(F.method),F,w,{...O,relatedRequestId:z.id}),X=new AbortController;this._requestHandlerAbortControllers.set(z.id,X);let Z=U.inputResponses===void 0?void 0:Kb0(U.inputResponses),q={sessionId:J?.sessionId,mcpReq:{id:z.id,method:z.method,_meta:z.params?._meta,...U.envelope!==void 0&&{envelope:U.envelope},...Z!==void 0&&{inputResponses:Z.accepted},...Z!==void 0&&Z.droppedKeys.length>0&&{droppedInputResponseKeys:Z.droppedKeys},requestState:U.requestState===void 0?Ib0:FH(U.requestState),signal:X.signal,send:(F,w,O)=>{let N=this._resolveOutboundCodec(F.method);if(this._assertOutboundRequestInEra(N,F.method),kQ(w))return W(F,w,O);let M=St(N,F.method);if(M===void 0)throw TypeError(`'${F.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return W(F,M,w)},notify:H},http:Y?.authInfo?{authInfo:Y.authInfo}:void 0},V=this.buildContext(q,Y);Promise.resolve().then(()=>K(z,V)).then(async(F)=>{if(X.signal.aborted)return;let w;try{w=Q.encodeResult(z.method,F,this._outboundServerInfo())}catch(N){this._onerror(Error(`Failed to encode result for ${z.method}: ${N}`)),I(c0.InternalError,"Internal error");return}let O={result:w,jsonrpc:"2.0",id:z.id};await J?.send(O)},async(F)=>{if(X.signal.aborted)return;let w=Number.isSafeInteger(F.code)?F.code:c0.InternalError,O={jsonrpc:"2.0",id:z.id,error:{code:Q.encodeErrorCode(w),message:F.message??"Internal error",...F.data!==void 0&&{data:F.data}}};await J?.send(O)}).catch((F)=>this._onerror(Error(`Failed to send response: ${F}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(z.id)===X)this._requestHandlerAbortControllers.delete(z.id)})}_onprogress($){let{progressToken:Y,...z}=$.params,U=Number(Y),Q=this._progressHandlers.get(U);if(!Q){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify($)}`));return}let J=this._responseHandlers.get(U),I=this._timeoutInfo.get(U);if(I&&J&&I.resetTimeoutOnProgress)try{this._resetTimeout(U)}catch(K){this._responseHandlers.delete(U),this._progressHandlers.delete(U),this._cleanupTimeout(U),J(K);return}Q(z)}_onresponse($){let Y=Number($.id),z=this._responseHandlers.get(Y);if(z===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify($)}`));return}if(this._responseHandlers.delete(Y),this._cleanupTimeout(Y),this._progressHandlers.delete(Y),qH($))z($);else z(J1.fromError($.error.code,$.error.message,$.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request($,Y,z){let U=this._resolveOutboundCodec($.method);if(this._assertOutboundRequestInEra(U,$.method),kQ(Y))return this._requestWithSchemaViaCodec(U,$,Y,z);let Q=St(U,$.method);if(Q===void 0)throw TypeError(`'${$.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(U,$,Q,Y)}_negotiatedWireCodec(){return C7(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec($){if(this._negotiatedProtocolVersion===void 0){let Y=Ub0($);if(Y)return Y}return this._negotiatedWireCodec()}_assertOutboundRequestInEra($,Y){if(nh(Y)&&!$.hasRequestMethod(Y))throw new L1(B1.MethodNotSupportedByProtocolVersion,`Method '${Y}' is not supported by the negotiated protocol version (wire era ${$.era})`,{method:Y,era:$.era})}_requestWithSchema($,Y,z){let U=this._resolveOutboundCodec($.method);return this._assertOutboundRequestInEra(U,$.method),this._requestWithSchemaViaCodec(U,$,Y,z)}_requestWithSchemaViaCodec($,Y,z,U){let{relatedRequestId:Q,resumptionToken:J,onresumptiontoken:I,headers:K}=U??{},G=Date.now(),H,W;return new Promise((X,Z)=>{let q=(j)=>{Z(j)};if(!this._transport){q(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(Y.method)}catch(j){q(j);return}if(U?.signal?.aborted){let j=U.signal.reason;throw j instanceof L1?j:new L1(B1.RequestTimeout,String(j))}let V=$.era===LH&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,F=this._requestMessageId++;W=F;let w={...Y,jsonrpc:"2.0",id:F};if(U?.onprogress)this._progressHandlers.set(F,U.onprogress),w.params={...Y.params,_meta:{...Y.params?._meta,progressToken:F}};let O=this._envelopeOutbound(w),N=!1,M=(j)=>{if(N)return;if(this._progressHandlers.delete(F),V===void 0)this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:F,reason:String(j)}}),{relatedRequestId:Q,resumptionToken:J,onresumptiontoken:I}).catch((A)=>this._onerror(Error(`Failed to send cancellation: ${A}`)));else V.abort();Z(j instanceof L1?j:new L1(B1.RequestTimeout,String(j)))};this._responseHandlers.set(F,(j)=>{if(U?.signal?.aborted)return;if(N=!0,j instanceof Error)return Z(j);let A;try{A=$.decodeResult(Y.method,j.result)}catch(C){return Z(C instanceof Error?C:Error(String(C)))}if(A.kind==="invalid")return Z(A.error);if(A.kind==="input_required"){if(U?.allowInputRequired===!0)return X(Gb0(A));let C={codec:$,request:Y,resultSchema:z,options:U,flowStartedAt:G,retry:(b,k)=>this._requestWithSchemaViaCodec($,b===void 0?{method:Y.method}:{method:Y.method,params:b},z,k)};return X(this._resolveNonCompleteResult(A,C))}let T=A.result;iY(z,T).then((C)=>{if(C.success)X(C.data);else Z(new L1(B1.InvalidResult,`Invalid result for ${Y.method}: ${C.error}`))},Z)}),H=()=>M(U?.signal?.reason),U?.signal?.addEventListener("abort",H,{once:!0});let D=U?.timeout??Ge,P=()=>M(new L1(B1.RequestTimeout,"Request timed out",{timeout:D}));this._setupTimeout(F,D,U?.maxTotalTimeout,P,U?.resetTimeoutOnProgress??!1),this._transport.send(O,{relatedRequestId:Q,resumptionToken:J,onresumptiontoken:I,headers:K,requestSignal:V?.signal}).catch((j)=>{this._progressHandlers.delete(F),Z(j)})}).finally(()=>{if(H)U?.signal?.removeEventListener("abort",H);if(W!==void 0)this._responseHandlers.delete(W),this._cleanupTimeout(W)})}async notification($,Y){return this._notificationViaCodec(this._resolveOutboundCodec($.method),$,Y)}async _notificationViaCodec($,Y,z){if(!this._transport)throw new L1(B1.NotConnected,"Not connected");if(ch(Y.method)&&!$.hasNotificationMethod(Y.method))throw new L1(B1.MethodNotSupportedByProtocolVersion,`Notification '${Y.method}' is not supported by the negotiated protocol version (wire era ${$.era})`,{method:Y.method,era:$.era});this.assertNotificationCapability(Y.method);let U=this._envelopeOutbound({jsonrpc:"2.0",...Y});if((this._options?.debouncedNotificationMethods??[]).includes(Y.method)&&!Y.params&&!z?.relatedRequestId){if(this._pendingDebouncedNotifications.has(Y.method))return;this._pendingDebouncedNotifications.add(Y.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(Y.method),!this._transport)return;this._transport?.send(U,z).catch((Q)=>this._onerror(Q))});return}await this._transport.send(U,z)}setRequestHandler($,Y,z){this.assertRequestHandlerCapability($);let U;if(typeof Y==="function"){if(!nh($))throw TypeError(`'${$}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);U=(Q,J)=>{let I=this._negotiatedWireCodec(),K=I.validateRequest($,Q);if(!K.ok&&K.reason==="not-in-era")K=I.validateInputRequest($,Q);if(!K.ok){if(K.reason==="not-in-era")throw new J1(c0.InternalError,`No wire schema for ${$} in the resolved era`);throw Error(K.message)}return Promise.resolve(Y(K.value,J))}}else if(z)U=async(Q,J)=>{let I=await iY(Y.params,{...Q.params});if(!I.success)throw new J1(c0.InvalidParams,`Invalid params for ${$}: ${I.error}`);return z(I.data,J)};else throw TypeError("setRequestHandler: handler is required");this._requestHandlers.set($,this._wrapHandler($,U))}_wrapHandler($,Y){return Y}_outboundServerInfo(){}removeRequestHandler($){this._requestHandlers.delete($)}assertCanSetRequestHandler($){if(this._requestHandlers.has($))throw Error(`A request handler for ${$} already exists, which would be overridden`)}setNotificationHandler($,Y,z){if(typeof Y==="function"){if(!ch($))throw TypeError(`'${$}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set($,(U,Q)=>{let J=Q.validateNotification($,U);if(!J.ok){if(J.reason==="not-in-era")throw new J1(c0.InternalError,`No wire schema for ${$} in the resolved era`);throw Error(J.message)}return Promise.resolve(Y(J.value))});return}if(!z)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set($,async(U)=>{let Q=await iY(Y.params,{...U.params});if(!Q.success)throw new J1(c0.InvalidParams,`Invalid params for notification ${$}: ${Q.error}`);await z(Q.data,U)})}removeNotificationHandler($){this._notificationHandlers.delete($)}};/*! * content-type * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed -*/Hb0=C0(($)=>{var Y=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,z=/\\([\u000b\u0020-\u00ff])/g,U=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;$.parse=Q;function Q(K){if(!K)throw TypeError("argument string is required");var G=typeof K==="object"?J(K):K;if(typeof G!=="string")throw TypeError("argument string is required to be a string");var H=G.indexOf(";"),W=H!==-1?G.slice(0,H).trim():G.trim();if(!U.test(W))throw TypeError("invalid media type");var X=new I(W.toLowerCase());if(H!==-1){var Z,q,V;Y.lastIndex=H;while(q=Y.exec(G)){if(q.index!==H)throw TypeError("invalid parameter format");if(H+=q[0].length,Z=q[1].toLowerCase(),V=q[2],V.charCodeAt(0)===34){if(V=V.slice(1,-1),V.indexOf("\\")!==-1)V=V.replace(z,"$1")}X.parameters[Z]=V}if(H!==G.length)throw TypeError("invalid parameter format")}return X}function J(K){var G;if(typeof K.getHeader==="function")G=K.getHeader("content-type");else if(typeof K.headers==="object")G=K.headers&&K.headers["content-type"];if(typeof G!=="string")throw TypeError("content-type header is missing from object");return G}function I(K){this.parameters=Object.create(null),this.type=K}}),Yb1=sq(Hb0(),1);Wb0=/^[A-Za-z0-9._-]{1,128}$/});function OS($){let Y=new $({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return vi0(Y),Y}var fO,Ze,F1,v1,Q5,bO,Fb0,qe,Ve,uO,Ob0,J5,wb0,Mb0,Le,Nb0,iO,uQ,OH,bQ,nO,Db0,Fe,Ab0,Bb0,Pb0,wS,jb0,MS,Oe,Tb0,Eb0,Cb0,Rb0,_b0,vb0,hb0,Sb0,NS,gb0,yb0,kb0,we,Me,Ne,xb0,fb0,ub0,DS,bb0,De,ib0,nb0,cb0,pb0,db0,mb0,lb0,ob0,Ae,rb0,Be,Pe,je,sb0,AS,ab0,Te,Ee,Ce,tb0,eb0,Re,$i0,Yi0,zi0,_e,Ui0,Qi0,ve,Ji0,Ii0,Ki0,Gi0,Hi0,Wi0,Xi0,Zi0,qi0,Vi0,Li0,Fi0,Oi0,wi0,Mi0,Ni0,Di0,Ai0,Bi0,Pi0,ji0,Ti0,Ei0,he,Ci0,Ri0,_i0,vi0,cO=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor($){this._userAjv=$!==void 0,this._ajv=$}get ajv(){return this._ajv??=OS(Ri0.Ajv2020)}_engineFor($){if(this._userAjv)return this.ajv;let Y=Xr($,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");if(Y==="2020-12")return this.ajv;if(Y==="2019-09")return this._ajv2019??=OS(Ci0.Ajv2019);return this._ajvDraft7??=OS(he.Ajv)}getValidator($){let Y=this._engineFor($),z="$id"in $&&typeof $.$id==="string"?Y.getSchema($.$id)??Y.compile($):Y.compile($);return(U)=>{return z(U)?{valid:!0,data:U,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:Y.errorsText(z.errors)}}}},qb1;var Se=m(()=>{KT();GT();fO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.regexpCode=$.getEsmExportName=$.getProperty=$.safeStringify=$.stringify=$.strConcat=$.addCodeArg=$.str=$._=$.nil=$._Code=$.Name=$.IDENTIFIER=$._CodeOrName=void 0;var Y=class{};$._CodeOrName=Y,$.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var z=class extends Y{constructor(O){super();if(!$.IDENTIFIER.test(O))throw Error("CodeGen: name must be a valid identifier");this.str=O}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$.Name=z;var U=class extends Y{constructor(O){super();this._items=typeof O==="string"?[O]:O}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let O=this._items[0];return O===""||O==='""'}get str(){var O;return(O=this._str)!==null&&O!==void 0?O:this._str=this._items.reduce((N,M)=>`${N}${M}`,"")}get names(){var O;return(O=this._names)!==null&&O!==void 0?O:this._names=this._items.reduce((N,M)=>{if(M instanceof z)N[M.str]=(N[M.str]||0)+1;return N},{})}};$._Code=U,$.nil=new U("");function Q(O,...N){let M=[O[0]],D=0;while(D{Object.defineProperty($,"__esModule",{value:!0}),$.ValueScope=$.ValueScopeName=$.Scope=$.varKinds=$.UsedValueState=void 0;let Y=fO();var z=class extends Error{constructor(G){super(`CodeGen: "code" for ${G} not defined`);this.value=G.value}},U;(function(G){G[G.Started=0]="Started",G[G.Completed=1]="Completed"})(U||($.UsedValueState=U={})),$.varKinds={const:new Y.Name("const"),let:new Y.Name("let"),var:new Y.Name("var")};var Q=class{constructor({prefixes:G,parent:H}={}){this._names={},this._prefixes=G,this._parent=H}toName(G){return G instanceof Y.Name?G:this.name(G)}name(G){return new Y.Name(this._newName(G))}_newName(G){let H=this._names[G]||this._nameGroup(G);return`${G}${H.index++}`}_nameGroup(G){var H,W;if(((W=(H=this._parent)===null||H===void 0?void 0:H._prefixes)===null||W===void 0?void 0:W.has(G))||this._prefixes&&!this._prefixes.has(G))throw Error(`CodeGen: prefix "${G}" is not allowed in this scope`);return this._names[G]={prefix:G,index:0}}};$.Scope=Q;var J=class extends Y.Name{constructor(G,H){super(H);this.prefix=G}setValue(G,{property:H,itemIndex:W}){this.value=G,this.scopePath=Y._`.${new Y.Name(H)}[${W}]`}};$.ValueScopeName=J;let I=Y._`\n`;var K=class extends Q{constructor(G){super(G);this._values={},this._scope=G.scope,this.opts={...G,_n:G.lines?I:Y.nil}}get(){return this._scope}name(G){return new J(G,this._newName(G))}value(G,H){var W;if(H.ref===void 0)throw Error("CodeGen: ref must be passed in value");let X=this.toName(G),{prefix:Z}=X,q=(W=H.key)!==null&&W!==void 0?W:H.ref,V=this._values[Z];if(V){let O=V.get(q);if(O)return O}else V=this._values[Z]=new Map;V.set(q,X);let F=this._scope[Z]||(this._scope[Z]=[]),w=F.length;return F[w]=H.ref,X.setValue(H,{property:Z,itemIndex:w}),X}getValue(G,H){let W=this._values[G];if(!W)return;return W.get(H)}scopeRefs(G,H=this._values){return this._reduceValues(H,(W)=>{if(W.scopePath===void 0)throw Error(`CodeGen: name "${W}" has no value`);return Y._`${G}${W.scopePath}`})}scopeCode(G=this._values,H,W){return this._reduceValues(G,(X)=>{if(X.value===void 0)throw Error(`CodeGen: name "${X}" has no value`);return X.value.code},H,W)}_reduceValues(G,H,W={},X){let Z=Y.nil;for(let q in G){let V=G[q];if(!V)continue;let F=W[q]=W[q]||new Map;V.forEach((w)=>{if(F.has(w))return;F.set(w,U.Started);let O=H(w);if(O){let N=this.opts.es5?$.varKinds.var:$.varKinds.const;Z=Y._`${Z}${N} ${w} = ${O};${this.opts._n}`}else if(O=X===null||X===void 0?void 0:X(w))Z=Y._`${Z}${O}${this.opts._n}`;else throw new z(w);F.set(w,U.Completed)})}return Z}};$.ValueScope=K}),F1=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.or=$.and=$.not=$.CodeGen=$.operators=$.varKinds=$.ValueScopeName=$.ValueScope=$.Scope=$.Name=$.regexpCode=$.stringify=$.getProperty=$.nil=$.strConcat=$.str=$._=void 0;let Y=fO(),z=Ze();var U=fO();Object.defineProperty($,"_",{enumerable:!0,get:function(){return U._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return U.str}}),Object.defineProperty($,"strConcat",{enumerable:!0,get:function(){return U.strConcat}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return U.nil}}),Object.defineProperty($,"getProperty",{enumerable:!0,get:function(){return U.getProperty}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return U.stringify}}),Object.defineProperty($,"regexpCode",{enumerable:!0,get:function(){return U.regexpCode}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return U.Name}});var Q=Ze();Object.defineProperty($,"Scope",{enumerable:!0,get:function(){return Q.Scope}}),Object.defineProperty($,"ValueScope",{enumerable:!0,get:function(){return Q.ValueScope}}),Object.defineProperty($,"ValueScopeName",{enumerable:!0,get:function(){return Q.ValueScopeName}}),Object.defineProperty($,"varKinds",{enumerable:!0,get:function(){return Q.varKinds}}),$.operators={GT:new Y._Code(">"),GTE:new Y._Code(">="),LT:new Y._Code("<"),LTE:new Y._Code("<="),EQ:new Y._Code("==="),NEQ:new Y._Code("!=="),NOT:new Y._Code("!"),OR:new Y._Code("||"),AND:new Y._Code("&&"),ADD:new Y._Code("+")};var J=class{optimizeNodes(){return this}optimizeNames(g,a){return this}},I=class extends J{constructor(g,a,$0){super();this.varKind=g,this.name=a,this.rhs=$0}render({es5:g,_n:a}){let $0=g?z.varKinds.var:this.varKind,N0=this.rhs===void 0?"":` = ${this.rhs}`;return`${$0} ${this.name}${N0};`+a}optimizeNames(g,a){if(!g[this.name.str])return;if(this.rhs)this.rhs=n(this.rhs,g,a);return this}get names(){return this.rhs instanceof Y._CodeOrName?this.rhs.names:{}}},K=class extends J{constructor(g,a,$0){super();this.lhs=g,this.rhs=a,this.sideEffects=$0}render({_n:g}){return`${this.lhs} = ${this.rhs};`+g}optimizeNames(g,a){if(this.lhs instanceof Y.Name&&!g[this.lhs.str]&&!this.sideEffects)return;return this.rhs=n(this.rhs,g,a),this}get names(){return i(this.lhs instanceof Y.Name?{}:{...this.lhs.names},this.rhs)}},G=class extends K{constructor(g,a,$0,N0){super(g,$0,N0);this.op=a}render({_n:g}){return`${this.lhs} ${this.op}= ${this.rhs};`+g}},H=class extends J{constructor(g){super();this.label=g,this.names={}}render({_n:g}){return`${this.label}:`+g}},W=class extends J{constructor(g){super();this.label=g,this.names={}}render({_n:g}){return`break${this.label?` ${this.label}`:""};`+g}},X=class extends J{constructor(g){super();this.error=g}render({_n:g}){return`throw ${this.error};`+g}get names(){return this.error.names}},Z=class extends J{constructor(g){super();this.code=g}render({_n:g}){return`${this.code};`+g}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(g,a){return this.code=n(this.code,g,a),this}get names(){return this.code instanceof Y._CodeOrName?this.code.names:{}}},q=class extends J{constructor(g=[]){super();this.nodes=g}render(g){return this.nodes.reduce((a,$0)=>a+$0.render(g),"")}optimizeNodes(){let{nodes:g}=this,a=g.length;while(a--){let $0=g[a].optimizeNodes();if(Array.isArray($0))g.splice(a,1,...$0);else if($0)g[a]=$0;else g.splice(a,1)}return g.length>0?this:void 0}optimizeNames(g,a){let{nodes:$0}=this,N0=$0.length;while(N0--){let T0=$0[N0];if(T0.optimizeNames(g,a))continue;U0(g,T0.names),$0.splice(N0,1)}return $0.length>0?this:void 0}get names(){return this.nodes.reduce((g,a)=>S(g,a.names),{})}},V=class extends q{render(g){return"{"+g._n+super.render(g)+"}"+g._n}},F=class extends q{},w=class extends V{};w.kind="else";var O=class g extends V{constructor(a,$0){super($0);this.condition=a}render(a){let $0=`if(${this.condition})`+super.render(a);if(this.else)$0+="else "+this.else.render(a);return $0}optimizeNodes(){super.optimizeNodes();let a=this.condition;if(a===!0)return this.nodes;let $0=this.else;if($0){let N0=$0.optimizeNodes();$0=this.else=Array.isArray(N0)?new w(N0):N0}if($0){if(a===!1)return $0 instanceof g?$0:$0.nodes;if(this.nodes.length)return this;return new g(x(a),$0 instanceof g?[$0]:$0.nodes)}if(a===!1||!this.nodes.length)return;return this}optimizeNames(a,$0){var N0;if(this.else=(N0=this.else)===null||N0===void 0?void 0:N0.optimizeNames(a,$0),!(super.optimizeNames(a,$0)||this.else))return;return this.condition=n(this.condition,a,$0),this}get names(){let a=super.names;if(i(a,this.condition),this.else)S(a,this.else.names);return a}};O.kind="if";var N=class extends V{};N.kind="for";var M=class extends N{constructor(g){super();this.iteration=g}render(g){return`for(${this.iteration})`+super.render(g)}optimizeNames(g,a){if(!super.optimizeNames(g,a))return;return this.iteration=n(this.iteration,g,a),this}get names(){return S(super.names,this.iteration.names)}},D=class extends N{constructor(g,a,$0,N0){super();this.varKind=g,this.name=a,this.from=$0,this.to=N0}render(g){let a=g.es5?z.varKinds.var:this.varKind,{name:$0,from:N0,to:T0}=this;return`for(${a} ${$0}=${N0}; ${$0}<${T0}; ${$0}++)`+super.render(g)}get names(){return i(i(super.names,this.from),this.to)}},P=class extends N{constructor(g,a,$0,N0){super();this.loop=g,this.varKind=a,this.name=$0,this.iterable=N0}render(g){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(g)}optimizeNames(g,a){if(!super.optimizeNames(g,a))return;return this.iterable=n(this.iterable,g,a),this}get names(){return S(super.names,this.iterable.names)}},j=class extends V{constructor(g,a,$0){super();this.name=g,this.args=a,this.async=$0}render(g){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(g)}};j.kind="func";var A=class extends q{render(g){return"return "+super.render(g)}};A.kind="return";var T=class extends V{render(g){let a="try"+super.render(g);if(this.catch)a+=this.catch.render(g);if(this.finally)a+=this.finally.render(g);return a}optimizeNodes(){var g,a;return super.optimizeNodes(),(g=this.catch)===null||g===void 0||g.optimizeNodes(),(a=this.finally)===null||a===void 0||a.optimizeNodes(),this}optimizeNames(g,a){var $0,N0;return super.optimizeNames(g,a),($0=this.catch)===null||$0===void 0||$0.optimizeNames(g,a),(N0=this.finally)===null||N0===void 0||N0.optimizeNames(g,a),this}get names(){let g=super.names;if(this.catch)S(g,this.catch.names);if(this.finally)S(g,this.finally.names);return g}},C=class extends V{constructor(g){super();this.error=g}render(g){return`catch(${this.error})`+super.render(g)}};C.kind="catch";var b=class extends V{render(g){return"finally"+super.render(g)}};b.kind="finally";var k=class{constructor(g,a={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...a,_n:a.lines?` -`:""},this._extScope=g,this._scope=new z.Scope({parent:g}),this._nodes=[new F]}toString(){return this._root.render(this.opts)}name(g){return this._scope.name(g)}scopeName(g){return this._extScope.name(g)}scopeValue(g,a){let $0=this._extScope.value(g,a);return(this._values[$0.prefix]||(this._values[$0.prefix]=new Set)).add($0),$0}getScopeValue(g,a){return this._extScope.getValue(g,a)}scopeRefs(g){return this._extScope.scopeRefs(g,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(g,a,$0,N0){let T0=this._scope.toName(a);if($0!==void 0&&N0)this._constants[T0.str]=$0;return this._leafNode(new I(g,T0,$0)),T0}const(g,a,$0){return this._def(z.varKinds.const,g,a,$0)}let(g,a,$0){return this._def(z.varKinds.let,g,a,$0)}var(g,a,$0){return this._def(z.varKinds.var,g,a,$0)}assign(g,a,$0){return this._leafNode(new K(g,a,$0))}add(g,a){return this._leafNode(new G(g,$.operators.ADD,a))}code(g){if(typeof g=="function")g();else if(g!==Y.nil)this._leafNode(new Z(g));return this}object(...g){let a=["{"];for(let[$0,N0]of g){if(a.length>1)a.push(",");if(a.push($0),$0!==N0||this.opts.es5)a.push(":"),(0,Y.addCodeArg)(a,N0)}return a.push("}"),new Y._Code(a)}if(g,a,$0){if(this._blockNode(new O(g)),a&&$0)this.code(a).else().code($0).endIf();else if(a)this.code(a).endIf();else if($0)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(g){return this._elseNode(new O(g))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(O,w)}_for(g,a){if(this._blockNode(g),a)this.code(a).endFor();return this}for(g,a){return this._for(new M(g),a)}forRange(g,a,$0,N0,T0=this.opts.es5?z.varKinds.var:z.varKinds.let){let v0=this._scope.toName(g);return this._for(new D(T0,v0,a,$0),()=>N0(v0))}forOf(g,a,$0,N0=z.varKinds.const){let T0=this._scope.toName(g);if(this.opts.es5){let v0=a instanceof Y.Name?a:this.var("_arr",a);return this.forRange("_i",0,Y._`${v0}.length`,(G0)=>{this.var(T0,Y._`${v0}[${G0}]`),$0(T0)})}return this._for(new P("of",N0,T0,a),()=>$0(T0))}forIn(g,a,$0,N0=this.opts.es5?z.varKinds.var:z.varKinds.const){if(this.opts.ownProperties)return this.forOf(g,Y._`Object.keys(${a})`,$0);let T0=this._scope.toName(g);return this._for(new P("in",N0,T0,a),()=>$0(T0))}endFor(){return this._endBlockNode(N)}label(g){return this._leafNode(new H(g))}break(g){return this._leafNode(new W(g))}return(g){let a=new A;if(this._blockNode(a),this.code(g),a.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(g,a,$0){if(!a&&!$0)throw Error('CodeGen: "try" without "catch" and "finally"');let N0=new T;if(this._blockNode(N0),this.code(g),a){let T0=this.name("e");this._currNode=N0.catch=new C(T0),a(T0)}if($0)this._currNode=N0.finally=new b,this.code($0);return this._endBlockNode(C,b)}throw(g){return this._leafNode(new X(g))}block(g,a){if(this._blockStarts.push(this._nodes.length),g)this.code(g).endBlock(a);return this}endBlock(g){let a=this._blockStarts.pop();if(a===void 0)throw Error("CodeGen: not in self-balancing block");let $0=this._nodes.length-a;if($0<0||g!==void 0&&$0!==g)throw Error(`CodeGen: wrong number of nodes: ${$0} vs ${g} expected`);return this._nodes.length=a,this}func(g,a=Y.nil,$0,N0){if(this._blockNode(new j(g,a,$0)),N0)this.code(N0).endFunc();return this}endFunc(){return this._endBlockNode(j)}optimize(g=1){while(g-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(g){return this._currNode.nodes.push(g),this}_blockNode(g){this._currNode.nodes.push(g),this._nodes.push(g)}_endBlockNode(g,a){let $0=this._currNode;if($0 instanceof g||a&&$0 instanceof a)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${a?`${g.kind}/${a.kind}`:g.kind}"`)}_elseNode(g){let a=this._currNode;if(!(a instanceof O))throw Error('CodeGen: "else" without "if"');return this._currNode=a.else=g,this}get _root(){return this._nodes[0]}get _currNode(){let g=this._nodes;return g[g.length-1]}set _currNode(g){let a=this._nodes;a[a.length-1]=g}};$.CodeGen=k;function S(g,a){for(let $0 in a)g[$0]=(g[$0]||0)+(a[$0]||0);return g}function i(g,a){return a instanceof Y._CodeOrName?S(g,a.names):g}function n(g,a,$0){if(g instanceof Y.Name)return N0(g);if(!T0(g))return g;return new Y._Code(g._items.reduce((v0,G0)=>{if(G0 instanceof Y.Name)G0=N0(G0);if(G0 instanceof Y._Code)v0.push(...G0._items);else v0.push(G0);return v0},[]));function N0(v0){let G0=$0[v0.str];if(G0===void 0||a[v0.str]!==1)return v0;return delete a[v0.str],G0}function T0(v0){return v0 instanceof Y._Code&&v0._items.some((G0)=>G0 instanceof Y.Name&&a[G0.str]===1&&$0[G0.str]!==void 0)}}function U0(g,a){for(let $0 in a)g[$0]=(g[$0]||0)-(a[$0]||0)}function x(g){return typeof g=="boolean"||typeof g=="number"||g===null?!g:Y._`!${Y0(g)}`}$.not=x;let d=p($.operators.AND);function t(...g){return g.reduce(d)}$.and=t;let e=p($.operators.OR);function y(...g){return g.reduce(e)}$.or=y;function p(g){return(a,$0)=>a===Y.nil?$0:$0===Y.nil?a:Y._`${Y0(a)} ${g} ${Y0($0)}`}function Y0(g){return g instanceof Y.Name?g:Y._`(${g})`}}),v1=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.checkStrictMode=$.getErrorPath=$.Type=$.useFunc=$.setEvaluated=$.evaluatedPropsToName=$.mergeEvaluated=$.eachItem=$.unescapeJsonPointer=$.escapeJsonPointer=$.escapeFragment=$.unescapeFragment=$.schemaRefOrVal=$.schemaHasRulesButRef=$.schemaHasRules=$.checkUnknownRules=$.alwaysValidSchema=$.toHash=void 0;let Y=F1(),z=fO();function U(j){let A={};for(let T of j)A[T]=!0;return A}$.toHash=U;function Q(j,A){if(typeof A=="boolean")return A;if(Object.keys(A).length===0)return!0;return J(j,A),!I(A,j.self.RULES.all)}$.alwaysValidSchema=Q;function J(j,A=j.schema){let{opts:T,self:C}=j;if(!T.strictSchema)return;if(typeof A==="boolean")return;let b=C.RULES.keywords;for(let k in A)if(!b[k])P(j,`unknown keyword: "${k}"`)}$.checkUnknownRules=J;function I(j,A){if(typeof j=="boolean")return!j;for(let T in j)if(A[T])return!0;return!1}$.schemaHasRules=I;function K(j,A){if(typeof j=="boolean")return!j;for(let T in j)if(T!=="$ref"&&A.all[T])return!0;return!1}$.schemaHasRulesButRef=K;function G({topSchemaRef:j,schemaPath:A},T,C,b){if(!b){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return Y._`${T}`}return Y._`${j}${A}${(0,Y.getProperty)(C)}`}$.schemaRefOrVal=G;function H(j){return Z(decodeURIComponent(j))}$.unescapeFragment=H;function W(j){return encodeURIComponent(X(j))}$.escapeFragment=W;function X(j){if(typeof j=="number")return`${j}`;return j.replace(/~/g,"~0").replace(/\//g,"~1")}$.escapeJsonPointer=X;function Z(j){return j.replace(/~1/g,"/").replace(/~0/g,"~")}$.unescapeJsonPointer=Z;function q(j,A){if(Array.isArray(j))for(let T of j)A(T);else A(j)}$.eachItem=q;function V({mergeNames:j,mergeToName:A,mergeValues:T,resultToName:C}){return(b,k,S,i)=>{let n=S===void 0?k:S instanceof Y.Name?(k instanceof Y.Name?j(b,k,S):A(b,k,S),S):k instanceof Y.Name?(A(b,S,k),k):T(k,S);return i===Y.Name&&!(n instanceof Y.Name)?C(b,n):n}}$.mergeEvaluated={props:V({mergeNames:(j,A,T)=>j.if(Y._`${T} !== true && ${A} !== undefined`,()=>{j.if(Y._`${A} === true`,()=>j.assign(T,!0),()=>j.assign(T,Y._`${T} || {}`).code(Y._`Object.assign(${T}, ${A})`))}),mergeToName:(j,A,T)=>j.if(Y._`${T} !== true`,()=>{if(A===!0)j.assign(T,!0);else j.assign(T,Y._`${T} || {}`),w(j,T,A)}),mergeValues:(j,A)=>j===!0?!0:{...j,...A},resultToName:F}),items:V({mergeNames:(j,A,T)=>j.if(Y._`${T} !== true && ${A} !== undefined`,()=>j.assign(T,Y._`${A} === true ? true : ${T} > ${A} ? ${T} : ${A}`)),mergeToName:(j,A,T)=>j.if(Y._`${T} !== true`,()=>j.assign(T,A===!0?!0:Y._`${T} > ${A} ? ${T} : ${A}`)),mergeValues:(j,A)=>j===!0?!0:Math.max(j,A),resultToName:(j,A)=>j.var("items",A)})};function F(j,A){if(A===!0)return j.var("props",!0);let T=j.var("props",Y._`{}`);if(A!==void 0)w(j,T,A);return T}$.evaluatedPropsToName=F;function w(j,A,T){Object.keys(T).forEach((C)=>j.assign(Y._`${A}${(0,Y.getProperty)(C)}`,!0))}$.setEvaluated=w;let O={};function N(j,A){return j.scopeValue("func",{ref:A,code:O[A.code]||(O[A.code]=new z._Code(A.code))})}$.useFunc=N;var M;(function(j){j[j.Num=0]="Num",j[j.Str=1]="Str"})(M||($.Type=M={}));function D(j,A,T){if(j instanceof Y.Name){let C=A===M.Num;return T?C?Y._`"[" + ${j} + "]"`:Y._`"['" + ${j} + "']"`:C?Y._`"/" + ${j}`:Y._`"/" + ${j}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,Y.getProperty)(j).toString():"/"+X(j)}$.getErrorPath=D;function P(j,A,T=j.opts.strictSchema){if(!T)return;if(A=`strict mode: ${A}`,T===!0)throw Error(A);j.self.logger.warn(A)}$.checkStrictMode=P}),Q5=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={data:new Y.Name("data"),valCxt:new Y.Name("valCxt"),instancePath:new Y.Name("instancePath"),parentData:new Y.Name("parentData"),parentDataProperty:new Y.Name("parentDataProperty"),rootData:new Y.Name("rootData"),dynamicAnchors:new Y.Name("dynamicAnchors"),vErrors:new Y.Name("vErrors"),errors:new Y.Name("errors"),this:new Y.Name("this"),self:new Y.Name("self"),scope:new Y.Name("scope"),json:new Y.Name("json"),jsonPos:new Y.Name("jsonPos"),jsonLen:new Y.Name("jsonLen"),jsonPart:new Y.Name("jsonPart")};$.default=z}),bO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.extendErrors=$.resetErrorsCount=$.reportExtraError=$.reportError=$.keyword$DataError=$.keywordError=void 0;let Y=F1(),z=v1(),U=Q5();$.keywordError={message:({keyword:w})=>Y.str`must pass "${w}" keyword validation`},$.keyword$DataError={message:({keyword:w,schemaType:O})=>O?Y.str`"${w}" keyword must be ${O} ($data)`:Y.str`"${w}" keyword is invalid ($data)`};function Q(w,O=$.keywordError,N,M){let{it:D}=w,{gen:P,compositeRule:j,allErrors:A}=D,T=X(w,O,N);if(M!==null&&M!==void 0?M:j||A)G(P,T);else H(D,Y._`[${T}]`)}$.reportError=Q;function J(w,O=$.keywordError,N){let{it:M}=w,{gen:D,compositeRule:P,allErrors:j}=M;if(G(D,X(w,O,N)),!(P||j))H(M,U.default.vErrors)}$.reportExtraError=J;function I(w,O){w.assign(U.default.errors,O),w.if(Y._`${U.default.vErrors} !== null`,()=>w.if(O,()=>w.assign(Y._`${U.default.vErrors}.length`,O),()=>w.assign(U.default.vErrors,null)))}$.resetErrorsCount=I;function K({gen:w,keyword:O,schemaValue:N,data:M,errsCount:D,it:P}){if(D===void 0)throw Error("ajv implementation error");let j=w.name("err");w.forRange("i",D,U.default.errors,(A)=>{if(w.const(j,Y._`${U.default.vErrors}[${A}]`),w.if(Y._`${j}.instancePath === undefined`,()=>w.assign(Y._`${j}.instancePath`,(0,Y.strConcat)(U.default.instancePath,P.errorPath))),w.assign(Y._`${j}.schemaPath`,Y.str`${P.errSchemaPath}/${O}`),P.opts.verbose)w.assign(Y._`${j}.schema`,N),w.assign(Y._`${j}.data`,M)})}$.extendErrors=K;function G(w,O){let N=w.const("err",O);w.if(Y._`${U.default.vErrors} === null`,()=>w.assign(U.default.vErrors,Y._`[${N}]`),Y._`${U.default.vErrors}.push(${N})`),w.code(Y._`${U.default.errors}++`)}function H(w,O){let{gen:N,validateName:M,schemaEnv:D}=w;if(D.$async)N.throw(Y._`new ${w.ValidationError}(${O})`);else N.assign(Y._`${M}.errors`,O),N.return(!1)}let W={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function X(w,O,N){let{createErrors:M}=w.it;if(M===!1)return Y._`{}`;return Z(w,O,N)}function Z(w,O,N={}){let{gen:M,it:D}=w,P=[q(D,N),V(w,N)];return F(w,O,P),M.object(...P)}function q({errorPath:w},{instancePath:O}){let N=O?Y.str`${w}${(0,z.getErrorPath)(O,z.Type.Str)}`:w;return[U.default.instancePath,(0,Y.strConcat)(U.default.instancePath,N)]}function V({keyword:w,it:{errSchemaPath:O}},{schemaPath:N,parentSchema:M}){let D=M?O:Y.str`${O}/${w}`;if(N)D=Y.str`${D}${(0,z.getErrorPath)(N,z.Type.Str)}`;return[W.schemaPath,D]}function F(w,{params:O,message:N},M){let{keyword:D,data:P,schemaValue:j,it:A}=w,{opts:T,propertyName:C,topSchemaRef:b,schemaPath:k}=A;if(M.push([W.keyword,D],[W.params,typeof O=="function"?O(w):O||Y._`{}`]),T.messages)M.push([W.message,typeof N=="function"?N(w):N]);if(T.verbose)M.push([W.schema,j],[W.parentSchema,Y._`${b}${k}`],[U.default.data,P]);if(C)M.push([W.propertyName,C])}}),Fb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.boolOrEmptySchema=$.topBoolOrEmptySchema=void 0;let Y=bO(),z=F1(),U=Q5(),Q={message:"boolean schema is false"};function J(G){let{gen:H,schema:W,validateName:X}=G;if(W===!1)K(G,!1);else if(typeof W=="object"&&W.$async===!0)H.return(U.default.data);else H.assign(z._`${X}.errors`,null),H.return(!0)}$.topBoolOrEmptySchema=J;function I(G,H){let{gen:W,schema:X}=G;if(X===!1)W.var(H,!1),K(G);else W.var(H,!0)}$.boolOrEmptySchema=I;function K(G,H){let{gen:W,data:X}=G,Z={gen:W,keyword:"false schema",data:X,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:G};(0,Y.reportError)(Z,Q,void 0,H)}}),qe=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.getRules=$.isJSONType=void 0;let Y=new Set(["string","number","integer","boolean","null","object","array"]);function z(Q){return typeof Q=="string"&&Y.has(Q)}$.isJSONType=z;function U(){let Q={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...Q,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},Q.number,Q.string,Q.array,Q.object],post:{rules:[]},all:{},keywords:{}}}$.getRules=U}),Ve=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.shouldUseRule=$.shouldUseGroup=$.schemaHasRulesForType=void 0;function Y({schema:Q,self:J},I){let K=J.RULES.types[I];return K&&K!==!0&&z(Q,K)}$.schemaHasRulesForType=Y;function z(Q,J){return J.rules.some((I)=>U(Q,I))}$.shouldUseGroup=z;function U(Q,J){var I;return Q[J.keyword]!==void 0||((I=J.definition.implements)===null||I===void 0?void 0:I.some((K)=>Q[K]!==void 0))}$.shouldUseRule=U}),uO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.reportTypeError=$.checkDataTypes=$.checkDataType=$.coerceAndCheckDataType=$.getJSONTypes=$.getSchemaTypes=$.DataType=void 0;let Y=qe(),z=Ve(),U=bO(),Q=F1(),J=v1();var I;(function(M){M[M.Correct=0]="Correct",M[M.Wrong=1]="Wrong"})(I||($.DataType=I={}));function K(M){let D=G(M.type);if(D.includes("null")){if(M.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!D.length&&M.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(M.nullable===!0)D.push("null")}return D}$.getSchemaTypes=K;function G(M){let D=Array.isArray(M)?M:M?[M]:[];if(D.every(Y.isJSONType))return D;throw Error("type must be JSONType or JSONType[]: "+D.join(","))}$.getJSONTypes=G;function H(M,D){let{gen:P,data:j,opts:A}=M,T=X(D,A.coerceTypes),C=D.length>0&&!(T.length===0&&D.length===1&&(0,z.schemaHasRulesForType)(M,D[0]));if(C){let b=F(D,j,A.strictNumbers,I.Wrong);P.if(b,()=>{if(T.length)Z(M,D,T);else O(M)})}return C}$.coerceAndCheckDataType=H;let W=new Set(["string","number","integer","boolean","null"]);function X(M,D){return D?M.filter((P)=>W.has(P)||D==="array"&&P==="array"):[]}function Z(M,D,P){let{gen:j,data:A,opts:T}=M,C=j.let("dataType",Q._`typeof ${A}`),b=j.let("coerced",Q._`undefined`);if(T.coerceTypes==="array")j.if(Q._`${C} == 'object' && Array.isArray(${A}) && ${A}.length == 1`,()=>j.assign(A,Q._`${A}[0]`).assign(C,Q._`typeof ${A}`).if(F(D,A,T.strictNumbers),()=>j.assign(b,A)));j.if(Q._`${b} !== undefined`);for(let S of P)if(W.has(S)||S==="array"&&T.coerceTypes==="array")k(S);j.else(),O(M),j.endIf(),j.if(Q._`${b} !== undefined`,()=>{j.assign(A,b),q(M,b)});function k(S){switch(S){case"string":j.elseIf(Q._`${C} == "number" || ${C} == "boolean"`).assign(b,Q._`"" + ${A}`).elseIf(Q._`${A} === null`).assign(b,Q._`""`);return;case"number":j.elseIf(Q._`${C} == "boolean" || ${A} === null +*/Hb0=C0(($)=>{var Y=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,z=/\\([\u000b\u0020-\u00ff])/g,U=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;$.parse=Q;function Q(K){if(!K)throw TypeError("argument string is required");var G=typeof K==="object"?J(K):K;if(typeof G!=="string")throw TypeError("argument string is required to be a string");var H=G.indexOf(";"),W=H!==-1?G.slice(0,H).trim():G.trim();if(!U.test(W))throw TypeError("invalid media type");var X=new I(W.toLowerCase());if(H!==-1){var Z,q,V;Y.lastIndex=H;while(q=Y.exec(G)){if(q.index!==H)throw TypeError("invalid parameter format");if(H+=q[0].length,Z=q[1].toLowerCase(),V=q[2],V.charCodeAt(0)===34){if(V=V.slice(1,-1),V.indexOf("\\")!==-1)V=V.replace(z,"$1")}X.parameters[Z]=V}if(H!==G.length)throw TypeError("invalid parameter format")}return X}function J(K){var G;if(typeof K.getHeader==="function")G=K.getHeader("content-type");else if(typeof K.headers==="object")G=K.headers&&K.headers["content-type"];if(typeof G!=="string")throw TypeError("content-type header is missing from object");return G}function I(K){this.parameters=Object.create(null),this.type=K}}),Yb1=sq(Hb0(),1);Wb0=/^[A-Za-z0-9._-]{1,128}$/});function OS($){let Y=new $({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return vi0(Y),Y}var fO,Ze,F1,v1,Q5,bO,Fb0,qe,Ve,uO,Ob0,J5,wb0,Mb0,Le,Nb0,iO,uQ,OH,bQ,nO,Db0,Fe,Ab0,Bb0,Pb0,wS,jb0,MS,Oe,Tb0,Eb0,Cb0,Rb0,_b0,vb0,hb0,Sb0,NS,gb0,yb0,kb0,we,Me,Ne,xb0,fb0,ub0,DS,bb0,De,ib0,nb0,cb0,pb0,db0,mb0,lb0,ob0,Ae,rb0,Be,Pe,je,sb0,AS,ab0,Te,Ee,Ce,tb0,eb0,Re,$i0,Yi0,zi0,_e,Ui0,Qi0,ve,Ji0,Ii0,Ki0,Gi0,Hi0,Wi0,Xi0,Zi0,qi0,Vi0,Li0,Fi0,Oi0,wi0,Mi0,Ni0,Di0,Ai0,Bi0,Pi0,ji0,Ti0,Ei0,he,Ci0,Ri0,_i0,vi0,cO=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor($){this._userAjv=$!==void 0,this._ajv=$}get ajv(){return this._ajv??=OS(Ri0.Ajv2020)}_engineFor($){if(this._userAjv)return this.ajv;let Y=Xr($,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");if(Y==="2020-12")return this.ajv;if(Y==="2019-09")return this._ajv2019??=OS(Ci0.Ajv2019);return this._ajvDraft7??=OS(he.Ajv)}getValidator($){let Y=this._engineFor($),z="$id"in $&&typeof $.$id==="string"?Y.getSchema($.$id)??Y.compile($):Y.compile($);return(U)=>{return z(U)?{valid:!0,data:U,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:Y.errorsText(z.errors)}}}},qb1;var Se=m(()=>{KT();GT();fO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.regexpCode=$.getEsmExportName=$.getProperty=$.safeStringify=$.stringify=$.strConcat=$.addCodeArg=$.str=$._=$.nil=$._Code=$.Name=$.IDENTIFIER=$._CodeOrName=void 0;var Y=class{};$._CodeOrName=Y,$.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var z=class extends Y{constructor(O){super();if(!$.IDENTIFIER.test(O))throw Error("CodeGen: name must be a valid identifier");this.str=O}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$.Name=z;var U=class extends Y{constructor(O){super();this._items=typeof O==="string"?[O]:O}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let O=this._items[0];return O===""||O==='""'}get str(){var O;return(O=this._str)!==null&&O!==void 0?O:this._str=this._items.reduce((N,M)=>`${N}${M}`,"")}get names(){var O;return(O=this._names)!==null&&O!==void 0?O:this._names=this._items.reduce((N,M)=>{if(M instanceof z)N[M.str]=(N[M.str]||0)+1;return N},{})}};$._Code=U,$.nil=new U("");function Q(O,...N){let M=[O[0]],D=0;while(D{Object.defineProperty($,"__esModule",{value:!0}),$.ValueScope=$.ValueScopeName=$.Scope=$.varKinds=$.UsedValueState=void 0;let Y=fO();var z=class extends Error{constructor(G){super(`CodeGen: "code" for ${G} not defined`);this.value=G.value}},U;(function(G){G[G.Started=0]="Started",G[G.Completed=1]="Completed"})(U||($.UsedValueState=U={})),$.varKinds={const:new Y.Name("const"),let:new Y.Name("let"),var:new Y.Name("var")};var Q=class{constructor({prefixes:G,parent:H}={}){this._names={},this._prefixes=G,this._parent=H}toName(G){return G instanceof Y.Name?G:this.name(G)}name(G){return new Y.Name(this._newName(G))}_newName(G){let H=this._names[G]||this._nameGroup(G);return`${G}${H.index++}`}_nameGroup(G){var H,W;if(((W=(H=this._parent)===null||H===void 0?void 0:H._prefixes)===null||W===void 0?void 0:W.has(G))||this._prefixes&&!this._prefixes.has(G))throw Error(`CodeGen: prefix "${G}" is not allowed in this scope`);return this._names[G]={prefix:G,index:0}}};$.Scope=Q;var J=class extends Y.Name{constructor(G,H){super(H);this.prefix=G}setValue(G,{property:H,itemIndex:W}){this.value=G,this.scopePath=Y._`.${new Y.Name(H)}[${W}]`}};$.ValueScopeName=J;let I=Y._`\n`;var K=class extends Q{constructor(G){super(G);this._values={},this._scope=G.scope,this.opts={...G,_n:G.lines?I:Y.nil}}get(){return this._scope}name(G){return new J(G,this._newName(G))}value(G,H){var W;if(H.ref===void 0)throw Error("CodeGen: ref must be passed in value");let X=this.toName(G),{prefix:Z}=X,q=(W=H.key)!==null&&W!==void 0?W:H.ref,V=this._values[Z];if(V){let O=V.get(q);if(O)return O}else V=this._values[Z]=new Map;V.set(q,X);let F=this._scope[Z]||(this._scope[Z]=[]),w=F.length;return F[w]=H.ref,X.setValue(H,{property:Z,itemIndex:w}),X}getValue(G,H){let W=this._values[G];if(!W)return;return W.get(H)}scopeRefs(G,H=this._values){return this._reduceValues(H,(W)=>{if(W.scopePath===void 0)throw Error(`CodeGen: name "${W}" has no value`);return Y._`${G}${W.scopePath}`})}scopeCode(G=this._values,H,W){return this._reduceValues(G,(X)=>{if(X.value===void 0)throw Error(`CodeGen: name "${X}" has no value`);return X.value.code},H,W)}_reduceValues(G,H,W={},X){let Z=Y.nil;for(let q in G){let V=G[q];if(!V)continue;let F=W[q]=W[q]||new Map;V.forEach((w)=>{if(F.has(w))return;F.set(w,U.Started);let O=H(w);if(O){let N=this.opts.es5?$.varKinds.var:$.varKinds.const;Z=Y._`${Z}${N} ${w} = ${O};${this.opts._n}`}else if(O=X===null||X===void 0?void 0:X(w))Z=Y._`${Z}${O}${this.opts._n}`;else throw new z(w);F.set(w,U.Completed)})}return Z}};$.ValueScope=K}),F1=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.or=$.and=$.not=$.CodeGen=$.operators=$.varKinds=$.ValueScopeName=$.ValueScope=$.Scope=$.Name=$.regexpCode=$.stringify=$.getProperty=$.nil=$.strConcat=$.str=$._=void 0;let Y=fO(),z=Ze();var U=fO();Object.defineProperty($,"_",{enumerable:!0,get:function(){return U._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return U.str}}),Object.defineProperty($,"strConcat",{enumerable:!0,get:function(){return U.strConcat}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return U.nil}}),Object.defineProperty($,"getProperty",{enumerable:!0,get:function(){return U.getProperty}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return U.stringify}}),Object.defineProperty($,"regexpCode",{enumerable:!0,get:function(){return U.regexpCode}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return U.Name}});var Q=Ze();Object.defineProperty($,"Scope",{enumerable:!0,get:function(){return Q.Scope}}),Object.defineProperty($,"ValueScope",{enumerable:!0,get:function(){return Q.ValueScope}}),Object.defineProperty($,"ValueScopeName",{enumerable:!0,get:function(){return Q.ValueScopeName}}),Object.defineProperty($,"varKinds",{enumerable:!0,get:function(){return Q.varKinds}}),$.operators={GT:new Y._Code(">"),GTE:new Y._Code(">="),LT:new Y._Code("<"),LTE:new Y._Code("<="),EQ:new Y._Code("==="),NEQ:new Y._Code("!=="),NOT:new Y._Code("!"),OR:new Y._Code("||"),AND:new Y._Code("&&"),ADD:new Y._Code("+")};var J=class{optimizeNodes(){return this}optimizeNames(y,r){return this}},I=class extends J{constructor(y,r,$0){super();this.varKind=y,this.name=r,this.rhs=$0}render({es5:y,_n:r}){let $0=y?z.varKinds.var:this.varKind,N0=this.rhs===void 0?"":` = ${this.rhs}`;return`${$0} ${this.name}${N0};`+r}optimizeNames(y,r){if(!y[this.name.str])return;if(this.rhs)this.rhs=n(this.rhs,y,r);return this}get names(){return this.rhs instanceof Y._CodeOrName?this.rhs.names:{}}},K=class extends J{constructor(y,r,$0){super();this.lhs=y,this.rhs=r,this.sideEffects=$0}render({_n:y}){return`${this.lhs} = ${this.rhs};`+y}optimizeNames(y,r){if(this.lhs instanceof Y.Name&&!y[this.lhs.str]&&!this.sideEffects)return;return this.rhs=n(this.rhs,y,r),this}get names(){return i(this.lhs instanceof Y.Name?{}:{...this.lhs.names},this.rhs)}},G=class extends K{constructor(y,r,$0,N0){super(y,$0,N0);this.op=r}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}},H=class extends J{constructor(y){super();this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}},W=class extends J{constructor(y){super();this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}},X=class extends J{constructor(y){super();this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}},Z=class extends J{constructor(y){super();this.code=y}render({_n:y}){return`${this.code};`+y}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(y,r){return this.code=n(this.code,y,r),this}get names(){return this.code instanceof Y._CodeOrName?this.code.names:{}}},q=class extends J{constructor(y=[]){super();this.nodes=y}render(y){return this.nodes.reduce((r,$0)=>r+$0.render(y),"")}optimizeNodes(){let{nodes:y}=this,r=y.length;while(r--){let $0=y[r].optimizeNodes();if(Array.isArray($0))y.splice(r,1,...$0);else if($0)y[r]=$0;else y.splice(r,1)}return y.length>0?this:void 0}optimizeNames(y,r){let{nodes:$0}=this,N0=$0.length;while(N0--){let T0=$0[N0];if(T0.optimizeNames(y,r))continue;U0(y,T0.names),$0.splice(N0,1)}return $0.length>0?this:void 0}get names(){return this.nodes.reduce((y,r)=>S(y,r.names),{})}},V=class extends q{render(y){return"{"+y._n+super.render(y)+"}"+y._n}},F=class extends q{},w=class extends V{};w.kind="else";var O=class y extends V{constructor(r,$0){super($0);this.condition=r}render(r){let $0=`if(${this.condition})`+super.render(r);if(this.else)$0+="else "+this.else.render(r);return $0}optimizeNodes(){super.optimizeNodes();let r=this.condition;if(r===!0)return this.nodes;let $0=this.else;if($0){let N0=$0.optimizeNodes();$0=this.else=Array.isArray(N0)?new w(N0):N0}if($0){if(r===!1)return $0 instanceof y?$0:$0.nodes;if(this.nodes.length)return this;return new y(x(r),$0 instanceof y?[$0]:$0.nodes)}if(r===!1||!this.nodes.length)return;return this}optimizeNames(r,$0){var N0;if(this.else=(N0=this.else)===null||N0===void 0?void 0:N0.optimizeNames(r,$0),!(super.optimizeNames(r,$0)||this.else))return;return this.condition=n(this.condition,r,$0),this}get names(){let r=super.names;if(i(r,this.condition),this.else)S(r,this.else.names);return r}};O.kind="if";var N=class extends V{};N.kind="for";var M=class extends N{constructor(y){super();this.iteration=y}render(y){return`for(${this.iteration})`+super.render(y)}optimizeNames(y,r){if(!super.optimizeNames(y,r))return;return this.iteration=n(this.iteration,y,r),this}get names(){return S(super.names,this.iteration.names)}},D=class extends N{constructor(y,r,$0,N0){super();this.varKind=y,this.name=r,this.from=$0,this.to=N0}render(y){let r=y.es5?z.varKinds.var:this.varKind,{name:$0,from:N0,to:T0}=this;return`for(${r} ${$0}=${N0}; ${$0}<${T0}; ${$0}++)`+super.render(y)}get names(){return i(i(super.names,this.from),this.to)}},P=class extends N{constructor(y,r,$0,N0){super();this.loop=y,this.varKind=r,this.name=$0,this.iterable=N0}render(y){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(y)}optimizeNames(y,r){if(!super.optimizeNames(y,r))return;return this.iterable=n(this.iterable,y,r),this}get names(){return S(super.names,this.iterable.names)}},j=class extends V{constructor(y,r,$0){super();this.name=y,this.args=r,this.async=$0}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}};j.kind="func";var A=class extends q{render(y){return"return "+super.render(y)}};A.kind="return";var T=class extends V{render(y){let r="try"+super.render(y);if(this.catch)r+=this.catch.render(y);if(this.finally)r+=this.finally.render(y);return r}optimizeNodes(){var y,r;return super.optimizeNodes(),(y=this.catch)===null||y===void 0||y.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(y,r){var $0,N0;return super.optimizeNames(y,r),($0=this.catch)===null||$0===void 0||$0.optimizeNames(y,r),(N0=this.finally)===null||N0===void 0||N0.optimizeNames(y,r),this}get names(){let y=super.names;if(this.catch)S(y,this.catch.names);if(this.finally)S(y,this.finally.names);return y}},C=class extends V{constructor(y){super();this.error=y}render(y){return`catch(${this.error})`+super.render(y)}};C.kind="catch";var b=class extends V{render(y){return"finally"+super.render(y)}};b.kind="finally";var k=class{constructor(y,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` +`:""},this._extScope=y,this._scope=new z.Scope({parent:y}),this._nodes=[new F]}toString(){return this._root.render(this.opts)}name(y){return this._scope.name(y)}scopeName(y){return this._extScope.name(y)}scopeValue(y,r){let $0=this._extScope.value(y,r);return(this._values[$0.prefix]||(this._values[$0.prefix]=new Set)).add($0),$0}getScopeValue(y,r){return this._extScope.getValue(y,r)}scopeRefs(y){return this._extScope.scopeRefs(y,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(y,r,$0,N0){let T0=this._scope.toName(r);if($0!==void 0&&N0)this._constants[T0.str]=$0;return this._leafNode(new I(y,T0,$0)),T0}const(y,r,$0){return this._def(z.varKinds.const,y,r,$0)}let(y,r,$0){return this._def(z.varKinds.let,y,r,$0)}var(y,r,$0){return this._def(z.varKinds.var,y,r,$0)}assign(y,r,$0){return this._leafNode(new K(y,r,$0))}add(y,r){return this._leafNode(new G(y,$.operators.ADD,r))}code(y){if(typeof y=="function")y();else if(y!==Y.nil)this._leafNode(new Z(y));return this}object(...y){let r=["{"];for(let[$0,N0]of y){if(r.length>1)r.push(",");if(r.push($0),$0!==N0||this.opts.es5)r.push(":"),(0,Y.addCodeArg)(r,N0)}return r.push("}"),new Y._Code(r)}if(y,r,$0){if(this._blockNode(new O(y)),r&&$0)this.code(r).else().code($0).endIf();else if(r)this.code(r).endIf();else if($0)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new O(y))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(O,w)}_for(y,r){if(this._blockNode(y),r)this.code(r).endFor();return this}for(y,r){return this._for(new M(y),r)}forRange(y,r,$0,N0,T0=this.opts.es5?z.varKinds.var:z.varKinds.let){let _0=this._scope.toName(y);return this._for(new D(T0,_0,r,$0),()=>N0(_0))}forOf(y,r,$0,N0=z.varKinds.const){let T0=this._scope.toName(y);if(this.opts.es5){let _0=r instanceof Y.Name?r:this.var("_arr",r);return this.forRange("_i",0,Y._`${_0}.length`,(G0)=>{this.var(T0,Y._`${_0}[${G0}]`),$0(T0)})}return this._for(new P("of",N0,T0,r),()=>$0(T0))}forIn(y,r,$0,N0=this.opts.es5?z.varKinds.var:z.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,Y._`Object.keys(${r})`,$0);let T0=this._scope.toName(y);return this._for(new P("in",N0,T0,r),()=>$0(T0))}endFor(){return this._endBlockNode(N)}label(y){return this._leafNode(new H(y))}break(y){return this._leafNode(new W(y))}return(y){let r=new A;if(this._blockNode(r),this.code(y),r.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(y,r,$0){if(!r&&!$0)throw Error('CodeGen: "try" without "catch" and "finally"');let N0=new T;if(this._blockNode(N0),this.code(y),r){let T0=this.name("e");this._currNode=N0.catch=new C(T0),r(T0)}if($0)this._currNode=N0.finally=new b,this.code($0);return this._endBlockNode(C,b)}throw(y){return this._leafNode(new X(y))}block(y,r){if(this._blockStarts.push(this._nodes.length),y)this.code(y).endBlock(r);return this}endBlock(y){let r=this._blockStarts.pop();if(r===void 0)throw Error("CodeGen: not in self-balancing block");let $0=this._nodes.length-r;if($0<0||y!==void 0&&$0!==y)throw Error(`CodeGen: wrong number of nodes: ${$0} vs ${y} expected`);return this._nodes.length=r,this}func(y,r=Y.nil,$0,N0){if(this._blockNode(new j(y,r,$0)),N0)this.code(N0).endFunc();return this}endFunc(){return this._endBlockNode(j)}optimize(y=1){while(y-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(y){return this._currNode.nodes.push(y),this}_blockNode(y){this._currNode.nodes.push(y),this._nodes.push(y)}_endBlockNode(y,r){let $0=this._currNode;if($0 instanceof y||r&&$0 instanceof r)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${r?`${y.kind}/${r.kind}`:y.kind}"`)}_elseNode(y){let r=this._currNode;if(!(r instanceof O))throw Error('CodeGen: "else" without "if"');return this._currNode=r.else=y,this}get _root(){return this._nodes[0]}get _currNode(){let y=this._nodes;return y[y.length-1]}set _currNode(y){let r=this._nodes;r[r.length-1]=y}};$.CodeGen=k;function S(y,r){for(let $0 in r)y[$0]=(y[$0]||0)+(r[$0]||0);return y}function i(y,r){return r instanceof Y._CodeOrName?S(y,r.names):y}function n(y,r,$0){if(y instanceof Y.Name)return N0(y);if(!T0(y))return y;return new Y._Code(y._items.reduce((_0,G0)=>{if(G0 instanceof Y.Name)G0=N0(G0);if(G0 instanceof Y._Code)_0.push(...G0._items);else _0.push(G0);return _0},[]));function N0(_0){let G0=$0[_0.str];if(G0===void 0||r[_0.str]!==1)return _0;return delete r[_0.str],G0}function T0(_0){return _0 instanceof Y._Code&&_0._items.some((G0)=>G0 instanceof Y.Name&&r[G0.str]===1&&$0[G0.str]!==void 0)}}function U0(y,r){for(let $0 in r)y[$0]=(y[$0]||0)-(r[$0]||0)}function x(y){return typeof y=="boolean"||typeof y=="number"||y===null?!y:Y._`!${Y0(y)}`}$.not=x;let d=p($.operators.AND);function t(...y){return y.reduce(d)}$.and=t;let e=p($.operators.OR);function g(...y){return y.reduce(e)}$.or=g;function p(y){return(r,$0)=>r===Y.nil?$0:$0===Y.nil?r:Y._`${Y0(r)} ${y} ${Y0($0)}`}function Y0(y){return y instanceof Y.Name?y:Y._`(${y})`}}),v1=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.checkStrictMode=$.getErrorPath=$.Type=$.useFunc=$.setEvaluated=$.evaluatedPropsToName=$.mergeEvaluated=$.eachItem=$.unescapeJsonPointer=$.escapeJsonPointer=$.escapeFragment=$.unescapeFragment=$.schemaRefOrVal=$.schemaHasRulesButRef=$.schemaHasRules=$.checkUnknownRules=$.alwaysValidSchema=$.toHash=void 0;let Y=F1(),z=fO();function U(j){let A={};for(let T of j)A[T]=!0;return A}$.toHash=U;function Q(j,A){if(typeof A=="boolean")return A;if(Object.keys(A).length===0)return!0;return J(j,A),!I(A,j.self.RULES.all)}$.alwaysValidSchema=Q;function J(j,A=j.schema){let{opts:T,self:C}=j;if(!T.strictSchema)return;if(typeof A==="boolean")return;let b=C.RULES.keywords;for(let k in A)if(!b[k])P(j,`unknown keyword: "${k}"`)}$.checkUnknownRules=J;function I(j,A){if(typeof j=="boolean")return!j;for(let T in j)if(A[T])return!0;return!1}$.schemaHasRules=I;function K(j,A){if(typeof j=="boolean")return!j;for(let T in j)if(T!=="$ref"&&A.all[T])return!0;return!1}$.schemaHasRulesButRef=K;function G({topSchemaRef:j,schemaPath:A},T,C,b){if(!b){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return Y._`${T}`}return Y._`${j}${A}${(0,Y.getProperty)(C)}`}$.schemaRefOrVal=G;function H(j){return Z(decodeURIComponent(j))}$.unescapeFragment=H;function W(j){return encodeURIComponent(X(j))}$.escapeFragment=W;function X(j){if(typeof j=="number")return`${j}`;return j.replace(/~/g,"~0").replace(/\//g,"~1")}$.escapeJsonPointer=X;function Z(j){return j.replace(/~1/g,"/").replace(/~0/g,"~")}$.unescapeJsonPointer=Z;function q(j,A){if(Array.isArray(j))for(let T of j)A(T);else A(j)}$.eachItem=q;function V({mergeNames:j,mergeToName:A,mergeValues:T,resultToName:C}){return(b,k,S,i)=>{let n=S===void 0?k:S instanceof Y.Name?(k instanceof Y.Name?j(b,k,S):A(b,k,S),S):k instanceof Y.Name?(A(b,S,k),k):T(k,S);return i===Y.Name&&!(n instanceof Y.Name)?C(b,n):n}}$.mergeEvaluated={props:V({mergeNames:(j,A,T)=>j.if(Y._`${T} !== true && ${A} !== undefined`,()=>{j.if(Y._`${A} === true`,()=>j.assign(T,!0),()=>j.assign(T,Y._`${T} || {}`).code(Y._`Object.assign(${T}, ${A})`))}),mergeToName:(j,A,T)=>j.if(Y._`${T} !== true`,()=>{if(A===!0)j.assign(T,!0);else j.assign(T,Y._`${T} || {}`),w(j,T,A)}),mergeValues:(j,A)=>j===!0?!0:{...j,...A},resultToName:F}),items:V({mergeNames:(j,A,T)=>j.if(Y._`${T} !== true && ${A} !== undefined`,()=>j.assign(T,Y._`${A} === true ? true : ${T} > ${A} ? ${T} : ${A}`)),mergeToName:(j,A,T)=>j.if(Y._`${T} !== true`,()=>j.assign(T,A===!0?!0:Y._`${T} > ${A} ? ${T} : ${A}`)),mergeValues:(j,A)=>j===!0?!0:Math.max(j,A),resultToName:(j,A)=>j.var("items",A)})};function F(j,A){if(A===!0)return j.var("props",!0);let T=j.var("props",Y._`{}`);if(A!==void 0)w(j,T,A);return T}$.evaluatedPropsToName=F;function w(j,A,T){Object.keys(T).forEach((C)=>j.assign(Y._`${A}${(0,Y.getProperty)(C)}`,!0))}$.setEvaluated=w;let O={};function N(j,A){return j.scopeValue("func",{ref:A,code:O[A.code]||(O[A.code]=new z._Code(A.code))})}$.useFunc=N;var M;(function(j){j[j.Num=0]="Num",j[j.Str=1]="Str"})(M||($.Type=M={}));function D(j,A,T){if(j instanceof Y.Name){let C=A===M.Num;return T?C?Y._`"[" + ${j} + "]"`:Y._`"['" + ${j} + "']"`:C?Y._`"/" + ${j}`:Y._`"/" + ${j}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,Y.getProperty)(j).toString():"/"+X(j)}$.getErrorPath=D;function P(j,A,T=j.opts.strictSchema){if(!T)return;if(A=`strict mode: ${A}`,T===!0)throw Error(A);j.self.logger.warn(A)}$.checkStrictMode=P}),Q5=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={data:new Y.Name("data"),valCxt:new Y.Name("valCxt"),instancePath:new Y.Name("instancePath"),parentData:new Y.Name("parentData"),parentDataProperty:new Y.Name("parentDataProperty"),rootData:new Y.Name("rootData"),dynamicAnchors:new Y.Name("dynamicAnchors"),vErrors:new Y.Name("vErrors"),errors:new Y.Name("errors"),this:new Y.Name("this"),self:new Y.Name("self"),scope:new Y.Name("scope"),json:new Y.Name("json"),jsonPos:new Y.Name("jsonPos"),jsonLen:new Y.Name("jsonLen"),jsonPart:new Y.Name("jsonPart")};$.default=z}),bO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.extendErrors=$.resetErrorsCount=$.reportExtraError=$.reportError=$.keyword$DataError=$.keywordError=void 0;let Y=F1(),z=v1(),U=Q5();$.keywordError={message:({keyword:w})=>Y.str`must pass "${w}" keyword validation`},$.keyword$DataError={message:({keyword:w,schemaType:O})=>O?Y.str`"${w}" keyword must be ${O} ($data)`:Y.str`"${w}" keyword is invalid ($data)`};function Q(w,O=$.keywordError,N,M){let{it:D}=w,{gen:P,compositeRule:j,allErrors:A}=D,T=X(w,O,N);if(M!==null&&M!==void 0?M:j||A)G(P,T);else H(D,Y._`[${T}]`)}$.reportError=Q;function J(w,O=$.keywordError,N){let{it:M}=w,{gen:D,compositeRule:P,allErrors:j}=M;if(G(D,X(w,O,N)),!(P||j))H(M,U.default.vErrors)}$.reportExtraError=J;function I(w,O){w.assign(U.default.errors,O),w.if(Y._`${U.default.vErrors} !== null`,()=>w.if(O,()=>w.assign(Y._`${U.default.vErrors}.length`,O),()=>w.assign(U.default.vErrors,null)))}$.resetErrorsCount=I;function K({gen:w,keyword:O,schemaValue:N,data:M,errsCount:D,it:P}){if(D===void 0)throw Error("ajv implementation error");let j=w.name("err");w.forRange("i",D,U.default.errors,(A)=>{if(w.const(j,Y._`${U.default.vErrors}[${A}]`),w.if(Y._`${j}.instancePath === undefined`,()=>w.assign(Y._`${j}.instancePath`,(0,Y.strConcat)(U.default.instancePath,P.errorPath))),w.assign(Y._`${j}.schemaPath`,Y.str`${P.errSchemaPath}/${O}`),P.opts.verbose)w.assign(Y._`${j}.schema`,N),w.assign(Y._`${j}.data`,M)})}$.extendErrors=K;function G(w,O){let N=w.const("err",O);w.if(Y._`${U.default.vErrors} === null`,()=>w.assign(U.default.vErrors,Y._`[${N}]`),Y._`${U.default.vErrors}.push(${N})`),w.code(Y._`${U.default.errors}++`)}function H(w,O){let{gen:N,validateName:M,schemaEnv:D}=w;if(D.$async)N.throw(Y._`new ${w.ValidationError}(${O})`);else N.assign(Y._`${M}.errors`,O),N.return(!1)}let W={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function X(w,O,N){let{createErrors:M}=w.it;if(M===!1)return Y._`{}`;return Z(w,O,N)}function Z(w,O,N={}){let{gen:M,it:D}=w,P=[q(D,N),V(w,N)];return F(w,O,P),M.object(...P)}function q({errorPath:w},{instancePath:O}){let N=O?Y.str`${w}${(0,z.getErrorPath)(O,z.Type.Str)}`:w;return[U.default.instancePath,(0,Y.strConcat)(U.default.instancePath,N)]}function V({keyword:w,it:{errSchemaPath:O}},{schemaPath:N,parentSchema:M}){let D=M?O:Y.str`${O}/${w}`;if(N)D=Y.str`${D}${(0,z.getErrorPath)(N,z.Type.Str)}`;return[W.schemaPath,D]}function F(w,{params:O,message:N},M){let{keyword:D,data:P,schemaValue:j,it:A}=w,{opts:T,propertyName:C,topSchemaRef:b,schemaPath:k}=A;if(M.push([W.keyword,D],[W.params,typeof O=="function"?O(w):O||Y._`{}`]),T.messages)M.push([W.message,typeof N=="function"?N(w):N]);if(T.verbose)M.push([W.schema,j],[W.parentSchema,Y._`${b}${k}`],[U.default.data,P]);if(C)M.push([W.propertyName,C])}}),Fb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.boolOrEmptySchema=$.topBoolOrEmptySchema=void 0;let Y=bO(),z=F1(),U=Q5(),Q={message:"boolean schema is false"};function J(G){let{gen:H,schema:W,validateName:X}=G;if(W===!1)K(G,!1);else if(typeof W=="object"&&W.$async===!0)H.return(U.default.data);else H.assign(z._`${X}.errors`,null),H.return(!0)}$.topBoolOrEmptySchema=J;function I(G,H){let{gen:W,schema:X}=G;if(X===!1)W.var(H,!1),K(G);else W.var(H,!0)}$.boolOrEmptySchema=I;function K(G,H){let{gen:W,data:X}=G,Z={gen:W,keyword:"false schema",data:X,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:G};(0,Y.reportError)(Z,Q,void 0,H)}}),qe=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.getRules=$.isJSONType=void 0;let Y=new Set(["string","number","integer","boolean","null","object","array"]);function z(Q){return typeof Q=="string"&&Y.has(Q)}$.isJSONType=z;function U(){let Q={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...Q,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},Q.number,Q.string,Q.array,Q.object],post:{rules:[]},all:{},keywords:{}}}$.getRules=U}),Ve=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.shouldUseRule=$.shouldUseGroup=$.schemaHasRulesForType=void 0;function Y({schema:Q,self:J},I){let K=J.RULES.types[I];return K&&K!==!0&&z(Q,K)}$.schemaHasRulesForType=Y;function z(Q,J){return J.rules.some((I)=>U(Q,I))}$.shouldUseGroup=z;function U(Q,J){var I;return Q[J.keyword]!==void 0||((I=J.definition.implements)===null||I===void 0?void 0:I.some((K)=>Q[K]!==void 0))}$.shouldUseRule=U}),uO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.reportTypeError=$.checkDataTypes=$.checkDataType=$.coerceAndCheckDataType=$.getJSONTypes=$.getSchemaTypes=$.DataType=void 0;let Y=qe(),z=Ve(),U=bO(),Q=F1(),J=v1();var I;(function(M){M[M.Correct=0]="Correct",M[M.Wrong=1]="Wrong"})(I||($.DataType=I={}));function K(M){let D=G(M.type);if(D.includes("null")){if(M.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!D.length&&M.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(M.nullable===!0)D.push("null")}return D}$.getSchemaTypes=K;function G(M){let D=Array.isArray(M)?M:M?[M]:[];if(D.every(Y.isJSONType))return D;throw Error("type must be JSONType or JSONType[]: "+D.join(","))}$.getJSONTypes=G;function H(M,D){let{gen:P,data:j,opts:A}=M,T=X(D,A.coerceTypes),C=D.length>0&&!(T.length===0&&D.length===1&&(0,z.schemaHasRulesForType)(M,D[0]));if(C){let b=F(D,j,A.strictNumbers,I.Wrong);P.if(b,()=>{if(T.length)Z(M,D,T);else O(M)})}return C}$.coerceAndCheckDataType=H;let W=new Set(["string","number","integer","boolean","null"]);function X(M,D){return D?M.filter((P)=>W.has(P)||D==="array"&&P==="array"):[]}function Z(M,D,P){let{gen:j,data:A,opts:T}=M,C=j.let("dataType",Q._`typeof ${A}`),b=j.let("coerced",Q._`undefined`);if(T.coerceTypes==="array")j.if(Q._`${C} == 'object' && Array.isArray(${A}) && ${A}.length == 1`,()=>j.assign(A,Q._`${A}[0]`).assign(C,Q._`typeof ${A}`).if(F(D,A,T.strictNumbers),()=>j.assign(b,A)));j.if(Q._`${b} !== undefined`);for(let S of P)if(W.has(S)||S==="array"&&T.coerceTypes==="array")k(S);j.else(),O(M),j.endIf(),j.if(Q._`${b} !== undefined`,()=>{j.assign(A,b),q(M,b)});function k(S){switch(S){case"string":j.elseIf(Q._`${C} == "number" || ${C} == "boolean"`).assign(b,Q._`"" + ${A}`).elseIf(Q._`${A} === null`).assign(b,Q._`""`);return;case"number":j.elseIf(Q._`${C} == "boolean" || ${A} === null || (${C} == "string" && ${A} && ${A} == +${A})`).assign(b,Q._`+${A}`);return;case"integer":j.elseIf(Q._`${C} === "boolean" || ${A} === null || (${C} === "string" && ${A} && ${A} == +${A} && !(${A} % 1))`).assign(b,Q._`+${A}`);return;case"boolean":j.elseIf(Q._`${A} === "false" || ${A} === 0 || ${A} === null`).assign(b,!1).elseIf(Q._`${A} === "true" || ${A} === 1`).assign(b,!0);return;case"null":j.elseIf(Q._`${A} === "" || ${A} === 0 || ${A} === false`),j.assign(b,null);return;case"array":j.elseIf(Q._`${C} === "string" || ${C} === "number" - || ${C} === "boolean" || ${A} === null`).assign(b,Q._`[${A}]`)}}}function q({gen:M,parentData:D,parentDataProperty:P},j){M.if(Q._`${D} !== undefined`,()=>M.assign(Q._`${D}[${P}]`,j))}function V(M,D,P,j=I.Correct){let A=j===I.Correct?Q.operators.EQ:Q.operators.NEQ,T;switch(M){case"null":return Q._`${D} ${A} null`;case"array":T=Q._`Array.isArray(${D})`;break;case"object":T=Q._`${D} && typeof ${D} == "object" && !Array.isArray(${D})`;break;case"integer":T=C(Q._`!(${D} % 1) && !isNaN(${D})`);break;case"number":T=C();break;default:return Q._`typeof ${D} ${A} ${M}`}return j===I.Correct?T:(0,Q.not)(T);function C(b=Q.nil){return(0,Q.and)(Q._`typeof ${D} == "number"`,b,P?Q._`isFinite(${D})`:Q.nil)}}$.checkDataType=V;function F(M,D,P,j){if(M.length===1)return V(M[0],D,P,j);let A,T=(0,J.toHash)(M);if(T.array&&T.object){let C=Q._`typeof ${D} != "object"`;A=T.null?C:Q._`!${D} || ${C}`,delete T.null,delete T.array,delete T.object}else A=Q.nil;if(T.number)delete T.integer;for(let C in T)A=(0,Q.and)(A,V(C,D,P,j));return A}$.checkDataTypes=F;let w={message:({schema:M})=>`must be ${M}`,params:({schema:M,schemaValue:D})=>typeof M=="string"?Q._`{type: ${M}}`:Q._`{type: ${D}}`};function O(M){let D=N(M);(0,U.reportError)(D,w)}$.reportTypeError=O;function N(M){let{gen:D,data:P,schema:j}=M,A=(0,J.schemaRefOrVal)(M,j,"type");return{gen:D,keyword:"type",data:P,schema:j.type,schemaCode:A,schemaValue:A,parentSchema:j,params:{},it:M}}}),Ob0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.assignDefaults=void 0;let Y=F1(),z=v1();function U(J,I){let{properties:K,items:G}=J.schema;if(I==="object"&&K)for(let H in K)Q(J,H,K[H].default);else if(I==="array"&&Array.isArray(G))G.forEach((H,W)=>Q(J,W,H.default))}$.assignDefaults=U;function Q(J,I,K){let{gen:G,compositeRule:H,data:W,opts:X}=J;if(K===void 0)return;let Z=Y._`${W}${(0,Y.getProperty)(I)}`;if(H){(0,z.checkStrictMode)(J,`default is ignored for: ${Z}`);return}let q=Y._`${Z} === undefined`;if(X.useDefaults==="empty")q=Y._`${q} || ${Z} === null || ${Z} === ""`;G.if(q,Y._`${Z} = ${(0,Y.stringify)(K)}`)}}),J5=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateUnion=$.validateArray=$.usePattern=$.callValidateCode=$.schemaProperties=$.allSchemaProperties=$.noPropertyInData=$.propertyInData=$.isOwnProperty=$.hasPropFunc=$.reportMissingProp=$.checkMissingProp=$.checkReportMissingProp=void 0;let Y=F1(),z=v1(),U=Q5(),Q=v1();function J(M,D){let{gen:P,data:j,it:A}=M;P.if(X(P,j,D,A.opts.ownProperties),()=>{M.setParams({missingProperty:Y._`${D}`},!0),M.error()})}$.checkReportMissingProp=J;function I({gen:M,data:D,it:{opts:P}},j,A){return(0,Y.or)(...j.map((T)=>(0,Y.and)(X(M,D,T,P.ownProperties),Y._`${A} = ${T}`)))}$.checkMissingProp=I;function K(M,D){M.setParams({missingProperty:D},!0),M.error()}$.reportMissingProp=K;function G(M){return M.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Y._`Object.prototype.hasOwnProperty`})}$.hasPropFunc=G;function H(M,D,P){return Y._`${G(M)}.call(${D}, ${P})`}$.isOwnProperty=H;function W(M,D,P,j){let A=Y._`${D}${(0,Y.getProperty)(P)} !== undefined`;return j?Y._`${A} && ${H(M,D,P)}`:A}$.propertyInData=W;function X(M,D,P,j){let A=Y._`${D}${(0,Y.getProperty)(P)} === undefined`;return j?(0,Y.or)(A,(0,Y.not)(H(M,D,P))):A}$.noPropertyInData=X;function Z(M){return M?Object.keys(M).filter((D)=>D!=="__proto__"):[]}$.allSchemaProperties=Z;function q(M,D){return Z(D).filter((P)=>!(0,z.alwaysValidSchema)(M,D[P]))}$.schemaProperties=q;function V({schemaCode:M,data:D,it:{gen:P,topSchemaRef:j,schemaPath:A,errorPath:T},it:C},b,k,S){let i=S?Y._`${M}, ${D}, ${j}${A}`:D,n=[[U.default.instancePath,(0,Y.strConcat)(U.default.instancePath,T)],[U.default.parentData,C.parentData],[U.default.parentDataProperty,C.parentDataProperty],[U.default.rootData,U.default.rootData]];if(C.opts.dynamicRef)n.push([U.default.dynamicAnchors,U.default.dynamicAnchors]);let U0=Y._`${i}, ${P.object(...n)}`;return k!==Y.nil?Y._`${b}.call(${k}, ${U0})`:Y._`${b}(${U0})`}$.callValidateCode=V;let F=Y._`new RegExp`;function w({gen:M,it:{opts:D}},P){let j=D.unicodeRegExp?"u":"",{regExp:A}=D.code,T=A(P,j);return M.scopeValue("pattern",{key:T.toString(),ref:T,code:Y._`${A.code==="new RegExp"?F:(0,Q.useFunc)(M,A)}(${P}, ${j})`})}$.usePattern=w;function O(M){let{gen:D,data:P,keyword:j,it:A}=M,T=D.name("valid");if(A.allErrors){let b=D.let("valid",!0);return C(()=>D.assign(b,!1)),b}return D.var(T,!0),C(()=>D.break()),T;function C(b){let k=D.const("len",Y._`${P}.length`);D.forRange("i",0,k,(S)=>{M.subschema({keyword:j,dataProp:S,dataPropType:z.Type.Num},T),D.if((0,Y.not)(T),b)})}}$.validateArray=O;function N(M){let{gen:D,schema:P,keyword:j,it:A}=M;if(!Array.isArray(P))throw Error("ajv implementation error");if(P.some((b)=>(0,z.alwaysValidSchema)(A,b))&&!A.opts.unevaluated)return;let T=D.let("valid",!1),C=D.name("_valid");D.block(()=>P.forEach((b,k)=>{let S=M.subschema({keyword:j,schemaProp:k,compositeRule:!0},C);if(D.assign(T,Y._`${T} || ${C}`),!M.mergeValidEvaluated(S,C))D.if((0,Y.not)(T))})),M.result(T,()=>M.reset(),()=>M.error(!0))}$.validateUnion=N}),wb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateKeywordUsage=$.validSchemaType=$.funcKeywordCode=$.macroKeywordCode=void 0;let Y=F1(),z=Q5(),U=J5(),Q=bO();function J(q,V){let{gen:F,keyword:w,schema:O,parentSchema:N,it:M}=q,D=V.macro.call(M.self,O,N,M),P=W(F,w,D);if(M.opts.validateSchema!==!1)M.self.validateSchema(D,!0);let j=F.name("valid");q.subschema({schema:D,schemaPath:Y.nil,errSchemaPath:`${M.errSchemaPath}/${w}`,topSchemaRef:P,compositeRule:!0},j),q.pass(j,()=>q.error(!0))}$.macroKeywordCode=J;function I(q,V){var F;let{gen:w,keyword:O,schema:N,parentSchema:M,$data:D,it:P}=q;H(P,V);let j=W(w,O,!D&&V.compile?V.compile.call(P.self,N,M,P):V.validate),A=w.let("valid");q.block$data(A,T),q.ok((F=V.valid)!==null&&F!==void 0?F:A);function T(){if(V.errors===!1){if(k(),V.modifying)K(q);S(()=>q.error())}else{let i=V.async?C():b();if(V.modifying)K(q);S(()=>G(q,i))}}function C(){let i=w.let("ruleErrs",null);return w.try(()=>k(Y._`await `),(n)=>w.assign(A,!1).if(Y._`${n} instanceof ${P.ValidationError}`,()=>w.assign(i,Y._`${n}.errors`),()=>w.throw(n))),i}function b(){let i=Y._`${j}.errors`;return w.assign(i,null),k(Y.nil),i}function k(i=V.async?Y._`await `:Y.nil){let n=P.opts.passContext?z.default.this:z.default.self,U0=!(("compile"in V)&&!D||V.schema===!1);w.assign(A,Y._`${i}${(0,U.callValidateCode)(q,j,n,U0)}`,V.modifying)}function S(i){var n;w.if((0,Y.not)((n=V.valid)!==null&&n!==void 0?n:A),i)}}$.funcKeywordCode=I;function K(q){let{gen:V,data:F,it:w}=q;V.if(w.parentData,()=>V.assign(F,Y._`${w.parentData}[${w.parentDataProperty}]`))}function G(q,V){let{gen:F}=q;F.if(Y._`Array.isArray(${V})`,()=>{F.assign(z.default.vErrors,Y._`${z.default.vErrors} === null ? ${V} : ${z.default.vErrors}.concat(${V})`).assign(z.default.errors,Y._`${z.default.vErrors}.length`),(0,Q.extendErrors)(q)},()=>q.error())}function H({schemaEnv:q},V){if(V.async&&!q.$async)throw Error("async keyword in sync schema")}function W(q,V,F){if(F===void 0)throw Error(`keyword "${V}" failed to compile`);return q.scopeValue("keyword",typeof F=="function"?{ref:F}:{ref:F,code:(0,Y.stringify)(F)})}function X(q,V,F=!1){return!V.length||V.some((w)=>w==="array"?Array.isArray(q):w==="object"?q&&typeof q=="object"&&!Array.isArray(q):typeof q==w||F&&typeof q>"u")}$.validSchemaType=X;function Z({schema:q,opts:V,self:F,errSchemaPath:w},O,N){if(Array.isArray(O.keyword)?!O.keyword.includes(N):O.keyword!==N)throw Error("ajv implementation error");let M=O.dependencies;if(M===null||M===void 0?void 0:M.some((D)=>!Object.prototype.hasOwnProperty.call(q,D)))throw Error(`parent schema must have dependencies of ${N}: ${M.join(",")}`);if(O.validateSchema){if(!O.validateSchema(q[N])){let D=`keyword "${N}" value is invalid at path "${w}": `+F.errorsText(O.validateSchema.errors);if(V.validateSchema==="log")F.logger.error(D);else throw Error(D)}}}$.validateKeywordUsage=Z}),Mb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.extendSubschemaMode=$.extendSubschemaData=$.getSubschema=void 0;let Y=F1(),z=v1();function U(I,{keyword:K,schemaProp:G,schema:H,schemaPath:W,errSchemaPath:X,topSchemaRef:Z}){if(K!==void 0&&H!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(K!==void 0){let q=I.schema[K];return G===void 0?{schema:q,schemaPath:Y._`${I.schemaPath}${(0,Y.getProperty)(K)}`,errSchemaPath:`${I.errSchemaPath}/${K}`}:{schema:q[G],schemaPath:Y._`${I.schemaPath}${(0,Y.getProperty)(K)}${(0,Y.getProperty)(G)}`,errSchemaPath:`${I.errSchemaPath}/${K}/${(0,z.escapeFragment)(G)}`}}if(H!==void 0){if(W===void 0||X===void 0||Z===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:H,schemaPath:W,topSchemaRef:Z,errSchemaPath:X}}throw Error('either "keyword" or "schema" must be passed')}$.getSubschema=U;function Q(I,K,{dataProp:G,dataPropType:H,data:W,dataTypes:X,propertyName:Z}){if(W!==void 0&&G!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:q}=K;if(G!==void 0){let{errorPath:F,dataPathArr:w,opts:O}=K;V(q.let("data",Y._`${K.data}${(0,Y.getProperty)(G)}`,!0)),I.errorPath=Y.str`${F}${(0,z.getErrorPath)(G,H,O.jsPropertySyntax)}`,I.parentDataProperty=Y._`${G}`,I.dataPathArr=[...w,I.parentDataProperty]}if(W!==void 0){if(V(W instanceof Y.Name?W:q.let("data",W,!0)),Z!==void 0)I.propertyName=Z}if(X)I.dataTypes=X;function V(F){I.data=F,I.dataLevel=K.dataLevel+1,I.dataTypes=[],K.definedProperties=new Set,I.parentData=K.data,I.dataNames=[...K.dataNames,F]}}$.extendSubschemaData=Q;function J(I,{jtdDiscriminator:K,jtdMetadata:G,compositeRule:H,createErrors:W,allErrors:X}){if(H!==void 0)I.compositeRule=H;if(W!==void 0)I.createErrors=W;if(X!==void 0)I.allErrors=X;I.jtdDiscriminator=K,I.jtdMetadata=G}$.extendSubschemaMode=J}),Le=C0(($,Y)=>{Y.exports=function z(U,Q){if(U===Q)return!0;if(U&&Q&&typeof U=="object"&&typeof Q=="object"){if(U.constructor!==Q.constructor)return!1;var J,I,K;if(Array.isArray(U)){if(J=U.length,J!=Q.length)return!1;for(I=J;I--!==0;)if(!z(U[I],Q[I]))return!1;return!0}if(U.constructor===RegExp)return U.source===Q.source&&U.flags===Q.flags;if(U.valueOf!==Object.prototype.valueOf)return U.valueOf()===Q.valueOf();if(U.toString!==Object.prototype.toString)return U.toString()===Q.toString();if(K=Object.keys(U),J=K.length,J!==Object.keys(Q).length)return!1;for(I=J;I--!==0;)if(!Object.prototype.hasOwnProperty.call(Q,K[I]))return!1;for(I=J;I--!==0;){var G=K[I];if(!z(U[G],Q[G]))return!1}return!0}return U!==U&&Q!==Q}}),Nb0=C0(($,Y)=>{var z=Y.exports=function(J,I,K){if(typeof I=="function")K=I,I={};K=I.cb||K;var G=typeof K=="function"?K:K.pre||function(){},H=K.post||function(){};U(I,G,H,J,"",J)};z.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},z.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},z.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},z.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 U(J,I,K,G,H,W,X,Z,q,V){if(G&&typeof G=="object"&&!Array.isArray(G)){I(G,H,W,X,Z,q,V);for(var F in G){var w=G[F];if(Array.isArray(w)){if(F in z.arrayKeywords)for(var O=0;O{Object.defineProperty($,"__esModule",{value:!0}),$.getSchemaRefs=$.resolveUrl=$.normalizeId=$._getFullPath=$.getFullPath=$.inlineRef=void 0;let Y=v1(),z=Le(),U=Nb0(),Q=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function J(w,O=!0){if(typeof w=="boolean")return!0;if(O===!0)return!K(w);if(!O)return!1;return G(w)<=O}$.inlineRef=J;let I=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function K(w){for(let O in w){if(I.has(O))return!0;let N=w[O];if(Array.isArray(N)&&N.some(K))return!0;if(typeof N=="object"&&K(N))return!0}return!1}function G(w){let O=0;for(let N in w){if(N==="$ref")return 1/0;if(O++,Q.has(N))continue;if(typeof w[N]=="object")(0,Y.eachItem)(w[N],(M)=>O+=G(M));if(O===1/0)return 1/0}return O}function H(w,O="",N){if(N!==!1)O=Z(O);return W(w,w.parse(O))}$.getFullPath=H;function W(w,O){return w.serialize(O).split("#")[0]+"#"}$._getFullPath=W;let X=/#\/?$/;function Z(w){return w?w.replace(X,""):""}$.normalizeId=Z;function q(w,O,N){return N=Z(N),w.resolve(O,N)}$.resolveUrl=q;let V=/^[a-z_][-a-z0-9._]*$/i;function F(w,O){if(typeof w=="boolean")return{};let{schemaId:N,uriResolver:M}=this.opts,D=Z(w[N]||O),P={"":D},j=H(M,D,!1),A={},T=new Set;return U(w,{allKeys:!0},(k,S,i,n)=>{if(n===void 0)return;let U0=j+S,x=P[n];if(typeof k[N]=="string")x=d.call(this,k[N]);t.call(this,k.$anchor),t.call(this,k.$dynamicAnchor),P[S]=x;function d(e){let y=this.opts.uriResolver.resolve;if(e=Z(x?y(x,e):e),T.has(e))throw b(e);T.add(e);let p=this.refs[e];if(typeof p=="string")p=this.refs[p];if(typeof p=="object")C(k,p.schema,e);else if(e!==Z(U0))if(e[0]==="#")C(k,A[e],e),A[e]=k;else this.refs[e]=U0;return e}function t(e){if(typeof e=="string"){if(!V.test(e))throw Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}}),A;function C(k,S,i){if(S!==void 0&&!z(k,S))throw b(i)}function b(k){return Error(`reference "${k}" resolves to more than one schema`)}}$.getSchemaRefs=F}),uQ=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.getData=$.KeywordCxt=$.validateFunctionCode=void 0;let Y=Fb0(),z=uO(),U=Ve(),Q=uO(),J=Ob0(),I=wb0(),K=Mb0(),G=F1(),H=Q5(),W=iO(),X=v1(),Z=bO();function q(r){if(j(r)){if(T(r),P(r)){O(r);return}}V(r,()=>(0,Y.topBoolOrEmptySchema)(r))}$.validateFunctionCode=q;function V({gen:r,validateName:H0,schema:F0,schemaEnv:b0,opts:i0},n0){if(i0.code.es5)r.func(H0,G._`${H.default.data}, ${H.default.valCxt}`,b0.$async,()=>{r.code(G._`"use strict"; ${M(F0,i0)}`),w(r,i0),r.code(n0)});else r.func(H0,G._`${H.default.data}, ${F(i0)}`,b0.$async,()=>r.code(M(F0,i0)).code(n0))}function F(r){return G._`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${r.dynamicRef?G._`, ${H.default.dynamicAnchors}={}`:G.nil}}={}`}function w(r,H0){r.if(H.default.valCxt,()=>{if(r.var(H.default.instancePath,G._`${H.default.valCxt}.${H.default.instancePath}`),r.var(H.default.parentData,G._`${H.default.valCxt}.${H.default.parentData}`),r.var(H.default.parentDataProperty,G._`${H.default.valCxt}.${H.default.parentDataProperty}`),r.var(H.default.rootData,G._`${H.default.valCxt}.${H.default.rootData}`),H0.dynamicRef)r.var(H.default.dynamicAnchors,G._`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{if(r.var(H.default.instancePath,G._`""`),r.var(H.default.parentData,G._`undefined`),r.var(H.default.parentDataProperty,G._`undefined`),r.var(H.default.rootData,H.default.data),H0.dynamicRef)r.var(H.default.dynamicAnchors,G._`{}`)})}function O(r){let{schema:H0,opts:F0,gen:b0}=r;V(r,()=>{if(F0.$comment&&H0.$comment)n(r);if(k(r),b0.let(H.default.vErrors,null),b0.let(H.default.errors,0),F0.unevaluated)N(r);C(r),U0(r)})}function N(r){let{gen:H0,validateName:F0}=r;r.evaluated=H0.const("evaluated",G._`${F0}.evaluated`),H0.if(G._`${r.evaluated}.dynamicProps`,()=>H0.assign(G._`${r.evaluated}.props`,G._`undefined`)),H0.if(G._`${r.evaluated}.dynamicItems`,()=>H0.assign(G._`${r.evaluated}.items`,G._`undefined`))}function M(r,H0){let F0=typeof r=="object"&&r[H0.schemaId];return F0&&(H0.code.source||H0.code.process)?G._`/*# sourceURL=${F0} */`:G.nil}function D(r,H0){if(j(r)){if(T(r),P(r)){A(r,H0);return}}(0,Y.boolOrEmptySchema)(r,H0)}function P({schema:r,self:H0}){if(typeof r=="boolean")return!r;for(let F0 in r)if(H0.RULES.all[F0])return!0;return!1}function j(r){return typeof r.schema!="boolean"}function A(r,H0){let{schema:F0,gen:b0,opts:i0}=r;if(i0.$comment&&F0.$comment)n(r);S(r),i(r);let n0=b0.const("_errs",H.default.errors);C(r,n0),b0.var(H0,G._`${n0} === ${H.default.errors}`)}function T(r){(0,X.checkUnknownRules)(r),b(r)}function C(r,H0){if(r.opts.jtd)return d(r,[],!1,H0);let F0=(0,z.getSchemaTypes)(r.schema);d(r,F0,!(0,z.coerceAndCheckDataType)(r,F0),H0)}function b(r){let{schema:H0,errSchemaPath:F0,opts:b0,self:i0}=r;if(H0.$ref&&b0.ignoreKeywordsWithRef&&(0,X.schemaHasRulesButRef)(H0,i0.RULES))i0.logger.warn(`$ref: keywords ignored in schema at path "${F0}"`)}function k(r){let{schema:H0,opts:F0}=r;if(H0.default!==void 0&&F0.useDefaults&&F0.strictSchema)(0,X.checkStrictMode)(r,"default is ignored in the schema root")}function S(r){let H0=r.schema[r.opts.schemaId];if(H0)r.baseId=(0,W.resolveUrl)(r.opts.uriResolver,r.baseId,H0)}function i(r){if(r.schema.$async&&!r.schemaEnv.$async)throw Error("async schema in sync schema")}function n({gen:r,schemaEnv:H0,schema:F0,errSchemaPath:b0,opts:i0}){let n0=F0.$comment;if(i0.$comment===!0)r.code(G._`${H.default.self}.logger.log(${n0})`);else if(typeof i0.$comment=="function"){let w1=G.str`${b0}/$comment`,k1=r.scopeValue("root",{ref:H0.root});r.code(G._`${H.default.self}.opts.$comment(${n0}, ${w1}, ${k1}.schema)`)}}function U0(r){let{gen:H0,schemaEnv:F0,validateName:b0,ValidationError:i0,opts:n0}=r;if(F0.$async)H0.if(G._`${H.default.errors} === 0`,()=>H0.return(H.default.data),()=>H0.throw(G._`new ${i0}(${H.default.vErrors})`));else{if(H0.assign(G._`${b0}.errors`,H.default.vErrors),n0.unevaluated)x(r);H0.return(G._`${H.default.errors} === 0`)}}function x({gen:r,evaluated:H0,props:F0,items:b0}){if(F0 instanceof G.Name)r.assign(G._`${H0}.props`,F0);if(b0 instanceof G.Name)r.assign(G._`${H0}.items`,b0)}function d(r,H0,F0,b0){let{gen:i0,schema:n0,data:w1,allErrors:k1,opts:u1,self:b1}=r,{RULES:A0}=b1;if(n0.$ref&&(u1.ignoreKeywordsWithRef||!(0,X.schemaHasRulesButRef)(n0,A0))){i0.block(()=>v0(r,"$ref",A0.all.$ref.definition));return}if(!u1.jtd)e(r,H0);i0.block(()=>{for(let B of A0.rules)Q0(B);Q0(A0.post)});function Q0(B){if(!(0,U.shouldUseGroup)(n0,B))return;if(B.type){if(i0.if((0,Q.checkDataType)(B.type,w1,u1.strictNumbers)),t(r,B),H0.length===1&&H0[0]===B.type&&F0)i0.else(),(0,Q.reportTypeError)(r);i0.endIf()}else t(r,B);if(!k1)i0.if(G._`${H.default.errors} === ${b0||0}`)}}function t(r,H0){let{gen:F0,schema:b0,opts:{useDefaults:i0}}=r;if(i0)(0,J.assignDefaults)(r,H0.type);F0.block(()=>{for(let n0 of H0.rules)if((0,U.shouldUseRule)(b0,n0))v0(r,n0.keyword,n0.definition,H0.type)})}function e(r,H0){if(r.schemaEnv.meta||!r.opts.strictTypes)return;if(y(r,H0),!r.opts.allowUnionTypes)p(r,H0);Y0(r,r.dataTypes)}function y(r,H0){if(!H0.length)return;if(!r.dataTypes.length){r.dataTypes=H0;return}H0.forEach((F0)=>{if(!a(r.dataTypes,F0))N0(r,`type "${F0}" not allowed by context "${r.dataTypes.join(",")}"`)}),$0(r,H0)}function p(r,H0){if(H0.length>1&&!(H0.length===2&&H0.includes("null")))N0(r,"use allowUnionTypes to allow union type keyword")}function Y0(r,H0){let F0=r.self.RULES.all;for(let b0 in F0){let i0=F0[b0];if(typeof i0=="object"&&(0,U.shouldUseRule)(r.schema,i0)){let{type:n0}=i0.definition;if(n0.length&&!n0.some((w1)=>g(H0,w1)))N0(r,`missing type "${n0.join(",")}" for keyword "${b0}"`)}}}function g(r,H0){return r.includes(H0)||H0==="number"&&r.includes("integer")}function a(r,H0){return r.includes(H0)||H0==="integer"&&r.includes("number")}function $0(r,H0){let F0=[];for(let b0 of r.dataTypes)if(a(H0,b0))F0.push(b0);else if(H0.includes("integer")&&b0==="number")F0.push("integer");r.dataTypes=F0}function N0(r,H0){let F0=r.schemaEnv.baseId+r.errSchemaPath;H0+=` at "${F0}" (strictTypes)`,(0,X.checkStrictMode)(r,H0,r.opts.strictTypes)}var T0=class{constructor(r,H0,F0){if((0,I.validateKeywordUsage)(r,H0,F0),this.gen=r.gen,this.allErrors=r.allErrors,this.keyword=F0,this.data=r.data,this.schema=r.schema[F0],this.$data=H0.$data&&r.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,X.schemaRefOrVal)(r,this.schema,F0,this.$data),this.schemaType=H0.schemaType,this.parentSchema=r.schema,this.params={},this.it=r,this.def=H0,this.$data)this.schemaCode=r.gen.const("vSchema",e0(this.$data,r));else if(this.schemaCode=this.schemaValue,!(0,I.validSchemaType)(this.schema,H0.schemaType,H0.allowUndefined))throw Error(`${F0} value must be ${JSON.stringify(H0.schemaType)}`);if("code"in H0?H0.trackErrors:H0.errors!==!1)this.errsCount=r.gen.const("_errs",H.default.errors)}result(r,H0,F0){this.failResult((0,G.not)(r),H0,F0)}failResult(r,H0,F0){if(this.gen.if(r),F0)F0();else this.error();if(H0){if(this.gen.else(),H0(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(r,H0){this.failResult((0,G.not)(r),void 0,H0)}fail(r){if(r===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(r),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(r){if(!this.$data)return this.fail(r);let{schemaCode:H0}=this;this.fail(G._`${H0} !== undefined && (${(0,G.or)(this.invalid$data(),r)})`)}error(r,H0,F0){if(H0){this.setParams(H0),this._error(r,F0),this.setParams({});return}this._error(r,F0)}_error(r,H0){(r?Z.reportExtraError:Z.reportError)(this,this.def.error,H0)}$dataError(){(0,Z.reportError)(this,this.def.$dataError||Z.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,Z.resetErrorsCount)(this.gen,this.errsCount)}ok(r){if(!this.allErrors)this.gen.if(r)}setParams(r,H0){if(H0)Object.assign(this.params,r);else this.params=r}block$data(r,H0,F0=G.nil){this.gen.block(()=>{this.check$data(r,F0),H0()})}check$data(r=G.nil,H0=G.nil){if(!this.$data)return;let{gen:F0,schemaCode:b0,schemaType:i0,def:n0}=this;if(F0.if((0,G.or)(G._`${b0} === undefined`,H0)),r!==G.nil)F0.assign(r,!0);if(i0.length||n0.validateSchema){if(F0.elseIf(this.invalid$data()),this.$dataError(),r!==G.nil)F0.assign(r,!1)}F0.else()}invalid$data(){let{gen:r,schemaCode:H0,schemaType:F0,def:b0,it:i0}=this;return(0,G.or)(n0(),w1());function n0(){if(F0.length){if(!(H0 instanceof G.Name))throw Error("ajv implementation error");let k1=Array.isArray(F0)?F0:[F0];return G._`${(0,Q.checkDataTypes)(k1,H0,i0.opts.strictNumbers,Q.DataType.Wrong)}`}return G.nil}function w1(){if(b0.validateSchema){let k1=r.scopeValue("validate$data",{ref:b0.validateSchema});return G._`!${k1}(${H0})`}return G.nil}}subschema(r,H0){let F0=(0,K.getSubschema)(this.it,r);(0,K.extendSubschemaData)(F0,this.it,r),(0,K.extendSubschemaMode)(F0,r);let b0={...this.it,...F0,items:void 0,props:void 0};return D(b0,H0),b0}mergeEvaluated(r,H0){let{it:F0,gen:b0}=this;if(!F0.opts.unevaluated)return;if(F0.props!==!0&&r.props!==void 0)F0.props=X.mergeEvaluated.props(b0,r.props,F0.props,H0);if(F0.items!==!0&&r.items!==void 0)F0.items=X.mergeEvaluated.items(b0,r.items,F0.items,H0)}mergeValidEvaluated(r,H0){let{it:F0,gen:b0}=this;if(F0.opts.unevaluated&&(F0.props!==!0||F0.items!==!0))return b0.if(H0,()=>this.mergeEvaluated(r,G.Name)),!0}};$.KeywordCxt=T0;function v0(r,H0,F0,b0){let i0=new T0(r,F0,H0);if("code"in F0)F0.code(i0,b0);else if(i0.$data&&F0.validate)(0,I.funcKeywordCode)(i0,F0);else if("macro"in F0)(0,I.macroKeywordCode)(i0,F0);else if(F0.compile||F0.validate)(0,I.funcKeywordCode)(i0,F0)}let G0=/^\/(?:[^~]|~0|~1)*$/,f0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function e0(r,{dataLevel:H0,dataNames:F0,dataPathArr:b0}){let i0,n0;if(r==="")return H.default.rootData;if(r[0]==="/"){if(!G0.test(r))throw Error(`Invalid JSON-pointer: ${r}`);i0=r,n0=H.default.rootData}else{let b1=f0.exec(r);if(!b1)throw Error(`Invalid JSON-pointer: ${r}`);let A0=+b1[1];if(i0=b1[2],i0==="#"){if(A0>=H0)throw Error(u1("property/index",A0));return b0[H0-A0]}if(A0>H0)throw Error(u1("data",A0));if(n0=F0[H0-A0],!i0)return n0}let w1=n0,k1=i0.split("/");for(let b1 of k1)if(b1)n0=G._`${n0}${(0,G.getProperty)((0,X.unescapeJsonPointer)(b1))}`,w1=G._`${w1} && ${n0}`;return w1;function u1(b1,A0){return`Cannot access ${b1} ${A0} levels up, current level is ${H0}`}}$.getData=e0}),OH=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});var Y=class extends Error{constructor(z){super("validation failed");this.errors=z,this.ajv=this.validation=!0}};$.default=Y}),bQ=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=iO();var z=class extends Error{constructor(U,Q,J,I){super(I||`can't resolve reference ${J} from id ${Q}`);this.missingRef=(0,Y.resolveUrl)(U,Q,J),this.missingSchema=(0,Y.normalizeId)((0,Y.getFullPath)(U,this.missingRef))}};$.default=z}),nO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.resolveSchema=$.getCompilingSchema=$.resolveRef=$.compileSchema=$.SchemaEnv=void 0;let Y=F1(),z=OH(),U=Q5(),Q=iO(),J=v1(),I=uQ();var K=class{constructor(O){var N;this.refs={},this.dynamicAnchors={};let M;if(typeof O.schema=="object")M=O.schema;this.schema=O.schema,this.schemaId=O.schemaId,this.root=O.root||this,this.baseId=(N=O.baseId)!==null&&N!==void 0?N:(0,Q.normalizeId)(M===null||M===void 0?void 0:M[O.schemaId||"$id"]),this.schemaPath=O.schemaPath,this.localRefs=O.localRefs,this.meta=O.meta,this.$async=M===null||M===void 0?void 0:M.$async,this.refs={}}};$.SchemaEnv=K;function G(O){let N=X.call(this,O);if(N)return N;let M=(0,Q.getFullPath)(this.opts.uriResolver,O.root.baseId),{es5:D,lines:P}=this.opts.code,{ownProperties:j}=this.opts,A=new Y.CodeGen(this.scope,{es5:D,lines:P,ownProperties:j}),T;if(O.$async)T=A.scopeValue("Error",{ref:z.default,code:Y._`require("ajv/dist/runtime/validation_error").default`});let C=A.scopeName("validate");O.validateName=C;let b={gen:A,allErrors:this.opts.allErrors,data:U.default.data,parentData:U.default.parentData,parentDataProperty:U.default.parentDataProperty,dataNames:[U.default.data],dataPathArr:[Y.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:A.scopeValue("schema",this.opts.code.source===!0?{ref:O.schema,code:(0,Y.stringify)(O.schema)}:{ref:O.schema}),validateName:C,ValidationError:T,schema:O.schema,schemaEnv:O,rootId:M,baseId:O.baseId||M,schemaPath:Y.nil,errSchemaPath:O.schemaPath||(this.opts.jtd?"":"#"),errorPath:Y._`""`,opts:this.opts,self:this},k;try{this._compilations.add(O),(0,I.validateFunctionCode)(b),A.optimize(this.opts.code.optimize);let S=A.toString();if(k=`${A.scopeRefs(U.default.scope)}return ${S}`,this.opts.code.process)k=this.opts.code.process(k,O);let i=Function(`${U.default.self}`,`${U.default.scope}`,k)(this,this.scope.get());if(this.scope.value(C,{ref:i}),i.errors=null,i.schema=O.schema,i.schemaEnv=O,O.$async)i.$async=!0;if(this.opts.code.source===!0)i.source={validateName:C,validateCode:S,scopeValues:A._values};if(this.opts.unevaluated){let{props:n,items:U0}=b;if(i.evaluated={props:n instanceof Y.Name?void 0:n,items:U0 instanceof Y.Name?void 0:U0,dynamicProps:n instanceof Y.Name,dynamicItems:U0 instanceof Y.Name},i.source)i.source.evaluated=(0,Y.stringify)(i.evaluated)}return O.validate=i,O}catch(S){if(delete O.validate,delete O.validateName,k)this.logger.error("Error compiling schema, function code:",k);throw S}finally{this._compilations.delete(O)}}$.compileSchema=G;function H(O,N,M){var D;M=(0,Q.resolveUrl)(this.opts.uriResolver,N,M);let P=O.refs[M];if(P)return P;let j=q.call(this,O,M);if(j===void 0){let A=(D=O.localRefs)===null||D===void 0?void 0:D[M],{schemaId:T}=this.opts;if(A)j=new K({schema:A,schemaId:T,root:O,baseId:N})}if(j===void 0)return;return O.refs[M]=W.call(this,j)}$.resolveRef=H;function W(O){if((0,Q.inlineRef)(O.schema,this.opts.inlineRefs))return O.schema;return O.validate?O:G.call(this,O)}function X(O){for(let N of this._compilations)if(Z(N,O))return N}$.getCompilingSchema=X;function Z(O,N){return O.schema===N.schema&&O.root===N.root&&O.baseId===N.baseId}function q(O,N){let M;while(typeof(M=this.refs[N])=="string")N=M;return M||this.schemas[N]||V.call(this,O,N)}function V(O,N){let M=this.opts.uriResolver.parse(N),D=(0,Q._getFullPath)(this.opts.uriResolver,M),P=(0,Q.getFullPath)(this.opts.uriResolver,O.baseId,void 0);if(Object.keys(O.schema).length>0&&D===P)return w.call(this,M,O);let j=(0,Q.normalizeId)(D),A=this.refs[j]||this.schemas[j];if(typeof A=="string"){let T=V.call(this,O,A);if(typeof(T===null||T===void 0?void 0:T.schema)!=="object")return;return w.call(this,M,T)}if(typeof(A===null||A===void 0?void 0:A.schema)!=="object")return;if(!A.validate)G.call(this,A);if(j===(0,Q.normalizeId)(N)){let{schema:T}=A,{schemaId:C}=this.opts,b=T[C];if(b)P=(0,Q.resolveUrl)(this.opts.uriResolver,P,b);return new K({schema:T,schemaId:C,root:O,baseId:P})}return w.call(this,M,A)}$.resolveSchema=V;let F=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(O,{baseId:N,schema:M,root:D}){var P;if(((P=O.fragment)===null||P===void 0?void 0:P[0])!=="/")return;for(let T of O.fragment.slice(1).split("/")){if(typeof M==="boolean")return;let C=M[(0,J.unescapeFragment)(T)];if(C===void 0)return;M=C;let b=typeof M==="object"&&M[this.opts.schemaId];if(!F.has(T)&&b)N=(0,Q.resolveUrl)(this.opts.uriResolver,N,b)}let j;if(typeof M!="boolean"&&M.$ref&&!(0,J.schemaHasRulesButRef)(M,this.RULES)){let T=(0,Q.resolveUrl)(this.opts.uriResolver,N,M.$ref);j=V.call(this,D,T)}let{schemaId:A}=this.opts;if(j=j||new K({schema:M,schemaId:A,root:D,baseId:N}),j.schema!==j.root.schema)return j}}),Db0=C0(($,Y)=>{Y.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Fe=C0(($,Y)=>{let z=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),U=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function Q(V){let F="",w=0,O=0;for(O=0;O=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";F+=V[O];break}for(O+=1;O=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";F+=V[O]}return F}let J=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function I(V){return V.length=0,!0}function K(V,F,w){if(V.length){let O=Q(V);if(O!=="")F.push(O);else return w.error=!0,!1;V.length=0}return!0}function G(V){let F=0,w={error:!1,address:"",zone:""},O=[],N=[],M=!1,D=!1,P=K;for(let j=0;j7){w.error=!0;break}if(j>0&&V[j-1]===":")M=!0;O.push(":");continue}else if(A==="%"){if(!P(N,O,w))break;P=I}else{N.push(A);continue}}if(N.length)if(P===I)w.zone=N.join("");else if(D)O.push(N.join(""));else O.push(Q(N));return w.address=O.join(""),w}function H(V){if(W(V,":")<2)return{host:V,isIPV6:!1};let F=G(V);if(!F.error){let{address:w,address:O}=F;if(F.zone)w+="%"+F.zone,O+="%25"+F.zone;return{host:w,isIPV6:!0,escapedHost:O}}else return{host:V,isIPV6:!1}}function W(V,F){let w=0;for(let O=0;O{let{isUUID:z}=Fe(),U=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Q=["http","https","ws","wss","urn","urn:uuid"];function J(A){return Q.indexOf(A)!==-1}function I(A){if(A.secure===!0)return!0;else if(A.secure===!1)return!1;else if(A.scheme)return A.scheme.length===3&&(A.scheme[0]==="w"||A.scheme[0]==="W")&&(A.scheme[1]==="s"||A.scheme[1]==="S")&&(A.scheme[2]==="s"||A.scheme[2]==="S");else return!1}function K(A){if(!A.host)A.error=A.error||"HTTP URIs must have a host.";return A}function G(A){let T=String(A.scheme).toLowerCase()==="https";if(A.port===(T?443:80)||A.port==="")A.port=void 0;if(!A.path)A.path="/";return A}function H(A){return A.secure=I(A),A.resourceName=(A.path||"/")+(A.query?"?"+A.query:""),A.path=void 0,A.query=void 0,A}function W(A){if(A.port===(I(A)?443:80)||A.port==="")A.port=void 0;if(typeof A.secure==="boolean")A.scheme=A.secure?"wss":"ws",A.secure=void 0;if(A.resourceName){let[T,C]=A.resourceName.split("?");A.path=T&&T!=="/"?T:void 0,A.query=C,A.resourceName=void 0}return A.fragment=void 0,A}function X(A,T){if(!A.path)return A.error="URN can not be parsed",A;let C=A.path.match(U);if(C){let b=T.scheme||A.scheme||"urn";A.nid=C[1].toLowerCase(),A.nss=C[2];let k=j(`${b}:${T.nid||A.nid}`);if(A.path=void 0,k)A=k.parse(A,T)}else A.error=A.error||"URN can not be parsed.";return A}function Z(A,T){if(A.nid===void 0)throw Error("URN without nid cannot be serialized");let C=T.scheme||A.scheme||"urn",b=A.nid.toLowerCase(),k=j(`${C}:${T.nid||b}`);if(k)A=k.serialize(A,T);let S=A,i=A.nss;return S.path=`${b||T.nid}:${i}`,T.skipEscape=!0,S}function q(A,T){let C=A;if(C.uuid=C.nss,C.nss=void 0,!T.tolerant&&(!C.uuid||!z(C.uuid)))C.error=C.error||"UUID is not valid.";return C}function V(A){let T=A;return T.nss=(A.uuid||"").toLowerCase(),T}let F={scheme:"http",domainHost:!0,parse:K,serialize:G},w={scheme:"https",domainHost:F.domainHost,parse:K,serialize:G},O={scheme:"ws",domainHost:!0,parse:H,serialize:W},N={scheme:"wss",domainHost:O.domainHost,parse:O.parse,serialize:O.serialize},P={http:F,https:w,ws:O,wss:N,urn:{scheme:"urn",parse:X,serialize:Z,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:q,serialize:V,skipNormalize:!0}};Object.setPrototypeOf(P,null);function j(A){return A&&(P[A]||P[A.toLowerCase()])||void 0}Y.exports={wsIsSecure:I,SCHEMES:P,isValidSchemeName:J,getSchemeHandler:j}}),Bb0=C0(($,Y)=>{let{normalizeIPv6:z,removeDotSegments:U,recomposeAuthority:Q,normalizeComponentEncoding:J,isIPv4:I,nonSimpleDomain:K}=Fe(),{SCHEMES:G,getSchemeHandler:H}=Ab0();function W(N,M){if(typeof N==="string")N=V(w(N,M),M);else if(typeof N==="object")N=w(V(N,M),M);return N}function X(N,M,D){let P=D?Object.assign({scheme:"null"},D):{scheme:"null"},j=Z(w(N,P),w(M,P),P,!0);return P.skipEscape=!0,V(j,P)}function Z(N,M,D,P){let j={};if(!P)N=w(V(N,D),D),M=w(V(M,D),D);if(D=D||{},!D.tolerant&&M.scheme)j.scheme=M.scheme,j.userinfo=M.userinfo,j.host=M.host,j.port=M.port,j.path=U(M.path||""),j.query=M.query;else{if(M.userinfo!==void 0||M.host!==void 0||M.port!==void 0)j.userinfo=M.userinfo,j.host=M.host,j.port=M.port,j.path=U(M.path||""),j.query=M.query;else{if(!M.path)if(j.path=N.path,M.query!==void 0)j.query=M.query;else j.query=N.query;else{if(M.path[0]==="/")j.path=U(M.path);else{if((N.userinfo!==void 0||N.host!==void 0||N.port!==void 0)&&!N.path)j.path="/"+M.path;else if(!N.path)j.path=M.path;else j.path=N.path.slice(0,N.path.lastIndexOf("/")+1)+M.path;j.path=U(j.path)}j.query=M.query}j.userinfo=N.userinfo,j.host=N.host,j.port=N.port}j.scheme=N.scheme}return j.fragment=M.fragment,j}function q(N,M,D){if(typeof N==="string")N=unescape(N),N=V(J(w(N,D),!0),{...D,skipEscape:!0});else if(typeof N==="object")N=V(J(N,!0),{...D,skipEscape:!0});if(typeof M==="string")M=unescape(M),M=V(J(w(M,D),!0),{...D,skipEscape:!0});else if(typeof M==="object")M=V(J(M,!0),{...D,skipEscape:!0});return N.toLowerCase()===M.toLowerCase()}function V(N,M){let D={host:N.host,scheme:N.scheme,userinfo:N.userinfo,port:N.port,path:N.path,query:N.query,nid:N.nid,nss:N.nss,uuid:N.uuid,fragment:N.fragment,reference:N.reference,resourceName:N.resourceName,secure:N.secure,error:""},P=Object.assign({},M),j=[],A=H(P.scheme||D.scheme);if(A&&A.serialize)A.serialize(D,P);if(D.path!==void 0)if(!P.skipEscape){if(D.path=escape(D.path),D.scheme!==void 0)D.path=D.path.split("%3A").join(":")}else D.path=unescape(D.path);if(P.reference!=="suffix"&&D.scheme)j.push(D.scheme,":");let T=Q(D);if(T!==void 0){if(P.reference!=="suffix")j.push("//");if(j.push(T),D.path&&D.path[0]!=="/")j.push("/")}if(D.path!==void 0){let C=D.path;if(!P.absolutePath&&(!A||!A.absolutePath))C=U(C);if(T===void 0&&C[0]==="/"&&C[1]==="/")C="/%2F"+C.slice(2);j.push(C)}if(D.query!==void 0)j.push("?",D.query);if(D.fragment!==void 0)j.push("#",D.fragment);return j.join("")}let F=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(N,M){let D=Object.assign({},M),P={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},j=!1;if(D.reference==="suffix")if(D.scheme)N=D.scheme+":"+N;else N="//"+N;let A=N.match(F);if(A){if(P.scheme=A[1],P.userinfo=A[3],P.host=A[4],P.port=parseInt(A[5],10),P.path=A[6]||"",P.query=A[7],P.fragment=A[8],isNaN(P.port))P.port=A[5];if(P.host)if(I(P.host)===!1){let C=z(P.host);P.host=C.host.toLowerCase(),j=C.isIPV6}else j=!0;if(P.scheme===void 0&&P.userinfo===void 0&&P.host===void 0&&P.port===void 0&&P.query===void 0&&!P.path)P.reference="same-document";else if(P.scheme===void 0)P.reference="relative";else if(P.fragment===void 0)P.reference="absolute";else P.reference="uri";if(D.reference&&D.reference!=="suffix"&&D.reference!==P.reference)P.error=P.error||"URI is not a "+D.reference+" reference.";let T=H(D.scheme||P.scheme);if(!D.unicodeSupport&&(!T||!T.unicodeSupport)){if(P.host&&(D.domainHost||T&&T.domainHost)&&j===!1&&K(P.host))try{P.host=URL.domainToASCII(P.host.toLowerCase())}catch(C){P.error=P.error||"Host's domain name can not be converted to ASCII: "+C}}if(!T||T&&!T.skipNormalize){if(N.indexOf("%")!==-1){if(P.scheme!==void 0)P.scheme=unescape(P.scheme);if(P.host!==void 0)P.host=unescape(P.host)}if(P.path)P.path=escape(unescape(P.path));if(P.fragment)P.fragment=encodeURI(decodeURIComponent(P.fragment))}if(T&&T.parse)T.parse(P,D)}else P.error=P.error||"URI can not be parsed.";return P}let O={SCHEMES:G,normalize:W,resolve:X,resolveComponent:Z,equal:q,serialize:V,parse:w};Y.exports=O,Y.exports.default=O,Y.exports.fastUri=O}),Pb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Bb0();Y.code='require("ajv/dist/runtime/uri").default',$.default=Y}),wS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=void 0;var Y=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return Y.KeywordCxt}});var z=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return z._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return z.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return z.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return z.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return z.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return z.CodeGen}});let U=OH(),Q=bQ(),J=qe(),I=nO(),K=F1(),G=iO(),H=uO(),W=v1(),X=Db0(),Z=Pb0(),q=(y,p)=>new RegExp(y,p);q.code="new RegExp";let V=["removeAdditional","useDefaults","coerceTypes"],F=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},O={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},N=200;function M(y){var p,Y0,g,a,$0,N0,T0,v0,G0,f0,e0,r,H0,F0,b0,i0,n0,w1,k1,u1,b1,A0,Q0,B,v;let u=y.strict,s=(p=y.code)===null||p===void 0?void 0:p.optimize,X0=s===!0||s===void 0?1:s||0,J0=(g=(Y0=y.code)===null||Y0===void 0?void 0:Y0.regExp)!==null&&g!==void 0?g:q,q0=(a=y.uriResolver)!==null&&a!==void 0?a:Z.default;return{strictSchema:(N0=($0=y.strictSchema)!==null&&$0!==void 0?$0:u)!==null&&N0!==void 0?N0:!0,strictNumbers:(v0=(T0=y.strictNumbers)!==null&&T0!==void 0?T0:u)!==null&&v0!==void 0?v0:!0,strictTypes:(f0=(G0=y.strictTypes)!==null&&G0!==void 0?G0:u)!==null&&f0!==void 0?f0:"log",strictTuples:(r=(e0=y.strictTuples)!==null&&e0!==void 0?e0:u)!==null&&r!==void 0?r:"log",strictRequired:(F0=(H0=y.strictRequired)!==null&&H0!==void 0?H0:u)!==null&&F0!==void 0?F0:!1,code:y.code?{...y.code,optimize:X0,regExp:J0}:{optimize:X0,regExp:J0},loopRequired:(b0=y.loopRequired)!==null&&b0!==void 0?b0:N,loopEnum:(i0=y.loopEnum)!==null&&i0!==void 0?i0:N,meta:(n0=y.meta)!==null&&n0!==void 0?n0:!0,messages:(w1=y.messages)!==null&&w1!==void 0?w1:!0,inlineRefs:(k1=y.inlineRefs)!==null&&k1!==void 0?k1:!0,schemaId:(u1=y.schemaId)!==null&&u1!==void 0?u1:"$id",addUsedSchema:(b1=y.addUsedSchema)!==null&&b1!==void 0?b1:!0,validateSchema:(A0=y.validateSchema)!==null&&A0!==void 0?A0:!0,validateFormats:(Q0=y.validateFormats)!==null&&Q0!==void 0?Q0:!0,unicodeRegExp:(B=y.unicodeRegExp)!==null&&B!==void 0?B:!0,int32range:(v=y.int32range)!==null&&v!==void 0?v:!0,uriResolver:q0}}var D=class{constructor(y={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,y=this.opts={...y,...M(y)};let{es5:p,lines:Y0}=this.opts.code;this.scope=new K.ValueScope({scope:{},prefixes:F,es5:p,lines:Y0}),this.logger=S(y.logger);let g=y.validateFormats;if(y.validateFormats=!1,this.RULES=(0,J.getRules)(),P.call(this,w,y,"NOT SUPPORTED"),P.call(this,O,y,"DEPRECATED","warn"),this._metaOpts=b.call(this),y.formats)T.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),y.keywords)C.call(this,y.keywords);if(typeof y.meta=="object")this.addMetaSchema(y.meta);A.call(this),y.validateFormats=g}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:y,meta:p,schemaId:Y0}=this.opts,g=X;if(Y0==="id")g={...X},g.id=g.$id,delete g.$id;if(p&&y)this.addMetaSchema(g,g[Y0],!1)}defaultMeta(){let{meta:y,schemaId:p}=this.opts;return this.opts.defaultMeta=typeof y=="object"?y[p]||y:void 0}validate(y,p){let Y0;if(typeof y=="string"){if(Y0=this.getSchema(y),!Y0)throw Error(`no schema with key or ref "${y}"`)}else Y0=this.compile(y);let g=Y0(p);if(!("$async"in Y0))this.errors=Y0.errors;return g}compile(y,p){let Y0=this._addSchema(y,p);return Y0.validate||this._compileSchemaEnv(Y0)}compileAsync(y,p){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:Y0}=this.opts;return g.call(this,y,p);async function g(G0,f0){await a.call(this,G0.$schema);let e0=this._addSchema(G0,f0);return e0.validate||$0.call(this,e0)}async function a(G0){if(G0&&!this.getSchema(G0))await g.call(this,{$ref:G0},!0)}async function $0(G0){try{return this._compileSchemaEnv(G0)}catch(f0){if(!(f0 instanceof Q.default))throw f0;return N0.call(this,f0),await T0.call(this,f0.missingSchema),$0.call(this,G0)}}function N0({missingSchema:G0,missingRef:f0}){if(this.refs[G0])throw Error(`AnySchema ${G0} is loaded but ${f0} cannot be resolved`)}async function T0(G0){let f0=await v0.call(this,G0);if(!this.refs[G0])await a.call(this,f0.$schema);if(!this.refs[G0])this.addSchema(f0,G0,p)}async function v0(G0){let f0=this._loading[G0];if(f0)return f0;try{return await(this._loading[G0]=Y0(G0))}finally{delete this._loading[G0]}}}addSchema(y,p,Y0,g=this.opts.validateSchema){if(Array.isArray(y)){for(let $0 of y)this.addSchema($0,void 0,Y0,g);return this}let a;if(typeof y==="object"){let{schemaId:$0}=this.opts;if(a=y[$0],a!==void 0&&typeof a!="string")throw Error(`schema ${$0} must be string`)}return p=(0,G.normalizeId)(p||a),this._checkUnique(p),this.schemas[p]=this._addSchema(y,Y0,p,g,!0),this}addMetaSchema(y,p,Y0=this.opts.validateSchema){return this.addSchema(y,p,!0,Y0),this}validateSchema(y,p){if(typeof y=="boolean")return!0;let Y0;if(Y0=y.$schema,Y0!==void 0&&typeof Y0!="string")throw Error("$schema must be a string");if(Y0=Y0||this.opts.defaultMeta||this.defaultMeta(),!Y0)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let g=this.validate(Y0,y);if(!g&&p){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw Error(a)}return g}getSchema(y){let p;while(typeof(p=j.call(this,y))=="string")y=p;if(p===void 0){let{schemaId:Y0}=this.opts,g=new I.SchemaEnv({schema:{},schemaId:Y0});if(p=I.resolveSchema.call(this,g,y),!p)return;this.refs[y]=p}return p.validate||this._compileSchemaEnv(p)}removeSchema(y){if(y instanceof RegExp)return this._removeAllSchemas(this.schemas,y),this._removeAllSchemas(this.refs,y),this;switch(typeof y){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let p=j.call(this,y);if(typeof p=="object")this._cache.delete(p.schema);return delete this.schemas[y],delete this.refs[y],this}case"object":{let p=y;this._cache.delete(p);let Y0=y[this.opts.schemaId];if(Y0)Y0=(0,G.normalizeId)(Y0),delete this.schemas[Y0],delete this.refs[Y0];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(y){for(let p of y)this.addKeyword(p);return this}addKeyword(y,p){let Y0;if(typeof y=="string"){if(Y0=y,typeof p=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),p.keyword=Y0}else if(typeof y=="object"&&p===void 0){if(p=y,Y0=p.keyword,Array.isArray(Y0)&&!Y0.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(n.call(this,Y0,p),!p)return(0,W.eachItem)(Y0,(a)=>U0.call(this,a)),this;d.call(this,p);let g={...p,type:(0,H.getJSONTypes)(p.type),schemaType:(0,H.getJSONTypes)(p.schemaType)};return(0,W.eachItem)(Y0,g.type.length===0?(a)=>U0.call(this,a,g):(a)=>g.type.forEach(($0)=>U0.call(this,a,g,$0))),this}getKeyword(y){let p=this.RULES.all[y];return typeof p=="object"?p.definition:!!p}removeKeyword(y){let{RULES:p}=this;delete p.keywords[y],delete p.all[y];for(let Y0 of p.rules){let g=Y0.rules.findIndex((a)=>a.keyword===y);if(g>=0)Y0.rules.splice(g,1)}return this}addFormat(y,p){if(typeof p=="string")p=new RegExp(p);return this.formats[y]=p,this}errorsText(y=this.errors,{separator:p=", ",dataVar:Y0="data"}={}){if(!y||y.length===0)return"No errors";return y.map((g)=>`${Y0}${g.instancePath} ${g.message}`).reduce((g,a)=>g+p+a)}$dataMetaSchema(y,p){let Y0=this.RULES.all;y=JSON.parse(JSON.stringify(y));for(let g of p){let a=g.split("/").slice(1),$0=y;for(let N0 of a)$0=$0[N0];for(let N0 in Y0){let T0=Y0[N0];if(typeof T0!="object")continue;let{$data:v0}=T0.definition,G0=$0[N0];if(v0&&G0)$0[N0]=e(G0)}}return y}_removeAllSchemas(y,p){for(let Y0 in y){let g=y[Y0];if(!p||p.test(Y0)){if(typeof g=="string")delete y[Y0];else if(g&&!g.meta)this._cache.delete(g.schema),delete y[Y0]}}}_addSchema(y,p,Y0,g=this.opts.validateSchema,a=this.opts.addUsedSchema){let $0,{schemaId:N0}=this.opts;if(typeof y=="object")$0=y[N0];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof y!="boolean")throw Error("schema must be object or boolean");let T0=this._cache.get(y);if(T0!==void 0)return T0;Y0=(0,G.normalizeId)($0||Y0);let v0=G.getSchemaRefs.call(this,y,Y0);if(T0=new I.SchemaEnv({schema:y,schemaId:N0,meta:p,baseId:Y0,localRefs:v0}),this._cache.set(T0.schema,T0),a&&!Y0.startsWith("#")){if(Y0)this._checkUnique(Y0);this.refs[Y0]=T0}if(g)this.validateSchema(y,!0);return T0}_checkUnique(y){if(this.schemas[y]||this.refs[y])throw Error(`schema with key or id "${y}" already exists`)}_compileSchemaEnv(y){if(y.meta)this._compileMetaSchema(y);else I.compileSchema.call(this,y);if(!y.validate)throw Error("ajv implementation error");return y.validate}_compileMetaSchema(y){let p=this.opts;this.opts=this._metaOpts;try{I.compileSchema.call(this,y)}finally{this.opts=p}}};D.ValidationError=U.default,D.MissingRefError=Q.default,$.default=D;function P(y,p,Y0,g="error"){for(let a in y){let $0=a;if($0 in p)this.logger[g](`${Y0}: option ${a}. ${y[$0]}`)}}function j(y){return y=(0,G.normalizeId)(y),this.schemas[y]||this.refs[y]}function A(){let y=this.opts.schemas;if(!y)return;if(Array.isArray(y))this.addSchema(y);else for(let p in y)this.addSchema(y[p],p)}function T(){for(let y in this.opts.formats){let p=this.opts.formats[y];if(p)this.addFormat(y,p)}}function C(y){if(Array.isArray(y)){this.addVocabulary(y);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let p in y){let Y0=y[p];if(!Y0.keyword)Y0.keyword=p;this.addKeyword(Y0)}}function b(){let y={...this.opts};for(let p of V)delete y[p];return y}let k={log(){},warn(){},error(){}};function S(y){if(y===!1)return k;if(y===void 0)return console;if(y.log&&y.warn&&y.error)return y;throw Error("logger must implement log, warn and error methods")}let i=/^[a-z_$][a-z0-9_$:-]*$/i;function n(y,p){let{RULES:Y0}=this;if((0,W.eachItem)(y,(g)=>{if(Y0.keywords[g])throw Error(`Keyword ${g} is already defined`);if(!i.test(g))throw Error(`Keyword ${g} has invalid name`)}),!p)return;if(p.$data&&!(("code"in p)||("validate"in p)))throw Error('$data keyword must have "code" or "validate" function')}function U0(y,p,Y0){var g;let a=p===null||p===void 0?void 0:p.post;if(Y0&&a)throw Error('keyword with "post" flag cannot have "type"');let{RULES:$0}=this,N0=a?$0.post:$0.rules.find(({type:v0})=>v0===Y0);if(!N0)N0={type:Y0,rules:[]},$0.rules.push(N0);if($0.keywords[y]=!0,!p)return;let T0={keyword:y,definition:{...p,type:(0,H.getJSONTypes)(p.type),schemaType:(0,H.getJSONTypes)(p.schemaType)}};if(p.before)x.call(this,N0,T0,p.before);else N0.rules.push(T0);$0.all[y]=T0,(g=p.implements)===null||g===void 0||g.forEach((v0)=>this.addKeyword(v0))}function x(y,p,Y0){let g=y.rules.findIndex((a)=>a.keyword===Y0);if(g>=0)y.rules.splice(g,0,p);else y.rules.push(p),this.logger.warn(`rule ${Y0} is not defined`)}function d(y){let{metaSchema:p}=y;if(p===void 0)return;if(y.$data&&this.opts.$data)p=e(p);y.validateSchema=this.compile(p,!0)}let t={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function e(y){return{anyOf:[y,t]}}}),jb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};$.default=Y}),MS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.callRef=$.getValidate=void 0;let Y=bQ(),z=J5(),U=F1(),Q=Q5(),J=nO(),I=v1(),K={keyword:"$ref",schemaType:"string",code(W){let{gen:X,schema:Z,it:q}=W,{baseId:V,schemaEnv:F,validateName:w,opts:O,self:N}=q,{root:M}=F;if((Z==="#"||Z==="#/")&&V===M.baseId)return P();let D=J.resolveRef.call(N,M,V,Z);if(D===void 0)throw new Y.default(q.opts.uriResolver,V,Z);if(D instanceof J.SchemaEnv)return j(D);return A(D);function P(){if(F===M)return H(W,w,F,F.$async);let T=X.scopeValue("root",{ref:M});return H(W,U._`${T}.validate`,M,M.$async)}function j(T){H(W,G(W,T),T,T.$async)}function A(T){let C=X.scopeValue("schema",O.code.source===!0?{ref:T,code:(0,U.stringify)(T)}:{ref:T}),b=X.name("valid"),k=W.subschema({schema:T,dataTypes:[],schemaPath:U.nil,topSchemaRef:C,errSchemaPath:Z},b);W.mergeEvaluated(k),W.ok(b)}}};function G(W,X){let{gen:Z}=W;return X.validate?Z.scopeValue("validate",{ref:X.validate}):U._`${Z.scopeValue("wrapper",{ref:X})}.validate`}$.getValidate=G;function H(W,X,Z,q){let{gen:V,it:F}=W,{allErrors:w,schemaEnv:O,opts:N}=F,M=N.passContext?Q.default.this:U.nil;if(q)D();else P();function D(){if(!O.$async)throw Error("async schema referenced by sync schema");let T=V.let("valid");V.try(()=>{if(V.code(U._`await ${(0,z.callValidateCode)(W,X,M)}`),A(X),!w)V.assign(T,!0)},(C)=>{if(V.if(U._`!(${C} instanceof ${F.ValidationError})`,()=>V.throw(C)),j(C),!w)V.assign(T,!1)}),W.ok(T)}function P(){W.result((0,z.callValidateCode)(W,X,M),()=>A(X),()=>j(X))}function j(T){let C=U._`${T}.errors`;V.assign(Q.default.vErrors,U._`${Q.default.vErrors} === null ? ${C} : ${Q.default.vErrors}.concat(${C})`),V.assign(Q.default.errors,U._`${Q.default.vErrors}.length`)}function A(T){var C;if(!F.opts.unevaluated)return;let b=(C=Z===null||Z===void 0?void 0:Z.validate)===null||C===void 0?void 0:C.evaluated;if(F.props!==!0)if(b&&!b.dynamicProps){if(b.props!==void 0)F.props=I.mergeEvaluated.props(V,b.props,F.props)}else{let k=V.var("props",U._`${T}.evaluated.props`);F.props=I.mergeEvaluated.props(V,k,F.props,U.Name)}if(F.items!==!0)if(b&&!b.dynamicItems){if(b.items!==void 0)F.items=I.mergeEvaluated.items(V,b.items,F.items)}else{let k=V.var("items",U._`${T}.evaluated.items`);F.items=I.mergeEvaluated.items(V,k,F.items,U.Name)}}}$.callRef=H,$.default=K}),Oe=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=jb0(),z=MS(),U=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Y.default,z.default];$.default=U}),Tb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=Y.operators,U={maximum:{okStr:"<=",ok:z.LTE,fail:z.GT},minimum:{okStr:">=",ok:z.GTE,fail:z.LT},exclusiveMaximum:{okStr:"<",ok:z.LT,fail:z.GTE},exclusiveMinimum:{okStr:">",ok:z.GT,fail:z.LTE}},Q={keyword:Object.keys(U),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:J,schemaCode:I})=>Y.str`must be ${U[J].okStr} ${I}`,params:({keyword:J,schemaCode:I})=>Y._`{comparison: ${U[J].okStr}, limit: ${I}}`},code(J){let{keyword:I,data:K,schemaCode:G}=J;J.fail$data(Y._`${K} ${U[I].fail} ${G} || isNaN(${K})`)}};$.default=Q}),Eb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:U})=>Y.str`must be multiple of ${U}`,params:({schemaCode:U})=>Y._`{multipleOf: ${U}}`},code(U){let{gen:Q,data:J,schemaCode:I,it:K}=U,G=K.opts.multipleOfPrecision,H=Q.let("res"),W=G?Y._`Math.abs(Math.round(${H}) - ${H}) > 1e-${G}`:Y._`${H} !== parseInt(${H})`;U.fail$data(Y._`(${I} === 0 || (${H} = ${J}/${I}, ${W}))`)}};$.default=z}),Cb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});function Y(z){let U=z.length,Q=0,J=0,I;while(J=55296&&I<=56319&&J{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=Cb0(),Q={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:J,schemaCode:I}){let K=J==="maxLength"?"more":"fewer";return Y.str`must NOT have ${K} than ${I} characters`},params:({schemaCode:J})=>Y._`{limit: ${J}}`},code(J){let{keyword:I,data:K,schemaCode:G,it:H}=J,W=I==="maxLength"?Y.operators.GT:Y.operators.LT,X=H.opts.unicode===!1?Y._`${K}.length`:Y._`${(0,z.useFunc)(J.gen,U.default)}(${K})`;J.fail$data(Y._`${X} ${W} ${G}`)}};$.default=Q}),_b0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=v1(),U=F1(),Q={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:J})=>U.str`must match pattern "${J}"`,params:({schemaCode:J})=>U._`{pattern: ${J}}`},code(J){let{gen:I,data:K,$data:G,schema:H,schemaCode:W,it:X}=J,Z=X.opts.unicodeRegExp?"u":"";if(G){let{regExp:q}=X.opts.code,V=q.code==="new RegExp"?U._`new RegExp`:(0,z.useFunc)(I,q),F=I.let("valid");I.try(()=>I.assign(F,U._`${V}(${W}, ${Z}).test(${K})`),()=>I.assign(F,!1)),J.fail$data(U._`!${F}`)}else{let q=(0,Y.usePattern)(J,H);J.fail$data(U._`!${q}.test(${K})`)}}};$.default=Q}),vb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:U,schemaCode:Q}){let J=U==="maxProperties"?"more":"fewer";return Y.str`must NOT have ${J} than ${Q} properties`},params:({schemaCode:U})=>Y._`{limit: ${U}}`},code(U){let{keyword:Q,data:J,schemaCode:I}=U,K=Q==="maxProperties"?Y.operators.GT:Y.operators.LT;U.fail$data(Y._`Object.keys(${J}).length ${K} ${I}`)}};$.default=z}),hb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=F1(),U=v1(),Q={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:J}})=>z.str`must have required property '${J}'`,params:({params:{missingProperty:J}})=>z._`{missingProperty: ${J}}`},code(J){let{gen:I,schema:K,schemaCode:G,data:H,$data:W,it:X}=J,{opts:Z}=X;if(!W&&K.length===0)return;let q=K.length>=Z.loopRequired;if(X.allErrors)V();else F();if(Z.strictRequired){let N=J.parentSchema.properties,{definedProperties:M}=J.it;for(let D of K)if((N===null||N===void 0?void 0:N[D])===void 0&&!M.has(D)){let P=`required property "${D}" is not defined at "${X.schemaEnv.baseId+X.errSchemaPath}" (strictRequired)`;(0,U.checkStrictMode)(X,P,X.opts.strictRequired)}}function V(){if(q||W)J.block$data(z.nil,w);else for(let N of K)(0,Y.checkReportMissingProp)(J,N)}function F(){let N=I.let("missing");if(q||W){let M=I.let("valid",!0);J.block$data(M,()=>O(N,M)),J.ok(M)}else I.if((0,Y.checkMissingProp)(J,K,N)),(0,Y.reportMissingProp)(J,N),I.else()}function w(){I.forOf("prop",G,(N)=>{J.setParams({missingProperty:N}),I.if((0,Y.noPropertyInData)(I,H,N,Z.ownProperties),()=>J.error())})}function O(N,M){J.setParams({missingProperty:N}),I.forOf(N,G,()=>{I.assign(M,(0,Y.propertyInData)(I,H,N,Z.ownProperties)),I.if((0,z.not)(M),()=>{J.error(),I.break()})},z.nil)}}};$.default=Q}),Sb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:U,schemaCode:Q}){let J=U==="maxItems"?"more":"fewer";return Y.str`must NOT have ${J} than ${Q} items`},params:({schemaCode:U})=>Y._`{limit: ${U}}`},code(U){let{keyword:Q,data:J,schemaCode:I}=U,K=Q==="maxItems"?Y.operators.GT:Y.operators.LT;U.fail$data(Y._`${J}.length ${K} ${I}`)}};$.default=z}),NS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Le();Y.code='require("ajv/dist/runtime/equal").default',$.default=Y}),gb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=uO(),z=F1(),U=v1(),Q=NS(),J={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:I,j:K}})=>z.str`must NOT have duplicate items (items ## ${K} and ${I} are identical)`,params:({params:{i:I,j:K}})=>z._`{i: ${I}, j: ${K}}`},code(I){let{gen:K,data:G,$data:H,schema:W,parentSchema:X,schemaCode:Z,it:q}=I;if(!H&&!W)return;let V=K.let("valid"),F=X.items?(0,Y.getSchemaTypes)(X.items):[];I.block$data(V,w,z._`${Z} === false`),I.ok(V);function w(){let D=K.let("i",z._`${G}.length`),P=K.let("j");I.setParams({i:D,j:P}),K.assign(V,!0),K.if(z._`${D} > 1`,()=>(O()?N:M)(D,P))}function O(){return F.length>0&&!F.some((D)=>D==="object"||D==="array")}function N(D,P){let j=K.name("item"),A=(0,Y.checkDataTypes)(F,j,q.opts.strictNumbers,Y.DataType.Wrong),T=K.const("indices",z._`{}`);K.for(z._`;${D}--;`,()=>{if(K.let(j,z._`${G}[${D}]`),K.if(A,z._`continue`),F.length>1)K.if(z._`typeof ${j} == "string"`,z._`${j} += "_"`);K.if(z._`typeof ${T}[${j}] == "number"`,()=>{K.assign(P,z._`${T}[${j}]`),I.error(),K.assign(V,!1).break()}).code(z._`${T}[${j}] = ${D}`)})}function M(D,P){let j=(0,U.useFunc)(K,Q.default),A=K.name("outer");K.label(A).for(z._`;${D}--;`,()=>K.for(z._`${P} = ${D}; ${P}--;`,()=>K.if(z._`${j}(${G}[${D}], ${G}[${P}])`,()=>{I.error(),K.assign(V,!1).break(A)})))}}};$.default=J}),yb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=NS(),Q={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:J})=>Y._`{allowedValue: ${J}}`},code(J){let{gen:I,data:K,$data:G,schemaCode:H,schema:W}=J;if(G||W&&typeof W=="object")J.fail$data(Y._`!${(0,z.useFunc)(I,U.default)}(${K}, ${H})`);else J.fail(Y._`${W} !== ${K}`)}};$.default=Q}),kb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=NS(),Q={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:J})=>Y._`{allowedValues: ${J}}`},code(J){let{gen:I,data:K,$data:G,schema:H,schemaCode:W,it:X}=J;if(!G&&H.length===0)throw Error("enum must have non-empty array");let Z=H.length>=X.opts.loopEnum,q,V=()=>q!==null&&q!==void 0?q:q=(0,z.useFunc)(I,U.default),F;if(Z||G)F=I.let("valid"),J.block$data(F,w);else{if(!Array.isArray(H))throw Error("ajv implementation error");let N=I.const("vSchema",W);F=(0,Y.or)(...H.map((M,D)=>O(N,D)))}J.pass(F);function w(){I.assign(F,!1),I.forOf("v",W,(N)=>I.if(Y._`${V()}(${K}, ${N})`,()=>I.assign(F,!0).break()))}function O(N,M){let D=H[M];return typeof D==="object"&&D!==null?Y._`${V()}(${K}, ${N}[${M}])`:Y._`${K} === ${D}`}}};$.default=Q}),we=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Tb0(),z=Eb0(),U=Rb0(),Q=_b0(),J=vb0(),I=hb0(),K=Sb0(),G=gb0(),H=yb0(),W=kb0(),X=[Y.default,z.default,U.default,Q.default,J.default,I.default,K.default,G.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},H.default,W.default];$.default=X}),Me=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateAdditionalItems=void 0;let Y=F1(),z=v1(),U={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:J}})=>Y.str`must NOT have more than ${J} items`,params:({params:{len:J}})=>Y._`{limit: ${J}}`},code(J){let{parentSchema:I,it:K}=J,{items:G}=I;if(!Array.isArray(G)){(0,z.checkStrictMode)(K,'"additionalItems" is ignored when "items" is not an array of schemas');return}Q(J,G)}};function Q(J,I){let{gen:K,schema:G,data:H,keyword:W,it:X}=J;X.items=!0;let Z=K.const("len",Y._`${H}.length`);if(G===!1)J.setParams({len:I.length}),J.pass(Y._`${Z} <= ${I.length}`);else if(typeof G=="object"&&!(0,z.alwaysValidSchema)(X,G)){let V=K.var("valid",Y._`${Z} <= ${I.length}`);K.if((0,Y.not)(V),()=>q(V)),J.ok(V)}function q(V){K.forRange("i",I.length,Z,(F)=>{if(J.subschema({keyword:W,dataProp:F,dataPropType:z.Type.Num},V),!X.allErrors)K.if((0,Y.not)(V),()=>K.break())})}}$.validateAdditionalItems=Q,$.default=U}),Ne=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateTuple=void 0;let Y=F1(),z=v1(),U=J5(),Q={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(I){let{schema:K,it:G}=I;if(Array.isArray(K))return J(I,"additionalItems",K);if(G.items=!0,(0,z.alwaysValidSchema)(G,K))return;I.ok((0,U.validateArray)(I))}};function J(I,K,G=I.schema){let{gen:H,parentSchema:W,data:X,keyword:Z,it:q}=I;if(w(W),q.opts.unevaluated&&G.length&&q.items!==!0)q.items=z.mergeEvaluated.items(H,G.length,q.items);let V=H.name("valid"),F=H.const("len",Y._`${X}.length`);G.forEach((O,N)=>{if((0,z.alwaysValidSchema)(q,O))return;H.if(Y._`${F} > ${N}`,()=>I.subschema({keyword:Z,schemaProp:N,dataProp:N},V)),I.ok(V)});function w(O){let{opts:N,errSchemaPath:M}=q,D=G.length,P=D===O.minItems&&(D===O.maxItems||O[K]===!1);if(N.strictTuples&&!P){let j=`"${Z}" is ${D}-tuple, but minItems or maxItems/${K} are not specified or different at path "${M}"`;(0,z.checkStrictMode)(q,j,N.strictTuples)}}}$.validateTuple=J,$.default=Q}),xb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ne(),z={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(U)=>(0,Y.validateTuple)(U,"items")};$.default=z}),fb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=J5(),Q=Me(),J={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:I}})=>Y.str`must NOT have more than ${I} items`,params:({params:{len:I}})=>Y._`{limit: ${I}}`},code(I){let{schema:K,parentSchema:G,it:H}=I,{prefixItems:W}=G;if(H.items=!0,(0,z.alwaysValidSchema)(H,K))return;if(W)(0,Q.validateAdditionalItems)(I,W);else I.ok((0,U.validateArray)(I))}};$.default=J}),ub0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:Q,max:J}})=>J===void 0?Y.str`must contain at least ${Q} valid item(s)`:Y.str`must contain at least ${Q} and no more than ${J} valid item(s)`,params:({params:{min:Q,max:J}})=>J===void 0?Y._`{minContains: ${Q}}`:Y._`{minContains: ${Q}, maxContains: ${J}}`},code(Q){let{gen:J,schema:I,parentSchema:K,data:G,it:H}=Q,W,X,{minContains:Z,maxContains:q}=K;if(H.opts.next)W=Z===void 0?1:Z,X=q;else W=1;let V=J.const("len",Y._`${G}.length`);if(Q.setParams({min:W,max:X}),X===void 0&&W===0){(0,z.checkStrictMode)(H,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(X!==void 0&&W>X){(0,z.checkStrictMode)(H,'"minContains" > "maxContains" is always invalid'),Q.fail();return}if((0,z.alwaysValidSchema)(H,I)){let M=Y._`${V} >= ${W}`;if(X!==void 0)M=Y._`${M} && ${V} <= ${X}`;Q.pass(M);return}H.items=!0;let F=J.name("valid");if(X===void 0&&W===1)O(F,()=>J.if(F,()=>J.break()));else if(W===0){if(J.let(F,!0),X!==void 0)J.if(Y._`${G}.length > 0`,w)}else J.let(F,!1),w();Q.result(F,()=>Q.reset());function w(){let M=J.name("_valid"),D=J.let("count",0);O(M,()=>J.if(M,()=>N(D)))}function O(M,D){J.forRange("i",0,V,(P)=>{Q.subschema({keyword:"contains",dataProp:P,dataPropType:z.Type.Num,compositeRule:!0},M),D()})}function N(M){if(J.code(Y._`${M}++`),X===void 0)J.if(Y._`${M} >= ${W}`,()=>J.assign(F,!0).break());else if(J.if(Y._`${M} > ${X}`,()=>J.assign(F,!1).break()),W===1)J.assign(F,!0);else J.if(Y._`${M} >= ${W}`,()=>J.assign(F,!0))}}};$.default=U}),DS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateSchemaDeps=$.validatePropertyDeps=$.error=void 0;let Y=F1(),z=v1(),U=J5();$.error={message:({params:{property:G,depsCount:H,deps:W}})=>{let X=H===1?"property":"properties";return Y.str`must have ${X} ${W} when property ${G} is present`},params:({params:{property:G,depsCount:H,deps:W,missingProperty:X}})=>Y._`{property: ${G}, + || ${C} === "boolean" || ${A} === null`).assign(b,Q._`[${A}]`)}}}function q({gen:M,parentData:D,parentDataProperty:P},j){M.if(Q._`${D} !== undefined`,()=>M.assign(Q._`${D}[${P}]`,j))}function V(M,D,P,j=I.Correct){let A=j===I.Correct?Q.operators.EQ:Q.operators.NEQ,T;switch(M){case"null":return Q._`${D} ${A} null`;case"array":T=Q._`Array.isArray(${D})`;break;case"object":T=Q._`${D} && typeof ${D} == "object" && !Array.isArray(${D})`;break;case"integer":T=C(Q._`!(${D} % 1) && !isNaN(${D})`);break;case"number":T=C();break;default:return Q._`typeof ${D} ${A} ${M}`}return j===I.Correct?T:(0,Q.not)(T);function C(b=Q.nil){return(0,Q.and)(Q._`typeof ${D} == "number"`,b,P?Q._`isFinite(${D})`:Q.nil)}}$.checkDataType=V;function F(M,D,P,j){if(M.length===1)return V(M[0],D,P,j);let A,T=(0,J.toHash)(M);if(T.array&&T.object){let C=Q._`typeof ${D} != "object"`;A=T.null?C:Q._`!${D} || ${C}`,delete T.null,delete T.array,delete T.object}else A=Q.nil;if(T.number)delete T.integer;for(let C in T)A=(0,Q.and)(A,V(C,D,P,j));return A}$.checkDataTypes=F;let w={message:({schema:M})=>`must be ${M}`,params:({schema:M,schemaValue:D})=>typeof M=="string"?Q._`{type: ${M}}`:Q._`{type: ${D}}`};function O(M){let D=N(M);(0,U.reportError)(D,w)}$.reportTypeError=O;function N(M){let{gen:D,data:P,schema:j}=M,A=(0,J.schemaRefOrVal)(M,j,"type");return{gen:D,keyword:"type",data:P,schema:j.type,schemaCode:A,schemaValue:A,parentSchema:j,params:{},it:M}}}),Ob0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.assignDefaults=void 0;let Y=F1(),z=v1();function U(J,I){let{properties:K,items:G}=J.schema;if(I==="object"&&K)for(let H in K)Q(J,H,K[H].default);else if(I==="array"&&Array.isArray(G))G.forEach((H,W)=>Q(J,W,H.default))}$.assignDefaults=U;function Q(J,I,K){let{gen:G,compositeRule:H,data:W,opts:X}=J;if(K===void 0)return;let Z=Y._`${W}${(0,Y.getProperty)(I)}`;if(H){(0,z.checkStrictMode)(J,`default is ignored for: ${Z}`);return}let q=Y._`${Z} === undefined`;if(X.useDefaults==="empty")q=Y._`${q} || ${Z} === null || ${Z} === ""`;G.if(q,Y._`${Z} = ${(0,Y.stringify)(K)}`)}}),J5=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateUnion=$.validateArray=$.usePattern=$.callValidateCode=$.schemaProperties=$.allSchemaProperties=$.noPropertyInData=$.propertyInData=$.isOwnProperty=$.hasPropFunc=$.reportMissingProp=$.checkMissingProp=$.checkReportMissingProp=void 0;let Y=F1(),z=v1(),U=Q5(),Q=v1();function J(M,D){let{gen:P,data:j,it:A}=M;P.if(X(P,j,D,A.opts.ownProperties),()=>{M.setParams({missingProperty:Y._`${D}`},!0),M.error()})}$.checkReportMissingProp=J;function I({gen:M,data:D,it:{opts:P}},j,A){return(0,Y.or)(...j.map((T)=>(0,Y.and)(X(M,D,T,P.ownProperties),Y._`${A} = ${T}`)))}$.checkMissingProp=I;function K(M,D){M.setParams({missingProperty:D},!0),M.error()}$.reportMissingProp=K;function G(M){return M.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Y._`Object.prototype.hasOwnProperty`})}$.hasPropFunc=G;function H(M,D,P){return Y._`${G(M)}.call(${D}, ${P})`}$.isOwnProperty=H;function W(M,D,P,j){let A=Y._`${D}${(0,Y.getProperty)(P)} !== undefined`;return j?Y._`${A} && ${H(M,D,P)}`:A}$.propertyInData=W;function X(M,D,P,j){let A=Y._`${D}${(0,Y.getProperty)(P)} === undefined`;return j?(0,Y.or)(A,(0,Y.not)(H(M,D,P))):A}$.noPropertyInData=X;function Z(M){return M?Object.keys(M).filter((D)=>D!=="__proto__"):[]}$.allSchemaProperties=Z;function q(M,D){return Z(D).filter((P)=>!(0,z.alwaysValidSchema)(M,D[P]))}$.schemaProperties=q;function V({schemaCode:M,data:D,it:{gen:P,topSchemaRef:j,schemaPath:A,errorPath:T},it:C},b,k,S){let i=S?Y._`${M}, ${D}, ${j}${A}`:D,n=[[U.default.instancePath,(0,Y.strConcat)(U.default.instancePath,T)],[U.default.parentData,C.parentData],[U.default.parentDataProperty,C.parentDataProperty],[U.default.rootData,U.default.rootData]];if(C.opts.dynamicRef)n.push([U.default.dynamicAnchors,U.default.dynamicAnchors]);let U0=Y._`${i}, ${P.object(...n)}`;return k!==Y.nil?Y._`${b}.call(${k}, ${U0})`:Y._`${b}(${U0})`}$.callValidateCode=V;let F=Y._`new RegExp`;function w({gen:M,it:{opts:D}},P){let j=D.unicodeRegExp?"u":"",{regExp:A}=D.code,T=A(P,j);return M.scopeValue("pattern",{key:T.toString(),ref:T,code:Y._`${A.code==="new RegExp"?F:(0,Q.useFunc)(M,A)}(${P}, ${j})`})}$.usePattern=w;function O(M){let{gen:D,data:P,keyword:j,it:A}=M,T=D.name("valid");if(A.allErrors){let b=D.let("valid",!0);return C(()=>D.assign(b,!1)),b}return D.var(T,!0),C(()=>D.break()),T;function C(b){let k=D.const("len",Y._`${P}.length`);D.forRange("i",0,k,(S)=>{M.subschema({keyword:j,dataProp:S,dataPropType:z.Type.Num},T),D.if((0,Y.not)(T),b)})}}$.validateArray=O;function N(M){let{gen:D,schema:P,keyword:j,it:A}=M;if(!Array.isArray(P))throw Error("ajv implementation error");if(P.some((b)=>(0,z.alwaysValidSchema)(A,b))&&!A.opts.unevaluated)return;let T=D.let("valid",!1),C=D.name("_valid");D.block(()=>P.forEach((b,k)=>{let S=M.subschema({keyword:j,schemaProp:k,compositeRule:!0},C);if(D.assign(T,Y._`${T} || ${C}`),!M.mergeValidEvaluated(S,C))D.if((0,Y.not)(T))})),M.result(T,()=>M.reset(),()=>M.error(!0))}$.validateUnion=N}),wb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateKeywordUsage=$.validSchemaType=$.funcKeywordCode=$.macroKeywordCode=void 0;let Y=F1(),z=Q5(),U=J5(),Q=bO();function J(q,V){let{gen:F,keyword:w,schema:O,parentSchema:N,it:M}=q,D=V.macro.call(M.self,O,N,M),P=W(F,w,D);if(M.opts.validateSchema!==!1)M.self.validateSchema(D,!0);let j=F.name("valid");q.subschema({schema:D,schemaPath:Y.nil,errSchemaPath:`${M.errSchemaPath}/${w}`,topSchemaRef:P,compositeRule:!0},j),q.pass(j,()=>q.error(!0))}$.macroKeywordCode=J;function I(q,V){var F;let{gen:w,keyword:O,schema:N,parentSchema:M,$data:D,it:P}=q;H(P,V);let j=W(w,O,!D&&V.compile?V.compile.call(P.self,N,M,P):V.validate),A=w.let("valid");q.block$data(A,T),q.ok((F=V.valid)!==null&&F!==void 0?F:A);function T(){if(V.errors===!1){if(k(),V.modifying)K(q);S(()=>q.error())}else{let i=V.async?C():b();if(V.modifying)K(q);S(()=>G(q,i))}}function C(){let i=w.let("ruleErrs",null);return w.try(()=>k(Y._`await `),(n)=>w.assign(A,!1).if(Y._`${n} instanceof ${P.ValidationError}`,()=>w.assign(i,Y._`${n}.errors`),()=>w.throw(n))),i}function b(){let i=Y._`${j}.errors`;return w.assign(i,null),k(Y.nil),i}function k(i=V.async?Y._`await `:Y.nil){let n=P.opts.passContext?z.default.this:z.default.self,U0=!(("compile"in V)&&!D||V.schema===!1);w.assign(A,Y._`${i}${(0,U.callValidateCode)(q,j,n,U0)}`,V.modifying)}function S(i){var n;w.if((0,Y.not)((n=V.valid)!==null&&n!==void 0?n:A),i)}}$.funcKeywordCode=I;function K(q){let{gen:V,data:F,it:w}=q;V.if(w.parentData,()=>V.assign(F,Y._`${w.parentData}[${w.parentDataProperty}]`))}function G(q,V){let{gen:F}=q;F.if(Y._`Array.isArray(${V})`,()=>{F.assign(z.default.vErrors,Y._`${z.default.vErrors} === null ? ${V} : ${z.default.vErrors}.concat(${V})`).assign(z.default.errors,Y._`${z.default.vErrors}.length`),(0,Q.extendErrors)(q)},()=>q.error())}function H({schemaEnv:q},V){if(V.async&&!q.$async)throw Error("async keyword in sync schema")}function W(q,V,F){if(F===void 0)throw Error(`keyword "${V}" failed to compile`);return q.scopeValue("keyword",typeof F=="function"?{ref:F}:{ref:F,code:(0,Y.stringify)(F)})}function X(q,V,F=!1){return!V.length||V.some((w)=>w==="array"?Array.isArray(q):w==="object"?q&&typeof q=="object"&&!Array.isArray(q):typeof q==w||F&&typeof q>"u")}$.validSchemaType=X;function Z({schema:q,opts:V,self:F,errSchemaPath:w},O,N){if(Array.isArray(O.keyword)?!O.keyword.includes(N):O.keyword!==N)throw Error("ajv implementation error");let M=O.dependencies;if(M===null||M===void 0?void 0:M.some((D)=>!Object.prototype.hasOwnProperty.call(q,D)))throw Error(`parent schema must have dependencies of ${N}: ${M.join(",")}`);if(O.validateSchema){if(!O.validateSchema(q[N])){let D=`keyword "${N}" value is invalid at path "${w}": `+F.errorsText(O.validateSchema.errors);if(V.validateSchema==="log")F.logger.error(D);else throw Error(D)}}}$.validateKeywordUsage=Z}),Mb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.extendSubschemaMode=$.extendSubschemaData=$.getSubschema=void 0;let Y=F1(),z=v1();function U(I,{keyword:K,schemaProp:G,schema:H,schemaPath:W,errSchemaPath:X,topSchemaRef:Z}){if(K!==void 0&&H!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(K!==void 0){let q=I.schema[K];return G===void 0?{schema:q,schemaPath:Y._`${I.schemaPath}${(0,Y.getProperty)(K)}`,errSchemaPath:`${I.errSchemaPath}/${K}`}:{schema:q[G],schemaPath:Y._`${I.schemaPath}${(0,Y.getProperty)(K)}${(0,Y.getProperty)(G)}`,errSchemaPath:`${I.errSchemaPath}/${K}/${(0,z.escapeFragment)(G)}`}}if(H!==void 0){if(W===void 0||X===void 0||Z===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:H,schemaPath:W,topSchemaRef:Z,errSchemaPath:X}}throw Error('either "keyword" or "schema" must be passed')}$.getSubschema=U;function Q(I,K,{dataProp:G,dataPropType:H,data:W,dataTypes:X,propertyName:Z}){if(W!==void 0&&G!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:q}=K;if(G!==void 0){let{errorPath:F,dataPathArr:w,opts:O}=K;V(q.let("data",Y._`${K.data}${(0,Y.getProperty)(G)}`,!0)),I.errorPath=Y.str`${F}${(0,z.getErrorPath)(G,H,O.jsPropertySyntax)}`,I.parentDataProperty=Y._`${G}`,I.dataPathArr=[...w,I.parentDataProperty]}if(W!==void 0){if(V(W instanceof Y.Name?W:q.let("data",W,!0)),Z!==void 0)I.propertyName=Z}if(X)I.dataTypes=X;function V(F){I.data=F,I.dataLevel=K.dataLevel+1,I.dataTypes=[],K.definedProperties=new Set,I.parentData=K.data,I.dataNames=[...K.dataNames,F]}}$.extendSubschemaData=Q;function J(I,{jtdDiscriminator:K,jtdMetadata:G,compositeRule:H,createErrors:W,allErrors:X}){if(H!==void 0)I.compositeRule=H;if(W!==void 0)I.createErrors=W;if(X!==void 0)I.allErrors=X;I.jtdDiscriminator=K,I.jtdMetadata=G}$.extendSubschemaMode=J}),Le=C0(($,Y)=>{Y.exports=function z(U,Q){if(U===Q)return!0;if(U&&Q&&typeof U=="object"&&typeof Q=="object"){if(U.constructor!==Q.constructor)return!1;var J,I,K;if(Array.isArray(U)){if(J=U.length,J!=Q.length)return!1;for(I=J;I--!==0;)if(!z(U[I],Q[I]))return!1;return!0}if(U.constructor===RegExp)return U.source===Q.source&&U.flags===Q.flags;if(U.valueOf!==Object.prototype.valueOf)return U.valueOf()===Q.valueOf();if(U.toString!==Object.prototype.toString)return U.toString()===Q.toString();if(K=Object.keys(U),J=K.length,J!==Object.keys(Q).length)return!1;for(I=J;I--!==0;)if(!Object.prototype.hasOwnProperty.call(Q,K[I]))return!1;for(I=J;I--!==0;){var G=K[I];if(!z(U[G],Q[G]))return!1}return!0}return U!==U&&Q!==Q}}),Nb0=C0(($,Y)=>{var z=Y.exports=function(J,I,K){if(typeof I=="function")K=I,I={};K=I.cb||K;var G=typeof K=="function"?K:K.pre||function(){},H=K.post||function(){};U(I,G,H,J,"",J)};z.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},z.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},z.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},z.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 U(J,I,K,G,H,W,X,Z,q,V){if(G&&typeof G=="object"&&!Array.isArray(G)){I(G,H,W,X,Z,q,V);for(var F in G){var w=G[F];if(Array.isArray(w)){if(F in z.arrayKeywords)for(var O=0;O{Object.defineProperty($,"__esModule",{value:!0}),$.getSchemaRefs=$.resolveUrl=$.normalizeId=$._getFullPath=$.getFullPath=$.inlineRef=void 0;let Y=v1(),z=Le(),U=Nb0(),Q=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function J(w,O=!0){if(typeof w=="boolean")return!0;if(O===!0)return!K(w);if(!O)return!1;return G(w)<=O}$.inlineRef=J;let I=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function K(w){for(let O in w){if(I.has(O))return!0;let N=w[O];if(Array.isArray(N)&&N.some(K))return!0;if(typeof N=="object"&&K(N))return!0}return!1}function G(w){let O=0;for(let N in w){if(N==="$ref")return 1/0;if(O++,Q.has(N))continue;if(typeof w[N]=="object")(0,Y.eachItem)(w[N],(M)=>O+=G(M));if(O===1/0)return 1/0}return O}function H(w,O="",N){if(N!==!1)O=Z(O);return W(w,w.parse(O))}$.getFullPath=H;function W(w,O){return w.serialize(O).split("#")[0]+"#"}$._getFullPath=W;let X=/#\/?$/;function Z(w){return w?w.replace(X,""):""}$.normalizeId=Z;function q(w,O,N){return N=Z(N),w.resolve(O,N)}$.resolveUrl=q;let V=/^[a-z_][-a-z0-9._]*$/i;function F(w,O){if(typeof w=="boolean")return{};let{schemaId:N,uriResolver:M}=this.opts,D=Z(w[N]||O),P={"":D},j=H(M,D,!1),A={},T=new Set;return U(w,{allKeys:!0},(k,S,i,n)=>{if(n===void 0)return;let U0=j+S,x=P[n];if(typeof k[N]=="string")x=d.call(this,k[N]);t.call(this,k.$anchor),t.call(this,k.$dynamicAnchor),P[S]=x;function d(e){let g=this.opts.uriResolver.resolve;if(e=Z(x?g(x,e):e),T.has(e))throw b(e);T.add(e);let p=this.refs[e];if(typeof p=="string")p=this.refs[p];if(typeof p=="object")C(k,p.schema,e);else if(e!==Z(U0))if(e[0]==="#")C(k,A[e],e),A[e]=k;else this.refs[e]=U0;return e}function t(e){if(typeof e=="string"){if(!V.test(e))throw Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}}),A;function C(k,S,i){if(S!==void 0&&!z(k,S))throw b(i)}function b(k){return Error(`reference "${k}" resolves to more than one schema`)}}$.getSchemaRefs=F}),uQ=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.getData=$.KeywordCxt=$.validateFunctionCode=void 0;let Y=Fb0(),z=uO(),U=Ve(),Q=uO(),J=Ob0(),I=wb0(),K=Mb0(),G=F1(),H=Q5(),W=iO(),X=v1(),Z=bO();function q(s){if(j(s)){if(T(s),P(s)){O(s);return}}V(s,()=>(0,Y.topBoolOrEmptySchema)(s))}$.validateFunctionCode=q;function V({gen:s,validateName:H0,schema:F0,schemaEnv:b0,opts:i0},n0){if(i0.code.es5)s.func(H0,G._`${H.default.data}, ${H.default.valCxt}`,b0.$async,()=>{s.code(G._`"use strict"; ${M(F0,i0)}`),w(s,i0),s.code(n0)});else s.func(H0,G._`${H.default.data}, ${F(i0)}`,b0.$async,()=>s.code(M(F0,i0)).code(n0))}function F(s){return G._`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${s.dynamicRef?G._`, ${H.default.dynamicAnchors}={}`:G.nil}}={}`}function w(s,H0){s.if(H.default.valCxt,()=>{if(s.var(H.default.instancePath,G._`${H.default.valCxt}.${H.default.instancePath}`),s.var(H.default.parentData,G._`${H.default.valCxt}.${H.default.parentData}`),s.var(H.default.parentDataProperty,G._`${H.default.valCxt}.${H.default.parentDataProperty}`),s.var(H.default.rootData,G._`${H.default.valCxt}.${H.default.rootData}`),H0.dynamicRef)s.var(H.default.dynamicAnchors,G._`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{if(s.var(H.default.instancePath,G._`""`),s.var(H.default.parentData,G._`undefined`),s.var(H.default.parentDataProperty,G._`undefined`),s.var(H.default.rootData,H.default.data),H0.dynamicRef)s.var(H.default.dynamicAnchors,G._`{}`)})}function O(s){let{schema:H0,opts:F0,gen:b0}=s;V(s,()=>{if(F0.$comment&&H0.$comment)n(s);if(k(s),b0.let(H.default.vErrors,null),b0.let(H.default.errors,0),F0.unevaluated)N(s);C(s),U0(s)})}function N(s){let{gen:H0,validateName:F0}=s;s.evaluated=H0.const("evaluated",G._`${F0}.evaluated`),H0.if(G._`${s.evaluated}.dynamicProps`,()=>H0.assign(G._`${s.evaluated}.props`,G._`undefined`)),H0.if(G._`${s.evaluated}.dynamicItems`,()=>H0.assign(G._`${s.evaluated}.items`,G._`undefined`))}function M(s,H0){let F0=typeof s=="object"&&s[H0.schemaId];return F0&&(H0.code.source||H0.code.process)?G._`/*# sourceURL=${F0} */`:G.nil}function D(s,H0){if(j(s)){if(T(s),P(s)){A(s,H0);return}}(0,Y.boolOrEmptySchema)(s,H0)}function P({schema:s,self:H0}){if(typeof s=="boolean")return!s;for(let F0 in s)if(H0.RULES.all[F0])return!0;return!1}function j(s){return typeof s.schema!="boolean"}function A(s,H0){let{schema:F0,gen:b0,opts:i0}=s;if(i0.$comment&&F0.$comment)n(s);S(s),i(s);let n0=b0.const("_errs",H.default.errors);C(s,n0),b0.var(H0,G._`${n0} === ${H.default.errors}`)}function T(s){(0,X.checkUnknownRules)(s),b(s)}function C(s,H0){if(s.opts.jtd)return d(s,[],!1,H0);let F0=(0,z.getSchemaTypes)(s.schema);d(s,F0,!(0,z.coerceAndCheckDataType)(s,F0),H0)}function b(s){let{schema:H0,errSchemaPath:F0,opts:b0,self:i0}=s;if(H0.$ref&&b0.ignoreKeywordsWithRef&&(0,X.schemaHasRulesButRef)(H0,i0.RULES))i0.logger.warn(`$ref: keywords ignored in schema at path "${F0}"`)}function k(s){let{schema:H0,opts:F0}=s;if(H0.default!==void 0&&F0.useDefaults&&F0.strictSchema)(0,X.checkStrictMode)(s,"default is ignored in the schema root")}function S(s){let H0=s.schema[s.opts.schemaId];if(H0)s.baseId=(0,W.resolveUrl)(s.opts.uriResolver,s.baseId,H0)}function i(s){if(s.schema.$async&&!s.schemaEnv.$async)throw Error("async schema in sync schema")}function n({gen:s,schemaEnv:H0,schema:F0,errSchemaPath:b0,opts:i0}){let n0=F0.$comment;if(i0.$comment===!0)s.code(G._`${H.default.self}.logger.log(${n0})`);else if(typeof i0.$comment=="function"){let w1=G.str`${b0}/$comment`,k1=s.scopeValue("root",{ref:H0.root});s.code(G._`${H.default.self}.opts.$comment(${n0}, ${w1}, ${k1}.schema)`)}}function U0(s){let{gen:H0,schemaEnv:F0,validateName:b0,ValidationError:i0,opts:n0}=s;if(F0.$async)H0.if(G._`${H.default.errors} === 0`,()=>H0.return(H.default.data),()=>H0.throw(G._`new ${i0}(${H.default.vErrors})`));else{if(H0.assign(G._`${b0}.errors`,H.default.vErrors),n0.unevaluated)x(s);H0.return(G._`${H.default.errors} === 0`)}}function x({gen:s,evaluated:H0,props:F0,items:b0}){if(F0 instanceof G.Name)s.assign(G._`${H0}.props`,F0);if(b0 instanceof G.Name)s.assign(G._`${H0}.items`,b0)}function d(s,H0,F0,b0){let{gen:i0,schema:n0,data:w1,allErrors:k1,opts:u1,self:b1}=s,{RULES:A0}=b1;if(n0.$ref&&(u1.ignoreKeywordsWithRef||!(0,X.schemaHasRulesButRef)(n0,A0))){i0.block(()=>_0(s,"$ref",A0.all.$ref.definition));return}if(!u1.jtd)e(s,H0);i0.block(()=>{for(let B of A0.rules)Q0(B);Q0(A0.post)});function Q0(B){if(!(0,U.shouldUseGroup)(n0,B))return;if(B.type){if(i0.if((0,Q.checkDataType)(B.type,w1,u1.strictNumbers)),t(s,B),H0.length===1&&H0[0]===B.type&&F0)i0.else(),(0,Q.reportTypeError)(s);i0.endIf()}else t(s,B);if(!k1)i0.if(G._`${H.default.errors} === ${b0||0}`)}}function t(s,H0){let{gen:F0,schema:b0,opts:{useDefaults:i0}}=s;if(i0)(0,J.assignDefaults)(s,H0.type);F0.block(()=>{for(let n0 of H0.rules)if((0,U.shouldUseRule)(b0,n0))_0(s,n0.keyword,n0.definition,H0.type)})}function e(s,H0){if(s.schemaEnv.meta||!s.opts.strictTypes)return;if(g(s,H0),!s.opts.allowUnionTypes)p(s,H0);Y0(s,s.dataTypes)}function g(s,H0){if(!H0.length)return;if(!s.dataTypes.length){s.dataTypes=H0;return}H0.forEach((F0)=>{if(!r(s.dataTypes,F0))N0(s,`type "${F0}" not allowed by context "${s.dataTypes.join(",")}"`)}),$0(s,H0)}function p(s,H0){if(H0.length>1&&!(H0.length===2&&H0.includes("null")))N0(s,"use allowUnionTypes to allow union type keyword")}function Y0(s,H0){let F0=s.self.RULES.all;for(let b0 in F0){let i0=F0[b0];if(typeof i0=="object"&&(0,U.shouldUseRule)(s.schema,i0)){let{type:n0}=i0.definition;if(n0.length&&!n0.some((w1)=>y(H0,w1)))N0(s,`missing type "${n0.join(",")}" for keyword "${b0}"`)}}}function y(s,H0){return s.includes(H0)||H0==="number"&&s.includes("integer")}function r(s,H0){return s.includes(H0)||H0==="integer"&&s.includes("number")}function $0(s,H0){let F0=[];for(let b0 of s.dataTypes)if(r(H0,b0))F0.push(b0);else if(H0.includes("integer")&&b0==="number")F0.push("integer");s.dataTypes=F0}function N0(s,H0){let F0=s.schemaEnv.baseId+s.errSchemaPath;H0+=` at "${F0}" (strictTypes)`,(0,X.checkStrictMode)(s,H0,s.opts.strictTypes)}var T0=class{constructor(s,H0,F0){if((0,I.validateKeywordUsage)(s,H0,F0),this.gen=s.gen,this.allErrors=s.allErrors,this.keyword=F0,this.data=s.data,this.schema=s.schema[F0],this.$data=H0.$data&&s.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,X.schemaRefOrVal)(s,this.schema,F0,this.$data),this.schemaType=H0.schemaType,this.parentSchema=s.schema,this.params={},this.it=s,this.def=H0,this.$data)this.schemaCode=s.gen.const("vSchema",e0(this.$data,s));else if(this.schemaCode=this.schemaValue,!(0,I.validSchemaType)(this.schema,H0.schemaType,H0.allowUndefined))throw Error(`${F0} value must be ${JSON.stringify(H0.schemaType)}`);if("code"in H0?H0.trackErrors:H0.errors!==!1)this.errsCount=s.gen.const("_errs",H.default.errors)}result(s,H0,F0){this.failResult((0,G.not)(s),H0,F0)}failResult(s,H0,F0){if(this.gen.if(s),F0)F0();else this.error();if(H0){if(this.gen.else(),H0(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(s,H0){this.failResult((0,G.not)(s),void 0,H0)}fail(s){if(s===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(s),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(s){if(!this.$data)return this.fail(s);let{schemaCode:H0}=this;this.fail(G._`${H0} !== undefined && (${(0,G.or)(this.invalid$data(),s)})`)}error(s,H0,F0){if(H0){this.setParams(H0),this._error(s,F0),this.setParams({});return}this._error(s,F0)}_error(s,H0){(s?Z.reportExtraError:Z.reportError)(this,this.def.error,H0)}$dataError(){(0,Z.reportError)(this,this.def.$dataError||Z.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,Z.resetErrorsCount)(this.gen,this.errsCount)}ok(s){if(!this.allErrors)this.gen.if(s)}setParams(s,H0){if(H0)Object.assign(this.params,s);else this.params=s}block$data(s,H0,F0=G.nil){this.gen.block(()=>{this.check$data(s,F0),H0()})}check$data(s=G.nil,H0=G.nil){if(!this.$data)return;let{gen:F0,schemaCode:b0,schemaType:i0,def:n0}=this;if(F0.if((0,G.or)(G._`${b0} === undefined`,H0)),s!==G.nil)F0.assign(s,!0);if(i0.length||n0.validateSchema){if(F0.elseIf(this.invalid$data()),this.$dataError(),s!==G.nil)F0.assign(s,!1)}F0.else()}invalid$data(){let{gen:s,schemaCode:H0,schemaType:F0,def:b0,it:i0}=this;return(0,G.or)(n0(),w1());function n0(){if(F0.length){if(!(H0 instanceof G.Name))throw Error("ajv implementation error");let k1=Array.isArray(F0)?F0:[F0];return G._`${(0,Q.checkDataTypes)(k1,H0,i0.opts.strictNumbers,Q.DataType.Wrong)}`}return G.nil}function w1(){if(b0.validateSchema){let k1=s.scopeValue("validate$data",{ref:b0.validateSchema});return G._`!${k1}(${H0})`}return G.nil}}subschema(s,H0){let F0=(0,K.getSubschema)(this.it,s);(0,K.extendSubschemaData)(F0,this.it,s),(0,K.extendSubschemaMode)(F0,s);let b0={...this.it,...F0,items:void 0,props:void 0};return D(b0,H0),b0}mergeEvaluated(s,H0){let{it:F0,gen:b0}=this;if(!F0.opts.unevaluated)return;if(F0.props!==!0&&s.props!==void 0)F0.props=X.mergeEvaluated.props(b0,s.props,F0.props,H0);if(F0.items!==!0&&s.items!==void 0)F0.items=X.mergeEvaluated.items(b0,s.items,F0.items,H0)}mergeValidEvaluated(s,H0){let{it:F0,gen:b0}=this;if(F0.opts.unevaluated&&(F0.props!==!0||F0.items!==!0))return b0.if(H0,()=>this.mergeEvaluated(s,G.Name)),!0}};$.KeywordCxt=T0;function _0(s,H0,F0,b0){let i0=new T0(s,F0,H0);if("code"in F0)F0.code(i0,b0);else if(i0.$data&&F0.validate)(0,I.funcKeywordCode)(i0,F0);else if("macro"in F0)(0,I.macroKeywordCode)(i0,F0);else if(F0.compile||F0.validate)(0,I.funcKeywordCode)(i0,F0)}let G0=/^\/(?:[^~]|~0|~1)*$/,f0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function e0(s,{dataLevel:H0,dataNames:F0,dataPathArr:b0}){let i0,n0;if(s==="")return H.default.rootData;if(s[0]==="/"){if(!G0.test(s))throw Error(`Invalid JSON-pointer: ${s}`);i0=s,n0=H.default.rootData}else{let b1=f0.exec(s);if(!b1)throw Error(`Invalid JSON-pointer: ${s}`);let A0=+b1[1];if(i0=b1[2],i0==="#"){if(A0>=H0)throw Error(u1("property/index",A0));return b0[H0-A0]}if(A0>H0)throw Error(u1("data",A0));if(n0=F0[H0-A0],!i0)return n0}let w1=n0,k1=i0.split("/");for(let b1 of k1)if(b1)n0=G._`${n0}${(0,G.getProperty)((0,X.unescapeJsonPointer)(b1))}`,w1=G._`${w1} && ${n0}`;return w1;function u1(b1,A0){return`Cannot access ${b1} ${A0} levels up, current level is ${H0}`}}$.getData=e0}),OH=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});var Y=class extends Error{constructor(z){super("validation failed");this.errors=z,this.ajv=this.validation=!0}};$.default=Y}),bQ=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=iO();var z=class extends Error{constructor(U,Q,J,I){super(I||`can't resolve reference ${J} from id ${Q}`);this.missingRef=(0,Y.resolveUrl)(U,Q,J),this.missingSchema=(0,Y.normalizeId)((0,Y.getFullPath)(U,this.missingRef))}};$.default=z}),nO=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.resolveSchema=$.getCompilingSchema=$.resolveRef=$.compileSchema=$.SchemaEnv=void 0;let Y=F1(),z=OH(),U=Q5(),Q=iO(),J=v1(),I=uQ();var K=class{constructor(O){var N;this.refs={},this.dynamicAnchors={};let M;if(typeof O.schema=="object")M=O.schema;this.schema=O.schema,this.schemaId=O.schemaId,this.root=O.root||this,this.baseId=(N=O.baseId)!==null&&N!==void 0?N:(0,Q.normalizeId)(M===null||M===void 0?void 0:M[O.schemaId||"$id"]),this.schemaPath=O.schemaPath,this.localRefs=O.localRefs,this.meta=O.meta,this.$async=M===null||M===void 0?void 0:M.$async,this.refs={}}};$.SchemaEnv=K;function G(O){let N=X.call(this,O);if(N)return N;let M=(0,Q.getFullPath)(this.opts.uriResolver,O.root.baseId),{es5:D,lines:P}=this.opts.code,{ownProperties:j}=this.opts,A=new Y.CodeGen(this.scope,{es5:D,lines:P,ownProperties:j}),T;if(O.$async)T=A.scopeValue("Error",{ref:z.default,code:Y._`require("ajv/dist/runtime/validation_error").default`});let C=A.scopeName("validate");O.validateName=C;let b={gen:A,allErrors:this.opts.allErrors,data:U.default.data,parentData:U.default.parentData,parentDataProperty:U.default.parentDataProperty,dataNames:[U.default.data],dataPathArr:[Y.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:A.scopeValue("schema",this.opts.code.source===!0?{ref:O.schema,code:(0,Y.stringify)(O.schema)}:{ref:O.schema}),validateName:C,ValidationError:T,schema:O.schema,schemaEnv:O,rootId:M,baseId:O.baseId||M,schemaPath:Y.nil,errSchemaPath:O.schemaPath||(this.opts.jtd?"":"#"),errorPath:Y._`""`,opts:this.opts,self:this},k;try{this._compilations.add(O),(0,I.validateFunctionCode)(b),A.optimize(this.opts.code.optimize);let S=A.toString();if(k=`${A.scopeRefs(U.default.scope)}return ${S}`,this.opts.code.process)k=this.opts.code.process(k,O);let i=Function(`${U.default.self}`,`${U.default.scope}`,k)(this,this.scope.get());if(this.scope.value(C,{ref:i}),i.errors=null,i.schema=O.schema,i.schemaEnv=O,O.$async)i.$async=!0;if(this.opts.code.source===!0)i.source={validateName:C,validateCode:S,scopeValues:A._values};if(this.opts.unevaluated){let{props:n,items:U0}=b;if(i.evaluated={props:n instanceof Y.Name?void 0:n,items:U0 instanceof Y.Name?void 0:U0,dynamicProps:n instanceof Y.Name,dynamicItems:U0 instanceof Y.Name},i.source)i.source.evaluated=(0,Y.stringify)(i.evaluated)}return O.validate=i,O}catch(S){if(delete O.validate,delete O.validateName,k)this.logger.error("Error compiling schema, function code:",k);throw S}finally{this._compilations.delete(O)}}$.compileSchema=G;function H(O,N,M){var D;M=(0,Q.resolveUrl)(this.opts.uriResolver,N,M);let P=O.refs[M];if(P)return P;let j=q.call(this,O,M);if(j===void 0){let A=(D=O.localRefs)===null||D===void 0?void 0:D[M],{schemaId:T}=this.opts;if(A)j=new K({schema:A,schemaId:T,root:O,baseId:N})}if(j===void 0)return;return O.refs[M]=W.call(this,j)}$.resolveRef=H;function W(O){if((0,Q.inlineRef)(O.schema,this.opts.inlineRefs))return O.schema;return O.validate?O:G.call(this,O)}function X(O){for(let N of this._compilations)if(Z(N,O))return N}$.getCompilingSchema=X;function Z(O,N){return O.schema===N.schema&&O.root===N.root&&O.baseId===N.baseId}function q(O,N){let M;while(typeof(M=this.refs[N])=="string")N=M;return M||this.schemas[N]||V.call(this,O,N)}function V(O,N){let M=this.opts.uriResolver.parse(N),D=(0,Q._getFullPath)(this.opts.uriResolver,M),P=(0,Q.getFullPath)(this.opts.uriResolver,O.baseId,void 0);if(Object.keys(O.schema).length>0&&D===P)return w.call(this,M,O);let j=(0,Q.normalizeId)(D),A=this.refs[j]||this.schemas[j];if(typeof A=="string"){let T=V.call(this,O,A);if(typeof(T===null||T===void 0?void 0:T.schema)!=="object")return;return w.call(this,M,T)}if(typeof(A===null||A===void 0?void 0:A.schema)!=="object")return;if(!A.validate)G.call(this,A);if(j===(0,Q.normalizeId)(N)){let{schema:T}=A,{schemaId:C}=this.opts,b=T[C];if(b)P=(0,Q.resolveUrl)(this.opts.uriResolver,P,b);return new K({schema:T,schemaId:C,root:O,baseId:P})}return w.call(this,M,A)}$.resolveSchema=V;let F=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(O,{baseId:N,schema:M,root:D}){var P;if(((P=O.fragment)===null||P===void 0?void 0:P[0])!=="/")return;for(let T of O.fragment.slice(1).split("/")){if(typeof M==="boolean")return;let C=M[(0,J.unescapeFragment)(T)];if(C===void 0)return;M=C;let b=typeof M==="object"&&M[this.opts.schemaId];if(!F.has(T)&&b)N=(0,Q.resolveUrl)(this.opts.uriResolver,N,b)}let j;if(typeof M!="boolean"&&M.$ref&&!(0,J.schemaHasRulesButRef)(M,this.RULES)){let T=(0,Q.resolveUrl)(this.opts.uriResolver,N,M.$ref);j=V.call(this,D,T)}let{schemaId:A}=this.opts;if(j=j||new K({schema:M,schemaId:A,root:D,baseId:N}),j.schema!==j.root.schema)return j}}),Db0=C0(($,Y)=>{Y.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Fe=C0(($,Y)=>{let z=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),U=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function Q(V){let F="",w=0,O=0;for(O=0;O=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";F+=V[O];break}for(O+=1;O=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";F+=V[O]}return F}let J=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function I(V){return V.length=0,!0}function K(V,F,w){if(V.length){let O=Q(V);if(O!=="")F.push(O);else return w.error=!0,!1;V.length=0}return!0}function G(V){let F=0,w={error:!1,address:"",zone:""},O=[],N=[],M=!1,D=!1,P=K;for(let j=0;j7){w.error=!0;break}if(j>0&&V[j-1]===":")M=!0;O.push(":");continue}else if(A==="%"){if(!P(N,O,w))break;P=I}else{N.push(A);continue}}if(N.length)if(P===I)w.zone=N.join("");else if(D)O.push(N.join(""));else O.push(Q(N));return w.address=O.join(""),w}function H(V){if(W(V,":")<2)return{host:V,isIPV6:!1};let F=G(V);if(!F.error){let{address:w,address:O}=F;if(F.zone)w+="%"+F.zone,O+="%25"+F.zone;return{host:w,isIPV6:!0,escapedHost:O}}else return{host:V,isIPV6:!1}}function W(V,F){let w=0;for(let O=0;O{let{isUUID:z}=Fe(),U=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Q=["http","https","ws","wss","urn","urn:uuid"];function J(A){return Q.indexOf(A)!==-1}function I(A){if(A.secure===!0)return!0;else if(A.secure===!1)return!1;else if(A.scheme)return A.scheme.length===3&&(A.scheme[0]==="w"||A.scheme[0]==="W")&&(A.scheme[1]==="s"||A.scheme[1]==="S")&&(A.scheme[2]==="s"||A.scheme[2]==="S");else return!1}function K(A){if(!A.host)A.error=A.error||"HTTP URIs must have a host.";return A}function G(A){let T=String(A.scheme).toLowerCase()==="https";if(A.port===(T?443:80)||A.port==="")A.port=void 0;if(!A.path)A.path="/";return A}function H(A){return A.secure=I(A),A.resourceName=(A.path||"/")+(A.query?"?"+A.query:""),A.path=void 0,A.query=void 0,A}function W(A){if(A.port===(I(A)?443:80)||A.port==="")A.port=void 0;if(typeof A.secure==="boolean")A.scheme=A.secure?"wss":"ws",A.secure=void 0;if(A.resourceName){let[T,C]=A.resourceName.split("?");A.path=T&&T!=="/"?T:void 0,A.query=C,A.resourceName=void 0}return A.fragment=void 0,A}function X(A,T){if(!A.path)return A.error="URN can not be parsed",A;let C=A.path.match(U);if(C){let b=T.scheme||A.scheme||"urn";A.nid=C[1].toLowerCase(),A.nss=C[2];let k=j(`${b}:${T.nid||A.nid}`);if(A.path=void 0,k)A=k.parse(A,T)}else A.error=A.error||"URN can not be parsed.";return A}function Z(A,T){if(A.nid===void 0)throw Error("URN without nid cannot be serialized");let C=T.scheme||A.scheme||"urn",b=A.nid.toLowerCase(),k=j(`${C}:${T.nid||b}`);if(k)A=k.serialize(A,T);let S=A,i=A.nss;return S.path=`${b||T.nid}:${i}`,T.skipEscape=!0,S}function q(A,T){let C=A;if(C.uuid=C.nss,C.nss=void 0,!T.tolerant&&(!C.uuid||!z(C.uuid)))C.error=C.error||"UUID is not valid.";return C}function V(A){let T=A;return T.nss=(A.uuid||"").toLowerCase(),T}let F={scheme:"http",domainHost:!0,parse:K,serialize:G},w={scheme:"https",domainHost:F.domainHost,parse:K,serialize:G},O={scheme:"ws",domainHost:!0,parse:H,serialize:W},N={scheme:"wss",domainHost:O.domainHost,parse:O.parse,serialize:O.serialize},P={http:F,https:w,ws:O,wss:N,urn:{scheme:"urn",parse:X,serialize:Z,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:q,serialize:V,skipNormalize:!0}};Object.setPrototypeOf(P,null);function j(A){return A&&(P[A]||P[A.toLowerCase()])||void 0}Y.exports={wsIsSecure:I,SCHEMES:P,isValidSchemeName:J,getSchemeHandler:j}}),Bb0=C0(($,Y)=>{let{normalizeIPv6:z,removeDotSegments:U,recomposeAuthority:Q,normalizeComponentEncoding:J,isIPv4:I,nonSimpleDomain:K}=Fe(),{SCHEMES:G,getSchemeHandler:H}=Ab0();function W(N,M){if(typeof N==="string")N=V(w(N,M),M);else if(typeof N==="object")N=w(V(N,M),M);return N}function X(N,M,D){let P=D?Object.assign({scheme:"null"},D):{scheme:"null"},j=Z(w(N,P),w(M,P),P,!0);return P.skipEscape=!0,V(j,P)}function Z(N,M,D,P){let j={};if(!P)N=w(V(N,D),D),M=w(V(M,D),D);if(D=D||{},!D.tolerant&&M.scheme)j.scheme=M.scheme,j.userinfo=M.userinfo,j.host=M.host,j.port=M.port,j.path=U(M.path||""),j.query=M.query;else{if(M.userinfo!==void 0||M.host!==void 0||M.port!==void 0)j.userinfo=M.userinfo,j.host=M.host,j.port=M.port,j.path=U(M.path||""),j.query=M.query;else{if(!M.path)if(j.path=N.path,M.query!==void 0)j.query=M.query;else j.query=N.query;else{if(M.path[0]==="/")j.path=U(M.path);else{if((N.userinfo!==void 0||N.host!==void 0||N.port!==void 0)&&!N.path)j.path="/"+M.path;else if(!N.path)j.path=M.path;else j.path=N.path.slice(0,N.path.lastIndexOf("/")+1)+M.path;j.path=U(j.path)}j.query=M.query}j.userinfo=N.userinfo,j.host=N.host,j.port=N.port}j.scheme=N.scheme}return j.fragment=M.fragment,j}function q(N,M,D){if(typeof N==="string")N=unescape(N),N=V(J(w(N,D),!0),{...D,skipEscape:!0});else if(typeof N==="object")N=V(J(N,!0),{...D,skipEscape:!0});if(typeof M==="string")M=unescape(M),M=V(J(w(M,D),!0),{...D,skipEscape:!0});else if(typeof M==="object")M=V(J(M,!0),{...D,skipEscape:!0});return N.toLowerCase()===M.toLowerCase()}function V(N,M){let D={host:N.host,scheme:N.scheme,userinfo:N.userinfo,port:N.port,path:N.path,query:N.query,nid:N.nid,nss:N.nss,uuid:N.uuid,fragment:N.fragment,reference:N.reference,resourceName:N.resourceName,secure:N.secure,error:""},P=Object.assign({},M),j=[],A=H(P.scheme||D.scheme);if(A&&A.serialize)A.serialize(D,P);if(D.path!==void 0)if(!P.skipEscape){if(D.path=escape(D.path),D.scheme!==void 0)D.path=D.path.split("%3A").join(":")}else D.path=unescape(D.path);if(P.reference!=="suffix"&&D.scheme)j.push(D.scheme,":");let T=Q(D);if(T!==void 0){if(P.reference!=="suffix")j.push("//");if(j.push(T),D.path&&D.path[0]!=="/")j.push("/")}if(D.path!==void 0){let C=D.path;if(!P.absolutePath&&(!A||!A.absolutePath))C=U(C);if(T===void 0&&C[0]==="/"&&C[1]==="/")C="/%2F"+C.slice(2);j.push(C)}if(D.query!==void 0)j.push("?",D.query);if(D.fragment!==void 0)j.push("#",D.fragment);return j.join("")}let F=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(N,M){let D=Object.assign({},M),P={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},j=!1;if(D.reference==="suffix")if(D.scheme)N=D.scheme+":"+N;else N="//"+N;let A=N.match(F);if(A){if(P.scheme=A[1],P.userinfo=A[3],P.host=A[4],P.port=parseInt(A[5],10),P.path=A[6]||"",P.query=A[7],P.fragment=A[8],isNaN(P.port))P.port=A[5];if(P.host)if(I(P.host)===!1){let C=z(P.host);P.host=C.host.toLowerCase(),j=C.isIPV6}else j=!0;if(P.scheme===void 0&&P.userinfo===void 0&&P.host===void 0&&P.port===void 0&&P.query===void 0&&!P.path)P.reference="same-document";else if(P.scheme===void 0)P.reference="relative";else if(P.fragment===void 0)P.reference="absolute";else P.reference="uri";if(D.reference&&D.reference!=="suffix"&&D.reference!==P.reference)P.error=P.error||"URI is not a "+D.reference+" reference.";let T=H(D.scheme||P.scheme);if(!D.unicodeSupport&&(!T||!T.unicodeSupport)){if(P.host&&(D.domainHost||T&&T.domainHost)&&j===!1&&K(P.host))try{P.host=URL.domainToASCII(P.host.toLowerCase())}catch(C){P.error=P.error||"Host's domain name can not be converted to ASCII: "+C}}if(!T||T&&!T.skipNormalize){if(N.indexOf("%")!==-1){if(P.scheme!==void 0)P.scheme=unescape(P.scheme);if(P.host!==void 0)P.host=unescape(P.host)}if(P.path)P.path=escape(unescape(P.path));if(P.fragment)P.fragment=encodeURI(decodeURIComponent(P.fragment))}if(T&&T.parse)T.parse(P,D)}else P.error=P.error||"URI can not be parsed.";return P}let O={SCHEMES:G,normalize:W,resolve:X,resolveComponent:Z,equal:q,serialize:V,parse:w};Y.exports=O,Y.exports.default=O,Y.exports.fastUri=O}),Pb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Bb0();Y.code='require("ajv/dist/runtime/uri").default',$.default=Y}),wS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=void 0;var Y=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return Y.KeywordCxt}});var z=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return z._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return z.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return z.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return z.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return z.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return z.CodeGen}});let U=OH(),Q=bQ(),J=qe(),I=nO(),K=F1(),G=iO(),H=uO(),W=v1(),X=Db0(),Z=Pb0(),q=(g,p)=>new RegExp(g,p);q.code="new RegExp";let V=["removeAdditional","useDefaults","coerceTypes"],F=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},O={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},N=200;function M(g){var p,Y0,y,r,$0,N0,T0,_0,G0,f0,e0,s,H0,F0,b0,i0,n0,w1,k1,u1,b1,A0,Q0,B,v;let u=g.strict,a=(p=g.code)===null||p===void 0?void 0:p.optimize,X0=a===!0||a===void 0?1:a||0,J0=(y=(Y0=g.code)===null||Y0===void 0?void 0:Y0.regExp)!==null&&y!==void 0?y:q,q0=(r=g.uriResolver)!==null&&r!==void 0?r:Z.default;return{strictSchema:(N0=($0=g.strictSchema)!==null&&$0!==void 0?$0:u)!==null&&N0!==void 0?N0:!0,strictNumbers:(_0=(T0=g.strictNumbers)!==null&&T0!==void 0?T0:u)!==null&&_0!==void 0?_0:!0,strictTypes:(f0=(G0=g.strictTypes)!==null&&G0!==void 0?G0:u)!==null&&f0!==void 0?f0:"log",strictTuples:(s=(e0=g.strictTuples)!==null&&e0!==void 0?e0:u)!==null&&s!==void 0?s:"log",strictRequired:(F0=(H0=g.strictRequired)!==null&&H0!==void 0?H0:u)!==null&&F0!==void 0?F0:!1,code:g.code?{...g.code,optimize:X0,regExp:J0}:{optimize:X0,regExp:J0},loopRequired:(b0=g.loopRequired)!==null&&b0!==void 0?b0:N,loopEnum:(i0=g.loopEnum)!==null&&i0!==void 0?i0:N,meta:(n0=g.meta)!==null&&n0!==void 0?n0:!0,messages:(w1=g.messages)!==null&&w1!==void 0?w1:!0,inlineRefs:(k1=g.inlineRefs)!==null&&k1!==void 0?k1:!0,schemaId:(u1=g.schemaId)!==null&&u1!==void 0?u1:"$id",addUsedSchema:(b1=g.addUsedSchema)!==null&&b1!==void 0?b1:!0,validateSchema:(A0=g.validateSchema)!==null&&A0!==void 0?A0:!0,validateFormats:(Q0=g.validateFormats)!==null&&Q0!==void 0?Q0:!0,unicodeRegExp:(B=g.unicodeRegExp)!==null&&B!==void 0?B:!0,int32range:(v=g.int32range)!==null&&v!==void 0?v:!0,uriResolver:q0}}var D=class{constructor(g={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,g=this.opts={...g,...M(g)};let{es5:p,lines:Y0}=this.opts.code;this.scope=new K.ValueScope({scope:{},prefixes:F,es5:p,lines:Y0}),this.logger=S(g.logger);let y=g.validateFormats;if(g.validateFormats=!1,this.RULES=(0,J.getRules)(),P.call(this,w,g,"NOT SUPPORTED"),P.call(this,O,g,"DEPRECATED","warn"),this._metaOpts=b.call(this),g.formats)T.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),g.keywords)C.call(this,g.keywords);if(typeof g.meta=="object")this.addMetaSchema(g.meta);A.call(this),g.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:g,meta:p,schemaId:Y0}=this.opts,y=X;if(Y0==="id")y={...X},y.id=y.$id,delete y.$id;if(p&&g)this.addMetaSchema(y,y[Y0],!1)}defaultMeta(){let{meta:g,schemaId:p}=this.opts;return this.opts.defaultMeta=typeof g=="object"?g[p]||g:void 0}validate(g,p){let Y0;if(typeof g=="string"){if(Y0=this.getSchema(g),!Y0)throw Error(`no schema with key or ref "${g}"`)}else Y0=this.compile(g);let y=Y0(p);if(!("$async"in Y0))this.errors=Y0.errors;return y}compile(g,p){let Y0=this._addSchema(g,p);return Y0.validate||this._compileSchemaEnv(Y0)}compileAsync(g,p){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:Y0}=this.opts;return y.call(this,g,p);async function y(G0,f0){await r.call(this,G0.$schema);let e0=this._addSchema(G0,f0);return e0.validate||$0.call(this,e0)}async function r(G0){if(G0&&!this.getSchema(G0))await y.call(this,{$ref:G0},!0)}async function $0(G0){try{return this._compileSchemaEnv(G0)}catch(f0){if(!(f0 instanceof Q.default))throw f0;return N0.call(this,f0),await T0.call(this,f0.missingSchema),$0.call(this,G0)}}function N0({missingSchema:G0,missingRef:f0}){if(this.refs[G0])throw Error(`AnySchema ${G0} is loaded but ${f0} cannot be resolved`)}async function T0(G0){let f0=await _0.call(this,G0);if(!this.refs[G0])await r.call(this,f0.$schema);if(!this.refs[G0])this.addSchema(f0,G0,p)}async function _0(G0){let f0=this._loading[G0];if(f0)return f0;try{return await(this._loading[G0]=Y0(G0))}finally{delete this._loading[G0]}}}addSchema(g,p,Y0,y=this.opts.validateSchema){if(Array.isArray(g)){for(let $0 of g)this.addSchema($0,void 0,Y0,y);return this}let r;if(typeof g==="object"){let{schemaId:$0}=this.opts;if(r=g[$0],r!==void 0&&typeof r!="string")throw Error(`schema ${$0} must be string`)}return p=(0,G.normalizeId)(p||r),this._checkUnique(p),this.schemas[p]=this._addSchema(g,Y0,p,y,!0),this}addMetaSchema(g,p,Y0=this.opts.validateSchema){return this.addSchema(g,p,!0,Y0),this}validateSchema(g,p){if(typeof g=="boolean")return!0;let Y0;if(Y0=g.$schema,Y0!==void 0&&typeof Y0!="string")throw Error("$schema must be a string");if(Y0=Y0||this.opts.defaultMeta||this.defaultMeta(),!Y0)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let y=this.validate(Y0,g);if(!y&&p){let r="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(r);else throw Error(r)}return y}getSchema(g){let p;while(typeof(p=j.call(this,g))=="string")g=p;if(p===void 0){let{schemaId:Y0}=this.opts,y=new I.SchemaEnv({schema:{},schemaId:Y0});if(p=I.resolveSchema.call(this,y,g),!p)return;this.refs[g]=p}return p.validate||this._compileSchemaEnv(p)}removeSchema(g){if(g instanceof RegExp)return this._removeAllSchemas(this.schemas,g),this._removeAllSchemas(this.refs,g),this;switch(typeof g){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let p=j.call(this,g);if(typeof p=="object")this._cache.delete(p.schema);return delete this.schemas[g],delete this.refs[g],this}case"object":{let p=g;this._cache.delete(p);let Y0=g[this.opts.schemaId];if(Y0)Y0=(0,G.normalizeId)(Y0),delete this.schemas[Y0],delete this.refs[Y0];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(g){for(let p of g)this.addKeyword(p);return this}addKeyword(g,p){let Y0;if(typeof g=="string"){if(Y0=g,typeof p=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),p.keyword=Y0}else if(typeof g=="object"&&p===void 0){if(p=g,Y0=p.keyword,Array.isArray(Y0)&&!Y0.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(n.call(this,Y0,p),!p)return(0,W.eachItem)(Y0,(r)=>U0.call(this,r)),this;d.call(this,p);let y={...p,type:(0,H.getJSONTypes)(p.type),schemaType:(0,H.getJSONTypes)(p.schemaType)};return(0,W.eachItem)(Y0,y.type.length===0?(r)=>U0.call(this,r,y):(r)=>y.type.forEach(($0)=>U0.call(this,r,y,$0))),this}getKeyword(g){let p=this.RULES.all[g];return typeof p=="object"?p.definition:!!p}removeKeyword(g){let{RULES:p}=this;delete p.keywords[g],delete p.all[g];for(let Y0 of p.rules){let y=Y0.rules.findIndex((r)=>r.keyword===g);if(y>=0)Y0.rules.splice(y,1)}return this}addFormat(g,p){if(typeof p=="string")p=new RegExp(p);return this.formats[g]=p,this}errorsText(g=this.errors,{separator:p=", ",dataVar:Y0="data"}={}){if(!g||g.length===0)return"No errors";return g.map((y)=>`${Y0}${y.instancePath} ${y.message}`).reduce((y,r)=>y+p+r)}$dataMetaSchema(g,p){let Y0=this.RULES.all;g=JSON.parse(JSON.stringify(g));for(let y of p){let r=y.split("/").slice(1),$0=g;for(let N0 of r)$0=$0[N0];for(let N0 in Y0){let T0=Y0[N0];if(typeof T0!="object")continue;let{$data:_0}=T0.definition,G0=$0[N0];if(_0&&G0)$0[N0]=e(G0)}}return g}_removeAllSchemas(g,p){for(let Y0 in g){let y=g[Y0];if(!p||p.test(Y0)){if(typeof y=="string")delete g[Y0];else if(y&&!y.meta)this._cache.delete(y.schema),delete g[Y0]}}}_addSchema(g,p,Y0,y=this.opts.validateSchema,r=this.opts.addUsedSchema){let $0,{schemaId:N0}=this.opts;if(typeof g=="object")$0=g[N0];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof g!="boolean")throw Error("schema must be object or boolean");let T0=this._cache.get(g);if(T0!==void 0)return T0;Y0=(0,G.normalizeId)($0||Y0);let _0=G.getSchemaRefs.call(this,g,Y0);if(T0=new I.SchemaEnv({schema:g,schemaId:N0,meta:p,baseId:Y0,localRefs:_0}),this._cache.set(T0.schema,T0),r&&!Y0.startsWith("#")){if(Y0)this._checkUnique(Y0);this.refs[Y0]=T0}if(y)this.validateSchema(g,!0);return T0}_checkUnique(g){if(this.schemas[g]||this.refs[g])throw Error(`schema with key or id "${g}" already exists`)}_compileSchemaEnv(g){if(g.meta)this._compileMetaSchema(g);else I.compileSchema.call(this,g);if(!g.validate)throw Error("ajv implementation error");return g.validate}_compileMetaSchema(g){let p=this.opts;this.opts=this._metaOpts;try{I.compileSchema.call(this,g)}finally{this.opts=p}}};D.ValidationError=U.default,D.MissingRefError=Q.default,$.default=D;function P(g,p,Y0,y="error"){for(let r in g){let $0=r;if($0 in p)this.logger[y](`${Y0}: option ${r}. ${g[$0]}`)}}function j(g){return g=(0,G.normalizeId)(g),this.schemas[g]||this.refs[g]}function A(){let g=this.opts.schemas;if(!g)return;if(Array.isArray(g))this.addSchema(g);else for(let p in g)this.addSchema(g[p],p)}function T(){for(let g in this.opts.formats){let p=this.opts.formats[g];if(p)this.addFormat(g,p)}}function C(g){if(Array.isArray(g)){this.addVocabulary(g);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let p in g){let Y0=g[p];if(!Y0.keyword)Y0.keyword=p;this.addKeyword(Y0)}}function b(){let g={...this.opts};for(let p of V)delete g[p];return g}let k={log(){},warn(){},error(){}};function S(g){if(g===!1)return k;if(g===void 0)return console;if(g.log&&g.warn&&g.error)return g;throw Error("logger must implement log, warn and error methods")}let i=/^[a-z_$][a-z0-9_$:-]*$/i;function n(g,p){let{RULES:Y0}=this;if((0,W.eachItem)(g,(y)=>{if(Y0.keywords[y])throw Error(`Keyword ${y} is already defined`);if(!i.test(y))throw Error(`Keyword ${y} has invalid name`)}),!p)return;if(p.$data&&!(("code"in p)||("validate"in p)))throw Error('$data keyword must have "code" or "validate" function')}function U0(g,p,Y0){var y;let r=p===null||p===void 0?void 0:p.post;if(Y0&&r)throw Error('keyword with "post" flag cannot have "type"');let{RULES:$0}=this,N0=r?$0.post:$0.rules.find(({type:_0})=>_0===Y0);if(!N0)N0={type:Y0,rules:[]},$0.rules.push(N0);if($0.keywords[g]=!0,!p)return;let T0={keyword:g,definition:{...p,type:(0,H.getJSONTypes)(p.type),schemaType:(0,H.getJSONTypes)(p.schemaType)}};if(p.before)x.call(this,N0,T0,p.before);else N0.rules.push(T0);$0.all[g]=T0,(y=p.implements)===null||y===void 0||y.forEach((_0)=>this.addKeyword(_0))}function x(g,p,Y0){let y=g.rules.findIndex((r)=>r.keyword===Y0);if(y>=0)g.rules.splice(y,0,p);else g.rules.push(p),this.logger.warn(`rule ${Y0} is not defined`)}function d(g){let{metaSchema:p}=g;if(p===void 0)return;if(g.$data&&this.opts.$data)p=e(p);g.validateSchema=this.compile(p,!0)}let t={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function e(g){return{anyOf:[g,t]}}}),jb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};$.default=Y}),MS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.callRef=$.getValidate=void 0;let Y=bQ(),z=J5(),U=F1(),Q=Q5(),J=nO(),I=v1(),K={keyword:"$ref",schemaType:"string",code(W){let{gen:X,schema:Z,it:q}=W,{baseId:V,schemaEnv:F,validateName:w,opts:O,self:N}=q,{root:M}=F;if((Z==="#"||Z==="#/")&&V===M.baseId)return P();let D=J.resolveRef.call(N,M,V,Z);if(D===void 0)throw new Y.default(q.opts.uriResolver,V,Z);if(D instanceof J.SchemaEnv)return j(D);return A(D);function P(){if(F===M)return H(W,w,F,F.$async);let T=X.scopeValue("root",{ref:M});return H(W,U._`${T}.validate`,M,M.$async)}function j(T){H(W,G(W,T),T,T.$async)}function A(T){let C=X.scopeValue("schema",O.code.source===!0?{ref:T,code:(0,U.stringify)(T)}:{ref:T}),b=X.name("valid"),k=W.subschema({schema:T,dataTypes:[],schemaPath:U.nil,topSchemaRef:C,errSchemaPath:Z},b);W.mergeEvaluated(k),W.ok(b)}}};function G(W,X){let{gen:Z}=W;return X.validate?Z.scopeValue("validate",{ref:X.validate}):U._`${Z.scopeValue("wrapper",{ref:X})}.validate`}$.getValidate=G;function H(W,X,Z,q){let{gen:V,it:F}=W,{allErrors:w,schemaEnv:O,opts:N}=F,M=N.passContext?Q.default.this:U.nil;if(q)D();else P();function D(){if(!O.$async)throw Error("async schema referenced by sync schema");let T=V.let("valid");V.try(()=>{if(V.code(U._`await ${(0,z.callValidateCode)(W,X,M)}`),A(X),!w)V.assign(T,!0)},(C)=>{if(V.if(U._`!(${C} instanceof ${F.ValidationError})`,()=>V.throw(C)),j(C),!w)V.assign(T,!1)}),W.ok(T)}function P(){W.result((0,z.callValidateCode)(W,X,M),()=>A(X),()=>j(X))}function j(T){let C=U._`${T}.errors`;V.assign(Q.default.vErrors,U._`${Q.default.vErrors} === null ? ${C} : ${Q.default.vErrors}.concat(${C})`),V.assign(Q.default.errors,U._`${Q.default.vErrors}.length`)}function A(T){var C;if(!F.opts.unevaluated)return;let b=(C=Z===null||Z===void 0?void 0:Z.validate)===null||C===void 0?void 0:C.evaluated;if(F.props!==!0)if(b&&!b.dynamicProps){if(b.props!==void 0)F.props=I.mergeEvaluated.props(V,b.props,F.props)}else{let k=V.var("props",U._`${T}.evaluated.props`);F.props=I.mergeEvaluated.props(V,k,F.props,U.Name)}if(F.items!==!0)if(b&&!b.dynamicItems){if(b.items!==void 0)F.items=I.mergeEvaluated.items(V,b.items,F.items)}else{let k=V.var("items",U._`${T}.evaluated.items`);F.items=I.mergeEvaluated.items(V,k,F.items,U.Name)}}}$.callRef=H,$.default=K}),Oe=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=jb0(),z=MS(),U=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Y.default,z.default];$.default=U}),Tb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=Y.operators,U={maximum:{okStr:"<=",ok:z.LTE,fail:z.GT},minimum:{okStr:">=",ok:z.GTE,fail:z.LT},exclusiveMaximum:{okStr:"<",ok:z.LT,fail:z.GTE},exclusiveMinimum:{okStr:">",ok:z.GT,fail:z.LTE}},Q={keyword:Object.keys(U),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:J,schemaCode:I})=>Y.str`must be ${U[J].okStr} ${I}`,params:({keyword:J,schemaCode:I})=>Y._`{comparison: ${U[J].okStr}, limit: ${I}}`},code(J){let{keyword:I,data:K,schemaCode:G}=J;J.fail$data(Y._`${K} ${U[I].fail} ${G} || isNaN(${K})`)}};$.default=Q}),Eb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:U})=>Y.str`must be multiple of ${U}`,params:({schemaCode:U})=>Y._`{multipleOf: ${U}}`},code(U){let{gen:Q,data:J,schemaCode:I,it:K}=U,G=K.opts.multipleOfPrecision,H=Q.let("res"),W=G?Y._`Math.abs(Math.round(${H}) - ${H}) > 1e-${G}`:Y._`${H} !== parseInt(${H})`;U.fail$data(Y._`(${I} === 0 || (${H} = ${J}/${I}, ${W}))`)}};$.default=z}),Cb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});function Y(z){let U=z.length,Q=0,J=0,I;while(J=55296&&I<=56319&&J{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=Cb0(),Q={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:J,schemaCode:I}){let K=J==="maxLength"?"more":"fewer";return Y.str`must NOT have ${K} than ${I} characters`},params:({schemaCode:J})=>Y._`{limit: ${J}}`},code(J){let{keyword:I,data:K,schemaCode:G,it:H}=J,W=I==="maxLength"?Y.operators.GT:Y.operators.LT,X=H.opts.unicode===!1?Y._`${K}.length`:Y._`${(0,z.useFunc)(J.gen,U.default)}(${K})`;J.fail$data(Y._`${X} ${W} ${G}`)}};$.default=Q}),_b0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=v1(),U=F1(),Q={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:J})=>U.str`must match pattern "${J}"`,params:({schemaCode:J})=>U._`{pattern: ${J}}`},code(J){let{gen:I,data:K,$data:G,schema:H,schemaCode:W,it:X}=J,Z=X.opts.unicodeRegExp?"u":"";if(G){let{regExp:q}=X.opts.code,V=q.code==="new RegExp"?U._`new RegExp`:(0,z.useFunc)(I,q),F=I.let("valid");I.try(()=>I.assign(F,U._`${V}(${W}, ${Z}).test(${K})`),()=>I.assign(F,!1)),J.fail$data(U._`!${F}`)}else{let q=(0,Y.usePattern)(J,H);J.fail$data(U._`!${q}.test(${K})`)}}};$.default=Q}),vb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:U,schemaCode:Q}){let J=U==="maxProperties"?"more":"fewer";return Y.str`must NOT have ${J} than ${Q} properties`},params:({schemaCode:U})=>Y._`{limit: ${U}}`},code(U){let{keyword:Q,data:J,schemaCode:I}=U,K=Q==="maxProperties"?Y.operators.GT:Y.operators.LT;U.fail$data(Y._`Object.keys(${J}).length ${K} ${I}`)}};$.default=z}),hb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=F1(),U=v1(),Q={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:J}})=>z.str`must have required property '${J}'`,params:({params:{missingProperty:J}})=>z._`{missingProperty: ${J}}`},code(J){let{gen:I,schema:K,schemaCode:G,data:H,$data:W,it:X}=J,{opts:Z}=X;if(!W&&K.length===0)return;let q=K.length>=Z.loopRequired;if(X.allErrors)V();else F();if(Z.strictRequired){let N=J.parentSchema.properties,{definedProperties:M}=J.it;for(let D of K)if((N===null||N===void 0?void 0:N[D])===void 0&&!M.has(D)){let P=`required property "${D}" is not defined at "${X.schemaEnv.baseId+X.errSchemaPath}" (strictRequired)`;(0,U.checkStrictMode)(X,P,X.opts.strictRequired)}}function V(){if(q||W)J.block$data(z.nil,w);else for(let N of K)(0,Y.checkReportMissingProp)(J,N)}function F(){let N=I.let("missing");if(q||W){let M=I.let("valid",!0);J.block$data(M,()=>O(N,M)),J.ok(M)}else I.if((0,Y.checkMissingProp)(J,K,N)),(0,Y.reportMissingProp)(J,N),I.else()}function w(){I.forOf("prop",G,(N)=>{J.setParams({missingProperty:N}),I.if((0,Y.noPropertyInData)(I,H,N,Z.ownProperties),()=>J.error())})}function O(N,M){J.setParams({missingProperty:N}),I.forOf(N,G,()=>{I.assign(M,(0,Y.propertyInData)(I,H,N,Z.ownProperties)),I.if((0,z.not)(M),()=>{J.error(),I.break()})},z.nil)}}};$.default=Q}),Sb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:U,schemaCode:Q}){let J=U==="maxItems"?"more":"fewer";return Y.str`must NOT have ${J} than ${Q} items`},params:({schemaCode:U})=>Y._`{limit: ${U}}`},code(U){let{keyword:Q,data:J,schemaCode:I}=U,K=Q==="maxItems"?Y.operators.GT:Y.operators.LT;U.fail$data(Y._`${J}.length ${K} ${I}`)}};$.default=z}),NS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Le();Y.code='require("ajv/dist/runtime/equal").default',$.default=Y}),gb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=uO(),z=F1(),U=v1(),Q=NS(),J={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:I,j:K}})=>z.str`must NOT have duplicate items (items ## ${K} and ${I} are identical)`,params:({params:{i:I,j:K}})=>z._`{i: ${I}, j: ${K}}`},code(I){let{gen:K,data:G,$data:H,schema:W,parentSchema:X,schemaCode:Z,it:q}=I;if(!H&&!W)return;let V=K.let("valid"),F=X.items?(0,Y.getSchemaTypes)(X.items):[];I.block$data(V,w,z._`${Z} === false`),I.ok(V);function w(){let D=K.let("i",z._`${G}.length`),P=K.let("j");I.setParams({i:D,j:P}),K.assign(V,!0),K.if(z._`${D} > 1`,()=>(O()?N:M)(D,P))}function O(){return F.length>0&&!F.some((D)=>D==="object"||D==="array")}function N(D,P){let j=K.name("item"),A=(0,Y.checkDataTypes)(F,j,q.opts.strictNumbers,Y.DataType.Wrong),T=K.const("indices",z._`{}`);K.for(z._`;${D}--;`,()=>{if(K.let(j,z._`${G}[${D}]`),K.if(A,z._`continue`),F.length>1)K.if(z._`typeof ${j} == "string"`,z._`${j} += "_"`);K.if(z._`typeof ${T}[${j}] == "number"`,()=>{K.assign(P,z._`${T}[${j}]`),I.error(),K.assign(V,!1).break()}).code(z._`${T}[${j}] = ${D}`)})}function M(D,P){let j=(0,U.useFunc)(K,Q.default),A=K.name("outer");K.label(A).for(z._`;${D}--;`,()=>K.for(z._`${P} = ${D}; ${P}--;`,()=>K.if(z._`${j}(${G}[${D}], ${G}[${P}])`,()=>{I.error(),K.assign(V,!1).break(A)})))}}};$.default=J}),yb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=NS(),Q={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:J})=>Y._`{allowedValue: ${J}}`},code(J){let{gen:I,data:K,$data:G,schemaCode:H,schema:W}=J;if(G||W&&typeof W=="object")J.fail$data(Y._`!${(0,z.useFunc)(I,U.default)}(${K}, ${H})`);else J.fail(Y._`${W} !== ${K}`)}};$.default=Q}),kb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=NS(),Q={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:J})=>Y._`{allowedValues: ${J}}`},code(J){let{gen:I,data:K,$data:G,schema:H,schemaCode:W,it:X}=J;if(!G&&H.length===0)throw Error("enum must have non-empty array");let Z=H.length>=X.opts.loopEnum,q,V=()=>q!==null&&q!==void 0?q:q=(0,z.useFunc)(I,U.default),F;if(Z||G)F=I.let("valid"),J.block$data(F,w);else{if(!Array.isArray(H))throw Error("ajv implementation error");let N=I.const("vSchema",W);F=(0,Y.or)(...H.map((M,D)=>O(N,D)))}J.pass(F);function w(){I.assign(F,!1),I.forOf("v",W,(N)=>I.if(Y._`${V()}(${K}, ${N})`,()=>I.assign(F,!0).break()))}function O(N,M){let D=H[M];return typeof D==="object"&&D!==null?Y._`${V()}(${K}, ${N}[${M}])`:Y._`${K} === ${D}`}}};$.default=Q}),we=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Tb0(),z=Eb0(),U=Rb0(),Q=_b0(),J=vb0(),I=hb0(),K=Sb0(),G=gb0(),H=yb0(),W=kb0(),X=[Y.default,z.default,U.default,Q.default,J.default,I.default,K.default,G.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},H.default,W.default];$.default=X}),Me=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateAdditionalItems=void 0;let Y=F1(),z=v1(),U={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:J}})=>Y.str`must NOT have more than ${J} items`,params:({params:{len:J}})=>Y._`{limit: ${J}}`},code(J){let{parentSchema:I,it:K}=J,{items:G}=I;if(!Array.isArray(G)){(0,z.checkStrictMode)(K,'"additionalItems" is ignored when "items" is not an array of schemas');return}Q(J,G)}};function Q(J,I){let{gen:K,schema:G,data:H,keyword:W,it:X}=J;X.items=!0;let Z=K.const("len",Y._`${H}.length`);if(G===!1)J.setParams({len:I.length}),J.pass(Y._`${Z} <= ${I.length}`);else if(typeof G=="object"&&!(0,z.alwaysValidSchema)(X,G)){let V=K.var("valid",Y._`${Z} <= ${I.length}`);K.if((0,Y.not)(V),()=>q(V)),J.ok(V)}function q(V){K.forRange("i",I.length,Z,(F)=>{if(J.subschema({keyword:W,dataProp:F,dataPropType:z.Type.Num},V),!X.allErrors)K.if((0,Y.not)(V),()=>K.break())})}}$.validateAdditionalItems=Q,$.default=U}),Ne=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateTuple=void 0;let Y=F1(),z=v1(),U=J5(),Q={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(I){let{schema:K,it:G}=I;if(Array.isArray(K))return J(I,"additionalItems",K);if(G.items=!0,(0,z.alwaysValidSchema)(G,K))return;I.ok((0,U.validateArray)(I))}};function J(I,K,G=I.schema){let{gen:H,parentSchema:W,data:X,keyword:Z,it:q}=I;if(w(W),q.opts.unevaluated&&G.length&&q.items!==!0)q.items=z.mergeEvaluated.items(H,G.length,q.items);let V=H.name("valid"),F=H.const("len",Y._`${X}.length`);G.forEach((O,N)=>{if((0,z.alwaysValidSchema)(q,O))return;H.if(Y._`${F} > ${N}`,()=>I.subschema({keyword:Z,schemaProp:N,dataProp:N},V)),I.ok(V)});function w(O){let{opts:N,errSchemaPath:M}=q,D=G.length,P=D===O.minItems&&(D===O.maxItems||O[K]===!1);if(N.strictTuples&&!P){let j=`"${Z}" is ${D}-tuple, but minItems or maxItems/${K} are not specified or different at path "${M}"`;(0,z.checkStrictMode)(q,j,N.strictTuples)}}}$.validateTuple=J,$.default=Q}),xb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ne(),z={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(U)=>(0,Y.validateTuple)(U,"items")};$.default=z}),fb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=J5(),Q=Me(),J={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:I}})=>Y.str`must NOT have more than ${I} items`,params:({params:{len:I}})=>Y._`{limit: ${I}}`},code(I){let{schema:K,parentSchema:G,it:H}=I,{prefixItems:W}=G;if(H.items=!0,(0,z.alwaysValidSchema)(H,K))return;if(W)(0,Q.validateAdditionalItems)(I,W);else I.ok((0,U.validateArray)(I))}};$.default=J}),ub0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:Q,max:J}})=>J===void 0?Y.str`must contain at least ${Q} valid item(s)`:Y.str`must contain at least ${Q} and no more than ${J} valid item(s)`,params:({params:{min:Q,max:J}})=>J===void 0?Y._`{minContains: ${Q}}`:Y._`{minContains: ${Q}, maxContains: ${J}}`},code(Q){let{gen:J,schema:I,parentSchema:K,data:G,it:H}=Q,W,X,{minContains:Z,maxContains:q}=K;if(H.opts.next)W=Z===void 0?1:Z,X=q;else W=1;let V=J.const("len",Y._`${G}.length`);if(Q.setParams({min:W,max:X}),X===void 0&&W===0){(0,z.checkStrictMode)(H,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(X!==void 0&&W>X){(0,z.checkStrictMode)(H,'"minContains" > "maxContains" is always invalid'),Q.fail();return}if((0,z.alwaysValidSchema)(H,I)){let M=Y._`${V} >= ${W}`;if(X!==void 0)M=Y._`${M} && ${V} <= ${X}`;Q.pass(M);return}H.items=!0;let F=J.name("valid");if(X===void 0&&W===1)O(F,()=>J.if(F,()=>J.break()));else if(W===0){if(J.let(F,!0),X!==void 0)J.if(Y._`${G}.length > 0`,w)}else J.let(F,!1),w();Q.result(F,()=>Q.reset());function w(){let M=J.name("_valid"),D=J.let("count",0);O(M,()=>J.if(M,()=>N(D)))}function O(M,D){J.forRange("i",0,V,(P)=>{Q.subschema({keyword:"contains",dataProp:P,dataPropType:z.Type.Num,compositeRule:!0},M),D()})}function N(M){if(J.code(Y._`${M}++`),X===void 0)J.if(Y._`${M} >= ${W}`,()=>J.assign(F,!0).break());else if(J.if(Y._`${M} > ${X}`,()=>J.assign(F,!1).break()),W===1)J.assign(F,!0);else J.if(Y._`${M} >= ${W}`,()=>J.assign(F,!0))}}};$.default=U}),DS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateSchemaDeps=$.validatePropertyDeps=$.error=void 0;let Y=F1(),z=v1(),U=J5();$.error={message:({params:{property:G,depsCount:H,deps:W}})=>{let X=H===1?"property":"properties";return Y.str`must have ${X} ${W} when property ${G} is present`},params:({params:{property:G,depsCount:H,deps:W,missingProperty:X}})=>Y._`{property: ${G}, missingProperty: ${X}, depsCount: ${H}, - deps: ${W}}`};let Q={keyword:"dependencies",type:"object",schemaType:"object",error:$.error,code(G){let[H,W]=J(G);I(G,H),K(G,W)}};function J({schema:G}){let H={},W={};for(let X in G){if(X==="__proto__")continue;let Z=Array.isArray(G[X])?H:W;Z[X]=G[X]}return[H,W]}function I(G,H=G.schema){let{gen:W,data:X,it:Z}=G;if(Object.keys(H).length===0)return;let q=W.let("missing");for(let V in H){let F=H[V];if(F.length===0)continue;let w=(0,U.propertyInData)(W,X,V,Z.opts.ownProperties);if(G.setParams({property:V,depsCount:F.length,deps:F.join(", ")}),Z.allErrors)W.if(w,()=>{for(let O of F)(0,U.checkReportMissingProp)(G,O)});else W.if(Y._`${w} && (${(0,U.checkMissingProp)(G,F,q)})`),(0,U.reportMissingProp)(G,q),W.else()}}$.validatePropertyDeps=I;function K(G,H=G.schema){let{gen:W,data:X,keyword:Z,it:q}=G,V=W.name("valid");for(let F in H){if((0,z.alwaysValidSchema)(q,H[F]))continue;W.if((0,U.propertyInData)(W,X,F,q.opts.ownProperties),()=>{let w=G.subschema({keyword:Z,schemaProp:F},V);G.mergeValidEvaluated(w,V)},()=>W.var(V,!0)),G.ok(V)}}$.validateSchemaDeps=K,$.default=Q}),bb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:Q})=>Y._`{propertyName: ${Q.propertyName}}`},code(Q){let{gen:J,schema:I,data:K,it:G}=Q;if((0,z.alwaysValidSchema)(G,I))return;let H=J.name("valid");J.forIn("key",K,(W)=>{Q.setParams({propertyName:W}),Q.subschema({keyword:"propertyNames",data:W,dataTypes:["string"],propertyName:W,compositeRule:!0},H),J.if((0,Y.not)(H),()=>{if(Q.error(!0),!G.allErrors)J.break()})}),Q.ok(H)}};$.default=U}),De=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=F1(),U=Q5(),Q=v1(),J={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:I})=>z._`{additionalProperty: ${I.additionalProperty}}`},code(I){let{gen:K,schema:G,parentSchema:H,data:W,errsCount:X,it:Z}=I;if(!X)throw Error("ajv implementation error");let{allErrors:q,opts:V}=Z;if(Z.props=!0,V.removeAdditional!=="all"&&(0,Q.alwaysValidSchema)(Z,G))return;let F=(0,Y.allSchemaProperties)(H.properties),w=(0,Y.allSchemaProperties)(H.patternProperties);O(),I.ok(z._`${X} === ${U.default.errors}`);function O(){K.forIn("key",W,(j)=>{if(!F.length&&!w.length)D(j);else K.if(N(j),()=>D(j))})}function N(j){let A;if(F.length>8){let T=(0,Q.schemaRefOrVal)(Z,H.properties,"properties");A=(0,Y.isOwnProperty)(K,T,j)}else if(F.length)A=(0,z.or)(...F.map((T)=>z._`${j} === ${T}`));else A=z.nil;if(w.length)A=(0,z.or)(A,...w.map((T)=>z._`${(0,Y.usePattern)(I,T)}.test(${j})`));return(0,z.not)(A)}function M(j){K.code(z._`delete ${W}[${j}]`)}function D(j){if(V.removeAdditional==="all"||V.removeAdditional&&G===!1){M(j);return}if(G===!1){if(I.setParams({additionalProperty:j}),I.error(),!q)K.break();return}if(typeof G=="object"&&!(0,Q.alwaysValidSchema)(Z,G)){let A=K.name("valid");if(V.removeAdditional==="failing")P(j,A,!1),K.if((0,z.not)(A),()=>{I.reset(),M(j)});else if(P(j,A),!q)K.if((0,z.not)(A),()=>K.break())}}function P(j,A,T){let C={keyword:"additionalProperties",dataProp:j,dataPropType:Q.Type.Str};if(T===!1)Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1});I.subschema(C,A)}}};$.default=J}),ib0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=uQ(),z=J5(),U=v1(),Q=De(),J={keyword:"properties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,parentSchema:H,data:W,it:X}=I;if(X.opts.removeAdditional==="all"&&H.additionalProperties===void 0)Q.default.code(new Y.KeywordCxt(X,Q.default,"additionalProperties"));let Z=(0,z.allSchemaProperties)(G);for(let O of Z)X.definedProperties.add(O);if(X.opts.unevaluated&&Z.length&&X.props!==!0)X.props=U.mergeEvaluated.props(K,(0,U.toHash)(Z),X.props);let q=Z.filter((O)=>!(0,U.alwaysValidSchema)(X,G[O]));if(q.length===0)return;let V=K.name("valid");for(let O of q){if(F(O))w(O);else{if(K.if((0,z.propertyInData)(K,W,O,X.opts.ownProperties)),w(O),!X.allErrors)K.else().var(V,!0);K.endIf()}I.it.definedProperties.add(O),I.ok(V)}function F(O){return X.opts.useDefaults&&!X.compositeRule&&G[O].default!==void 0}function w(O){I.subschema({keyword:"properties",schemaProp:O,dataProp:O},V)}}};$.default=J}),nb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=F1(),U=v1(),Q=v1(),J={keyword:"patternProperties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,data:H,parentSchema:W,it:X}=I,{opts:Z}=X,q=(0,Y.allSchemaProperties)(G),V=q.filter((P)=>(0,U.alwaysValidSchema)(X,G[P]));if(q.length===0||V.length===q.length&&(!X.opts.unevaluated||X.props===!0))return;let F=Z.strictSchema&&!Z.allowMatchingProperties&&W.properties,w=K.name("valid");if(X.props!==!0&&!(X.props instanceof z.Name))X.props=(0,Q.evaluatedPropsToName)(K,X.props);let{props:O}=X;N();function N(){for(let P of q){if(F)M(P);if(X.allErrors)D(P);else K.var(w,!0),D(P),K.if(w)}}function M(P){for(let j in F)if(new RegExp(P).test(j))(0,U.checkStrictMode)(X,`property ${j} matches pattern ${P} (use allowMatchingProperties)`)}function D(P){K.forIn("key",H,(j)=>{K.if(z._`${(0,Y.usePattern)(I,P)}.test(${j})`,()=>{let A=V.includes(P);if(!A)I.subschema({keyword:"patternProperties",schemaProp:P,dataProp:j,dataPropType:Q.Type.Str},w);if(X.opts.unevaluated&&O!==!0)K.assign(z._`${O}[${j}]`,!0);else if(!A&&!X.allErrors)K.if((0,z.not)(w),()=>K.break())})})}}};$.default=J}),cb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(U){let{gen:Q,schema:J,it:I}=U;if((0,Y.alwaysValidSchema)(I,J)){U.fail();return}let K=Q.name("valid");U.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},K),U.failResult(K,()=>U.reset(),()=>U.error())},error:{message:"must NOT be valid"}};$.default=z}),pb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:J5().validateUnion,error:{message:"must match a schema in anyOf"}};$.default=Y}),db0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:Q})=>Y._`{passingSchemas: ${Q.passing}}`},code(Q){let{gen:J,schema:I,parentSchema:K,it:G}=Q;if(!Array.isArray(I))throw Error("ajv implementation error");if(G.opts.discriminator&&K.discriminator)return;let H=I,W=J.let("valid",!1),X=J.let("passing",null),Z=J.name("_valid");Q.setParams({passing:X}),J.block(q),Q.result(W,()=>Q.reset(),()=>Q.error(!0));function q(){H.forEach((V,F)=>{let w;if((0,z.alwaysValidSchema)(G,V))J.var(Z,!0);else w=Q.subschema({keyword:"oneOf",schemaProp:F,compositeRule:!0},Z);if(F>0)J.if(Y._`${Z} && ${W}`).assign(W,!1).assign(X,Y._`[${X}, ${F}]`).else();J.if(Z,()=>{if(J.assign(W,!0),J.assign(X,F),w)Q.mergeEvaluated(w,Y.Name)})})}}};$.default=U}),mb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:"allOf",schemaType:"array",code(U){let{gen:Q,schema:J,it:I}=U;if(!Array.isArray(J))throw Error("ajv implementation error");let K=Q.name("valid");J.forEach((G,H)=>{if((0,Y.alwaysValidSchema)(I,G))return;let W=U.subschema({keyword:"allOf",schemaProp:H},K);U.ok(K),U.mergeEvaluated(W)})}};$.default=z}),lb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:J})=>Y.str`must match "${J.ifClause}" schema`,params:({params:J})=>Y._`{failingKeyword: ${J.ifClause}}`},code(J){let{gen:I,parentSchema:K,it:G}=J;if(K.then===void 0&&K.else===void 0)(0,z.checkStrictMode)(G,'"if" without "then" and "else" is ignored');let H=Q(G,"then"),W=Q(G,"else");if(!H&&!W)return;let X=I.let("valid",!0),Z=I.name("_valid");if(q(),J.reset(),H&&W){let F=I.let("ifClause");J.setParams({ifClause:F}),I.if(Z,V("then",F),V("else",F))}else if(H)I.if(Z,V("then"));else I.if((0,Y.not)(Z),V("else"));J.pass(X,()=>J.error(!0));function q(){let F=J.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},Z);J.mergeEvaluated(F)}function V(F,w){return()=>{let O=J.subschema({keyword:F},Z);if(I.assign(X,Z),J.mergeValidEvaluated(O,X),w)I.assign(w,Y._`${F}`);else J.setParams({ifClause:F})}}}};function Q(J,I){let K=J.schema[I];return K!==void 0&&!(0,z.alwaysValidSchema)(J,K)}$.default=U}),ob0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:U,parentSchema:Q,it:J}){if(Q.if===void 0)(0,Y.checkStrictMode)(J,`"${U}" without "if" is ignored`)}};$.default=z}),Ae=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Me(),z=xb0(),U=Ne(),Q=fb0(),J=ub0(),I=DS(),K=bb0(),G=De(),H=ib0(),W=nb0(),X=cb0(),Z=pb0(),q=db0(),V=mb0(),F=lb0(),w=ob0();function O(N=!1){let M=[X.default,Z.default,q.default,V.default,F.default,w.default,K.default,G.default,I.default,H.default,W.default];if(N)M.push(z.default,Q.default);else M.push(Y.default,U.default);return M.push(J.default),M}$.default=O}),rb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:U})=>Y.str`must match format "${U}"`,params:({schemaCode:U})=>Y._`{format: ${U}}`},code(U,Q){let{gen:J,data:I,$data:K,schema:G,schemaCode:H,it:W}=U,{opts:X,errSchemaPath:Z,schemaEnv:q,self:V}=W;if(!X.validateFormats)return;if(K)F();else w();function F(){let O=J.scopeValue("formats",{ref:V.formats,code:X.code.formats}),N=J.const("fDef",Y._`${O}[${H}]`),M=J.let("fType"),D=J.let("format");J.if(Y._`typeof ${N} == "object" && !(${N} instanceof RegExp)`,()=>J.assign(M,Y._`${N}.type || "string"`).assign(D,Y._`${N}.validate`),()=>J.assign(M,Y._`"string"`).assign(D,N)),U.fail$data((0,Y.or)(P(),j()));function P(){if(X.strictSchema===!1)return Y.nil;return Y._`${H} && !${D}`}function j(){let A=q.$async?Y._`(${N}.async ? await ${D}(${I}) : ${D}(${I}))`:Y._`${D}(${I})`,T=Y._`(typeof ${D} == "function" ? ${A} : ${D}.test(${I}))`;return Y._`${D} && ${D} !== true && ${M} === ${Q} && !${T}`}}function w(){let O=V.formats[G];if(!O){P();return}if(O===!0)return;let[N,M,D]=j(O);if(N===Q)U.pass(A());function P(){if(X.strictSchema===!1){V.logger.warn(T());return}throw Error(T());function T(){return`unknown format "${G}" ignored in schema at path "${Z}"`}}function j(T){let C=T instanceof RegExp?(0,Y.regexpCode)(T):X.code.formats?Y._`${X.code.formats}${(0,Y.getProperty)(G)}`:void 0,b=J.scopeValue("formats",{key:G,ref:T,code:C});if(typeof T=="object"&&!(T instanceof RegExp))return[T.type||"string",T.validate,Y._`${b}.validate`];return["string",T,b]}function A(){if(typeof O=="object"&&!(O instanceof RegExp)&&O.async){if(!q.$async)throw Error("async format in sync schema");return Y._`await ${D}(${I})`}return typeof M=="function"?Y._`${D}(${I})`:Y._`${D}.test(${I})`}}}};$.default=z}),Be=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=[rb0().default];$.default=Y}),Pe=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.contentVocabulary=$.metadataVocabulary=void 0,$.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],$.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),je=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Oe(),z=we(),U=Ae(),Q=Be(),J=Pe(),I=[Y.default,z.default,(0,U.default)(),Q.default,J.metadataVocabulary,J.contentVocabulary];$.default=I}),sb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.DiscrError=void 0;var Y;(function(z){z.Tag="tag",z.Mapping="mapping"})(Y||($.DiscrError=Y={}))}),AS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=sb0(),U=nO(),Q=bQ(),J=v1(),I={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:K,tagName:G}})=>K===z.DiscrError.Tag?`tag "${G}" must be string`:`value of tag "${G}" must be in oneOf`,params:({params:{discrError:K,tag:G,tagName:H}})=>Y._`{error: ${K}, tag: ${H}, tagValue: ${G}}`},code(K){let{gen:G,data:H,schema:W,parentSchema:X,it:Z}=K,{oneOf:q}=X;if(!Z.opts.discriminator)throw Error("discriminator: requires discriminator option");let V=W.propertyName;if(typeof V!="string")throw Error("discriminator: requires propertyName");if(W.mapping)throw Error("discriminator: mapping is not supported");if(!q)throw Error("discriminator: requires oneOf keyword");let F=G.let("valid",!1),w=G.const("tag",Y._`${H}${(0,Y.getProperty)(V)}`);G.if(Y._`typeof ${w} == "string"`,()=>O(),()=>K.error(!1,{discrError:z.DiscrError.Tag,tag:w,tagName:V})),K.ok(F);function O(){let D=M();G.if(!1);for(let P in D)G.elseIf(Y._`${w} === ${P}`),G.assign(F,N(D[P]));G.else(),K.error(!1,{discrError:z.DiscrError.Mapping,tag:w,tagName:V}),G.endIf()}function N(D){let P=G.name("valid"),j=K.subschema({keyword:"oneOf",schemaProp:D},P);return K.mergeEvaluated(j,Y.Name),P}function M(){var D;let P={},j=T(X),A=!0;for(let k=0;k{Y.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}}),Te=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv=void 0;let z=wS(),U=je(),Q=AS(),J=ab0(),I=["/properties"],K="http://json-schema.org/draft-07/schema";var G=class extends z.default{_addVocabularies(){if(super._addVocabularies(),U.default.forEach((q)=>this.addVocabulary(q)),this.opts.discriminator)this.addKeyword(Q.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let q=this.opts.$data?this.$dataMetaSchema(J,I):J;this.addMetaSchema(q,K,!1),this.refs["http://json-schema.org/schema"]=K}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(K)?K:void 0)}};$.Ajv=G,Y.exports=$=G,Y.exports.Ajv=G,Object.defineProperty($,"__esModule",{value:!0}),$.default=G;var H=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return H.KeywordCxt}});var W=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return W._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return W.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return W.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return W.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return W.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return W.CodeGen}});var X=OH();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return X.default}});var Z=bQ();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return Z.default}})}),Ee=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.dynamicAnchor=void 0;let Y=F1(),z=Q5(),U=nO(),Q=MS(),J={keyword:"$dynamicAnchor",schemaType:"string",code:(G)=>I(G,G.schema)};function I(G,H){let{gen:W,it:X}=G;X.schemaEnv.root.dynamicAnchors[H]=!0;let Z=Y._`${z.default.dynamicAnchors}${(0,Y.getProperty)(H)}`,q=X.errSchemaPath==="#"?X.validateName:K(G);W.if(Y._`!${Z}`,()=>W.assign(Z,q))}$.dynamicAnchor=I;function K(G){let{schemaEnv:H,schema:W,self:X}=G.it,{root:Z,baseId:q,localRefs:V,meta:F}=H.root,{schemaId:w}=X.opts,O=new U.SchemaEnv({schema:W,schemaId:w,root:Z,baseId:q,localRefs:V,meta:F});return U.compileSchema.call(X,O),(0,Q.getValidate)(G,O)}$.default=J}),Ce=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.dynamicRef=void 0;let Y=F1(),z=Q5(),U=MS(),Q={keyword:"$dynamicRef",schemaType:"string",code:(I)=>J(I,I.schema)};function J(I,K){let{gen:G,keyword:H,it:W}=I;if(K[0]!=="#")throw Error(`"${H}" only supports hash fragment reference`);let X=K.slice(1);if(W.allErrors)Z();else{let V=G.let("valid",!1);Z(V),I.ok(V)}function Z(V){if(W.schemaEnv.root.dynamicAnchors[X]){let F=G.let("_v",Y._`${z.default.dynamicAnchors}${(0,Y.getProperty)(X)}`);G.if(F,q(F,V),q(W.validateName,V))}else q(W.validateName,V)()}function q(V,F){return F?()=>G.block(()=>{(0,U.callRef)(I,V),G.let(F,!0)}):()=>(0,U.callRef)(I,V)}}$.dynamicRef=J,$.default=Q}),tb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ee(),z=v1(),U={keyword:"$recursiveAnchor",schemaType:"boolean",code(Q){if(Q.schema)(0,Y.dynamicAnchor)(Q,"");else(0,z.checkStrictMode)(Q.it,"$recursiveAnchor: false is ignored")}};$.default=U}),eb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ce(),z={keyword:"$recursiveRef",schemaType:"string",code:(U)=>(0,Y.dynamicRef)(U,U.schema)};$.default=z}),Re=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ee(),z=Ce(),U=tb0(),Q=eb0(),J=[Y.default,z.default,U.default,Q.default];$.default=J}),$i0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=DS(),z={keyword:"dependentRequired",type:"object",schemaType:"object",error:Y.error,code:(U)=>(0,Y.validatePropertyDeps)(U)};$.default=z}),Yi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=DS(),z={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(U)=>(0,Y.validateSchemaDeps)(U)};$.default=z}),zi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:U,parentSchema:Q,it:J}){if(Q.contains===void 0)(0,Y.checkStrictMode)(J,`"${U}" without "contains" is ignored`)}};$.default=z}),_e=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=$i0(),z=Yi0(),U=zi0(),Q=[Y.default,z.default,U.default];$.default=Q}),Ui0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=Q5(),Q={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:J})=>Y._`{unevaluatedProperty: ${J.unevaluatedProperty}}`},code(J){let{gen:I,schema:K,data:G,errsCount:H,it:W}=J;if(!H)throw Error("ajv implementation error");let{allErrors:X,props:Z}=W;if(Z instanceof Y.Name)I.if(Y._`${Z} !== true`,()=>I.forIn("key",G,(w)=>I.if(V(Z,w),()=>q(w))));else if(Z!==!0)I.forIn("key",G,(w)=>Z===void 0?q(w):I.if(F(Z,w),()=>q(w)));W.props=!0,J.ok(Y._`${H} === ${U.default.errors}`);function q(w){if(K===!1){if(J.setParams({unevaluatedProperty:w}),J.error(),!X)I.break();return}if(!(0,z.alwaysValidSchema)(W,K)){let O=I.name("valid");if(J.subschema({keyword:"unevaluatedProperties",dataProp:w,dataPropType:z.Type.Str},O),!X)I.if((0,Y.not)(O),()=>I.break())}}function V(w,O){return Y._`!${w} || !${w}[${O}]`}function F(w,O){let N=[];for(let M in w)if(w[M]===!0)N.push(Y._`${O} !== ${M}`);return(0,Y.and)(...N)}}};$.default=Q}),Qi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:Q}})=>Y.str`must NOT have more than ${Q} items`,params:({params:{len:Q}})=>Y._`{limit: ${Q}}`},code(Q){let{gen:J,schema:I,data:K,it:G}=Q,H=G.items||0;if(H===!0)return;let W=J.const("len",Y._`${K}.length`);if(I===!1)Q.setParams({len:H}),Q.fail(Y._`${W} > ${H}`);else if(typeof I=="object"&&!(0,z.alwaysValidSchema)(G,I)){let Z=J.var("valid",Y._`${W} <= ${H}`);J.if((0,Y.not)(Z),()=>X(Z,H)),Q.ok(Z)}G.items=!0;function X(Z,q){J.forRange("i",q,W,(V)=>{if(Q.subschema({keyword:"unevaluatedItems",dataProp:V,dataPropType:z.Type.Num},Z),!G.allErrors)J.if((0,Y.not)(Z),()=>J.break())})}}};$.default=U}),ve=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ui0(),z=Qi0(),U=[Y.default,z.default];$.default=U}),Ji0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),Ii0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),Ki0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),Gi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),Hi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),Wi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),Xi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),Zi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ji0(),z=Ii0(),U=Ki0(),Q=Gi0(),J=Hi0(),I=Wi0(),K=Xi0(),G=["/properties"];function H(W){return[Y,z,U,Q,X(this,J),I,X(this,K)].forEach((Z)=>this.addMetaSchema(Z,void 0,!1)),this;function X(Z,q){return W?Z.$dataMetaSchema(q,G):q}}$.default=H}),qi0=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv2019=void 0;let z=wS(),U=je(),Q=Re(),J=_e(),I=ve(),K=AS(),G=Zi0(),H="https://json-schema.org/draft/2019-09/schema";var W=class extends z.default{constructor(F={}){super({...F,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),this.addVocabulary(Q.default),U.default.forEach((F)=>this.addVocabulary(F)),this.addVocabulary(J.default),this.addVocabulary(I.default),this.opts.discriminator)this.addKeyword(K.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:F,meta:w}=this.opts;if(!w)return;G.default.call(this,F),this.refs["http://json-schema.org/schema"]=H}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(H)?H:void 0)}};$.Ajv2019=W,Y.exports=$=W,Y.exports.Ajv2019=W,Object.defineProperty($,"__esModule",{value:!0}),$.default=W;var X=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return X.KeywordCxt}});var Z=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return Z._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return Z.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return Z.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return Z.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return Z.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return Z.CodeGen}});var q=OH();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return q.default}});var V=bQ();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return V.default}})}),Vi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Oe(),z=we(),U=Ae(),Q=Re(),J=_e(),I=ve(),K=Be(),G=Pe(),H=[Q.default,Y.default,z.default,(0,U.default)(!0),K.default,G.metadataVocabulary,G.contentVocabulary,J.default,I.default];$.default=H}),Li0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),Fi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),Oi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),wi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),Mi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),Ni0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),Di0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),Ai0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),Bi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Li0(),z=Fi0(),U=Oi0(),Q=wi0(),J=Mi0(),I=Ni0(),K=Di0(),G=Ai0(),H=["/properties"];function W(X){return[Y,z,U,Q,J,Z(this,I),K,Z(this,G)].forEach((q)=>this.addMetaSchema(q,void 0,!1)),this;function Z(q,V){return X?q.$dataMetaSchema(V,H):V}}$.default=W}),Pi0=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv2020=void 0;let z=wS(),U=Vi0(),Q=AS(),J=Bi0(),I="https://json-schema.org/draft/2020-12/schema";var K=class extends z.default{constructor(Z={}){super({...Z,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),U.default.forEach((Z)=>this.addVocabulary(Z)),this.opts.discriminator)this.addKeyword(Q.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:Z,meta:q}=this.opts;if(!q)return;J.default.call(this,Z),this.refs["http://json-schema.org/schema"]=I}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(I)?I:void 0)}};$.Ajv2020=K,Y.exports=$=K,Y.exports.Ajv2020=K,Object.defineProperty($,"__esModule",{value:!0}),$.default=K;var G=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return G.KeywordCxt}});var H=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return H._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return H.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return H.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return H.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return H.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return H.CodeGen}});var W=OH();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return W.default}});var X=bQ();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return X.default}})}),ji0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.formatNames=$.fastFormats=$.fullFormats=void 0;function Y(k,S){return{validate:k,compare:S}}$.fullFormats={date:Y(J,I),time:Y(G(!0),H),"date-time":Y(Z(!0),q),"iso-time":Y(G(),W),"iso-date-time":Y(Z(),V),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:O,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:b,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:M,int32:{type:"number",validate:j},int64:{type:"number",validate:A},float:{type:"number",validate:T},double:{type:"number",validate:T},password:!0,binary:!0},$.fastFormats={...$.fullFormats,date:Y(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,I),time:Y(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,H),"date-time":Y(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,q),"iso-time":Y(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,W),"iso-date-time":Y(/^\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,V),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},$.formatNames=Object.keys($.fullFormats);function z(k){return k%4===0&&(k%100!==0||k%400===0)}let U=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Q=[0,31,28,31,30,31,30,31,31,30,31,30,31];function J(k){let S=U.exec(k);if(!S)return!1;let i=+S[1],n=+S[2],U0=+S[3];return n>=1&&n<=12&&U0>=1&&U0<=(n===2&&z(i)?29:Q[n])}function I(k,S){if(!(k&&S))return;if(k>S)return 1;if(k23||p>59||k&&!t)return!1;if(U0<=23&&x<=59&&d<60)return!0;let Y0=x-p*e,g=U0-y*e-(Y0<0?1:0);return(g===23||g===-1)&&(Y0===59||Y0===-1)&&d<61}}function H(k,S){if(!(k&&S))return;let i=new Date("2020-01-01T"+k).valueOf(),n=new Date("2020-01-01T"+S).valueOf();if(!(i&&n))return;return i-n}function W(k,S){if(!(k&&S))return;let i=K.exec(k),n=K.exec(S);if(!(i&&n))return;if(k=i[1]+i[2]+i[3],S=n[1]+n[2]+n[3],k>S)return 1;if(k=D}function A(k){return Number.isInteger(k)}function T(){return!0}let C=/[^\\]\\Z/;function b(k){if(C.test(k))return!1;try{return new RegExp(k),!0}catch(S){return!1}}}),Ti0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.formatLimitDefinition=void 0;let Y=Te(),z=F1(),U=z.operators,Q={formatMaximum:{okStr:"<=",ok:U.LTE,fail:U.GT},formatMinimum:{okStr:">=",ok:U.GTE,fail:U.LT},formatExclusiveMaximum:{okStr:"<",ok:U.LT,fail:U.GTE},formatExclusiveMinimum:{okStr:">",ok:U.GT,fail:U.LTE}},J={message:({keyword:K,schemaCode:G})=>z.str`should be ${Q[K].okStr} ${G}`,params:({keyword:K,schemaCode:G})=>z._`{comparison: ${Q[K].okStr}, limit: ${G}}`};$.formatLimitDefinition={keyword:Object.keys(Q),type:"string",schemaType:"string",$data:!0,error:J,code(K){let{gen:G,data:H,schemaCode:W,keyword:X,it:Z}=K,{opts:q,self:V}=Z;if(!q.validateFormats)return;let F=new Y.KeywordCxt(Z,V.RULES.all.format.definition,"format");if(F.$data)w();else O();function w(){let M=G.scopeValue("formats",{ref:V.formats,code:q.code.formats}),D=G.const("fmt",z._`${M}[${F.schemaCode}]`);K.fail$data((0,z.or)(z._`typeof ${D} != "object"`,z._`${D} instanceof RegExp`,z._`typeof ${D}.compare != "function"`,N(D)))}function O(){let M=F.schema,D=V.formats[M];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw Error(`"${X}": format "${M}" does not define "compare" function`);let P=G.scopeValue("formats",{key:M,ref:D,code:q.code.formats?z._`${q.code.formats}${(0,z.getProperty)(M)}`:void 0});K.fail$data(N(P))}function N(M){return z._`${M}.compare(${H}, ${W}) ${Q[X].fail} 0`}},dependencies:["format"]};let I=(K)=>{return K.addKeyword($.formatLimitDefinition),K};$.default=I}),Ei0=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0});let z=ji0(),U=Ti0(),Q=F1(),J=new Q.Name("fullFormats"),I=new Q.Name("fastFormats"),K=(H,W={keywords:!0})=>{if(Array.isArray(W))return G(H,W,z.fullFormats,J),H;let[X,Z]=W.mode==="fast"?[z.fastFormats,I]:[z.fullFormats,J];if(G(H,W.formats||z.formatNames,X,Z),W.keywords)(0,U.default)(H);return H};K.get=(H,W="full")=>{let X=(W==="fast"?z.fastFormats:z.fullFormats)[H];if(!X)throw Error(`Unknown format "${H}"`);return X};function G(H,W,X,Z){var q,V;(q=(V=H.opts.code).formats)!==null&&q!==void 0||(V.formats=Q._`require("ajv-formats/dist/formats").${Z}`);for(let F of W)H.addFormat(F,X[F])}Y.exports=$=K,Object.defineProperty($,"__esModule",{value:!0}),$.default=K}),he=Te(),Ci0=qi0(),Ri0=Pi0(),_i0=sq(Ei0(),1),vi0=_i0.default;qb1=he.Ajv});import BS from"node:process";var pO=m(()=>{Se()});function jS($){return!!$&&typeof $==="object"&&ne in $}function Si0($){return $[ne]?.complete}function gi0($,Y){switch(Y.kind){case"tools_list_changed":return $.toolsListChanged===!0;case"prompts_list_changed":return $.promptsListChanged===!0;case"resources_list_changed":return $.resourcesListChanged===!0;case"resource_updated":return $.resourceSubscriptions!==void 0&&$.resourceSubscriptions.includes(Y.uri)}}function yi0($,Y){let z={},U=(Q)=>Y===void 0||Q===!0;if($.toolsListChanged===!0&&U(Y?.tools?.listChanged))z.toolsListChanged=!0;if($.promptsListChanged===!0&&U(Y?.prompts?.listChanged))z.promptsListChanged=!0;if($.resourcesListChanged===!0&&U(Y?.resources?.listChanged))z.resourcesListChanged=!0;if($.resourceSubscriptions!==void 0&&$.resourceSubscriptions.length>0&&U(Y?.resources?.subscribe))z.resourceSubscriptions=[...$.resourceSubscriptions];return z}function ge($,Y){return{method:$.method,params:{...$.params,_meta:{...$.params?._meta,[fY]:Y}}}}function ki0($){let Y=C7(LH).validateRequest("subscriptions/listen",$);return Y.ok?Y.value.params?.notifications:void 0}function fi0($,Y){switch($){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:Y??""}}}function ii0($){if($?.maxRounds!==void 0&&(!Number.isInteger($.maxRounds)||$.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${$.maxRounds})`);if($?.roundTimeoutMs!==void 0&&(!Number.isFinite($.roundTimeoutMs)||$.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${$.roundTimeoutMs})`);return{maxRounds:$?.maxRounds??ui0,roundTimeoutMs:$?.roundTimeoutMs??bi0,legacyShim:$?.legacyShim??!0}}function pe($,Y,z){if(z===null||typeof z!=="object"||typeof z.method!=="string")throw new J1(c0.InternalError,`Handler for ${$} returned an invalid input request '${Y}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let U=z,Q=yt(U);if(Q===void 0)throw new J1(c0.InternalError,`Handler for ${$} returned an input request '${Y}' of kind '${U.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:U,required:Q}}function ni0(){let $=globalThis.crypto;if($?.randomUUID!==void 0)return $.randomUUID();let Y=new Uint8Array(16);$.getRandomValues(Y),Y[6]=Y[6]&15|64,Y[8]=Y[8]&63|128;let z=[...Y].map((U)=>U.toString(16).padStart(2,"0")).join("");return`${z.slice(0,8)}-${z.slice(8,12)}-${z.slice(12,16)}-${z.slice(16,20)}-${z.slice(20)}`}function PS($,Y){if($==="tools/call")return{content:[{type:"text",text:Y}],isError:!0};throw new J1(c0.InternalError,Y)}function TS($,Y){de($,Y)}function ES($){return me($)}function mi0($){return{...$}}function ye($,Y){if($){let U=Y;return async(Q,J)=>U(Q,J)}let z=Y;return async(U,Q)=>z(Q)}function xe($){if($===void 0)return;try{return v7($,"output")}catch{return}}function fe($,Y,z){if(Y){let U=z;return async(Q,J)=>{let I=await iY(Y,Q);if(!I.success)throw new J1(c0.InvalidParams,`Invalid arguments for prompt ${$}: ${I.error}`);return U(I.data,J)}}else{let U=z;return async(Q,J)=>{return U(J)}}}function ue($){return{completion:{values:$.map(String).slice(0,100),total:$.length,hasMore:$.length>100}}}function be($){let Y=$;if(Y.shape&&typeof Y.shape==="object")return Y.shape}function li0($){return $?.type==="optional"}function ie($){if(!li0($))return $;return $.def?.innerType??$}var ne,dO=1024,xi0,ce=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor($=dO,Y,z){this._maxSubscriptions=$,this._serverCapabilities=Y,this._serverInfo=z}setServerCapabilities($,Y){if(this._serverCapabilities=$,Y!==void 0)this._serverInfo=Y}has($){return this._subs.has($)}serve($){if(this._serverCapabilities===void 0)throw Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:$.id,error:{code:-32603,message:"Subscription limit reached"}};let Y=ki0($);if(Y===void 0)return{jsonrpc:"2.0",id:$.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let z=yi0(Y,this._serverCapabilities);return this._subs.set($.id,z),ge({method:"notifications/subscriptions/acknowledged",params:{notifications:z}},$.id)}cancel($){return this._subs.delete($)}routeOutbound($){if(!xi0.has($.method))return"passthrough";let Y=$.params?.uri,z=typeof Y==="string"?Y:void 0,U=fi0($.method,z),Q=[];for(let[J,I]of this._subs)if(gi0(I,U))Q.push(ge({method:$.method,params:$.params??{}},J));return Q}teardownAll(){let $=[];for(let Y of this._subs.keys())$.push({jsonrpc:"2.0",id:Y,result:{resultType:"complete",_meta:{[fY]:Y,...this._serverInfo!==void 0&&{[o5]:this._serverInfo}}}});return this._subs.clear(),$}},ui0=8,bi0=600000,ci0=class{constructor($){this._host=$}async fulfill($,Y,z,U,Q){let{maxRounds:J,roundTimeoutMs:I}=this._host,K=U.mcpReq.signal,G=Q,H=0;while(!0){if(H+=1,H>J)return PS($,ze($,J));let W=G.inputRequests,X=W!=null&&Object.keys(W).length>0,Z=typeof G.requestState==="string"?G.requestState:void 0;if(!X&&Z===void 0)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let q;if(X){let w=this._host.resolvedClientCapabilities(U),O=[];for(let[M,D]of Object.entries(W)){let{embedded:P,required:j}=pe($,M,D);if(P.method!=="roots/list"&&P.params===void 0)throw new J1(c0.InternalError,`Handler for ${$} returned an input request '${M}' of kind '${P.method}' without params`);if(EO(j,w)!==void 0)return PS($,`Cannot request input '${M}' (${P.method}): the client on this 2025-era connection did not declare the required capability${w===void 0?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);O.push([M,P])}let N=Qe(K);try{let M={relatedRequestId:U.mcpReq.id,timeout:I,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:N.signal},D=await Promise.all(O.map(async([P,j])=>{try{return[P,await this._dispatchLeg(j,M)]}catch(A){throw N.abort(A),A}}));q=Object.fromEntries(D)}catch(M){if(K.aborted)throw M;return PS($,`Fulfilling input required by '${$}' failed: ${M instanceof Error?M.message:String(M)}`)}finally{N.dispose()}}else await Ue(Ye,K);let V={...U,mcpReq:{...U.mcpReq,inputResponses:q,droppedInputResponseKeys:void 0,requestState:FH(Z)}};if(Z!==void 0){let w=await this._host.verifyRequestState(Z,V,$);if(w!==void 0)V=WS(V,w)}let F=await Y(z,V);if(!t9(F))return F;G=F}}async _dispatchLeg($,Y){switch($.method){case"elicitation/create":{let z=$.params;if(z.mode==="url"&&z.elicitationId===void 0)z={...z,elicitationId:ni0()};return await this._host.sendElicitation(z,Y)}case"sampling/createMessage":return await this._host.sendSampling($.params,Y);case"roots/list":return await this._host.listRoots($.params,Y)}}},pi0,di0,de,me,le,MH=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson($){let Y=this._registeredTools[$];if(Y===void 0||!Y.enabled)return;if(Object.hasOwn(this._toolInputSchemaJson,$))return this._toolInputSchemaJson[$];if(Y.inputSchema===void 0)return ke;try{let z=v7(Y.inputSchema,"input");return this._toolInputSchemaJson[$]=z,z}catch{return}}constructor($,Y){if(this.server=new le($,Y),Y?.capabilities?.tools)this.setToolRequestHandlers();if(Y?.capabilities?.resources)this.setResourceRequestHandlers();if(Y?.capabilities?.prompts)this.setPromptRequestHandlers()}async connect($){return await this.server.connect($)}async close(){await this.server.close()}_toolHandlersInitialized=!1;setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,$])=>$.enabled).map(([$,Y])=>{let z={name:$,title:Y.title,description:Y.description,inputSchema:Y.inputSchema?v7(Y.inputSchema,"input"):ke,annotations:Y.annotations,icons:Y.icons,execution:Y.execution,_meta:Y._meta};if(Y.outputSchema)z.outputSchema=v7(Y.outputSchema,"output");return z})})),this.server.setRequestHandler("tools/call",async($,Y)=>{let z=this._registeredTools[$.params.name];if(!z)throw new J1(c0.InvalidParams,`Tool ${$.params.name} not found`);if(!z.enabled)throw new J1(c0.InvalidParams,`Tool ${$.params.name} disabled`);try{let U=await this.validateToolInput(z,$.params.arguments,$.params.name),Q=await this.executeToolHandler(z,U,Y);if(await this.validateToolOutput(z,Q,$.params.name),t9(Q))return Q;return this.server.projectCallToolResult(Q,z.outputSchemaJson)}catch(U){if(U instanceof J1&&U.code===c0.UrlElicitationRequired)throw U;return this.createToolError(U instanceof Error?U.message:String(U))}}),this._toolHandlersInitialized=!0}createToolError($){return{content:[{type:"text",text:$}],isError:!0}}async validateToolInput($,Y,z){if(!$.inputSchema)return;let U=await iY($.inputSchema,Y??{});if(!U.success)throw new J1(c0.InvalidParams,`Input validation error: Invalid arguments for tool ${z}: ${U.error}`);return U.data}async validateToolOutput($,Y,z){if(!$.outputSchema)return;if(t9(Y))return;if(Y.isError)return;if(Y.structuredContent===void 0)throw new J1(c0.InvalidParams,`Output validation error: Tool ${z} has an output schema but no structured content was provided`);let U=await iY($.outputSchema,Y.structuredContent);if(!U.success)throw new J1(c0.InvalidParams,`Output validation error: Invalid structured content for tool ${z}: ${U.error}`)}async executeToolHandler($,Y,z){return $.executor(Y,z)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async($)=>{switch($.params.ref.type){case"ref/prompt":return QS($),this.handlePromptCompletion($,$.params.ref);case"ref/resource":return JS($),this.handleResourceCompletion($,$.params.ref);default:throw new J1(c0.InvalidParams,`Invalid completion reference: ${$.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion($,Y){let z=this._registeredPrompts[Y.name];if(!z)throw new J1(c0.InvalidParams,`Prompt ${Y.name} not found`);if(!z.enabled)throw new J1(c0.InvalidParams,`Prompt ${Y.name} disabled`);if(!z.argsSchema)return wH;let U=ie(be(z.argsSchema)?.[$.params.argument.name]);if(!jS(U))return wH;let Q=Si0(U);if(!Q)return wH;return ue(await Q($.params.argument.value,$.params.context))}async handleResourceCompletion($,Y){let z=Object.values(this._registeredResourceTemplates).find((Q)=>Q.resourceTemplate.uriTemplate.toString()===Y.uri);if(!z){if(this._registeredResources[Y.uri])return wH;throw new J1(c0.InvalidParams,`Resource template ${$.params.ref.uri} not found`)}let U=z.resourceTemplate.completeCallback($.params.argument.name);if(!U)return wH;return ue(await U($.params.argument.value,$.params.context))}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async($,Y)=>{let z=Object.entries(this._registeredResources).filter(([Q,J])=>J.enabled).map(([Q,J])=>({uri:Q,name:J.name,...J.metadata})),U=[];for(let Q of Object.values(this._registeredResourceTemplates)){if(!Q.resourceTemplate.listCallback)continue;let J=await Q.resourceTemplate.listCallback(Y);for(let I of J.resources)U.push({...Q.metadata,...I})}return{resources:[...z,...U]}}),this.server.setRequestHandler("resources/templates/list",async()=>{return{resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([$,Y])=>({name:$,uriTemplate:Y.resourceTemplate.uriTemplate.toString(),...Y.metadata}))}}),this.server.setRequestHandler("resources/read",async($,Y)=>{let z;try{z=new URL($.params.uri)}catch{throw new J1(c0.InvalidParams,`Resource URI ${$.params.uri} is invalid`,{uri:$.params.uri,reason:"invalid_uri"})}let U=this._registeredResources[z.toString()];if(U){if(!U.enabled)throw new J1(c0.InvalidParams,`Resource ${z} disabled`);return CO(await U.readCallback(z,Y),U.cacheHint)}for(let Q of Object.values(this._registeredResourceTemplates)){let J=Q.resourceTemplate.uriTemplate.match(z.toString());if(J)return CO(await Q.readCallback(z,J,Y),Q.cacheHint)}throw new RO($.params.uri)}),this._resourceHandlersInitialized=!0}_promptHandlersInitialized=!1;setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,$])=>$.enabled).map(([$,Y])=>{return{name:$,title:Y.title,description:Y.description,arguments:Y.argsSchema?$e(Y.argsSchema):void 0,icons:Y.icons,_meta:Y._meta}})})),this.server.setRequestHandler("prompts/get",async($,Y)=>{let z=this._registeredPrompts[$.params.name];if(!z)throw new J1(c0.InvalidParams,`Prompt ${$.params.name} not found`);if(!z.enabled)throw new J1(c0.InvalidParams,`Prompt ${$.params.name} disabled`);return z.handler($.params.arguments,Y)}),this._promptHandlersInitialized=!0}registerResource($,Y,z,U){let Q=z.cacheHint,J=z;if(Q!==void 0){YS(Q,`resource ${$}`);let I={...z};delete I.cacheHint,J=I}if(typeof Y==="string"){if(this._registeredResources[Y])throw Error(`Resource ${Y} is already registered`);let I=this._createRegisteredResource($,z.title,Y,J,U);if(Q!==void 0)I.cacheHint=Q;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),I}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let I=this._createRegisteredResourceTemplate($,z.title,Y,J,U);if(Q!==void 0)I.cacheHint=Q;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),I}}_createRegisteredResource($,Y,z,U,Q){let J={name:$,title:Y,metadata:U,readCallback:Q,enabled:!0,disable:()=>J.update({enabled:!1}),enable:()=>J.update({enabled:!0}),remove:()=>J.update({uri:null}),update:(I)=>{if(I.uri!==void 0&&I.uri!==z){if(delete this._registeredResources[z],I.uri)this._registeredResources[I.uri]=J}if(I.name!==void 0)J.name=I.name;if(I.title!==void 0)J.title=I.title;if(I.metadata!==void 0)J.metadata=I.metadata;if(I.callback!==void 0)J.readCallback=I.callback;if(I.enabled!==void 0)J.enabled=I.enabled;this.sendResourceListChanged()}};return this._registeredResources[z]=J,J}_createRegisteredResourceTemplate($,Y,z,U,Q){let J={resourceTemplate:z,title:Y,metadata:U,readCallback:Q,enabled:!0,disable:()=>J.update({enabled:!1}),enable:()=>J.update({enabled:!0}),remove:()=>J.update({name:null}),update:(K)=>{if(K.name!==void 0&&K.name!==$){if(delete this._registeredResourceTemplates[$],K.name)this._registeredResourceTemplates[K.name]=J}if(K.title!==void 0)J.title=K.title;if(K.template!==void 0)J.resourceTemplate=K.template;if(K.metadata!==void 0)J.metadata=K.metadata;if(K.callback!==void 0)J.readCallback=K.callback;if(K.enabled!==void 0)J.enabled=K.enabled;this.sendResourceListChanged()}};this._registeredResourceTemplates[$]=J;let I=z.uriTemplate.variableNames;if(Array.isArray(I)&&I.some((K)=>!!z.completeCallback(K)))this.setCompletionRequestHandler();return J}_createRegisteredPrompt($,Y,z,U,Q,J,I){let K=U,G=Q,H={title:Y,description:z,argsSchema:U,icons:J,_meta:I,handler:fe($,U,Q),enabled:!0,disable:()=>H.update({enabled:!1}),enable:()=>H.update({enabled:!0}),remove:()=>H.update({name:null}),update:(W)=>{if(W.name!==void 0&&W.name!==$){if(delete this._registeredPrompts[$],W.name)this._registeredPrompts[W.name]=H}if(W.title!==void 0)H.title=W.title;if(W.description!==void 0)H.description=W.description;if(W.icons!==void 0)H.icons=W.icons;if(W._meta!==void 0)H._meta=W._meta;let X=!1;if(W.argsSchema!==void 0)H.argsSchema=W.argsSchema,K=W.argsSchema,X=!0;if(W.callback!==void 0)G=W.callback,X=!0;if(X)H.handler=fe($,K,G);if(W.enabled!==void 0)H.enabled=W.enabled;this.sendPromptListChanged()}};if(this._registeredPrompts[$]=H,U){let W=be(U);if(W){if(Object.values(W).some((X)=>{return jS(ie(X))}))this.setCompletionRequestHandler()}}return H}_createRegisteredTool($,Y,z,U,Q,J,I,K,G,H){if(FS($),U!==void 0)try{let Z=v7(U,"input");this._toolInputSchemaJson[$]=Z;let q=IS(Z);if(!q.valid)console.warn(`[mcp-sdk] tool '${$}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${q.reason}`)}catch{}let W=H,X={title:Y,description:z,inputSchema:U,outputSchema:Q,outputSchemaJson:xe(Q),annotations:J,icons:I,execution:K,_meta:G,handler:H,executor:ye(U,H),enabled:!0,disable:()=>X.update({enabled:!1}),enable:()=>X.update({enabled:!0}),remove:()=>X.update({name:null}),update:(Z)=>{if(Z.name!==void 0&&Z.name!==$){if(typeof Z.name==="string")FS(Z.name);if(delete this._registeredTools[$],delete this._toolInputSchemaJson[$],Z.name)delete this._toolInputSchemaJson[Z.name],this._registeredTools[Z.name]=X,$=Z.name}if(Z.title!==void 0)X.title=Z.title;if(Z.description!==void 0)X.description=Z.description;let q=!1;if(Z.paramsSchema!==void 0)X.inputSchema=Z.paramsSchema,delete this._toolInputSchemaJson[$],q=!0;if(Z.callback!==void 0)X.handler=Z.callback,W=Z.callback,q=!0;if(q)X.executor=ye(X.inputSchema,W);if(Z.outputSchema!==void 0)X.outputSchema=Z.outputSchema,X.outputSchemaJson=xe(Z.outputSchema);if(Z.annotations!==void 0)X.annotations=Z.annotations;if(Z.icons!==void 0)X.icons=Z.icons;if(Z._meta!==void 0)X._meta=Z._meta;if(Z.enabled!==void 0)X.enabled=Z.enabled;this.sendToolListChanged()}};return this._registeredTools[$]=X,this.setToolRequestHandlers(),this.sendToolListChanged(),X}registerTool($,Y,z){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let{title:U,description:Q,inputSchema:J,outputSchema:I,annotations:K,icons:G,_meta:H}=Y;return this._createRegisteredTool($,U,Q,kO(J),kO(I),K,G,void 0,H,z)}registerPrompt($,Y,z){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let{title:U,description:Q,argsSchema:J,icons:I,_meta:K}=Y,G=this._createRegisteredPrompt($,U,Q,kO(J),z,I,K);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),G}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage($,Y){return this.server.sendLoggingMessage($,Y)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}},ke,wH;var CS=m(()=>{xO();pO();ne=Symbol.for("mcp.completable");xi0=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]);pi0=new Set(["tools/call","prompts/get","resources/read"]);le=class extends ZS{_clientCapabilities;_clientVersion;static{di0=($,Y)=>{if(Y.clientCapabilities!==void 0)$._clientCapabilities=Y.clientCapabilities;if(Y.clientInfo!==void 0)$._clientVersion=Y.clientInfo},de=($,Y)=>{let z=Y.filter((U)=>!$._supportedProtocolVersions.includes(U));if(z.length>0)$._supportedProtocolVersions=[...$._supportedProtocolVersions,...z];$.setRequestHandler("server/discover",()=>$._ondiscover())},me=($)=>$._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new ci0({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:($)=>this._inputRequestCapabilityView($),verifyRequestState:($,Y,z)=>this._verifyRequestState($,Y,z),sendElicitation:($,Y)=>this._sendElicitationLeg($,Y,{validateAcceptedContent:!1}),sendSampling:($,Y)=>this.createMessage($,Y),listRoots:($,Y)=>this.listRoots($,Y)})}oninitialized;constructor($,Y){super(Y);if(this._serverInfo=$,this._capabilities=Y?.capabilities?{...Y.capabilities}:{},this._instructions=Y?.instructions,this._jsonSchemaValidator=Y?.jsonSchemaValidator??new cO,this._requestStateVerify=Y?.requestState?.verify,this._inputRequiredServing=ii0(Y?.inputRequired),Y?.cacheHints!==void 0){for(let[z,U]of Object.entries(Y.cacheHints))if(U!==void 0)YS(U,`cacheHints['${z}']`);this._cacheHints=Y.cacheHints}if(this.setRequestHandler("initialize",(z)=>this._oninitialize(z)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),rh(this._supportedProtocolVersions).length>0)this.setRequestHandler("server/discover",()=>this._ondiscover());if(this._capabilities.logging)this._registerLoggingHandler()}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async($,Y)=>{let z=Y.sessionId||Y.http?.req?.headers.get("mcp-session-id")||void 0,{level:U}=$.params,Q=yO(T7,U);if(Q.success)this._loggingLevels.set(z,Q.data);return{}})}buildContext($,Y){let z=$.http||Y?.request||Y?.closeSSEStream||Y?.closeStandaloneSSEStream;return{...$,mcpReq:{...$.mcpReq,log:(U,Q,J)=>{if(!this._capabilities.logging)return Promise.resolve();let I;if(this._servedModernEra()){if(I=$.mcpReq.envelope?.[N7],I===void 0)return Promise.resolve()}else I=this._loggingLevels.get($.sessionId)??this._loggingLevels.get(void 0);if(I!==void 0&&this.LOG_LEVEL_SEVERITY.get(U)this.elicitInput(U,Q),requestSampling:(U,Q)=>this.createMessage(U,Q)},http:z?{...$.http,req:Y?.request,closeSSE:Y?.closeSSEStream,closeStandaloneSSE:Y?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(T7.options.map(($,Y)=>[$,Y]));isMessageIgnored=($,Y)=>{let z=this._loggingLevels.get(Y);return z?this.LOG_LEVEL_SEVERITY.get($){let I=await Y(Q,J);if(t9(I))throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return I};return async(Q,J)=>{let I=U?await this._invokeInputRequiredCapableHandler($,Y,Q,J):await Y(Q,J);if(t9(I)){if(!U)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return I}return z===void 0?I:CO(I,z)}}return async(z,U)=>{let Q=C7(this._negotiatedProtocolVersion),J=Q.validateRequest("tools/call",z);if(!J.ok)throw new J1(J.reason==="not-in-era"?c0.InternalError:c0.InvalidParams,J.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${J.message}`);let I=await this._invokeInputRequiredCapableHandler("tools/call",Y,z,U);if(t9(I))return I;let K=sh(I),G=Q.validateResult("tools/call",K);if(!G.ok)throw new J1(G.reason==="not-in-era"?c0.InternalError:c0.InvalidParams,G.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${G.message}`);return G.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&xQ(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler($,Y,z,U){let Q=this._servedModernEra(),J=U.mcpReq.requestState();if(J!==void 0&&typeof J!=="string")throw new J1(c0.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let I=U;if(typeof J==="string"){let X=await this._verifyRequestState(J,U,$);if(X!==void 0)I=WS(U,X)}let K;try{K=await Y(z,I)}catch(X){if(X instanceof J1&&X.code===c0.UrlElicitationRequired){if(!Q)throw X;throw new J1(c0.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw X}if(!t9(K))return K;if(!Q){if(!this._inputRequiredServing.legacyShim)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??xY}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill($,Y,z,I,K)}let G=K.inputRequests,H=G!=null&&Object.keys(G).length>0,W=typeof K.requestState==="string";if(!H&&!W)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(H){let X=this._inputRequestCapabilityView(U);for(let[Z,q]of Object.entries(G)){let{embedded:V,required:F}=pe($,Z,q),w=EO(F,X);if(w!==void 0)throw new _O({requiredCapabilities:w},`Cannot request input '${Z}' (${V.method}): the request's client capabilities do not declare the required capability`)}}return K}async _verifyRequestState($,Y,z){if(this._requestStateVerify===void 0)return;try{return await this._requestStateVerify($,Y)}catch(U){throw this.onerror?.(Error(`requestState verification rejected ${z}: ${U instanceof Error?U.message:String(U)}`)),new J1(c0.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView($){return this._servedModernEra()?$.mcpReq.envelope?.[s9]:this._clientCapabilities}_assertPushApiInServedEra($){if(this._servedModernEra())throw new L1(B1.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${$}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:$,era:"2026-07-28"})}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new L1(B1.CapabilityNotSupported,`Client does not support sampling (required for ${$})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new L1(B1.CapabilityNotSupported,`Client does not support elicitation (required for ${$})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new L1(B1.CapabilityNotSupported,`Client does not support listing roots (required for ${$})`);break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/message":if(!this._capabilities.logging)throw new L1(B1.CapabilityNotSupported,`Server does not support logging (required for ${$})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new L1(B1.CapabilityNotSupported,`Server does not support notifying about resources (required for ${$})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new L1(B1.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${$})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new L1(B1.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${$})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new L1(B1.CapabilityNotSupported,`Client does not support URL elicitation (required for ${$})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){switch($){case"completion/complete":if(!this._capabilities.completions)throw new L1(B1.CapabilityNotSupported,`Server does not support completions (required for ${$})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new L1(B1.CapabilityNotSupported,`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new L1(B1.CapabilityNotSupported,`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new L1(B1.CapabilityNotSupported,`Server does not support resources (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new L1(B1.CapabilityNotSupported,`Server does not support tools (required for ${$})`);break;case"ping":case"initialize":break}}async _oninitialize($){let Y=$.params.protocolVersion;this._clientCapabilities=$.params.capabilities,this._clientVersion=$.params.clientInfo;let z=xt(this._supportedProtocolVersions),U=z.includes(Y)?Y:z[0]??xY;return this._negotiatedProtocolVersion=U,this.transport?.setProtocolVersion?.(U),{protocolVersion:U,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:rh(this._supportedProtocolVersions),capabilities:mi0(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult($,Y){return this._wireCodec().projectCallToolResult($,Y)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage($,Y){if(this._assertPushApiInServedEra("sampling/createMessage"),($.tools||$.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new L1(B1.CapabilityNotSupported,"Client does not support sampling tools capability.");if($.messages.length>0){let J=$.messages.at(-1),I=Array.isArray(J.content)?J.content:[J.content],K=I.some((X)=>X.type==="tool_result"),G=$.messages.length>1?$.messages.at(-2):void 0,H=G?Array.isArray(G.content)?G.content:[G.content]:[],W=H.some((X)=>X.type==="tool_use");if(K){if(I.some((X)=>X.type!=="tool_result"))throw new J1(c0.InvalidParams,"The last message must contain only tool_result content if any is present");if(!W)throw new J1(c0.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(W){let X=new Set(H.filter((q)=>q.type==="tool_use").map((q)=>q.id)),Z=new Set(I.filter((q)=>q.type==="tool_result").map((q)=>q.toolUseId));if(X.size!==Z.size||![...X].every((q)=>Z.has(q)))throw new J1(c0.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let z=Boolean($.tools||$.toolChoice),U=await this.request({method:"sampling/createMessage",params:$},Y),Q=this._wireCodec().samplingResultVariant(z,U);if(!Q.ok)throw new L1(B1.InvalidResult,`Invalid sampling/createMessage result: ${Q.reason==="invalid"?Q.message:Q.reason}`);return Q.value}async elicitInput($,Y){switch(this._assertPushApiInServedEra("elicitation/create"),$.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new L1(B1.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new L1(B1.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg($,Y)}async _sendElicitationLeg($,Y,z){let U=$.mode??"form",Q=z?.validateAcceptedContent??!0;switch(U){case"url":{let J=$;return this.request({method:"elicitation/create",params:J},Y)}case"form":{let J=$.mode==="form"?$:{...$,mode:"form"},I=await this.request({method:"elicitation/create",params:J},Y);if(Q&&I.action==="accept"&&I.content&&J.requestedSchema)try{let K=this._jsonSchemaValidator.getValidator(J.requestedSchema)(I.content);if(!K.valid)throw new J1(c0.InvalidParams,`Elicitation response content does not match requested schema: ${K.errorMessage}`)}catch(K){if(K instanceof J1)throw K;throw new J1(c0.InternalError,`Error validating elicitation response: ${K instanceof Error?K.message:String(K)}`)}return I}}}createElicitationCompletionNotifier($,Y){if(!this._clientCapabilities?.elicitation?.url)throw new L1(B1.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:$}},Y)}async listRoots($,Y){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:$},Y)}async sendLoggingMessage($,Y){if(this._capabilities.logging&&!this.isMessageIgnored($.level,Y))return this.notification({method:"notifications/message",params:$})}async sendResourceUpdated($){return this.notification({method:"notifications/resources/updated",params:$})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};ke={type:"object",properties:{}};wH={completion:{values:[],hasMore:!1}}});var oe=m(()=>{CS();xO();pO()});function si0($){let Y=$.params;if($.method==="initialize"&&!KS(Y)){let J=Y!==null&&typeof Y==="object"&&typeof Y.protocolVersion==="string"?Y.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...J!==void 0&&{requestedVersion:J}}}if(!vO(Y))return{kind:"legacy",reason:"no-claim"};let z=cY(Y),U=(z===void 0?[]:SO(z))[0];if(U!==void 0)return{kind:"invalid-envelope",issue:U};let Q=hO(Y);if(Q===void 0||!R7.includes(Q))return{kind:"unsupported-revision",requested:Q??"unknown"};return{kind:"modern",revision:Q,classification:{era:"modern",revision:Q}}}function se($,Y={}){let z=Y.legacy??"serve",U=Y.transport??new oi0,Q={phase:"opening"},J,I=!1,K=()=>I||Q.phase==="closed",G=(T)=>{try{Y.onerror?.(T)}catch{}},H=(T,C,b,k)=>U.send({jsonrpc:"2.0",id:T,error:{code:C,message:b,...k!==void 0&&{data:k}}}).catch((S)=>G(I5(S))),W=new ce(Y.maxSubscriptions??dO),X=(T)=>{if(!_7(T))return;let C=W.routeOutbound(T);if(C==="passthrough")return;for(let b of C)U.send({jsonrpc:"2.0",...b}).catch((k)=>G(I5(k)));return"handled"},Z=async(T)=>{if(B$(T)&&T.method==="subscriptions/listen"){let C=cY(T.params),b=vO(T.params)?(C===void 0?[]:SO(C))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},k=hO(T.params),S;if(b!==void 0)S={jsonrpc:"2.0",id:T.id,error:{code:-32602,message:`Invalid _meta envelope: ${b.key}: ${b.problem}`}};else if(k===void 0||!R7.includes(k)){let i=new fQ({supported:[...R7],requested:k??"unknown"});S={jsonrpc:"2.0",id:T.id,error:{code:i.code,message:i.message,data:i.data}}}else S=W.serve(T);return await U.send("error"in S?S:{jsonrpc:"2.0",method:S.method,params:S.params}).catch((i)=>G(I5(i))),!0}if(_7(T)&&T.method==="notifications/cancelled"){let C=T.params?.requestId;if(C!==void 0&&W.cancel(C))return!0}return!1},q=(T,C,b)=>{let k=GS({kind:"legacy",reason:C,...b!==void 0&&{requestedVersion:b}},R7);if(k===void 0)return Promise.resolve();return G(Error(`Rejected 2025-era request on a modern-only stdio connection (${k.cell}): ${k.message}`)),H(T.id,k.code,k.message,k.data)},V=(T)=>{if(I||T===J)return;j()},F=async(T,C)=>{let b=await $({era:T}),k=b instanceof MH?b.server:b;if(T==="modern")XS(k,C),TS(k,R7),W.setServerCapabilities(k.getCapabilities(),ES(k));let S=new ri0(U,()=>V(S),T==="modern"?X:void 0);return await b.connect(S),{product:b,channel:S}},w=(T)=>T.product.close().catch((C)=>G(I5(C))),O=async(T)=>{J=T.channel;try{if(!await T.channel.whenRequestsAnswered(re))G(Error(`Discarded the probe instance with requests still unanswered after ${re}ms; continuing with the fallback`));await T.product.close()}catch(C){G(I5(C))}finally{J=void 0}},N=async(T)=>{if(Q.phase==="closed")return;if(Q.phase==="pinned"){if(Q.era==="modern"&&B$(T)&&T.method==="initialize"&&!KS(T.params)){await q(T,"initialize",T.params!==null&&typeof T.params==="object"&&typeof T.params.protocolVersion==="string"?T.params.protocolVersion:void 0);return}if(Q.era==="modern"&&await Z(T))return;Q.instance.channel.deliver(T);return}if(!B$(T)&&!_7(T)){G(Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let C=si0(T);switch(C.kind){case"invalid-envelope":{let b=`Invalid _meta envelope for protocol revision 2026-07-28: ${C.issue.key}: ${C.issue.problem}`;if(B$(T))await H(T.id,c0.InvalidParams,b,{envelope:C.issue});else G(Error(`Discarded a notification with a malformed envelope: ${b}`));return}case"unsupported-revision":if(B$(T)){let b=new fQ({supported:[...R7],requested:C.requested});G(b),await H(T.id,b.code,b.message,b.data)}else G(Error(`Discarded a notification claiming unsupported protocol revision ${C.requested}`));return;case"modern":if(B$(T)&&T.method==="server/discover"){if(Q.phase==="probe"){Q.instance.channel.deliver(T,{classification:C.classification});return}let b=await F("modern",C.revision);if(K()){await w(b);return}Q={phase:"probe",instance:b},b.channel.deliver(T,{classification:C.classification});return}if(Q.phase==="probe"){if(_7(T)){Q.instance.channel.deliver(T,{classification:C.classification});return}Q={phase:"pinned",era:"modern",instance:Q.instance}}else{let b=await F("modern",C.revision);if(K()){await w(b);return}Q={phase:"pinned",era:"modern",instance:b}}if(await Z(T))return;Q.instance.channel.deliver(T,{classification:C.classification});return;case"legacy":{if(z==="reject"){if(B$(T))await q(T,C.reason,C.requestedVersion);return}if(Q.phase==="probe"){if(await O(Q.instance),K())return;Q={phase:"opening"}}let b=await F("legacy");if(K()){await w(b);return}Q={phase:"pinned",era:"legacy",instance:b},Q.instance.channel.deliver(T);return}}},M=[],D=!1,P=async()=>{if(D)return;D=!0;try{while(M.length>0){let T=M.shift();try{await N(T)}catch(C){if(B$(T))await H(T.id,c0.InternalError,"Internal server error");G(I5(C))}}}finally{D=!1}},j=async()=>{if(I||Q.phase==="closed")return;I=!0;let T=Q;Q={phase:"closed"};for(let C of W.teardownAll())await U.send(C).catch((b)=>G(I5(b)));if(T.phase==="probe"||T.phase==="pinned")await T.instance.product.close().catch((C)=>G(I5(C)));await U.close().catch((C)=>G(I5(C)))};U.onmessage=(T)=>{M.push(T),P()},U.onerror=(T)=>{if(G(T),Q.phase==="probe"||Q.phase==="pinned")Q.instance.channel.onerror?.(T)},U.onclose=()=>{if(I||Q.phase==="closed")return;I=!0;let T=Q;if(Q={phase:"closed"},T.phase==="probe"||T.phase==="pinned")T.instance.product.close().catch((C)=>G(I5(C)))};let A=U.start().catch((T)=>{throw G(I5(T)),T});return A.catch(()=>{}),{close:async()=>{await A.catch(()=>{}),await j()}}}function I5($){return $ instanceof Error?$:Error(String($))}var oi0=class{_readBuffer;_started=!1;_closed=!1;constructor($=BS.stdin,Y=BS.stdout,z){this._stdin=$,this._stdout=Y,this._readBuffer=new VS({maxBufferSize:z?.maxBufferSize})}onclose;onerror;onmessage;_ondata=($)=>{try{this._readBuffer.append($),this.processReadBuffer()}catch(Y){this.onerror?.(Y),this.close().catch(()=>{})}};_onerror=($)=>{this.onerror?.($)};_onstdouterror=($)=>{this.onerror?.($),this.close().catch(()=>{})};async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._closed)return;if(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdout.off("error",this._onstdouterror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send($){if(this._closed)return Promise.reject(Error("StdioServerTransport is closed"));return new Promise((Y,z)=>{let U=LS($),Q=!1,J=(K)=>{if(Q)return;Q=!0,this._stdout.off("error",J),this._stdout.off("drain",I),z(K)},I=()=>{if(Q)return;Q=!0,this._stdout.off("error",J),this._stdout.off("drain",I),Y()};if(this._stdout.once("error",J),this._stdout.write(U)){if(Q)return;Q=!0,this._stdout.off("error",J),Y()}else if(!Q)this._stdout.once("drain",I)})}},re=3000,ri0=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor($,Y,z){this._wire=$,this._onInstanceClose=Y,this._outboundIntercept=z}async start(){}async send($,Y){if(qH($)||gO($)){let{id:z}=$;if(z!==void 0)this._settle(z)}if(this._closed)return;if(this._outboundIntercept?.($)==="handled")return;return this._wire.send($,Y)}setProtocolVersion=($)=>{this._wire.setProtocolVersion?.($)};deliver($,Y){if(this._closed)return;if(B$($))this._pendingRequests.add($.id);else if(_7($)&&$.method==="notifications/cancelled"){let z=$.params?.requestId;if(z!==void 0)this._settle(z)}this.onmessage?.($,Y)}async whenRequestsAnswered($){if(this._closed||this._pendingRequests.size===0)return!0;return await new Promise((Y)=>{let z=()=>{clearTimeout(U),Y(!0)},U=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter((Q)=>Q!==z),Y(!1)},$);this._drainWaiters.push(z)})}async close(){if(this._closed)return;this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}_settle($){if(this._pendingRequests.delete($),this._pendingRequests.size===0)this._releaseDrainWaiters()}_releaseDrainWaiters(){let $=this._drainWaiters;this._drainWaiters=[];for(let Y of $)Y()}};var ae=m(()=>{CS();xO();pO()});var P$=m(()=>{vL();vL()});var e9;var NH=m(()=>{e9=class e9 extends Error{name="KyError";get isKyError(){return!0}}});var D6;var mO=m(()=>{NH();D6=class D6 extends e9{name="HTTPError";response;request;options;data;constructor($,Y,z){let U=$.status||$.status===0?$.status:"",Q=$.statusText??"",J=`${U} ${Q}`.trim(),I=J?`status code ${J}`:"an unknown error";super(`Request failed with ${I}: ${Y.method} ${Y.url}`);this.response=$,this.request=Y,this.options=z}}});var DH;var RS=m(()=>{NH();DH=class DH extends e9{name="NetworkError";request;constructor($,Y){super(`Request failed due to a network error: ${$.method} ${$.url}`,Y);this.request=$}}});var AH;var _S=m(()=>{AH=class AH extends Error{name="NonError";value;constructor($){let Y="Non-error value was thrown";try{if(typeof $==="string")Y=$;else if($&&typeof $==="object"&&"message"in $&&typeof $.message==="string")Y=$.message}catch{}super(Y);this.value=$}}});var iQ;var te=m(()=>{NH();_S();iQ=class iQ extends e9{name="ForceRetryError";customDelay;code;customRequest;constructor($){let Y=$?.cause?$.cause instanceof Error?$.cause:new AH($.cause):void 0;super($?.code?`Forced retry: ${$.code}`:"Forced retry",Y?{cause:Y}:void 0);this.customDelay=$?.delay,this.code=$?.code,this.customRequest=$?.request}}});var vS;var ee=m(()=>{vS=class vS extends Error{name="SchemaValidationError";issues;constructor($){super("Response schema validation failed");this.issues=$}}});var K5;var lO=m(()=>{NH();K5=class K5 extends e9{name="TimeoutError";request;constructor($){super(`Request timed out: ${$.method} ${$.url}`);this.request=$}}});class aO{options;constructor($){this.options=$}}var hS,$00,oO,Y00,z00,rO,ai0=()=>{return},U00,nQ=2147483647,Q00=40,sO,J00=($)=>new aO($),I00,K00;var pY=m(()=>{hS=(()=>{let $=!1,Y=!1,z=typeof globalThis.ReadableStream==="function",U=typeof globalThis.Request==="function";if(z&&U)try{Y=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type")}catch(Q){if(Q instanceof Error&&Q.message==="unsupported BodyInit type")return!1;throw Q}return $&&!Y})(),$00=typeof globalThis.AbortController==="function",oO=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",Y00=typeof globalThis.ReadableStream==="function",z00=typeof globalThis.FormData==="function",rO=["get","post","put","patch","head","delete"];ai0();U00={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},sO=Symbol("stop");I00={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},K00={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0}});var tO,ti0=($)=>{if(!$)return 0;if($ instanceof FormData){let Y=0;for(let[z,U]of $)Y+=Q00,Y+=tO.encode(`Content-Disposition: form-data; name="${z}"`).byteLength,Y+=typeof U==="string"?tO.encode(U).byteLength:U.size;return Y}if($ instanceof Blob)return $.size;if($ instanceof ArrayBuffer||ArrayBuffer.isView($))return $.byteLength;if(typeof $==="string")return tO.encode($).byteLength;if($ instanceof URLSearchParams)return tO.encode($.toString()).byteLength;return 0},G00=($,Y,z)=>{let U,Q=0;return $.pipeThrough(new TransformStream({transform(J,I){if(I.enqueue(J),U){Q+=U.byteLength;let K=Y===0?0:Q/Y;if(K>=1)K=1-Number.EPSILON;z?.({percent:K,totalBytes:Math.max(Y,Q),transferredBytes:Q},U)}U=J},flush(){if(U)Q+=U.byteLength,z?.({percent:1,totalBytes:Math.max(Y,Q),transferredBytes:Q},U)}}))},H00=($,Y)=>{if(!$.body)return $;let z={status:$.status,statusText:$.statusText,headers:$.headers};if($.status===204)return new Response(null,z);let U=Math.max(0,Number($.headers.get("content-length"))||0);return new Response(G00($.body,U,Y),z)},W00=($,Y,z)=>{if(!$.body)return $;let U=ti0(z??$.body);return new Request($,{duplex:"half",body:G00($.body,U,Y)})};var X00=m(()=>{pY();tO=new TextEncoder});var r5=($)=>$!==null&&typeof $==="object";function BH($,Y,z){return Object.hasOwn(Y,z)&&Y[z]===void 0?[]:kS($[z]??[],Y[z]??[])}var ei0,SS=($)=>r5($)&&$[ei0]===!0?{isReplace:!0,value:$.value}:{isReplace:!1,value:$},PH=(...$)=>{for(let Y of $)if((!r5(Y)||Array.isArray(Y))&&Y!==void 0)throw TypeError("The `options` argument must be an object");return kS({},...$)},yS=($={},Y={})=>{let z=new globalThis.Headers($),U=Y instanceof globalThis.Headers,Q=new globalThis.Headers(Y);for(let[J,I]of Q.entries())if(U&&I==="undefined"||I===void 0)z.delete(J);else z.set(J,I);return z},gS=($)=>{if(!r5($)||Array.isArray($))return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null},cQ=($)=>{if($ instanceof URLSearchParams){let Y=new URLSearchParams($),z=$[h7];if(z)Y[h7]=new Set(z);return Y}if($ instanceof globalThis.Headers)return new globalThis.Headers($);if(Array.isArray($))return[...$];if(gS($))return{...$};return $},$n0=($)=>Object.fromEntries(Object.entries($).filter((Y)=>Y[1]!==void 0)),Yn0=($,Y)=>{if(gS($)&&gS(Y))return $n0({...$,...Y});return yS($,Y)},eO=($={},Y={})=>({init:BH($,Y,"init"),beforeRequest:BH($,Y,"beforeRequest"),beforeRetry:BH($,Y,"beforeRetry"),beforeError:BH($,Y,"beforeError"),afterResponse:BH($,Y,"afterResponse")}),h7,zn0=($,Y)=>{let z=new URLSearchParams,U=new Set;for(let Q of[$,Y]){if(Q===void 0)continue;if(Q instanceof URLSearchParams){for(let[I,K]of Q.entries())z.append(I,K),U.delete(I);let J=Q[h7];if(J)for(let I of J)z.delete(I),U.add(I)}else if(Array.isArray(Q))for(let J of Q){if(!Array.isArray(J)||J.length!==2)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");z.append(String(J[0]),String(J[1])),U.delete(String(J[0]))}else if(r5(Q))for(let[J,I]of Object.entries(Q))if(I===void 0)z.delete(J),U.add(J);else z.append(J,String(I)),U.delete(J);else{let J=new URLSearchParams(Q);for(let[I,K]of J.entries())z.append(I,K),U.delete(I)}}if(U.size>0)z[h7]=U;return z},kS=(...$)=>{let Y={},z={},U={},Q,J=[];for(let I of $)if(Array.isArray(I)){if(!Array.isArray(Y))Y=[];Y=[...Y,...I]}else if(r5(I)){for(let[K,G]of Object.entries(I)){if(K==="signal"&&G instanceof globalThis.AbortSignal){J.push(G);continue}let H=SS(G),{isReplace:W}=H;if(G=H.value,K==="context"){if(G!==void 0&&G!==null&&(!r5(G)||Array.isArray(G)))throw TypeError("The `context` option must be an object");Y={...Y,context:G===void 0||G===null?{}:W?{...G}:{...Y.context,...G}};continue}if(K==="searchParams"){if(G===void 0||G===null)Q=void 0;else if(W)Q=G;else Q=Q===void 0?G:zn0(Q,G);continue}if(r5(G)&&!W&&K in Y)G=kS(Y[K],G);Y={...Y,[K]:G}}if(r5(I.hooks)){let{value:K,isReplace:G}=SS(I.hooks);U=G?eO({},K):eO(U,K),Y.hooks=U}if(r5(I.headers)){let{value:K,isReplace:G}=SS(I.headers);z=G?cQ(K):Yn0(z,K),Y.headers=z}}if(Q!==void 0)Y.searchParams=Q;if(J.length>0)if(J.length===1)Y.signal=J[0];else if(oO)Y.signal=AbortSignal.any(J);else Y.signal=J.at(-1);return Y};var $w=m(()=>{pY();ei0=Symbol("replaceOption");h7=Symbol("deletedParameters")});var q00=($)=>rO.includes($)?$.toUpperCase():$,Un0,Qn0,Jn0,Z00,V00=($={})=>{if(typeof $==="number")return{...Z00,limit:$};if($.methods&&!Array.isArray($.methods))throw Error("retry.methods must be an array");if($.statusCodes&&!Array.isArray($.statusCodes))throw Error("retry.statusCodes must be an array");let Y=Object.fromEntries(Object.entries({...$,methods:$.methods?.map((z)=>z.toLowerCase())}).filter(([,z])=>z!==void 0));return{...Z00,...Y}};var L00=m(()=>{pY();Un0=["get","put","head","delete","options","trace"],Qn0=[408,413,429,500,502,503,504],Jn0=[413,429,503],Z00={limit:2,methods:Un0,statusCodes:Qn0,afterStatusCodes:Jn0,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:($)=>0.3*2**($-1)*1000,jitter:void 0,retryOnTimeout:!1}});async function xS($,Y,z,U){return new Promise((Q,J)=>{let I=setTimeout(()=>{if(z)z.abort();J(new K5($))},U.timeout);U.fetch($,Y).then(Q).catch(J).then(()=>{clearTimeout(I)})})}var F00=m(()=>{lO()});async function Yw($,{signal:Y}){return new Promise((z,U)=>{if(Y)Y.throwIfAborted(),Y.addEventListener("abort",Q,{once:!0});function Q(){clearTimeout(J),U(Y.reason)}let J=setTimeout(()=>{Y?.removeEventListener("abort",Q),z()},$)})}var O00=($)=>{let Y={};for(let z in $){if(!Object.hasOwn($,z))continue;if(!(z in K00)&&!(z in I00))Y[z]=$[z]}return Y},w00=($)=>{if($===void 0)return!1;if(Array.isArray($))return $.length>0;if($ instanceof URLSearchParams)return $.size>0||Boolean($[h7]?.size);if(typeof $==="object")return Object.keys($).length>0;if(typeof $==="string")return $.trim().length>0;return Boolean($)};var M00=m(()=>{pY();$w()});function fS($){if(!($&&Kn0($)&&$.name==="TypeError"&&typeof $.message==="string"))return!1;let{message:z,stack:U}=$;if(z==="Load failed")return U===void 0||"__sentry_captured__"in $;if(z.startsWith("error sending request for url"))return!0;if(z==="Failed to fetch"||z.startsWith("Failed to fetch (")&&z.endsWith(")"))return!0;return Gn0.has(z)}var In0,Kn0=($)=>In0.call($)==="[object Error]",Gn0;var N00=m(()=>{In0=Object.prototype.toString,Gn0=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"])});function D00($){return uS($,D6)}function A00($){return uS($,DH)}function B00($){return uS($,K5)}var uS=($,Y)=>$ instanceof Y||$?.name===Y.name;var P00=m(()=>{mO();RS();lO()});function Vn0($){let Y={...$,json:cQ($.json),context:cQ($.context),headers:cQ($.headers),searchParams:qn0($.searchParams)};if($.retry!==void 0)Y.retry=Zn0($.retry);return Y}class pQ{static create($,Y){let z=Y.hooks?.init??[],U=z.length>0?Vn0(Y):Y;for(let K of z)K(U);let Q=new pQ($,U),J=async()=>{if(typeof Q.#$.timeout==="number"&&Q.#$.timeout>nQ)throw RangeError(`The \`timeout\` option cannot be greater than ${nQ}`);if(typeof Q.#$.totalTimeout==="number"&&Q.#$.totalTimeout>nQ)throw RangeError(`The \`totalTimeout\` option cannot be greater than ${nQ}`);await Promise.resolve();let K=await Q.#g(),G=K??await Q.#h(async()=>Q.#R()),H=K!==void 0||Q.#C();for(;;){if(G===void 0)return G;if(TH(G))try{G=await Q.#y(G)}catch(X){if(!(X instanceof iQ))throw X;let Z=await Q.#E(X,async()=>Q.#R());if(Z===void 0)return Z;G=Z,H=Q.#C();continue}let W=G;if(!W.ok&&W.type!=="opaque"&&(typeof Q.#$.throwHttpErrors==="function"?Q.#$.throwHttpErrors(W.status):Q.#$.throwHttpErrors)){let X=new D6(W,Q.#M(W),Q.#w()),Z=X;if(X.data=await Q.#L(W),H)throw Z;let q=await Q.#E(X,async()=>Q.#R());if(q===void 0)return q;G=q,H=Q.#C();continue}break}if(!TH(G))return G;if(Q.#V(G),Q.#$.onDownloadProgress){if(typeof Q.#$.onDownloadProgress!=="function")throw TypeError("The `onDownloadProgress` option must be a function");if(!Y00)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let W=G.clone();return Q.#K(G),H00(W,Q.#$.onDownloadProgress)}return G},I=(async()=>{try{return await J()}catch(K){if(!(K instanceof Error))throw K;if(Q.#X.has(K))throw K;let G=K;for(let H of Q.#$.hooks.beforeError){let W=await H({request:Q.request,options:Q.#w(),error:G,retryCount:Q.#Q});if(W instanceof Error)G=W}throw G}finally{let K=Q.#W;if(Q.#F(K?.body??void 0),Q.request!==K)Q.#F(Q.request.body??void 0)}})();for(let[K,G]of Object.entries(U00)){if(K==="bytes"&&typeof globalThis.Response?.prototype?.bytes!=="function")continue;I[K]=async(H)=>{Q.request.headers.set("accept",Q.request.headers.get("accept")||G);let W=await I;if(K!=="json")return W[K]();let X=await W.text();if(X===""){if(H!==void 0)return E00(void 0,H);return JSON.parse(X)}let Z=U.parseJson?await U.parseJson(X,{request:Q.#M(W),response:W}):JSON.parse(X);return H===void 0?Z:E00(Z,H)}}return I}static#U($){if($&&typeof $==="object"&&!Array.isArray($)&&!($ instanceof URLSearchParams))return Object.fromEntries(Object.entries($).filter(([,Y])=>Y!==void 0));return $}request;#z;#Q=0;#Y;#$;#W;#H;#X=new WeakSet;#J;#I;#Z=!1;#N=new WeakMap;constructor($,Y={}){if(this.#Y=$,Object.hasOwn(Y,"prefixUrl"))throw Error(Wn0);if(this.#$={...Y,headers:yS(this.#Y.headers,Y.headers),hooks:eO({},Y.hooks),method:q00(Y.method??this.#Y.method??"GET"),prefix:String(Y.prefix||""),retry:V00(Y.retry),throwHttpErrors:Y.throwHttpErrors??!0,timeout:Y.timeout??1e4,totalTimeout:Y.totalTimeout??!1,fetch:Y.fetch??globalThis.fetch.bind(globalThis),context:Y.context??{}},typeof this.#Y!=="string"&&!(this.#Y instanceof URL||this.#Y instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(typeof this.#Y==="string"){if(this.#$.prefix){let U=this.#$.prefix.replace(/\/+$/,""),Q=this.#Y.replace(/^\/+/,"");this.#Y=`${U}/${Q}`}if(this.#$.baseUrl){let U;try{U=new URL(this.#Y)}catch{}if(!U)this.#Y=new URL(this.#Y,new Request(this.#$.baseUrl).url)}}if($00&&oO)this.#H=this.#$.signal??this.#Y.signal,this.#z=new globalThis.AbortController,this.#$.signal=this.#O();if(hS)this.#$.duplex="half";if(this.#$.json!==void 0)this.#$.body=this.#$.stringifyJson?.(this.#$.json)??JSON.stringify(this.#$.json),this.#$.headers.set("content-type",this.#$.headers.get("content-type")??"application/json");let z=Y.headers&&new globalThis.Headers(Y.headers).has("content-type");if(this.#Y instanceof globalThis.Request&&(z00&&this.#$.body instanceof globalThis.FormData||this.#$.body instanceof URLSearchParams)&&!z)this.#$.headers.delete("content-type");if(this.request=new globalThis.Request(this.#Y,this.#$),w00(this.#$.searchParams)){let U=new URL(this.request.url),Q=this.#$.searchParams?.[h7];if(Q)for(let J of Q)U.searchParams.delete(J);if(typeof this.#$.searchParams==="string"){let J=this.#$.searchParams.replace(/^\?/,"");if(J!=="")U.search=U.search?`${U.search}&${J}`:`?${J}`}else{let J=new URLSearchParams(pQ.#U(this.#$.searchParams));for(let[I,K]of J.entries())U.searchParams.append(I,K)}if(this.#$.searchParams&&typeof this.#$.searchParams==="object"&&!Array.isArray(this.#$.searchParams)&&!(this.#$.searchParams instanceof URLSearchParams)){for(let[J,I]of Object.entries(this.#$.searchParams))if(I===void 0)U.searchParams.delete(J)}this.request=new globalThis.Request(U,this.#$)}if(this.#$.onUploadProgress&&typeof this.#$.onUploadProgress!=="function")throw TypeError("The `onUploadProgress` option must be a function");this.#I=typeof this.#$.totalTimeout==="number"?this.#S():void 0}#G(){let $=this.#$.retry.delay(this.#Q+1),Y=$;if(this.#$.retry.jitter===!0)Y=Math.random()*$;else if(typeof this.#$.retry.jitter==="function"){if(Y=this.#$.retry.jitter($),!Number.isFinite(Y)||Y<0)Y=$}return Math.min(this.#$.retry.backoffLimit,Y)}async#P($){if(this.#Q>=this.#$.retry.limit)throw $;let Y=$ instanceof Error?$:new AH($);if(Y instanceof iQ)return Y.customDelay??this.#G();if(!this.#$.retry.methods.includes(this.request.method.toLowerCase()))throw $;if(this.#$.retry.shouldRetry!==void 0){let z=await this.#$.retry.shouldRetry({error:Y,retryCount:this.#Q+1});if(z===!1)throw $;if(z===!0)return this.#G()}if(B00($)){if(!this.#$.retry.retryOnTimeout)throw $;return this.#G()}if(D00($)){if(!this.#$.retry.statusCodes.includes($.response.status))throw $;let z=$.response.headers.get("Retry-After")??$.response.headers.get("RateLimit-Reset")??$.response.headers.get("X-RateLimit-Retry-After")??$.response.headers.get("X-RateLimit-Reset")??$.response.headers.get("X-Rate-Limit-Reset");if(z&&this.#$.retry.afterStatusCodes.includes($.response.status)){let U=Number(z)*1000;if(Number.isNaN(U))U=Date.parse(z)-Date.now();else if(U>=Date.parse("2024-01-01"))U-=Date.now();if(!Number.isFinite(U))return Math.min(this.#$.retry.maxRetryAfter,this.#G());return U=Math.max(0,U),Math.min(this.#$.retry.maxRetryAfter,U)}if($.response.status===413)throw $;return this.#G()}if(!A00($))throw $;return this.#G()}#V($){let Y=this.#M($);if(this.#$.parseJson)$.json=async()=>{let z=await $.text();if(z==="")return JSON.parse(z);return this.#$.parseJson(z,{request:Y,response:$})};return $}async#L($){let Y=await this.#j($,this.#D());if(Y===jH){this.#q();return}if(!Y)return;if(!this.#A($.headers.get("content-type")??""))return Y;let z=await this.#T(Y,$,this.#D(),this.#M($));if(z===jH){this.#q();return}return z}#D(){let $=this.#$.timeout===!1?1e4:this.#$.timeout,Y=this.#B();if(Y===void 0)return $;if(Y<=0)throw new K5(this.request);return Math.min($,Y)}#A($){let Y=($.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(Y)}async#j($,Y){let{body:z}=$;if(!z)try{return await $.text()}catch{return}let U;try{U=z.getReader()}catch{return}let Q=Xn0($.headers.get("content-type")??""),J=[],I=0,K=(async()=>{try{for(;;){let{done:W,value:X}=await U.read();if(W)break;if(I+=X.byteLength,I>Hn0){U.cancel().catch(()=>{return});return}J.push(Q.decode(X,{stream:!0}))}}catch{return}return J.push(Q.decode()),J.join("")})(),G=new Promise((W)=>{let X=setTimeout(()=>{W(jH)},Y);K.finally(()=>{clearTimeout(X)})}),H=await Promise.race([K,G]);if(H===jH)U.cancel().catch(()=>{return});return H}async#T($,Y,z,U){let Q;try{return await Promise.race([Promise.resolve().then(()=>this.#$.parseJson?this.#$.parseJson($,{request:U,response:Y}):JSON.parse($)),new Promise((J)=>{Q=setTimeout(()=>{J(jH)},z)})])}catch{return}finally{clearTimeout(Q)}}#F($){if(!$)return;$.cancel().catch(()=>{return})}#K($){this.#F($.body??void 0)}#O(){return this.#H?AbortSignal.any([this.#H,this.#z.signal]):this.#z.signal}#q(){let $=this.#B();if($!==void 0&&$<=0)throw new K5(this.request)}async#g(){for(let $ of this.#$.hooks.beforeRequest){let Y=await $({request:this.request,options:this.#w(),retryCount:0});if(T00(Y))this.#_(Y);else if(TH(Y))return Y}return}async#y($){let Y=this.#M($);for(let z of this.#$.hooks.afterResponse){let U=this.#v($.clone(),Y);this.#V(U);let Q;try{Q=await z({request:this.request,options:this.#w(),response:U,retryCount:this.#Q})}catch(I){if(U!==$)this.#K(U);throw this.#K($),I}if(Q instanceof aO){if(U!==$)this.#K(U);throw this.#K($),new iQ(Q.options)}let J=TH(Q)?this.#v(Q,Y):$;if(U!==$&&U!==J&&U.body!==J.body)this.#K(U);if($!==J&&$.body!==J.body)this.#K($);$=J}return $}async#h($){try{return await $()}catch(Y){return this.#E(Y,$)}}async#E($,Y){this.#Z=!1;let z=Math.min(await this.#P($),nQ),U={signal:this.#H},Q=this.#B();if(Q!==void 0){if(Q<=0)throw new K5(this.request);if(z>=Q)throw await Yw(Q,U),new K5(this.request)}if(await Yw(z,U),this.#q(),$ instanceof iQ&&$.customRequest){let J=new globalThis.Request($.customRequest,this.#$.signal?{signal:this.#$.signal}:void 0);this.#_(J)}for(let J of this.#$.hooks.beforeRetry){let I;try{I=await J({request:this.request,options:this.#w(),error:$,retryCount:this.#Q+1})}catch(K){if(K instanceof Error&&K!==$)this.#X.add(K);throw K}if(T00(I)){this.#_(I);break}if(TH(I))return this.#Z=!0,this.#Q++,I;if(I===sO)return}return this.#q(),this.#Q++,this.#h(Y)}#C(){let $=this.#Z;return this.#Z=!1,$}async#R(){if(this.#z?.signal.aborted)this.#z=new globalThis.AbortController,this.#$.signal=this.#O(),this.request=new globalThis.Request(this.request,{signal:this.#$.signal});let $=O00(this.#$),Y=this.#$.retry.limit>0?this.request.clone():void 0,z=this.#k(this.request,this.#$.body??void 0);if(this.#W=z,Y)this.request=Y;try{let U=this.#B();if(U!==void 0&&U<=0)throw new K5(this.request);let Q=this.#$.timeout===!1?U:U===void 0?this.#$.timeout:Math.min(this.#$.timeout,U),J=Q===void 0?await this.#$.fetch(z,$):await xS(z,$,this.#z,{timeout:Q,fetch:this.#$.fetch});return this.#v(J,z)}catch(U){if(fS(U))throw new DH(this.request,{cause:U});throw U}}#B(){if(this.#I===void 0)return;let $=this.#S()-this.#I;return Math.max(0,this.#$.totalTimeout-$)}#S(){return globalThis.performance?.now()??Date.now()}#w(){if(!this.#J){let{hooks:$,json:Y,parseJson:z,stringifyJson:U,searchParams:Q,timeout:J,totalTimeout:I,throwHttpErrors:K,fetch:G,...H}=this.#$;this.#J=Object.freeze(H)}return this.#J}#_($){this.#J=void 0,this.request=$}#M($){return this.#N.get($)??this.request}#v($,Y){return this.#N.set($,Y),$}#k($,Y){if(!this.#$.onUploadProgress||!$.body||!hS)return $;return W00($,this.#$.onUploadProgress,Y??this.#$.body??void 0)}}var Hn0=10485760,Wn0="The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl",jH,Xn0=($)=>{let Y=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec($),z=Y?.[1]??Y?.[2];if(z)try{return new TextDecoder(z)}catch{}return new TextDecoder},j00="The `schema` argument must follow the Standard Schema specification",Zn0=($)=>{if(typeof $!=="object")return $;return{...$,...$.methods&&{methods:[...$.methods]},...$.statusCodes&&{statusCodes:[...$.statusCodes]},...$.afterStatusCodes&&{afterStatusCodes:[...$.afterStatusCodes]}}},C00,T00=($)=>$ instanceof globalThis.Request||C00.call($)==="[object Request]",TH=($)=>$ instanceof globalThis.Response||C00.call($)==="[object Response]",qn0=($)=>{if(Array.isArray($))return $.map((Y)=>[...Y]);return cQ($)},E00=async($,Y)=>{if(typeof Y!=="object"&&typeof Y!=="function"||Y===null)throw TypeError(j00);let z=Y["~standard"];if(typeof z!=="object"||z===null||typeof z.validate!=="function")throw TypeError(j00);let U=await z.validate($);if(U.issues)throw new vS(U.issues);return U.value};var R00=m(()=>{mO();RS();_S();te();ee();lO();X00();$w();L00();F00();M00();N00();P00();pY();jH=Symbol("timedOutResponseData"),C00=Object.prototype.toString});var bS=($)=>{let Y=(z,U)=>pQ.create(z,PH($,U));for(let z of rO)Y[z]=(U,Q)=>pQ.create(U,PH($,Q,{method:z}));return Y.create=(z)=>bS(PH(z)),Y.extend=(z)=>{if(typeof z==="function")z=z($??{});return bS(PH($,z))},Y.stop=sO,Y.retry=J00,Y},Ln0,G5;var dQ=m(()=>{R00();pY();$w();mO();/*! MIT License © Sindre Sorhus */Ln0=bS(),G5=Ln0});async function _00($){if($.source.type!=="direct"&&$.source.type!=="seal")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=$.seal.url??$.source.sealUrl,z=$.source.type==="seal"?$.source:void 0;return{token:$.source.token,expiresAt:Date.now()+$.source.expiresIn*1000,enterprise:{provider:z?"seal":"direct",corpId:$.source.corpId??$.id,staffId:$.source.staffId,sealUrl:Y,tenantId:z?.tenantId,tenantSlug:$.seal.tenantSlug??z?.tenantSlug,tenantName:z?.tenantName,raw:{sourceType:$.source.type}}}}function Fn0($){let Y=Object.entries($??{}).map(([z,U])=>`${z}=${U}`);return Y.length?Y.join("; "):void 0}function A6($){let Y={...$?.headers??{}},z=Fn0($?.cookies);if(z)Y.Cookie=z;return Y}var v00,On0,wn0,Mn0,Nn0,h00;var S00=m(()=>{P$();v00=L.object({token:L.string(),expiresAt:L.number(),url:L.string().url().optional()}),On0=L.object({provider:L.string(),corpId:L.string().optional(),staffId:L.string(),sealUrl:L.string().url(),tenantId:L.string().optional(),tenantSlug:L.string().optional(),tenantName:L.string().optional(),raw:L.unknown().optional()}),wn0=L.object({token:L.string(),expiresAt:L.number(),enterprise:On0}),Mn0=L.object({openapi:v00.optional(),closeapi:v00.optional()}),Nn0=L.object({seal:wn0.optional(),hose:Mn0.optional()}),h00=L.record(L.string(),Nn0)});import{existsSync as iS,mkdirSync as Dn0,readFileSync as An0,writeFileSync as Bn0}from"node:fs";import{dirname as Pn0,join as y00}from"node:path";import{homedir as k00}from"node:os";function jn0(){let $=(process.env.SEAL_USE_TOKEN_STORE??process.env.SEAL_HOME_TOKEN_STORE)?.trim();if($)return $;if(iS(zw))return zw;if(iS(g00))return g00;return zw}function Tn0(){let $=(process.env.SEAL_USE_TOKEN_STORE??process.env.SEAL_HOME_TOKEN_STORE)?.trim();if($)return $;return zw}function mQ(){let $=jn0();if(!iS($))return{};try{return h00.parse(JSON.parse(An0($,"utf-8")))}catch{return{}}}function Uw($){let Y=Tn0();Dn0(Pn0(Y),{recursive:!0,mode:448}),Bn0(Y,JSON.stringify($,null,2),{mode:384})}function x00($){return mQ()[$]?.seal}function f00($,Y){let z=mQ();Uw({...z,[$]:{...z[$],seal:Y}})}function u00($){let Y=mQ(),z=Y[$];if(!z)return;Uw({...Y,[$]:{...z,seal:void 0}})}function EH($){return mQ()[$]?.hose??{}}function nS($,Y){let z=mQ();Uw({...z,[$]:{...z[$],hose:Y}})}function Qw($){let Y=mQ();delete Y[$],Uw(Y)}var zw,g00;var CH=m(()=>{S00();zw=y00(k00(),".config","seal-use","seal_tokens.json"),g00=y00(k00(),".config","seal-home","seal_tokens.json")});function j$($){return $.replace(/\/+$/,"")}function n00($){let Y;try{Y=new URL($.trim())}catch{throw Error("Invalid Hose assistance link: expected a valid HTTPS URL")}if(Y.protocol!=="https:"||Y.port||!_n0(Y.hostname)||Y.pathname.replace(/\/+$/,"")!==Rn0)throw Error("Invalid Hose assistance link: expected an HTTPS */web/thirdparty.html URL from ekuaibao.com or hosecloud.com");let z=Y.searchParams.getAll("accessToken").filter(Boolean),U=Y.searchParams.getAll("ekbCorpId").filter(Boolean);if(z.length!==1||U.length!==1)throw Error("Invalid Hose assistance link: accessToken and ekbCorpId are required exactly once");let Q=U[0].trim().toLowerCase();if(!i00.test(Q))throw Error("Invalid Hose assistance link: ekbCorpId is not a valid tenant slug");return{corpId:Q,accessToken:z[0],baseUrl:Y.origin}}async function Jw($,Y){let z=typeof $==="string"?n00($):c00($),U=`https://${z.corpId}.sealai.cc`,J=await y6(U,void 0,Y?.customHeaders).get("api/auth/oauth2/session/oem-hosecloud",{searchParams:{token:z.accessToken,returnToken:"1"}}).json(),I=J.token??J.accessToken??J.data?.token??J.data?.accessToken;if(!I)throw Error("Seal SSO did not return a bearer token");let K=J.expiresIn??J.expires_in??J.data?.expiresIn??J.data?.expires_in??3600;return{corpId:z.corpId,sealUrl:U,token:I,expiresIn:Number.isFinite(K)&&K>0?K:3600}}function Iw($,Y){let z=Y.hoseCorpConfig&&typeof Y.hoseCorpConfig==="object"?Y.hoseCorpConfig:void 0,U=[Y.tenantSlug,z?.corporationId].filter((I)=>typeof I==="string"&&Boolean(I)),Q=$.trim().toLowerCase(),J=U.map((I)=>I.trim().toLowerCase()).filter(Boolean);if(J.length===0||J.some((I)=>I!==Q))throw Error("Hose assistance link tenant mismatch: the Seal tenant does not match ekbCorpId")}function _n0($){let Y=$.toLowerCase();return Cn0.some((z)=>Y.endsWith(z))}function c00($){let Y=typeof $?.corpId==="string"?$.corpId.trim().toLowerCase():"",z=typeof $?.accessToken==="string"?$.accessToken.trim():"",U=typeof $?.baseUrl==="string"&&$.baseUrl.trim()?$.baseUrl.trim():void 0;if(!i00.test(Y)||!z)throw Error("Invalid Hose assistance link: accessToken and ekbCorpId are required");return{corpId:Y,accessToken:z,...U?{baseUrl:U}:{}}}function p00($,Y=60){return Boolean($&&Date.now()<$.expiresAt-Y*1000)}function S7($,Y){if($.seal.url)return $.seal.url;if(Y.sealUrl)return Y.sealUrl;return`https://${Y.corpId.toLowerCase()}.sealai.cc`}function vn0($){return $.staffId.includes(":")?$.staffId:`${$.corpId}:${$.staffId}`}function d00($){return G5.create({prefix:j$($.domain),timeout:30000,hooks:{beforeError:[async({error:Y})=>{let z=Y instanceof D6?await Y.response.text().catch(()=>""):"";return Y.message=`${Y.message}${z?`: ${z}`:""}`,Y}]}})}async function hn0($){let Y=d00($),z=$.appKey??$.key,U=$.appSecurity??$.password;if(!z||!U)throw Error("Hose source requires appKey/key and appSecurity/password");let Q=await Y.post("api/openapi/v1/auth/getAccessToken",{json:{appKey:z,appSecurity:U}}).json(),J=Q.value?.accessToken??Q.accessToken??Q.token;if(!J)throw Error("Hose login did not return an access token");return{token:J,expiresAt:Date.now()+3600000}}async function lQ($){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=EH($.id);if(p00(Y.openapi))return Y.openapi.token;let z=cS.get($.id);if(z)return z;let U=hn0($.source).then((Q)=>{return nS($.id,{...EH($.id),openapi:Q}),Q.token}).finally(()=>cS.delete($.id));return cS.set($.id,U),U}async function Kw($,Y,z=7200){let U=d00($),Q=vn0($),I=(await U.post("api/openapi/v1.1/provisional/getProvisionalAuth",{searchParams:{accessToken:Y},json:{uid:Q,pageType:"home",expireDate:z}}).json()).value?.message;if(!I)throw Error("Hose CloseAPI did not return a provisional auth URL");let K=new URL(I).searchParams.get("accessToken");if(!K)throw Error("Hose provisional auth URL did not include accessToken");return{token:K,url:I,expiresAt:Date.now()+z*1000}}async function Gw($){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=$.source,z=EH($.id);if(p00(z.closeapi)&&z.closeapi.url)return z.closeapi;let U=pS.get($.id);if(U)return U;let Q=lQ($).then((J)=>Kw(Y,J)).then((J)=>{return nS($.id,{...EH($.id),closeapi:J}),J}).finally(()=>pS.delete($.id));return pS.set($.id,Q),Q}async function m00($,Y=7200,z){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);if(!Number.isFinite(Y)||Y<=0)throw Error(`Invalid expire seconds: ${Y}. Must be a positive integer.`);let U=await lQ($),Q=await Kw($.source,U,Y);if(!Q.url)throw Error("Hose provisional auth URL was not available");return{corpId:$.source.corpId,staffId:$.source.staffId,url:Q.url,token:Q.token,expiresIn:Y}}async function l00($){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=await Gw($),z=S7($,$.source),U=A6($.seal),J=await y6(z,void 0,U).get("api/auth/oauth2/session/oem-hosecloud",{searchParams:{token:Y.token,returnToken:"1"}}).json(),I=J.token??J.accessToken??J.data?.token??J.data?.accessToken;if(!I)throw Error("Seal SSO did not return a bearer token");let K=J.expiresIn??J.expires_in??J.data?.expiresIn??J.data?.expires_in??3600,G={provider:"hose",corpId:$.source.corpId,staffId:$.source.staffId,sealUrl:j$(z),tenantSlug:$.seal.tenantSlug,raw:{sourceType:"hose",hoseDomain:j$($.source.domain)}};return{token:I,expiresAt:Date.now()+K*1000,enterprise:G}}async function oQ($,Y,z){if(z){let I=j$(z),K=await b00(I,$,Y);if(!K)throw Error(`Failed to authenticate on specified domain: ${I}. Please verify appKey/appSecurity and domain connectivity.`);return K}let U=En0.map(async(I)=>{try{return await b00(I,$,Y)}catch{return}}),J=(await Promise.all(U)).filter((I)=>Boolean(I));if(J.length>0&&J[0])return J[0];throw Error("Failed to authenticate with appKey/appSecurity on all 6 standard Hose domains (app.ekuaibao.com, dd2.hosecloud.com, wx2.ekuaibao.com, kdcloud2.ekuaibao.com, ddenterprise.ekuaibao.com, feishu.ekuaibao.com). "+'If your enterprise uses a private cloud or custom domain (such as 美年大健康), please specify the "domain" parameter explicitly.')}async function b00($,Y,z){try{let U=await fetch(`${$}/api/openapi/v1/auth/getAccessToken`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({appKey:Y,appSecurity:z}),signal:AbortSignal.timeout(8000)});if(!U.ok)return;let Q=await U.json();if(Q.value?.errorCode)return;let J=Q.value?.accessToken??Q.accessToken,I=Q.value?.corporationId??Q.value?.corporation?.id;if(!J||!I)return;return{domain:$,corpId:I,corpName:Q.value?.corporation?.name,openapiToken:J,expireTime:Q.value?.expireTime}}catch{return}}async function Hw($,Y){let z=`${j$($)}/api/openapi/v1/roleDefGroups?accessToken=${encodeURIComponent(Y)}`,U=await fetch(z,{headers:{"content-type":"application/json",Accept:"application/json"},signal:AbortSignal.timeout(1e4)});if(!U.ok){let I=await U.text().catch(()=>"");throw Error(`Failed to fetch Hose role definition groups: ${U.status} ${I}`)}return((await U.json()).items??[]).map((I)=>({id:I.id,name:I.name,enName:I.enName,roleDefs:(I.roleDefs??[]).map((K)=>({id:K.id,name:K.name,enName:K.enName,sourceType:K.sourceType,sourceTypeValue:K.sourceTypeValue,groupId:I.id,groupName:I.name}))}))}async function dS($,Y,z,U="id"){let Q=z.startsWith("$")?z.slice(1):z,J=`${j$($)}/api/openapi/v1/roledefs/$${Q}?accessToken=${encodeURIComponent(Y)}&staffBy=${encodeURIComponent(U)}&pathType=name`,I=await fetch(J,{headers:{"content-type":"application/json",Accept:"application/json"},signal:AbortSignal.timeout(1e4)});if(!I.ok){let W=await I.text().catch(()=>"");throw Error(`Failed to fetch Hose role staffs for ${Q}: ${I.status} ${W}`)}let G=(await I.json()).value;if(!G)throw Error(`Hose role staff query returned empty result for ${Q}`);let H=[];for(let W of G.contents??[])for(let X of W.staffs??[])if(X&&!H.includes(X))H.push(X);return{id:G.id??Q,name:G.name??"",count:G.count??H.length,staffs:H}}async function mS($,Y,z){if(z.length===0)return[];let U=`${j$($)}/api/openapi/v1/staffs/getStaffIds?accessToken=${encodeURIComponent(Y)}`,Q=await fetch(U,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({type:"STAFFID",conditionIds:z.slice(0,100)}),signal:AbortSignal.timeout(1e4)});if(!Q.ok){let I=await Q.text().catch(()=>"");throw Error(`Failed to fetch Hose staff details: ${Q.status} ${I}`)}return(await Q.json()).items??[]}function Ww($){if(!$)return"-";if($.length<=12)return"******";return`${$.slice(0,8)}...${$.slice(-4)}`}async function Sn0($){let Y=typeof $==="string"?n00($):c00($),z=Y.baseUrl||"https://app.ekuaibao.com",U,Q,J,I,K,G={accesstoken:Y.accessToken,corpid:Y.corpId};try{let H=await G5.get(`${z}/api/engine/realm/$UNITY/actions/jwt`,{searchParams:{corpId:Y.corpId},headers:G,timeout:1e4}).json(),W=H.id||H.value;if(W){let X=W.split(".");if(X.length>=2){let Z=X[1].replace(/-/g,"+").replace(/_/g,"/"),q=JSON.parse(Buffer.from(Z,"base64").toString("utf-8"));if(typeof q.staffId==="string")U=q.staffId;if(typeof q.corporationName==="string")Q=q.corporationName;if(typeof q.staffName==="string")J=q.staffName;if(typeof q.cellphone==="string")K=q.cellphone;if(q.isAdmin!==void 0)I=q.isAdmin===!0||q.isAdmin==="true"}}}catch{}if(!U||!Q)try{let W=(await G5.get(`${z}/api/account/v2/session`,{headers:{...G,...U?{staffid:U}:{}},timeout:1e4}).json())?.value;if(W){if(!U&&W.loginStaffId)U=W.loginStaffId;if(!Q&&W.corporationName)Q=W.corporationName;if(!J&&W.privilege)J=W.privilege}}catch{}if(!U)U=`${Y.corpId}:admin`;return{corpId:Y.corpId,baseUrl:z,accessToken:Y.accessToken,staffId:U,corpName:Q,staffName:J,isAdmin:I,cellphone:K}}async function lS($){let Y=await Sn0($),z={accesstoken:Y.accessToken,corpid:Y.corpId,staffid:Y.staffId},U;try{U=await(await G5.get(`${Y.baseUrl}/api/innerapi/v1/key`,{searchParams:{corpId:Y.corpId},headers:z,timeout:15000})).json()}catch(I){let K=I instanceof Error?I.message:String(I);throw Error(`Failed to query Hose OpenAPI keys from assistance link: ${K}`)}let Q=U.items??[],J=[];for(let I of Q)if(typeof I==="object"&&I!==null){let K=I;if(typeof K.appKey==="string"&&typeof K.appSecurity==="string")J.push({id:String(K.id??K.appKey),name:typeof K.name==="string"?K.name:void 0,appKey:K.appKey,appSecurity:K.appSecurity,active:typeof K.active==="boolean"?K.active:!0,corporationId:typeof K.corporationId==="string"?K.corporationId:Y.corpId,createTime:typeof K.createTime==="number"?K.createTime:void 0,updateTime:typeof K.updateTime==="number"?K.updateTime:void 0})}return{corpId:Y.corpId,corpName:Y.corpName,baseUrl:Y.baseUrl,staffId:Y.staffId,keys:J}}var En0,Cn0,Rn0="/web/thirdparty.html",i00,cS,pS;var g7=m(()=>{dQ();i8();CH();En0=["https://app.ekuaibao.com","https://dd2.hosecloud.com","https://wx2.ekuaibao.com","https://kdcloud2.ekuaibao.com","https://ddenterprise.ekuaibao.com","https://feishu.ekuaibao.com"],Cn0=[".ekuaibao.com",".hosecloud.com"],i00=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/,cS=new Map,pS=new Map});function o00($,Y){return Date.now()>=$.expiresAt-Y*1000}async function gn0($){switch($.source.type){case"hose":return l00($);case"direct":case"seal":return _00($)}}async function Zw($){let Y=$.auth.refreshTtl,z=Xw.get($.id);if(z&&!o00(z,Y))return z;let U=x00($.id);if(U&&!o00(U,Y))return Xw.set($.id,U),U;let Q=await gn0($);return Xw.set($.id,Q),f00($.id,Q),Q}async function r00($){return(await Zw($)).enterprise}function s00($){Xw.delete($),u00($)}var Xw;var oS=m(()=>{g7();CH();Xw=new Map});var t00={};D8(t00,{createSealClientForUrl:()=>y6,createSealClientForToken:()=>rS,createSealClient:()=>P1});function yn0($){if($===void 0||$===null||$==="")return"";if(typeof $==="string")return $;try{return JSON.stringify($)}catch{return String($)}}function kn0($){if(!($ instanceof D6))return $;let Y=yn0($.data);if(Y)$.message=`${$.message}: ${Y}`;return $}function a00($){return async({error:Y})=>{if($&&Y instanceof D6&&Y.response.status===401)s00($);return kn0(Y)}}async function P1($){let Y=await Zw($);return G5.create({prefix:Y.enterprise.sealUrl,timeout:30000,headers:{...A6($.seal),Authorization:`Bearer ${Y.token}`},hooks:{beforeError:[a00($.id)]}})}async function rS($,Y){let z=await Zw($);return y6(z.enterprise.sealUrl,Y,A6($.seal))}function y6($,Y,z={}){let U={...z};if(Y)U.Authorization=`Bearer ${Y}`;return G5.create({prefix:$.replace(/\/+$/,""),timeout:30000,headers:U,hooks:{beforeError:[a00()]}})}var i8=m(()=>{dQ();oS()});var RH;var e00=m(()=>{RH={name:"seal-use",version:"0.10.36",private:!0,description:"Seal tenant operations toolkit: approval-run diagnosis, rule remediation, Hose/合思 auth, plus a CLI and an optional MCP server.",license:"MIT",author:{name:"yingqing"},repository:{type:"git",url:"git+https://github.com/yunyingk/seal-use.git"},type:"module",module:"src/server.ts",bin:{"seal-use":"src/cli.ts"},packageManager:"bun@1.3.14",engines:{bun:">=1.3.14"},scripts:{dev:"bun run --watch src/server.ts",start:"bun run src/server.ts",probe:"bun run src/probe.ts",cli:"bun run src/cli.ts",check:"tsc --noEmit","build:binary":"node scripts/build-binary.mjs","build:plugin":"node scripts/build-plugin.mjs",bump:"bun run scripts/bump-version.ts",release:"bun run scripts/release.ts","dev:override":"bun run scripts/dev-override.ts","dev:link":"bun run scripts/dev-override.ts","openapi:bundle":"bun run scripts/bundle-openapi.ts","openapi:raw":"bun run scripts/generate-raw-openapi.ts",test:"bun test",prepare:"git config core.hooksPath .githooks"},dependencies:{"@modelcontextprotocol/server":"^2.0.0",archiver:"^8.0.0",exceljs:"^4.4.0","iconv-lite":"^0.7.3",ky:"^2.0.2","pinyin-pro":"^3.29.3",yauzl:"^3.4.0",zod:"^4.4.3"},devDependencies:{"@modelcontextprotocol/client":"^2.0.0","@types/archiver":"^8.0.0","@types/bun":"^1.3.14","@types/yauzl":"^3.4.0","bun-types":"^1.3.14",typescript:"^5.9.3",yaml:"^2.9.0"}}});import{spawnSync as $10}from"node:child_process";function fn0($,Y=RH.version){let z=$.trim();if(!z)return null;let U=z.endsWith("-dirty"),Q=U?z.slice(0,-6):z,J=Q.match(/^v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9.]+)?)-(\d+)-g([0-9a-f]+)$/);if(J&&J[1]&&J[2]&&J[3])return{baseVersion:J[1],commitsAhead:Number.parseInt(J[2],10),commit:J[3],dirty:U,describe:z};let I=Q.match(/^v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9.]+)?)$/);if(I&&I[1])return{baseVersion:I[1],commitsAhead:0,commit:"",dirty:U,describe:z};let K=Q.match(/^([0-9a-f]{7,40})$/);if(K&&K[1])return{baseVersion:Y,commitsAhead:0,commit:K[1],dirty:U,describe:z};return null}function un0($,Y,z,U){let J=z?`+g${z}${U?".dirty":""}`:U?"+dirty":"";return`${$}-dev.${Y}${J}`}function bn0($){let Y=$?.env,z=Y?.SEAL_BUILD_VERSION??process.env.SEAL_BUILD_VERSION,U=Y?.SEAL_BUILD_IS_RELEASE??process.env.SEAL_BUILD_IS_RELEASE,Q=Y?.SEAL_BUILD_CHANNEL??process.env.SEAL_BUILD_CHANNEL,J=Y?.SEAL_BUILD_GIT_BASE??process.env.SEAL_BUILD_GIT_BASE,I=Y?.SEAL_BUILD_GIT_COMMITS_AHEAD??process.env.SEAL_BUILD_GIT_COMMITS_AHEAD,K=Y?.SEAL_BUILD_GIT_COMMIT??process.env.SEAL_BUILD_GIT_COMMIT,G=Y?.SEAL_BUILD_GIT_DIRTY??process.env.SEAL_BUILD_GIT_DIRTY,H=Y?.SEAL_BUILD_GIT_DESCRIBE??process.env.SEAL_BUILD_GIT_DESCRIBE,W=Y?.SEAL_FORCE_RELEASE??process.env.SEAL_FORCE_RELEASE,X=$?.cwd;if(z){let Z=U==="true",V={name:"seal-use",version:z,channel:Q||(Z?"release":"dev"),isRelease:Z};if(J)V.git={baseVersion:J,commitsAhead:Number.parseInt(I||"0",10),commit:K||"",dirty:G==="true",describe:H||z};return V}if(U==="true"||W==="1")return{name:"seal-use",version:RH.version,channel:"release",isRelease:!0};try{let Z=$10("git",["describe","--tags","--long","--dirty","--always"],{cwd:X,encoding:"utf8",stdio:["ignore","pipe","ignore"]});if(Z.status===0&&Z.stdout){let q=fn0(Z.stdout.trim(),RH.version);if(q){if(!q.commit){let F=$10("git",["rev-parse","--short","HEAD"],{cwd:X,encoding:"utf8",stdio:["ignore","pipe","ignore"]});if(F.status===0&&F.stdout)q.commit=F.stdout.trim()}return{name:"seal-use",version:un0(q.baseVersion,q.commitsAhead,q.commit,q.dirty),channel:"dev",isRelease:!1,git:q}}}}catch{}return{name:"seal-use",version:`${RH.version}-dev.0+local`,channel:"dev",isRelease:!1}}var dY,Z1,sS,Ec1;var $3=m(()=>{e00();dY=bn0(),Z1=dY.version,sS=dY.isRelease,Ec1=dY.channel});function rQ($=void 0){return tS.parse($??{})}function U10($,Y){return rQ({...rQ($),...Y})}var Y10,aS,z10,tS,eS;var sQ=m(()=>{P$();Y10=[".pdf",".xls",".xlsx",".csv",".doc",".docx",".ppt",".pptx",".txt",".rtf",".odt",".ods",".odp",".jpg",".jpeg",".png",".gif",".bmp",".webp",".heic",".eml",".msg"],aS={minFileSizeBytes:500,allowedExtensions:[...Y10]},z10=L.string().trim().min(1).transform(($)=>{let Y=$.toLowerCase();return Y.startsWith(".")?Y:`.${Y}`}).refine(($)=>/^\.[a-z0-9][a-z0-9+_-]*$/.test($),{message:"文件后缀必须是简单扩展名,例如 .pdf 或 xlsx"}),tS=L.object({minFileSizeBytes:L.number().int().min(0).default(aS.minFileSizeBytes),maxFileSizeBytes:L.number().int().positive().nullable().optional(),allowedExtensions:L.array(z10).min(1).default([...Y10]).transform(($)=>[...new Set($)])}).superRefine(($,Y)=>{if($.maxFileSizeBytes!==void 0&&$.maxFileSizeBytes!==null&&$.maxFileSizeBytes<$.minFileSizeBytes)Y.addIssue({code:"custom",path:["maxFileSizeBytes"],message:"最大文件大小不能小于最小文件大小"})}),eS=L.object({minFileSizeBytes:L.number().int().min(0).optional(),maxFileSizeBytes:L.number().int().positive().nullable().optional(),allowedExtensions:L.array(z10).min(1).transform(($)=>[...new Set($)])}).optional()});var in0,nn0,cn0,pn0,J10,dn0,mn0,I10,qw,K10,ln0,Vw,G10,vH,H10,on0,rn0,sn0,Q10,hH,W10,an0,tn0,Lw,$g,X10,Z10,q10,V10,Fw,L10,Yg,zg,F10,O10,en0,w10,$c0,M10,_H,N10,D10,A10,B10,P10,j10,T10,E10,C10,R10,_10,Yc0,v10,zc0,Uc0,Qc0,Ug,Qg,Jc0,h10,S10,g10,y10,Ic0,Jg,Sc1,gc1,k10,yc1;var Ig=m(()=>{P$();sQ();in0=L.object({staffId:L.string(),name:L.string().optional(),code:L.string().default(""),bindTime:L.number().optional()}),nn0=L.object({id:L.string(),tenantId:L.string(),name:L.string(),isAdmin:L.boolean().default(!1),permissions:L.array(L.string()).default([]),providerUserId:L.string().optional(),hosecloudStaff:in0.optional()}),cn0=L.object({apiKey:L.string().optional(),corporationId:L.string().optional(),corporationName:L.string().optional()}),pn0=L.object({id:L.string(),name:L.string(),tenantSlug:L.string().optional(),isDemo:L.boolean().default(!1),logoUrl:L.string().nullable().optional(),hoseCorpConfig:cn0.optional()}),J10=L.object({user:nn0,tenant:pn0}),dn0=L.object({id:L.string(),name:L.string(),email:L.string().nullable().optional(),emailVerified:L.boolean().optional(),image:L.string().nullable().optional(),tenantId:L.string().optional(),provider:L.string().optional(),providerUserId:L.string().optional(),mobile:L.string().nullable().optional(),status:L.string().optional(),permissions:L.array(L.string()).default([]),isAdmin:L.boolean().default(!1),hosecloudStaff:L.unknown().optional()}).passthrough(),mn0=L.object({id:L.string(),token:L.string().optional(),expiresAt:L.string(),createdAt:L.string().optional(),updatedAt:L.string().optional(),ipAddress:L.string().optional(),userAgent:L.string().optional(),userId:L.string(),delegationId:L.string().nullable().optional()}).passthrough(),I10=L.object({user:dn0,session:mn0}),qw=L.object({id:L.string(),tenantId:L.string().optional(),code:L.union([L.number(),L.string()]).optional(),description:L.string(),scope:L.string(),strictness:L.string(),status:L.string().optional(),createdAt:L.number().optional(),updatedAt:L.number().optional()}),K10=L.object({rules:L.array(qw),hasPendingDeletes:L.boolean().default(!1)}),ln0=L.object({id:L.union([L.string(),L.number()]).optional(),ruleId:L.union([L.string(),L.number()]).optional(),stableId:L.union([L.string(),L.number()]).optional(),runtimeRuleId:L.union([L.string(),L.number()]).optional(),runtimeId:L.union([L.string(),L.number()]).optional(),code:L.union([L.string(),L.number()]).optional(),description:L.string(),scope:L.string(),strictness:L.string()}).passthrough(),Vw=L.object({id:L.string(),tenantId:L.string().optional(),versionNumber:L.number(),versionName:L.string().nullable().optional(),publishedBy:L.string().nullable().optional(),publishedByName:L.string().nullable().optional(),rules:L.array(ln0).default([]),publishedAt:L.number().optional(),createdAt:L.number().optional()}).passthrough(),G10=L.object({version:Vw,rulesCount:L.number()}),vH=L.object({id:L.string(),tenantId:L.string().optional(),title:L.string(),purpose:L.string().default(""),contentType:L.string().default("policy"),content:L.string(),status:L.string().default("published"),enabled:L.boolean().default(!0),scenarios:L.array(L.string()).default([]),tags:L.array(L.string()).default([]),category:L.string().nullable().optional(),categoryTags:L.array(L.string()).default([]),createdBy:L.string().nullable().optional(),createdByName:L.string().nullable().optional(),createdAt:L.number().optional(),updatedAt:L.number().optional(),updatedBy:L.string().nullable().optional(),updatedByName:L.string().nullable().optional(),isDeleted:L.boolean().default(!1)}),H10=L.object({articles:L.array(vH),total:L.number().optional()}),on0=L.object({explicitApprove:L.string().default(""),explicitReject:L.string().default(""),exemptApprove:L.string().default(""),review:L.string().default("")}).passthrough(),rn0=L.object({type:L.string(),signKey:L.string().optional(),outboundName:L.string().optional(),mode:L.string().optional(),autoApprovalRate:L.number().optional(),apiKey:L.string().optional(),apiSecret:L.string().optional(),apiOrigin:L.string().optional(),corporationId:L.string().optional(),ebotSignKey:L.string().optional(),completionSignKey:L.string().optional(),outboundMessageId:L.string().optional(),completionMessageId:L.string().optional()}).passthrough(),sn0=L.enum(["assisted","semi_automatic","fully_automatic"]),Q10=L.object({id:L.string(),url:L.string().url()}).passthrough(),hH=L.object({type:L.literal("webhook"),id:L.string(),name:L.string(),mode:sn0,incomingDocumentWebhook:Q10,outgoingResultWebhook:L.string().url(),incomingManualResultWebhook:Q10,secret:L.string().min(1),autoApprovalRate:L.number().int().min(0).max(100).optional(),materialPackFilePolicy:tS.default(aS)}).passthrough(),W10=L.object({id:L.string().optional(),tenantId:L.string().optional(),tone:L.string().optional(),language:L.string().optional(),detailLevel:L.string().optional(),outputFormat:L.string().optional(),examples:L.array(L.string()).default([]),prohibitedPhrases:L.array(L.string()).default([]),customInstructions:L.string().optional(),updatedAt:L.number().optional(),decisionPreferences:on0.optional(),integrationSystem:L.string().optional(),integrations:L.array(rn0).default([])}).passthrough(),an0=L.object({id:L.string().optional(),sn:L.string().optional(),title:L.string().optional(),name:L.string().optional(),fields:L.array(L.unknown()).optional()}).passthrough(),tn0=L.object({_langfuseTraceId:L.string().optional(),simulation_batch_id:L.string().optional()}).passthrough(),Lw=L.object({id:L.string(),tenantId:L.string().optional(),agentId:L.string().optional(),status:L.string().optional(),taskMode:L.string().optional(),finalExecutionMode:L.string().optional(),sourceSystem:L.string().optional(),sourceDocumentSN:L.string().optional(),sourceDocumentId:L.string().optional(),documentId:L.string().optional(),document:an0.optional(),result:L.unknown().optional(),pipelineData:L.unknown().optional(),sourceExtendData:tn0.optional(),ruleSetVersionNumber:L.number().optional(),ruleSetPublishedAt:L.number().optional(),ruleSetPublishedByName:L.string().optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),$g=L.object({records:L.array(Lw).default([]),total:L.number().optional(),page:L.number().optional(),pageSize:L.number().optional()}).passthrough(),X10=L.object({id:L.string(),expiresAt:L.number().nullable().optional(),revokedAt:L.number().nullable().optional(),createdAt:L.number().nullable().optional(),lastUsedAt:L.number().nullable().optional(),useCount:L.number().default(0),note:L.string().nullable().optional(),link:L.string()}).passthrough(),Z10=L.object({id:L.string(),token:L.string(),link:L.string()}).passthrough(),q10=L.object({userId:L.string(),password:L.string()}).passthrough(),V10=L.object({password:L.string()}).passthrough(),Fw=L.object({_id:L.string(),tenantId:L.string().optional(),name:L.string(),mobile:L.string().optional(),email:L.string().optional(),departmentIds:L.array(L.string()).default([]),status:L.string().optional(),permissions:L.array(L.string()).default([]),createdAt:L.string().optional(),updatedAt:L.string().optional()}).passthrough(),L10=L.object({departments:L.array(L.record(L.string(),L.unknown())).default([]),users:L.array(Fw).default([])}).passthrough(),Yg=L.object({_id:L.string(),tenantId:L.string().optional(),name:L.string().optional(),parentId:L.string().nullable().optional(),ancestors:L.array(L.string()).default([]),provider:L.string().optional(),permissions:L.array(L.string()).default([]),isDeleted:L.boolean().optional(),syncedAt:L.string().optional(),createdAt:L.string().optional(),updatedAt:L.string().optional()}).passthrough(),zg=L.object({items:L.array(Yg).default([])}).passthrough(),F10=L.object({items:L.array(Fw).default([])}).passthrough(),O10=L.object({lastSyncTime:L.union([L.string(),L.number(),L.null()])}).passthrough(),en0=L.object({tagId:L.string().optional(),tagName:L.string().optional(),tagPath:L.string().optional(),count:L.number().default(0),avgConfidence:L.number().default(0),errorCount:L.number().default(0),warningCount:L.number().default(0)}).passthrough(),w10=L.object({tagStats:L.array(en0).default([]),totalRisks:L.number().default(0),analyzedRisks:L.number().default(0),pendingRisks:L.number().default(0)}).passthrough(),$c0=L.object({riskId:L.string().optional(),recordId:L.string().optional(),riskDetails:L.string().default(""),riskLevel:L.string().default("warning"),documentType:L.string().default(""),documentSN:L.string().default(""),sourceSystem:L.string().default(""),sourceDocumentURL:L.string().nullable().optional(),confidence:L.number().default(0),reasoning:L.string().default(""),createdAt:L.union([L.string(),L.number(),L.date()]).optional()}).passthrough(),M10=L.object({tagId:L.string(),tagName:L.string().default(""),tagPath:L.string().default(""),tagDescription:L.string().default(""),risks:L.array($c0).default([]),total:L.number().default(0)}).passthrough(),_H=L.object({value:L.number().default(0),trend:L.number().default(0)}).passthrough(),N10=L.object({metrics:L.object({approvalCount:_H.optional(),accuracy:_H.optional(),automationRate:_H.optional(),riskCount:_H.optional(),avgDuration:_H.optional()}).passthrough().default({}),sankeyData:L.object({nodes:L.array(L.object({id:L.string()}).passthrough()).default([]),links:L.array(L.object({source:L.string(),target:L.string(),value:L.number().default(0)}).passthrough()).default([])}).passthrough().default({nodes:[],links:[]})}).passthrough(),D10=L.record(L.string(),L.unknown()),A10=L.object({expenses:L.array(D10).default([]),total:L.number().optional()}).passthrough(),B10=L.object({invoices:L.array(D10).default([]),total:L.number().optional(),feishuApprovalAppId:L.string().nullable().optional()}).passthrough(),P10=L.record(L.string(),L.unknown()),j10=L.object({provider:L.string(),config:L.record(L.string(),L.unknown()).default({})}).passthrough(),T10=L.object({id:L.string(),name:L.string(),description:L.string().optional(),available:L.boolean().default(!0),fields:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),E10=L.object({permissions:L.array(L.object({key:L.string(),name:L.string(),description:L.string().optional()}).passthrough()).default([])}).passthrough(),C10=L.object({configs:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),R10=L.object({subscriptions:L.array(L.record(L.string(),L.unknown())).default([]),features:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),_10=L.object({key:L.string(),type:L.string(),label:L.string(),column:L.string(),mask:L.string().optional()}).passthrough(),Yc0=L.object({columns:L.array(_10).default([]),fieldKey:L.string().optional(),keyColumn:L.string().optional(),sheetName:L.string().optional(),fieldLabel:L.string().optional()}).passthrough(),v10=L.object({id:L.string().optional(),listSheets:L.array(Yc0).default([]),mainColumns:L.array(_10).default([]),workbookName:L.string().optional(),mainKeyColumn:L.string().optional(),mainSheetName:L.string().optional(),titleColumn:L.string().optional(),statusColumn:L.string().optional(),applicationDateColumn:L.string().optional(),updatedDateColumn:L.string().optional(),attachmentFieldKey:L.string().optional(),attachmentFieldLabel:L.string().optional()}).passthrough(),zc0=L.object({approvalCode:L.string(),nodeId:L.string().optional(),flowIds:L.array(L.string()).max(100).optional(),limit:L.number().int().positive().max(100).optional(),dataCollectionMode:L.string().optional(),signKey:L.string().optional(),rejectNodeName:L.string().nullable().optional(),skipInvoiceGeneration:L.boolean().optional(),skipExpenseExtraction:L.boolean().optional(),disableAttachmentCache:L.boolean().optional(),thinkingDepthOverride:L.enum(["default","medium","high"]).optional(),startTime:L.number().optional(),endTime:L.number().optional(),templateId:L.string().optional(),packageIds:L.array(L.string()).optional(),packageLabel:L.string().optional(),runMode:L.string().optional(),schemaConfig:v10.optional()}).passthrough(),Uc0=L.object({mode:L.string().optional(),conditions:L.array(L.object({label:L.string(),value:L.string()}).passthrough()).default([])}).passthrough(),Qc0=L.object({kind:L.string().optional(),stage:L.string().optional(),code:L.string().optional(),message:L.string().optional()}).passthrough(),Ug=L.object({id:L.string(),tenantId:L.string().optional(),approvalCode:L.string().optional(),nodeId:L.string().optional(),sourceSystem:L.string().optional(),status:L.string().optional(),totalCount:L.number().default(0),processedCount:L.number().default(0),successCount:L.number().default(0),failedCount:L.number().default(0),createdCount:L.number().default(0),createFailedCount:L.number().default(0),params:zc0.optional(),requestSummary:Uc0.nullable().optional(),resultSummary:Qc0.nullable().optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),Qg=L.object({batchId:L.string()}).passthrough(),Jc0=L.object({dataCollectionMode:L.string().optional(),flowIds:L.array(L.string()).max(100).optional(),rejectNodeName:L.string().nullable().optional(),skipInvoiceGeneration:L.boolean().optional(),skipExpenseExtraction:L.boolean().optional()}).passthrough(),h10=L.object({id:L.string(),tenantId:L.string().optional(),name:L.string().optional(),description:L.string().optional(),approvalSystem:L.string().optional(),hosecloudConfig:Jc0.optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),S10=L.object({hasFeishu:L.boolean().default(!1),hasHosecloud:L.boolean().default(!1),hasWeaver:L.boolean().default(!1),hasHelios:L.boolean().default(!1),hasMaycur:L.boolean().default(!1),hasMaycurStandard:L.boolean().default(!1)}).passthrough(),g10=L.object({signKey:L.string().optional(),displayName:L.string().optional(),corporationId:L.string().optional()}).passthrough(),y10=L.object({id:L.string(),tenantId:L.string().optional(),name:L.string().optional(),templateId:L.string().optional(),originalFileName:L.string().optional(),status:L.string().optional(),documentCount:L.number().optional(),attachmentCount:L.number().optional(),uploadedBy:L.string().optional(),schemaConfig:v10.nullable().optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),Ic0=L.object({hitScopes:L.array(L.string()).default([]),hitRuleIds:L.array(L.string()).default([]),notHitScopes:L.array(L.string()).default([]),notHitRuleIds:L.array(L.string()).default([])}).passthrough(),Jg=L.object({id:L.string().min(1),name:L.string().min(1),enabled:L.boolean().default(!0),description:L.string().default(""),condition:Ic0.default({hitScopes:[],hitRuleIds:[],notHitScopes:[],notHitRuleIds:[]}),level:L.enum(["medium","high"])}).passthrough(),Sc1=L.object({defaultLevel:L.enum(["medium","high"]).default("medium"),routingPolicies:L.array(Jg).default([])}).passthrough(),gc1=L.object({dryRun:L.boolean().optional(),signKey:L.string().min(1).optional(),outboundName:L.string().optional(),specificationId:L.string().optional(),specificationName:L.string().optional(),mode:L.enum(["fully_automatic","semi_automatic","assisted"]).default("assisted"),autoApprovalRate:L.number().min(0).max(100).optional(),rejectResubmitMethod:L.enum(["node_default","to_ebot","from_start"]).optional(),autoApproveNodeNames:L.array(L.string()).optional(),apiKey:L.string().min(1),apiSecret:L.string().min(1),apiOrigin:L.string().default("production"),customApiUrl:L.string().optional()}).passthrough(),k10=L.object({id:L.string().optional(),code:L.string().optional(),name:L.string().optional(),approvalSystem:L.string().optional()}).passthrough(),yc1=L.object({total:L.number(),dedupeBy:L.string(),unique:L.number(),byStatus:L.record(L.string(),L.number()),bySourceSystem:L.record(L.string(),L.number())}).passthrough()});import{randomBytes as u10}from"node:crypto";async function N1($,Y){let z=await $.json();return Y.parse(z.data??z)}async function T8($){return N1(await $.get("api/v1/auth/me"),J10)}async function i10($){return N1(await $.get("api/auth/get-session"),I10)}async function X6($){return N1(await $.get("api/v1/rules"),K10)}async function gH($,Y){return N1(await $.post("api/v1/rules",{json:Y}),qw)}async function Kg($,Y,z){return N1(await $.put(`api/v1/rules/${Y}`,{json:z}),qw)}async function tQ($,Y){await $.delete(`api/v1/rules/${Y}`)}async function Nw($){let Y=await $.post("api/v1/rules/batch-recode",{throwHttpErrors:!1}),z=await Y.json().catch(()=>({}));return L.object({ok:L.boolean(),status:L.number(),body:L.unknown()}).parse({ok:Y.ok,status:Y.status,body:z})}async function c8($){return N1(await $.get("api/v1/rule-set-versions"),L.array(Vw))}async function y7($,Y){return N1(await $.get(`api/v1/rule-set-versions/${Y}`),Vw)}async function yH($,Y){return N1(await $.post("api/v1/rule-set-versions/publish",{json:{versionName:Y}}),G10)}async function mY($,Y={}){let z=new URLSearchParams;return z.set("offset",String(Y.offset??0)),z.set("limit",String(Y.limit??20)),z.set("sortBy",Y.sortBy??"createdAt"),z.set("sortOrder",Y.sortOrder??"desc"),Y.scenarios?.forEach((U,Q)=>{z.set(`filter[scenarios][${Q}]`,U)}),N1(await $.get("api/v1/knowledge/articles",{searchParams:z}),H10)}async function n10($,Y){return N1(await $.get(`api/v1/knowledge/articles/${Y}`),vH)}async function Dw($,Y){return N1(await $.post("api/v1/knowledge/articles",{json:{...Y,contentType:Y.contentType??"policy",status:Y.status??"published",enabled:Y.enabled??!0,scenarios:Y.scenarios&&Y.scenarios.length>0?Y.scenarios:["audit"],tags:Y.tags??[]}}),vH)}async function Aw($,Y,z){let U=Object.fromEntries(Object.entries(z).filter(([,Q])=>Q!==void 0));return N1(await $.patch(`api/v1/knowledge/articles/${Y}`,{json:{attributes:U}}),vH)}async function Bw($,Y){return await $.delete(`api/v1/knowledge/articles/${Y}`),{success:!0,id:Y}}async function o1($,Y="api/v1/agent/ai-approval/config"){return N1(await $.get(Y),W10)}async function s5($,Y,z="api/v1/agent/ai-approval/config"){return await $.post(z,{json:Y}),o1($,z)}async function Gg($,Y,z="api/v1/agent/ai-approval/config"){let U=await $.post(z,{json:Y}),Q=await U.json().catch(()=>({})),J=Mw.safeParse(Q.data??Q);return J.success?J.data.success??U.ok:U.ok}async function I$($,Y="api/v1/agent/ai-approval/config"){let z=await o1($,Y);return Hg(z.integrations)}async function Pw($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=Hg(Q.integrations),I=r10(Y,J,z);if(!await Gg($,{...Q,integrations:[...Q.integrations,I]},U))throw Error("Seal did not confirm saving the Webhook integration");return I}async function c10($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=Hg(Q.integrations),I=r10(Y,J,z);return{before:Q,after:{...Q,integrations:[...Q.integrations,I]},integration:I}}async function p10($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=jw(Q.integrations),I=Tw(J,Y),K=s10(I.integration,z);if(!await Gg($,{...Q,integrations:Q.integrations.map((H,W)=>W===I.index?K:H)},U))throw Error("Seal did not confirm saving the Webhook integration");return K}async function d10($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=jw(Q.integrations),I=Tw(J,Y),K=s10(I.integration,z);return{before:Q,after:{...Q,integrations:Q.integrations.map((G,H)=>H===I.index?K:G)},integration:K}}async function m10($,Y,z="api/v1/agent/ai-approval/config"){let U=await o1($,z),Q=jw(U.integrations),J=Tw(Q,Y);if(!await Gg($,{...U,integrations:U.integrations.filter((K,G)=>G!==J.index)},z))throw Error("Seal did not confirm deleting the Webhook integration");return J.integration}async function l10($,Y,z="api/v1/agent/ai-approval/config"){let U=await o1($,z),Q=jw(U.integrations),J=Tw(Q,Y);return{before:U,after:{...U,integrations:U.integrations.filter((I,K)=>K!==J.index)},integration:J.integration}}function k7($,Y){let z=Y.trim();if(!z)throw Error("Webhook selector must not be empty");let U=$.find((J)=>J.id===z);if(U)return U;let Q=$.filter((J)=>J.name===z);if(Q.length===1)return Q[0];if(Q.length>1)throw Error(`Multiple Webhook integrations match name: ${z}. Use the integration ID.`);throw Error(`Webhook integration not found: ${z}`)}function o10($,Y){let z=Y?.trim().toLowerCase();if(!z)return $;return $.filter((U)=>[U.id,U.name,U.mode,U.outgoingResultWebhook,U.incomingDocumentWebhook.url,U.incomingManualResultWebhook.url].some((Q)=>Q.toLowerCase().includes(z)))}function Hg($){return $.filter((Y)=>Y.type==="webhook").map((Y)=>hH.parse(Y))}function jw($){return $.flatMap((Y,z)=>{if(Y.type!=="webhook")return[];return[{index:z,integration:hH.parse(Y)}]})}function Tw($,Y){let z=k7($.map((U)=>U.integration),Y);return $.find((U)=>U.integration.id===z.id)}function r10($,Y,z){let U=SH(z.name,"name"),Q=z.mode??"assisted",J=t10(z.outgoingResultWebhook,"outgoingResultWebhook"),I=e10(z.autoApprovalRate??60),K=Hc0(Y),G=`wh_${K}_${u10(8).toString("hex").slice(0,7)}`,H=j$($);return hH.parse({type:"webhook",id:`integration-${K}`,name:U,mode:Q,incomingDocumentWebhook:{id:G,url:`${H}/api/v1/integrations/webhook/${G}/document`},outgoingResultWebhook:J,incomingManualResultWebhook:{id:G,url:`${H}/api/v1/integrations/webhook/${G}/manual-result`},secret:z.secret?SH(z.secret,"secret"):a10(),autoApprovalRate:I,materialPackFilePolicy:rQ(z.materialPackFilePolicy)})}function s10($,Y){return hH.parse({...$,...Y.name===void 0?{}:{name:SH(Y.name,"name")},...Y.mode===void 0?{}:{mode:Y.mode},...Y.outgoingResultWebhook===void 0?{}:{outgoingResultWebhook:t10(Y.outgoingResultWebhook,"outgoingResultWebhook")},...Y.autoApprovalRate===void 0?{}:{autoApprovalRate:e10(Y.autoApprovalRate)},...Y.rotateSecret||Y.secret!==void 0?{secret:Y.rotateSecret?a10():SH(Y.secret??"","secret")}:{},...Y.materialPackFilePolicy===void 0?{}:{materialPackFilePolicy:U10($.materialPackFilePolicy,Y.materialPackFilePolicy)}})}function Hc0($){let Y=new Set($.map((U)=>U.id)),z=Date.now();while(Y.has(`integration-${z}`))z+=1;return z}function a10(){return u10(16).toString("hex")}function SH($,Y){let z=$.trim();if(!z)throw Error(`Webhook ${Y} must not be empty`);return z}function t10($,Y){let z=SH($,Y);try{return new URL(z).toString()}catch{throw Error(`Webhook ${Y} must be a valid URL`)}}function e10($){if(!Number.isInteger($)||$<0||$>100)throw Error("Webhook autoApprovalRate must be an integer between 0 and 100");return $}async function Ew($,Y={}){let[z,U,Q]=await Promise.all([X6($),mY($,{limit:Y.documentLimit??50}),o1($,Y.stylePreferencesEndpoint).then((J)=>({ok:!0,data:J}),(J)=>({ok:!1,error:J instanceof Error?J.message:String(J)}))]);return{rules:z,documents:U,stylePreferences:Q}}async function i4($,Y={}){let z=new URLSearchParams;return z.set("offset",String(Y.offset??0)),z.set("limit",String(Y.limit??50)),n8(z,"fromTimestamp",Y.fromTimestamp),n8(z,"toTimestamp",Y.toTimestamp),n8(z,"startDate",Y.startDate),n8(z,"endDate",Y.endDate),x10(z,"status",Y.status),n8(z,"sourceSystem",Y.sourceSystem),n8(z,"taskMode",Y.taskMode),n8(z,"search",Y.search),n8(z,"sourceDocumentSN",Y.sourceDocumentSN),n8(z,"sourceDocumentId",Y.sourceDocumentId),x10(z,"manualApprovalStatus",Y.manualApprovalStatus),N1(await $.get("api/v1/approvals",{searchParams:z}),$g)}async function H4($,Y){return N1(await $.get(`api/v1/approvals/${Y}`),Lw)}async function Wg($,Y){let z=await $.get(`api/v1/simulation/batch/${Y}/records`).json(),U=z.data??z;if(Array.isArray(U))return L.array(Lw).parse(U);return $g.parse(U).records}async function $40($,Y){return N1(await $.post("api/v1/simulation/create-batch",{json:Y}),Qg)}async function Y40($,Y){return N1(await $.post("api/v1/simulation/create-material-pack-batch",{json:Y}),Qg)}async function z40($,Y={}){let z=await $.get("api/v1/simulation/batches",{searchParams:{limit:String(Y.limit??50)}}).json(),U=z.data??z;return L.array(Ug).parse(U)}async function Cw($,Y){return N1(await $.get(`api/v1/simulation/batch/${Y}`),Ug)}async function U40($){let Y=await $.get("api/v1/simulation/templates").json(),z=Y.data??Y;return L.array(h10).parse(z)}async function Xg($){return N1(await $.get("api/v1/simulation/integration-status"),S10)}async function Zg($){let Y=await $.get("api/v1/simulation/hosecloud-integrations").json(),z=Y.data??Y;return L.array(g10).parse(z)}async function Q40($,Y){let U=await(await $.delete(`api/v1/simulation/batch/${encodeURIComponent(Y)}/data`)).json().catch(()=>({}));return U.data??U}async function J40($,Y){let z=Y?"api/v1/simulation/hosecloud-specifications-by-sign-key":"api/v1/simulation/hosecloud-specifications",U=Y?new URLSearchParams({signKey:Y}):void 0,Q=await $.get(z,{searchParams:U}).json(),J=Q.data??Q;return L.array(k10).parse(J)}async function I40($,Y){let z=await $.post("api/hosecloud/corporation",{json:Y}).json(),U=z.data??z;return L.object({corporationId:L.string()}).parse(U)}async function K40($,Y){let U=await(await $.post("api/hosecloud/outbound-config/sync",{json:Y})).json().catch(()=>({}));return U.data??U}async function G40($,Y){let z=new FormData;return z.append("file",new Blob([new Uint8Array(Y.fileBuffer)]),Y.fileName),N1(await $.post("api/v1/material-packages/upload",{body:z}),y10)}function n8($,Y,z){if(z)$.set(Y,z)}function x10($,Y,z){if(!z)return;(Array.isArray(z)?z:[z]).map((Q)=>Q.trim()).filter(Boolean).forEach((Q,J)=>{$.set(`${Y}[${J}]`,Q)})}async function H40($){return N1(await $.get("api/v1/delegation/list"),L.array(X10))}async function aQ($,Y){return N1(await $.post("api/v1/delegation/create",{json:Y??{}}),Z10)}async function W40($,Y){let z=await $.post("api/v1/delegation/revoke",{json:{tokenId:Y}}),U=await z.json(),Q=Mw.safeParse(U.data??U);return Q.success?Q.data.success??z.ok:z.ok}async function X40($,Y){let z=Y.departmentIds&&Y.departmentIds.length>0?Y.departmentIds:void 0;if(!z){let U=await $.get("api/v1/contacts/departments/root/children").json(),Q=Kc0.safeParse(U.data??U),J=Q.success?Q.data.items?.[0]?._id:void 0;if(J)z=[J]}return N1(await $.post("api/v1/contacts/local/users",{json:{name:Y.name,phone:Y.phone,permissions:Y.permissions??[],departmentIds:z??[]}}),q10)}async function qg($,Y){return N1(await $.post(`api/v1/contacts/local/users/${Y}/reset-password`,{json:{}}),V10)}async function Ow($,Y){return N1(await $.get(`api/v1/contacts/users/${Y}`),Fw)}async function ww($,Y=""){return N1(await $.get("api/v1/contacts/search",{searchParams:{query:Y}}),L10)}async function Z40($){return N1(await $.get("api/v1/contacts/departments/root/children"),zg)}async function q40($,Y){return N1(await $.get(`api/v1/contacts/departments/${encodeURIComponent(Y)}`),Yg)}async function V40($,Y){return N1(await $.get(`api/v1/contacts/departments/${encodeURIComponent(Y)}/children`),zg)}async function L40($,Y){return N1(await $.get(`api/v1/contacts/departments/${encodeURIComponent(Y)}/users`),F10)}async function F40($){return N1(await $.get("api/v1/contacts/last-sync-time"),O10)}async function Rw($,Y={}){let z=Vg(),U=new URLSearchParams;if(n8(U,"startDate",Y.startDate??z.startDate),n8(U,"endDate",Y.endDate??z.endDate),Y.limit!==void 0)U.set("limit",String(Y.limit));return N1(await $.get("api/v1/insight/stats",{searchParams:U}),w10)}async function _w($,Y){let z=Vg(),U=new URLSearchParams;return U.set("tagId",Y.tagId),U.set("startDate",Y.startDate??z.startDate),U.set("endDate",Y.endDate??z.endDate),N1(await $.get("api/v1/insight/risks-by-tag",{searchParams:U}),M10)}async function vw($,Y={}){let z=Vg(),U=f10(Y.startDate??z.startDate),Q=f10(Y.endDate??z.endDate),J=new URLSearchParams;return J.set("startDate",String(U)),J.set("endDate",String(Q)),N1(await $.get("api/v1/insight/performance",{searchParams:J}),N10)}async function O40($,Y){return await $.post(`api/v1/insight/analyze/${encodeURIComponent(Y)}`),{success:!0,recordId:Y}}function f10($){if(typeof $==="number")return $<100000000000?$*1000:$;let Y=Number($);if(!isNaN(Y)&&$.trim()!=="")return Y<100000000000?Y*1000:Y;let z=new Date($);if(isNaN(z.getTime()))throw Error(`Invalid date format: ${$}`);return z.getTime()}function Vg(){let $=new Date,Y=new Date($.getFullYear(),$.getMonth(),1),z=new Date($.getFullYear(),$.getMonth()+1,0,23,59,59,999);return{startDate:Y.toISOString(),endDate:z.toISOString()}}function w40($){let Y=new URLSearchParams;return n8(Y,"filter[startDate]",$.startDate),n8(Y,"filter[endDate]",$.endDate),n8(Y,"filter[search]",$.search),Y.set("offset",String($.offset??0)),Y.set("limit",String($.limit??50)),Y}async function M40($,Y={}){return N1(await $.get("api/v1/expenses/list",{searchParams:w40(Y)}),A10)}async function N40($,Y={}){return N1(await $.get("api/v1/invoice/list",{searchParams:w40(Y)}),B10)}async function D40($){return N1(await $.get("api/v1/integrations/feishu/simulation/approval-definitions"),L.array(P10))}async function A40($,Y){let z=await $.delete(`api/v1/contacts/local/users/${Y}`),U=await z.json(),Q=Mw.safeParse(U.data??U);return Q.success?Q.data.success??z.ok:z.ok}async function Lg($,Y){let z=await $.post(`api/v1/contacts/local/users/${Y}/activate`,{json:{}}),U=await z.json(),Q=Mw.safeParse(U.data??U);return Q.success?Q.data.success??z.ok:z.ok}async function Wc0($,Y){let z=await $.post("api/auth/sms-otp/sign-in-password",{json:Y}),U=z.headers.get("set-auth-token"),Q=Gc0.parse(await z.json()),J=U??Q.session?.token;if(!J)throw Error("Failed to retrieve authentication token from login response");return{token:J,user:Q.user}}async function B40($,Y,z,U){let Q;if(Y.userIdOrPhone.startsWith("+")||/^\d{11}$/.test(Y.userIdOrPhone)){let q=await ww($,Y.userIdOrPhone),V=q.users.find((F)=>F.mobile?.includes(Y.userIdOrPhone)||F._id===Y.userIdOrPhone)??q.users[0];if(!V)throw Error(`User not found with phone/ID: ${Y.userIdOrPhone}`);Q=V}else Q=await Ow($,Y.userIdOrPhone).catch(async()=>{let q=await ww($,Y.userIdOrPhone),V=q.users.find((F)=>F.name===Y.userIdOrPhone)??q.users[0];if(!V)throw Error(`User not found: ${Y.userIdOrPhone}`);return V});if(Q.status==="resigned")await Lg($,Q._id),Q=await Ow($,Q._id);let J=Q,I=Array.isArray(J.identities)&&J.identities.some((q)=>q.provider&&q.provider!=="local")||!!J.apps?.hosecloud;if(I&&U&&U.source.type==="hose"){let V=(Q.mobile||J.identities?.[0]?.providerId||"").replace(/^\+86/,""),F=J.identities?.find((O)=>O.provider==="hosecloud")?.providerId,w=J.apps?.hosecloud?.boundId||F||(V?`${U.source.corpId}:${V}`:void 0);if(w){let O=await lQ(U),M=(await Kw({...U.source,staffId:w},O)).token,D=S7(U,U.source),P=A6(U.seal),j=y6(D,void 0,P),A;try{A=await j.get("api/auth/oauth2/session/oem-hosecloud",{searchParams:{token:M,returnToken:"1"}}).json()}catch(C){if(C instanceof D6&&C.response.status===400)throw Error(`Seal AI 用户“${Q.name}”未绑定合思账号,无法生成个人协助链接。`);throw C}let T=A.token??A.accessToken??A.data?.token;if(T){let C=await z(T),b=await aQ(C,{note:Y.note??`Delegation generated by admin for ${Q.name}`});return{targetUser:Q,delegation:b,temporaryPassword:"N/A (Hose SSO)"}}}}let K;try{K=await qg($,Q._id)}catch(q){if(I)throw Error(`用户 "${Q.name}" (${Q.mobile||Q._id}) 为合思同步账号 (provider: hosecloud),无 Seal 本地密码。`+"Seal 系统暂不支持对同步账号直接重置本地密码。");throw q}let H=(Q.mobile||Q.identities?.[0]?.providerId||"").replace(/^\+86/,"");if(!H)throw Error(`User ${Q.name} has no associated phone number for password login`);let{token:W}=await Wc0($,{phone:H,password:K.password}),X=await z(W),Z=await aQ(X,{note:Y.note??`Delegation generated by admin for ${Q.name}`});return{targetUser:Q,delegation:Z,temporaryPassword:K.password}}async function P40($){return N1(await $.get("api/v1/llm/config"),j10)}async function j40($){return N1(await $.get("api/v1/llm/providers"),L.array(T10))}async function T40($){return N1(await $.get("api/v1/permissions/available"),E10)}async function E40($){return N1(await $.get("api/v1/permissions/configs"),C10)}async function lY($){return N1(await $.get("api/v1/billing/status"),R10)}async function C40($){let z=await(await $.get("api/v1/billing/plans")).json();return b10.parse(z.data??z)}async function R40($){let z=await(await $.get("api/v1/billing/features")).json();return b10.parse(z.data??z)}var Mw,Kc0,Gc0,b10;var B6=m(()=>{dQ();P$();sQ();g7();i8();Ig();Mw=L.object({success:L.boolean().optional()}).passthrough(),Kc0=L.object({items:L.array(L.object({_id:L.string()})).optional()}).passthrough(),Gc0=L.object({user:L.unknown().optional(),session:L.object({token:L.string().optional()}).optional()}).passthrough(),b10=L.json()});var Y6=E((kp1,v40)=>{var{toString:_40}=Object.prototype,Xc0=/["&<>]/,Y3={each:function(Y,z){if(Y)if(Array.isArray(Y))Y.forEach(z);else Object.keys(Y).forEach((U)=>{z(Y[U],U)})},some:function(Y,z){if(Y){if(Array.isArray(Y))return Y.some(z);return Object.keys(Y).some((U)=>z(Y[U],U))}return!1},every:function(Y,z){if(Y){if(Array.isArray(Y))return Y.every(z);return Object.keys(Y).every((U)=>z(Y[U],U))}return!0},map:function(Y,z){if(Y){if(Array.isArray(Y))return Y.map(z);return Object.keys(Y).map((U)=>z(Y[U],U))}return[]},keyBy($,Y){return $.reduce((z,U)=>{return z[U[Y]]=U,z},{})},isEqual:function(Y,z){let U=typeof Y,Q=typeof z,J=Array.isArray(Y),I=Array.isArray(z),K;if(U!==Q)return!1;switch(typeof Y){case"object":if(J||I){if(J&&I)return Y.length===z.length&&Y.every((G,H)=>{let W=z[H];return Y3.isEqual(G,W)});return!1}if(Y===null||z===null)return Y===z;if(K=Object.keys(Y),Object.keys(z).length!==K.length)return!1;for(let G of K)if(!z.hasOwnProperty(G))return!1;return Y3.every(Y,(G,H)=>{let W=z[H];return Y3.isEqual(G,W)});default:return Y===z}},escapeHtml($){let Y=Xc0.exec($);if(!Y)return $;let z="",U="",Q=0,J=Y.index;for(;J<$.length;J++){switch($.charAt(J)){case'"':U=""";break;case"&":U="&";break;case"'":U="'";break;case"<":U="<";break;case">":U=">";break;default:continue}if(Q!==J)z+=$.substring(Q,J);Q=J+1,z+=U}if(Q!==J)return z+$.substring(Q,J);return z},strcmp($,Y){if($Y)return 1;return 0},isUndefined($){return _40.call($)==="[object Undefined]"},isObject($){return _40.call($)==="[object Object]"},deepMerge(){let $=arguments[0]||{},{length:Y}=arguments,z,U,Q;function J(I,K){if(z=$[K],Q=Array.isArray(I),Y3.isObject(I)||Q){if(Q)Q=!1,U=z&&Array.isArray(z)?z:[];else U=z&&Y3.isObject(z)?z:{};$[K]=Y3.deepMerge(U,I)}else if(!Y3.isUndefined(I))$[K]=I}for(let I=0;I{var Zc0=/^[A-Z]+\d+$/,kH={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level($){if($<=26)return 1;if($<=676)return 2;return 3},_fill($){let Y,z,U,Q,J,I=1;if($>=4)throw Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&$>=1){while(I<=26)Y=this._dictionary[I-1],this._n2l[I]=Y,this._l2n[Y]=I,I++;this._l2nFill=1}if(this._l2nFill<2&&$>=2){I=27;while(I<=702)z=I-27,U=z%26,Q=Math.floor(z/26),Y=this._dictionary[Q]+this._dictionary[U],this._n2l[I]=Y,this._l2n[Y]=I,I++;this._l2nFill=2}if(this._l2nFill<3&&$>=3){I=703;while(I<=16384)z=I-703,U=z%26,Q=Math.floor(z/26)%26,J=Math.floor(z/676),Y=this._dictionary[J]+this._dictionary[Q]+this._dictionary[U],this._n2l[I]=Y,this._l2n[Y]=I,I++;this._l2nFill=3}},l2n($){if(!this._l2n[$])this._fill($.length);if(!this._l2n[$])throw Error(`Out of bounds. Invalid column letter: ${$}`);return this._l2n[$]},n2l($){if($<1||$>16384)throw Error(`${$} is out of bounds. Excel supports columns from 1 to 16384`);if(!this._n2l[$])this._fill(this._level($));return this._n2l[$]},_hash:{},validateAddress($){if(!Zc0.test($))throw Error(`Invalid Address: ${$}`);return!0},decodeAddress($){let Y=$.length<5&&this._hash[$];if(Y)return Y;let z=!1,U="",Q=0,J=!1,I="",K=0;for(let H=0,W;H<$.length;H++)if(W=$.charCodeAt(H),!J&&W>=65&&W<=90)z=!0,U+=$[H],Q=Q*26+W-64;else if(W>=48&&W<=57)J=!0,I+=$[H],K=K*10+W-48;else if(J&&z&&W!==36)break;if(!z)Q=void 0;else if(Q>16384)throw Error(`Out of bounds. Invalid column letter: ${U}`);if(!J)K=void 0;$=U+I;let G={address:$,col:Q,row:K,$col$row:`$${U}$${I}`};if(Q<=100&&K<=100)this._hash[$]=G,this._hash[G.$col$row]=G;return G},getAddress($,Y){if(Y){let z=this.n2l(Y)+$;return this.decodeAddress(z)}return this.decodeAddress($)},decode($){let Y=$.split(":");if(Y.length===2){let z=this.decodeAddress(Y[0]),U=this.decodeAddress(Y[1]),Q={top:Math.min(z.row,U.row),left:Math.min(z.col,U.col),bottom:Math.max(z.row,U.row),right:Math.max(z.col,U.col)};return Q.tl=this.n2l(Q.left)+Q.top,Q.br=this.n2l(Q.right)+Q.bottom,Q.dimensions=`${Q.tl}:${Q.br}`,Q}return this.decodeAddress($)},decodeEx($){let Y=$.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),z=Y[1]||Y[2],U=Y[3],Q=U.split(":");if(Q.length>1){let I=this.decodeAddress(Q[0]),K=this.decodeAddress(Q[1]),G=Math.min(I.row,K.row),H=Math.min(I.col,K.col),W=Math.max(I.row,K.row),X=Math.max(I.col,K.col);return I=this.n2l(H)+G,K=this.n2l(X)+W,{top:G,left:H,bottom:W,right:X,sheetName:z,tl:{address:I,col:H,row:G,$col$row:`$${this.n2l(H)}$${G}`,sheetName:z},br:{address:K,col:X,row:W,$col$row:`$${this.n2l(X)}$${W}`,sheetName:z},dimensions:`${I}:${K}`}}if(U.startsWith("#"))return z?{sheetName:z,error:U}:{error:U};let J=this.decodeAddress(U);return z?{sheetName:z,...J}:J},encodeAddress($,Y){return kH.n2l(Y)+$},encode(){switch(arguments.length){case 2:return kH.encodeAddress(arguments[0],arguments[1]);case 4:return`${kH.encodeAddress(arguments[0],arguments[1])}:${kH.encodeAddress(arguments[2],arguments[3])}`;default:throw Error("Can only encode with 2 or 4 arguments")}},inRange($,Y){let[z,U,,Q,J]=$,[I,K]=Y;return I>=z&&I<=Q&&K>=U&&K<=J}};h40.exports=kH});var z3=E((fp1,S40)=>{var a5=n4();class Fg{constructor(){this.decode(arguments)}setTLBR($,Y,z,U,Q){if(arguments.length<4){let J=a5.decodeAddress($),I=a5.decodeAddress(Y);this.model={top:Math.min(J.row,I.row),left:Math.min(J.col,I.col),bottom:Math.max(J.row,I.row),right:Math.max(J.col,I.col),sheetName:z},this.setTLBR(J.row,J.col,I.row,I.col,Q)}else this.model={top:Math.min($,z),left:Math.min(Y,U),bottom:Math.max($,z),right:Math.max(Y,U),sheetName:Q}}decode($){switch($.length){case 5:this.setTLBR($[0],$[1],$[2],$[3],$[4]);break;case 4:this.setTLBR($[0],$[1],$[2],$[3]);break;case 3:this.setTLBR($[0],$[1],$[2]);break;case 2:this.setTLBR($[0],$[1]);break;case 1:{let Y=$[0];if(Y instanceof Fg)this.model={top:Y.model.top,left:Y.model.left,bottom:Y.model.bottom,right:Y.model.right,sheetName:Y.sheetName};else if(Y instanceof Array)this.decode(Y);else if(Y.top&&Y.left&&Y.bottom&&Y.right)this.model={top:Y.top,left:Y.left,bottom:Y.bottom,right:Y.right,sheetName:Y.sheetName};else{let z=a5.decodeEx(Y);if(z.top)this.model={top:z.top,left:z.left,bottom:z.bottom,right:z.right,sheetName:z.sheetName};else this.model={top:z.row,left:z.col,bottom:z.row,right:z.col,sheetName:z.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw Error(`Invalid number of arguments to _getDimensions() - ${$.length}`)}}get top(){return this.model.top||1}set top($){this.model.top=$}get left(){return this.model.left||1}set left($){this.model.left=$}get bottom(){return this.model.bottom||1}set bottom($){this.model.bottom=$}get right(){return this.model.right||1}set right($){this.model.right=$}get sheetName(){return this.model.sheetName}set sheetName($){this.model.sheetName=$}get _serialisedSheetName(){let{sheetName:$}=this.model;if($){if(/^[a-zA-Z0-9]*$/.test($))return`${$}!`;return`'${$}'!`}return""}expand($,Y,z,U){if(!this.model.top||$this.bottom)this.bottom=z;if(!this.model.right||U>this.right)this.right=U}expandRow($){if($){let{dimensions:Y,number:z}=$;if(Y)this.expand(z,Y.min,z,Y.max)}}expandToAddress($){let Y=a5.decodeEx($);this.expand(Y.row,Y.col,Y.row,Y.col)}get tl(){return a5.n2l(this.left)+this.top}get $t$l(){return`$${a5.n2l(this.left)}$${this.top}`}get br(){return a5.n2l(this.right)+this.bottom}get $b$r(){return`$${a5.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects($){if($.sheetName&&this.sheetName&&$.sheetName!==this.sheetName)return!1;if($.bottomthis.bottom)return!1;if($.rightthis.right)return!1;return!0}contains($){let Y=a5.decodeEx($);return this.containsEx(Y)}containsEx($){if($.sheetName&&this.sheetName&&$.sheetName!==this.sheetName)return!1;return $.row>=this.top&&$.row<=this.bottom&&$.col>=this.left&&$.col<=this.right}forEachAddress($){for(let Y=this.left;Y<=this.right;Y++)for(let z=this.top;z<=this.bottom;z++)$(a5.encodeAddress(z,Y),z,Y)}}S40.exports=Fg});var H5=E((up1,g40)=>{g40.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}});var k40=E((bp1,y40)=>{var hw=n4(),qc0=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,Vc0=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;function Lc0($,Y,z){let U=hw.decode(Y),Q=hw.decode(z);return $.replace(qc0,(J,I,K,G,H)=>{if(H)return J;let W=Vc0.exec(G);if(W){let X=W[1],Z=W[2].toUpperCase(),q=W[3],V=W[4];if(Z.length>3||Z.length===3&&Z>"XFD")return J;let F=hw.l2n(Z),w=parseInt(V,10);if(!X)F+=Q.col-U.col;if(!q)w+=Q.row-U.row;return(I||"")+(X||"")+hw.n2l(F)+(q||"")+w}return J})}y40.exports={slideFormula:Lc0}});var f40=E((ip1,x40)=>{var Fc0=Y6();class xH{constructor($){this.note=$}get model(){let $=null;switch(typeof this.note){case"string":$={type:"note",note:{texts:[{text:this.note}]}};break;default:$={type:"note",note:this.note};break}return Fc0.deepMerge({},xH.DEFAULT_CONFIGS,$)}set model($){let{note:Y}=$,{texts:z}=Y;if(z.length===1&&Object.keys(z[0]).length===1)this.note=z[0].text;else this.note=Y}static fromModel($){let Y=new xH;return Y.model=$,Y}}xH.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[0.13,0.13,0.25,0.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}};x40.exports=xH});var e40=E((np1,t40)=>{var Oc0=n4(),wc0=Y6(),W5=H5(),{slideFormula:Mc0}=k40(),u40=f40();class d0{constructor($,Y,z){if(!$||!Y)throw Error("A Cell needs a Row");this._row=$,this._column=Y,Oc0.validateAddress(z),this._address=z,this._value=x7.create(d0.Types.Null,this),this.style=this._mergeStyle($.style,Y.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt($){this.style.numFmt=$}get font(){return this.style.font}set font($){this.style.font=$}get alignment(){return this.style.alignment}set alignment($){this.style.alignment=$}get border(){return this.style.border}set border($){this.style.border=$}get fill(){return this.style.fill}set fill($){this.style.fill=$}get protection(){return this.style.protection}set protection($){this.style.protection=$}_mergeStyle($,Y,z){let U=$&&$.numFmt||Y&&Y.numFmt;if(U)z.numFmt=U;let Q=$&&$.font||Y&&Y.font;if(Q)z.font=Q;let J=$&&$.alignment||Y&&Y.alignment;if(J)z.alignment=J;let I=$&&$.border||Y&&Y.border;if(I)z.border=I;let K=$&&$.fill||Y&&Y.fill;if(K)z.fill=K;let G=$&&$.protection||Y&&Y.protection;if(G)z.protection=G;return z}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===d0.Types.Merge}merge($,Y){if(this._value.release(),this._value=x7.create(d0.Types.Merge,this,$),!Y)this.style=$.style}unmerge(){if(this.type===d0.Types.Merge)this._value.release(),this._value=x7.create(d0.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{})}isMergedTo($){if(this._value.type!==d0.Types.Merge)return!1;return this._value.isMergedTo($)}get master(){if(this.type===d0.Types.Merge)return this._value.master;return this}get isHyperlink(){return this._value.type===d0.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value($){if(this.type===d0.Types.Merge){this._value.master.value=$;return}this._value.release(),this._value=x7.create(x7.getType($),this,$)}get note(){return this._comment&&this._comment.note}set note($){this._comment=new u40($)}get text(){return this._value.toString()}get html(){return wc0.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink($){if(this.type===d0.Types.String)this._value=x7.create(d0.Types.Hyperlink,this,{text:this._value.value,hyperlink:$})}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:$}=this._row;return{sheetName:$.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name($){this.names=[$]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names($){let{definedNames:Y}=this.workbook;Y.removeAllNames(this.fullAddress),$.forEach((z)=>{Y.addEx(this.fullAddress,z)})}addName($){this.workbook.definedNames.addEx(this.fullAddress,$)}removeName($){this.workbook.definedNames.removeEx(this.fullAddress,$)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation($){this._dataValidations.add(this.address,$)}get model(){let{model:$}=this._value;if($.style=this.style,this._comment)$.comment=this._comment.model;return $}set model($){if(this._value.release(),this._value=x7.create($.type,this),this._value.model=$,$.comment)switch($.comment.type){case"note":this._comment=u40.fromModel($.comment);break}if($.style)this.style=$.style;else this.style={}}}d0.Types=W5.ValueType;class b40{constructor($){this.model={address:$.address,type:d0.Types.Null}}get value(){return null}set value($){}get type(){return d0.Types.Null}get effectiveType(){return d0.Types.Null}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return""}release(){}toString(){return""}}class i40{constructor($,Y){this.model={address:$.address,type:d0.Types.Number,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Number}get effectiveType(){return d0.Types.Number}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}class n40{constructor($,Y){this.model={address:$.address,type:d0.Types.String,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.String}get effectiveType(){return d0.Types.String}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}class c40{constructor($,Y){this.model={address:$.address,type:d0.Types.String,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}toString(){return this.model.value.richText.map(($)=>$.text).join("")}get type(){return d0.Types.RichText}get effectiveType(){return d0.Types.RichText}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}class p40{constructor($,Y){this.model={address:$.address,type:d0.Types.Date,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Date}get effectiveType(){return d0.Types.Date}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}class d40{constructor($,Y){if(this.model={address:$.address,type:d0.Types.Hyperlink,text:Y?Y.text:void 0,hyperlink:Y?Y.hyperlink:void 0},Y&&Y.tooltip)this.model.tooltip=Y.tooltip}get value(){let $={text:this.model.text,hyperlink:this.model.hyperlink};if(this.model.tooltip)$.tooltip=this.model.tooltip;return $}set value($){if(this.model={text:$.text,hyperlink:$.hyperlink},$.tooltip)this.model.tooltip=$.tooltip}get text(){return this.model.text}set text($){this.model.text=$}get hyperlink(){return this.model.hyperlink}set hyperlink($){this.model.hyperlink=$}get type(){return d0.Types.Hyperlink}get effectiveType(){return d0.Types.Hyperlink}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}class m40{constructor($,Y){if(this.model={address:$.address,type:d0.Types.Merge,master:Y?Y.address:void 0},this._master=Y,Y)Y.addMergeRef()}get value(){return this._master.value}set value($){if($ instanceof d0){if(this._master)this._master.releaseMergeRef();$.addMergeRef(),this._master=$}else this._master.value=$}isMergedTo($){return $===this._master}get master(){return this._master}get type(){return d0.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}class l40{constructor($,Y){this.cell=$,this.model={address:$.address,type:d0.Types.Formula,shareType:Y?Y.shareType:void 0,ref:Y?Y.ref:void 0,formula:Y?Y.formula:void 0,sharedFormula:Y?Y.sharedFormula:void 0,result:Y?Y.result:void 0}}_copyModel($){let Y={},z=(U)=>{let Q=$[U];if(Q)Y[U]=Q};return z("formula"),z("result"),z("ref"),z("shareType"),z("sharedFormula"),Y}get value(){return this._copyModel(this.model)}set value($){this.model=this._copyModel($)}validate($){switch(x7.getType($)){case d0.Types.Null:case d0.Types.String:case d0.Types.Number:case d0.Types.Date:break;case d0.Types.Hyperlink:case d0.Types.Formula:default:throw Error("Cannot process that type of result value")}}get dependencies(){let $=this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),Y=this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g);return{ranges:$,cells:Y}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula($){this.model.formula=$}get formulaType(){if(this.model.formula)return W5.FormulaType.Master;if(this.model.sharedFormula)return W5.FormulaType.Shared;return W5.FormulaType.None}get result(){return this.model.result}set result($){this.model.result=$}get type(){return d0.Types.Formula}get effectiveType(){let $=this.model.result;if($===null||$===void 0)return W5.ValueType.Null;if($ instanceof String||typeof $==="string")return W5.ValueType.String;if(typeof $==="number")return W5.ValueType.Number;if($ instanceof Date)return W5.ValueType.Date;if($.text&&$.hyperlink)return W5.ValueType.Hyperlink;if($.formula)return W5.ValueType.Formula;return W5.ValueType.Null}get address(){return this.model.address}set address($){this.model.address=$}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:$}=this.cell,Y=$.findCell(this.model.sharedFormula);this._translatedFormula=Y&&Mc0(Y.formula,Y.address,this.model.address)}return this._translatedFormula}toCsvString(){return`${this.model.result||""}`}release(){}toString(){return this.model.result?this.model.result.toString():""}}class o40{constructor($,Y){this.model={address:$.address,type:d0.Types.SharedString,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.SharedString}get effectiveType(){return d0.Types.SharedString}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}class r40{constructor($,Y){this.model={address:$.address,type:d0.Types.Boolean,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Boolean}get effectiveType(){return d0.Types.Boolean}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}class s40{constructor($,Y){this.model={address:$.address,type:d0.Types.Error,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Error}get effectiveType(){return d0.Types.Error}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}class a40{constructor($,Y){this.model={address:$.address,type:d0.Types.String,value:JSON.stringify(Y),rawValue:Y}}get value(){return this.model.rawValue}set value($){this.model.rawValue=$,this.model.value=JSON.stringify($)}get type(){return d0.Types.String}get effectiveType(){return d0.Types.String}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}var x7={getType($){if($===null||$===void 0)return d0.Types.Null;if($ instanceof String||typeof $==="string")return d0.Types.String;if(typeof $==="number")return d0.Types.Number;if(typeof $==="boolean")return d0.Types.Boolean;if($ instanceof Date)return d0.Types.Date;if($.text&&$.hyperlink)return d0.Types.Hyperlink;if($.formula||$.sharedFormula)return d0.Types.Formula;if($.richText)return d0.Types.RichText;if($.sharedString)return d0.Types.SharedString;if($.error)return d0.Types.Error;return d0.Types.JSON},types:[{t:d0.Types.Null,f:b40},{t:d0.Types.Number,f:i40},{t:d0.Types.String,f:n40},{t:d0.Types.Date,f:p40},{t:d0.Types.Hyperlink,f:d40},{t:d0.Types.Formula,f:l40},{t:d0.Types.Merge,f:m40},{t:d0.Types.JSON,f:a40},{t:d0.Types.SharedString,f:o40},{t:d0.Types.RichText,f:c40},{t:d0.Types.Boolean,f:r40},{t:d0.Types.Error,f:s40}].reduce(($,Y)=>{return $[Y.t]=Y.f,$},[]),create($,Y,z){let U=this.types[$];if(!U)throw Error(`Could not create Value of type ${$}`);return new U(Y,z)}};t40.exports=d0});var gw=E((cp1,z60)=>{var Nc0=Y6(),Sw=H5(),oY=n4(),$60=e40();class Y60{constructor($,Y){this._worksheet=$,this._number=Y,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell($){return this._cells[$-1]}getCellEx($){let Y=this._cells[$.col-1];if(!Y){let z=this._worksheet.getColumn($.col);Y=new $60(this,z,$.address),this._cells[$.col-1]=Y}return Y}getCell($){if(typeof $==="string"){let Y=this._worksheet.getColumnKey($);if(Y)$=Y.number;else $=oY.l2n($)}return this._cells[$-1]||this.getCellEx({address:oY.encodeAddress(this._number,$),row:this._number,col:$})}splice($,Y,...z){let U=$+Y,Q=z.length-Y,J=this._cells.length,I,K,G;if(Q<0){for(I=$+z.length;I<=J;I++)if(G=this._cells[I-1],K=this._cells[I-Q-1],K)G=this.getCell(I),G.value=K.value,G.style=K.style,G._comment=K._comment;else if(G)G.value=null,G.style={},G._comment=void 0}else if(Q>0)for(I=J;I>=U;I--)if(K=this._cells[I-1],K)G=this.getCell(I+Q),G.value=K.value,G.style=K.style,G._comment=K._comment;else this._cells[I+Q-1]=void 0;for(I=0;I{if(z&&z.type!==Sw.ValueType.Null)Y(z,U+1)})}addPageBreak($,Y){let z=this._worksheet,U=Math.max(0,$-1)||0,Q=Math.max(0,Y-1)||16838,J={id:this._number,max:Q,man:1};if(U)J.min=U;z.rowBreaks.push(J)}get values(){let $=[];return this._cells.forEach((Y)=>{if(Y&&Y.type!==Sw.ValueType.Null)$[Y.col]=Y.value}),$}set values($){if(this._cells=[],!$);else if($ instanceof Array){let Y=0;if($.hasOwnProperty("0"))Y=1;$.forEach((z,U)=>{if(z!==void 0)this.getCellEx({address:oY.encodeAddress(this._number,U+Y),row:this._number,col:U+Y}).value=z})}else this._worksheet.eachColumnKey((Y,z)=>{if($[z]!==void 0)this.getCellEx({address:oY.encodeAddress(this._number,Y.number),row:this._number,col:Y.number}).value=$[z]})}get hasValues(){return Nc0.some(this._cells,($)=>$&&$.type!==Sw.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let $=0;return this.eachCell(()=>{$++}),$}get dimensions(){let $=0,Y=0;return this._cells.forEach((z)=>{if(z&&z.type!==Sw.ValueType.Null){if(!$||$>z.col)$=z.col;if(Y0?{min:$,max:Y}:null}_applyStyle($,Y){return this.style[$]=Y,this._cells.forEach((z)=>{if(z)z[$]=Y}),Y}get numFmt(){return this.style.numFmt}set numFmt($){this._applyStyle("numFmt",$)}get font(){return this.style.font}set font($){this._applyStyle("font",$)}get alignment(){return this.style.alignment}set alignment($){this._applyStyle("alignment",$)}get protection(){return this.style.protection}set protection($){this._applyStyle("protection",$)}get border(){return this.style.border}set border($){this._applyStyle("border",$)}get fill(){return this.style.fill}set fill($){this._applyStyle("fill",$)}get hidden(){return!!this._hidden}set hidden($){this._hidden=$}get outlineLevel(){return this._outlineLevel||0}set outlineLevel($){this._outlineLevel=$}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let $=[],Y=0,z=0;return this._cells.forEach((U)=>{if(U){let Q=U.model;if(Q){if(!Y||Y>U.col)Y=U.col;if(z{switch(z.type){case $60.Types.Merge:break;default:{let U;if(z.address)U=oY.decodeAddress(z.address);else if(Y){let{row:J}=Y,I=Y.col+1;U={row:J,col:I,address:oY.encodeAddress(J,I),$col$row:`$${oY.n2l(I)}$${J}`}}Y=U;let Q=this.getCellEx(U);Q.model=z;break}}}),$.height)this.height=$.height;else delete this.height;this.hidden=$.hidden,this.outlineLevel=$.outlineLevel||0,this.style=$.style&&JSON.parse(JSON.stringify($.style))||{}}}z60.exports=Y60});var kw=E((pp1,U60)=>{var Dc0=Y6(),Ac0=H5(),Bc0=n4();class yw{constructor($,Y,z){if(this._worksheet=$,this._number=Y,z!==!1)this.defn=z}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return Bc0.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn($){if($){if(this.key=$.key,this.width=$.width!==void 0?$.width:9,this.outlineLevel=$.outlineLevel,$.style)this.style=$.style;else this.style={};this.header=$.header,this._hidden=!!$.hidden}else delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header($){if($!==void 0)this._header=$,this.headers.forEach((Y,z)=>{this._worksheet.getCell(z+1,this.number).value=Y});else this._header=void 0}get key(){return this._key}set key($){if((this._key&&this._worksheet.getColumnKey(this._key))===this)this._worksheet.deleteColumnKey(this._key);if(this._key=$,$)this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden($){this._hidden=$}get outlineLevel(){return this._outlineLevel||0}set outlineLevel($){this._outlineLevel=$}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo($){return this.width===$.width&&this.hidden===$.hidden&&this.outlineLevel===$.outlineLevel&&Dc0.isEqual(this.style,$.style)}get isDefault(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;let $=this.style;if($&&($.font||$.numFmt||$.alignment||$.border||$.fill||$.protection))return!1;return!0}get headerCount(){return this.headers.length}eachCell($,Y){let z=this.number;if(!Y)Y=$,$=null;this._worksheet.eachRow($,(U,Q)=>{Y(U.getCell(z),Q)})}get values(){let $=[];return this.eachCell((Y,z)=>{if(Y&&Y.type!==Ac0.ValueType.Null)$[z]=Y.value}),$}set values($){if(!$)return;let Y=this.number,z=0;if($.hasOwnProperty("0"))z=1;$.forEach((U,Q)=>{this._worksheet.getCell(Q+z,Y).value=U})}_applyStyle($,Y){return this.style[$]=Y,this.eachCell((z)=>{z[$]=Y}),Y}get numFmt(){return this.style.numFmt}set numFmt($){this._applyStyle("numFmt",$)}get font(){return this.style.font}set font($){this._applyStyle("font",$)}get alignment(){return this.style.alignment}set alignment($){this._applyStyle("alignment",$)}get protection(){return this.style.protection}set protection($){this._applyStyle("protection",$)}get border(){return this.style.border}set border($){this._applyStyle("border",$)}get fill(){return this.style.fill}set fill($){this._applyStyle("fill",$)}static toModel($){let Y=[],z=null;if($)$.forEach((U,Q)=>{if(U.isDefault){if(z)z=null}else if(!z||!U.equivalentTo(z))z={min:Q+1,max:Q+1,width:U.width!==void 0?U.width:9,style:U.style,isCustomWidth:U.isCustomWidth,hidden:U.hidden,outlineLevel:U.outlineLevel,collapsed:U.collapsed},Y.push(z);else z.max=Q+1});return Y.length?Y:void 0}static fromModel($,Y){Y=Y||[];let z=[],U=1,Q=0;Y=Y.sort(function(J,I){return J.min-I.min});while(Q{var Pc0=n4();class xw{constructor($,Y,z=0){if(this.worksheet=$,!Y)this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;else if(typeof Y==="string"){let U=Pc0.decodeAddress(Y);this.nativeCol=U.col+z,this.nativeColOff=0,this.nativeRow=U.row+z,this.nativeRowOff=0}else if(Y.nativeCol!==void 0)this.nativeCol=Y.nativeCol||0,this.nativeColOff=Y.nativeColOff||0,this.nativeRow=Y.nativeRow||0,this.nativeRowOff=Y.nativeRowOff||0;else if(Y.col!==void 0)this.col=Y.col+z,this.row=Y.row+z;else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance($){return $ instanceof xw||$==null?$:new xw($)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col($){this.nativeCol=Math.floor($),this.nativeColOff=Math.floor(($-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row($){this.nativeRow=Math.floor($),this.nativeRowOff=Math.floor(($-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(this.worksheet.getColumn(this.nativeCol+1).width*1e4):640000}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(this.worksheet.getRow(this.nativeRow+1).height*1e4):180000}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model($){this.nativeCol=$.nativeCol,this.nativeColOff=$.nativeColOff,this.nativeRow=$.nativeRow,this.nativeRowOff=$.nativeRowOff}}Q60.exports=xw});var G60=E((mp1,K60)=>{var jc0=n4(),fw=J60();class I60{constructor($,Y){this.worksheet=$,this.model=Y}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw Error("Invalid Image Type")}}set model({type:$,imageId:Y,range:z,hyperlinks:U}){if(this.type=$,this.imageId=Y,$==="image")if(typeof z==="string"){let Q=jc0.decode(z);this.range={tl:new fw(this.worksheet,{col:Q.left,row:Q.top},-1),br:new fw(this.worksheet,{col:Q.right,row:Q.bottom},0),editAs:"oneCell"}}else this.range={tl:new fw(this.worksheet,z.tl,0),br:z.br&&new fw(this.worksheet,z.br,0),ext:z.ext,editAs:z.editAs,hyperlinks:U||z.hyperlinks}}}K60.exports=I60});var Z60=E((lp1,X60)=>{var uw=n4();class H60{constructor($,Y,z){this.table=$,this.column=Y,this.index=z}_set($,Y){this.table.cacheState(),this.column[$]=Y}get name(){return this.column.name}set name($){this._set("name",$)}get filterButton(){return this.column.filterButton}set filterButton($){this.column.filterButton=$}get style(){return this.column.style}set style($){this.column.style=$}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel($){this._set("totalsRowLabel",$)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction($){this._set("totalsRowFunction",$)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult($){this._set("totalsRowResult",$)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula($){this._set("totalsRowFormula",$)}}class W60{constructor($,Y){if(this.worksheet=$,Y)this.table=Y,this.validate(),this.store()}getFormula($){switch($.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${$.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${$.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${$.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${$.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${$.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${$.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${$.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${$.name}])`;case"custom":return $.totalsRowFormula;default:throw Error(`Invalid Totals Row Function: ${$.totalsRowFunction}`)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:$}=this,Y=(G,H,W)=>{if(G[H]===void 0)G[H]=W};Y($,"headerRow",!0),Y($,"totalsRow",!1),Y($,"style",{}),Y($.style,"theme","TableStyleMedium2"),Y($.style,"showFirstColumn",!1),Y($.style,"showLastColumn",!1),Y($.style,"showRowStripes",!1),Y($.style,"showColumnStripes",!1);let z=(G,H)=>{if(!G)throw Error(H)};z($.ref,"Table must have ref"),z($.columns,"Table must have column definitions"),z($.rows,"Table must have row definitions"),$.tl=uw.decodeAddress($.ref);let{row:U,col:Q}=$.tl;z(U>0,"Table must be on valid row"),z(Q>0,"Table must be on valid col");let{width:J,filterHeight:I,tableHeight:K}=this;$.autoFilterRef=uw.encode(U,Q,U+I-1,Q+J-1),$.tableRef=uw.encode(U,Q,U+K-1,Q+J-1),$.columns.forEach((G,H)=>{if(z(G.name,`Column ${H} must have a name`),H===0)Y(G,"totalsRowLabel","Total");else Y(G,"totalsRowFunction","none"),G.totalsRowFormula=this.getFormula(G)})}store(){let $=(I,K)=>{if(K)Object.keys(K).forEach((G)=>{I[G]=K[G]})},{worksheet:Y,table:z}=this,{row:U,col:Q}=z.tl,J=0;if(z.headerRow){let I=Y.getRow(U+J++);z.columns.forEach((K,G)=>{let{style:H,name:W}=K,X=I.getCell(Q+G);X.value=W,$(X,H)})}if(z.rows.forEach((I)=>{let K=Y.getRow(U+J++);I.forEach((G,H)=>{let W=K.getCell(Q+H);W.value=G,$(W,z.columns[H].style)})}),z.totalsRow){let I=Y.getRow(U+J++);z.columns.forEach((K,G)=>{let H=I.getCell(Q+G);if(G===0)H.value=K.totalsRowLabel;else if(this.getFormula(K))H.value={formula:K.totalsRowFormula,result:K.totalsRowResult};else H.value=null;$(H,K.style)})}}load($){let{table:Y}=this,{row:z,col:U}=Y.tl,Q=0;if(Y.headerRow){let J=$.getRow(z+Q++);Y.columns.forEach((I,K)=>{let G=J.getCell(U+K);G.value=I.name})}if(Y.rows.forEach((J)=>{let I=$.getRow(z+Q++);J.forEach((K,G)=>{let H=I.getCell(U+G);H.value=K})}),Y.totalsRow){let J=$.getRow(z+Q++);Y.columns.forEach((I,K)=>{let G=J.getCell(U+K);if(K===0)G.value=I.totalsRowLabel;else if(this.getFormula(I))G.value={formula:I.totalsRowFormula,result:I.totalsRowResult}})}}get model(){return this.table}set model($){this.table=$}cacheState(){if(!this._cache)this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight}}commit(){if(!this._cache)return;this.validate();let $=uw.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let Y=0;Y{U.push(Y[Q])});else this.table.columns.splice(z,0,$),this.table.rows.forEach((U,Q)=>{U.splice(z,0,Y[Q])})}removeColumns($,Y=1){this.cacheState(),this.table.columns.splice($,Y),this.table.rows.forEach((z)=>{z.splice($,Y)})}_assign($,Y,z){this.cacheState(),$[Y]=z}get ref(){return this.table.ref}set ref($){this._assign(this.table,"ref",$)}get name(){return this.table.name}set name($){this.table.name=$}get displayName(){return this.table.displyName||this.table.name}set displayNamename($){this.table.displayName=$}get headerRow(){return this.table.headerRow}set headerRow($){this._assign(this.table,"headerRow",$)}get totalsRow(){return this.table.totalsRow}set totalsRow($){this._assign(this.table,"totalsRow",$)}get theme(){return this.table.style.name}set theme($){this.table.style.name=$}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn($){this.table.style.showFirstColumn=$}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn($){this.table.style.showLastColumn=$}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes($){this.table.style.showRowStripes=$}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes($){this.table.style.showColumnStripes=$}}X60.exports=W60});var Og=E((op1,V60)=>{class q60{constructor($){this.model=$||{}}add($,Y){return this.model[$]=Y}find($){return this.model[$]}remove($){this.model[$]=void 0}}V60.exports=q60});var Mg=E((rp1,L60)=>{var wg=I0("crypto"),Tc0={hash($,...Y){let z=wg.createHash($);return z.update(Buffer.concat(Y)),z.digest()},convertPasswordToHash($,Y,z,U){if(Y=Y.toLowerCase(),wg.getHashes().indexOf(Y)<0)throw Error(`Hash algorithm '${Y}' not supported!`);let J=Buffer.from($,"utf16le"),I=this.hash(Y,Buffer.from(z,"base64"),J);for(let K=0;K{var F60=($,Y)=>({...$,...Y.reduce((z,U)=>{if($[U])z[U]={...$[U]};return z},{})}),t5=($,Y,z,U=[])=>{if($[z])Y[z]=F60($[z],U)},Ec0=($)=>Object.keys($).length===0,Cc0=($)=>{if(!$)return $;if(Ec0($))return{};let Y={...$};if(t5($,Y,"font",["color"]),t5($,Y,"alignment"),t5($,Y,"protection"),$.border)t5($,Y,"border"),t5($.border,Y.border,"top",["color"]),t5($.border,Y.border,"left",["color"]),t5($.border,Y.border,"bottom",["color"]),t5($.border,Y.border,"right",["color"]),t5($.border,Y.border,"diagonal",["color"]);if($.fill){if(t5($,Y,"fill",["fgColor","bgColor","center"]),$.fill.stops)Y.fill.stops=$.fill.stops.map((z)=>F60(z,["color"]))}return Y};Rc0.copyStyle=Cc0});var j60=E((ap1,P60)=>{var fH=Y6(),uH=n4(),bH=z3(),w60=gw(),bw=kw(),vc0=H5(),Ng=G60(),M60=Z60(),N60=Og(),D60=Mg(),{copyStyle:A60}=O60();class B60{constructor($){$=$||{},this._workbook=$.workbook,this.id=$.id,this.orderNo=$.orderNo,this.name=$.name,this.state=$.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},$.properties),this.pageSetup=Object.assign({},{margins:{left:0.7,right:0.7,top:0.75,bottom:0.75,header:0.3,footer:0.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!!($.pageSetup&&($.pageSetup.fitToWidth||$.pageSetup.fitToHeight)&&!$.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},$.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},$.headerFooter),this.dataValidations=new N60,this.views=$.views||[],this.autoFilter=$.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name($){if($===void 0)$=`sheet${this.id}`;if(this._name===$)return;if(typeof $!=="string")throw Error("The name has to be a string.");if($==="")throw Error("The name can't be empty.");if($==="History")throw Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test($))throw Error(`Worksheet name ${$} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test($))throw Error(`The first or last character of worksheet name cannot be a single quotation mark: ${$}`);if($&&$.length>31)console.warn(`Worksheet name ${$} exceeds 31 chars. This will be truncated`),$=$.substring(0,31);if(this._workbook._worksheets.find((Y)=>Y&&Y.name.toLowerCase()===$.toLowerCase()))throw Error(`Worksheet name already exists: ${$}`);this._name=$}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let $=new bH;return this._rows.forEach((Y)=>{if(Y){let z=Y.dimensions;if(z)$.expand(Y.number,z.min,Y.number,z.max)}}),$}get columns(){return this._columns}set columns($){this._headerRowCount=$.reduce((U,Q)=>{let J=Q.header&&1||Q.headers&&Q.headers.length||0;return Math.max(U,J)},0);let Y=1,z=this._columns=[];$.forEach((U)=>{let Q=new bw(this,Y++,!1);z.push(Q),Q.defn=U})}getColumnKey($){return this._keys[$]}setColumnKey($,Y){this._keys[$]=Y}deleteColumnKey($){delete this._keys[$]}eachColumnKey($){fH.each(this._keys,$)}getColumn($){if(typeof $==="string"){let Y=this._keys[$];if(Y)return Y;$=uH.l2n($)}if(!this._columns)this._columns=[];if($>this._columns.length){let Y=this._columns.length+1;while(Y<=$)this._columns.push(new bw(this,Y++))}return this._columns[$-1]}spliceColumns($,Y,...z){let Q=this._rows.length;if(z.length>0)for(let G=0;G{H.push(X[G]||null)});let W=this.getRow(G+1);W.splice.apply(W,H)}else this._rows.forEach((G)=>{if(G)G.splice($,Y)});let J=z.length-Y,I=$+Y,K=this._columns.length;if(J<0)for(let G=$+z.length;G<=K;G++)this.getColumn(G).defn=this.getColumn(G-J).defn;else if(J>0)for(let G=K;G>=I;G--)this.getColumn(G+J).defn=this.getColumn(G).defn;for(let G=$;G<$+z.length;G++)this.getColumn(G).defn=null;this.workbook.definedNames.spliceColumns(this.name,$,Y,z.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let $=0;return this.eachRow((Y)=>{$=Math.max($,Y.cellCount)}),$}get actualColumnCount(){let $=[],Y=0;return this.eachRow((z)=>{z.eachCell(({col:U})=>{if(!$[U])$[U]=!0,Y++})}),Y}_commitRow(){}get _lastRowNumber(){let $=this._rows,Y=$.length;while(Y>0&&$[Y-1]===void 0)Y--;return Y}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1];return}findRow($){return this._rows[$-1]}findRows($,Y){return this._rows.slice($-1,$-1+Y)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let $=0;return this.eachRow(()=>{$++}),$}getRow($){let Y=this._rows[$-1];if(!Y)Y=this._rows[$-1]=new w60(this,$);return Y}getRows($,Y){if(Y<1)return;let z=[];for(let U=$;U<$+Y;U++)z.push(this.getRow(U));return z}addRow($,Y="n"){let z=this._nextRow,U=this.getRow(z);return U.values=$,this._setStyleOption(z,Y[0]==="i"?Y:"n"),U}addRows($,Y="n"){let z=[];return $.forEach((U)=>{z.push(this.addRow(U,Y))}),z}insertRow($,Y,z="n"){return this.spliceRows($,0,Y),this._setStyleOption($,z),this.getRow($)}insertRows($,Y,z="n"){if(this.spliceRows($,0,...Y),z!=="n"){for(let U=0;U{Q.getCell(I).style=A60(J.style)}),Q.height=U.height}duplicateRow($,Y,z=!1){let U=this._rows[$-1],Q=Array(Y).fill(U.values);this.spliceRows($+1,z?0:Y,...Q);for(let J=0;J{I.getCell(G).style=K.style})}}spliceRows($,Y,...z){let U=$+Y,Q=z.length,J=Q-Y,I=this._rows.length,K,G;if(J<0){if($===I)this._rows[I-1]=void 0;for(K=U;K<=I;K++)if(G=this._rows[K-1],G){let H=this.getRow(K+J);H.values=G.values,H.style=G.style,H.height=G.height,G.eachCell({includeEmpty:!0},(W,X)=>{H.getCell(X).style=W.style}),this._rows[K-1]=void 0}else this._rows[K+J-1]=void 0}else if(J>0)for(K=I;K>=U;K--)if(G=this._rows[K-1],G){let H=this.getRow(K+J);H.values=G.values,H.style=G.style,H.height=G.height,G.eachCell({includeEmpty:!0},(W,X)=>{if(H.getCell(X).style=W.style,W._value.constructor.name==="MergeValue"){let Z=this.getRow(W._row._number+Q).getCell(X),q=W._value._master,V=this.getRow(q._row._number+Q).getCell(q._column._number);Z.merge(V)}})}else this._rows[K+J-1]=void 0;for(K=0;K{if(z&&z.hasValues)Y(z,z.number)})}getSheetValues(){let $=[];return this._rows.forEach((Y)=>{if(Y)$[Y.number]=Y.values}),$}findCell($,Y){let z=uH.getAddress($,Y),U=this._rows[z.row-1];return U?U.findCell(z.col):void 0}getCell($,Y){let z=uH.getAddress($,Y);return this.getRow(z.row).getCellEx(z)}mergeCells(...$){let Y=new bH($);this._mergeCellsInternal(Y)}mergeCellsWithoutStyle(...$){let Y=new bH($);this._mergeCellsInternal(Y,!0)}_mergeCellsInternal($,Y){fH.each(this._merges,(U)=>{if(U.intersects($))throw Error("Cannot merge already merged cells")});let z=this.getCell($.top,$.left);for(let U=$.top;U<=$.bottom;U++)for(let Q=$.left;Q<=$.right;Q++)if(U>$.top||Q>$.left)this.getCell(U,Q).merge(z,Y);this._merges[z.address]=$}_unMergeMaster($){let Y=this._merges[$.address];if(Y){for(let z=Y.top;z<=Y.bottom;z++)for(let U=Y.left;U<=Y.right;U++)this.getCell(z,U).unmerge();delete this._merges[$.address]}}get hasMerges(){return fH.some(this._merges,Boolean)}unMergeCells(...$){let Y=new bH($);for(let z=Y.top;z<=Y.bottom;z++)for(let U=Y.left;U<=Y.right;U++){let Q=this.findCell(z,U);if(Q){if(Q.type===vc0.ValueType.Merge)this._unMergeMaster(Q.master);else if(this._merges[Q.address])this._unMergeMaster(Q)}}}fillFormula($,Y,z,U="shared"){let Q=uH.decode($),{top:J,left:I,bottom:K,right:G}=Q,H=G-I+1,W=uH.encodeAddress(J,I),X=U==="shared",Z;if(typeof z==="function")Z=z;else if(Array.isArray(z))if(Array.isArray(z[0]))Z=(V,F)=>z[V-J][F-I];else Z=(V,F)=>z[(V-J)*H+(F-I)];else Z=()=>{return};let q=!0;for(let V=J;V<=K;V++)for(let F=I;F<=G;F++)if(q)this.getCell(V,F).value={shareType:U,formula:Y,ref:$,result:Z(V,F)},q=!1;else this.getCell(V,F).value=X?{sharedFormula:W,result:Z(V,F)}:Z(V,F)}addImage($,Y){let z={type:"image",imageId:$,range:Y};this._media.push(new Ng(this,z))}getImages(){return this._media.filter(($)=>$.type==="image")}addBackgroundImage($){let Y={type:"background",imageId:$};this._media.push(new Ng(this,Y))}getBackgroundImageId(){let $=this._media.find((Y)=>Y.type==="background");return $&&$.imageId}protect($,Y){return new Promise((z)=>{if(this.sheetProtection={sheet:!0},Y&&"spinCount"in Y)Y.spinCount=Number.isFinite(Y.spinCount)?Math.round(Math.max(0,Y.spinCount)):1e5;if($)this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=D60.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=Y&&"spinCount"in Y?Y.spinCount:1e5,this.sheetProtection.hashValue=D60.convertPasswordToHash($,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount);if(Y){if(this.sheetProtection=Object.assign(this.sheetProtection,Y),!$&&"spinCount"in Y)delete this.sheetProtection.spinCount}z()})}unprotect(){this.sheetProtection=null}addTable($){let Y=new M60(this,$);return this.tables[$.name]=Y,Y}getTable($){return this.tables[$]}removeTable($){delete this.tables[$]}getTables(){return Object.values(this.tables)}addConditionalFormatting($){this.conditionalFormattings.push($)}removeConditionalFormatting($){if(typeof $==="number")this.conditionalFormattings.splice($,1);else if($ instanceof Function)this.conditionalFormattings=this.conditionalFormattings.filter($);else this.conditionalFormattings=[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor($){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=$}get model(){let $={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map((U)=>U.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map((U)=>U.model),conditionalFormattings:this.conditionalFormattings};$.cols=bw.toModel(this.columns);let Y=$.rows=[],z=$.dimensions=new bH;return this._rows.forEach((U)=>{let Q=U&&U.model;if(Q)z.expand(Q.number,Q.min,Q.number,Q.max),Y.push(Q)}),$.merges=[],fH.each(this._merges,(U)=>{$.merges.push(U.range)}),$}_parseRows($){this._rows=[],$.rows.forEach((Y)=>{let z=new w60(this,Y.number);this._rows[z.number-1]=z,z.model=Y})}_parseMergeCells($){fH.each($.mergeCells,(Y)=>{this.mergeCellsWithoutStyle(Y)})}set model($){this.name=$.name,this._columns=bw.fromModel(this,$.cols),this._parseRows($),this._parseMergeCells($),this.dataValidations=new N60($.dataValidations),this.properties=$.properties,this.pageSetup=$.pageSetup,this.headerFooter=$.headerFooter,this.views=$.views,this.autoFilter=$.autoFilter,this._media=$.media.map((Y)=>new Ng(this,Y)),this.sheetProtection=$.sheetProtection,this.tables=$.tables.reduce((Y,z)=>{let U=new M60;return U.model=z,Y[z.name]=U,Y},{}),this.conditionalFormattings=$.conditionalFormattings}}P60.exports=B60});var R60=E((tp1,C60)=>{var T60=Y6(),iw=n4();class E60{constructor($){this.template=$,this.sheets={}}addCell($){this.addCellEx(iw.decodeEx($))}getCell($){return this.findCellEx(iw.decodeEx($),!0)}findCell($){return this.findCellEx(iw.decodeEx($),!1)}findCellAt($,Y,z){let U=this.sheets[$],Q=U&&U[Y];return Q&&Q[z]}addCellEx($){if($.top)for(let Y=$.top;Y<=$.bottom;Y++)for(let z=$.left;z<=$.right;z++)this.getCellAt($.sheetName,Y,z);else this.findCellEx($,!0)}getCellEx($){return this.findCellEx($,!0)}findCellEx($,Y){let z=this.findSheet($,Y),U=this.findSheetRow(z,$,Y);return this.findRowCell(U,$,Y)}getCellAt($,Y,z){let U=this.sheets[$]||(this.sheets[$]=[]),Q=U[Y]||(U[Y]=[]);return Q[z]||(Q[z]={sheetName:$,address:iw.n2l(z)+Y,row:Y,col:z})}removeCellEx($){let Y=this.findSheet($);if(!Y)return;let z=this.findSheetRow(Y,$);if(!z)return;delete z[$.col]}forEachInSheet($,Y){let z=this.sheets[$];if(z)z.forEach((U,Q)=>{if(U)U.forEach((J,I)=>{if(J)Y(J,Q,I)})})}forEach($){T60.each(this.sheets,(Y,z)=>{this.forEachInSheet(z,$)})}map($){let Y=[];return this.forEach((z)=>{Y.push($(z))}),Y}findSheet($,Y){let z=$.sheetName;if(this.sheets[z])return this.sheets[z];if(Y)return this.sheets[z]=[];return}findSheetRow($,Y,z){let{row:U}=Y;if($&&$[U])return $[U];if(z)return $[U]=[];return}findRowCell($,Y,z){let{col:U}=Y;if($&&$[U])return $[U];if(z)return $[U]=this.template?Object.assign(Y,JSON.parse(JSON.stringify(this.template))):Y;return}spliceRows($,Y,z,U){let Q=this.sheets[$];if(Q){let J=[];for(let I=0;I{I.splice(Y,z,...J)})}}}C60.exports=E60});var Dg=E((ep1,h60)=>{var eQ=Y6(),iH=n4(),_60=R60(),hc0=z3(),Sc0=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;class v60{constructor(){this.matrixMap={}}getMatrix($){return this.matrixMap[$]||(this.matrixMap[$]=new _60)}add($,Y){let z=iH.decodeEx($);this.addEx(z,Y)}addEx($,Y){let z=this.getMatrix(Y);if($.top)for(let U=$.left;U<=$.right;U++)for(let Q=$.top;Q<=$.bottom;Q++){let J={sheetName:$.sheetName,address:iH.n2l(U)+Q,row:Q,col:U};z.addCellEx(J)}else z.addCellEx($)}remove($,Y){let z=iH.decodeEx($);this.removeEx(z,Y)}removeEx($,Y){this.getMatrix(Y).removeCellEx($)}removeAllNames($){eQ.each(this.matrixMap,(Y)=>{Y.removeCellEx($)})}forEach($){eQ.each(this.matrixMap,(Y,z)=>{Y.forEach((U)=>{$(z,U)})})}getNames($){return this.getNamesEx(iH.decodeEx($))}getNamesEx($){return eQ.map(this.matrixMap,(Y,z)=>Y.findCellEx($)&&z).filter(Boolean)}_explore($,Y){Y.mark=!1;let{sheetName:z}=Y,U=new hc0(Y.row,Y.col,Y.row,Y.col,z),Q,J;function I(G,H){let W=$.findCellAt(z,G,Y.col);if(!W||!W.mark)return!1;return U[H]=G,W.mark=!1,!0}for(J=Y.row-1;I(J,"top");J--);for(J=Y.row+1;I(J,"bottom");J++);function K(G,H){let W=[];for(J=U.top;J<=U.bottom;J++){let X=$.findCellAt(z,J,G);if(X&&X.mark)W.push(X);else return!1}U[H]=G;for(let X=0;X{U.mark=!0});let z=Y.map((U)=>U.mark&&this._explore(Y,U)).filter(Boolean).map((U)=>U.$shortRange);return{name:$,ranges:z}}normaliseMatrix($,Y){$.forEachInSheet(Y,(z,U,Q)=>{if(z){if(z.row!==U||z.col!==Q)z.row=U,z.col=Q,z.address=iH.n2l(Q)+U}})}spliceRows($,Y,z,U){eQ.each(this.matrixMap,(Q)=>{Q.spliceRows($,Y,z,U),this.normaliseMatrix(Q,$)})}spliceColumns($,Y,z,U){eQ.each(this.matrixMap,(Q)=>{Q.spliceColumns($,Y,z,U),this.normaliseMatrix(Q,$)})}get model(){return eQ.map(this.matrixMap,($,Y)=>this.getRanges(Y,$)).filter(($)=>$.ranges.length)}set model($){let Y=this.matrixMap={};$.forEach((z)=>{let U=Y[z.name]=new _60;z.ranges.forEach((Q)=>{if(Sc0.test(Q.split("!").pop()||""))U.addCell(Q)})})}}h60.exports=v60});var I6=E(($d1,Ag)=>{if(typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0)Ag.exports={nextTick:gc0};else Ag.exports=process;function gc0($,Y,z,U){if(typeof $!=="function")throw TypeError('"callback" argument must be a function');var Q=arguments.length,J,I;switch(Q){case 0:case 1:return process.nextTick($);case 2:return process.nextTick(function(){$.call(null,Y)});case 3:return process.nextTick(function(){$.call(null,Y,z)});case 4:return process.nextTick(function(){$.call(null,Y,z,U)});default:J=Array(Q-1),I=0;while(I{var yc0={}.toString;S60.exports=Array.isArray||function($){return yc0.call($)=="[object Array]"}});var K6=E((Bg,y60)=>{var nw=I0("buffer"),U3=nw.Buffer;function g60($,Y){for(var z in $)Y[z]=$[z]}if(U3.from&&U3.alloc&&U3.allocUnsafe&&U3.allocUnsafeSlow)y60.exports=nw;else g60(nw,Bg),Bg.Buffer=YJ;function YJ($,Y,z){return U3($,Y,z)}g60(U3,YJ);YJ.from=function($,Y,z){if(typeof $==="number")throw TypeError("Argument must not be a number");return U3($,Y,z)};YJ.alloc=function($,Y,z){if(typeof $!=="number")throw TypeError("Argument must be a number");var U=U3($);if(Y!==void 0)if(typeof z==="string")U.fill(Y,z);else U.fill(Y);else U.fill(0);return U};YJ.allocUnsafe=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return U3($)};YJ.allocUnsafeSlow=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return nw.SlowBuffer($)}});var M4=E((sc0)=>{function kc0($){if(Array.isArray)return Array.isArray($);return cw($)==="[object Array]"}sc0.isArray=kc0;function xc0($){return typeof $==="boolean"}sc0.isBoolean=xc0;function fc0($){return $===null}sc0.isNull=fc0;function uc0($){return $==null}sc0.isNullOrUndefined=uc0;function bc0($){return typeof $==="number"}sc0.isNumber=bc0;function ic0($){return typeof $==="string"}sc0.isString=ic0;function nc0($){return typeof $==="symbol"}sc0.isSymbol=nc0;function cc0($){return $===void 0}sc0.isUndefined=cc0;function pc0($){return cw($)==="[object RegExp]"}sc0.isRegExp=pc0;function dc0($){return typeof $==="object"&&$!==null}sc0.isObject=dc0;function mc0($){return cw($)==="[object Date]"}sc0.isDate=mc0;function lc0($){return cw($)==="[object Error]"||$ instanceof Error}sc0.isError=lc0;function oc0($){return typeof $==="function"}sc0.isFunction=oc0;function rc0($){return $===null||typeof $==="boolean"||typeof $==="number"||typeof $==="string"||typeof $==="symbol"||typeof $>"u"}sc0.isPrimitive=rc0;sc0.isBuffer=I0("buffer").Buffer.isBuffer;function cw($){return Object.prototype.toString.call($)}});var k60=E((Ud1,Pg)=>{if(typeof Object.create==="function")Pg.exports=function(Y,z){if(z)Y.super_=z,Y.prototype=Object.create(z.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}})};else Pg.exports=function(Y,z){if(z){Y.super_=z;var U=function(){};U.prototype=z.prototype,Y.prototype=new U,Y.prototype.constructor=Y}}});var X1=E((Qd1,jg)=>{try{if(pw=I0("util"),typeof pw.inherits!=="function")throw"";jg.exports=pw.inherits}catch($){jg.exports=k60()}var pw});var f60=E((Jd1,Tg)=>{function Zp0($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var x60=K6().Buffer,nH=I0("util");function qp0($,Y,z){$.copy(Y,z)}Tg.exports=function(){function $(){Zp0(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return x60.alloc(0);var U=x60.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)qp0(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(nH&&nH.inspect&&nH.inspect.custom)Tg.exports.prototype[nH.inspect.custom]=function(){var $=nH.inspect({length:this.length});return this.constructor.name+" "+$}});var Eg=E((Id1,u60)=>{var dw=I6();function Vp0($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)dw.nextTick(mw,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,dw.nextTick(mw,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)dw.nextTick(mw,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,dw.nextTick(mw,z,J)}else if(Y)Y(J)}),this}function Lp0(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function mw($,Y){$.emit("error",Y)}u60.exports={destroy:Vp0,undestroy:Lp0}});var f7=E((Kd1,b60)=>{b60.exports=I0("util").deprecate});var Rg=E((Gd1,o60)=>{var rY=I6();o60.exports=Z6;function n60($){var Y=this;this.next=null,this.entry=null,this.finish=function(){Sp0(Y,$)}}var Fp0=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:rY.nextTick,zJ;Z6.WritableState=pH;var c60=Object.create(M4());c60.inherits=X1();var Op0={deprecate:f7()},p60=I0("stream"),ow=K6().Buffer,wp0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Mp0($){return ow.from($)}function Np0($){return ow.isBuffer($)||$ instanceof wp0}var d60=Eg();c60.inherits(Z6,p60);function Dp0(){}function pH($,Y){zJ=zJ||sY(),$=$||{};var z=Y instanceof zJ;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){Cp0(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new n60(this)}pH.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(pH.prototype,"buffer",{get:Op0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var lw;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")lw=Function.prototype[Symbol.hasInstance],Object.defineProperty(Z6,Symbol.hasInstance,{value:function($){if(lw.call(this,$))return!0;if(this!==Z6)return!1;return $&&$._writableState instanceof pH}});else lw=function($){return $ instanceof this};function Z6($){if(zJ=zJ||sY(),!lw.call(Z6,this)&&!(this instanceof zJ))return new Z6($);if(this._writableState=new pH($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}p60.call(this)}Z6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function Ap0($,Y){var z=Error("write after end");$.emit("error",z),rY.nextTick(Y,z)}function Bp0($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),rY.nextTick(U,J),Q=!1;return Q}Z6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&Np0($);if(J&&!ow.isBuffer($))$=Mp0($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=Dp0;if(U.ended)Ap0(this,z);else if(J||Bp0(this,U,$,z))U.pendingcb++,Q=jp0(this,U,J,$,Y,z);return Q};Z6.prototype.cork=function(){var $=this._writableState;$.corked++};Z6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)m60(this,$)}};Z6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function Pp0($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=ow.from(Y,z);return Y}Object.defineProperty(Z6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function jp0($,Y,z,U,Q,J){if(!z){var I=Pp0(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var r60=I6(),gp0=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};t60.exports=Q3;var s60=Object.create(M4());s60.inherits=X1();var a60=vg(),_g=Rg();s60.inherits(Q3,a60);{rw=gp0(_g.prototype);for(dH=0;dH{var Sg=K6().Buffer,e60=Sg.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function xp0($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function fp0($){var Y=xp0($);if(typeof Y!=="string"&&(Sg.isEncoding===e60||!e60($)))throw Error("Unknown encoding: "+$);return Y||$}sp0.StringDecoder=lH;function lH($){this.encoding=fp0($);var Y;switch(this.encoding){case"utf16le":this.text=pp0,this.end=dp0,Y=4;break;case"utf8":this.fillLast=ip0,Y=4;break;case"base64":this.text=mp0,this.end=lp0,Y=3;break;default:this.write=op0,this.end=rp0;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sg.allocUnsafe(Y)}lH.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};lH.prototype.end=cp0;lH.prototype.text=np0;lH.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function hg($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function up0($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function bp0($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function ip0($){var Y=this.lastTotal-this.lastNeed,z=bp0(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function np0($,Y){var z=up0(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function cp0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function pp0($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function dp0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function mp0($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function lp0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function op0($){return $.toString(this.encoding)}function rp0($){return $&&$.length?this.write($):""}});var vg=E((Zd1,X80)=>{var QJ=I6();X80.exports=P4;var tp0=$J(),oH;P4.ReadableState=I80;var Xd1=I0("events").EventEmitter,U80=function($,Y){return $.listeners(Y).length},ug=I0("stream"),rH=K6().Buffer,ep0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function $d0($){return rH.from($)}function Yd0($){return rH.isBuffer($)||$ instanceof ep0}var Q80=Object.create(M4());Q80.inherits=X1();var yg=I0("util"),t1=void 0;if(yg&&yg.debuglog)t1=yg.debuglog("stream");else t1=function(){};var zd0=f60(),J80=Eg(),UJ;Q80.inherits(P4,ug);var kg=["error","close","destroy","pause","resume"];function Ud0($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(tp0($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function I80($,Y){oH=oH||sY(),$=$||{};var z=Y instanceof oH;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new zd0,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!UJ)UJ=gg().StringDecoder;this.decoder=new UJ($.encoding),this.encoding=$.encoding}}function P4($){if(oH=oH||sY(),!(this instanceof P4))return new P4($);if(this._readableState=new I80($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}ug.call(this)}Object.defineProperty(P4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});P4.prototype.destroy=J80.destroy;P4.prototype._undestroy=J80.undestroy;P4.prototype._destroy=function($,Y){this.push(null),Y($)};P4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=rH.from($,Y),Y="";U=!0}}else U=!0;return K80(this,$,Y,!1,U)};P4.prototype.unshift=function($){return K80(this,$,null,!0,!1)};function K80($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,Kd0($,J);else{var I;if(!Q)I=Qd0(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==rH.prototype)Y=$d0(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else xg($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)xg($,J,Y,!1);else G80($,J);else xg($,J,Y,!1)}else if(!U)J.reading=!1}return Jd0(J)}function xg($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)sw($)}G80($,Y)}function Qd0($,Y){var z;if(!Yd0(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function Jd0($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}P4.prototype.isPaused=function(){return this._readableState.flowing===!1};P4.prototype.setEncoding=function($){if(!UJ)UJ=gg().StringDecoder;return this._readableState.decoder=new UJ($),this._readableState.encoding=$,this};var $80=8388608;function Id0($){if($>=$80)$=$80;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function Y80($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=Id0($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}P4.prototype.read=function($){t1("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(t1("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)fg(this);else sw(this);return null}if($=Y80($,Y),$===0&&Y.ended){if(Y.length===0)fg(this);return null}var U=Y.needReadable;if(t1("need readable",U),Y.length===0||Y.length-$0)Q=H80($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)fg(this)}if(Q!==null)this.emit("data",Q);return Q};function Kd0($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,sw($)}function sw($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(t1("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)QJ.nextTick(z80,$);else z80($)}function z80($){t1("emit readable"),$.emit("readable"),bg($)}function G80($,Y){if(!Y.readingMore)Y.readingMore=!0,QJ.nextTick(Gd0,$,Y)}function Gd0($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&W80(U.pipes,$)!==-1)&&!H)t1("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(t1("onerror",O),w(),$.removeListener("error",q),U80($,"error")===0)$.emit("error",O)}Ud0($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){t1("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){t1("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)t1("pipe resume"),z.resume();return $};function Hd0($){return function(){var Y=$._readableState;if(t1("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&U80($,"data"))Y.flowing=!0,bg($)}}P4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=qd0($,Y.buffer,Y.decoder);return z}function qd0($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function Ld0($,Y){var z=rH.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function fg($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,QJ.nextTick(Fd0,Y,$)}function Fd0($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function W80($,Y){for(var z=0,U=$.length;z{V80.exports=J3;var aw=sY(),q80=Object.create(M4());q80.inherits=X1();q80.inherits(J3,aw);function Od0($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{O80.exports=sH;var L80=ig(),F80=Object.create(M4());F80.inherits=X1();F80.inherits(sH,L80);function sH($){if(!(this instanceof sH))return new sH($);L80.call(this,$)}sH.prototype._transform=function($,Y,z){z(null,$)}});var ng=E((m6,tw)=>{var e5=I0("stream");if(process.env.READABLE_STREAM==="disable"&&e5)tw.exports=e5,m6=tw.exports=e5.Readable,m6.Readable=e5.Readable,m6.Writable=e5.Writable,m6.Duplex=e5.Duplex,m6.Transform=e5.Transform,m6.PassThrough=e5.PassThrough,m6.Stream=e5;else m6=tw.exports=vg(),m6.Stream=e5||m6,m6.Readable=m6,m6.Writable=Rg(),m6.Duplex=sY(),m6.Transform=ig(),m6.PassThrough=w80()});var I3=E((Nd0)=>{Nd0.base64=!0;Nd0.array=!0;Nd0.string=!0;Nd0.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";Nd0.nodebuffer=typeof Buffer<"u";Nd0.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")Nd0.blob=!1;else{ew=new ArrayBuffer(0);try{Nd0.blob=new Blob([ew],{type:"application/zip"}).size===0}catch($){try{pg=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,$M=new pg,$M.append(ew),Nd0.blob=$M.getBlob("application/zip").size===0}catch(Y){Nd0.blob=!1}}}var ew,pg,$M;try{Nd0.nodestream=!!ng().Readable}catch($){Nd0.nodestream=!1}});var dg=E((Rd0)=>{var Ed0=c4(),Cd0=I3(),$9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Rd0.encode=function($){var Y=[],z,U,Q,J,I,K,G,H=0,W=$.length,X=W,Z=Ed0.getTypeOf($)!=="string";while(H<$.length){if(X=W-H,!Z)z=$.charCodeAt(H++),U=H>2,I=(z&3)<<4|U>>4,K=X>1?(U&15)<<2|Q>>6:64,G=X>2?Q&63:64,Y.push($9.charAt(J)+$9.charAt(I)+$9.charAt(K)+$9.charAt(G))}return Y.join("")};Rd0.decode=function($){var Y,z,U,Q,J,I,K,G=0,H=0,W="data:";if($.substr(0,W.length)===W)throw Error("Invalid base64 input, it looks like a data url.");$=$.replace(/[^A-Za-z0-9+/=]/g,"");var X=$.length*3/4;if($.charAt($.length-1)===$9.charAt(64))X--;if($.charAt($.length-2)===$9.charAt(64))X--;if(X%1!==0)throw Error("Invalid base64 input, bad content length.");var Z;if(Cd0.uint8array)Z=new Uint8Array(X|0);else Z=Array(X|0);while(G<$.length){if(Q=$9.indexOf($.charAt(G++)),J=$9.indexOf($.charAt(G++)),I=$9.indexOf($.charAt(G++)),K=$9.indexOf($.charAt(G++)),Y=Q<<2|J>>4,z=(J&15)<<4|I>>2,U=(I&3)<<6|K,Z[H++]=Y,I!==64)Z[H++]=z;if(K!==64)Z[H++]=U}return Z}});var aH=E((Od1,M80)=>{M80.exports={isNode:typeof Buffer<"u",newBufferFrom:function($,Y){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from($,Y);else{if(typeof $==="number")throw Error('The "data" argument must not be a number');return new Buffer($,Y)}},allocBuffer:function($){if(Buffer.alloc)return Buffer.alloc($);else{var Y=new Buffer($);return Y.fill(0),Y}},isBuffer:function($){return Buffer.isBuffer($)},isStream:function($){return $&&typeof $.on==="function"&&typeof $.pause==="function"&&typeof $.resume==="function"}}});var A80=E((Md1,D80)=>{var wd1=global.MutationObserver||global.WebKitMutationObserver,N80;N80=function(){process.nextTick(kd0)};var hd0,Sd0,gd0,yd0,mg,tH=[];function kd0(){mg=!0;var $,Y,z=tH.length;while(z){Y=tH,tH=[],$=-1;while(++${var B80=A80();function IJ(){}var X8={},P80=["REJECTED"],lg=["FULFILLED"],j80=["PENDING"];JJ=["UNHANDLED"];var JJ;C80.exports=u7;function u7($){if(typeof $!=="function")throw TypeError("resolver must be a function");if(this.state=j80,this.queue=[],this.outcome=void 0,this.handled=JJ,$!==IJ)T80(this,$)}u7.prototype.finally=function($){if(typeof $!=="function")return this;var Y=this.constructor;return this.then(z,U);function z(Q){function J(){return Q}return Y.resolve($()).then(J)}function U(Q){function J(){throw Q}return Y.resolve($()).then(J)}};u7.prototype.catch=function($){return this.then(null,$)};u7.prototype.then=function($,Y){if(typeof $!=="function"&&this.state===lg||typeof Y!=="function"&&this.state===P80)return this;var z=new this.constructor(IJ);if(this.handled===JJ)this.handled=null;if(this.state!==j80){var U=this.state===lg?$:Y;og(z,U,this.outcome)}else this.queue.push(new eH(z,$,Y));return z};function eH($,Y,z){if(this.promise=$,typeof Y==="function")this.onFulfilled=Y,this.callFulfilled=this.otherCallFulfilled;if(typeof z==="function")this.onRejected=z,this.callRejected=this.otherCallRejected}eH.prototype.callFulfilled=function($){X8.resolve(this.promise,$)};eH.prototype.otherCallFulfilled=function($){og(this.promise,this.onFulfilled,$)};eH.prototype.callRejected=function($){X8.reject(this.promise,$)};eH.prototype.otherCallRejected=function($){og(this.promise,this.onRejected,$)};function og($,Y,z){B80(function(){var U;try{U=Y(z)}catch(Q){return X8.reject($,Q)}if(U===$)X8.reject($,TypeError("Cannot resolve promise with itself"));else X8.resolve($,U)})}X8.resolve=function($,Y){var z=E80(fd0,Y);if(z.status==="error")return X8.reject($,z.value);var U=z.value;if(U)T80($,U);else{$.state=lg,$.outcome=Y;var Q=-1,J=$.queue.length;while(++Q{var rg=null;if(typeof Promise<"u")rg=Promise;else rg=R80();_80.exports={Promise:rg}});var sg=E((v80)=>{(function($,Y){if($.setImmediate)return;var z=1,U={},Q=!1,J=$.document,I;function K(N){if(typeof N!=="function")N=Function(""+N);var M=Array(arguments.length-1);for(var D=0;D"u"?typeof global>"u"?v80:global:self)});var c4=E((dd0)=>{var b7=I3(),cd0=dg(),GJ=aH(),ag=KJ();sg();function pd0($){var Y=null;if(b7.uint8array)Y=new Uint8Array($.length);else Y=Array($.length);return zM($,Y)}dd0.newBlob=function($,Y){dd0.checkSupport("blob");try{return new Blob([$],{type:Y})}catch(Q){try{var z=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,U=new z;return U.append($),U.getBlob(Y)}catch(J){throw Error("Bug : can't construct the Blob.")}}};function $W($){return $}function zM($,Y){for(var z=0;z<$.length;++z)Y[z]=$.charCodeAt(z)&255;return Y}var YM={stringifyByChunk:function($,Y,z){var U=[],Q=0,J=$.length;if(J<=z)return String.fromCharCode.apply(null,$);while(Q1)try{return YM.stringifyByChunk($,z,Y)}catch(Q){Y=Math.floor(Y/2)}return YM.stringifyByChar($)}dd0.applyFromCharCode=YW;function UM($,Y){for(var z=0;z<$.length;z++)Y[z]=$[z];return Y}var i7={};i7.string={string:$W,array:function($){return zM($,Array($.length))},arraybuffer:function($){return i7.string.uint8array($).buffer},uint8array:function($){return zM($,new Uint8Array($.length))},nodebuffer:function($){return zM($,GJ.allocBuffer($.length))}};i7.array={string:YW,array:$W,arraybuffer:function($){return new Uint8Array($).buffer},uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return GJ.newBufferFrom($)}};i7.arraybuffer={string:function($){return YW(new Uint8Array($))},array:function($){return UM(new Uint8Array($),Array($.byteLength))},arraybuffer:$W,uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return GJ.newBufferFrom(new Uint8Array($))}};i7.uint8array={string:YW,array:function($){return UM($,Array($.length))},arraybuffer:function($){return $.buffer},uint8array:$W,nodebuffer:function($){return GJ.newBufferFrom($)}};i7.nodebuffer={string:YW,array:function($){return UM($,Array($.length))},arraybuffer:function($){return i7.nodebuffer.uint8array($).buffer},uint8array:function($){return UM($,new Uint8Array($.length))},nodebuffer:$W};dd0.transformTo=function($,Y){if(!Y)Y="";if(!$)return Y;dd0.checkSupport($);var z=dd0.getTypeOf(Y),U=i7[z][$](Y);return U};dd0.resolve=function($){var Y=$.split("/"),z=[];for(var U=0;U"u")$[z]=arguments[Y][z];return $};dd0.prepareContent=function($,Y,z,U,Q){var J=ag.Promise.resolve(Y).then(function(I){var K=b7.blob&&(I instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(I))!==-1);if(K&&typeof FileReader<"u")return new ag.Promise(function(G,H){var W=new FileReader;W.onload=function(X){G(X.target.result)},W.onerror=function(X){H(X.target.error)},W.readAsArrayBuffer(I)});else return I});return J.then(function(I){var K=dd0.getTypeOf(I);if(!K)return ag.Promise.reject(Error("Can't read the data of '"+$+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(K==="arraybuffer")I=dd0.transformTo("uint8array",I);else if(K==="string"){if(Q)I=cd0.decode(I);else if(z){if(U!==!0)I=pd0(I)}}return I})}});var K$=E((Pd1,y80)=>{function g80($){this.name=$||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}g80.prototype={push:function($){this.emit("data",$)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch($){this.emit("error",$)}return!0},error:function($){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=$;else{if(this.isFinished=!0,this.emit("error",$),this.previous)this.previous.error($);this.cleanUp()}return!0},on:function($,Y){return this._listeners[$].push(Y),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function($,Y){if(this._listeners[$])for(var z=0;z "+$;else return $}};y80.exports=g80});var WJ=E((Im0)=>{var HJ=c4(),aY=I3(),zm0=aH(),QM=K$(),zW=Array(256);for(Y9=0;Y9<256;Y9++)zW[Y9]=Y9>=252?6:Y9>=248?5:Y9>=240?4:Y9>=224?3:Y9>=192?2:1;var Y9;zW[254]=zW[254]=1;var Um0=function($){var Y,z,U,Q,J,I=$.length,K=0;for(Q=0;Q>>6,Y[J++]=128|z&63;else if(z<65536)Y[J++]=224|z>>>12,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63;else Y[J++]=240|z>>>18,Y[J++]=128|z>>>12&63,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63}return Y},Qm0=function($,Y){var z;if(Y=Y||$.length,Y>$.length)Y=$.length;z=Y-1;while(z>=0&&($[z]&192)===128)z--;if(z<0)return Y;if(z===0)return Y;return z+zW[$[z]]>Y?z:Y},Jm0=function($){var Y,z,U,Q,J=$.length,I=Array(J*2);for(z=0,Y=0;Y4){I[z++]=65533,Y+=Q-1;continue}U&=Q===2?31:Q===3?15:7;while(Q>1&&Y1){I[z++]=65533;continue}if(U<65536)I[z++]=U;else U-=65536,I[z++]=55296|U>>10&1023,I[z++]=56320|U&1023}if(I.length!==z)if(I.subarray)I=I.subarray(0,z);else I.length=z;return HJ.applyFromCharCode(I)};Im0.utf8encode=function(Y){if(aY.nodebuffer)return zm0.newBufferFrom(Y,"utf-8");return Um0(Y)};Im0.utf8decode=function(Y){if(aY.nodebuffer)return HJ.transformTo("nodebuffer",Y).toString("utf-8");return Y=HJ.transformTo(aY.uint8array?"uint8array":"array",Y),Jm0(Y)};function JM(){QM.call(this,"utf-8 decode"),this.leftOver=null}HJ.inherits(JM,QM);JM.prototype.processChunk=function($){var Y=HJ.transformTo(aY.uint8array?"uint8array":"array",$.data);if(this.leftOver&&this.leftOver.length){if(aY.uint8array){var z=Y;Y=new Uint8Array(z.length+this.leftOver.length),Y.set(this.leftOver,0),Y.set(z,this.leftOver.length)}else Y=this.leftOver.concat(Y);this.leftOver=null}var U=Qm0(Y),Q=Y;if(U!==Y.length)if(aY.uint8array)Q=Y.subarray(0,U),this.leftOver=Y.subarray(U,Y.length);else Q=Y.slice(0,U),this.leftOver=Y.slice(U,Y.length);this.push({data:Im0.utf8decode(Q),meta:$.meta})};JM.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:Im0.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};Im0.Utf8DecodeWorker=JM;function eg(){QM.call(this,"utf-8 encode")}HJ.inherits(eg,QM);eg.prototype.processChunk=function($){this.push({data:Im0.utf8encode($.data),meta:$.meta})};Im0.Utf8EncodeWorker=eg});var b80=E((Td1,u80)=>{var x80=K$(),f80=c4();function Yy($){x80.call(this,"ConvertWorker to "+$),this.destType=$}f80.inherits(Yy,x80);Yy.prototype.processChunk=function($){this.push({data:f80.transformTo(this.destType,$.data),meta:$.meta})};u80.exports=Yy});var c80=E((Ed1,n80)=>{var i80=ng().Readable,Hm0=c4();Hm0.inherits(zy,i80);function zy($,Y,z){i80.call(this,Y),this._helper=$;var U=this;$.on("data",function(Q,J){if(!U.push(Q))U._helper.pause();if(z)z(J)}).on("error",function(Q){U.emit("error",Q)}).on("end",function(){U.push(null)})}zy.prototype._read=function(){this._helper.resume()};n80.exports=zy});var Uy=E((Cd1,m80)=>{var tY=c4(),Wm0=b80(),Xm0=K$(),Zm0=dg(),qm0=I3(),Vm0=KJ(),p80=null;if(qm0.nodestream)try{p80=c80()}catch($){}function Lm0($,Y,z){switch($){case"blob":return tY.newBlob(tY.transformTo("arraybuffer",Y),z);case"base64":return Zm0.encode(Y);default:return tY.transformTo($,Y)}}function Fm0($,Y){var z,U=0,Q=null,J=0;for(z=0;z{wm0.base64=!1;wm0.binary=!1;wm0.dir=!1;wm0.createFolders=!0;wm0.date=null;wm0.compression=null;wm0.compressionOptions=null;wm0.comment=null;wm0.unixPermissions=null;wm0.dosPermissions=null});var Jy=E((_d1,l80)=>{var IM=c4(),KM=K$(),Rm0=16384;function XJ($){KM.call(this,"DataWorker");var Y=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,$.then(function(z){if(Y.dataIsReady=!0,Y.data=z,Y.max=z&&z.length||0,Y.type=IM.getTypeOf(z),!Y.isPaused)Y._tickAndRepeat()},function(z){Y.error(z)})}IM.inherits(XJ,KM);XJ.prototype.cleanUp=function(){KM.prototype.cleanUp.call(this),this.data=null};XJ.prototype.resume=function(){if(!KM.prototype.resume.call(this))return!1;if(!this._tickScheduled&&this.dataIsReady)this._tickScheduled=!0,IM.delay(this._tickAndRepeat,[],this);return!0};XJ.prototype._tickAndRepeat=function(){if(this._tickScheduled=!1,this.isPaused||this.isFinished)return;if(this._tick(),!this.isFinished)IM.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0};XJ.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var $=Rm0,Y=null,z=Math.min(this.max,this.index+$);if(this.index>=this.max)return this.end();else{switch(this.type){case"string":Y=this.data.substring(this.index,z);break;case"uint8array":Y=this.data.subarray(this.index,z);break;case"array":case"nodebuffer":Y=this.data.slice(this.index,z);break}return this.index=z,this.push({data:Y,meta:{percent:this.max?this.index/this.max*100:0}})}};l80.exports=XJ});var GM=E((vd1,r80)=>{var _m0=c4();function vm0(){var $,Y=[];for(var z=0;z<256;z++){$=z;for(var U=0;U<8;U++)$=$&1?3988292384^$>>>1:$>>>1;Y[z]=$}return Y}var o80=vm0();function hm0($,Y,z,U){var Q=o80,J=U+z;$=$^-1;for(var I=U;I>>8^Q[($^Y[I])&255];return $^-1}function Sm0($,Y,z,U){var Q=o80,J=U+z;$=$^-1;for(var I=U;I>>8^Q[($^Y.charCodeAt(I))&255];return $^-1}r80.exports=function(Y,z){if(typeof Y>"u"||!Y.length)return 0;var U=_m0.getTypeOf(Y)!=="string";if(U)return hm0(z|0,Y,Y.length,0);else return Sm0(z|0,Y,Y.length,0)}});var Ky=E((hd1,a80)=>{var s80=K$(),gm0=GM(),ym0=c4();function Iy(){s80.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}ym0.inherits(Iy,s80);Iy.prototype.processChunk=function($){this.streamInfo.crc32=gm0($.data,this.streamInfo.crc32||0),this.push($)};a80.exports=Iy});var e80=E((Sd1,t80)=>{var km0=c4(),Gy=K$();function Hy($){Gy.call(this,"DataLengthProbe for "+$),this.propName=$,this.withStreamInfo($,0)}km0.inherits(Hy,Gy);Hy.prototype.processChunk=function($){if($){var Y=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=Y+$.data.length}Gy.prototype.processChunk.call(this,$)};t80.exports=Hy});var HM=E((gd1,z$0)=>{var $$0=KJ(),Y$0=Jy(),xm0=Ky(),Wy=e80();function Xy($,Y,z,U,Q){this.compressedSize=$,this.uncompressedSize=Y,this.crc32=z,this.compression=U,this.compressedContent=Q}Xy.prototype={getContentWorker:function(){var $=new Y$0($$0.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Wy("data_length")),Y=this;return $.on("end",function(){if(this.streamInfo.data_length!==Y.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),$},getCompressedWorker:function(){return new Y$0($$0.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};Xy.createWorkerFrom=function($,Y,z){return $.pipe(new xm0).pipe(new Wy("uncompressedSize")).pipe(Y.compressWorker(z)).pipe(new Wy("compressedSize")).withStreamInfo("compression",Y)};z$0.exports=Xy});var I$0=E((yd1,J$0)=>{var fm0=Uy(),um0=Jy(),Zy=WJ(),qy=HM(),U$0=K$(),Vy=function($,Y,z){this.name=$,this.dir=z.dir,this.date=z.date,this.comment=z.comment,this.unixPermissions=z.unixPermissions,this.dosPermissions=z.dosPermissions,this._data=Y,this._dataBinary=z.binary,this.options={compression:z.compression,compressionOptions:z.compressionOptions}};Vy.prototype={internalStream:function($){var Y=null,z="string";try{if(!$)throw Error("No output type specified.");z=$.toLowerCase();var U=z==="string"||z==="text";if(z==="binarystring"||z==="text")z="string";Y=this._decompressWorker();var Q=!this._dataBinary;if(Q&&!U)Y=Y.pipe(new Zy.Utf8EncodeWorker);if(!Q&&U)Y=Y.pipe(new Zy.Utf8DecodeWorker)}catch(J){Y=new U$0("error"),Y.error(J)}return new fm0(Y,z,"")},async:function($,Y){return this.internalStream($).accumulate(Y)},nodeStream:function($,Y){return this.internalStream($||"nodebuffer").toNodejsStream(Y)},_compressWorker:function($,Y){if(this._data instanceof qy&&this._data.compression.magic===$.magic)return this._data.getCompressedWorker();else{var z=this._decompressWorker();if(!this._dataBinary)z=z.pipe(new Zy.Utf8EncodeWorker);return qy.createWorkerFrom(z,$,Y)}},_decompressWorker:function(){if(this._data instanceof qy)return this._data.getContentWorker();else if(this._data instanceof U$0)return this._data;else return new um0(this._data)}};var Q$0=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],bm0=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(UW=0;UW{var pm0=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function dm0($,Y){return Object.prototype.hasOwnProperty.call($,Y)}Ly.assign=function($){var Y=Array.prototype.slice.call(arguments,1);while(Y.length){var z=Y.shift();if(!z)continue;if(typeof z!=="object")throw TypeError(z+"must be non-object");for(var U in z)if(dm0(z,U))$[U]=z[U]}return $};Ly.shrinkBuf=function($,Y){if($.length===Y)return $;if($.subarray)return $.subarray(0,Y);return $.length=Y,$};var mm0={arraySet:function($,Y,z,U,Q){if(Y.subarray&&$.subarray){$.set(Y.subarray(z,z+U),Q);return}for(var J=0;J{var rm0=K3(),sm0=4,G$0=0,H$0=1,am0=2;function qJ($){var Y=$.length;while(--Y>=0)$[Y]=0}var tm0=0,L$0=1,em0=2,$l0=3,Yl0=258,By=29,HW=256,JW=HW+1+By,ZJ=30,Py=19,F$0=2*JW+1,eY=15,Oy=16,zl0=7,jy=256,O$0=16,w$0=17,M$0=18,Dy=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],WM=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ul0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N$0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ql0=512,G3=Array((JW+2)*2);qJ(G3);var QW=Array(ZJ*2);qJ(QW);var IW=Array(Ql0);qJ(IW);var KW=Array(Yl0-$l0+1);qJ(KW);var Ty=Array(By);qJ(Ty);var XM=Array(ZJ);qJ(XM);function wy($,Y,z,U,Q){this.static_tree=$,this.extra_bits=Y,this.extra_base=z,this.elems=U,this.max_length=Q,this.has_stree=$&&$.length}var D$0,A$0,B$0;function My($,Y){this.dyn_tree=$,this.max_code=0,this.stat_desc=Y}function P$0($){return $<256?IW[$]:IW[256+($>>>7)]}function GW($,Y){$.pending_buf[$.pending++]=Y&255,$.pending_buf[$.pending++]=Y>>>8&255}function p8($,Y,z){if($.bi_valid>Oy-z)$.bi_buf|=Y<<$.bi_valid&65535,GW($,$.bi_buf),$.bi_buf=Y>>Oy-$.bi_valid,$.bi_valid+=z-Oy;else $.bi_buf|=Y<<$.bi_valid&65535,$.bi_valid+=z}function z9($,Y,z){p8($,z[Y*2],z[Y*2+1])}function j$0($,Y){var z=0;do z|=$&1,$>>>=1,z<<=1;while(--Y>0);return z>>>1}function Jl0($){if($.bi_valid===16)GW($,$.bi_buf),$.bi_buf=0,$.bi_valid=0;else if($.bi_valid>=8)$.pending_buf[$.pending++]=$.bi_buf&255,$.bi_buf>>=8,$.bi_valid-=8}function Il0($,Y){var{dyn_tree:z,max_code:U}=Y,Q=Y.stat_desc.static_tree,J=Y.stat_desc.has_stree,I=Y.stat_desc.extra_bits,K=Y.stat_desc.extra_base,G=Y.stat_desc.max_length,H,W,X,Z,q,V,F=0;for(Z=0;Z<=eY;Z++)$.bl_count[Z]=0;z[$.heap[$.heap_max]*2+1]=0;for(H=$.heap_max+1;HG)Z=G,F++;if(z[W*2+1]=Z,W>U)continue;if($.bl_count[Z]++,q=0,W>=K)q=I[W-K];if(V=z[W*2],$.opt_len+=V*(Z+q),J)$.static_len+=V*(Q[W*2+1]+q)}if(F===0)return;do{Z=G-1;while($.bl_count[Z]===0)Z--;$.bl_count[Z]--,$.bl_count[Z+1]+=2,$.bl_count[G]--,F-=2}while(F>0);for(Z=G;Z!==0;Z--){W=$.bl_count[Z];while(W!==0){if(X=$.heap[--H],X>U)continue;if(z[X*2+1]!==Z)$.opt_len+=(Z-z[X*2+1])*z[X*2],z[X*2+1]=Z;W--}}}function T$0($,Y,z){var U=Array(eY+1),Q=0,J,I;for(J=1;J<=eY;J++)U[J]=Q=Q+z[J-1]<<1;for(I=0;I<=Y;I++){var K=$[I*2+1];if(K===0)continue;$[I*2]=j$0(U[K]++,K)}}function Kl0(){var $,Y,z,U,Q,J=Array(eY+1);z=0;for(U=0;U>=7;for(;U8)GW($,$.bi_buf);else if($.bi_valid>0)$.pending_buf[$.pending++]=$.bi_buf;$.bi_buf=0,$.bi_valid=0}function Gl0($,Y,z,U){if(C$0($),U)GW($,z),GW($,~z);rm0.arraySet($.pending_buf,$.window,Y,z,$.pending),$.pending+=z}function W$0($,Y,z,U){var Q=Y*2,J=z*2;return $[Q]<$[J]||$[Q]===$[J]&&U[Y]<=U[z]}function Ny($,Y,z){var U=$.heap[z],Q=z<<1;while(Q<=$.heap_len){if(Q<$.heap_len&&W$0(Y,$.heap[Q+1],$.heap[Q],$.depth))Q++;if(W$0(Y,U,$.heap[Q],$.depth))break;$.heap[z]=$.heap[Q],z=Q,Q<<=1}$.heap[z]=U}function X$0($,Y,z){var U,Q,J=0,I,K;if($.last_lit!==0)do if(U=$.pending_buf[$.d_buf+J*2]<<8|$.pending_buf[$.d_buf+J*2+1],Q=$.pending_buf[$.l_buf+J],J++,U===0)z9($,Q,Y);else{if(I=KW[Q],z9($,I+HW+1,Y),K=Dy[I],K!==0)Q-=Ty[I],p8($,Q,K);if(U--,I=P$0(U),z9($,I,z),K=WM[I],K!==0)U-=XM[I],p8($,U,K)}while(J<$.last_lit);z9($,jy,Y)}function Ay($,Y){var z=Y.dyn_tree,U=Y.stat_desc.static_tree,Q=Y.stat_desc.has_stree,J=Y.stat_desc.elems,I,K,G=-1,H;$.heap_len=0,$.heap_max=F$0;for(I=0;I>1;I>=1;I--)Ny($,z,I);H=J;do I=$.heap[1],$.heap[1]=$.heap[$.heap_len--],Ny($,z,1),K=$.heap[1],$.heap[--$.heap_max]=I,$.heap[--$.heap_max]=K,z[H*2]=z[I*2]+z[K*2],$.depth[H]=($.depth[I]>=$.depth[K]?$.depth[I]:$.depth[K])+1,z[I*2+1]=z[K*2+1]=H,$.heap[1]=H++,Ny($,z,1);while($.heap_len>=2);$.heap[--$.heap_max]=$.heap[1],Il0($,Y),T$0(z,G,$.bl_count)}function Z$0($,Y,z){var U,Q=-1,J,I=Y[1],K=0,G=7,H=4;if(I===0)G=138,H=3;Y[(z+1)*2+1]=65535;for(U=0;U<=z;U++){if(J=I,I=Y[(U+1)*2+1],++K=3;Y--)if($.bl_tree[N$0[Y]*2+1]!==0)break;return $.opt_len+=3*(Y+1)+5+5+4,Y}function Wl0($,Y,z,U){var Q;p8($,Y-257,5),p8($,z-1,5),p8($,U-4,4);for(Q=0;Q>>=1)if(Y&1&&$.dyn_ltree[z*2]!==0)return G$0;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return H$0;for(z=32;z0){if($.strm.data_type===am0)$.strm.data_type=Xl0($);if(Ay($,$.l_desc),Ay($,$.d_desc),I=Hl0($),Q=$.opt_len+3+7>>>3,J=$.static_len+3+7>>>3,J<=Q)Q=J}else Q=J=z+5;if(z+4<=Q&&Y!==-1)R$0($,Y,z,U);else if($.strategy===sm0||J===Q)p8($,(L$0<<1)+(U?1:0),3),X$0($,G3,QW);else p8($,(em0<<1)+(U?1:0),3),Wl0($,$.l_desc.max_code+1,$.d_desc.max_code+1,I+1),X$0($,$.dyn_ltree,$.dyn_dtree);if(E$0($),U)C$0($)}function Ll0($,Y,z){if($.pending_buf[$.d_buf+$.last_lit*2]=Y>>>8&255,$.pending_buf[$.d_buf+$.last_lit*2+1]=Y&255,$.pending_buf[$.l_buf+$.last_lit]=z&255,$.last_lit++,Y===0)$.dyn_ltree[z*2]++;else $.matches++,Y--,$.dyn_ltree[(KW[z]+HW+1)*2]++,$.dyn_dtree[P$0(Y)*2]++;return $.last_lit===$.lit_bufsize-1}Fl0._tr_init=Zl0;Fl0._tr_stored_block=R$0;Fl0._tr_flush_block=Vl0;Fl0._tr_tally=Ll0;Fl0._tr_align=ql0});var Ey=E((fd1,v$0)=>{function Al0($,Y,z,U){var Q=$&65535|0,J=$>>>16&65535|0,I=0;while(z!==0){I=z>2000?2000:z,z-=I;do Q=Q+Y[U++]|0,J=J+Q|0;while(--I);Q%=65521,J%=65521}return Q|J<<16|0}v$0.exports=Al0});var Cy=E((ud1,h$0)=>{function Bl0(){var $,Y=[];for(var z=0;z<256;z++){$=z;for(var U=0;U<8;U++)$=$&1?3988292384^$>>>1:$>>>1;Y[z]=$}return Y}var Pl0=Bl0();function jl0($,Y,z,U){var Q=Pl0,J=U+z;$^=-1;for(var I=U;I>>8^Q[($^Y[I])&255];return $^-1}h$0.exports=jl0});var ZM=E((bd1,S$0)=>{S$0.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var n$0=E((Qo0)=>{var E8=K3(),E$=_$0(),x$0=Ey(),n7=Cy(),Tl0=ZM(),Uz=0,El0=1,Cl0=3,l7=4,g$0=5,Q9=0,y$0=1,C$=-2,Rl0=-3,Ry=-5,_l0=-1,vl0=1,qM=2,hl0=3,Sl0=4,gl0=0,yl0=2,OM=8,kl0=9,xl0=15,fl0=8,ul0=29,bl0=256,vy=bl0+1+ul0,il0=30,nl0=19,cl0=2*vy+1,pl0=15,f1=3,d7=258,X5=d7+f1+1,dl0=32,wM=42,hy=69,VM=73,LM=91,FM=103,$z=113,XW=666,P6=1,ZW=2,Yz=3,FJ=4,ml0=3;function m7($,Y){return $.msg=Tl0[Y],Y}function k$0($){return($<<1)-($>4?9:0)}function p7($){var Y=$.length;while(--Y>=0)$[Y]=0}function c7($){var Y=$.state,z=Y.pending;if(z>$.avail_out)z=$.avail_out;if(z===0)return;if(E8.arraySet($.output,Y.pending_buf,Y.pending_out,z,$.next_out),$.next_out+=z,Y.pending_out+=z,$.total_out+=z,$.avail_out-=z,Y.pending-=z,Y.pending===0)Y.pending_out=0}function l6($,Y){E$._tr_flush_block($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,Y),$.block_start=$.strstart,c7($.strm)}function r1($,Y){$.pending_buf[$.pending++]=Y}function WW($,Y){$.pending_buf[$.pending++]=Y>>>8&255,$.pending_buf[$.pending++]=Y&255}function ll0($,Y,z,U){var Q=$.avail_in;if(Q>U)Q=U;if(Q===0)return 0;if($.avail_in-=Q,E8.arraySet(Y,$.input,$.next_in,Q,z),$.state.wrap===1)$.adler=x$0($.adler,Y,Q,z);else if($.state.wrap===2)$.adler=n7($.adler,Y,Q,z);return $.next_in+=Q,$.total_in+=Q,Q}function f$0($,Y){var{max_chain_length:z,strstart:U}=$,Q,J,I=$.prev_length,K=$.nice_match,G=$.strstart>$.w_size-X5?$.strstart-($.w_size-X5):0,H=$.window,W=$.w_mask,X=$.prev,Z=$.strstart+d7,q=H[U+I-1],V=H[U+I];if($.prev_length>=$.good_match)z>>=2;if(K>$.lookahead)K=$.lookahead;do{if(Q=Y,H[Q+I]!==V||H[Q+I-1]!==q||H[Q]!==H[U]||H[++Q]!==H[U+1])continue;U+=2,Q++;do;while(H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&UI){if($.match_start=Y,I=J,J>=K)break;q=H[U+I-1],V=H[U+I]}}while((Y=X[Y&W])>G&&--z!==0);if(I<=$.lookahead)return I;return $.lookahead}function zz($){var Y=$.w_size,z,U,Q,J,I;do{if(J=$.window_size-$.lookahead-$.strstart,$.strstart>=Y+(Y-X5)){E8.arraySet($.window,$.window,Y,Y,0),$.match_start-=Y,$.strstart-=Y,$.block_start-=Y,U=$.hash_size,z=U;do Q=$.head[--z],$.head[z]=Q>=Y?Q-Y:0;while(--U);U=Y,z=U;do Q=$.prev[--z],$.prev[z]=Q>=Y?Q-Y:0;while(--U);J+=Y}if($.strm.avail_in===0)break;if(U=ll0($.strm,$.window,$.strstart+$.lookahead,J),$.lookahead+=U,$.lookahead+$.insert>=f1){I=$.strstart-$.insert,$.ins_h=$.window[I],$.ins_h=($.ins_h<<$.hash_shift^$.window[I+1])&$.hash_mask;while($.insert)if($.ins_h=($.ins_h<<$.hash_shift^$.window[I+f1-1])&$.hash_mask,$.prev[I&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=I,I++,$.insert--,$.lookahead+$.insert$.pending_buf_size-5)z=$.pending_buf_size-5;for(;;){if($.lookahead<=1){if(zz($),$.lookahead===0&&Y===Uz)return P6;if($.lookahead===0)break}$.strstart+=$.lookahead,$.lookahead=0;var U=$.block_start+z;if($.strstart===0||$.strstart>=U){if($.lookahead=$.strstart-U,$.strstart=U,l6($,!1),$.strm.avail_out===0)return P6}if($.strstart-$.block_start>=$.w_size-X5){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=0,Y===l7){if(l6($,!0),$.strm.avail_out===0)return Yz;return FJ}if($.strstart>$.block_start){if(l6($,!1),$.strm.avail_out===0)return P6}return P6}function _y($,Y){var z,U;for(;;){if($.lookahead=f1)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if(z!==0&&$.strstart-z<=$.w_size-X5)$.match_length=f$0($,z);if($.match_length>=f1)if(U=E$._tr_tally($,$.strstart-$.match_start,$.match_length-f1),$.lookahead-=$.match_length,$.match_length<=$.max_lazy_match&&$.lookahead>=f1){$.match_length--;do $.strstart++,$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.match_length!==0);$.strstart++}else $.strstart+=$.match_length,$.match_length=0,$.ins_h=$.window[$.strstart],$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+1])&$.hash_mask;else U=E$._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(U){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=$.strstart=f1)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if($.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=f1-1,z!==0&&$.prev_length<$.max_lazy_match&&$.strstart-z<=$.w_size-X5){if($.match_length=f$0($,z),$.match_length<=5&&($.strategy===vl0||$.match_length===f1&&$.strstart-$.match_start>4096))$.match_length=f1-1}if($.prev_length>=f1&&$.match_length<=$.prev_length){Q=$.strstart+$.lookahead-f1,U=E$._tr_tally($,$.strstart-1-$.prev_match,$.prev_length-f1),$.lookahead-=$.prev_length-1,$.prev_length-=2;do if(++$.strstart<=Q)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.prev_length!==0);if($.match_available=0,$.match_length=f1-1,$.strstart++,U){if(l6($,!1),$.strm.avail_out===0)return P6}}else if($.match_available){if(U=E$._tr_tally($,0,$.window[$.strstart-1]),U)l6($,!1);if($.strstart++,$.lookahead--,$.strm.avail_out===0)return P6}else $.match_available=1,$.strstart++,$.lookahead--}if($.match_available)U=E$._tr_tally($,0,$.window[$.strstart-1]),$.match_available=0;if($.insert=$.strstart=f1&&$.strstart>0){if(Q=$.strstart-1,U=I[Q],U===I[++Q]&&U===I[++Q]&&U===I[++Q]){J=$.strstart+d7;do;while(U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&Q$.lookahead)$.match_length=$.lookahead}}if($.match_length>=f1)z=E$._tr_tally($,1,$.match_length-f1),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0;else z=E$._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(z){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=0,Y===l7){if(l6($,!0),$.strm.avail_out===0)return Yz;return FJ}if($.last_lit){if(l6($,!1),$.strm.avail_out===0)return P6}return ZW}function sl0($,Y){var z;for(;;){if($.lookahead===0){if(zz($),$.lookahead===0){if(Y===Uz)return P6;break}}if($.match_length=0,z=E$._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,z){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=0,Y===l7){if(l6($,!0),$.strm.avail_out===0)return Yz;return FJ}if($.last_lit){if(l6($,!1),$.strm.avail_out===0)return P6}return ZW}function U9($,Y,z,U,Q){this.good_length=$,this.max_lazy=Y,this.nice_length=z,this.max_chain=U,this.func=Q}var LJ;LJ=[new U9(0,0,0,0,ol0),new U9(4,4,8,4,_y),new U9(4,5,16,8,_y),new U9(4,6,32,32,_y),new U9(4,4,16,16,VJ),new U9(8,16,32,32,VJ),new U9(8,16,128,128,VJ),new U9(8,32,128,256,VJ),new U9(32,128,258,1024,VJ),new U9(32,258,258,4096,VJ)];function al0($){$.window_size=2*$.w_size,p7($.head),$.max_lazy_match=LJ[$.level].max_lazy,$.good_match=LJ[$.level].good_length,$.nice_match=LJ[$.level].nice_length,$.max_chain_length=LJ[$.level].max_chain,$.strstart=0,$.block_start=0,$.lookahead=0,$.insert=0,$.match_length=$.prev_length=f1-1,$.match_available=0,$.ins_h=0}function tl0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=OM,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E8.Buf16(cl0*2),this.dyn_dtree=new E8.Buf16((2*il0+1)*2),this.bl_tree=new E8.Buf16((2*nl0+1)*2),p7(this.dyn_ltree),p7(this.dyn_dtree),p7(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E8.Buf16(pl0+1),this.heap=new E8.Buf16(2*vy+1),p7(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E8.Buf16(2*vy+1),p7(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u$0($){var Y;if(!$||!$.state)return m7($,C$);if($.total_in=$.total_out=0,$.data_type=yl0,Y=$.state,Y.pending=0,Y.pending_out=0,Y.wrap<0)Y.wrap=-Y.wrap;return Y.status=Y.wrap?wM:$z,$.adler=Y.wrap===2?0:1,Y.last_flush=Uz,E$._tr_init(Y),Q9}function b$0($){var Y=u$0($);if(Y===Q9)al0($.state);return Y}function el0($,Y){if(!$||!$.state)return C$;if($.state.wrap!==2)return C$;return $.state.gzhead=Y,Q9}function i$0($,Y,z,U,Q,J){if(!$)return C$;var I=1;if(Y===_l0)Y=6;if(U<0)I=0,U=-U;else if(U>15)I=2,U-=16;if(Q<1||Q>kl0||z!==OM||U<8||U>15||Y<0||Y>9||J<0||J>Sl0)return m7($,C$);if(U===8)U=9;var K=new tl0;return $.state=K,K.strm=$,K.wrap=I,K.gzhead=null,K.w_bits=U,K.w_size=1<g$0||Y<0)return $?m7($,C$):C$;if(U=$.state,!$.output||!$.input&&$.avail_in!==0||U.status===XW&&Y!==l7)return m7($,$.avail_out===0?Ry:C$);if(U.strm=$,z=U.last_flush,U.last_flush=Y,U.status===wM)if(U.wrap===2)if($.adler=0,r1(U,31),r1(U,139),r1(U,8),!U.gzhead)r1(U,0),r1(U,0),r1(U,0),r1(U,0),r1(U,0),r1(U,U.level===9?2:U.strategy>=qM||U.level<2?4:0),r1(U,ml0),U.status=$z;else{if(r1(U,(U.gzhead.text?1:0)+(U.gzhead.hcrc?2:0)+(!U.gzhead.extra?0:4)+(!U.gzhead.name?0:8)+(!U.gzhead.comment?0:16)),r1(U,U.gzhead.time&255),r1(U,U.gzhead.time>>8&255),r1(U,U.gzhead.time>>16&255),r1(U,U.gzhead.time>>24&255),r1(U,U.level===9?2:U.strategy>=qM||U.level<2?4:0),r1(U,U.gzhead.os&255),U.gzhead.extra&&U.gzhead.extra.length)r1(U,U.gzhead.extra.length&255),r1(U,U.gzhead.extra.length>>8&255);if(U.gzhead.hcrc)$.adler=n7($.adler,U.pending_buf,U.pending,0);U.gzindex=0,U.status=hy}else{var I=OM+(U.w_bits-8<<4)<<8,K=-1;if(U.strategy>=qM||U.level<2)K=0;else if(U.level<6)K=1;else if(U.level===6)K=2;else K=3;if(I|=K<<6,U.strstart!==0)I|=dl0;if(I+=31-I%31,U.status=$z,WW(U,I),U.strstart!==0)WW(U,$.adler>>>16),WW(U,$.adler&65535);$.adler=1}if(U.status===hy)if(U.gzhead.extra){Q=U.pending;while(U.gzindex<(U.gzhead.extra.length&65535)){if(U.pending===U.pending_buf_size){if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(c7($),Q=U.pending,U.pending===U.pending_buf_size)break}r1(U,U.gzhead.extra[U.gzindex]&255),U.gzindex++}if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(U.gzindex===U.gzhead.extra.length)U.gzindex=0,U.status=VM}else U.status=VM;if(U.status===VM)if(U.gzhead.name){Q=U.pending;do{if(U.pending===U.pending_buf_size){if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(c7($),Q=U.pending,U.pending===U.pending_buf_size){J=1;break}}if(U.gzindexQ)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(J===0)U.gzindex=0,U.status=LM}else U.status=LM;if(U.status===LM)if(U.gzhead.comment){Q=U.pending;do{if(U.pending===U.pending_buf_size){if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(c7($),Q=U.pending,U.pending===U.pending_buf_size){J=1;break}}if(U.gzindexQ)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(J===0)U.status=FM}else U.status=FM;if(U.status===FM)if(U.gzhead.hcrc){if(U.pending+2>U.pending_buf_size)c7($);if(U.pending+2<=U.pending_buf_size)r1(U,$.adler&255),r1(U,$.adler>>8&255),$.adler=0,U.status=$z}else U.status=$z;if(U.pending!==0){if(c7($),$.avail_out===0)return U.last_flush=-1,Q9}else if($.avail_in===0&&k$0(Y)<=k$0(z)&&Y!==l7)return m7($,Ry);if(U.status===XW&&$.avail_in!==0)return m7($,Ry);if($.avail_in!==0||U.lookahead!==0||Y!==Uz&&U.status!==XW){var G=U.strategy===qM?sl0(U,Y):U.strategy===hl0?rl0(U,Y):LJ[U.level].func(U,Y);if(G===Yz||G===FJ)U.status=XW;if(G===P6||G===Yz){if($.avail_out===0)U.last_flush=-1;return Q9}if(G===ZW){if(Y===El0)E$._tr_align(U);else if(Y!==g$0){if(E$._tr_stored_block(U,0,0,!1),Y===Cl0){if(p7(U.head),U.lookahead===0)U.strstart=0,U.block_start=0,U.insert=0}}if(c7($),$.avail_out===0)return U.last_flush=-1,Q9}}if(Y!==l7)return Q9;if(U.wrap<=0)return y$0;if(U.wrap===2)r1(U,$.adler&255),r1(U,$.adler>>8&255),r1(U,$.adler>>16&255),r1(U,$.adler>>24&255),r1(U,$.total_in&255),r1(U,$.total_in>>8&255),r1(U,$.total_in>>16&255),r1(U,$.total_in>>24&255);else WW(U,$.adler>>>16),WW(U,$.adler&65535);if(c7($),U.wrap>0)U.wrap=-U.wrap;return U.pending!==0?Q9:y$0}function zo0($){var Y;if(!$||!$.state)return C$;if(Y=$.state.status,Y!==wM&&Y!==hy&&Y!==VM&&Y!==LM&&Y!==FM&&Y!==$z&&Y!==XW)return m7($,C$);return $.state=null,Y===$z?m7($,Rl0):Q9}function Uo0($,Y){var z=Y.length,U,Q,J,I,K,G,H,W;if(!$||!$.state)return C$;if(U=$.state,I=U.wrap,I===2||I===1&&U.status!==wM||U.lookahead)return C$;if(I===1)$.adler=x$0($.adler,Y,z,0);if(U.wrap=0,z>=U.w_size){if(I===0)p7(U.head),U.strstart=0,U.block_start=0,U.insert=0;W=new E8.Buf8(U.w_size),E8.arraySet(W,Y,z-U.w_size,U.w_size,0),Y=W,z=U.w_size}K=$.avail_in,G=$.next_in,H=$.input,$.avail_in=z,$.next_in=0,$.input=Y,zz(U);while(U.lookahead>=f1){Q=U.strstart,J=U.lookahead-(f1-1);do U.ins_h=(U.ins_h<{var MM=K3(),c$0=!0,p$0=!0;try{String.fromCharCode.apply(null,[0])}catch($){c$0=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch($){p$0=!1}var qW=new MM.Buf8(256);for(J9=0;J9<256;J9++)qW[J9]=J9>=252?6:J9>=248?5:J9>=240?4:J9>=224?3:J9>=192?2:1;var J9;qW[254]=qW[254]=1;Vo0.string2buf=function($){var Y,z,U,Q,J,I=$.length,K=0;for(Q=0;Q>>6,Y[J++]=128|z&63;else if(z<65536)Y[J++]=224|z>>>12,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63;else Y[J++]=240|z>>>18,Y[J++]=128|z>>>12&63,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63}return Y};function d$0($,Y){if(Y<65534){if($.subarray&&p$0||!$.subarray&&c$0)return String.fromCharCode.apply(null,MM.shrinkBuf($,Y))}var z="";for(var U=0;U4){K[U++]=65533,z+=J-1;continue}Q&=J===2?31:J===3?15:7;while(J>1&&z1){K[U++]=65533;continue}if(Q<65536)K[U++]=Q;else Q-=65536,K[U++]=55296|Q>>10&1023,K[U++]=56320|Q&1023}return d$0(K,U)};Vo0.utf8border=function($,Y){var z;if(Y=Y||$.length,Y>$.length)Y=$.length;z=Y-1;while(z>=0&&($[z]&192)===128)z--;if(z<0)return Y;if(z===0)return Y;return z+qW[$[z]]>Y?z:Y}});var gy=E((cd1,m$0)=>{function No0(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}m$0.exports=No0});var s$0=E((Co0)=>{var VW=n$0(),LW=K3(),ky=Sy(),xy=ZM(),Do0=gy(),r$0=Object.prototype.toString,Ao0=0,yy=4,OJ=0,l$0=1,o$0=2,Bo0=-1,Po0=0,jo0=8;function Qz($){if(!(this instanceof Qz))return new Qz($);this.options=LW.assign({level:Bo0,method:jo0,chunkSize:16384,windowBits:15,memLevel:8,strategy:Po0,to:""},$||{});var Y=this.options;if(Y.raw&&Y.windowBits>0)Y.windowBits=-Y.windowBits;else if(Y.gzip&&Y.windowBits>0&&Y.windowBits<16)Y.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Do0,this.strm.avail_out=0;var z=VW.deflateInit2(this.strm,Y.level,Y.method,Y.windowBits,Y.memLevel,Y.strategy);if(z!==OJ)throw Error(xy[z]);if(Y.header)VW.deflateSetHeader(this.strm,Y.header);if(Y.dictionary){var U;if(typeof Y.dictionary==="string")U=ky.string2buf(Y.dictionary);else if(r$0.call(Y.dictionary)==="[object ArrayBuffer]")U=new Uint8Array(Y.dictionary);else U=Y.dictionary;if(z=VW.deflateSetDictionary(this.strm,U),z!==OJ)throw Error(xy[z]);this._dict_set=!0}}Qz.prototype.push=function($,Y){var z=this.strm,U=this.options.chunkSize,Q,J;if(this.ended)return!1;if(J=Y===~~Y?Y:Y===!0?yy:Ao0,typeof $==="string")z.input=ky.string2buf($);else if(r$0.call($)==="[object ArrayBuffer]")z.input=new Uint8Array($);else z.input=$;z.next_in=0,z.avail_in=z.input.length;do{if(z.avail_out===0)z.output=new LW.Buf8(U),z.next_out=0,z.avail_out=U;if(Q=VW.deflate(z,J),Q!==l$0&&Q!==OJ)return this.onEnd(Q),this.ended=!0,!1;if(z.avail_out===0||z.avail_in===0&&(J===yy||J===o$0))if(this.options.to==="string")this.onData(ky.buf2binstring(LW.shrinkBuf(z.output,z.next_out)));else this.onData(LW.shrinkBuf(z.output,z.next_out))}while((z.avail_in>0||z.avail_out===0)&&Q!==l$0);if(J===yy)return Q=VW.deflateEnd(this.strm),this.onEnd(Q),this.ended=!0,Q===OJ;if(J===o$0)return this.onEnd(OJ),z.avail_out=0,!0;return!0};Qz.prototype.onData=function($){this.chunks.push($)};Qz.prototype.onEnd=function($){if($===OJ)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=LW.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function fy($,Y){var z=new Qz(Y);if(z.push($,!0),z.err)throw z.msg||xy[z.err];return z.result}function To0($,Y){return Y=Y||{},Y.raw=!0,fy($,Y)}function Eo0($,Y){return Y=Y||{},Y.gzip=!0,fy($,Y)}Co0.Deflate=Qz;Co0.deflate=fy;Co0.deflateRaw=To0;Co0.gzip=Eo0});var t$0=E((dd1,a$0)=>{var NM=30,So0=12;a$0.exports=function(Y,z){var U,Q,J,I,K,G,H,W,X,Z,q,V,F,w,O,N,M,D,P,j,A,T,C,b,k;U=Y.state,Q=Y.next_in,b=Y.input,J=Q+(Y.avail_in-5),I=Y.next_out,k=Y.output,K=I-(z-Y.avail_out),G=I+(Y.avail_out-257),H=U.dmax,W=U.wsize,X=U.whave,Z=U.wnext,q=U.window,V=U.hold,F=U.bits,w=U.lencode,O=U.distcode,N=(1<>>24,V>>>=P,F-=P,P=D>>>16&255,P===0)k[I++]=D&65535;else if(P&16){if(j=D&65535,P&=15,P){if(F>>=P,F-=P}if(F<15)V+=b[Q++]<>>24,V>>>=P,F-=P,P=D>>>16&255,P&16){if(A=D&65535,P&=15,FH){Y.msg="invalid distance too far back",U.mode=NM;break $}if(V>>>=P,F-=P,P=I-K,A>P){if(P=A-P,P>X){if(U.sane){Y.msg="invalid distance too far back",U.mode=NM;break $}}if(T=0,C=q,Z===0){if(T+=W-P,P2)k[I++]=C[T++],k[I++]=C[T++],k[I++]=C[T++],j-=3;if(j){if(k[I++]=C[T++],j>1)k[I++]=C[T++]}}else{T=I-A;do k[I++]=k[T++],k[I++]=k[T++],k[I++]=k[T++],j-=3;while(j>2);if(j){if(k[I++]=k[T++],j>1)k[I++]=k[T++]}}}else if((P&64)===0){D=O[(D&65535)+(V&(1<>3,Q-=j,F-=j<<3,V&=(1<{var e$0=K3(),wJ=15,$50=852,Y50=592,z50=0,uy=1,U50=2,go0=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],yo0=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ko0=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],xo0=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Q50.exports=function(Y,z,U,Q,J,I,K,G){var H=G.bits,W=0,X=0,Z=0,q=0,V=0,F=0,w=0,O=0,N=0,M=0,D,P,j,A,T,C=null,b=0,k,S=new e$0.Buf16(wJ+1),i=new e$0.Buf16(wJ+1),n=null,U0=0,x,d,t;for(W=0;W<=wJ;W++)S[W]=0;for(X=0;X=1;q--)if(S[q]!==0)break;if(V>q)V=q;if(q===0)return J[I++]=20971520,J[I++]=20971520,G.bits=1,0;for(Z=1;Z0&&(Y===z50||q!==1))return-1;i[1]=0;for(W=1;W$50||Y===U50&&N>Y50)return 1;for(;;){if(x=W-w,K[X]k)d=n[U0+K[X]],t=C[b+K[X]];else d=96,t=0;D=1<>w)+P]=x<<24|d<<16|t|0;while(P!==0);D=1<>=1;if(D!==0)M&=D-1,M+=D;else M=0;if(X++,--S[W]===0){if(W===q)break;W=z[U+K[X]]}if(W>V&&(M&A)!==j){if(w===0)w=V;T+=Z,F=W-w,O=1<$50||Y===U50&&N>Y50)return 1;j=M&A,J[j]=V<<24|F<<16|T-I|0}}if(M!==0)J[T+M]=W-w<<24|4194304|0;return G.bits=V,0}});var b50=E((zr0)=>{var G$=K3(),dy=Ey(),I9=Cy(),fo0=t$0(),FW=J50(),uo0=0,v50=1,h50=2,I50=4,bo0=5,DM=6,Jz=0,io0=1,no0=2,R$=-2,S50=-3,my=-4,co0=-5,K50=8,g50=1,G50=2,H50=3,W50=4,X50=5,Z50=6,q50=7,V50=8,L50=9,F50=10,PM=11,H3=12,by=13,O50=14,iy=15,w50=16,M50=17,N50=18,D50=19,AM=20,BM=21,A50=22,B50=23,P50=24,j50=25,T50=26,ny=27,E50=28,C50=29,y4=30,ly=31,po0=32,do0=852,mo0=592,lo0=15,oo0=lo0;function R50($){return($>>>24&255)+($>>>8&65280)+(($&65280)<<8)+(($&255)<<24)}function ro0(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new G$.Buf16(320),this.work=new G$.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y50($){var Y;if(!$||!$.state)return R$;if(Y=$.state,$.total_in=$.total_out=Y.total=0,$.msg="",Y.wrap)$.adler=Y.wrap&1;return Y.mode=g50,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new G$.Buf32(do0),Y.distcode=Y.distdyn=new G$.Buf32(mo0),Y.sane=1,Y.back=-1,Jz}function k50($){var Y;if(!$||!$.state)return R$;return Y=$.state,Y.wsize=0,Y.whave=0,Y.wnext=0,y50($)}function x50($,Y){var z,U;if(!$||!$.state)return R$;if(U=$.state,Y<0)z=0,Y=-Y;else if(z=(Y>>4)+1,Y<48)Y&=15;if(Y&&(Y<8||Y>15))return R$;if(U.window!==null&&U.wbits!==Y)U.window=null;return U.wrap=z,U.wbits=Y,k50($)}function f50($,Y){var z,U;if(!$)return R$;if(U=new ro0,$.state=U,U.window=null,z=x50($,Y),z!==Jz)$.state=null;return z}function so0($){return f50($,oo0)}var _50=!0,cy,py;function ao0($){if(_50){var Y;cy=new G$.Buf32(512),py=new G$.Buf32(32),Y=0;while(Y<144)$.lens[Y++]=8;while(Y<256)$.lens[Y++]=9;while(Y<280)$.lens[Y++]=7;while(Y<288)$.lens[Y++]=8;FW(v50,$.lens,0,288,cy,0,$.work,{bits:9}),Y=0;while(Y<32)$.lens[Y++]=5;FW(h50,$.lens,0,32,py,0,$.work,{bits:5}),_50=!1}$.lencode=cy,$.lenbits=9,$.distcode=py,$.distbits=5}function u50($,Y,z,U){var Q,J=$.state;if(J.window===null)J.wsize=1<=J.wsize)G$.arraySet(J.window,Y,z-J.wsize,J.wsize,0),J.wnext=0,J.whave=J.wsize;else{if(Q=J.wsize-J.wnext,Q>U)Q=U;if(G$.arraySet(J.window,Y,z-U,Q,J.wnext),U-=Q,U)G$.arraySet(J.window,Y,z-U,U,0),J.wnext=U,J.whave=J.wsize;else{if(J.wnext+=Q,J.wnext===J.wsize)J.wnext=0;if(J.whave>>8&255,z.check=I9(z.check,C,2,0),H=0,W=0,z.mode=G50;break}if(z.flags=0,z.head)z.head.done=!1;if(!(z.wrap&1)||(((H&255)<<8)+(H>>8))%31){$.msg="incorrect header check",z.mode=y4;break}if((H&15)!==K50){$.msg="unknown compression method",z.mode=y4;break}if(H>>>=4,W-=4,A=(H&15)+8,z.wbits===0)z.wbits=A;else if(A>z.wbits){$.msg="invalid window size",z.mode=y4;break}z.dmax=1<>8&1;if(z.flags&512)C[0]=H&255,C[1]=H>>>8&255,z.check=I9(z.check,C,2,0);H=0,W=0,z.mode=H50;case H50:while(W<32){if(K===0)break $;K--,H+=U[J++]<>>8&255,C[2]=H>>>16&255,C[3]=H>>>24&255,z.check=I9(z.check,C,4,0);H=0,W=0,z.mode=W50;case W50:while(W<16){if(K===0)break $;K--,H+=U[J++]<>8;if(z.flags&512)C[0]=H&255,C[1]=H>>>8&255,z.check=I9(z.check,C,2,0);H=0,W=0,z.mode=X50;case X50:if(z.flags&1024){while(W<16){if(K===0)break $;K--,H+=U[J++]<>>8&255,z.check=I9(z.check,C,2,0);H=0,W=0}else if(z.head)z.head.extra=null;z.mode=Z50;case Z50:if(z.flags&1024){if(q=z.length,q>K)q=K;if(q){if(z.head){if(A=z.head.extra_len-z.length,!z.head.extra)z.head.extra=Array(z.head.extra_len);G$.arraySet(z.head.extra,U,J,q,A)}if(z.flags&512)z.check=I9(z.check,U,q,J);K-=q,J+=q,z.length-=q}if(z.length)break $}z.length=0,z.mode=q50;case q50:if(z.flags&2048){if(K===0)break $;q=0;do if(A=U[J+q++],z.head&&A&&z.length<65536)z.head.name+=String.fromCharCode(A);while(A&&q>9&1,z.head.done=!0;$.adler=z.check=0,z.mode=H3;break;case F50:while(W<32){if(K===0)break $;K--,H+=U[J++]<>>=W&7,W-=W&7,z.mode=ny;break}while(W<3){if(K===0)break $;K--,H+=U[J++]<>>=1,W-=1,H&3){case 0:z.mode=O50;break;case 1:if(ao0(z),z.mode=AM,Y===DM){H>>>=2,W-=2;break $}break;case 2:z.mode=M50;break;case 3:$.msg="invalid block type",z.mode=y4}H>>>=2,W-=2;break;case O50:H>>>=W&7,W-=W&7;while(W<32){if(K===0)break $;K--,H+=U[J++]<>>16^65535)){$.msg="invalid stored block lengths",z.mode=y4;break}if(z.length=H&65535,H=0,W=0,z.mode=iy,Y===DM)break $;case iy:z.mode=w50;case w50:if(q=z.length,q){if(q>K)q=K;if(q>G)q=G;if(q===0)break $;G$.arraySet(Q,U,J,q,I),K-=q,J+=q,G-=q,I+=q,z.length-=q;break}z.mode=H3;break;case M50:while(W<14){if(K===0)break $;K--,H+=U[J++]<>>=5,W-=5,z.ndist=(H&31)+1,H>>>=5,W-=5,z.ncode=(H&15)+4,H>>>=4,W-=4,z.nlen>286||z.ndist>30){$.msg="too many length or distance symbols",z.mode=y4;break}z.have=0,z.mode=N50;case N50:while(z.have>>=3,W-=3}while(z.have<19)z.lens[S[z.have++]]=0;if(z.lencode=z.lendyn,z.lenbits=7,b={bits:z.lenbits},T=FW(uo0,z.lens,0,19,z.lencode,0,z.work,b),z.lenbits=b.bits,T){$.msg="invalid code lengths set",z.mode=y4;break}z.have=0,z.mode=D50;case D50:while(z.have>>24,N=w>>>16&255,M=w&65535,O<=W)break;if(K===0)break $;K--,H+=U[J++]<>>=O,W-=O,z.lens[z.have++]=M;else{if(M===16){k=O+2;while(W>>=O,W-=O,z.have===0){$.msg="invalid bit length repeat",z.mode=y4;break}A=z.lens[z.have-1],q=3+(H&3),H>>>=2,W-=2}else if(M===17){k=O+3;while(W>>=O,W-=O,A=0,q=3+(H&7),H>>>=3,W-=3}else{k=O+7;while(W>>=O,W-=O,A=0,q=11+(H&127),H>>>=7,W-=7}if(z.have+q>z.nlen+z.ndist){$.msg="invalid bit length repeat",z.mode=y4;break}while(q--)z.lens[z.have++]=A}}if(z.mode===y4)break;if(z.lens[256]===0){$.msg="invalid code -- missing end-of-block",z.mode=y4;break}if(z.lenbits=9,b={bits:z.lenbits},T=FW(v50,z.lens,0,z.nlen,z.lencode,0,z.work,b),z.lenbits=b.bits,T){$.msg="invalid literal/lengths set",z.mode=y4;break}if(z.distbits=6,z.distcode=z.distdyn,b={bits:z.distbits},T=FW(h50,z.lens,z.nlen,z.ndist,z.distcode,0,z.work,b),z.distbits=b.bits,T){$.msg="invalid distances set",z.mode=y4;break}if(z.mode=AM,Y===DM)break $;case AM:z.mode=BM;case BM:if(K>=6&&G>=258){if($.next_out=I,$.avail_out=G,$.next_in=J,$.avail_in=K,z.hold=H,z.bits=W,fo0($,Z),I=$.next_out,Q=$.output,G=$.avail_out,J=$.next_in,U=$.input,K=$.avail_in,H=z.hold,W=z.bits,z.mode===H3)z.back=-1;break}z.back=0;for(;;){if(w=z.lencode[H&(1<>>24,N=w>>>16&255,M=w&65535,O<=W)break;if(K===0)break $;K--,H+=U[J++]<>D)],O=w>>>24,N=w>>>16&255,M=w&65535,D+O<=W)break;if(K===0)break $;K--,H+=U[J++]<>>=D,W-=D,z.back+=D}if(H>>>=O,W-=O,z.back+=O,z.length=M,N===0){z.mode=T50;break}if(N&32){z.back=-1,z.mode=H3;break}if(N&64){$.msg="invalid literal/length code",z.mode=y4;break}z.extra=N&15,z.mode=A50;case A50:if(z.extra){k=z.extra;while(W>>=z.extra,W-=z.extra,z.back+=z.extra}z.was=z.length,z.mode=B50;case B50:for(;;){if(w=z.distcode[H&(1<>>24,N=w>>>16&255,M=w&65535,O<=W)break;if(K===0)break $;K--,H+=U[J++]<>D)],O=w>>>24,N=w>>>16&255,M=w&65535,D+O<=W)break;if(K===0)break $;K--,H+=U[J++]<>>=D,W-=D,z.back+=D}if(H>>>=O,W-=O,z.back+=O,N&64){$.msg="invalid distance code",z.mode=y4;break}z.offset=M,z.extra=N&15,z.mode=P50;case P50:if(z.extra){k=z.extra;while(W>>=z.extra,W-=z.extra,z.back+=z.extra}if(z.offset>z.dmax){$.msg="invalid distance too far back",z.mode=y4;break}z.mode=j50;case j50:if(G===0)break $;if(q=Z-G,z.offset>q){if(q=z.offset-q,q>z.whave){if(z.sane){$.msg="invalid distance too far back",z.mode=y4;break}}if(q>z.wnext)q-=z.wnext,V=z.wsize-q;else V=z.wnext-q;if(q>z.length)q=z.length;F=z.window}else F=Q,V=I-z.offset,q=z.length;if(q>G)q=G;G-=q,z.length-=q;do Q[I++]=F[V++];while(--q);if(z.length===0)z.mode=BM;break;case T50:if(G===0)break $;Q[I++]=z.length,G--,z.mode=BM;break;case ny:if(z.wrap){while(W<32){if(K===0)break $;K--,H|=U[J++]<{i50.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var c50=E((rd1,n50)=>{function qr0(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n50.exports=qr0});var d50=E((Or0)=>{var MJ=b50(),OW=K3(),jM=Sy(),G6=oy(),ry=ZM(),Vr0=gy(),Lr0=c50(),p50=Object.prototype.toString;function Iz($){if(!(this instanceof Iz))return new Iz($);this.options=OW.assign({chunkSize:16384,windowBits:0,to:""},$||{});var Y=this.options;if(Y.raw&&Y.windowBits>=0&&Y.windowBits<16){if(Y.windowBits=-Y.windowBits,Y.windowBits===0)Y.windowBits=-15}if(Y.windowBits>=0&&Y.windowBits<16&&!($&&$.windowBits))Y.windowBits+=32;if(Y.windowBits>15&&Y.windowBits<48){if((Y.windowBits&15)===0)Y.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vr0,this.strm.avail_out=0;var z=MJ.inflateInit2(this.strm,Y.windowBits);if(z!==G6.Z_OK)throw Error(ry[z]);if(this.header=new Lr0,MJ.inflateGetHeader(this.strm,this.header),Y.dictionary){if(typeof Y.dictionary==="string")Y.dictionary=jM.string2buf(Y.dictionary);else if(p50.call(Y.dictionary)==="[object ArrayBuffer]")Y.dictionary=new Uint8Array(Y.dictionary);if(Y.raw){if(z=MJ.inflateSetDictionary(this.strm,Y.dictionary),z!==G6.Z_OK)throw Error(ry[z])}}}Iz.prototype.push=function($,Y){var z=this.strm,U=this.options.chunkSize,Q=this.options.dictionary,J,I,K,G,H,W=!1;if(this.ended)return!1;if(I=Y===~~Y?Y:Y===!0?G6.Z_FINISH:G6.Z_NO_FLUSH,typeof $==="string")z.input=jM.binstring2buf($);else if(p50.call($)==="[object ArrayBuffer]")z.input=new Uint8Array($);else z.input=$;z.next_in=0,z.avail_in=z.input.length;do{if(z.avail_out===0)z.output=new OW.Buf8(U),z.next_out=0,z.avail_out=U;if(J=MJ.inflate(z,G6.Z_NO_FLUSH),J===G6.Z_NEED_DICT&&Q)J=MJ.inflateSetDictionary(this.strm,Q);if(J===G6.Z_BUF_ERROR&&W===!0)J=G6.Z_OK,W=!1;if(J!==G6.Z_STREAM_END&&J!==G6.Z_OK)return this.onEnd(J),this.ended=!0,!1;if(z.next_out){if(z.avail_out===0||J===G6.Z_STREAM_END||z.avail_in===0&&(I===G6.Z_FINISH||I===G6.Z_SYNC_FLUSH))if(this.options.to==="string"){if(K=jM.utf8border(z.output,z.next_out),G=z.next_out-K,H=jM.buf2string(z.output,K),z.next_out=G,z.avail_out=U-G,G)OW.arraySet(z.output,z.output,K,G,0);this.onData(H)}else this.onData(OW.shrinkBuf(z.output,z.next_out))}if(z.avail_in===0&&z.avail_out===0)W=!0}while((z.avail_in>0||z.avail_out===0)&&J!==G6.Z_STREAM_END);if(J===G6.Z_STREAM_END)I=G6.Z_FINISH;if(I===G6.Z_FINISH)return J=MJ.inflateEnd(this.strm),this.onEnd(J),this.ended=!0,J===G6.Z_OK;if(I===G6.Z_SYNC_FLUSH)return this.onEnd(G6.Z_OK),z.avail_out=0,!0;return!0};Iz.prototype.onData=function($){this.chunks.push($)};Iz.prototype.onEnd=function($){if($===G6.Z_OK)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=OW.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function sy($,Y){var z=new Iz(Y);if(z.push($,!0),z.err)throw z.msg||ry[z.err];return z.result}function Fr0($,Y){return Y=Y||{},Y.raw=!0,sy($,Y)}Or0.Inflate=Iz;Or0.inflate=sy;Or0.inflateRaw=Fr0;Or0.ungzip=sy});var o50=E((ad1,l50)=>{var Ar0=K3().assign,Br0=s$0(),Pr0=d50(),jr0=oy(),m50={};Ar0(m50,Br0,Pr0,jr0);l50.exports=m50});var s50=E((Rr0)=>{var Tr0=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Er0=o50(),r50=c4(),TM=K$(),Cr0=Tr0?"uint8array":"array";Rr0.magic="\b\x00";function Kz($,Y){TM.call(this,"FlateWorker/"+$),this._pako=null,this._pakoAction=$,this._pakoOptions=Y,this.meta={}}r50.inherits(Kz,TM);Kz.prototype.processChunk=function($){if(this.meta=$.meta,this._pako===null)this._createPako();this._pako.push(r50.transformTo(Cr0,$.data),!1)};Kz.prototype.flush=function(){if(TM.prototype.flush.call(this),this._pako===null)this._createPako();this._pako.push([],!0)};Kz.prototype.cleanUp=function(){TM.prototype.cleanUp.call(this),this._pako=null};Kz.prototype._createPako=function(){this._pako=new Er0[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var $=this;this._pako.onData=function(Y){$.push({data:Y,meta:$.meta})}};Rr0.compressWorker=function($){return new Kz("Deflate",$)};Rr0.uncompressWorker=function(){return new Kz("Inflate",{})}});var ay=E((Sr0)=>{var a50=K$();Sr0.STORE={magic:"\x00\x00",compressWorker:function(){return new a50("STORE compression")},uncompressWorker:function(){return new a50("STORE decompression")}};Sr0.DEFLATE=s50()});var ty=E((kr0)=>{kr0.LOCAL_FILE_HEADER="PK\x03\x04";kr0.CENTRAL_FILE_HEADER="PK\x01\x02";kr0.CENTRAL_DIRECTORY_END="PK\x05\x06";kr0.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";kr0.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";kr0.DATA_DESCRIPTOR="PK\x07\b"});var Y90=E((Ym1,$90)=>{var NJ=c4(),DJ=K$(),ey=WJ(),t50=GM(),EM=ty(),N4=function($,Y){var z="",U;for(U=0;U>>8;return z},cr0=function($,Y){var z=$;if(!$)z=Y?16893:33204;return(z&65535)<<16},pr0=function($){return($||0)&63},e50=function($,Y,z,U,Q,J){var{file:I,compression:K}=$,G=J!==ey.utf8encode,H=NJ.transformTo("string",J(I.name)),W=NJ.transformTo("string",ey.utf8encode(I.name)),X=I.comment,Z=NJ.transformTo("string",J(X)),q=NJ.transformTo("string",ey.utf8encode(X)),V=W.length!==I.name.length,F=q.length!==X.length,w,O,N="",M="",D="",P=I.dir,j=I.date,A={crc32:0,compressedSize:0,uncompressedSize:0};if(!Y||z)A.crc32=$.crc32,A.compressedSize=$.compressedSize,A.uncompressedSize=$.uncompressedSize;var T=0;if(Y)T|=8;if(!G&&(V||F))T|=2048;var C=0,b=0;if(P)C|=16;if(Q==="UNIX")b=798,C|=cr0(I.unixPermissions,P);else b=20,C|=pr0(I.dosPermissions,P);if(w=j.getUTCHours(),w=w<<6,w=w|j.getUTCMinutes(),w=w<<5,w=w|j.getUTCSeconds()/2,O=j.getUTCFullYear()-1980,O=O<<4,O=O|j.getUTCMonth()+1,O=O<<5,O=O|j.getUTCDate(),V)M=N4(1,1)+N4(t50(H),4)+W,N+="up"+N4(M.length,2)+M;if(F)D=N4(1,1)+N4(t50(Z),4)+q,N+="uc"+N4(D.length,2)+D;var k="";k+=` + deps: ${W}}`};let Q={keyword:"dependencies",type:"object",schemaType:"object",error:$.error,code(G){let[H,W]=J(G);I(G,H),K(G,W)}};function J({schema:G}){let H={},W={};for(let X in G){if(X==="__proto__")continue;let Z=Array.isArray(G[X])?H:W;Z[X]=G[X]}return[H,W]}function I(G,H=G.schema){let{gen:W,data:X,it:Z}=G;if(Object.keys(H).length===0)return;let q=W.let("missing");for(let V in H){let F=H[V];if(F.length===0)continue;let w=(0,U.propertyInData)(W,X,V,Z.opts.ownProperties);if(G.setParams({property:V,depsCount:F.length,deps:F.join(", ")}),Z.allErrors)W.if(w,()=>{for(let O of F)(0,U.checkReportMissingProp)(G,O)});else W.if(Y._`${w} && (${(0,U.checkMissingProp)(G,F,q)})`),(0,U.reportMissingProp)(G,q),W.else()}}$.validatePropertyDeps=I;function K(G,H=G.schema){let{gen:W,data:X,keyword:Z,it:q}=G,V=W.name("valid");for(let F in H){if((0,z.alwaysValidSchema)(q,H[F]))continue;W.if((0,U.propertyInData)(W,X,F,q.opts.ownProperties),()=>{let w=G.subschema({keyword:Z,schemaProp:F},V);G.mergeValidEvaluated(w,V)},()=>W.var(V,!0)),G.ok(V)}}$.validateSchemaDeps=K,$.default=Q}),bb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:Q})=>Y._`{propertyName: ${Q.propertyName}}`},code(Q){let{gen:J,schema:I,data:K,it:G}=Q;if((0,z.alwaysValidSchema)(G,I))return;let H=J.name("valid");J.forIn("key",K,(W)=>{Q.setParams({propertyName:W}),Q.subschema({keyword:"propertyNames",data:W,dataTypes:["string"],propertyName:W,compositeRule:!0},H),J.if((0,Y.not)(H),()=>{if(Q.error(!0),!G.allErrors)J.break()})}),Q.ok(H)}};$.default=U}),De=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=F1(),U=Q5(),Q=v1(),J={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:I})=>z._`{additionalProperty: ${I.additionalProperty}}`},code(I){let{gen:K,schema:G,parentSchema:H,data:W,errsCount:X,it:Z}=I;if(!X)throw Error("ajv implementation error");let{allErrors:q,opts:V}=Z;if(Z.props=!0,V.removeAdditional!=="all"&&(0,Q.alwaysValidSchema)(Z,G))return;let F=(0,Y.allSchemaProperties)(H.properties),w=(0,Y.allSchemaProperties)(H.patternProperties);O(),I.ok(z._`${X} === ${U.default.errors}`);function O(){K.forIn("key",W,(j)=>{if(!F.length&&!w.length)D(j);else K.if(N(j),()=>D(j))})}function N(j){let A;if(F.length>8){let T=(0,Q.schemaRefOrVal)(Z,H.properties,"properties");A=(0,Y.isOwnProperty)(K,T,j)}else if(F.length)A=(0,z.or)(...F.map((T)=>z._`${j} === ${T}`));else A=z.nil;if(w.length)A=(0,z.or)(A,...w.map((T)=>z._`${(0,Y.usePattern)(I,T)}.test(${j})`));return(0,z.not)(A)}function M(j){K.code(z._`delete ${W}[${j}]`)}function D(j){if(V.removeAdditional==="all"||V.removeAdditional&&G===!1){M(j);return}if(G===!1){if(I.setParams({additionalProperty:j}),I.error(),!q)K.break();return}if(typeof G=="object"&&!(0,Q.alwaysValidSchema)(Z,G)){let A=K.name("valid");if(V.removeAdditional==="failing")P(j,A,!1),K.if((0,z.not)(A),()=>{I.reset(),M(j)});else if(P(j,A),!q)K.if((0,z.not)(A),()=>K.break())}}function P(j,A,T){let C={keyword:"additionalProperties",dataProp:j,dataPropType:Q.Type.Str};if(T===!1)Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1});I.subschema(C,A)}}};$.default=J}),ib0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=uQ(),z=J5(),U=v1(),Q=De(),J={keyword:"properties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,parentSchema:H,data:W,it:X}=I;if(X.opts.removeAdditional==="all"&&H.additionalProperties===void 0)Q.default.code(new Y.KeywordCxt(X,Q.default,"additionalProperties"));let Z=(0,z.allSchemaProperties)(G);for(let O of Z)X.definedProperties.add(O);if(X.opts.unevaluated&&Z.length&&X.props!==!0)X.props=U.mergeEvaluated.props(K,(0,U.toHash)(Z),X.props);let q=Z.filter((O)=>!(0,U.alwaysValidSchema)(X,G[O]));if(q.length===0)return;let V=K.name("valid");for(let O of q){if(F(O))w(O);else{if(K.if((0,z.propertyInData)(K,W,O,X.opts.ownProperties)),w(O),!X.allErrors)K.else().var(V,!0);K.endIf()}I.it.definedProperties.add(O),I.ok(V)}function F(O){return X.opts.useDefaults&&!X.compositeRule&&G[O].default!==void 0}function w(O){I.subschema({keyword:"properties",schemaProp:O,dataProp:O},V)}}};$.default=J}),nb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=J5(),z=F1(),U=v1(),Q=v1(),J={keyword:"patternProperties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,data:H,parentSchema:W,it:X}=I,{opts:Z}=X,q=(0,Y.allSchemaProperties)(G),V=q.filter((P)=>(0,U.alwaysValidSchema)(X,G[P]));if(q.length===0||V.length===q.length&&(!X.opts.unevaluated||X.props===!0))return;let F=Z.strictSchema&&!Z.allowMatchingProperties&&W.properties,w=K.name("valid");if(X.props!==!0&&!(X.props instanceof z.Name))X.props=(0,Q.evaluatedPropsToName)(K,X.props);let{props:O}=X;N();function N(){for(let P of q){if(F)M(P);if(X.allErrors)D(P);else K.var(w,!0),D(P),K.if(w)}}function M(P){for(let j in F)if(new RegExp(P).test(j))(0,U.checkStrictMode)(X,`property ${j} matches pattern ${P} (use allowMatchingProperties)`)}function D(P){K.forIn("key",H,(j)=>{K.if(z._`${(0,Y.usePattern)(I,P)}.test(${j})`,()=>{let A=V.includes(P);if(!A)I.subschema({keyword:"patternProperties",schemaProp:P,dataProp:j,dataPropType:Q.Type.Str},w);if(X.opts.unevaluated&&O!==!0)K.assign(z._`${O}[${j}]`,!0);else if(!A&&!X.allErrors)K.if((0,z.not)(w),()=>K.break())})})}}};$.default=J}),cb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(U){let{gen:Q,schema:J,it:I}=U;if((0,Y.alwaysValidSchema)(I,J)){U.fail();return}let K=Q.name("valid");U.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},K),U.failResult(K,()=>U.reset(),()=>U.error())},error:{message:"must NOT be valid"}};$.default=z}),pb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:J5().validateUnion,error:{message:"must match a schema in anyOf"}};$.default=Y}),db0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:Q})=>Y._`{passingSchemas: ${Q.passing}}`},code(Q){let{gen:J,schema:I,parentSchema:K,it:G}=Q;if(!Array.isArray(I))throw Error("ajv implementation error");if(G.opts.discriminator&&K.discriminator)return;let H=I,W=J.let("valid",!1),X=J.let("passing",null),Z=J.name("_valid");Q.setParams({passing:X}),J.block(q),Q.result(W,()=>Q.reset(),()=>Q.error(!0));function q(){H.forEach((V,F)=>{let w;if((0,z.alwaysValidSchema)(G,V))J.var(Z,!0);else w=Q.subschema({keyword:"oneOf",schemaProp:F,compositeRule:!0},Z);if(F>0)J.if(Y._`${Z} && ${W}`).assign(W,!1).assign(X,Y._`[${X}, ${F}]`).else();J.if(Z,()=>{if(J.assign(W,!0),J.assign(X,F),w)Q.mergeEvaluated(w,Y.Name)})})}}};$.default=U}),mb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:"allOf",schemaType:"array",code(U){let{gen:Q,schema:J,it:I}=U;if(!Array.isArray(J))throw Error("ajv implementation error");let K=Q.name("valid");J.forEach((G,H)=>{if((0,Y.alwaysValidSchema)(I,G))return;let W=U.subschema({keyword:"allOf",schemaProp:H},K);U.ok(K),U.mergeEvaluated(W)})}};$.default=z}),lb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:J})=>Y.str`must match "${J.ifClause}" schema`,params:({params:J})=>Y._`{failingKeyword: ${J.ifClause}}`},code(J){let{gen:I,parentSchema:K,it:G}=J;if(K.then===void 0&&K.else===void 0)(0,z.checkStrictMode)(G,'"if" without "then" and "else" is ignored');let H=Q(G,"then"),W=Q(G,"else");if(!H&&!W)return;let X=I.let("valid",!0),Z=I.name("_valid");if(q(),J.reset(),H&&W){let F=I.let("ifClause");J.setParams({ifClause:F}),I.if(Z,V("then",F),V("else",F))}else if(H)I.if(Z,V("then"));else I.if((0,Y.not)(Z),V("else"));J.pass(X,()=>J.error(!0));function q(){let F=J.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},Z);J.mergeEvaluated(F)}function V(F,w){return()=>{let O=J.subschema({keyword:F},Z);if(I.assign(X,Z),J.mergeValidEvaluated(O,X),w)I.assign(w,Y._`${F}`);else J.setParams({ifClause:F})}}}};function Q(J,I){let K=J.schema[I];return K!==void 0&&!(0,z.alwaysValidSchema)(J,K)}$.default=U}),ob0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:U,parentSchema:Q,it:J}){if(Q.if===void 0)(0,Y.checkStrictMode)(J,`"${U}" without "if" is ignored`)}};$.default=z}),Ae=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Me(),z=xb0(),U=Ne(),Q=fb0(),J=ub0(),I=DS(),K=bb0(),G=De(),H=ib0(),W=nb0(),X=cb0(),Z=pb0(),q=db0(),V=mb0(),F=lb0(),w=ob0();function O(N=!1){let M=[X.default,Z.default,q.default,V.default,F.default,w.default,K.default,G.default,I.default,H.default,W.default];if(N)M.push(z.default,Q.default);else M.push(Y.default,U.default);return M.push(J.default),M}$.default=O}),rb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:U})=>Y.str`must match format "${U}"`,params:({schemaCode:U})=>Y._`{format: ${U}}`},code(U,Q){let{gen:J,data:I,$data:K,schema:G,schemaCode:H,it:W}=U,{opts:X,errSchemaPath:Z,schemaEnv:q,self:V}=W;if(!X.validateFormats)return;if(K)F();else w();function F(){let O=J.scopeValue("formats",{ref:V.formats,code:X.code.formats}),N=J.const("fDef",Y._`${O}[${H}]`),M=J.let("fType"),D=J.let("format");J.if(Y._`typeof ${N} == "object" && !(${N} instanceof RegExp)`,()=>J.assign(M,Y._`${N}.type || "string"`).assign(D,Y._`${N}.validate`),()=>J.assign(M,Y._`"string"`).assign(D,N)),U.fail$data((0,Y.or)(P(),j()));function P(){if(X.strictSchema===!1)return Y.nil;return Y._`${H} && !${D}`}function j(){let A=q.$async?Y._`(${N}.async ? await ${D}(${I}) : ${D}(${I}))`:Y._`${D}(${I})`,T=Y._`(typeof ${D} == "function" ? ${A} : ${D}.test(${I}))`;return Y._`${D} && ${D} !== true && ${M} === ${Q} && !${T}`}}function w(){let O=V.formats[G];if(!O){P();return}if(O===!0)return;let[N,M,D]=j(O);if(N===Q)U.pass(A());function P(){if(X.strictSchema===!1){V.logger.warn(T());return}throw Error(T());function T(){return`unknown format "${G}" ignored in schema at path "${Z}"`}}function j(T){let C=T instanceof RegExp?(0,Y.regexpCode)(T):X.code.formats?Y._`${X.code.formats}${(0,Y.getProperty)(G)}`:void 0,b=J.scopeValue("formats",{key:G,ref:T,code:C});if(typeof T=="object"&&!(T instanceof RegExp))return[T.type||"string",T.validate,Y._`${b}.validate`];return["string",T,b]}function A(){if(typeof O=="object"&&!(O instanceof RegExp)&&O.async){if(!q.$async)throw Error("async format in sync schema");return Y._`await ${D}(${I})`}return typeof M=="function"?Y._`${D}(${I})`:Y._`${D}.test(${I})`}}}};$.default=z}),Be=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=[rb0().default];$.default=Y}),Pe=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.contentVocabulary=$.metadataVocabulary=void 0,$.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],$.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),je=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Oe(),z=we(),U=Ae(),Q=Be(),J=Pe(),I=[Y.default,z.default,(0,U.default)(),Q.default,J.metadataVocabulary,J.contentVocabulary];$.default=I}),sb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.DiscrError=void 0;var Y;(function(z){z.Tag="tag",z.Mapping="mapping"})(Y||($.DiscrError=Y={}))}),AS=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=sb0(),U=nO(),Q=bQ(),J=v1(),I={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:K,tagName:G}})=>K===z.DiscrError.Tag?`tag "${G}" must be string`:`value of tag "${G}" must be in oneOf`,params:({params:{discrError:K,tag:G,tagName:H}})=>Y._`{error: ${K}, tag: ${H}, tagValue: ${G}}`},code(K){let{gen:G,data:H,schema:W,parentSchema:X,it:Z}=K,{oneOf:q}=X;if(!Z.opts.discriminator)throw Error("discriminator: requires discriminator option");let V=W.propertyName;if(typeof V!="string")throw Error("discriminator: requires propertyName");if(W.mapping)throw Error("discriminator: mapping is not supported");if(!q)throw Error("discriminator: requires oneOf keyword");let F=G.let("valid",!1),w=G.const("tag",Y._`${H}${(0,Y.getProperty)(V)}`);G.if(Y._`typeof ${w} == "string"`,()=>O(),()=>K.error(!1,{discrError:z.DiscrError.Tag,tag:w,tagName:V})),K.ok(F);function O(){let D=M();G.if(!1);for(let P in D)G.elseIf(Y._`${w} === ${P}`),G.assign(F,N(D[P]));G.else(),K.error(!1,{discrError:z.DiscrError.Mapping,tag:w,tagName:V}),G.endIf()}function N(D){let P=G.name("valid"),j=K.subschema({keyword:"oneOf",schemaProp:D},P);return K.mergeEvaluated(j,Y.Name),P}function M(){var D;let P={},j=T(X),A=!0;for(let k=0;k{Y.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}}),Te=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv=void 0;let z=wS(),U=je(),Q=AS(),J=ab0(),I=["/properties"],K="http://json-schema.org/draft-07/schema";var G=class extends z.default{_addVocabularies(){if(super._addVocabularies(),U.default.forEach((q)=>this.addVocabulary(q)),this.opts.discriminator)this.addKeyword(Q.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let q=this.opts.$data?this.$dataMetaSchema(J,I):J;this.addMetaSchema(q,K,!1),this.refs["http://json-schema.org/schema"]=K}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(K)?K:void 0)}};$.Ajv=G,Y.exports=$=G,Y.exports.Ajv=G,Object.defineProperty($,"__esModule",{value:!0}),$.default=G;var H=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return H.KeywordCxt}});var W=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return W._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return W.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return W.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return W.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return W.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return W.CodeGen}});var X=OH();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return X.default}});var Z=bQ();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return Z.default}})}),Ee=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.dynamicAnchor=void 0;let Y=F1(),z=Q5(),U=nO(),Q=MS(),J={keyword:"$dynamicAnchor",schemaType:"string",code:(G)=>I(G,G.schema)};function I(G,H){let{gen:W,it:X}=G;X.schemaEnv.root.dynamicAnchors[H]=!0;let Z=Y._`${z.default.dynamicAnchors}${(0,Y.getProperty)(H)}`,q=X.errSchemaPath==="#"?X.validateName:K(G);W.if(Y._`!${Z}`,()=>W.assign(Z,q))}$.dynamicAnchor=I;function K(G){let{schemaEnv:H,schema:W,self:X}=G.it,{root:Z,baseId:q,localRefs:V,meta:F}=H.root,{schemaId:w}=X.opts,O=new U.SchemaEnv({schema:W,schemaId:w,root:Z,baseId:q,localRefs:V,meta:F});return U.compileSchema.call(X,O),(0,Q.getValidate)(G,O)}$.default=J}),Ce=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.dynamicRef=void 0;let Y=F1(),z=Q5(),U=MS(),Q={keyword:"$dynamicRef",schemaType:"string",code:(I)=>J(I,I.schema)};function J(I,K){let{gen:G,keyword:H,it:W}=I;if(K[0]!=="#")throw Error(`"${H}" only supports hash fragment reference`);let X=K.slice(1);if(W.allErrors)Z();else{let V=G.let("valid",!1);Z(V),I.ok(V)}function Z(V){if(W.schemaEnv.root.dynamicAnchors[X]){let F=G.let("_v",Y._`${z.default.dynamicAnchors}${(0,Y.getProperty)(X)}`);G.if(F,q(F,V),q(W.validateName,V))}else q(W.validateName,V)()}function q(V,F){return F?()=>G.block(()=>{(0,U.callRef)(I,V),G.let(F,!0)}):()=>(0,U.callRef)(I,V)}}$.dynamicRef=J,$.default=Q}),tb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ee(),z=v1(),U={keyword:"$recursiveAnchor",schemaType:"boolean",code(Q){if(Q.schema)(0,Y.dynamicAnchor)(Q,"");else(0,z.checkStrictMode)(Q.it,"$recursiveAnchor: false is ignored")}};$.default=U}),eb0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ce(),z={keyword:"$recursiveRef",schemaType:"string",code:(U)=>(0,Y.dynamicRef)(U,U.schema)};$.default=z}),Re=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ee(),z=Ce(),U=tb0(),Q=eb0(),J=[Y.default,z.default,U.default,Q.default];$.default=J}),$i0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=DS(),z={keyword:"dependentRequired",type:"object",schemaType:"object",error:Y.error,code:(U)=>(0,Y.validatePropertyDeps)(U)};$.default=z}),Yi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=DS(),z={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(U)=>(0,Y.validateSchemaDeps)(U)};$.default=z}),zi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=v1(),z={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:U,parentSchema:Q,it:J}){if(Q.contains===void 0)(0,Y.checkStrictMode)(J,`"${U}" without "contains" is ignored`)}};$.default=z}),_e=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=$i0(),z=Yi0(),U=zi0(),Q=[Y.default,z.default,U.default];$.default=Q}),Ui0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U=Q5(),Q={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:J})=>Y._`{unevaluatedProperty: ${J.unevaluatedProperty}}`},code(J){let{gen:I,schema:K,data:G,errsCount:H,it:W}=J;if(!H)throw Error("ajv implementation error");let{allErrors:X,props:Z}=W;if(Z instanceof Y.Name)I.if(Y._`${Z} !== true`,()=>I.forIn("key",G,(w)=>I.if(V(Z,w),()=>q(w))));else if(Z!==!0)I.forIn("key",G,(w)=>Z===void 0?q(w):I.if(F(Z,w),()=>q(w)));W.props=!0,J.ok(Y._`${H} === ${U.default.errors}`);function q(w){if(K===!1){if(J.setParams({unevaluatedProperty:w}),J.error(),!X)I.break();return}if(!(0,z.alwaysValidSchema)(W,K)){let O=I.name("valid");if(J.subschema({keyword:"unevaluatedProperties",dataProp:w,dataPropType:z.Type.Str},O),!X)I.if((0,Y.not)(O),()=>I.break())}}function V(w,O){return Y._`!${w} || !${w}[${O}]`}function F(w,O){let N=[];for(let M in w)if(w[M]===!0)N.push(Y._`${O} !== ${M}`);return(0,Y.and)(...N)}}};$.default=Q}),Qi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=F1(),z=v1(),U={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:Q}})=>Y.str`must NOT have more than ${Q} items`,params:({params:{len:Q}})=>Y._`{limit: ${Q}}`},code(Q){let{gen:J,schema:I,data:K,it:G}=Q,H=G.items||0;if(H===!0)return;let W=J.const("len",Y._`${K}.length`);if(I===!1)Q.setParams({len:H}),Q.fail(Y._`${W} > ${H}`);else if(typeof I=="object"&&!(0,z.alwaysValidSchema)(G,I)){let Z=J.var("valid",Y._`${W} <= ${H}`);J.if((0,Y.not)(Z),()=>X(Z,H)),Q.ok(Z)}G.items=!0;function X(Z,q){J.forRange("i",q,W,(V)=>{if(Q.subschema({keyword:"unevaluatedItems",dataProp:V,dataPropType:z.Type.Num},Z),!G.allErrors)J.if((0,Y.not)(Z),()=>J.break())})}}};$.default=U}),ve=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ui0(),z=Qi0(),U=[Y.default,z.default];$.default=U}),Ji0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),Ii0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),Ki0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),Gi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),Hi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),Wi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),Xi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),Zi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Ji0(),z=Ii0(),U=Ki0(),Q=Gi0(),J=Hi0(),I=Wi0(),K=Xi0(),G=["/properties"];function H(W){return[Y,z,U,Q,X(this,J),I,X(this,K)].forEach((Z)=>this.addMetaSchema(Z,void 0,!1)),this;function X(Z,q){return W?Z.$dataMetaSchema(q,G):q}}$.default=H}),qi0=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv2019=void 0;let z=wS(),U=je(),Q=Re(),J=_e(),I=ve(),K=AS(),G=Zi0(),H="https://json-schema.org/draft/2019-09/schema";var W=class extends z.default{constructor(F={}){super({...F,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),this.addVocabulary(Q.default),U.default.forEach((F)=>this.addVocabulary(F)),this.addVocabulary(J.default),this.addVocabulary(I.default),this.opts.discriminator)this.addKeyword(K.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:F,meta:w}=this.opts;if(!w)return;G.default.call(this,F),this.refs["http://json-schema.org/schema"]=H}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(H)?H:void 0)}};$.Ajv2019=W,Y.exports=$=W,Y.exports.Ajv2019=W,Object.defineProperty($,"__esModule",{value:!0}),$.default=W;var X=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return X.KeywordCxt}});var Z=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return Z._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return Z.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return Z.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return Z.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return Z.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return Z.CodeGen}});var q=OH();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return q.default}});var V=bQ();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return V.default}})}),Vi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Oe(),z=we(),U=Ae(),Q=Re(),J=_e(),I=ve(),K=Be(),G=Pe(),H=[Q.default,Y.default,z.default,(0,U.default)(!0),K.default,G.metadataVocabulary,G.contentVocabulary,J.default,I.default];$.default=H}),Li0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),Fi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),Oi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),wi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),Mi0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),Ni0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),Di0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),Ai0=C0(($,Y)=>{Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),Bi0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Li0(),z=Fi0(),U=Oi0(),Q=wi0(),J=Mi0(),I=Ni0(),K=Di0(),G=Ai0(),H=["/properties"];function W(X){return[Y,z,U,Q,J,Z(this,I),K,Z(this,G)].forEach((q)=>this.addMetaSchema(q,void 0,!1)),this;function Z(q,V){return X?q.$dataMetaSchema(V,H):V}}$.default=W}),Pi0=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv2020=void 0;let z=wS(),U=Vi0(),Q=AS(),J=Bi0(),I="https://json-schema.org/draft/2020-12/schema";var K=class extends z.default{constructor(Z={}){super({...Z,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),U.default.forEach((Z)=>this.addVocabulary(Z)),this.opts.discriminator)this.addKeyword(Q.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:Z,meta:q}=this.opts;if(!q)return;J.default.call(this,Z),this.refs["http://json-schema.org/schema"]=I}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(I)?I:void 0)}};$.Ajv2020=K,Y.exports=$=K,Y.exports.Ajv2020=K,Object.defineProperty($,"__esModule",{value:!0}),$.default=K;var G=uQ();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return G.KeywordCxt}});var H=F1();Object.defineProperty($,"_",{enumerable:!0,get:function(){return H._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return H.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return H.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return H.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return H.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return H.CodeGen}});var W=OH();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return W.default}});var X=bQ();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return X.default}})}),ji0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.formatNames=$.fastFormats=$.fullFormats=void 0;function Y(k,S){return{validate:k,compare:S}}$.fullFormats={date:Y(J,I),time:Y(G(!0),H),"date-time":Y(Z(!0),q),"iso-time":Y(G(),W),"iso-date-time":Y(Z(),V),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:O,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:b,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:M,int32:{type:"number",validate:j},int64:{type:"number",validate:A},float:{type:"number",validate:T},double:{type:"number",validate:T},password:!0,binary:!0},$.fastFormats={...$.fullFormats,date:Y(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,I),time:Y(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,H),"date-time":Y(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,q),"iso-time":Y(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,W),"iso-date-time":Y(/^\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,V),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},$.formatNames=Object.keys($.fullFormats);function z(k){return k%4===0&&(k%100!==0||k%400===0)}let U=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Q=[0,31,28,31,30,31,30,31,31,30,31,30,31];function J(k){let S=U.exec(k);if(!S)return!1;let i=+S[1],n=+S[2],U0=+S[3];return n>=1&&n<=12&&U0>=1&&U0<=(n===2&&z(i)?29:Q[n])}function I(k,S){if(!(k&&S))return;if(k>S)return 1;if(k23||p>59||k&&!t)return!1;if(U0<=23&&x<=59&&d<60)return!0;let Y0=x-p*e,y=U0-g*e-(Y0<0?1:0);return(y===23||y===-1)&&(Y0===59||Y0===-1)&&d<61}}function H(k,S){if(!(k&&S))return;let i=new Date("2020-01-01T"+k).valueOf(),n=new Date("2020-01-01T"+S).valueOf();if(!(i&&n))return;return i-n}function W(k,S){if(!(k&&S))return;let i=K.exec(k),n=K.exec(S);if(!(i&&n))return;if(k=i[1]+i[2]+i[3],S=n[1]+n[2]+n[3],k>S)return 1;if(k=D}function A(k){return Number.isInteger(k)}function T(){return!0}let C=/[^\\]\\Z/;function b(k){if(C.test(k))return!1;try{return new RegExp(k),!0}catch(S){return!1}}}),Ti0=C0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.formatLimitDefinition=void 0;let Y=Te(),z=F1(),U=z.operators,Q={formatMaximum:{okStr:"<=",ok:U.LTE,fail:U.GT},formatMinimum:{okStr:">=",ok:U.GTE,fail:U.LT},formatExclusiveMaximum:{okStr:"<",ok:U.LT,fail:U.GTE},formatExclusiveMinimum:{okStr:">",ok:U.GT,fail:U.LTE}},J={message:({keyword:K,schemaCode:G})=>z.str`should be ${Q[K].okStr} ${G}`,params:({keyword:K,schemaCode:G})=>z._`{comparison: ${Q[K].okStr}, limit: ${G}}`};$.formatLimitDefinition={keyword:Object.keys(Q),type:"string",schemaType:"string",$data:!0,error:J,code(K){let{gen:G,data:H,schemaCode:W,keyword:X,it:Z}=K,{opts:q,self:V}=Z;if(!q.validateFormats)return;let F=new Y.KeywordCxt(Z,V.RULES.all.format.definition,"format");if(F.$data)w();else O();function w(){let M=G.scopeValue("formats",{ref:V.formats,code:q.code.formats}),D=G.const("fmt",z._`${M}[${F.schemaCode}]`);K.fail$data((0,z.or)(z._`typeof ${D} != "object"`,z._`${D} instanceof RegExp`,z._`typeof ${D}.compare != "function"`,N(D)))}function O(){let M=F.schema,D=V.formats[M];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw Error(`"${X}": format "${M}" does not define "compare" function`);let P=G.scopeValue("formats",{key:M,ref:D,code:q.code.formats?z._`${q.code.formats}${(0,z.getProperty)(M)}`:void 0});K.fail$data(N(P))}function N(M){return z._`${M}.compare(${H}, ${W}) ${Q[X].fail} 0`}},dependencies:["format"]};let I=(K)=>{return K.addKeyword($.formatLimitDefinition),K};$.default=I}),Ei0=C0(($,Y)=>{Object.defineProperty($,"__esModule",{value:!0});let z=ji0(),U=Ti0(),Q=F1(),J=new Q.Name("fullFormats"),I=new Q.Name("fastFormats"),K=(H,W={keywords:!0})=>{if(Array.isArray(W))return G(H,W,z.fullFormats,J),H;let[X,Z]=W.mode==="fast"?[z.fastFormats,I]:[z.fullFormats,J];if(G(H,W.formats||z.formatNames,X,Z),W.keywords)(0,U.default)(H);return H};K.get=(H,W="full")=>{let X=(W==="fast"?z.fastFormats:z.fullFormats)[H];if(!X)throw Error(`Unknown format "${H}"`);return X};function G(H,W,X,Z){var q,V;(q=(V=H.opts.code).formats)!==null&&q!==void 0||(V.formats=Q._`require("ajv-formats/dist/formats").${Z}`);for(let F of W)H.addFormat(F,X[F])}Y.exports=$=K,Object.defineProperty($,"__esModule",{value:!0}),$.default=K}),he=Te(),Ci0=qi0(),Ri0=Pi0(),_i0=sq(Ei0(),1),vi0=_i0.default;qb1=he.Ajv});import BS from"node:process";var pO=m(()=>{Se()});function jS($){return!!$&&typeof $==="object"&&ne in $}function Si0($){return $[ne]?.complete}function gi0($,Y){switch(Y.kind){case"tools_list_changed":return $.toolsListChanged===!0;case"prompts_list_changed":return $.promptsListChanged===!0;case"resources_list_changed":return $.resourcesListChanged===!0;case"resource_updated":return $.resourceSubscriptions!==void 0&&$.resourceSubscriptions.includes(Y.uri)}}function yi0($,Y){let z={},U=(Q)=>Y===void 0||Q===!0;if($.toolsListChanged===!0&&U(Y?.tools?.listChanged))z.toolsListChanged=!0;if($.promptsListChanged===!0&&U(Y?.prompts?.listChanged))z.promptsListChanged=!0;if($.resourcesListChanged===!0&&U(Y?.resources?.listChanged))z.resourcesListChanged=!0;if($.resourceSubscriptions!==void 0&&$.resourceSubscriptions.length>0&&U(Y?.resources?.subscribe))z.resourceSubscriptions=[...$.resourceSubscriptions];return z}function ge($,Y){return{method:$.method,params:{...$.params,_meta:{...$.params?._meta,[fY]:Y}}}}function ki0($){let Y=C7(LH).validateRequest("subscriptions/listen",$);return Y.ok?Y.value.params?.notifications:void 0}function fi0($,Y){switch($){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:Y??""}}}function ii0($){if($?.maxRounds!==void 0&&(!Number.isInteger($.maxRounds)||$.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${$.maxRounds})`);if($?.roundTimeoutMs!==void 0&&(!Number.isFinite($.roundTimeoutMs)||$.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${$.roundTimeoutMs})`);return{maxRounds:$?.maxRounds??ui0,roundTimeoutMs:$?.roundTimeoutMs??bi0,legacyShim:$?.legacyShim??!0}}function pe($,Y,z){if(z===null||typeof z!=="object"||typeof z.method!=="string")throw new J1(c0.InternalError,`Handler for ${$} returned an invalid input request '${Y}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let U=z,Q=yt(U);if(Q===void 0)throw new J1(c0.InternalError,`Handler for ${$} returned an input request '${Y}' of kind '${U.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:U,required:Q}}function ni0(){let $=globalThis.crypto;if($?.randomUUID!==void 0)return $.randomUUID();let Y=new Uint8Array(16);$.getRandomValues(Y),Y[6]=Y[6]&15|64,Y[8]=Y[8]&63|128;let z=[...Y].map((U)=>U.toString(16).padStart(2,"0")).join("");return`${z.slice(0,8)}-${z.slice(8,12)}-${z.slice(12,16)}-${z.slice(16,20)}-${z.slice(20)}`}function PS($,Y){if($==="tools/call")return{content:[{type:"text",text:Y}],isError:!0};throw new J1(c0.InternalError,Y)}function TS($,Y){de($,Y)}function ES($){return me($)}function mi0($){return{...$}}function ye($,Y){if($){let U=Y;return async(Q,J)=>U(Q,J)}let z=Y;return async(U,Q)=>z(Q)}function xe($){if($===void 0)return;try{return v7($,"output")}catch{return}}function fe($,Y,z){if(Y){let U=z;return async(Q,J)=>{let I=await iY(Y,Q);if(!I.success)throw new J1(c0.InvalidParams,`Invalid arguments for prompt ${$}: ${I.error}`);return U(I.data,J)}}else{let U=z;return async(Q,J)=>{return U(J)}}}function ue($){return{completion:{values:$.map(String).slice(0,100),total:$.length,hasMore:$.length>100}}}function be($){let Y=$;if(Y.shape&&typeof Y.shape==="object")return Y.shape}function li0($){return $?.type==="optional"}function ie($){if(!li0($))return $;return $.def?.innerType??$}var ne,dO=1024,xi0,ce=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor($=dO,Y,z){this._maxSubscriptions=$,this._serverCapabilities=Y,this._serverInfo=z}setServerCapabilities($,Y){if(this._serverCapabilities=$,Y!==void 0)this._serverInfo=Y}has($){return this._subs.has($)}serve($){if(this._serverCapabilities===void 0)throw Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:$.id,error:{code:-32603,message:"Subscription limit reached"}};let Y=ki0($);if(Y===void 0)return{jsonrpc:"2.0",id:$.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let z=yi0(Y,this._serverCapabilities);return this._subs.set($.id,z),ge({method:"notifications/subscriptions/acknowledged",params:{notifications:z}},$.id)}cancel($){return this._subs.delete($)}routeOutbound($){if(!xi0.has($.method))return"passthrough";let Y=$.params?.uri,z=typeof Y==="string"?Y:void 0,U=fi0($.method,z),Q=[];for(let[J,I]of this._subs)if(gi0(I,U))Q.push(ge({method:$.method,params:$.params??{}},J));return Q}teardownAll(){let $=[];for(let Y of this._subs.keys())$.push({jsonrpc:"2.0",id:Y,result:{resultType:"complete",_meta:{[fY]:Y,...this._serverInfo!==void 0&&{[o5]:this._serverInfo}}}});return this._subs.clear(),$}},ui0=8,bi0=600000,ci0=class{constructor($){this._host=$}async fulfill($,Y,z,U,Q){let{maxRounds:J,roundTimeoutMs:I}=this._host,K=U.mcpReq.signal,G=Q,H=0;while(!0){if(H+=1,H>J)return PS($,ze($,J));let W=G.inputRequests,X=W!=null&&Object.keys(W).length>0,Z=typeof G.requestState==="string"?G.requestState:void 0;if(!X&&Z===void 0)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let q;if(X){let w=this._host.resolvedClientCapabilities(U),O=[];for(let[M,D]of Object.entries(W)){let{embedded:P,required:j}=pe($,M,D);if(P.method!=="roots/list"&&P.params===void 0)throw new J1(c0.InternalError,`Handler for ${$} returned an input request '${M}' of kind '${P.method}' without params`);if(EO(j,w)!==void 0)return PS($,`Cannot request input '${M}' (${P.method}): the client on this 2025-era connection did not declare the required capability${w===void 0?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);O.push([M,P])}let N=Qe(K);try{let M={relatedRequestId:U.mcpReq.id,timeout:I,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:N.signal},D=await Promise.all(O.map(async([P,j])=>{try{return[P,await this._dispatchLeg(j,M)]}catch(A){throw N.abort(A),A}}));q=Object.fromEntries(D)}catch(M){if(K.aborted)throw M;return PS($,`Fulfilling input required by '${$}' failed: ${M instanceof Error?M.message:String(M)}`)}finally{N.dispose()}}else await Ue(Ye,K);let V={...U,mcpReq:{...U.mcpReq,inputResponses:q,droppedInputResponseKeys:void 0,requestState:FH(Z)}};if(Z!==void 0){let w=await this._host.verifyRequestState(Z,V,$);if(w!==void 0)V=WS(V,w)}let F=await Y(z,V);if(!t9(F))return F;G=F}}async _dispatchLeg($,Y){switch($.method){case"elicitation/create":{let z=$.params;if(z.mode==="url"&&z.elicitationId===void 0)z={...z,elicitationId:ni0()};return await this._host.sendElicitation(z,Y)}case"sampling/createMessage":return await this._host.sendSampling($.params,Y);case"roots/list":return await this._host.listRoots($.params,Y)}}},pi0,di0,de,me,le,MH=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson($){let Y=this._registeredTools[$];if(Y===void 0||!Y.enabled)return;if(Object.hasOwn(this._toolInputSchemaJson,$))return this._toolInputSchemaJson[$];if(Y.inputSchema===void 0)return ke;try{let z=v7(Y.inputSchema,"input");return this._toolInputSchemaJson[$]=z,z}catch{return}}constructor($,Y){if(this.server=new le($,Y),Y?.capabilities?.tools)this.setToolRequestHandlers();if(Y?.capabilities?.resources)this.setResourceRequestHandlers();if(Y?.capabilities?.prompts)this.setPromptRequestHandlers()}async connect($){return await this.server.connect($)}async close(){await this.server.close()}_toolHandlersInitialized=!1;setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,$])=>$.enabled).map(([$,Y])=>{let z={name:$,title:Y.title,description:Y.description,inputSchema:Y.inputSchema?v7(Y.inputSchema,"input"):ke,annotations:Y.annotations,icons:Y.icons,execution:Y.execution,_meta:Y._meta};if(Y.outputSchema)z.outputSchema=v7(Y.outputSchema,"output");return z})})),this.server.setRequestHandler("tools/call",async($,Y)=>{let z=this._registeredTools[$.params.name];if(!z)throw new J1(c0.InvalidParams,`Tool ${$.params.name} not found`);if(!z.enabled)throw new J1(c0.InvalidParams,`Tool ${$.params.name} disabled`);try{let U=await this.validateToolInput(z,$.params.arguments,$.params.name),Q=await this.executeToolHandler(z,U,Y);if(await this.validateToolOutput(z,Q,$.params.name),t9(Q))return Q;return this.server.projectCallToolResult(Q,z.outputSchemaJson)}catch(U){if(U instanceof J1&&U.code===c0.UrlElicitationRequired)throw U;return this.createToolError(U instanceof Error?U.message:String(U))}}),this._toolHandlersInitialized=!0}createToolError($){return{content:[{type:"text",text:$}],isError:!0}}async validateToolInput($,Y,z){if(!$.inputSchema)return;let U=await iY($.inputSchema,Y??{});if(!U.success)throw new J1(c0.InvalidParams,`Input validation error: Invalid arguments for tool ${z}: ${U.error}`);return U.data}async validateToolOutput($,Y,z){if(!$.outputSchema)return;if(t9(Y))return;if(Y.isError)return;if(Y.structuredContent===void 0)throw new J1(c0.InvalidParams,`Output validation error: Tool ${z} has an output schema but no structured content was provided`);let U=await iY($.outputSchema,Y.structuredContent);if(!U.success)throw new J1(c0.InvalidParams,`Output validation error: Invalid structured content for tool ${z}: ${U.error}`)}async executeToolHandler($,Y,z){return $.executor(Y,z)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async($)=>{switch($.params.ref.type){case"ref/prompt":return QS($),this.handlePromptCompletion($,$.params.ref);case"ref/resource":return JS($),this.handleResourceCompletion($,$.params.ref);default:throw new J1(c0.InvalidParams,`Invalid completion reference: ${$.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion($,Y){let z=this._registeredPrompts[Y.name];if(!z)throw new J1(c0.InvalidParams,`Prompt ${Y.name} not found`);if(!z.enabled)throw new J1(c0.InvalidParams,`Prompt ${Y.name} disabled`);if(!z.argsSchema)return wH;let U=ie(be(z.argsSchema)?.[$.params.argument.name]);if(!jS(U))return wH;let Q=Si0(U);if(!Q)return wH;return ue(await Q($.params.argument.value,$.params.context))}async handleResourceCompletion($,Y){let z=Object.values(this._registeredResourceTemplates).find((Q)=>Q.resourceTemplate.uriTemplate.toString()===Y.uri);if(!z){if(this._registeredResources[Y.uri])return wH;throw new J1(c0.InvalidParams,`Resource template ${$.params.ref.uri} not found`)}let U=z.resourceTemplate.completeCallback($.params.argument.name);if(!U)return wH;return ue(await U($.params.argument.value,$.params.context))}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async($,Y)=>{let z=Object.entries(this._registeredResources).filter(([Q,J])=>J.enabled).map(([Q,J])=>({uri:Q,name:J.name,...J.metadata})),U=[];for(let Q of Object.values(this._registeredResourceTemplates)){if(!Q.resourceTemplate.listCallback)continue;let J=await Q.resourceTemplate.listCallback(Y);for(let I of J.resources)U.push({...Q.metadata,...I})}return{resources:[...z,...U]}}),this.server.setRequestHandler("resources/templates/list",async()=>{return{resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([$,Y])=>({name:$,uriTemplate:Y.resourceTemplate.uriTemplate.toString(),...Y.metadata}))}}),this.server.setRequestHandler("resources/read",async($,Y)=>{let z;try{z=new URL($.params.uri)}catch{throw new J1(c0.InvalidParams,`Resource URI ${$.params.uri} is invalid`,{uri:$.params.uri,reason:"invalid_uri"})}let U=this._registeredResources[z.toString()];if(U){if(!U.enabled)throw new J1(c0.InvalidParams,`Resource ${z} disabled`);return CO(await U.readCallback(z,Y),U.cacheHint)}for(let Q of Object.values(this._registeredResourceTemplates)){let J=Q.resourceTemplate.uriTemplate.match(z.toString());if(J)return CO(await Q.readCallback(z,J,Y),Q.cacheHint)}throw new RO($.params.uri)}),this._resourceHandlersInitialized=!0}_promptHandlersInitialized=!1;setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,$])=>$.enabled).map(([$,Y])=>{return{name:$,title:Y.title,description:Y.description,arguments:Y.argsSchema?$e(Y.argsSchema):void 0,icons:Y.icons,_meta:Y._meta}})})),this.server.setRequestHandler("prompts/get",async($,Y)=>{let z=this._registeredPrompts[$.params.name];if(!z)throw new J1(c0.InvalidParams,`Prompt ${$.params.name} not found`);if(!z.enabled)throw new J1(c0.InvalidParams,`Prompt ${$.params.name} disabled`);return z.handler($.params.arguments,Y)}),this._promptHandlersInitialized=!0}registerResource($,Y,z,U){let Q=z.cacheHint,J=z;if(Q!==void 0){YS(Q,`resource ${$}`);let I={...z};delete I.cacheHint,J=I}if(typeof Y==="string"){if(this._registeredResources[Y])throw Error(`Resource ${Y} is already registered`);let I=this._createRegisteredResource($,z.title,Y,J,U);if(Q!==void 0)I.cacheHint=Q;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),I}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let I=this._createRegisteredResourceTemplate($,z.title,Y,J,U);if(Q!==void 0)I.cacheHint=Q;return this.setResourceRequestHandlers(),this.sendResourceListChanged(),I}}_createRegisteredResource($,Y,z,U,Q){let J={name:$,title:Y,metadata:U,readCallback:Q,enabled:!0,disable:()=>J.update({enabled:!1}),enable:()=>J.update({enabled:!0}),remove:()=>J.update({uri:null}),update:(I)=>{if(I.uri!==void 0&&I.uri!==z){if(delete this._registeredResources[z],I.uri)this._registeredResources[I.uri]=J}if(I.name!==void 0)J.name=I.name;if(I.title!==void 0)J.title=I.title;if(I.metadata!==void 0)J.metadata=I.metadata;if(I.callback!==void 0)J.readCallback=I.callback;if(I.enabled!==void 0)J.enabled=I.enabled;this.sendResourceListChanged()}};return this._registeredResources[z]=J,J}_createRegisteredResourceTemplate($,Y,z,U,Q){let J={resourceTemplate:z,title:Y,metadata:U,readCallback:Q,enabled:!0,disable:()=>J.update({enabled:!1}),enable:()=>J.update({enabled:!0}),remove:()=>J.update({name:null}),update:(K)=>{if(K.name!==void 0&&K.name!==$){if(delete this._registeredResourceTemplates[$],K.name)this._registeredResourceTemplates[K.name]=J}if(K.title!==void 0)J.title=K.title;if(K.template!==void 0)J.resourceTemplate=K.template;if(K.metadata!==void 0)J.metadata=K.metadata;if(K.callback!==void 0)J.readCallback=K.callback;if(K.enabled!==void 0)J.enabled=K.enabled;this.sendResourceListChanged()}};this._registeredResourceTemplates[$]=J;let I=z.uriTemplate.variableNames;if(Array.isArray(I)&&I.some((K)=>!!z.completeCallback(K)))this.setCompletionRequestHandler();return J}_createRegisteredPrompt($,Y,z,U,Q,J,I){let K=U,G=Q,H={title:Y,description:z,argsSchema:U,icons:J,_meta:I,handler:fe($,U,Q),enabled:!0,disable:()=>H.update({enabled:!1}),enable:()=>H.update({enabled:!0}),remove:()=>H.update({name:null}),update:(W)=>{if(W.name!==void 0&&W.name!==$){if(delete this._registeredPrompts[$],W.name)this._registeredPrompts[W.name]=H}if(W.title!==void 0)H.title=W.title;if(W.description!==void 0)H.description=W.description;if(W.icons!==void 0)H.icons=W.icons;if(W._meta!==void 0)H._meta=W._meta;let X=!1;if(W.argsSchema!==void 0)H.argsSchema=W.argsSchema,K=W.argsSchema,X=!0;if(W.callback!==void 0)G=W.callback,X=!0;if(X)H.handler=fe($,K,G);if(W.enabled!==void 0)H.enabled=W.enabled;this.sendPromptListChanged()}};if(this._registeredPrompts[$]=H,U){let W=be(U);if(W){if(Object.values(W).some((X)=>{return jS(ie(X))}))this.setCompletionRequestHandler()}}return H}_createRegisteredTool($,Y,z,U,Q,J,I,K,G,H){if(FS($),U!==void 0)try{let Z=v7(U,"input");this._toolInputSchemaJson[$]=Z;let q=IS(Z);if(!q.valid)console.warn(`[mcp-sdk] tool '${$}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${q.reason}`)}catch{}let W=H,X={title:Y,description:z,inputSchema:U,outputSchema:Q,outputSchemaJson:xe(Q),annotations:J,icons:I,execution:K,_meta:G,handler:H,executor:ye(U,H),enabled:!0,disable:()=>X.update({enabled:!1}),enable:()=>X.update({enabled:!0}),remove:()=>X.update({name:null}),update:(Z)=>{if(Z.name!==void 0&&Z.name!==$){if(typeof Z.name==="string")FS(Z.name);if(delete this._registeredTools[$],delete this._toolInputSchemaJson[$],Z.name)delete this._toolInputSchemaJson[Z.name],this._registeredTools[Z.name]=X,$=Z.name}if(Z.title!==void 0)X.title=Z.title;if(Z.description!==void 0)X.description=Z.description;let q=!1;if(Z.paramsSchema!==void 0)X.inputSchema=Z.paramsSchema,delete this._toolInputSchemaJson[$],q=!0;if(Z.callback!==void 0)X.handler=Z.callback,W=Z.callback,q=!0;if(q)X.executor=ye(X.inputSchema,W);if(Z.outputSchema!==void 0)X.outputSchema=Z.outputSchema,X.outputSchemaJson=xe(Z.outputSchema);if(Z.annotations!==void 0)X.annotations=Z.annotations;if(Z.icons!==void 0)X.icons=Z.icons;if(Z._meta!==void 0)X._meta=Z._meta;if(Z.enabled!==void 0)X.enabled=Z.enabled;this.sendToolListChanged()}};return this._registeredTools[$]=X,this.setToolRequestHandlers(),this.sendToolListChanged(),X}registerTool($,Y,z){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let{title:U,description:Q,inputSchema:J,outputSchema:I,annotations:K,icons:G,_meta:H}=Y;return this._createRegisteredTool($,U,Q,kO(J),kO(I),K,G,void 0,H,z)}registerPrompt($,Y,z){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let{title:U,description:Q,argsSchema:J,icons:I,_meta:K}=Y,G=this._createRegisteredPrompt($,U,Q,kO(J),z,I,K);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),G}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage($,Y){return this.server.sendLoggingMessage($,Y)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}},ke,wH;var CS=m(()=>{xO();pO();ne=Symbol.for("mcp.completable");xi0=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]);pi0=new Set(["tools/call","prompts/get","resources/read"]);le=class extends ZS{_clientCapabilities;_clientVersion;static{di0=($,Y)=>{if(Y.clientCapabilities!==void 0)$._clientCapabilities=Y.clientCapabilities;if(Y.clientInfo!==void 0)$._clientVersion=Y.clientInfo},de=($,Y)=>{let z=Y.filter((U)=>!$._supportedProtocolVersions.includes(U));if(z.length>0)$._supportedProtocolVersions=[...$._supportedProtocolVersions,...z];$.setRequestHandler("server/discover",()=>$._ondiscover())},me=($)=>$._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new ci0({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:($)=>this._inputRequestCapabilityView($),verifyRequestState:($,Y,z)=>this._verifyRequestState($,Y,z),sendElicitation:($,Y)=>this._sendElicitationLeg($,Y,{validateAcceptedContent:!1}),sendSampling:($,Y)=>this.createMessage($,Y),listRoots:($,Y)=>this.listRoots($,Y)})}oninitialized;constructor($,Y){super(Y);if(this._serverInfo=$,this._capabilities=Y?.capabilities?{...Y.capabilities}:{},this._instructions=Y?.instructions,this._jsonSchemaValidator=Y?.jsonSchemaValidator??new cO,this._requestStateVerify=Y?.requestState?.verify,this._inputRequiredServing=ii0(Y?.inputRequired),Y?.cacheHints!==void 0){for(let[z,U]of Object.entries(Y.cacheHints))if(U!==void 0)YS(U,`cacheHints['${z}']`);this._cacheHints=Y.cacheHints}if(this.setRequestHandler("initialize",(z)=>this._oninitialize(z)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),rh(this._supportedProtocolVersions).length>0)this.setRequestHandler("server/discover",()=>this._ondiscover());if(this._capabilities.logging)this._registerLoggingHandler()}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async($,Y)=>{let z=Y.sessionId||Y.http?.req?.headers.get("mcp-session-id")||void 0,{level:U}=$.params,Q=yO(T7,U);if(Q.success)this._loggingLevels.set(z,Q.data);return{}})}buildContext($,Y){let z=$.http||Y?.request||Y?.closeSSEStream||Y?.closeStandaloneSSEStream;return{...$,mcpReq:{...$.mcpReq,log:(U,Q,J)=>{if(!this._capabilities.logging)return Promise.resolve();let I;if(this._servedModernEra()){if(I=$.mcpReq.envelope?.[N7],I===void 0)return Promise.resolve()}else I=this._loggingLevels.get($.sessionId)??this._loggingLevels.get(void 0);if(I!==void 0&&this.LOG_LEVEL_SEVERITY.get(U)this.elicitInput(U,Q),requestSampling:(U,Q)=>this.createMessage(U,Q)},http:z?{...$.http,req:Y?.request,closeSSE:Y?.closeSSEStream,closeStandaloneSSE:Y?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(T7.options.map(($,Y)=>[$,Y]));isMessageIgnored=($,Y)=>{let z=this._loggingLevels.get(Y);return z?this.LOG_LEVEL_SEVERITY.get($){let I=await Y(Q,J);if(t9(I))throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return I};return async(Q,J)=>{let I=U?await this._invokeInputRequiredCapableHandler($,Y,Q,J):await Y(Q,J);if(t9(I)){if(!U)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return I}return z===void 0?I:CO(I,z)}}return async(z,U)=>{let Q=C7(this._negotiatedProtocolVersion),J=Q.validateRequest("tools/call",z);if(!J.ok)throw new J1(J.reason==="not-in-era"?c0.InternalError:c0.InvalidParams,J.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${J.message}`);let I=await this._invokeInputRequiredCapableHandler("tools/call",Y,z,U);if(t9(I))return I;let K=sh(I),G=Q.validateResult("tools/call",K);if(!G.ok)throw new J1(G.reason==="not-in-era"?c0.InternalError:c0.InvalidParams,G.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${G.message}`);return G.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&xQ(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler($,Y,z,U){let Q=this._servedModernEra(),J=U.mcpReq.requestState();if(J!==void 0&&typeof J!=="string")throw new J1(c0.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let I=U;if(typeof J==="string"){let X=await this._verifyRequestState(J,U,$);if(X!==void 0)I=WS(U,X)}let K;try{K=await Y(z,I)}catch(X){if(X instanceof J1&&X.code===c0.UrlElicitationRequired){if(!Q)throw X;throw new J1(c0.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw X}if(!t9(K))return K;if(!Q){if(!this._inputRequiredServing.legacyShim)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??xY}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill($,Y,z,I,K)}let G=K.inputRequests,H=G!=null&&Object.keys(G).length>0,W=typeof K.requestState==="string";if(!H&&!W)throw new J1(c0.InternalError,`Handler for ${$} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(H){let X=this._inputRequestCapabilityView(U);for(let[Z,q]of Object.entries(G)){let{embedded:V,required:F}=pe($,Z,q),w=EO(F,X);if(w!==void 0)throw new _O({requiredCapabilities:w},`Cannot request input '${Z}' (${V.method}): the request's client capabilities do not declare the required capability`)}}return K}async _verifyRequestState($,Y,z){if(this._requestStateVerify===void 0)return;try{return await this._requestStateVerify($,Y)}catch(U){throw this.onerror?.(Error(`requestState verification rejected ${z}: ${U instanceof Error?U.message:String(U)}`)),new J1(c0.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView($){return this._servedModernEra()?$.mcpReq.envelope?.[s9]:this._clientCapabilities}_assertPushApiInServedEra($){if(this._servedModernEra())throw new L1(B1.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${$}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:$,era:"2026-07-28"})}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new L1(B1.CapabilityNotSupported,`Client does not support sampling (required for ${$})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new L1(B1.CapabilityNotSupported,`Client does not support elicitation (required for ${$})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new L1(B1.CapabilityNotSupported,`Client does not support listing roots (required for ${$})`);break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/message":if(!this._capabilities.logging)throw new L1(B1.CapabilityNotSupported,`Server does not support logging (required for ${$})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new L1(B1.CapabilityNotSupported,`Server does not support notifying about resources (required for ${$})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new L1(B1.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${$})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new L1(B1.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${$})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new L1(B1.CapabilityNotSupported,`Client does not support URL elicitation (required for ${$})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){switch($){case"completion/complete":if(!this._capabilities.completions)throw new L1(B1.CapabilityNotSupported,`Server does not support completions (required for ${$})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new L1(B1.CapabilityNotSupported,`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new L1(B1.CapabilityNotSupported,`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new L1(B1.CapabilityNotSupported,`Server does not support resources (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new L1(B1.CapabilityNotSupported,`Server does not support tools (required for ${$})`);break;case"ping":case"initialize":break}}async _oninitialize($){let Y=$.params.protocolVersion;this._clientCapabilities=$.params.capabilities,this._clientVersion=$.params.clientInfo;let z=xt(this._supportedProtocolVersions),U=z.includes(Y)?Y:z[0]??xY;return this._negotiatedProtocolVersion=U,this.transport?.setProtocolVersion?.(U),{protocolVersion:U,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:rh(this._supportedProtocolVersions),capabilities:mi0(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult($,Y){return this._wireCodec().projectCallToolResult($,Y)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage($,Y){if(this._assertPushApiInServedEra("sampling/createMessage"),($.tools||$.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new L1(B1.CapabilityNotSupported,"Client does not support sampling tools capability.");if($.messages.length>0){let J=$.messages.at(-1),I=Array.isArray(J.content)?J.content:[J.content],K=I.some((X)=>X.type==="tool_result"),G=$.messages.length>1?$.messages.at(-2):void 0,H=G?Array.isArray(G.content)?G.content:[G.content]:[],W=H.some((X)=>X.type==="tool_use");if(K){if(I.some((X)=>X.type!=="tool_result"))throw new J1(c0.InvalidParams,"The last message must contain only tool_result content if any is present");if(!W)throw new J1(c0.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(W){let X=new Set(H.filter((q)=>q.type==="tool_use").map((q)=>q.id)),Z=new Set(I.filter((q)=>q.type==="tool_result").map((q)=>q.toolUseId));if(X.size!==Z.size||![...X].every((q)=>Z.has(q)))throw new J1(c0.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let z=Boolean($.tools||$.toolChoice),U=await this.request({method:"sampling/createMessage",params:$},Y),Q=this._wireCodec().samplingResultVariant(z,U);if(!Q.ok)throw new L1(B1.InvalidResult,`Invalid sampling/createMessage result: ${Q.reason==="invalid"?Q.message:Q.reason}`);return Q.value}async elicitInput($,Y){switch(this._assertPushApiInServedEra("elicitation/create"),$.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new L1(B1.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new L1(B1.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg($,Y)}async _sendElicitationLeg($,Y,z){let U=$.mode??"form",Q=z?.validateAcceptedContent??!0;switch(U){case"url":{let J=$;return this.request({method:"elicitation/create",params:J},Y)}case"form":{let J=$.mode==="form"?$:{...$,mode:"form"},I=await this.request({method:"elicitation/create",params:J},Y);if(Q&&I.action==="accept"&&I.content&&J.requestedSchema)try{let K=this._jsonSchemaValidator.getValidator(J.requestedSchema)(I.content);if(!K.valid)throw new J1(c0.InvalidParams,`Elicitation response content does not match requested schema: ${K.errorMessage}`)}catch(K){if(K instanceof J1)throw K;throw new J1(c0.InternalError,`Error validating elicitation response: ${K instanceof Error?K.message:String(K)}`)}return I}}}createElicitationCompletionNotifier($,Y){if(!this._clientCapabilities?.elicitation?.url)throw new L1(B1.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:$}},Y)}async listRoots($,Y){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:$},Y)}async sendLoggingMessage($,Y){if(this._capabilities.logging&&!this.isMessageIgnored($.level,Y))return this.notification({method:"notifications/message",params:$})}async sendResourceUpdated($){return this.notification({method:"notifications/resources/updated",params:$})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};ke={type:"object",properties:{}};wH={completion:{values:[],hasMore:!1}}});var oe=m(()=>{CS();xO();pO()});function si0($){let Y=$.params;if($.method==="initialize"&&!KS(Y)){let J=Y!==null&&typeof Y==="object"&&typeof Y.protocolVersion==="string"?Y.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...J!==void 0&&{requestedVersion:J}}}if(!vO(Y))return{kind:"legacy",reason:"no-claim"};let z=cY(Y),U=(z===void 0?[]:SO(z))[0];if(U!==void 0)return{kind:"invalid-envelope",issue:U};let Q=hO(Y);if(Q===void 0||!R7.includes(Q))return{kind:"unsupported-revision",requested:Q??"unknown"};return{kind:"modern",revision:Q,classification:{era:"modern",revision:Q}}}function se($,Y={}){let z=Y.legacy??"serve",U=Y.transport??new oi0,Q={phase:"opening"},J,I=!1,K=()=>I||Q.phase==="closed",G=(T)=>{try{Y.onerror?.(T)}catch{}},H=(T,C,b,k)=>U.send({jsonrpc:"2.0",id:T,error:{code:C,message:b,...k!==void 0&&{data:k}}}).catch((S)=>G(I5(S))),W=new ce(Y.maxSubscriptions??dO),X=(T)=>{if(!_7(T))return;let C=W.routeOutbound(T);if(C==="passthrough")return;for(let b of C)U.send({jsonrpc:"2.0",...b}).catch((k)=>G(I5(k)));return"handled"},Z=async(T)=>{if(B$(T)&&T.method==="subscriptions/listen"){let C=cY(T.params),b=vO(T.params)?(C===void 0?[]:SO(C))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},k=hO(T.params),S;if(b!==void 0)S={jsonrpc:"2.0",id:T.id,error:{code:-32602,message:`Invalid _meta envelope: ${b.key}: ${b.problem}`}};else if(k===void 0||!R7.includes(k)){let i=new fQ({supported:[...R7],requested:k??"unknown"});S={jsonrpc:"2.0",id:T.id,error:{code:i.code,message:i.message,data:i.data}}}else S=W.serve(T);return await U.send("error"in S?S:{jsonrpc:"2.0",method:S.method,params:S.params}).catch((i)=>G(I5(i))),!0}if(_7(T)&&T.method==="notifications/cancelled"){let C=T.params?.requestId;if(C!==void 0&&W.cancel(C))return!0}return!1},q=(T,C,b)=>{let k=GS({kind:"legacy",reason:C,...b!==void 0&&{requestedVersion:b}},R7);if(k===void 0)return Promise.resolve();return G(Error(`Rejected 2025-era request on a modern-only stdio connection (${k.cell}): ${k.message}`)),H(T.id,k.code,k.message,k.data)},V=(T)=>{if(I||T===J)return;j()},F=async(T,C)=>{let b=await $({era:T}),k=b instanceof MH?b.server:b;if(T==="modern")XS(k,C),TS(k,R7),W.setServerCapabilities(k.getCapabilities(),ES(k));let S=new ri0(U,()=>V(S),T==="modern"?X:void 0);return await b.connect(S),{product:b,channel:S}},w=(T)=>T.product.close().catch((C)=>G(I5(C))),O=async(T)=>{J=T.channel;try{if(!await T.channel.whenRequestsAnswered(re))G(Error(`Discarded the probe instance with requests still unanswered after ${re}ms; continuing with the fallback`));await T.product.close()}catch(C){G(I5(C))}finally{J=void 0}},N=async(T)=>{if(Q.phase==="closed")return;if(Q.phase==="pinned"){if(Q.era==="modern"&&B$(T)&&T.method==="initialize"&&!KS(T.params)){await q(T,"initialize",T.params!==null&&typeof T.params==="object"&&typeof T.params.protocolVersion==="string"?T.params.protocolVersion:void 0);return}if(Q.era==="modern"&&await Z(T))return;Q.instance.channel.deliver(T);return}if(!B$(T)&&!_7(T)){G(Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let C=si0(T);switch(C.kind){case"invalid-envelope":{let b=`Invalid _meta envelope for protocol revision 2026-07-28: ${C.issue.key}: ${C.issue.problem}`;if(B$(T))await H(T.id,c0.InvalidParams,b,{envelope:C.issue});else G(Error(`Discarded a notification with a malformed envelope: ${b}`));return}case"unsupported-revision":if(B$(T)){let b=new fQ({supported:[...R7],requested:C.requested});G(b),await H(T.id,b.code,b.message,b.data)}else G(Error(`Discarded a notification claiming unsupported protocol revision ${C.requested}`));return;case"modern":if(B$(T)&&T.method==="server/discover"){if(Q.phase==="probe"){Q.instance.channel.deliver(T,{classification:C.classification});return}let b=await F("modern",C.revision);if(K()){await w(b);return}Q={phase:"probe",instance:b},b.channel.deliver(T,{classification:C.classification});return}if(Q.phase==="probe"){if(_7(T)){Q.instance.channel.deliver(T,{classification:C.classification});return}Q={phase:"pinned",era:"modern",instance:Q.instance}}else{let b=await F("modern",C.revision);if(K()){await w(b);return}Q={phase:"pinned",era:"modern",instance:b}}if(await Z(T))return;Q.instance.channel.deliver(T,{classification:C.classification});return;case"legacy":{if(z==="reject"){if(B$(T))await q(T,C.reason,C.requestedVersion);return}if(Q.phase==="probe"){if(await O(Q.instance),K())return;Q={phase:"opening"}}let b=await F("legacy");if(K()){await w(b);return}Q={phase:"pinned",era:"legacy",instance:b},Q.instance.channel.deliver(T);return}}},M=[],D=!1,P=async()=>{if(D)return;D=!0;try{while(M.length>0){let T=M.shift();try{await N(T)}catch(C){if(B$(T))await H(T.id,c0.InternalError,"Internal server error");G(I5(C))}}}finally{D=!1}},j=async()=>{if(I||Q.phase==="closed")return;I=!0;let T=Q;Q={phase:"closed"};for(let C of W.teardownAll())await U.send(C).catch((b)=>G(I5(b)));if(T.phase==="probe"||T.phase==="pinned")await T.instance.product.close().catch((C)=>G(I5(C)));await U.close().catch((C)=>G(I5(C)))};U.onmessage=(T)=>{M.push(T),P()},U.onerror=(T)=>{if(G(T),Q.phase==="probe"||Q.phase==="pinned")Q.instance.channel.onerror?.(T)},U.onclose=()=>{if(I||Q.phase==="closed")return;I=!0;let T=Q;if(Q={phase:"closed"},T.phase==="probe"||T.phase==="pinned")T.instance.product.close().catch((C)=>G(I5(C)))};let A=U.start().catch((T)=>{throw G(I5(T)),T});return A.catch(()=>{}),{close:async()=>{await A.catch(()=>{}),await j()}}}function I5($){return $ instanceof Error?$:Error(String($))}var oi0=class{_readBuffer;_started=!1;_closed=!1;constructor($=BS.stdin,Y=BS.stdout,z){this._stdin=$,this._stdout=Y,this._readBuffer=new VS({maxBufferSize:z?.maxBufferSize})}onclose;onerror;onmessage;_ondata=($)=>{try{this._readBuffer.append($),this.processReadBuffer()}catch(Y){this.onerror?.(Y),this.close().catch(()=>{})}};_onerror=($)=>{this.onerror?.($)};_onstdouterror=($)=>{this.onerror?.($),this.close().catch(()=>{})};async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._closed)return;if(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdout.off("error",this._onstdouterror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send($){if(this._closed)return Promise.reject(Error("StdioServerTransport is closed"));return new Promise((Y,z)=>{let U=LS($),Q=!1,J=(K)=>{if(Q)return;Q=!0,this._stdout.off("error",J),this._stdout.off("drain",I),z(K)},I=()=>{if(Q)return;Q=!0,this._stdout.off("error",J),this._stdout.off("drain",I),Y()};if(this._stdout.once("error",J),this._stdout.write(U)){if(Q)return;Q=!0,this._stdout.off("error",J),Y()}else if(!Q)this._stdout.once("drain",I)})}},re=3000,ri0=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor($,Y,z){this._wire=$,this._onInstanceClose=Y,this._outboundIntercept=z}async start(){}async send($,Y){if(qH($)||gO($)){let{id:z}=$;if(z!==void 0)this._settle(z)}if(this._closed)return;if(this._outboundIntercept?.($)==="handled")return;return this._wire.send($,Y)}setProtocolVersion=($)=>{this._wire.setProtocolVersion?.($)};deliver($,Y){if(this._closed)return;if(B$($))this._pendingRequests.add($.id);else if(_7($)&&$.method==="notifications/cancelled"){let z=$.params?.requestId;if(z!==void 0)this._settle(z)}this.onmessage?.($,Y)}async whenRequestsAnswered($){if(this._closed||this._pendingRequests.size===0)return!0;return await new Promise((Y)=>{let z=()=>{clearTimeout(U),Y(!0)},U=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter((Q)=>Q!==z),Y(!1)},$);this._drainWaiters.push(z)})}async close(){if(this._closed)return;this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}_settle($){if(this._pendingRequests.delete($),this._pendingRequests.size===0)this._releaseDrainWaiters()}_releaseDrainWaiters(){let $=this._drainWaiters;this._drainWaiters=[];for(let Y of $)Y()}};var ae=m(()=>{CS();xO();pO()});var P$=m(()=>{vL();vL()});var e9;var NH=m(()=>{e9=class e9 extends Error{name="KyError";get isKyError(){return!0}}});var D6;var mO=m(()=>{NH();D6=class D6 extends e9{name="HTTPError";response;request;options;data;constructor($,Y,z){let U=$.status||$.status===0?$.status:"",Q=$.statusText??"",J=`${U} ${Q}`.trim(),I=J?`status code ${J}`:"an unknown error";super(`Request failed with ${I}: ${Y.method} ${Y.url}`);this.response=$,this.request=Y,this.options=z}}});var DH;var RS=m(()=>{NH();DH=class DH extends e9{name="NetworkError";request;constructor($,Y){super(`Request failed due to a network error: ${$.method} ${$.url}`,Y);this.request=$}}});var AH;var _S=m(()=>{AH=class AH extends Error{name="NonError";value;constructor($){let Y="Non-error value was thrown";try{if(typeof $==="string")Y=$;else if($&&typeof $==="object"&&"message"in $&&typeof $.message==="string")Y=$.message}catch{}super(Y);this.value=$}}});var iQ;var te=m(()=>{NH();_S();iQ=class iQ extends e9{name="ForceRetryError";customDelay;code;customRequest;constructor($){let Y=$?.cause?$.cause instanceof Error?$.cause:new AH($.cause):void 0;super($?.code?`Forced retry: ${$.code}`:"Forced retry",Y?{cause:Y}:void 0);this.customDelay=$?.delay,this.code=$?.code,this.customRequest=$?.request}}});var vS;var ee=m(()=>{vS=class vS extends Error{name="SchemaValidationError";issues;constructor($){super("Response schema validation failed");this.issues=$}}});var K5;var lO=m(()=>{NH();K5=class K5 extends e9{name="TimeoutError";request;constructor($){super(`Request timed out: ${$.method} ${$.url}`);this.request=$}}});class aO{options;constructor($){this.options=$}}var hS,$00,oO,Y00,z00,rO,ai0=()=>{return},U00,nQ=2147483647,Q00=40,sO,J00=($)=>new aO($),I00,K00;var pY=m(()=>{hS=(()=>{let $=!1,Y=!1,z=typeof globalThis.ReadableStream==="function",U=typeof globalThis.Request==="function";if(z&&U)try{Y=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type")}catch(Q){if(Q instanceof Error&&Q.message==="unsupported BodyInit type")return!1;throw Q}return $&&!Y})(),$00=typeof globalThis.AbortController==="function",oO=typeof globalThis.AbortSignal==="function"&&typeof globalThis.AbortSignal.any==="function",Y00=typeof globalThis.ReadableStream==="function",z00=typeof globalThis.FormData==="function",rO=["get","post","put","patch","head","delete"];ai0();U00={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},sO=Symbol("stop");I00={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},K00={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0}});var tO,ti0=($)=>{if(!$)return 0;if($ instanceof FormData){let Y=0;for(let[z,U]of $)Y+=Q00,Y+=tO.encode(`Content-Disposition: form-data; name="${z}"`).byteLength,Y+=typeof U==="string"?tO.encode(U).byteLength:U.size;return Y}if($ instanceof Blob)return $.size;if($ instanceof ArrayBuffer||ArrayBuffer.isView($))return $.byteLength;if(typeof $==="string")return tO.encode($).byteLength;if($ instanceof URLSearchParams)return tO.encode($.toString()).byteLength;return 0},G00=($,Y,z)=>{let U,Q=0;return $.pipeThrough(new TransformStream({transform(J,I){if(I.enqueue(J),U){Q+=U.byteLength;let K=Y===0?0:Q/Y;if(K>=1)K=1-Number.EPSILON;z?.({percent:K,totalBytes:Math.max(Y,Q),transferredBytes:Q},U)}U=J},flush(){if(U)Q+=U.byteLength,z?.({percent:1,totalBytes:Math.max(Y,Q),transferredBytes:Q},U)}}))},H00=($,Y)=>{if(!$.body)return $;let z={status:$.status,statusText:$.statusText,headers:$.headers};if($.status===204)return new Response(null,z);let U=Math.max(0,Number($.headers.get("content-length"))||0);return new Response(G00($.body,U,Y),z)},W00=($,Y,z)=>{if(!$.body)return $;let U=ti0(z??$.body);return new Request($,{duplex:"half",body:G00($.body,U,Y)})};var X00=m(()=>{pY();tO=new TextEncoder});var r5=($)=>$!==null&&typeof $==="object";function BH($,Y,z){return Object.hasOwn(Y,z)&&Y[z]===void 0?[]:kS($[z]??[],Y[z]??[])}var ei0,SS=($)=>r5($)&&$[ei0]===!0?{isReplace:!0,value:$.value}:{isReplace:!1,value:$},PH=(...$)=>{for(let Y of $)if((!r5(Y)||Array.isArray(Y))&&Y!==void 0)throw TypeError("The `options` argument must be an object");return kS({},...$)},yS=($={},Y={})=>{let z=new globalThis.Headers($),U=Y instanceof globalThis.Headers,Q=new globalThis.Headers(Y);for(let[J,I]of Q.entries())if(U&&I==="undefined"||I===void 0)z.delete(J);else z.set(J,I);return z},gS=($)=>{if(!r5($)||Array.isArray($))return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null},cQ=($)=>{if($ instanceof URLSearchParams){let Y=new URLSearchParams($),z=$[h7];if(z)Y[h7]=new Set(z);return Y}if($ instanceof globalThis.Headers)return new globalThis.Headers($);if(Array.isArray($))return[...$];if(gS($))return{...$};return $},$n0=($)=>Object.fromEntries(Object.entries($).filter((Y)=>Y[1]!==void 0)),Yn0=($,Y)=>{if(gS($)&&gS(Y))return $n0({...$,...Y});return yS($,Y)},eO=($={},Y={})=>({init:BH($,Y,"init"),beforeRequest:BH($,Y,"beforeRequest"),beforeRetry:BH($,Y,"beforeRetry"),beforeError:BH($,Y,"beforeError"),afterResponse:BH($,Y,"afterResponse")}),h7,zn0=($,Y)=>{let z=new URLSearchParams,U=new Set;for(let Q of[$,Y]){if(Q===void 0)continue;if(Q instanceof URLSearchParams){for(let[I,K]of Q.entries())z.append(I,K),U.delete(I);let J=Q[h7];if(J)for(let I of J)z.delete(I),U.add(I)}else if(Array.isArray(Q))for(let J of Q){if(!Array.isArray(J)||J.length!==2)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");z.append(String(J[0]),String(J[1])),U.delete(String(J[0]))}else if(r5(Q))for(let[J,I]of Object.entries(Q))if(I===void 0)z.delete(J),U.add(J);else z.append(J,String(I)),U.delete(J);else{let J=new URLSearchParams(Q);for(let[I,K]of J.entries())z.append(I,K),U.delete(I)}}if(U.size>0)z[h7]=U;return z},kS=(...$)=>{let Y={},z={},U={},Q,J=[];for(let I of $)if(Array.isArray(I)){if(!Array.isArray(Y))Y=[];Y=[...Y,...I]}else if(r5(I)){for(let[K,G]of Object.entries(I)){if(K==="signal"&&G instanceof globalThis.AbortSignal){J.push(G);continue}let H=SS(G),{isReplace:W}=H;if(G=H.value,K==="context"){if(G!==void 0&&G!==null&&(!r5(G)||Array.isArray(G)))throw TypeError("The `context` option must be an object");Y={...Y,context:G===void 0||G===null?{}:W?{...G}:{...Y.context,...G}};continue}if(K==="searchParams"){if(G===void 0||G===null)Q=void 0;else if(W)Q=G;else Q=Q===void 0?G:zn0(Q,G);continue}if(r5(G)&&!W&&K in Y)G=kS(Y[K],G);Y={...Y,[K]:G}}if(r5(I.hooks)){let{value:K,isReplace:G}=SS(I.hooks);U=G?eO({},K):eO(U,K),Y.hooks=U}if(r5(I.headers)){let{value:K,isReplace:G}=SS(I.headers);z=G?cQ(K):Yn0(z,K),Y.headers=z}}if(Q!==void 0)Y.searchParams=Q;if(J.length>0)if(J.length===1)Y.signal=J[0];else if(oO)Y.signal=AbortSignal.any(J);else Y.signal=J.at(-1);return Y};var $w=m(()=>{pY();ei0=Symbol("replaceOption");h7=Symbol("deletedParameters")});var q00=($)=>rO.includes($)?$.toUpperCase():$,Un0,Qn0,Jn0,Z00,V00=($={})=>{if(typeof $==="number")return{...Z00,limit:$};if($.methods&&!Array.isArray($.methods))throw Error("retry.methods must be an array");if($.statusCodes&&!Array.isArray($.statusCodes))throw Error("retry.statusCodes must be an array");let Y=Object.fromEntries(Object.entries({...$,methods:$.methods?.map((z)=>z.toLowerCase())}).filter(([,z])=>z!==void 0));return{...Z00,...Y}};var L00=m(()=>{pY();Un0=["get","put","head","delete","options","trace"],Qn0=[408,413,429,500,502,503,504],Jn0=[413,429,503],Z00={limit:2,methods:Un0,statusCodes:Qn0,afterStatusCodes:Jn0,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:($)=>0.3*2**($-1)*1000,jitter:void 0,retryOnTimeout:!1}});async function xS($,Y,z,U){return new Promise((Q,J)=>{let I=setTimeout(()=>{if(z)z.abort();J(new K5($))},U.timeout);U.fetch($,Y).then(Q).catch(J).then(()=>{clearTimeout(I)})})}var F00=m(()=>{lO()});async function Yw($,{signal:Y}){return new Promise((z,U)=>{if(Y)Y.throwIfAborted(),Y.addEventListener("abort",Q,{once:!0});function Q(){clearTimeout(J),U(Y.reason)}let J=setTimeout(()=>{Y?.removeEventListener("abort",Q),z()},$)})}var O00=($)=>{let Y={};for(let z in $){if(!Object.hasOwn($,z))continue;if(!(z in K00)&&!(z in I00))Y[z]=$[z]}return Y},w00=($)=>{if($===void 0)return!1;if(Array.isArray($))return $.length>0;if($ instanceof URLSearchParams)return $.size>0||Boolean($[h7]?.size);if(typeof $==="object")return Object.keys($).length>0;if(typeof $==="string")return $.trim().length>0;return Boolean($)};var M00=m(()=>{pY();$w()});function fS($){if(!($&&Kn0($)&&$.name==="TypeError"&&typeof $.message==="string"))return!1;let{message:z,stack:U}=$;if(z==="Load failed")return U===void 0||"__sentry_captured__"in $;if(z.startsWith("error sending request for url"))return!0;if(z==="Failed to fetch"||z.startsWith("Failed to fetch (")&&z.endsWith(")"))return!0;return Gn0.has(z)}var In0,Kn0=($)=>In0.call($)==="[object Error]",Gn0;var N00=m(()=>{In0=Object.prototype.toString,Gn0=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"])});function D00($){return uS($,D6)}function A00($){return uS($,DH)}function B00($){return uS($,K5)}var uS=($,Y)=>$ instanceof Y||$?.name===Y.name;var P00=m(()=>{mO();RS();lO()});function Vn0($){let Y={...$,json:cQ($.json),context:cQ($.context),headers:cQ($.headers),searchParams:qn0($.searchParams)};if($.retry!==void 0)Y.retry=Zn0($.retry);return Y}class pQ{static create($,Y){let z=Y.hooks?.init??[],U=z.length>0?Vn0(Y):Y;for(let K of z)K(U);let Q=new pQ($,U),J=async()=>{if(typeof Q.#$.timeout==="number"&&Q.#$.timeout>nQ)throw RangeError(`The \`timeout\` option cannot be greater than ${nQ}`);if(typeof Q.#$.totalTimeout==="number"&&Q.#$.totalTimeout>nQ)throw RangeError(`The \`totalTimeout\` option cannot be greater than ${nQ}`);await Promise.resolve();let K=await Q.#g(),G=K??await Q.#h(async()=>Q.#R()),H=K!==void 0||Q.#C();for(;;){if(G===void 0)return G;if(TH(G))try{G=await Q.#y(G)}catch(X){if(!(X instanceof iQ))throw X;let Z=await Q.#E(X,async()=>Q.#R());if(Z===void 0)return Z;G=Z,H=Q.#C();continue}let W=G;if(!W.ok&&W.type!=="opaque"&&(typeof Q.#$.throwHttpErrors==="function"?Q.#$.throwHttpErrors(W.status):Q.#$.throwHttpErrors)){let X=new D6(W,Q.#M(W),Q.#w()),Z=X;if(X.data=await Q.#L(W),H)throw Z;let q=await Q.#E(X,async()=>Q.#R());if(q===void 0)return q;G=q,H=Q.#C();continue}break}if(!TH(G))return G;if(Q.#V(G),Q.#$.onDownloadProgress){if(typeof Q.#$.onDownloadProgress!=="function")throw TypeError("The `onDownloadProgress` option must be a function");if(!Y00)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let W=G.clone();return Q.#K(G),H00(W,Q.#$.onDownloadProgress)}return G},I=(async()=>{try{return await J()}catch(K){if(!(K instanceof Error))throw K;if(Q.#X.has(K))throw K;let G=K;for(let H of Q.#$.hooks.beforeError){let W=await H({request:Q.request,options:Q.#w(),error:G,retryCount:Q.#Q});if(W instanceof Error)G=W}throw G}finally{let K=Q.#W;if(Q.#F(K?.body??void 0),Q.request!==K)Q.#F(Q.request.body??void 0)}})();for(let[K,G]of Object.entries(U00)){if(K==="bytes"&&typeof globalThis.Response?.prototype?.bytes!=="function")continue;I[K]=async(H)=>{Q.request.headers.set("accept",Q.request.headers.get("accept")||G);let W=await I;if(K!=="json")return W[K]();let X=await W.text();if(X===""){if(H!==void 0)return E00(void 0,H);return JSON.parse(X)}let Z=U.parseJson?await U.parseJson(X,{request:Q.#M(W),response:W}):JSON.parse(X);return H===void 0?Z:E00(Z,H)}}return I}static#U($){if($&&typeof $==="object"&&!Array.isArray($)&&!($ instanceof URLSearchParams))return Object.fromEntries(Object.entries($).filter(([,Y])=>Y!==void 0));return $}request;#z;#Q=0;#Y;#$;#W;#H;#X=new WeakSet;#J;#I;#Z=!1;#N=new WeakMap;constructor($,Y={}){if(this.#Y=$,Object.hasOwn(Y,"prefixUrl"))throw Error(Wn0);if(this.#$={...Y,headers:yS(this.#Y.headers,Y.headers),hooks:eO({},Y.hooks),method:q00(Y.method??this.#Y.method??"GET"),prefix:String(Y.prefix||""),retry:V00(Y.retry),throwHttpErrors:Y.throwHttpErrors??!0,timeout:Y.timeout??1e4,totalTimeout:Y.totalTimeout??!1,fetch:Y.fetch??globalThis.fetch.bind(globalThis),context:Y.context??{}},typeof this.#Y!=="string"&&!(this.#Y instanceof URL||this.#Y instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(typeof this.#Y==="string"){if(this.#$.prefix){let U=this.#$.prefix.replace(/\/+$/,""),Q=this.#Y.replace(/^\/+/,"");this.#Y=`${U}/${Q}`}if(this.#$.baseUrl){let U;try{U=new URL(this.#Y)}catch{}if(!U)this.#Y=new URL(this.#Y,new Request(this.#$.baseUrl).url)}}if($00&&oO)this.#H=this.#$.signal??this.#Y.signal,this.#z=new globalThis.AbortController,this.#$.signal=this.#O();if(hS)this.#$.duplex="half";if(this.#$.json!==void 0)this.#$.body=this.#$.stringifyJson?.(this.#$.json)??JSON.stringify(this.#$.json),this.#$.headers.set("content-type",this.#$.headers.get("content-type")??"application/json");let z=Y.headers&&new globalThis.Headers(Y.headers).has("content-type");if(this.#Y instanceof globalThis.Request&&(z00&&this.#$.body instanceof globalThis.FormData||this.#$.body instanceof URLSearchParams)&&!z)this.#$.headers.delete("content-type");if(this.request=new globalThis.Request(this.#Y,this.#$),w00(this.#$.searchParams)){let U=new URL(this.request.url),Q=this.#$.searchParams?.[h7];if(Q)for(let J of Q)U.searchParams.delete(J);if(typeof this.#$.searchParams==="string"){let J=this.#$.searchParams.replace(/^\?/,"");if(J!=="")U.search=U.search?`${U.search}&${J}`:`?${J}`}else{let J=new URLSearchParams(pQ.#U(this.#$.searchParams));for(let[I,K]of J.entries())U.searchParams.append(I,K)}if(this.#$.searchParams&&typeof this.#$.searchParams==="object"&&!Array.isArray(this.#$.searchParams)&&!(this.#$.searchParams instanceof URLSearchParams)){for(let[J,I]of Object.entries(this.#$.searchParams))if(I===void 0)U.searchParams.delete(J)}this.request=new globalThis.Request(U,this.#$)}if(this.#$.onUploadProgress&&typeof this.#$.onUploadProgress!=="function")throw TypeError("The `onUploadProgress` option must be a function");this.#I=typeof this.#$.totalTimeout==="number"?this.#S():void 0}#G(){let $=this.#$.retry.delay(this.#Q+1),Y=$;if(this.#$.retry.jitter===!0)Y=Math.random()*$;else if(typeof this.#$.retry.jitter==="function"){if(Y=this.#$.retry.jitter($),!Number.isFinite(Y)||Y<0)Y=$}return Math.min(this.#$.retry.backoffLimit,Y)}async#P($){if(this.#Q>=this.#$.retry.limit)throw $;let Y=$ instanceof Error?$:new AH($);if(Y instanceof iQ)return Y.customDelay??this.#G();if(!this.#$.retry.methods.includes(this.request.method.toLowerCase()))throw $;if(this.#$.retry.shouldRetry!==void 0){let z=await this.#$.retry.shouldRetry({error:Y,retryCount:this.#Q+1});if(z===!1)throw $;if(z===!0)return this.#G()}if(B00($)){if(!this.#$.retry.retryOnTimeout)throw $;return this.#G()}if(D00($)){if(!this.#$.retry.statusCodes.includes($.response.status))throw $;let z=$.response.headers.get("Retry-After")??$.response.headers.get("RateLimit-Reset")??$.response.headers.get("X-RateLimit-Retry-After")??$.response.headers.get("X-RateLimit-Reset")??$.response.headers.get("X-Rate-Limit-Reset");if(z&&this.#$.retry.afterStatusCodes.includes($.response.status)){let U=Number(z)*1000;if(Number.isNaN(U))U=Date.parse(z)-Date.now();else if(U>=Date.parse("2024-01-01"))U-=Date.now();if(!Number.isFinite(U))return Math.min(this.#$.retry.maxRetryAfter,this.#G());return U=Math.max(0,U),Math.min(this.#$.retry.maxRetryAfter,U)}if($.response.status===413)throw $;return this.#G()}if(!A00($))throw $;return this.#G()}#V($){let Y=this.#M($);if(this.#$.parseJson)$.json=async()=>{let z=await $.text();if(z==="")return JSON.parse(z);return this.#$.parseJson(z,{request:Y,response:$})};return $}async#L($){let Y=await this.#j($,this.#D());if(Y===jH){this.#q();return}if(!Y)return;if(!this.#A($.headers.get("content-type")??""))return Y;let z=await this.#T(Y,$,this.#D(),this.#M($));if(z===jH){this.#q();return}return z}#D(){let $=this.#$.timeout===!1?1e4:this.#$.timeout,Y=this.#B();if(Y===void 0)return $;if(Y<=0)throw new K5(this.request);return Math.min($,Y)}#A($){let Y=($.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(Y)}async#j($,Y){let{body:z}=$;if(!z)try{return await $.text()}catch{return}let U;try{U=z.getReader()}catch{return}let Q=Xn0($.headers.get("content-type")??""),J=[],I=0,K=(async()=>{try{for(;;){let{done:W,value:X}=await U.read();if(W)break;if(I+=X.byteLength,I>Hn0){U.cancel().catch(()=>{return});return}J.push(Q.decode(X,{stream:!0}))}}catch{return}return J.push(Q.decode()),J.join("")})(),G=new Promise((W)=>{let X=setTimeout(()=>{W(jH)},Y);K.finally(()=>{clearTimeout(X)})}),H=await Promise.race([K,G]);if(H===jH)U.cancel().catch(()=>{return});return H}async#T($,Y,z,U){let Q;try{return await Promise.race([Promise.resolve().then(()=>this.#$.parseJson?this.#$.parseJson($,{request:U,response:Y}):JSON.parse($)),new Promise((J)=>{Q=setTimeout(()=>{J(jH)},z)})])}catch{return}finally{clearTimeout(Q)}}#F($){if(!$)return;$.cancel().catch(()=>{return})}#K($){this.#F($.body??void 0)}#O(){return this.#H?AbortSignal.any([this.#H,this.#z.signal]):this.#z.signal}#q(){let $=this.#B();if($!==void 0&&$<=0)throw new K5(this.request)}async#g(){for(let $ of this.#$.hooks.beforeRequest){let Y=await $({request:this.request,options:this.#w(),retryCount:0});if(T00(Y))this.#_(Y);else if(TH(Y))return Y}return}async#y($){let Y=this.#M($);for(let z of this.#$.hooks.afterResponse){let U=this.#v($.clone(),Y);this.#V(U);let Q;try{Q=await z({request:this.request,options:this.#w(),response:U,retryCount:this.#Q})}catch(I){if(U!==$)this.#K(U);throw this.#K($),I}if(Q instanceof aO){if(U!==$)this.#K(U);throw this.#K($),new iQ(Q.options)}let J=TH(Q)?this.#v(Q,Y):$;if(U!==$&&U!==J&&U.body!==J.body)this.#K(U);if($!==J&&$.body!==J.body)this.#K($);$=J}return $}async#h($){try{return await $()}catch(Y){return this.#E(Y,$)}}async#E($,Y){this.#Z=!1;let z=Math.min(await this.#P($),nQ),U={signal:this.#H},Q=this.#B();if(Q!==void 0){if(Q<=0)throw new K5(this.request);if(z>=Q)throw await Yw(Q,U),new K5(this.request)}if(await Yw(z,U),this.#q(),$ instanceof iQ&&$.customRequest){let J=new globalThis.Request($.customRequest,this.#$.signal?{signal:this.#$.signal}:void 0);this.#_(J)}for(let J of this.#$.hooks.beforeRetry){let I;try{I=await J({request:this.request,options:this.#w(),error:$,retryCount:this.#Q+1})}catch(K){if(K instanceof Error&&K!==$)this.#X.add(K);throw K}if(T00(I)){this.#_(I);break}if(TH(I))return this.#Z=!0,this.#Q++,I;if(I===sO)return}return this.#q(),this.#Q++,this.#h(Y)}#C(){let $=this.#Z;return this.#Z=!1,$}async#R(){if(this.#z?.signal.aborted)this.#z=new globalThis.AbortController,this.#$.signal=this.#O(),this.request=new globalThis.Request(this.request,{signal:this.#$.signal});let $=O00(this.#$),Y=this.#$.retry.limit>0?this.request.clone():void 0,z=this.#k(this.request,this.#$.body??void 0);if(this.#W=z,Y)this.request=Y;try{let U=this.#B();if(U!==void 0&&U<=0)throw new K5(this.request);let Q=this.#$.timeout===!1?U:U===void 0?this.#$.timeout:Math.min(this.#$.timeout,U),J=Q===void 0?await this.#$.fetch(z,$):await xS(z,$,this.#z,{timeout:Q,fetch:this.#$.fetch});return this.#v(J,z)}catch(U){if(fS(U))throw new DH(this.request,{cause:U});throw U}}#B(){if(this.#I===void 0)return;let $=this.#S()-this.#I;return Math.max(0,this.#$.totalTimeout-$)}#S(){return globalThis.performance?.now()??Date.now()}#w(){if(!this.#J){let{hooks:$,json:Y,parseJson:z,stringifyJson:U,searchParams:Q,timeout:J,totalTimeout:I,throwHttpErrors:K,fetch:G,...H}=this.#$;this.#J=Object.freeze(H)}return this.#J}#_($){this.#J=void 0,this.request=$}#M($){return this.#N.get($)??this.request}#v($,Y){return this.#N.set($,Y),$}#k($,Y){if(!this.#$.onUploadProgress||!$.body||!hS)return $;return W00($,this.#$.onUploadProgress,Y??this.#$.body??void 0)}}var Hn0=10485760,Wn0="The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl",jH,Xn0=($)=>{let Y=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec($),z=Y?.[1]??Y?.[2];if(z)try{return new TextDecoder(z)}catch{}return new TextDecoder},j00="The `schema` argument must follow the Standard Schema specification",Zn0=($)=>{if(typeof $!=="object")return $;return{...$,...$.methods&&{methods:[...$.methods]},...$.statusCodes&&{statusCodes:[...$.statusCodes]},...$.afterStatusCodes&&{afterStatusCodes:[...$.afterStatusCodes]}}},C00,T00=($)=>$ instanceof globalThis.Request||C00.call($)==="[object Request]",TH=($)=>$ instanceof globalThis.Response||C00.call($)==="[object Response]",qn0=($)=>{if(Array.isArray($))return $.map((Y)=>[...Y]);return cQ($)},E00=async($,Y)=>{if(typeof Y!=="object"&&typeof Y!=="function"||Y===null)throw TypeError(j00);let z=Y["~standard"];if(typeof z!=="object"||z===null||typeof z.validate!=="function")throw TypeError(j00);let U=await z.validate($);if(U.issues)throw new vS(U.issues);return U.value};var R00=m(()=>{mO();RS();_S();te();ee();lO();X00();$w();L00();F00();M00();N00();P00();pY();jH=Symbol("timedOutResponseData"),C00=Object.prototype.toString});var bS=($)=>{let Y=(z,U)=>pQ.create(z,PH($,U));for(let z of rO)Y[z]=(U,Q)=>pQ.create(U,PH($,Q,{method:z}));return Y.create=(z)=>bS(PH(z)),Y.extend=(z)=>{if(typeof z==="function")z=z($??{});return bS(PH($,z))},Y.stop=sO,Y.retry=J00,Y},Ln0,G5;var dQ=m(()=>{R00();pY();$w();mO();/*! MIT License © Sindre Sorhus */Ln0=bS(),G5=Ln0});async function _00($){if($.source.type!=="direct"&&$.source.type!=="seal")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=$.seal.url??$.source.sealUrl,z=$.source.type==="seal"?$.source:void 0;return{token:$.source.token,expiresAt:Date.now()+$.source.expiresIn*1000,enterprise:{provider:z?"seal":"direct",corpId:$.source.corpId??$.id,staffId:$.source.staffId,sealUrl:Y,tenantId:z?.tenantId,tenantSlug:$.seal.tenantSlug??z?.tenantSlug,tenantName:z?.tenantName,raw:{sourceType:$.source.type}}}}function Fn0($){let Y=Object.entries($??{}).map(([z,U])=>`${z}=${U}`);return Y.length?Y.join("; "):void 0}function A6($){let Y={...$?.headers??{}},z=Fn0($?.cookies);if(z)Y.Cookie=z;return Y}var v00,On0,wn0,Mn0,Nn0,h00;var S00=m(()=>{P$();v00=L.object({token:L.string(),expiresAt:L.number(),url:L.string().url().optional()}),On0=L.object({provider:L.string(),corpId:L.string().optional(),staffId:L.string(),sealUrl:L.string().url(),tenantId:L.string().optional(),tenantSlug:L.string().optional(),tenantName:L.string().optional(),raw:L.unknown().optional()}),wn0=L.object({token:L.string(),expiresAt:L.number(),enterprise:On0}),Mn0=L.object({openapi:v00.optional(),closeapi:v00.optional()}),Nn0=L.object({seal:wn0.optional(),hose:Mn0.optional()}),h00=L.record(L.string(),Nn0)});import{existsSync as iS,mkdirSync as Dn0,readFileSync as An0,writeFileSync as Bn0}from"node:fs";import{dirname as Pn0,join as y00}from"node:path";import{homedir as k00}from"node:os";function jn0(){let $=(process.env.SEAL_USE_TOKEN_STORE??process.env.SEAL_HOME_TOKEN_STORE)?.trim();if($)return $;if(iS(zw))return zw;if(iS(g00))return g00;return zw}function Tn0(){let $=(process.env.SEAL_USE_TOKEN_STORE??process.env.SEAL_HOME_TOKEN_STORE)?.trim();if($)return $;return zw}function mQ(){let $=jn0();if(!iS($))return{};try{return h00.parse(JSON.parse(An0($,"utf-8")))}catch{return{}}}function Uw($){let Y=Tn0();Dn0(Pn0(Y),{recursive:!0,mode:448}),Bn0(Y,JSON.stringify($,null,2),{mode:384})}function x00($){return mQ()[$]?.seal}function f00($,Y){let z=mQ();Uw({...z,[$]:{...z[$],seal:Y}})}function u00($){let Y=mQ(),z=Y[$];if(!z)return;Uw({...Y,[$]:{...z,seal:void 0}})}function EH($){return mQ()[$]?.hose??{}}function nS($,Y){let z=mQ();Uw({...z,[$]:{...z[$],hose:Y}})}function Qw($){let Y=mQ();delete Y[$],Uw(Y)}var zw,g00;var CH=m(()=>{S00();zw=y00(k00(),".config","seal-use","seal_tokens.json"),g00=y00(k00(),".config","seal-home","seal_tokens.json")});function j$($){return $.replace(/\/+$/,"")}function n00($){let Y;try{Y=new URL($.trim())}catch{throw Error("Invalid Hose assistance link: expected a valid HTTPS URL")}if(Y.protocol!=="https:"||Y.port||!_n0(Y.hostname)||Y.pathname.replace(/\/+$/,"")!==Rn0)throw Error("Invalid Hose assistance link: expected an HTTPS */web/thirdparty.html URL from ekuaibao.com or hosecloud.com");let z=Y.searchParams.getAll("accessToken").filter(Boolean),U=Y.searchParams.getAll("ekbCorpId").filter(Boolean);if(z.length!==1||U.length!==1)throw Error("Invalid Hose assistance link: accessToken and ekbCorpId are required exactly once");let Q=U[0].trim().toLowerCase();if(!i00.test(Q))throw Error("Invalid Hose assistance link: ekbCorpId is not a valid tenant slug");return{corpId:Q,accessToken:z[0],baseUrl:Y.origin}}async function Jw($,Y){let z=typeof $==="string"?n00($):c00($),U=`https://${z.corpId}.sealai.cc`,J=await y6(U,void 0,Y?.customHeaders).get("api/auth/oauth2/session/oem-hosecloud",{searchParams:{token:z.accessToken,returnToken:"1"}}).json(),I=J.token??J.accessToken??J.data?.token??J.data?.accessToken;if(!I)throw Error("Seal SSO did not return a bearer token");let K=J.expiresIn??J.expires_in??J.data?.expiresIn??J.data?.expires_in??3600;return{corpId:z.corpId,sealUrl:U,token:I,expiresIn:Number.isFinite(K)&&K>0?K:3600}}function Iw($,Y){let z=Y.hoseCorpConfig&&typeof Y.hoseCorpConfig==="object"?Y.hoseCorpConfig:void 0,U=[Y.tenantSlug,z?.corporationId].filter((I)=>typeof I==="string"&&Boolean(I)),Q=$.trim().toLowerCase(),J=U.map((I)=>I.trim().toLowerCase()).filter(Boolean);if(J.length===0||J.some((I)=>I!==Q))throw Error("Hose assistance link tenant mismatch: the Seal tenant does not match ekbCorpId")}function _n0($){let Y=$.toLowerCase();return Cn0.some((z)=>Y.endsWith(z))}function c00($){let Y=typeof $?.corpId==="string"?$.corpId.trim().toLowerCase():"",z=typeof $?.accessToken==="string"?$.accessToken.trim():"",U=typeof $?.baseUrl==="string"&&$.baseUrl.trim()?$.baseUrl.trim():void 0;if(!i00.test(Y)||!z)throw Error("Invalid Hose assistance link: accessToken and ekbCorpId are required");return{corpId:Y,accessToken:z,...U?{baseUrl:U}:{}}}function p00($,Y=60){return Boolean($&&Date.now()<$.expiresAt-Y*1000)}function S7($,Y){if($.seal.url)return $.seal.url;if(Y.sealUrl)return Y.sealUrl;return`https://${Y.corpId.toLowerCase()}.sealai.cc`}function vn0($){return $.staffId.includes(":")?$.staffId:`${$.corpId}:${$.staffId}`}function d00($){return G5.create({prefix:j$($.domain),timeout:30000,hooks:{beforeError:[async({error:Y})=>{let z=Y instanceof D6?await Y.response.text().catch(()=>""):"";return Y.message=`${Y.message}${z?`: ${z}`:""}`,Y}]}})}async function hn0($){let Y=d00($),z=$.appKey??$.key,U=$.appSecurity??$.password;if(!z||!U)throw Error("Hose source requires appKey/key and appSecurity/password");let Q=await Y.post("api/openapi/v1/auth/getAccessToken",{json:{appKey:z,appSecurity:U}}).json(),J=Q.value?.accessToken??Q.accessToken??Q.token;if(!J)throw Error("Hose login did not return an access token");return{token:J,expiresAt:Date.now()+3600000}}async function lQ($){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=EH($.id);if(p00(Y.openapi))return Y.openapi.token;let z=cS.get($.id);if(z)return z;let U=hn0($.source).then((Q)=>{return nS($.id,{...EH($.id),openapi:Q}),Q.token}).finally(()=>cS.delete($.id));return cS.set($.id,U),U}async function Kw($,Y,z=7200){let U=d00($),Q=vn0($),I=(await U.post("api/openapi/v1.1/provisional/getProvisionalAuth",{searchParams:{accessToken:Y},json:{uid:Q,pageType:"home",expireDate:z}}).json()).value?.message;if(!I)throw Error("Hose CloseAPI did not return a provisional auth URL");let K=new URL(I).searchParams.get("accessToken");if(!K)throw Error("Hose provisional auth URL did not include accessToken");return{token:K,url:I,expiresAt:Date.now()+z*1000}}async function Gw($){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=$.source,z=EH($.id);if(p00(z.closeapi)&&z.closeapi.url)return z.closeapi;let U=pS.get($.id);if(U)return U;let Q=lQ($).then((J)=>Kw(Y,J)).then((J)=>{return nS($.id,{...EH($.id),closeapi:J}),J}).finally(()=>pS.delete($.id));return pS.set($.id,Q),Q}async function m00($,Y=7200,z){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);if(!Number.isFinite(Y)||Y<=0)throw Error(`Invalid expire seconds: ${Y}. Must be a positive integer.`);let U=await lQ($),Q=await Kw($.source,U,Y);if(!Q.url)throw Error("Hose provisional auth URL was not available");return{corpId:$.source.corpId,staffId:$.source.staffId,url:Q.url,token:Q.token,expiresIn:Y}}async function l00($){if($.source.type!=="hose")throw Error(`Unsupported Seal source: ${$.source.type}`);let Y=await Gw($),z=S7($,$.source),U=A6($.seal),J=await y6(z,void 0,U).get("api/auth/oauth2/session/oem-hosecloud",{searchParams:{token:Y.token,returnToken:"1"}}).json(),I=J.token??J.accessToken??J.data?.token??J.data?.accessToken;if(!I)throw Error("Seal SSO did not return a bearer token");let K=J.expiresIn??J.expires_in??J.data?.expiresIn??J.data?.expires_in??3600,G={provider:"hose",corpId:$.source.corpId,staffId:$.source.staffId,sealUrl:j$(z),tenantSlug:$.seal.tenantSlug,raw:{sourceType:"hose",hoseDomain:j$($.source.domain)}};return{token:I,expiresAt:Date.now()+K*1000,enterprise:G}}async function oQ($,Y,z){if(z){let I=j$(z),K=await b00(I,$,Y);if(!K)throw Error(`Failed to authenticate on specified domain: ${I}. Please verify appKey/appSecurity and domain connectivity.`);return K}let U=En0.map(async(I)=>{try{return await b00(I,$,Y)}catch{return}}),J=(await Promise.all(U)).filter((I)=>Boolean(I));if(J.length>0&&J[0])return J[0];throw Error("Failed to authenticate with appKey/appSecurity on all 6 standard Hose domains (app.ekuaibao.com, dd2.hosecloud.com, wx2.ekuaibao.com, kdcloud2.ekuaibao.com, ddenterprise.ekuaibao.com, feishu.ekuaibao.com). "+'If your enterprise uses a private cloud or custom domain (such as 美年大健康), please specify the "domain" parameter explicitly.')}async function b00($,Y,z){try{let U=await fetch(`${$}/api/openapi/v1/auth/getAccessToken`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({appKey:Y,appSecurity:z}),signal:AbortSignal.timeout(8000)});if(!U.ok)return;let Q=await U.json();if(Q.value?.errorCode)return;let J=Q.value?.accessToken??Q.accessToken,I=Q.value?.corporationId??Q.value?.corporation?.id;if(!J||!I)return;return{domain:$,corpId:I,corpName:Q.value?.corporation?.name,openapiToken:J,expireTime:Q.value?.expireTime}}catch{return}}async function Hw($,Y){let z=`${j$($)}/api/openapi/v1/roleDefGroups?accessToken=${encodeURIComponent(Y)}`,U=await fetch(z,{headers:{"content-type":"application/json",Accept:"application/json"},signal:AbortSignal.timeout(1e4)});if(!U.ok){let I=await U.text().catch(()=>"");throw Error(`Failed to fetch Hose role definition groups: ${U.status} ${I}`)}return((await U.json()).items??[]).map((I)=>({id:I.id,name:I.name,enName:I.enName,roleDefs:(I.roleDefs??[]).map((K)=>({id:K.id,name:K.name,enName:K.enName,sourceType:K.sourceType,sourceTypeValue:K.sourceTypeValue,groupId:I.id,groupName:I.name}))}))}async function dS($,Y,z,U="id"){let Q=z.startsWith("$")?z.slice(1):z,J=`${j$($)}/api/openapi/v1/roledefs/$${Q}?accessToken=${encodeURIComponent(Y)}&staffBy=${encodeURIComponent(U)}&pathType=name`,I=await fetch(J,{headers:{"content-type":"application/json",Accept:"application/json"},signal:AbortSignal.timeout(1e4)});if(!I.ok){let W=await I.text().catch(()=>"");throw Error(`Failed to fetch Hose role staffs for ${Q}: ${I.status} ${W}`)}let G=(await I.json()).value;if(!G)throw Error(`Hose role staff query returned empty result for ${Q}`);let H=[];for(let W of G.contents??[])for(let X of W.staffs??[])if(X&&!H.includes(X))H.push(X);return{id:G.id??Q,name:G.name??"",count:G.count??H.length,staffs:H}}async function mS($,Y,z){if(z.length===0)return[];let U=`${j$($)}/api/openapi/v1/staffs/getStaffIds?accessToken=${encodeURIComponent(Y)}`,Q=await fetch(U,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({type:"STAFFID",conditionIds:z.slice(0,100)}),signal:AbortSignal.timeout(1e4)});if(!Q.ok){let I=await Q.text().catch(()=>"");throw Error(`Failed to fetch Hose staff details: ${Q.status} ${I}`)}return(await Q.json()).items??[]}function Ww($){if(!$)return"-";if($.length<=12)return"******";return`${$.slice(0,8)}...${$.slice(-4)}`}async function Sn0($){let Y=typeof $==="string"?n00($):c00($),z=Y.baseUrl||"https://app.ekuaibao.com",U,Q,J,I,K,G={accesstoken:Y.accessToken,corpid:Y.corpId};try{let H=await G5.get(`${z}/api/engine/realm/$UNITY/actions/jwt`,{searchParams:{corpId:Y.corpId},headers:G,timeout:1e4}).json(),W=H.id||H.value;if(W){let X=W.split(".");if(X.length>=2){let Z=X[1].replace(/-/g,"+").replace(/_/g,"/"),q=JSON.parse(Buffer.from(Z,"base64").toString("utf-8"));if(typeof q.staffId==="string")U=q.staffId;if(typeof q.corporationName==="string")Q=q.corporationName;if(typeof q.staffName==="string")J=q.staffName;if(typeof q.cellphone==="string")K=q.cellphone;if(q.isAdmin!==void 0)I=q.isAdmin===!0||q.isAdmin==="true"}}}catch{}if(!U||!Q)try{let W=(await G5.get(`${z}/api/account/v2/session`,{headers:{...G,...U?{staffid:U}:{}},timeout:1e4}).json())?.value;if(W){if(!U&&W.loginStaffId)U=W.loginStaffId;if(!Q&&W.corporationName)Q=W.corporationName;if(!J&&W.privilege)J=W.privilege}}catch{}if(!U)U=`${Y.corpId}:admin`;return{corpId:Y.corpId,baseUrl:z,accessToken:Y.accessToken,staffId:U,corpName:Q,staffName:J,isAdmin:I,cellphone:K}}async function lS($){let Y=await Sn0($),z={accesstoken:Y.accessToken,corpid:Y.corpId,staffid:Y.staffId},U;try{U=await(await G5.get(`${Y.baseUrl}/api/innerapi/v1/key`,{searchParams:{corpId:Y.corpId},headers:z,timeout:15000})).json()}catch(I){let K=I instanceof Error?I.message:String(I);throw Error(`Failed to query Hose OpenAPI keys from assistance link: ${K}`)}let Q=U.items??[],J=[];for(let I of Q)if(typeof I==="object"&&I!==null){let K=I;if(typeof K.appKey==="string"&&typeof K.appSecurity==="string")J.push({id:String(K.id??K.appKey),name:typeof K.name==="string"?K.name:void 0,appKey:K.appKey,appSecurity:K.appSecurity,active:typeof K.active==="boolean"?K.active:!0,corporationId:typeof K.corporationId==="string"?K.corporationId:Y.corpId,createTime:typeof K.createTime==="number"?K.createTime:void 0,updateTime:typeof K.updateTime==="number"?K.updateTime:void 0})}return{corpId:Y.corpId,corpName:Y.corpName,baseUrl:Y.baseUrl,staffId:Y.staffId,keys:J}}var En0,Cn0,Rn0="/web/thirdparty.html",i00,cS,pS;var g7=m(()=>{dQ();i8();CH();En0=["https://app.ekuaibao.com","https://dd2.hosecloud.com","https://wx2.ekuaibao.com","https://kdcloud2.ekuaibao.com","https://ddenterprise.ekuaibao.com","https://feishu.ekuaibao.com"],Cn0=[".ekuaibao.com",".hosecloud.com"],i00=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/,cS=new Map,pS=new Map});function o00($,Y){return Date.now()>=$.expiresAt-Y*1000}async function gn0($){switch($.source.type){case"hose":return l00($);case"direct":case"seal":return _00($)}}async function Zw($){let Y=$.auth.refreshTtl,z=Xw.get($.id);if(z&&!o00(z,Y))return z;let U=x00($.id);if(U&&!o00(U,Y))return Xw.set($.id,U),U;let Q=await gn0($);return Xw.set($.id,Q),f00($.id,Q),Q}async function r00($){return(await Zw($)).enterprise}function s00($){Xw.delete($),u00($)}var Xw;var oS=m(()=>{g7();CH();Xw=new Map});var t00={};D8(t00,{createSealClientForUrl:()=>y6,createSealClientForToken:()=>rS,createSealClient:()=>P1});function yn0($){if($===void 0||$===null||$==="")return"";if(typeof $==="string")return $;try{return JSON.stringify($)}catch{return String($)}}function kn0($){if(!($ instanceof D6))return $;let Y=yn0($.data);if(Y)$.message=`${$.message}: ${Y}`;return $}function a00($){return async({error:Y})=>{if($&&Y instanceof D6&&Y.response.status===401)s00($);return kn0(Y)}}async function P1($){let Y=await Zw($);return G5.create({prefix:Y.enterprise.sealUrl,timeout:30000,headers:{...A6($.seal),Authorization:`Bearer ${Y.token}`},hooks:{beforeError:[a00($.id)]}})}async function rS($,Y){let z=await Zw($);return y6(z.enterprise.sealUrl,Y,A6($.seal))}function y6($,Y,z={}){let U={...z};if(Y)U.Authorization=`Bearer ${Y}`;return G5.create({prefix:$.replace(/\/+$/,""),timeout:30000,headers:U,hooks:{beforeError:[a00()]}})}var i8=m(()=>{dQ();oS()});var RH;var e00=m(()=>{RH={name:"seal-use",version:"0.10.36",private:!0,description:"Seal tenant operations toolkit: approval-run diagnosis, rule remediation, Hose/合思 auth, plus a CLI and an optional MCP server.",license:"MIT",author:{name:"yingqing"},repository:{type:"git",url:"git+https://github.com/yunyingk/seal-use.git"},type:"module",module:"src/server.ts",bin:{"seal-use":"src/cli.ts"},packageManager:"bun@1.3.14",engines:{bun:">=1.3.14"},scripts:{dev:"bun run --watch src/server.ts",start:"bun run src/server.ts",probe:"bun run src/probe.ts",cli:"bun run src/cli.ts",check:"tsc --noEmit","build:binary":"node scripts/build-binary.mjs","build:plugin":"node scripts/build-plugin.mjs",bump:"bun run scripts/bump-version.ts",release:"bun run scripts/release.ts","dev:override":"bun run scripts/dev-override.ts","dev:link":"bun run scripts/dev-override.ts","openapi:bundle":"bun run scripts/bundle-openapi.ts","openapi:raw":"bun run scripts/generate-raw-openapi.ts",test:"bun test",prepare:"git config core.hooksPath .githooks"},dependencies:{"@modelcontextprotocol/server":"^2.0.0",archiver:"^8.0.0",exceljs:"^4.4.0","iconv-lite":"^0.7.3",ky:"^2.0.2","pinyin-pro":"^3.29.3",yauzl:"^3.4.0",zod:"^4.4.3"},devDependencies:{"@modelcontextprotocol/client":"^2.0.0","@types/archiver":"^8.0.0","@types/bun":"^1.3.14","@types/yauzl":"^3.4.0","bun-types":"^1.3.14",typescript:"^5.9.3",yaml:"^2.9.0"}}});import{spawnSync as $10}from"node:child_process";function fn0($,Y=RH.version){let z=$.trim();if(!z)return null;let U=z.endsWith("-dirty"),Q=U?z.slice(0,-6):z,J=Q.match(/^v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9.]+)?)-(\d+)-g([0-9a-f]+)$/);if(J&&J[1]&&J[2]&&J[3])return{baseVersion:J[1],commitsAhead:Number.parseInt(J[2],10),commit:J[3],dirty:U,describe:z};let I=Q.match(/^v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9.]+)?)$/);if(I&&I[1])return{baseVersion:I[1],commitsAhead:0,commit:"",dirty:U,describe:z};let K=Q.match(/^([0-9a-f]{7,40})$/);if(K&&K[1])return{baseVersion:Y,commitsAhead:0,commit:K[1],dirty:U,describe:z};return null}function un0($,Y,z,U){let J=z?`+g${z}${U?".dirty":""}`:U?"+dirty":"";return`${$}-dev.${Y}${J}`}function bn0($){let Y=$?.env,z=Y?.SEAL_BUILD_VERSION??process.env.SEAL_BUILD_VERSION,U=Y?.SEAL_BUILD_IS_RELEASE??process.env.SEAL_BUILD_IS_RELEASE,Q=Y?.SEAL_BUILD_CHANNEL??process.env.SEAL_BUILD_CHANNEL,J=Y?.SEAL_BUILD_GIT_BASE??process.env.SEAL_BUILD_GIT_BASE,I=Y?.SEAL_BUILD_GIT_COMMITS_AHEAD??process.env.SEAL_BUILD_GIT_COMMITS_AHEAD,K=Y?.SEAL_BUILD_GIT_COMMIT??process.env.SEAL_BUILD_GIT_COMMIT,G=Y?.SEAL_BUILD_GIT_DIRTY??process.env.SEAL_BUILD_GIT_DIRTY,H=Y?.SEAL_BUILD_GIT_DESCRIBE??process.env.SEAL_BUILD_GIT_DESCRIBE,W=Y?.SEAL_FORCE_RELEASE??process.env.SEAL_FORCE_RELEASE,X=$?.cwd;if(z){let Z=U==="true",V={name:"seal-use",version:z,channel:Q||(Z?"release":"dev"),isRelease:Z};if(J)V.git={baseVersion:J,commitsAhead:Number.parseInt(I||"0",10),commit:K||"",dirty:G==="true",describe:H||z};return V}if(U==="true"||W==="1")return{name:"seal-use",version:RH.version,channel:"release",isRelease:!0};try{let Z=$10("git",["describe","--tags","--long","--dirty","--always"],{cwd:X,encoding:"utf8",stdio:["ignore","pipe","ignore"]});if(Z.status===0&&Z.stdout){let q=fn0(Z.stdout.trim(),RH.version);if(q){if(!q.commit){let F=$10("git",["rev-parse","--short","HEAD"],{cwd:X,encoding:"utf8",stdio:["ignore","pipe","ignore"]});if(F.status===0&&F.stdout)q.commit=F.stdout.trim()}return{name:"seal-use",version:un0(q.baseVersion,q.commitsAhead,q.commit,q.dirty),channel:"dev",isRelease:!1,git:q}}}}catch{}return{name:"seal-use",version:`${RH.version}-dev.0+local`,channel:"dev",isRelease:!1}}var dY,Z1,sS,Ec1;var $3=m(()=>{e00();dY=bn0(),Z1=dY.version,sS=dY.isRelease,Ec1=dY.channel});function rQ($=void 0){return tS.parse($??{})}function U10($,Y){return rQ({...rQ($),...Y})}var Y10,aS,z10,tS,eS;var sQ=m(()=>{P$();Y10=[".pdf",".xls",".xlsx",".csv",".doc",".docx",".ppt",".pptx",".txt",".rtf",".odt",".ods",".odp",".jpg",".jpeg",".png",".gif",".bmp",".webp",".heic",".eml",".msg"],aS={minFileSizeBytes:500,allowedExtensions:[...Y10]},z10=L.string().trim().min(1).transform(($)=>{let Y=$.toLowerCase();return Y.startsWith(".")?Y:`.${Y}`}).refine(($)=>/^\.[a-z0-9][a-z0-9+_-]*$/.test($),{message:"文件后缀必须是简单扩展名,例如 .pdf 或 xlsx"}),tS=L.object({minFileSizeBytes:L.number().int().min(0).default(aS.minFileSizeBytes),maxFileSizeBytes:L.number().int().positive().nullable().optional(),allowedExtensions:L.array(z10).min(1).default([...Y10]).transform(($)=>[...new Set($)])}).superRefine(($,Y)=>{if($.maxFileSizeBytes!==void 0&&$.maxFileSizeBytes!==null&&$.maxFileSizeBytes<$.minFileSizeBytes)Y.addIssue({code:"custom",path:["maxFileSizeBytes"],message:"最大文件大小不能小于最小文件大小"})}),eS=L.object({minFileSizeBytes:L.number().int().min(0).optional(),maxFileSizeBytes:L.number().int().positive().nullable().optional(),allowedExtensions:L.array(z10).min(1).transform(($)=>[...new Set($)])}).optional()});var in0,nn0,cn0,pn0,J10,dn0,mn0,I10,qw,K10,ln0,Vw,G10,vH,H10,on0,rn0,sn0,Q10,hH,W10,an0,tn0,Lw,$g,X10,Z10,q10,V10,Fw,L10,Yg,zg,F10,O10,en0,w10,$c0,M10,_H,N10,D10,A10,B10,P10,j10,T10,E10,C10,R10,_10,Yc0,v10,zc0,Uc0,Qc0,Ug,Qg,Jc0,h10,S10,g10,y10,Ic0,Jg,Sc1,gc1,k10,yc1;var Ig=m(()=>{P$();sQ();in0=L.object({staffId:L.string(),name:L.string().optional(),code:L.string().default(""),bindTime:L.number().optional()}),nn0=L.object({id:L.string(),tenantId:L.string(),name:L.string(),isAdmin:L.boolean().default(!1),permissions:L.array(L.string()).default([]),providerUserId:L.string().optional(),hosecloudStaff:in0.optional()}),cn0=L.object({apiKey:L.string().optional(),corporationId:L.string().optional(),corporationName:L.string().optional()}),pn0=L.object({id:L.string(),name:L.string(),tenantSlug:L.string().optional(),isDemo:L.boolean().default(!1),logoUrl:L.string().nullable().optional(),hoseCorpConfig:cn0.optional()}),J10=L.object({user:nn0,tenant:pn0}),dn0=L.object({id:L.string(),name:L.string(),email:L.string().nullable().optional(),emailVerified:L.boolean().optional(),image:L.string().nullable().optional(),tenantId:L.string().optional(),provider:L.string().optional(),providerUserId:L.string().optional(),mobile:L.string().nullable().optional(),status:L.string().optional(),permissions:L.array(L.string()).default([]),isAdmin:L.boolean().default(!1),hosecloudStaff:L.unknown().optional()}).passthrough(),mn0=L.object({id:L.string(),token:L.string().optional(),expiresAt:L.string(),createdAt:L.string().optional(),updatedAt:L.string().optional(),ipAddress:L.string().optional(),userAgent:L.string().optional(),userId:L.string(),delegationId:L.string().nullable().optional()}).passthrough(),I10=L.object({user:dn0,session:mn0}),qw=L.object({id:L.string(),tenantId:L.string().optional(),code:L.union([L.number(),L.string()]).optional(),description:L.string(),scope:L.string(),strictness:L.string(),status:L.string().optional(),createdAt:L.number().optional(),updatedAt:L.number().optional()}),K10=L.object({rules:L.array(qw),hasPendingDeletes:L.boolean().default(!1)}),ln0=L.object({id:L.union([L.string(),L.number()]).optional(),ruleId:L.union([L.string(),L.number()]).optional(),stableId:L.union([L.string(),L.number()]).optional(),runtimeRuleId:L.union([L.string(),L.number()]).optional(),runtimeId:L.union([L.string(),L.number()]).optional(),code:L.union([L.string(),L.number()]).optional(),description:L.string(),scope:L.string(),strictness:L.string()}).passthrough(),Vw=L.object({id:L.string(),tenantId:L.string().optional(),versionNumber:L.number(),versionName:L.string().nullable().optional(),publishedBy:L.string().nullable().optional(),publishedByName:L.string().nullable().optional(),rules:L.array(ln0).default([]),publishedAt:L.number().optional(),createdAt:L.number().optional()}).passthrough(),G10=L.object({version:Vw,rulesCount:L.number()}),vH=L.object({id:L.string(),tenantId:L.string().optional(),title:L.string(),purpose:L.string().default(""),contentType:L.string().default("policy"),content:L.string(),status:L.string().default("published"),enabled:L.boolean().default(!0),scenarios:L.array(L.string()).default([]),tags:L.array(L.string()).default([]),category:L.string().nullable().optional(),categoryTags:L.array(L.string()).default([]),createdBy:L.string().nullable().optional(),createdByName:L.string().nullable().optional(),createdAt:L.number().optional(),updatedAt:L.number().optional(),updatedBy:L.string().nullable().optional(),updatedByName:L.string().nullable().optional(),isDeleted:L.boolean().default(!1)}),H10=L.object({articles:L.array(vH),total:L.number().optional()}),on0=L.object({explicitApprove:L.string().default(""),explicitReject:L.string().default(""),exemptApprove:L.string().default(""),review:L.string().default("")}).passthrough(),rn0=L.object({type:L.string(),signKey:L.string().optional(),outboundName:L.string().optional(),mode:L.string().optional(),autoApprovalRate:L.number().optional(),apiKey:L.string().optional(),apiSecret:L.string().optional(),apiOrigin:L.string().optional(),corporationId:L.string().optional(),ebotSignKey:L.string().optional(),completionSignKey:L.string().optional(),outboundMessageId:L.string().optional(),completionMessageId:L.string().optional()}).passthrough(),sn0=L.enum(["assisted","semi_automatic","fully_automatic"]),Q10=L.object({id:L.string(),url:L.string().url()}).passthrough(),hH=L.object({type:L.literal("webhook"),id:L.string(),name:L.string(),mode:sn0,incomingDocumentWebhook:Q10,outgoingResultWebhook:L.string().url(),incomingManualResultWebhook:Q10,secret:L.string().min(1),autoApprovalRate:L.number().int().min(0).max(100).optional(),materialPackFilePolicy:tS.default(aS)}).passthrough(),W10=L.object({id:L.string().optional(),tenantId:L.string().optional(),tone:L.string().optional(),language:L.string().optional(),detailLevel:L.string().optional(),outputFormat:L.string().optional(),examples:L.array(L.string()).default([]),prohibitedPhrases:L.array(L.string()).default([]),customInstructions:L.string().optional(),updatedAt:L.number().optional(),decisionPreferences:on0.optional(),integrationSystem:L.string().optional(),integrations:L.array(rn0).default([])}).passthrough(),an0=L.object({id:L.string().optional(),sn:L.string().optional(),title:L.string().optional(),name:L.string().optional(),fields:L.array(L.unknown()).optional()}).passthrough(),tn0=L.object({_langfuseTraceId:L.string().optional(),simulation_batch_id:L.string().optional()}).passthrough(),Lw=L.object({id:L.string(),tenantId:L.string().optional(),agentId:L.string().optional(),status:L.string().optional(),taskMode:L.string().optional(),finalExecutionMode:L.string().optional(),sourceSystem:L.string().optional(),sourceDocumentSN:L.string().optional(),sourceDocumentId:L.string().optional(),documentId:L.string().optional(),document:an0.optional(),result:L.unknown().optional(),pipelineData:L.unknown().optional(),sourceExtendData:tn0.optional(),ruleSetVersionNumber:L.number().optional(),ruleSetPublishedAt:L.number().optional(),ruleSetPublishedByName:L.string().optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),$g=L.object({records:L.array(Lw).default([]),total:L.number().optional(),page:L.number().optional(),pageSize:L.number().optional()}).passthrough(),X10=L.object({id:L.string(),expiresAt:L.number().nullable().optional(),revokedAt:L.number().nullable().optional(),createdAt:L.number().nullable().optional(),lastUsedAt:L.number().nullable().optional(),useCount:L.number().default(0),note:L.string().nullable().optional(),link:L.string()}).passthrough(),Z10=L.object({id:L.string(),token:L.string(),link:L.string()}).passthrough(),q10=L.object({userId:L.string(),password:L.string()}).passthrough(),V10=L.object({password:L.string()}).passthrough(),Fw=L.object({_id:L.string(),tenantId:L.string().optional(),name:L.string(),mobile:L.string().optional(),email:L.string().optional(),departmentIds:L.array(L.string()).default([]),status:L.string().optional(),permissions:L.array(L.string()).default([]),createdAt:L.string().optional(),updatedAt:L.string().optional()}).passthrough(),L10=L.object({departments:L.array(L.record(L.string(),L.unknown())).default([]),users:L.array(Fw).default([])}).passthrough(),Yg=L.object({_id:L.string(),tenantId:L.string().optional(),name:L.string().optional(),parentId:L.string().nullable().optional(),ancestors:L.array(L.string()).default([]),provider:L.string().optional(),permissions:L.array(L.string()).default([]),isDeleted:L.boolean().optional(),syncedAt:L.string().optional(),createdAt:L.string().optional(),updatedAt:L.string().optional()}).passthrough(),zg=L.object({items:L.array(Yg).default([])}).passthrough(),F10=L.object({items:L.array(Fw).default([])}).passthrough(),O10=L.object({lastSyncTime:L.union([L.string(),L.number(),L.null()])}).passthrough(),en0=L.object({tagId:L.string().optional(),tagName:L.string().optional(),tagPath:L.string().optional(),count:L.number().default(0),avgConfidence:L.number().default(0),errorCount:L.number().default(0),warningCount:L.number().default(0)}).passthrough(),w10=L.object({tagStats:L.array(en0).default([]),totalRisks:L.number().default(0),analyzedRisks:L.number().default(0),pendingRisks:L.number().default(0)}).passthrough(),$c0=L.object({riskId:L.string().optional(),recordId:L.string().optional(),riskDetails:L.string().default(""),riskLevel:L.string().default("warning"),documentType:L.string().default(""),documentSN:L.string().default(""),sourceSystem:L.string().default(""),sourceDocumentURL:L.string().nullable().optional(),confidence:L.number().default(0),reasoning:L.string().default(""),createdAt:L.union([L.string(),L.number(),L.date()]).optional()}).passthrough(),M10=L.object({tagId:L.string(),tagName:L.string().default(""),tagPath:L.string().default(""),tagDescription:L.string().default(""),risks:L.array($c0).default([]),total:L.number().default(0)}).passthrough(),_H=L.object({value:L.number().default(0),trend:L.number().default(0)}).passthrough(),N10=L.object({metrics:L.object({approvalCount:_H.optional(),accuracy:_H.optional(),automationRate:_H.optional(),riskCount:_H.optional(),avgDuration:_H.optional()}).passthrough().default({}),sankeyData:L.object({nodes:L.array(L.object({id:L.string()}).passthrough()).default([]),links:L.array(L.object({source:L.string(),target:L.string(),value:L.number().default(0)}).passthrough()).default([])}).passthrough().default({nodes:[],links:[]})}).passthrough(),D10=L.record(L.string(),L.unknown()),A10=L.object({expenses:L.array(D10).default([]),total:L.number().optional()}).passthrough(),B10=L.object({invoices:L.array(D10).default([]),total:L.number().optional(),feishuApprovalAppId:L.string().nullable().optional()}).passthrough(),P10=L.record(L.string(),L.unknown()),j10=L.object({provider:L.string(),config:L.record(L.string(),L.unknown()).default({})}).passthrough(),T10=L.object({id:L.string(),name:L.string(),description:L.string().optional(),available:L.boolean().default(!0),fields:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),E10=L.object({permissions:L.array(L.object({key:L.string(),name:L.string(),description:L.string().optional()}).passthrough()).default([])}).passthrough(),C10=L.object({configs:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),R10=L.object({subscriptions:L.array(L.record(L.string(),L.unknown())).default([]),features:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),_10=L.object({key:L.string(),type:L.string(),label:L.string(),column:L.string(),mask:L.string().optional()}).passthrough(),Yc0=L.object({columns:L.array(_10).default([]),fieldKey:L.string().optional(),keyColumn:L.string().optional(),sheetName:L.string().optional(),fieldLabel:L.string().optional()}).passthrough(),v10=L.object({id:L.string().optional(),listSheets:L.array(Yc0).default([]),mainColumns:L.array(_10).default([]),workbookName:L.string().optional(),mainKeyColumn:L.string().optional(),mainSheetName:L.string().optional(),titleColumn:L.string().optional(),statusColumn:L.string().optional(),applicationDateColumn:L.string().optional(),updatedDateColumn:L.string().optional(),attachmentFieldKey:L.string().optional(),attachmentFieldLabel:L.string().optional()}).passthrough(),zc0=L.object({approvalCode:L.string(),nodeId:L.string().optional(),flowIds:L.array(L.string()).max(100).optional(),limit:L.number().int().positive().max(100).optional(),dataCollectionMode:L.string().optional(),signKey:L.string().optional(),rejectNodeName:L.string().nullable().optional(),skipInvoiceGeneration:L.boolean().optional(),skipExpenseExtraction:L.boolean().optional(),disableAttachmentCache:L.boolean().optional(),thinkingDepthOverride:L.enum(["default","medium","high"]).optional(),startTime:L.number().optional(),endTime:L.number().optional(),templateId:L.string().optional(),packageIds:L.array(L.string()).optional(),packageLabel:L.string().optional(),runMode:L.string().optional(),schemaConfig:v10.optional()}).passthrough(),Uc0=L.object({mode:L.string().optional(),conditions:L.array(L.object({label:L.string(),value:L.string()}).passthrough()).default([])}).passthrough(),Qc0=L.object({kind:L.string().optional(),stage:L.string().optional(),code:L.string().optional(),message:L.string().optional()}).passthrough(),Ug=L.object({id:L.string(),tenantId:L.string().optional(),approvalCode:L.string().optional(),nodeId:L.string().optional(),sourceSystem:L.string().optional(),status:L.string().optional(),totalCount:L.number().default(0),processedCount:L.number().default(0),successCount:L.number().default(0),failedCount:L.number().default(0),createdCount:L.number().default(0),createFailedCount:L.number().default(0),params:zc0.optional(),requestSummary:Uc0.nullable().optional(),resultSummary:Qc0.nullable().optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),Qg=L.object({batchId:L.string()}).passthrough(),Jc0=L.object({dataCollectionMode:L.string().optional(),flowIds:L.array(L.string()).max(100).optional(),rejectNodeName:L.string().nullable().optional(),skipInvoiceGeneration:L.boolean().optional(),skipExpenseExtraction:L.boolean().optional()}).passthrough(),h10=L.object({id:L.string(),tenantId:L.string().optional(),name:L.string().optional(),description:L.string().optional(),approvalSystem:L.string().optional(),hosecloudConfig:Jc0.optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),S10=L.object({hasFeishu:L.boolean().default(!1),hasHosecloud:L.boolean().default(!1),hasWeaver:L.boolean().default(!1),hasHelios:L.boolean().default(!1),hasMaycur:L.boolean().default(!1),hasMaycurStandard:L.boolean().default(!1)}).passthrough(),g10=L.object({signKey:L.string().optional(),displayName:L.string().optional(),corporationId:L.string().optional()}).passthrough(),y10=L.object({id:L.string(),tenantId:L.string().optional(),name:L.string().optional(),templateId:L.string().optional(),originalFileName:L.string().optional(),status:L.string().optional(),documentCount:L.number().optional(),attachmentCount:L.number().optional(),uploadedBy:L.string().optional(),schemaConfig:v10.nullable().optional(),createdAt:L.union([L.string(),L.number()]).optional(),updatedAt:L.union([L.string(),L.number()]).optional()}).passthrough(),Ic0=L.object({hitScopes:L.array(L.string()).default([]),hitRuleIds:L.array(L.string()).default([]),notHitScopes:L.array(L.string()).default([]),notHitRuleIds:L.array(L.string()).default([])}).passthrough(),Jg=L.object({id:L.string().min(1),name:L.string().min(1),enabled:L.boolean().default(!0),description:L.string().default(""),condition:Ic0.default({hitScopes:[],hitRuleIds:[],notHitScopes:[],notHitRuleIds:[]}),level:L.enum(["medium","high"])}).passthrough(),Sc1=L.object({defaultLevel:L.enum(["medium","high"]).default("medium"),routingPolicies:L.array(Jg).default([])}).passthrough(),gc1=L.object({dryRun:L.boolean().optional(),signKey:L.string().min(1).optional(),outboundName:L.string().optional(),specificationId:L.string().optional(),specificationName:L.string().optional(),mode:L.enum(["fully_automatic","semi_automatic","assisted"]).default("assisted"),autoApprovalRate:L.number().min(0).max(100).optional(),rejectResubmitMethod:L.enum(["node_default","to_ebot","from_start"]).optional(),autoApproveNodeNames:L.array(L.string()).optional(),apiKey:L.string().min(1),apiSecret:L.string().min(1),apiOrigin:L.string().default("production"),customApiUrl:L.string().optional()}).passthrough(),k10=L.object({id:L.string().optional(),code:L.string().optional(),name:L.string().optional(),approvalSystem:L.string().optional()}).passthrough(),yc1=L.object({total:L.number(),dedupeBy:L.string(),unique:L.number(),byStatus:L.record(L.string(),L.number()),bySourceSystem:L.record(L.string(),L.number())}).passthrough()});import{randomBytes as u10}from"node:crypto";async function N1($,Y){let z=await $.json();return Y.parse(z.data??z)}async function T8($){return N1(await $.get("api/v1/auth/me"),J10)}async function i10($){return N1(await $.get("api/auth/get-session"),I10)}async function X6($){return N1(await $.get("api/v1/rules"),K10)}async function gH($,Y){return N1(await $.post("api/v1/rules",{json:Y}),qw)}async function Kg($,Y,z){return N1(await $.put(`api/v1/rules/${Y}`,{json:z}),qw)}async function tQ($,Y){await $.delete(`api/v1/rules/${Y}`)}async function Nw($){let Y=await $.post("api/v1/rules/batch-recode",{throwHttpErrors:!1}),z=await Y.json().catch(()=>({}));return L.object({ok:L.boolean(),status:L.number(),body:L.unknown()}).parse({ok:Y.ok,status:Y.status,body:z})}async function c8($){return N1(await $.get("api/v1/rule-set-versions"),L.array(Vw))}async function y7($,Y){return N1(await $.get(`api/v1/rule-set-versions/${Y}`),Vw)}async function yH($,Y){return N1(await $.post("api/v1/rule-set-versions/publish",{json:{versionName:Y}}),G10)}async function mY($,Y={}){let z=new URLSearchParams;return z.set("offset",String(Y.offset??0)),z.set("limit",String(Y.limit??20)),z.set("sortBy",Y.sortBy??"createdAt"),z.set("sortOrder",Y.sortOrder??"desc"),Y.scenarios?.forEach((U,Q)=>{z.set(`filter[scenarios][${Q}]`,U)}),N1(await $.get("api/v1/knowledge/articles",{searchParams:z}),H10)}async function n10($,Y){return N1(await $.get(`api/v1/knowledge/articles/${Y}`),vH)}async function Dw($,Y){return N1(await $.post("api/v1/knowledge/articles",{json:{...Y,contentType:Y.contentType??"policy",status:Y.status??"published",enabled:Y.enabled??!0,scenarios:Y.scenarios&&Y.scenarios.length>0?Y.scenarios:["audit"],tags:Y.tags??[]}}),vH)}async function Aw($,Y,z){let U=Object.fromEntries(Object.entries(z).filter(([,Q])=>Q!==void 0));return N1(await $.patch(`api/v1/knowledge/articles/${Y}`,{json:{attributes:U}}),vH)}async function Bw($,Y){return await $.delete(`api/v1/knowledge/articles/${Y}`),{success:!0,id:Y}}async function o1($,Y="api/v1/agent/ai-approval/config"){return N1(await $.get(Y),W10)}async function s5($,Y,z="api/v1/agent/ai-approval/config"){return await $.post(z,{json:Y}),o1($,z)}async function Gg($,Y,z="api/v1/agent/ai-approval/config"){let U=await $.post(z,{json:Y}),Q=await U.json().catch(()=>({})),J=Mw.safeParse(Q.data??Q);return J.success?J.data.success??U.ok:U.ok}async function I$($,Y="api/v1/agent/ai-approval/config"){let z=await o1($,Y);return Hg(z.integrations)}async function Pw($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=Hg(Q.integrations),I=r10(Y,J,z);if(!await Gg($,{...Q,integrations:[...Q.integrations,I]},U))throw Error("Seal did not confirm saving the Webhook integration");return I}async function c10($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=Hg(Q.integrations),I=r10(Y,J,z);return{before:Q,after:{...Q,integrations:[...Q.integrations,I]},integration:I}}async function p10($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=jw(Q.integrations),I=Tw(J,Y),K=s10(I.integration,z);if(!await Gg($,{...Q,integrations:Q.integrations.map((H,W)=>W===I.index?K:H)},U))throw Error("Seal did not confirm saving the Webhook integration");return K}async function d10($,Y,z,U="api/v1/agent/ai-approval/config"){let Q=await o1($,U),J=jw(Q.integrations),I=Tw(J,Y),K=s10(I.integration,z);return{before:Q,after:{...Q,integrations:Q.integrations.map((G,H)=>H===I.index?K:G)},integration:K}}async function m10($,Y,z="api/v1/agent/ai-approval/config"){let U=await o1($,z),Q=jw(U.integrations),J=Tw(Q,Y);if(!await Gg($,{...U,integrations:U.integrations.filter((K,G)=>G!==J.index)},z))throw Error("Seal did not confirm deleting the Webhook integration");return J.integration}async function l10($,Y,z="api/v1/agent/ai-approval/config"){let U=await o1($,z),Q=jw(U.integrations),J=Tw(Q,Y);return{before:U,after:{...U,integrations:U.integrations.filter((I,K)=>K!==J.index)},integration:J.integration}}function k7($,Y){let z=Y.trim();if(!z)throw Error("Webhook selector must not be empty");let U=$.find((J)=>J.id===z);if(U)return U;let Q=$.filter((J)=>J.name===z);if(Q.length===1)return Q[0];if(Q.length>1)throw Error(`Multiple Webhook integrations match name: ${z}. Use the integration ID.`);throw Error(`Webhook integration not found: ${z}`)}function o10($,Y){let z=Y?.trim().toLowerCase();if(!z)return $;return $.filter((U)=>[U.id,U.name,U.mode,U.outgoingResultWebhook,U.incomingDocumentWebhook.url,U.incomingManualResultWebhook.url].some((Q)=>Q.toLowerCase().includes(z)))}function Hg($){return $.filter((Y)=>Y.type==="webhook").map((Y)=>hH.parse(Y))}function jw($){return $.flatMap((Y,z)=>{if(Y.type!=="webhook")return[];return[{index:z,integration:hH.parse(Y)}]})}function Tw($,Y){let z=k7($.map((U)=>U.integration),Y);return $.find((U)=>U.integration.id===z.id)}function r10($,Y,z){let U=SH(z.name,"name"),Q=z.mode??"assisted",J=t10(z.outgoingResultWebhook,"outgoingResultWebhook"),I=e10(z.autoApprovalRate??60),K=Hc0(Y),G=`wh_${K}_${u10(8).toString("hex").slice(0,7)}`,H=j$($);return hH.parse({type:"webhook",id:`integration-${K}`,name:U,mode:Q,incomingDocumentWebhook:{id:G,url:`${H}/api/v1/integrations/webhook/${G}/document`},outgoingResultWebhook:J,incomingManualResultWebhook:{id:G,url:`${H}/api/v1/integrations/webhook/${G}/manual-result`},secret:z.secret?SH(z.secret,"secret"):a10(),autoApprovalRate:I,materialPackFilePolicy:rQ(z.materialPackFilePolicy)})}function s10($,Y){return hH.parse({...$,...Y.name===void 0?{}:{name:SH(Y.name,"name")},...Y.mode===void 0?{}:{mode:Y.mode},...Y.outgoingResultWebhook===void 0?{}:{outgoingResultWebhook:t10(Y.outgoingResultWebhook,"outgoingResultWebhook")},...Y.autoApprovalRate===void 0?{}:{autoApprovalRate:e10(Y.autoApprovalRate)},...Y.rotateSecret||Y.secret!==void 0?{secret:Y.rotateSecret?a10():SH(Y.secret??"","secret")}:{},...Y.materialPackFilePolicy===void 0?{}:{materialPackFilePolicy:U10($.materialPackFilePolicy,Y.materialPackFilePolicy)}})}function Hc0($){let Y=new Set($.map((U)=>U.id)),z=Date.now();while(Y.has(`integration-${z}`))z+=1;return z}function a10(){return u10(16).toString("hex")}function SH($,Y){let z=$.trim();if(!z)throw Error(`Webhook ${Y} must not be empty`);return z}function t10($,Y){let z=SH($,Y);try{return new URL(z).toString()}catch{throw Error(`Webhook ${Y} must be a valid URL`)}}function e10($){if(!Number.isInteger($)||$<0||$>100)throw Error("Webhook autoApprovalRate must be an integer between 0 and 100");return $}async function Ew($,Y={}){let[z,U,Q]=await Promise.all([X6($),mY($,{limit:Y.documentLimit??50}),o1($,Y.stylePreferencesEndpoint).then((J)=>({ok:!0,data:J}),(J)=>({ok:!1,error:J instanceof Error?J.message:String(J)}))]);return{rules:z,documents:U,stylePreferences:Q}}async function i4($,Y={}){let z=new URLSearchParams;return z.set("offset",String(Y.offset??0)),z.set("limit",String(Y.limit??50)),n8(z,"fromTimestamp",Y.fromTimestamp),n8(z,"toTimestamp",Y.toTimestamp),n8(z,"startDate",Y.startDate),n8(z,"endDate",Y.endDate),x10(z,"status",Y.status),n8(z,"sourceSystem",Y.sourceSystem),n8(z,"taskMode",Y.taskMode),n8(z,"search",Y.search),n8(z,"sourceDocumentSN",Y.sourceDocumentSN),n8(z,"sourceDocumentId",Y.sourceDocumentId),x10(z,"manualApprovalStatus",Y.manualApprovalStatus),N1(await $.get("api/v1/approvals",{searchParams:z}),$g)}async function H4($,Y){return N1(await $.get(`api/v1/approvals/${Y}`),Lw)}async function Wg($,Y){let z=await $.get(`api/v1/simulation/batch/${Y}/records`).json(),U=z.data??z;if(Array.isArray(U))return L.array(Lw).parse(U);return $g.parse(U).records}async function $40($,Y){return N1(await $.post("api/v1/simulation/create-batch",{json:Y}),Qg)}async function Y40($,Y){return N1(await $.post("api/v1/simulation/create-material-pack-batch",{json:Y}),Qg)}async function z40($,Y={}){let z=await $.get("api/v1/simulation/batches",{searchParams:{limit:String(Y.limit??50)}}).json(),U=z.data??z;return L.array(Ug).parse(U)}async function Cw($,Y){return N1(await $.get(`api/v1/simulation/batch/${Y}`),Ug)}async function U40($){let Y=await $.get("api/v1/simulation/templates").json(),z=Y.data??Y;return L.array(h10).parse(z)}async function Xg($){return N1(await $.get("api/v1/simulation/integration-status"),S10)}async function Zg($){let Y=await $.get("api/v1/simulation/hosecloud-integrations").json(),z=Y.data??Y;return L.array(g10).parse(z)}async function Q40($,Y){let U=await(await $.delete(`api/v1/simulation/batch/${encodeURIComponent(Y)}/data`)).json().catch(()=>({}));return U.data??U}async function J40($,Y){let z=Y?"api/v1/simulation/hosecloud-specifications-by-sign-key":"api/v1/simulation/hosecloud-specifications",U=Y?new URLSearchParams({signKey:Y}):void 0,Q=await $.get(z,{searchParams:U}).json(),J=Q.data??Q;return L.array(k10).parse(J)}async function I40($,Y){let z=await $.post("api/hosecloud/corporation",{json:Y}).json(),U=z.data??z;return L.object({corporationId:L.string()}).parse(U)}async function K40($,Y){let U=await(await $.post("api/hosecloud/outbound-config/sync",{json:Y})).json().catch(()=>({}));return U.data??U}async function G40($,Y){let z=new FormData;return z.append("file",new Blob([new Uint8Array(Y.fileBuffer)]),Y.fileName),N1(await $.post("api/v1/material-packages/upload",{body:z}),y10)}function n8($,Y,z){if(z)$.set(Y,z)}function x10($,Y,z){if(!z)return;(Array.isArray(z)?z:[z]).map((Q)=>Q.trim()).filter(Boolean).forEach((Q,J)=>{$.set(`${Y}[${J}]`,Q)})}async function H40($){return N1(await $.get("api/v1/delegation/list"),L.array(X10))}async function aQ($,Y){return N1(await $.post("api/v1/delegation/create",{json:Y??{}}),Z10)}async function W40($,Y){let z=await $.post("api/v1/delegation/revoke",{json:{tokenId:Y}}),U=await z.json(),Q=Mw.safeParse(U.data??U);return Q.success?Q.data.success??z.ok:z.ok}async function X40($,Y){let z=Y.departmentIds&&Y.departmentIds.length>0?Y.departmentIds:void 0;if(!z){let U=await $.get("api/v1/contacts/departments/root/children").json(),Q=Kc0.safeParse(U.data??U),J=Q.success?Q.data.items?.[0]?._id:void 0;if(J)z=[J]}return N1(await $.post("api/v1/contacts/local/users",{json:{name:Y.name,phone:Y.phone,permissions:Y.permissions??[],departmentIds:z??[]}}),q10)}async function qg($,Y){return N1(await $.post(`api/v1/contacts/local/users/${Y}/reset-password`,{json:{}}),V10)}async function Ow($,Y){return N1(await $.get(`api/v1/contacts/users/${Y}`),Fw)}async function ww($,Y=""){return N1(await $.get("api/v1/contacts/search",{searchParams:{query:Y}}),L10)}async function Z40($){return N1(await $.get("api/v1/contacts/departments/root/children"),zg)}async function q40($,Y){return N1(await $.get(`api/v1/contacts/departments/${encodeURIComponent(Y)}`),Yg)}async function V40($,Y){return N1(await $.get(`api/v1/contacts/departments/${encodeURIComponent(Y)}/children`),zg)}async function L40($,Y){return N1(await $.get(`api/v1/contacts/departments/${encodeURIComponent(Y)}/users`),F10)}async function F40($){return N1(await $.get("api/v1/contacts/last-sync-time"),O10)}async function Rw($,Y={}){let z=Vg(),U=new URLSearchParams;if(n8(U,"startDate",Y.startDate??z.startDate),n8(U,"endDate",Y.endDate??z.endDate),Y.limit!==void 0)U.set("limit",String(Y.limit));return N1(await $.get("api/v1/insight/stats",{searchParams:U}),w10)}async function _w($,Y){let z=Vg(),U=new URLSearchParams;return U.set("tagId",Y.tagId),U.set("startDate",Y.startDate??z.startDate),U.set("endDate",Y.endDate??z.endDate),N1(await $.get("api/v1/insight/risks-by-tag",{searchParams:U}),M10)}async function vw($,Y={}){let z=Vg(),U=f10(Y.startDate??z.startDate),Q=f10(Y.endDate??z.endDate),J=new URLSearchParams;return J.set("startDate",String(U)),J.set("endDate",String(Q)),N1(await $.get("api/v1/insight/performance",{searchParams:J}),N10)}async function O40($,Y){return await $.post(`api/v1/insight/analyze/${encodeURIComponent(Y)}`),{success:!0,recordId:Y}}function f10($){if(typeof $==="number")return $<100000000000?$*1000:$;let Y=Number($);if(!isNaN(Y)&&$.trim()!=="")return Y<100000000000?Y*1000:Y;let z=new Date($);if(isNaN(z.getTime()))throw Error(`Invalid date format: ${$}`);return z.getTime()}function Vg(){let $=new Date,Y=new Date($.getFullYear(),$.getMonth(),1),z=new Date($.getFullYear(),$.getMonth()+1,0,23,59,59,999);return{startDate:Y.toISOString(),endDate:z.toISOString()}}function w40($){let Y=new URLSearchParams;return n8(Y,"filter[startDate]",$.startDate),n8(Y,"filter[endDate]",$.endDate),n8(Y,"filter[search]",$.search),Y.set("offset",String($.offset??0)),Y.set("limit",String($.limit??50)),Y}async function M40($,Y={}){return N1(await $.get("api/v1/expenses/list",{searchParams:w40(Y)}),A10)}async function N40($,Y={}){return N1(await $.get("api/v1/invoice/list",{searchParams:w40(Y)}),B10)}async function D40($){return N1(await $.get("api/v1/integrations/feishu/simulation/approval-definitions"),L.array(P10))}async function A40($,Y){let z=await $.delete(`api/v1/contacts/local/users/${Y}`),U=await z.json(),Q=Mw.safeParse(U.data??U);return Q.success?Q.data.success??z.ok:z.ok}async function Lg($,Y){let z=await $.post(`api/v1/contacts/local/users/${Y}/activate`,{json:{}}),U=await z.json(),Q=Mw.safeParse(U.data??U);return Q.success?Q.data.success??z.ok:z.ok}async function Wc0($,Y){let z=await $.post("api/auth/sms-otp/sign-in-password",{json:Y}),U=z.headers.get("set-auth-token"),Q=Gc0.parse(await z.json()),J=U??Q.session?.token;if(!J)throw Error("Failed to retrieve authentication token from login response");return{token:J,user:Q.user}}async function B40($,Y,z,U){let Q;if(Y.userIdOrPhone.startsWith("+")||/^\d{11}$/.test(Y.userIdOrPhone)){let q=await ww($,Y.userIdOrPhone),V=q.users.find((F)=>F.mobile?.includes(Y.userIdOrPhone)||F._id===Y.userIdOrPhone)??q.users[0];if(!V)throw Error(`User not found with phone/ID: ${Y.userIdOrPhone}`);Q=V}else Q=await Ow($,Y.userIdOrPhone).catch(async()=>{let q=await ww($,Y.userIdOrPhone),V=q.users.find((F)=>F.name===Y.userIdOrPhone)??q.users[0];if(!V)throw Error(`User not found: ${Y.userIdOrPhone}`);return V});if(Q.status==="resigned")await Lg($,Q._id),Q=await Ow($,Q._id);let J=Q,I=Array.isArray(J.identities)&&J.identities.some((q)=>q.provider&&q.provider!=="local")||!!J.apps?.hosecloud;if(I&&U&&U.source.type==="hose"){let V=(Q.mobile||J.identities?.[0]?.providerId||"").replace(/^\+86/,""),F=J.identities?.find((O)=>O.provider==="hosecloud")?.providerId,w=J.apps?.hosecloud?.boundId||F||(V?`${U.source.corpId}:${V}`:void 0);if(w){let O=await lQ(U),M=(await Kw({...U.source,staffId:w},O)).token,D=S7(U,U.source),P=A6(U.seal),j=y6(D,void 0,P),A;try{A=await j.get("api/auth/oauth2/session/oem-hosecloud",{searchParams:{token:M,returnToken:"1"}}).json()}catch(C){if(C instanceof D6&&C.response.status===400)throw Error(`Seal AI 用户“${Q.name}”未绑定合思账号,无法生成个人协助链接。`);throw C}let T=A.token??A.accessToken??A.data?.token;if(T){let C=await z(T),b=await aQ(C,{note:Y.note??`Delegation generated by admin for ${Q.name}`});return{targetUser:Q,delegation:b,temporaryPassword:"N/A (Hose SSO)"}}}}let K;try{K=await qg($,Q._id)}catch(q){if(I)throw Error(`用户 "${Q.name}" (${Q.mobile||Q._id}) 为合思同步账号 (provider: hosecloud),无 Seal 本地密码。`+"Seal 系统暂不支持对同步账号直接重置本地密码。");throw q}let H=(Q.mobile||Q.identities?.[0]?.providerId||"").replace(/^\+86/,"");if(!H)throw Error(`User ${Q.name} has no associated phone number for password login`);let{token:W}=await Wc0($,{phone:H,password:K.password}),X=await z(W),Z=await aQ(X,{note:Y.note??`Delegation generated by admin for ${Q.name}`});return{targetUser:Q,delegation:Z,temporaryPassword:K.password}}async function P40($){return N1(await $.get("api/v1/llm/config"),j10)}async function j40($){return N1(await $.get("api/v1/llm/providers"),L.array(T10))}async function T40($){return N1(await $.get("api/v1/permissions/available"),E10)}async function E40($){return N1(await $.get("api/v1/permissions/configs"),C10)}async function lY($){return N1(await $.get("api/v1/billing/status"),R10)}async function C40($){let z=await(await $.get("api/v1/billing/plans")).json();return b10.parse(z.data??z)}async function R40($){let z=await(await $.get("api/v1/billing/features")).json();return b10.parse(z.data??z)}var Mw,Kc0,Gc0,b10;var B6=m(()=>{dQ();P$();sQ();g7();i8();Ig();Mw=L.object({success:L.boolean().optional()}).passthrough(),Kc0=L.object({items:L.array(L.object({_id:L.string()})).optional()}).passthrough(),Gc0=L.object({user:L.unknown().optional(),session:L.object({token:L.string().optional()}).optional()}).passthrough(),b10=L.json()});var Y6=E((kp1,v40)=>{var{toString:_40}=Object.prototype,Xc0=/["&<>]/,Y3={each:function(Y,z){if(Y)if(Array.isArray(Y))Y.forEach(z);else Object.keys(Y).forEach((U)=>{z(Y[U],U)})},some:function(Y,z){if(Y){if(Array.isArray(Y))return Y.some(z);return Object.keys(Y).some((U)=>z(Y[U],U))}return!1},every:function(Y,z){if(Y){if(Array.isArray(Y))return Y.every(z);return Object.keys(Y).every((U)=>z(Y[U],U))}return!0},map:function(Y,z){if(Y){if(Array.isArray(Y))return Y.map(z);return Object.keys(Y).map((U)=>z(Y[U],U))}return[]},keyBy($,Y){return $.reduce((z,U)=>{return z[U[Y]]=U,z},{})},isEqual:function(Y,z){let U=typeof Y,Q=typeof z,J=Array.isArray(Y),I=Array.isArray(z),K;if(U!==Q)return!1;switch(typeof Y){case"object":if(J||I){if(J&&I)return Y.length===z.length&&Y.every((G,H)=>{let W=z[H];return Y3.isEqual(G,W)});return!1}if(Y===null||z===null)return Y===z;if(K=Object.keys(Y),Object.keys(z).length!==K.length)return!1;for(let G of K)if(!z.hasOwnProperty(G))return!1;return Y3.every(Y,(G,H)=>{let W=z[H];return Y3.isEqual(G,W)});default:return Y===z}},escapeHtml($){let Y=Xc0.exec($);if(!Y)return $;let z="",U="",Q=0,J=Y.index;for(;J<$.length;J++){switch($.charAt(J)){case'"':U=""";break;case"&":U="&";break;case"'":U="'";break;case"<":U="<";break;case">":U=">";break;default:continue}if(Q!==J)z+=$.substring(Q,J);Q=J+1,z+=U}if(Q!==J)return z+$.substring(Q,J);return z},strcmp($,Y){if($Y)return 1;return 0},isUndefined($){return _40.call($)==="[object Undefined]"},isObject($){return _40.call($)==="[object Object]"},deepMerge(){let $=arguments[0]||{},{length:Y}=arguments,z,U,Q;function J(I,K){if(z=$[K],Q=Array.isArray(I),Y3.isObject(I)||Q){if(Q)Q=!1,U=z&&Array.isArray(z)?z:[];else U=z&&Y3.isObject(z)?z:{};$[K]=Y3.deepMerge(U,I)}else if(!Y3.isUndefined(I))$[K]=I}for(let I=0;I{var Zc0=/^[A-Z]+\d+$/,kH={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level($){if($<=26)return 1;if($<=676)return 2;return 3},_fill($){let Y,z,U,Q,J,I=1;if($>=4)throw Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&$>=1){while(I<=26)Y=this._dictionary[I-1],this._n2l[I]=Y,this._l2n[Y]=I,I++;this._l2nFill=1}if(this._l2nFill<2&&$>=2){I=27;while(I<=702)z=I-27,U=z%26,Q=Math.floor(z/26),Y=this._dictionary[Q]+this._dictionary[U],this._n2l[I]=Y,this._l2n[Y]=I,I++;this._l2nFill=2}if(this._l2nFill<3&&$>=3){I=703;while(I<=16384)z=I-703,U=z%26,Q=Math.floor(z/26)%26,J=Math.floor(z/676),Y=this._dictionary[J]+this._dictionary[Q]+this._dictionary[U],this._n2l[I]=Y,this._l2n[Y]=I,I++;this._l2nFill=3}},l2n($){if(!this._l2n[$])this._fill($.length);if(!this._l2n[$])throw Error(`Out of bounds. Invalid column letter: ${$}`);return this._l2n[$]},n2l($){if($<1||$>16384)throw Error(`${$} is out of bounds. Excel supports columns from 1 to 16384`);if(!this._n2l[$])this._fill(this._level($));return this._n2l[$]},_hash:{},validateAddress($){if(!Zc0.test($))throw Error(`Invalid Address: ${$}`);return!0},decodeAddress($){let Y=$.length<5&&this._hash[$];if(Y)return Y;let z=!1,U="",Q=0,J=!1,I="",K=0;for(let H=0,W;H<$.length;H++)if(W=$.charCodeAt(H),!J&&W>=65&&W<=90)z=!0,U+=$[H],Q=Q*26+W-64;else if(W>=48&&W<=57)J=!0,I+=$[H],K=K*10+W-48;else if(J&&z&&W!==36)break;if(!z)Q=void 0;else if(Q>16384)throw Error(`Out of bounds. Invalid column letter: ${U}`);if(!J)K=void 0;$=U+I;let G={address:$,col:Q,row:K,$col$row:`$${U}$${I}`};if(Q<=100&&K<=100)this._hash[$]=G,this._hash[G.$col$row]=G;return G},getAddress($,Y){if(Y){let z=this.n2l(Y)+$;return this.decodeAddress(z)}return this.decodeAddress($)},decode($){let Y=$.split(":");if(Y.length===2){let z=this.decodeAddress(Y[0]),U=this.decodeAddress(Y[1]),Q={top:Math.min(z.row,U.row),left:Math.min(z.col,U.col),bottom:Math.max(z.row,U.row),right:Math.max(z.col,U.col)};return Q.tl=this.n2l(Q.left)+Q.top,Q.br=this.n2l(Q.right)+Q.bottom,Q.dimensions=`${Q.tl}:${Q.br}`,Q}return this.decodeAddress($)},decodeEx($){let Y=$.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),z=Y[1]||Y[2],U=Y[3],Q=U.split(":");if(Q.length>1){let I=this.decodeAddress(Q[0]),K=this.decodeAddress(Q[1]),G=Math.min(I.row,K.row),H=Math.min(I.col,K.col),W=Math.max(I.row,K.row),X=Math.max(I.col,K.col);return I=this.n2l(H)+G,K=this.n2l(X)+W,{top:G,left:H,bottom:W,right:X,sheetName:z,tl:{address:I,col:H,row:G,$col$row:`$${this.n2l(H)}$${G}`,sheetName:z},br:{address:K,col:X,row:W,$col$row:`$${this.n2l(X)}$${W}`,sheetName:z},dimensions:`${I}:${K}`}}if(U.startsWith("#"))return z?{sheetName:z,error:U}:{error:U};let J=this.decodeAddress(U);return z?{sheetName:z,...J}:J},encodeAddress($,Y){return kH.n2l(Y)+$},encode(){switch(arguments.length){case 2:return kH.encodeAddress(arguments[0],arguments[1]);case 4:return`${kH.encodeAddress(arguments[0],arguments[1])}:${kH.encodeAddress(arguments[2],arguments[3])}`;default:throw Error("Can only encode with 2 or 4 arguments")}},inRange($,Y){let[z,U,,Q,J]=$,[I,K]=Y;return I>=z&&I<=Q&&K>=U&&K<=J}};h40.exports=kH});var z3=E((fp1,S40)=>{var a5=n4();class Fg{constructor(){this.decode(arguments)}setTLBR($,Y,z,U,Q){if(arguments.length<4){let J=a5.decodeAddress($),I=a5.decodeAddress(Y);this.model={top:Math.min(J.row,I.row),left:Math.min(J.col,I.col),bottom:Math.max(J.row,I.row),right:Math.max(J.col,I.col),sheetName:z},this.setTLBR(J.row,J.col,I.row,I.col,Q)}else this.model={top:Math.min($,z),left:Math.min(Y,U),bottom:Math.max($,z),right:Math.max(Y,U),sheetName:Q}}decode($){switch($.length){case 5:this.setTLBR($[0],$[1],$[2],$[3],$[4]);break;case 4:this.setTLBR($[0],$[1],$[2],$[3]);break;case 3:this.setTLBR($[0],$[1],$[2]);break;case 2:this.setTLBR($[0],$[1]);break;case 1:{let Y=$[0];if(Y instanceof Fg)this.model={top:Y.model.top,left:Y.model.left,bottom:Y.model.bottom,right:Y.model.right,sheetName:Y.sheetName};else if(Y instanceof Array)this.decode(Y);else if(Y.top&&Y.left&&Y.bottom&&Y.right)this.model={top:Y.top,left:Y.left,bottom:Y.bottom,right:Y.right,sheetName:Y.sheetName};else{let z=a5.decodeEx(Y);if(z.top)this.model={top:z.top,left:z.left,bottom:z.bottom,right:z.right,sheetName:z.sheetName};else this.model={top:z.row,left:z.col,bottom:z.row,right:z.col,sheetName:z.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw Error(`Invalid number of arguments to _getDimensions() - ${$.length}`)}}get top(){return this.model.top||1}set top($){this.model.top=$}get left(){return this.model.left||1}set left($){this.model.left=$}get bottom(){return this.model.bottom||1}set bottom($){this.model.bottom=$}get right(){return this.model.right||1}set right($){this.model.right=$}get sheetName(){return this.model.sheetName}set sheetName($){this.model.sheetName=$}get _serialisedSheetName(){let{sheetName:$}=this.model;if($){if(/^[a-zA-Z0-9]*$/.test($))return`${$}!`;return`'${$}'!`}return""}expand($,Y,z,U){if(!this.model.top||$this.bottom)this.bottom=z;if(!this.model.right||U>this.right)this.right=U}expandRow($){if($){let{dimensions:Y,number:z}=$;if(Y)this.expand(z,Y.min,z,Y.max)}}expandToAddress($){let Y=a5.decodeEx($);this.expand(Y.row,Y.col,Y.row,Y.col)}get tl(){return a5.n2l(this.left)+this.top}get $t$l(){return`$${a5.n2l(this.left)}$${this.top}`}get br(){return a5.n2l(this.right)+this.bottom}get $b$r(){return`$${a5.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects($){if($.sheetName&&this.sheetName&&$.sheetName!==this.sheetName)return!1;if($.bottomthis.bottom)return!1;if($.rightthis.right)return!1;return!0}contains($){let Y=a5.decodeEx($);return this.containsEx(Y)}containsEx($){if($.sheetName&&this.sheetName&&$.sheetName!==this.sheetName)return!1;return $.row>=this.top&&$.row<=this.bottom&&$.col>=this.left&&$.col<=this.right}forEachAddress($){for(let Y=this.left;Y<=this.right;Y++)for(let z=this.top;z<=this.bottom;z++)$(a5.encodeAddress(z,Y),z,Y)}}S40.exports=Fg});var H5=E((up1,g40)=>{g40.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}});var k40=E((bp1,y40)=>{var hw=n4(),qc0=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,Vc0=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;function Lc0($,Y,z){let U=hw.decode(Y),Q=hw.decode(z);return $.replace(qc0,(J,I,K,G,H)=>{if(H)return J;let W=Vc0.exec(G);if(W){let X=W[1],Z=W[2].toUpperCase(),q=W[3],V=W[4];if(Z.length>3||Z.length===3&&Z>"XFD")return J;let F=hw.l2n(Z),w=parseInt(V,10);if(!X)F+=Q.col-U.col;if(!q)w+=Q.row-U.row;return(I||"")+(X||"")+hw.n2l(F)+(q||"")+w}return J})}y40.exports={slideFormula:Lc0}});var f40=E((ip1,x40)=>{var Fc0=Y6();class xH{constructor($){this.note=$}get model(){let $=null;switch(typeof this.note){case"string":$={type:"note",note:{texts:[{text:this.note}]}};break;default:$={type:"note",note:this.note};break}return Fc0.deepMerge({},xH.DEFAULT_CONFIGS,$)}set model($){let{note:Y}=$,{texts:z}=Y;if(z.length===1&&Object.keys(z[0]).length===1)this.note=z[0].text;else this.note=Y}static fromModel($){let Y=new xH;return Y.model=$,Y}}xH.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[0.13,0.13,0.25,0.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}};x40.exports=xH});var e40=E((np1,t40)=>{var Oc0=n4(),wc0=Y6(),W5=H5(),{slideFormula:Mc0}=k40(),u40=f40();class d0{constructor($,Y,z){if(!$||!Y)throw Error("A Cell needs a Row");this._row=$,this._column=Y,Oc0.validateAddress(z),this._address=z,this._value=x7.create(d0.Types.Null,this),this.style=this._mergeStyle($.style,Y.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt($){this.style.numFmt=$}get font(){return this.style.font}set font($){this.style.font=$}get alignment(){return this.style.alignment}set alignment($){this.style.alignment=$}get border(){return this.style.border}set border($){this.style.border=$}get fill(){return this.style.fill}set fill($){this.style.fill=$}get protection(){return this.style.protection}set protection($){this.style.protection=$}_mergeStyle($,Y,z){let U=$&&$.numFmt||Y&&Y.numFmt;if(U)z.numFmt=U;let Q=$&&$.font||Y&&Y.font;if(Q)z.font=Q;let J=$&&$.alignment||Y&&Y.alignment;if(J)z.alignment=J;let I=$&&$.border||Y&&Y.border;if(I)z.border=I;let K=$&&$.fill||Y&&Y.fill;if(K)z.fill=K;let G=$&&$.protection||Y&&Y.protection;if(G)z.protection=G;return z}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===d0.Types.Merge}merge($,Y){if(this._value.release(),this._value=x7.create(d0.Types.Merge,this,$),!Y)this.style=$.style}unmerge(){if(this.type===d0.Types.Merge)this._value.release(),this._value=x7.create(d0.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{})}isMergedTo($){if(this._value.type!==d0.Types.Merge)return!1;return this._value.isMergedTo($)}get master(){if(this.type===d0.Types.Merge)return this._value.master;return this}get isHyperlink(){return this._value.type===d0.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value($){if(this.type===d0.Types.Merge){this._value.master.value=$;return}this._value.release(),this._value=x7.create(x7.getType($),this,$)}get note(){return this._comment&&this._comment.note}set note($){this._comment=new u40($)}get text(){return this._value.toString()}get html(){return wc0.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink($){if(this.type===d0.Types.String)this._value=x7.create(d0.Types.Hyperlink,this,{text:this._value.value,hyperlink:$})}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:$}=this._row;return{sheetName:$.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name($){this.names=[$]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names($){let{definedNames:Y}=this.workbook;Y.removeAllNames(this.fullAddress),$.forEach((z)=>{Y.addEx(this.fullAddress,z)})}addName($){this.workbook.definedNames.addEx(this.fullAddress,$)}removeName($){this.workbook.definedNames.removeEx(this.fullAddress,$)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation($){this._dataValidations.add(this.address,$)}get model(){let{model:$}=this._value;if($.style=this.style,this._comment)$.comment=this._comment.model;return $}set model($){if(this._value.release(),this._value=x7.create($.type,this),this._value.model=$,$.comment)switch($.comment.type){case"note":this._comment=u40.fromModel($.comment);break}if($.style)this.style=$.style;else this.style={}}}d0.Types=W5.ValueType;class b40{constructor($){this.model={address:$.address,type:d0.Types.Null}}get value(){return null}set value($){}get type(){return d0.Types.Null}get effectiveType(){return d0.Types.Null}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return""}release(){}toString(){return""}}class i40{constructor($,Y){this.model={address:$.address,type:d0.Types.Number,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Number}get effectiveType(){return d0.Types.Number}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}class n40{constructor($,Y){this.model={address:$.address,type:d0.Types.String,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.String}get effectiveType(){return d0.Types.String}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}class c40{constructor($,Y){this.model={address:$.address,type:d0.Types.String,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}toString(){return this.model.value.richText.map(($)=>$.text).join("")}get type(){return d0.Types.RichText}get effectiveType(){return d0.Types.RichText}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}class p40{constructor($,Y){this.model={address:$.address,type:d0.Types.Date,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Date}get effectiveType(){return d0.Types.Date}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}class d40{constructor($,Y){if(this.model={address:$.address,type:d0.Types.Hyperlink,text:Y?Y.text:void 0,hyperlink:Y?Y.hyperlink:void 0},Y&&Y.tooltip)this.model.tooltip=Y.tooltip}get value(){let $={text:this.model.text,hyperlink:this.model.hyperlink};if(this.model.tooltip)$.tooltip=this.model.tooltip;return $}set value($){if(this.model={text:$.text,hyperlink:$.hyperlink},$.tooltip)this.model.tooltip=$.tooltip}get text(){return this.model.text}set text($){this.model.text=$}get hyperlink(){return this.model.hyperlink}set hyperlink($){this.model.hyperlink=$}get type(){return d0.Types.Hyperlink}get effectiveType(){return d0.Types.Hyperlink}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}class m40{constructor($,Y){if(this.model={address:$.address,type:d0.Types.Merge,master:Y?Y.address:void 0},this._master=Y,Y)Y.addMergeRef()}get value(){return this._master.value}set value($){if($ instanceof d0){if(this._master)this._master.releaseMergeRef();$.addMergeRef(),this._master=$}else this._master.value=$}isMergedTo($){return $===this._master}get master(){return this._master}get type(){return d0.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}class l40{constructor($,Y){this.cell=$,this.model={address:$.address,type:d0.Types.Formula,shareType:Y?Y.shareType:void 0,ref:Y?Y.ref:void 0,formula:Y?Y.formula:void 0,sharedFormula:Y?Y.sharedFormula:void 0,result:Y?Y.result:void 0}}_copyModel($){let Y={},z=(U)=>{let Q=$[U];if(Q)Y[U]=Q};return z("formula"),z("result"),z("ref"),z("shareType"),z("sharedFormula"),Y}get value(){return this._copyModel(this.model)}set value($){this.model=this._copyModel($)}validate($){switch(x7.getType($)){case d0.Types.Null:case d0.Types.String:case d0.Types.Number:case d0.Types.Date:break;case d0.Types.Hyperlink:case d0.Types.Formula:default:throw Error("Cannot process that type of result value")}}get dependencies(){let $=this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),Y=this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g);return{ranges:$,cells:Y}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula($){this.model.formula=$}get formulaType(){if(this.model.formula)return W5.FormulaType.Master;if(this.model.sharedFormula)return W5.FormulaType.Shared;return W5.FormulaType.None}get result(){return this.model.result}set result($){this.model.result=$}get type(){return d0.Types.Formula}get effectiveType(){let $=this.model.result;if($===null||$===void 0)return W5.ValueType.Null;if($ instanceof String||typeof $==="string")return W5.ValueType.String;if(typeof $==="number")return W5.ValueType.Number;if($ instanceof Date)return W5.ValueType.Date;if($.text&&$.hyperlink)return W5.ValueType.Hyperlink;if($.formula)return W5.ValueType.Formula;return W5.ValueType.Null}get address(){return this.model.address}set address($){this.model.address=$}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:$}=this.cell,Y=$.findCell(this.model.sharedFormula);this._translatedFormula=Y&&Mc0(Y.formula,Y.address,this.model.address)}return this._translatedFormula}toCsvString(){return`${this.model.result||""}`}release(){}toString(){return this.model.result?this.model.result.toString():""}}class o40{constructor($,Y){this.model={address:$.address,type:d0.Types.SharedString,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.SharedString}get effectiveType(){return d0.Types.SharedString}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}class r40{constructor($,Y){this.model={address:$.address,type:d0.Types.Boolean,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Boolean}get effectiveType(){return d0.Types.Boolean}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}class s40{constructor($,Y){this.model={address:$.address,type:d0.Types.Error,value:Y}}get value(){return this.model.value}set value($){this.model.value=$}get type(){return d0.Types.Error}get effectiveType(){return d0.Types.Error}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}class a40{constructor($,Y){this.model={address:$.address,type:d0.Types.String,value:JSON.stringify(Y),rawValue:Y}}get value(){return this.model.rawValue}set value($){this.model.rawValue=$,this.model.value=JSON.stringify($)}get type(){return d0.Types.String}get effectiveType(){return d0.Types.String}get address(){return this.model.address}set address($){this.model.address=$}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}var x7={getType($){if($===null||$===void 0)return d0.Types.Null;if($ instanceof String||typeof $==="string")return d0.Types.String;if(typeof $==="number")return d0.Types.Number;if(typeof $==="boolean")return d0.Types.Boolean;if($ instanceof Date)return d0.Types.Date;if($.text&&$.hyperlink)return d0.Types.Hyperlink;if($.formula||$.sharedFormula)return d0.Types.Formula;if($.richText)return d0.Types.RichText;if($.sharedString)return d0.Types.SharedString;if($.error)return d0.Types.Error;return d0.Types.JSON},types:[{t:d0.Types.Null,f:b40},{t:d0.Types.Number,f:i40},{t:d0.Types.String,f:n40},{t:d0.Types.Date,f:p40},{t:d0.Types.Hyperlink,f:d40},{t:d0.Types.Formula,f:l40},{t:d0.Types.Merge,f:m40},{t:d0.Types.JSON,f:a40},{t:d0.Types.SharedString,f:o40},{t:d0.Types.RichText,f:c40},{t:d0.Types.Boolean,f:r40},{t:d0.Types.Error,f:s40}].reduce(($,Y)=>{return $[Y.t]=Y.f,$},[]),create($,Y,z){let U=this.types[$];if(!U)throw Error(`Could not create Value of type ${$}`);return new U(Y,z)}};t40.exports=d0});var gw=E((cp1,z60)=>{var Nc0=Y6(),Sw=H5(),oY=n4(),$60=e40();class Y60{constructor($,Y){this._worksheet=$,this._number=Y,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell($){return this._cells[$-1]}getCellEx($){let Y=this._cells[$.col-1];if(!Y){let z=this._worksheet.getColumn($.col);Y=new $60(this,z,$.address),this._cells[$.col-1]=Y}return Y}getCell($){if(typeof $==="string"){let Y=this._worksheet.getColumnKey($);if(Y)$=Y.number;else $=oY.l2n($)}return this._cells[$-1]||this.getCellEx({address:oY.encodeAddress(this._number,$),row:this._number,col:$})}splice($,Y,...z){let U=$+Y,Q=z.length-Y,J=this._cells.length,I,K,G;if(Q<0){for(I=$+z.length;I<=J;I++)if(G=this._cells[I-1],K=this._cells[I-Q-1],K)G=this.getCell(I),G.value=K.value,G.style=K.style,G._comment=K._comment;else if(G)G.value=null,G.style={},G._comment=void 0}else if(Q>0)for(I=J;I>=U;I--)if(K=this._cells[I-1],K)G=this.getCell(I+Q),G.value=K.value,G.style=K.style,G._comment=K._comment;else this._cells[I+Q-1]=void 0;for(I=0;I{if(z&&z.type!==Sw.ValueType.Null)Y(z,U+1)})}addPageBreak($,Y){let z=this._worksheet,U=Math.max(0,$-1)||0,Q=Math.max(0,Y-1)||16838,J={id:this._number,max:Q,man:1};if(U)J.min=U;z.rowBreaks.push(J)}get values(){let $=[];return this._cells.forEach((Y)=>{if(Y&&Y.type!==Sw.ValueType.Null)$[Y.col]=Y.value}),$}set values($){if(this._cells=[],!$);else if($ instanceof Array){let Y=0;if($.hasOwnProperty("0"))Y=1;$.forEach((z,U)=>{if(z!==void 0)this.getCellEx({address:oY.encodeAddress(this._number,U+Y),row:this._number,col:U+Y}).value=z})}else this._worksheet.eachColumnKey((Y,z)=>{if($[z]!==void 0)this.getCellEx({address:oY.encodeAddress(this._number,Y.number),row:this._number,col:Y.number}).value=$[z]})}get hasValues(){return Nc0.some(this._cells,($)=>$&&$.type!==Sw.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let $=0;return this.eachCell(()=>{$++}),$}get dimensions(){let $=0,Y=0;return this._cells.forEach((z)=>{if(z&&z.type!==Sw.ValueType.Null){if(!$||$>z.col)$=z.col;if(Y0?{min:$,max:Y}:null}_applyStyle($,Y){return this.style[$]=Y,this._cells.forEach((z)=>{if(z)z[$]=Y}),Y}get numFmt(){return this.style.numFmt}set numFmt($){this._applyStyle("numFmt",$)}get font(){return this.style.font}set font($){this._applyStyle("font",$)}get alignment(){return this.style.alignment}set alignment($){this._applyStyle("alignment",$)}get protection(){return this.style.protection}set protection($){this._applyStyle("protection",$)}get border(){return this.style.border}set border($){this._applyStyle("border",$)}get fill(){return this.style.fill}set fill($){this._applyStyle("fill",$)}get hidden(){return!!this._hidden}set hidden($){this._hidden=$}get outlineLevel(){return this._outlineLevel||0}set outlineLevel($){this._outlineLevel=$}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let $=[],Y=0,z=0;return this._cells.forEach((U)=>{if(U){let Q=U.model;if(Q){if(!Y||Y>U.col)Y=U.col;if(z{switch(z.type){case $60.Types.Merge:break;default:{let U;if(z.address)U=oY.decodeAddress(z.address);else if(Y){let{row:J}=Y,I=Y.col+1;U={row:J,col:I,address:oY.encodeAddress(J,I),$col$row:`$${oY.n2l(I)}$${J}`}}Y=U;let Q=this.getCellEx(U);Q.model=z;break}}}),$.height)this.height=$.height;else delete this.height;this.hidden=$.hidden,this.outlineLevel=$.outlineLevel||0,this.style=$.style&&JSON.parse(JSON.stringify($.style))||{}}}z60.exports=Y60});var kw=E((pp1,U60)=>{var Dc0=Y6(),Ac0=H5(),Bc0=n4();class yw{constructor($,Y,z){if(this._worksheet=$,this._number=Y,z!==!1)this.defn=z}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return Bc0.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn($){if($){if(this.key=$.key,this.width=$.width!==void 0?$.width:9,this.outlineLevel=$.outlineLevel,$.style)this.style=$.style;else this.style={};this.header=$.header,this._hidden=!!$.hidden}else delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header($){if($!==void 0)this._header=$,this.headers.forEach((Y,z)=>{this._worksheet.getCell(z+1,this.number).value=Y});else this._header=void 0}get key(){return this._key}set key($){if((this._key&&this._worksheet.getColumnKey(this._key))===this)this._worksheet.deleteColumnKey(this._key);if(this._key=$,$)this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden($){this._hidden=$}get outlineLevel(){return this._outlineLevel||0}set outlineLevel($){this._outlineLevel=$}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo($){return this.width===$.width&&this.hidden===$.hidden&&this.outlineLevel===$.outlineLevel&&Dc0.isEqual(this.style,$.style)}get isDefault(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;let $=this.style;if($&&($.font||$.numFmt||$.alignment||$.border||$.fill||$.protection))return!1;return!0}get headerCount(){return this.headers.length}eachCell($,Y){let z=this.number;if(!Y)Y=$,$=null;this._worksheet.eachRow($,(U,Q)=>{Y(U.getCell(z),Q)})}get values(){let $=[];return this.eachCell((Y,z)=>{if(Y&&Y.type!==Ac0.ValueType.Null)$[z]=Y.value}),$}set values($){if(!$)return;let Y=this.number,z=0;if($.hasOwnProperty("0"))z=1;$.forEach((U,Q)=>{this._worksheet.getCell(Q+z,Y).value=U})}_applyStyle($,Y){return this.style[$]=Y,this.eachCell((z)=>{z[$]=Y}),Y}get numFmt(){return this.style.numFmt}set numFmt($){this._applyStyle("numFmt",$)}get font(){return this.style.font}set font($){this._applyStyle("font",$)}get alignment(){return this.style.alignment}set alignment($){this._applyStyle("alignment",$)}get protection(){return this.style.protection}set protection($){this._applyStyle("protection",$)}get border(){return this.style.border}set border($){this._applyStyle("border",$)}get fill(){return this.style.fill}set fill($){this._applyStyle("fill",$)}static toModel($){let Y=[],z=null;if($)$.forEach((U,Q)=>{if(U.isDefault){if(z)z=null}else if(!z||!U.equivalentTo(z))z={min:Q+1,max:Q+1,width:U.width!==void 0?U.width:9,style:U.style,isCustomWidth:U.isCustomWidth,hidden:U.hidden,outlineLevel:U.outlineLevel,collapsed:U.collapsed},Y.push(z);else z.max=Q+1});return Y.length?Y:void 0}static fromModel($,Y){Y=Y||[];let z=[],U=1,Q=0;Y=Y.sort(function(J,I){return J.min-I.min});while(Q{var Pc0=n4();class xw{constructor($,Y,z=0){if(this.worksheet=$,!Y)this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;else if(typeof Y==="string"){let U=Pc0.decodeAddress(Y);this.nativeCol=U.col+z,this.nativeColOff=0,this.nativeRow=U.row+z,this.nativeRowOff=0}else if(Y.nativeCol!==void 0)this.nativeCol=Y.nativeCol||0,this.nativeColOff=Y.nativeColOff||0,this.nativeRow=Y.nativeRow||0,this.nativeRowOff=Y.nativeRowOff||0;else if(Y.col!==void 0)this.col=Y.col+z,this.row=Y.row+z;else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance($){return $ instanceof xw||$==null?$:new xw($)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col($){this.nativeCol=Math.floor($),this.nativeColOff=Math.floor(($-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row($){this.nativeRow=Math.floor($),this.nativeRowOff=Math.floor(($-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(this.worksheet.getColumn(this.nativeCol+1).width*1e4):640000}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(this.worksheet.getRow(this.nativeRow+1).height*1e4):180000}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model($){this.nativeCol=$.nativeCol,this.nativeColOff=$.nativeColOff,this.nativeRow=$.nativeRow,this.nativeRowOff=$.nativeRowOff}}Q60.exports=xw});var G60=E((mp1,K60)=>{var jc0=n4(),fw=J60();class I60{constructor($,Y){this.worksheet=$,this.model=Y}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw Error("Invalid Image Type")}}set model({type:$,imageId:Y,range:z,hyperlinks:U}){if(this.type=$,this.imageId=Y,$==="image")if(typeof z==="string"){let Q=jc0.decode(z);this.range={tl:new fw(this.worksheet,{col:Q.left,row:Q.top},-1),br:new fw(this.worksheet,{col:Q.right,row:Q.bottom},0),editAs:"oneCell"}}else this.range={tl:new fw(this.worksheet,z.tl,0),br:z.br&&new fw(this.worksheet,z.br,0),ext:z.ext,editAs:z.editAs,hyperlinks:U||z.hyperlinks}}}K60.exports=I60});var Z60=E((lp1,X60)=>{var uw=n4();class H60{constructor($,Y,z){this.table=$,this.column=Y,this.index=z}_set($,Y){this.table.cacheState(),this.column[$]=Y}get name(){return this.column.name}set name($){this._set("name",$)}get filterButton(){return this.column.filterButton}set filterButton($){this.column.filterButton=$}get style(){return this.column.style}set style($){this.column.style=$}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel($){this._set("totalsRowLabel",$)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction($){this._set("totalsRowFunction",$)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult($){this._set("totalsRowResult",$)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula($){this._set("totalsRowFormula",$)}}class W60{constructor($,Y){if(this.worksheet=$,Y)this.table=Y,this.validate(),this.store()}getFormula($){switch($.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${$.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${$.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${$.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${$.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${$.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${$.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${$.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${$.name}])`;case"custom":return $.totalsRowFormula;default:throw Error(`Invalid Totals Row Function: ${$.totalsRowFunction}`)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:$}=this,Y=(G,H,W)=>{if(G[H]===void 0)G[H]=W};Y($,"headerRow",!0),Y($,"totalsRow",!1),Y($,"style",{}),Y($.style,"theme","TableStyleMedium2"),Y($.style,"showFirstColumn",!1),Y($.style,"showLastColumn",!1),Y($.style,"showRowStripes",!1),Y($.style,"showColumnStripes",!1);let z=(G,H)=>{if(!G)throw Error(H)};z($.ref,"Table must have ref"),z($.columns,"Table must have column definitions"),z($.rows,"Table must have row definitions"),$.tl=uw.decodeAddress($.ref);let{row:U,col:Q}=$.tl;z(U>0,"Table must be on valid row"),z(Q>0,"Table must be on valid col");let{width:J,filterHeight:I,tableHeight:K}=this;$.autoFilterRef=uw.encode(U,Q,U+I-1,Q+J-1),$.tableRef=uw.encode(U,Q,U+K-1,Q+J-1),$.columns.forEach((G,H)=>{if(z(G.name,`Column ${H} must have a name`),H===0)Y(G,"totalsRowLabel","Total");else Y(G,"totalsRowFunction","none"),G.totalsRowFormula=this.getFormula(G)})}store(){let $=(I,K)=>{if(K)Object.keys(K).forEach((G)=>{I[G]=K[G]})},{worksheet:Y,table:z}=this,{row:U,col:Q}=z.tl,J=0;if(z.headerRow){let I=Y.getRow(U+J++);z.columns.forEach((K,G)=>{let{style:H,name:W}=K,X=I.getCell(Q+G);X.value=W,$(X,H)})}if(z.rows.forEach((I)=>{let K=Y.getRow(U+J++);I.forEach((G,H)=>{let W=K.getCell(Q+H);W.value=G,$(W,z.columns[H].style)})}),z.totalsRow){let I=Y.getRow(U+J++);z.columns.forEach((K,G)=>{let H=I.getCell(Q+G);if(G===0)H.value=K.totalsRowLabel;else if(this.getFormula(K))H.value={formula:K.totalsRowFormula,result:K.totalsRowResult};else H.value=null;$(H,K.style)})}}load($){let{table:Y}=this,{row:z,col:U}=Y.tl,Q=0;if(Y.headerRow){let J=$.getRow(z+Q++);Y.columns.forEach((I,K)=>{let G=J.getCell(U+K);G.value=I.name})}if(Y.rows.forEach((J)=>{let I=$.getRow(z+Q++);J.forEach((K,G)=>{let H=I.getCell(U+G);H.value=K})}),Y.totalsRow){let J=$.getRow(z+Q++);Y.columns.forEach((I,K)=>{let G=J.getCell(U+K);if(K===0)G.value=I.totalsRowLabel;else if(this.getFormula(I))G.value={formula:I.totalsRowFormula,result:I.totalsRowResult}})}}get model(){return this.table}set model($){this.table=$}cacheState(){if(!this._cache)this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight}}commit(){if(!this._cache)return;this.validate();let $=uw.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let Y=0;Y{U.push(Y[Q])});else this.table.columns.splice(z,0,$),this.table.rows.forEach((U,Q)=>{U.splice(z,0,Y[Q])})}removeColumns($,Y=1){this.cacheState(),this.table.columns.splice($,Y),this.table.rows.forEach((z)=>{z.splice($,Y)})}_assign($,Y,z){this.cacheState(),$[Y]=z}get ref(){return this.table.ref}set ref($){this._assign(this.table,"ref",$)}get name(){return this.table.name}set name($){this.table.name=$}get displayName(){return this.table.displyName||this.table.name}set displayNamename($){this.table.displayName=$}get headerRow(){return this.table.headerRow}set headerRow($){this._assign(this.table,"headerRow",$)}get totalsRow(){return this.table.totalsRow}set totalsRow($){this._assign(this.table,"totalsRow",$)}get theme(){return this.table.style.name}set theme($){this.table.style.name=$}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn($){this.table.style.showFirstColumn=$}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn($){this.table.style.showLastColumn=$}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes($){this.table.style.showRowStripes=$}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes($){this.table.style.showColumnStripes=$}}X60.exports=W60});var Og=E((op1,V60)=>{class q60{constructor($){this.model=$||{}}add($,Y){return this.model[$]=Y}find($){return this.model[$]}remove($){this.model[$]=void 0}}V60.exports=q60});var Mg=E((rp1,L60)=>{var wg=I0("crypto"),Tc0={hash($,...Y){let z=wg.createHash($);return z.update(Buffer.concat(Y)),z.digest()},convertPasswordToHash($,Y,z,U){if(Y=Y.toLowerCase(),wg.getHashes().indexOf(Y)<0)throw Error(`Hash algorithm '${Y}' not supported!`);let J=Buffer.from($,"utf16le"),I=this.hash(Y,Buffer.from(z,"base64"),J);for(let K=0;K{var F60=($,Y)=>({...$,...Y.reduce((z,U)=>{if($[U])z[U]={...$[U]};return z},{})}),t5=($,Y,z,U=[])=>{if($[z])Y[z]=F60($[z],U)},Ec0=($)=>Object.keys($).length===0,Cc0=($)=>{if(!$)return $;if(Ec0($))return{};let Y={...$};if(t5($,Y,"font",["color"]),t5($,Y,"alignment"),t5($,Y,"protection"),$.border)t5($,Y,"border"),t5($.border,Y.border,"top",["color"]),t5($.border,Y.border,"left",["color"]),t5($.border,Y.border,"bottom",["color"]),t5($.border,Y.border,"right",["color"]),t5($.border,Y.border,"diagonal",["color"]);if($.fill){if(t5($,Y,"fill",["fgColor","bgColor","center"]),$.fill.stops)Y.fill.stops=$.fill.stops.map((z)=>F60(z,["color"]))}return Y};Rc0.copyStyle=Cc0});var j60=E((ap1,P60)=>{var fH=Y6(),uH=n4(),bH=z3(),w60=gw(),bw=kw(),vc0=H5(),Ng=G60(),M60=Z60(),N60=Og(),D60=Mg(),{copyStyle:A60}=O60();class B60{constructor($){$=$||{},this._workbook=$.workbook,this.id=$.id,this.orderNo=$.orderNo,this.name=$.name,this.state=$.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},$.properties),this.pageSetup=Object.assign({},{margins:{left:0.7,right:0.7,top:0.75,bottom:0.75,header:0.3,footer:0.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!!($.pageSetup&&($.pageSetup.fitToWidth||$.pageSetup.fitToHeight)&&!$.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},$.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},$.headerFooter),this.dataValidations=new N60,this.views=$.views||[],this.autoFilter=$.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name($){if($===void 0)$=`sheet${this.id}`;if(this._name===$)return;if(typeof $!=="string")throw Error("The name has to be a string.");if($==="")throw Error("The name can't be empty.");if($==="History")throw Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test($))throw Error(`Worksheet name ${$} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test($))throw Error(`The first or last character of worksheet name cannot be a single quotation mark: ${$}`);if($&&$.length>31)console.warn(`Worksheet name ${$} exceeds 31 chars. This will be truncated`),$=$.substring(0,31);if(this._workbook._worksheets.find((Y)=>Y&&Y.name.toLowerCase()===$.toLowerCase()))throw Error(`Worksheet name already exists: ${$}`);this._name=$}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let $=new bH;return this._rows.forEach((Y)=>{if(Y){let z=Y.dimensions;if(z)$.expand(Y.number,z.min,Y.number,z.max)}}),$}get columns(){return this._columns}set columns($){this._headerRowCount=$.reduce((U,Q)=>{let J=Q.header&&1||Q.headers&&Q.headers.length||0;return Math.max(U,J)},0);let Y=1,z=this._columns=[];$.forEach((U)=>{let Q=new bw(this,Y++,!1);z.push(Q),Q.defn=U})}getColumnKey($){return this._keys[$]}setColumnKey($,Y){this._keys[$]=Y}deleteColumnKey($){delete this._keys[$]}eachColumnKey($){fH.each(this._keys,$)}getColumn($){if(typeof $==="string"){let Y=this._keys[$];if(Y)return Y;$=uH.l2n($)}if(!this._columns)this._columns=[];if($>this._columns.length){let Y=this._columns.length+1;while(Y<=$)this._columns.push(new bw(this,Y++))}return this._columns[$-1]}spliceColumns($,Y,...z){let Q=this._rows.length;if(z.length>0)for(let G=0;G{H.push(X[G]||null)});let W=this.getRow(G+1);W.splice.apply(W,H)}else this._rows.forEach((G)=>{if(G)G.splice($,Y)});let J=z.length-Y,I=$+Y,K=this._columns.length;if(J<0)for(let G=$+z.length;G<=K;G++)this.getColumn(G).defn=this.getColumn(G-J).defn;else if(J>0)for(let G=K;G>=I;G--)this.getColumn(G+J).defn=this.getColumn(G).defn;for(let G=$;G<$+z.length;G++)this.getColumn(G).defn=null;this.workbook.definedNames.spliceColumns(this.name,$,Y,z.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let $=0;return this.eachRow((Y)=>{$=Math.max($,Y.cellCount)}),$}get actualColumnCount(){let $=[],Y=0;return this.eachRow((z)=>{z.eachCell(({col:U})=>{if(!$[U])$[U]=!0,Y++})}),Y}_commitRow(){}get _lastRowNumber(){let $=this._rows,Y=$.length;while(Y>0&&$[Y-1]===void 0)Y--;return Y}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1];return}findRow($){return this._rows[$-1]}findRows($,Y){return this._rows.slice($-1,$-1+Y)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let $=0;return this.eachRow(()=>{$++}),$}getRow($){let Y=this._rows[$-1];if(!Y)Y=this._rows[$-1]=new w60(this,$);return Y}getRows($,Y){if(Y<1)return;let z=[];for(let U=$;U<$+Y;U++)z.push(this.getRow(U));return z}addRow($,Y="n"){let z=this._nextRow,U=this.getRow(z);return U.values=$,this._setStyleOption(z,Y[0]==="i"?Y:"n"),U}addRows($,Y="n"){let z=[];return $.forEach((U)=>{z.push(this.addRow(U,Y))}),z}insertRow($,Y,z="n"){return this.spliceRows($,0,Y),this._setStyleOption($,z),this.getRow($)}insertRows($,Y,z="n"){if(this.spliceRows($,0,...Y),z!=="n"){for(let U=0;U{Q.getCell(I).style=A60(J.style)}),Q.height=U.height}duplicateRow($,Y,z=!1){let U=this._rows[$-1],Q=Array(Y).fill(U.values);this.spliceRows($+1,z?0:Y,...Q);for(let J=0;J{I.getCell(G).style=K.style})}}spliceRows($,Y,...z){let U=$+Y,Q=z.length,J=Q-Y,I=this._rows.length,K,G;if(J<0){if($===I)this._rows[I-1]=void 0;for(K=U;K<=I;K++)if(G=this._rows[K-1],G){let H=this.getRow(K+J);H.values=G.values,H.style=G.style,H.height=G.height,G.eachCell({includeEmpty:!0},(W,X)=>{H.getCell(X).style=W.style}),this._rows[K-1]=void 0}else this._rows[K+J-1]=void 0}else if(J>0)for(K=I;K>=U;K--)if(G=this._rows[K-1],G){let H=this.getRow(K+J);H.values=G.values,H.style=G.style,H.height=G.height,G.eachCell({includeEmpty:!0},(W,X)=>{if(H.getCell(X).style=W.style,W._value.constructor.name==="MergeValue"){let Z=this.getRow(W._row._number+Q).getCell(X),q=W._value._master,V=this.getRow(q._row._number+Q).getCell(q._column._number);Z.merge(V)}})}else this._rows[K+J-1]=void 0;for(K=0;K{if(z&&z.hasValues)Y(z,z.number)})}getSheetValues(){let $=[];return this._rows.forEach((Y)=>{if(Y)$[Y.number]=Y.values}),$}findCell($,Y){let z=uH.getAddress($,Y),U=this._rows[z.row-1];return U?U.findCell(z.col):void 0}getCell($,Y){let z=uH.getAddress($,Y);return this.getRow(z.row).getCellEx(z)}mergeCells(...$){let Y=new bH($);this._mergeCellsInternal(Y)}mergeCellsWithoutStyle(...$){let Y=new bH($);this._mergeCellsInternal(Y,!0)}_mergeCellsInternal($,Y){fH.each(this._merges,(U)=>{if(U.intersects($))throw Error("Cannot merge already merged cells")});let z=this.getCell($.top,$.left);for(let U=$.top;U<=$.bottom;U++)for(let Q=$.left;Q<=$.right;Q++)if(U>$.top||Q>$.left)this.getCell(U,Q).merge(z,Y);this._merges[z.address]=$}_unMergeMaster($){let Y=this._merges[$.address];if(Y){for(let z=Y.top;z<=Y.bottom;z++)for(let U=Y.left;U<=Y.right;U++)this.getCell(z,U).unmerge();delete this._merges[$.address]}}get hasMerges(){return fH.some(this._merges,Boolean)}unMergeCells(...$){let Y=new bH($);for(let z=Y.top;z<=Y.bottom;z++)for(let U=Y.left;U<=Y.right;U++){let Q=this.findCell(z,U);if(Q){if(Q.type===vc0.ValueType.Merge)this._unMergeMaster(Q.master);else if(this._merges[Q.address])this._unMergeMaster(Q)}}}fillFormula($,Y,z,U="shared"){let Q=uH.decode($),{top:J,left:I,bottom:K,right:G}=Q,H=G-I+1,W=uH.encodeAddress(J,I),X=U==="shared",Z;if(typeof z==="function")Z=z;else if(Array.isArray(z))if(Array.isArray(z[0]))Z=(V,F)=>z[V-J][F-I];else Z=(V,F)=>z[(V-J)*H+(F-I)];else Z=()=>{return};let q=!0;for(let V=J;V<=K;V++)for(let F=I;F<=G;F++)if(q)this.getCell(V,F).value={shareType:U,formula:Y,ref:$,result:Z(V,F)},q=!1;else this.getCell(V,F).value=X?{sharedFormula:W,result:Z(V,F)}:Z(V,F)}addImage($,Y){let z={type:"image",imageId:$,range:Y};this._media.push(new Ng(this,z))}getImages(){return this._media.filter(($)=>$.type==="image")}addBackgroundImage($){let Y={type:"background",imageId:$};this._media.push(new Ng(this,Y))}getBackgroundImageId(){let $=this._media.find((Y)=>Y.type==="background");return $&&$.imageId}protect($,Y){return new Promise((z)=>{if(this.sheetProtection={sheet:!0},Y&&"spinCount"in Y)Y.spinCount=Number.isFinite(Y.spinCount)?Math.round(Math.max(0,Y.spinCount)):1e5;if($)this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=D60.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=Y&&"spinCount"in Y?Y.spinCount:1e5,this.sheetProtection.hashValue=D60.convertPasswordToHash($,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount);if(Y){if(this.sheetProtection=Object.assign(this.sheetProtection,Y),!$&&"spinCount"in Y)delete this.sheetProtection.spinCount}z()})}unprotect(){this.sheetProtection=null}addTable($){let Y=new M60(this,$);return this.tables[$.name]=Y,Y}getTable($){return this.tables[$]}removeTable($){delete this.tables[$]}getTables(){return Object.values(this.tables)}addConditionalFormatting($){this.conditionalFormattings.push($)}removeConditionalFormatting($){if(typeof $==="number")this.conditionalFormattings.splice($,1);else if($ instanceof Function)this.conditionalFormattings=this.conditionalFormattings.filter($);else this.conditionalFormattings=[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor($){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=$}get model(){let $={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map((U)=>U.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map((U)=>U.model),conditionalFormattings:this.conditionalFormattings};$.cols=bw.toModel(this.columns);let Y=$.rows=[],z=$.dimensions=new bH;return this._rows.forEach((U)=>{let Q=U&&U.model;if(Q)z.expand(Q.number,Q.min,Q.number,Q.max),Y.push(Q)}),$.merges=[],fH.each(this._merges,(U)=>{$.merges.push(U.range)}),$}_parseRows($){this._rows=[],$.rows.forEach((Y)=>{let z=new w60(this,Y.number);this._rows[z.number-1]=z,z.model=Y})}_parseMergeCells($){fH.each($.mergeCells,(Y)=>{this.mergeCellsWithoutStyle(Y)})}set model($){this.name=$.name,this._columns=bw.fromModel(this,$.cols),this._parseRows($),this._parseMergeCells($),this.dataValidations=new N60($.dataValidations),this.properties=$.properties,this.pageSetup=$.pageSetup,this.headerFooter=$.headerFooter,this.views=$.views,this.autoFilter=$.autoFilter,this._media=$.media.map((Y)=>new Ng(this,Y)),this.sheetProtection=$.sheetProtection,this.tables=$.tables.reduce((Y,z)=>{let U=new M60;return U.model=z,Y[z.name]=U,Y},{}),this.conditionalFormattings=$.conditionalFormattings}}P60.exports=B60});var R60=E((tp1,C60)=>{var T60=Y6(),iw=n4();class E60{constructor($){this.template=$,this.sheets={}}addCell($){this.addCellEx(iw.decodeEx($))}getCell($){return this.findCellEx(iw.decodeEx($),!0)}findCell($){return this.findCellEx(iw.decodeEx($),!1)}findCellAt($,Y,z){let U=this.sheets[$],Q=U&&U[Y];return Q&&Q[z]}addCellEx($){if($.top)for(let Y=$.top;Y<=$.bottom;Y++)for(let z=$.left;z<=$.right;z++)this.getCellAt($.sheetName,Y,z);else this.findCellEx($,!0)}getCellEx($){return this.findCellEx($,!0)}findCellEx($,Y){let z=this.findSheet($,Y),U=this.findSheetRow(z,$,Y);return this.findRowCell(U,$,Y)}getCellAt($,Y,z){let U=this.sheets[$]||(this.sheets[$]=[]),Q=U[Y]||(U[Y]=[]);return Q[z]||(Q[z]={sheetName:$,address:iw.n2l(z)+Y,row:Y,col:z})}removeCellEx($){let Y=this.findSheet($);if(!Y)return;let z=this.findSheetRow(Y,$);if(!z)return;delete z[$.col]}forEachInSheet($,Y){let z=this.sheets[$];if(z)z.forEach((U,Q)=>{if(U)U.forEach((J,I)=>{if(J)Y(J,Q,I)})})}forEach($){T60.each(this.sheets,(Y,z)=>{this.forEachInSheet(z,$)})}map($){let Y=[];return this.forEach((z)=>{Y.push($(z))}),Y}findSheet($,Y){let z=$.sheetName;if(this.sheets[z])return this.sheets[z];if(Y)return this.sheets[z]=[];return}findSheetRow($,Y,z){let{row:U}=Y;if($&&$[U])return $[U];if(z)return $[U]=[];return}findRowCell($,Y,z){let{col:U}=Y;if($&&$[U])return $[U];if(z)return $[U]=this.template?Object.assign(Y,JSON.parse(JSON.stringify(this.template))):Y;return}spliceRows($,Y,z,U){let Q=this.sheets[$];if(Q){let J=[];for(let I=0;I{I.splice(Y,z,...J)})}}}C60.exports=E60});var Dg=E((ep1,h60)=>{var eQ=Y6(),iH=n4(),_60=R60(),hc0=z3(),Sc0=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;class v60{constructor(){this.matrixMap={}}getMatrix($){return this.matrixMap[$]||(this.matrixMap[$]=new _60)}add($,Y){let z=iH.decodeEx($);this.addEx(z,Y)}addEx($,Y){let z=this.getMatrix(Y);if($.top)for(let U=$.left;U<=$.right;U++)for(let Q=$.top;Q<=$.bottom;Q++){let J={sheetName:$.sheetName,address:iH.n2l(U)+Q,row:Q,col:U};z.addCellEx(J)}else z.addCellEx($)}remove($,Y){let z=iH.decodeEx($);this.removeEx(z,Y)}removeEx($,Y){this.getMatrix(Y).removeCellEx($)}removeAllNames($){eQ.each(this.matrixMap,(Y)=>{Y.removeCellEx($)})}forEach($){eQ.each(this.matrixMap,(Y,z)=>{Y.forEach((U)=>{$(z,U)})})}getNames($){return this.getNamesEx(iH.decodeEx($))}getNamesEx($){return eQ.map(this.matrixMap,(Y,z)=>Y.findCellEx($)&&z).filter(Boolean)}_explore($,Y){Y.mark=!1;let{sheetName:z}=Y,U=new hc0(Y.row,Y.col,Y.row,Y.col,z),Q,J;function I(G,H){let W=$.findCellAt(z,G,Y.col);if(!W||!W.mark)return!1;return U[H]=G,W.mark=!1,!0}for(J=Y.row-1;I(J,"top");J--);for(J=Y.row+1;I(J,"bottom");J++);function K(G,H){let W=[];for(J=U.top;J<=U.bottom;J++){let X=$.findCellAt(z,J,G);if(X&&X.mark)W.push(X);else return!1}U[H]=G;for(let X=0;X{U.mark=!0});let z=Y.map((U)=>U.mark&&this._explore(Y,U)).filter(Boolean).map((U)=>U.$shortRange);return{name:$,ranges:z}}normaliseMatrix($,Y){$.forEachInSheet(Y,(z,U,Q)=>{if(z){if(z.row!==U||z.col!==Q)z.row=U,z.col=Q,z.address=iH.n2l(Q)+U}})}spliceRows($,Y,z,U){eQ.each(this.matrixMap,(Q)=>{Q.spliceRows($,Y,z,U),this.normaliseMatrix(Q,$)})}spliceColumns($,Y,z,U){eQ.each(this.matrixMap,(Q)=>{Q.spliceColumns($,Y,z,U),this.normaliseMatrix(Q,$)})}get model(){return eQ.map(this.matrixMap,($,Y)=>this.getRanges(Y,$)).filter(($)=>$.ranges.length)}set model($){let Y=this.matrixMap={};$.forEach((z)=>{let U=Y[z.name]=new _60;z.ranges.forEach((Q)=>{if(Sc0.test(Q.split("!").pop()||""))U.addCell(Q)})})}}h60.exports=v60});var I6=E(($d1,Ag)=>{if(typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0)Ag.exports={nextTick:gc0};else Ag.exports=process;function gc0($,Y,z,U){if(typeof $!=="function")throw TypeError('"callback" argument must be a function');var Q=arguments.length,J,I;switch(Q){case 0:case 1:return process.nextTick($);case 2:return process.nextTick(function(){$.call(null,Y)});case 3:return process.nextTick(function(){$.call(null,Y,z)});case 4:return process.nextTick(function(){$.call(null,Y,z,U)});default:J=Array(Q-1),I=0;while(I{var yc0={}.toString;S60.exports=Array.isArray||function($){return yc0.call($)=="[object Array]"}});var K6=E((Bg,y60)=>{var nw=I0("buffer"),U3=nw.Buffer;function g60($,Y){for(var z in $)Y[z]=$[z]}if(U3.from&&U3.alloc&&U3.allocUnsafe&&U3.allocUnsafeSlow)y60.exports=nw;else g60(nw,Bg),Bg.Buffer=YJ;function YJ($,Y,z){return U3($,Y,z)}g60(U3,YJ);YJ.from=function($,Y,z){if(typeof $==="number")throw TypeError("Argument must not be a number");return U3($,Y,z)};YJ.alloc=function($,Y,z){if(typeof $!=="number")throw TypeError("Argument must be a number");var U=U3($);if(Y!==void 0)if(typeof z==="string")U.fill(Y,z);else U.fill(Y);else U.fill(0);return U};YJ.allocUnsafe=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return U3($)};YJ.allocUnsafeSlow=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return nw.SlowBuffer($)}});var M4=E((sc0)=>{function kc0($){if(Array.isArray)return Array.isArray($);return cw($)==="[object Array]"}sc0.isArray=kc0;function xc0($){return typeof $==="boolean"}sc0.isBoolean=xc0;function fc0($){return $===null}sc0.isNull=fc0;function uc0($){return $==null}sc0.isNullOrUndefined=uc0;function bc0($){return typeof $==="number"}sc0.isNumber=bc0;function ic0($){return typeof $==="string"}sc0.isString=ic0;function nc0($){return typeof $==="symbol"}sc0.isSymbol=nc0;function cc0($){return $===void 0}sc0.isUndefined=cc0;function pc0($){return cw($)==="[object RegExp]"}sc0.isRegExp=pc0;function dc0($){return typeof $==="object"&&$!==null}sc0.isObject=dc0;function mc0($){return cw($)==="[object Date]"}sc0.isDate=mc0;function lc0($){return cw($)==="[object Error]"||$ instanceof Error}sc0.isError=lc0;function oc0($){return typeof $==="function"}sc0.isFunction=oc0;function rc0($){return $===null||typeof $==="boolean"||typeof $==="number"||typeof $==="string"||typeof $==="symbol"||typeof $>"u"}sc0.isPrimitive=rc0;sc0.isBuffer=I0("buffer").Buffer.isBuffer;function cw($){return Object.prototype.toString.call($)}});var k60=E((Ud1,Pg)=>{if(typeof Object.create==="function")Pg.exports=function(Y,z){if(z)Y.super_=z,Y.prototype=Object.create(z.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}})};else Pg.exports=function(Y,z){if(z){Y.super_=z;var U=function(){};U.prototype=z.prototype,Y.prototype=new U,Y.prototype.constructor=Y}}});var X1=E((Qd1,jg)=>{try{if(pw=I0("util"),typeof pw.inherits!=="function")throw"";jg.exports=pw.inherits}catch($){jg.exports=k60()}var pw});var f60=E((Jd1,Tg)=>{function Zp0($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var x60=K6().Buffer,nH=I0("util");function qp0($,Y,z){$.copy(Y,z)}Tg.exports=function(){function $(){Zp0(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return x60.alloc(0);var U=x60.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)qp0(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(nH&&nH.inspect&&nH.inspect.custom)Tg.exports.prototype[nH.inspect.custom]=function(){var $=nH.inspect({length:this.length});return this.constructor.name+" "+$}});var Eg=E((Id1,u60)=>{var dw=I6();function Vp0($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)dw.nextTick(mw,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,dw.nextTick(mw,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)dw.nextTick(mw,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,dw.nextTick(mw,z,J)}else if(Y)Y(J)}),this}function Lp0(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function mw($,Y){$.emit("error",Y)}u60.exports={destroy:Vp0,undestroy:Lp0}});var f7=E((Kd1,b60)=>{b60.exports=I0("util").deprecate});var Rg=E((Gd1,o60)=>{var rY=I6();o60.exports=Z6;function n60($){var Y=this;this.next=null,this.entry=null,this.finish=function(){Sp0(Y,$)}}var Fp0=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:rY.nextTick,zJ;Z6.WritableState=pH;var c60=Object.create(M4());c60.inherits=X1();var Op0={deprecate:f7()},p60=I0("stream"),ow=K6().Buffer,wp0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Mp0($){return ow.from($)}function Np0($){return ow.isBuffer($)||$ instanceof wp0}var d60=Eg();c60.inherits(Z6,p60);function Dp0(){}function pH($,Y){zJ=zJ||sY(),$=$||{};var z=Y instanceof zJ;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){Cp0(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new n60(this)}pH.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(pH.prototype,"buffer",{get:Op0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var lw;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")lw=Function.prototype[Symbol.hasInstance],Object.defineProperty(Z6,Symbol.hasInstance,{value:function($){if(lw.call(this,$))return!0;if(this!==Z6)return!1;return $&&$._writableState instanceof pH}});else lw=function($){return $ instanceof this};function Z6($){if(zJ=zJ||sY(),!lw.call(Z6,this)&&!(this instanceof zJ))return new Z6($);if(this._writableState=new pH($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}p60.call(this)}Z6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function Ap0($,Y){var z=Error("write after end");$.emit("error",z),rY.nextTick(Y,z)}function Bp0($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),rY.nextTick(U,J),Q=!1;return Q}Z6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&Np0($);if(J&&!ow.isBuffer($))$=Mp0($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=Dp0;if(U.ended)Ap0(this,z);else if(J||Bp0(this,U,$,z))U.pendingcb++,Q=jp0(this,U,J,$,Y,z);return Q};Z6.prototype.cork=function(){var $=this._writableState;$.corked++};Z6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)m60(this,$)}};Z6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function Pp0($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=ow.from(Y,z);return Y}Object.defineProperty(Z6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function jp0($,Y,z,U,Q,J){if(!z){var I=Pp0(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var r60=I6(),gp0=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};t60.exports=Q3;var s60=Object.create(M4());s60.inherits=X1();var a60=vg(),_g=Rg();s60.inherits(Q3,a60);{rw=gp0(_g.prototype);for(dH=0;dH{var Sg=K6().Buffer,e60=Sg.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function xp0($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function fp0($){var Y=xp0($);if(typeof Y!=="string"&&(Sg.isEncoding===e60||!e60($)))throw Error("Unknown encoding: "+$);return Y||$}sp0.StringDecoder=lH;function lH($){this.encoding=fp0($);var Y;switch(this.encoding){case"utf16le":this.text=pp0,this.end=dp0,Y=4;break;case"utf8":this.fillLast=ip0,Y=4;break;case"base64":this.text=mp0,this.end=lp0,Y=3;break;default:this.write=op0,this.end=rp0;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sg.allocUnsafe(Y)}lH.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};lH.prototype.end=cp0;lH.prototype.text=np0;lH.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function hg($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function up0($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function bp0($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function ip0($){var Y=this.lastTotal-this.lastNeed,z=bp0(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function np0($,Y){var z=up0(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function cp0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function pp0($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function dp0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function mp0($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function lp0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function op0($){return $.toString(this.encoding)}function rp0($){return $&&$.length?this.write($):""}});var vg=E((Zd1,X80)=>{var QJ=I6();X80.exports=P4;var tp0=$J(),oH;P4.ReadableState=I80;var Xd1=I0("events").EventEmitter,U80=function($,Y){return $.listeners(Y).length},ug=I0("stream"),rH=K6().Buffer,ep0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function $d0($){return rH.from($)}function Yd0($){return rH.isBuffer($)||$ instanceof ep0}var Q80=Object.create(M4());Q80.inherits=X1();var yg=I0("util"),t1=void 0;if(yg&&yg.debuglog)t1=yg.debuglog("stream");else t1=function(){};var zd0=f60(),J80=Eg(),UJ;Q80.inherits(P4,ug);var kg=["error","close","destroy","pause","resume"];function Ud0($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(tp0($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function I80($,Y){oH=oH||sY(),$=$||{};var z=Y instanceof oH;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new zd0,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!UJ)UJ=gg().StringDecoder;this.decoder=new UJ($.encoding),this.encoding=$.encoding}}function P4($){if(oH=oH||sY(),!(this instanceof P4))return new P4($);if(this._readableState=new I80($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}ug.call(this)}Object.defineProperty(P4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});P4.prototype.destroy=J80.destroy;P4.prototype._undestroy=J80.undestroy;P4.prototype._destroy=function($,Y){this.push(null),Y($)};P4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=rH.from($,Y),Y="";U=!0}}else U=!0;return K80(this,$,Y,!1,U)};P4.prototype.unshift=function($){return K80(this,$,null,!0,!1)};function K80($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,Kd0($,J);else{var I;if(!Q)I=Qd0(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==rH.prototype)Y=$d0(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else xg($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)xg($,J,Y,!1);else G80($,J);else xg($,J,Y,!1)}else if(!U)J.reading=!1}return Jd0(J)}function xg($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)sw($)}G80($,Y)}function Qd0($,Y){var z;if(!Yd0(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function Jd0($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}P4.prototype.isPaused=function(){return this._readableState.flowing===!1};P4.prototype.setEncoding=function($){if(!UJ)UJ=gg().StringDecoder;return this._readableState.decoder=new UJ($),this._readableState.encoding=$,this};var $80=8388608;function Id0($){if($>=$80)$=$80;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function Y80($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=Id0($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}P4.prototype.read=function($){t1("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(t1("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)fg(this);else sw(this);return null}if($=Y80($,Y),$===0&&Y.ended){if(Y.length===0)fg(this);return null}var U=Y.needReadable;if(t1("need readable",U),Y.length===0||Y.length-$0)Q=H80($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)fg(this)}if(Q!==null)this.emit("data",Q);return Q};function Kd0($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,sw($)}function sw($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(t1("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)QJ.nextTick(z80,$);else z80($)}function z80($){t1("emit readable"),$.emit("readable"),bg($)}function G80($,Y){if(!Y.readingMore)Y.readingMore=!0,QJ.nextTick(Gd0,$,Y)}function Gd0($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&W80(U.pipes,$)!==-1)&&!H)t1("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(t1("onerror",O),w(),$.removeListener("error",q),U80($,"error")===0)$.emit("error",O)}Ud0($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){t1("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){t1("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)t1("pipe resume"),z.resume();return $};function Hd0($){return function(){var Y=$._readableState;if(t1("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&U80($,"data"))Y.flowing=!0,bg($)}}P4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=qd0($,Y.buffer,Y.decoder);return z}function qd0($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function Ld0($,Y){var z=rH.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function fg($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,QJ.nextTick(Fd0,Y,$)}function Fd0($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function W80($,Y){for(var z=0,U=$.length;z{V80.exports=J3;var aw=sY(),q80=Object.create(M4());q80.inherits=X1();q80.inherits(J3,aw);function Od0($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{O80.exports=sH;var L80=ig(),F80=Object.create(M4());F80.inherits=X1();F80.inherits(sH,L80);function sH($){if(!(this instanceof sH))return new sH($);L80.call(this,$)}sH.prototype._transform=function($,Y,z){z(null,$)}});var ng=E((m6,tw)=>{var e5=I0("stream");if(process.env.READABLE_STREAM==="disable"&&e5)tw.exports=e5,m6=tw.exports=e5.Readable,m6.Readable=e5.Readable,m6.Writable=e5.Writable,m6.Duplex=e5.Duplex,m6.Transform=e5.Transform,m6.PassThrough=e5.PassThrough,m6.Stream=e5;else m6=tw.exports=vg(),m6.Stream=e5||m6,m6.Readable=m6,m6.Writable=Rg(),m6.Duplex=sY(),m6.Transform=ig(),m6.PassThrough=w80()});var I3=E((Nd0)=>{Nd0.base64=!0;Nd0.array=!0;Nd0.string=!0;Nd0.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";Nd0.nodebuffer=typeof Buffer<"u";Nd0.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")Nd0.blob=!1;else{ew=new ArrayBuffer(0);try{Nd0.blob=new Blob([ew],{type:"application/zip"}).size===0}catch($){try{pg=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,$M=new pg,$M.append(ew),Nd0.blob=$M.getBlob("application/zip").size===0}catch(Y){Nd0.blob=!1}}}var ew,pg,$M;try{Nd0.nodestream=!!ng().Readable}catch($){Nd0.nodestream=!1}});var dg=E((Rd0)=>{var Ed0=c4(),Cd0=I3(),$9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Rd0.encode=function($){var Y=[],z,U,Q,J,I,K,G,H=0,W=$.length,X=W,Z=Ed0.getTypeOf($)!=="string";while(H<$.length){if(X=W-H,!Z)z=$.charCodeAt(H++),U=H>2,I=(z&3)<<4|U>>4,K=X>1?(U&15)<<2|Q>>6:64,G=X>2?Q&63:64,Y.push($9.charAt(J)+$9.charAt(I)+$9.charAt(K)+$9.charAt(G))}return Y.join("")};Rd0.decode=function($){var Y,z,U,Q,J,I,K,G=0,H=0,W="data:";if($.substr(0,W.length)===W)throw Error("Invalid base64 input, it looks like a data url.");$=$.replace(/[^A-Za-z0-9+/=]/g,"");var X=$.length*3/4;if($.charAt($.length-1)===$9.charAt(64))X--;if($.charAt($.length-2)===$9.charAt(64))X--;if(X%1!==0)throw Error("Invalid base64 input, bad content length.");var Z;if(Cd0.uint8array)Z=new Uint8Array(X|0);else Z=Array(X|0);while(G<$.length){if(Q=$9.indexOf($.charAt(G++)),J=$9.indexOf($.charAt(G++)),I=$9.indexOf($.charAt(G++)),K=$9.indexOf($.charAt(G++)),Y=Q<<2|J>>4,z=(J&15)<<4|I>>2,U=(I&3)<<6|K,Z[H++]=Y,I!==64)Z[H++]=z;if(K!==64)Z[H++]=U}return Z}});var aH=E((Od1,M80)=>{M80.exports={isNode:typeof Buffer<"u",newBufferFrom:function($,Y){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from($,Y);else{if(typeof $==="number")throw Error('The "data" argument must not be a number');return new Buffer($,Y)}},allocBuffer:function($){if(Buffer.alloc)return Buffer.alloc($);else{var Y=new Buffer($);return Y.fill(0),Y}},isBuffer:function($){return Buffer.isBuffer($)},isStream:function($){return $&&typeof $.on==="function"&&typeof $.pause==="function"&&typeof $.resume==="function"}}});var A80=E((Md1,D80)=>{var wd1=global.MutationObserver||global.WebKitMutationObserver,N80;N80=function(){process.nextTick(kd0)};var hd0,Sd0,gd0,yd0,mg,tH=[];function kd0(){mg=!0;var $,Y,z=tH.length;while(z){Y=tH,tH=[],$=-1;while(++${var B80=A80();function IJ(){}var X8={},P80=["REJECTED"],lg=["FULFILLED"],j80=["PENDING"];JJ=["UNHANDLED"];var JJ;C80.exports=u7;function u7($){if(typeof $!=="function")throw TypeError("resolver must be a function");if(this.state=j80,this.queue=[],this.outcome=void 0,this.handled=JJ,$!==IJ)T80(this,$)}u7.prototype.finally=function($){if(typeof $!=="function")return this;var Y=this.constructor;return this.then(z,U);function z(Q){function J(){return Q}return Y.resolve($()).then(J)}function U(Q){function J(){throw Q}return Y.resolve($()).then(J)}};u7.prototype.catch=function($){return this.then(null,$)};u7.prototype.then=function($,Y){if(typeof $!=="function"&&this.state===lg||typeof Y!=="function"&&this.state===P80)return this;var z=new this.constructor(IJ);if(this.handled===JJ)this.handled=null;if(this.state!==j80){var U=this.state===lg?$:Y;og(z,U,this.outcome)}else this.queue.push(new eH(z,$,Y));return z};function eH($,Y,z){if(this.promise=$,typeof Y==="function")this.onFulfilled=Y,this.callFulfilled=this.otherCallFulfilled;if(typeof z==="function")this.onRejected=z,this.callRejected=this.otherCallRejected}eH.prototype.callFulfilled=function($){X8.resolve(this.promise,$)};eH.prototype.otherCallFulfilled=function($){og(this.promise,this.onFulfilled,$)};eH.prototype.callRejected=function($){X8.reject(this.promise,$)};eH.prototype.otherCallRejected=function($){og(this.promise,this.onRejected,$)};function og($,Y,z){B80(function(){var U;try{U=Y(z)}catch(Q){return X8.reject($,Q)}if(U===$)X8.reject($,TypeError("Cannot resolve promise with itself"));else X8.resolve($,U)})}X8.resolve=function($,Y){var z=E80(fd0,Y);if(z.status==="error")return X8.reject($,z.value);var U=z.value;if(U)T80($,U);else{$.state=lg,$.outcome=Y;var Q=-1,J=$.queue.length;while(++Q{var rg=null;if(typeof Promise<"u")rg=Promise;else rg=R80();_80.exports={Promise:rg}});var sg=E((v80)=>{(function($,Y){if($.setImmediate)return;var z=1,U={},Q=!1,J=$.document,I;function K(N){if(typeof N!=="function")N=Function(""+N);var M=Array(arguments.length-1);for(var D=0;D"u"?typeof global>"u"?v80:global:self)});var c4=E((dd0)=>{var b7=I3(),cd0=dg(),GJ=aH(),ag=KJ();sg();function pd0($){var Y=null;if(b7.uint8array)Y=new Uint8Array($.length);else Y=Array($.length);return zM($,Y)}dd0.newBlob=function($,Y){dd0.checkSupport("blob");try{return new Blob([$],{type:Y})}catch(Q){try{var z=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,U=new z;return U.append($),U.getBlob(Y)}catch(J){throw Error("Bug : can't construct the Blob.")}}};function $W($){return $}function zM($,Y){for(var z=0;z<$.length;++z)Y[z]=$.charCodeAt(z)&255;return Y}var YM={stringifyByChunk:function($,Y,z){var U=[],Q=0,J=$.length;if(J<=z)return String.fromCharCode.apply(null,$);while(Q1)try{return YM.stringifyByChunk($,z,Y)}catch(Q){Y=Math.floor(Y/2)}return YM.stringifyByChar($)}dd0.applyFromCharCode=YW;function UM($,Y){for(var z=0;z<$.length;z++)Y[z]=$[z];return Y}var i7={};i7.string={string:$W,array:function($){return zM($,Array($.length))},arraybuffer:function($){return i7.string.uint8array($).buffer},uint8array:function($){return zM($,new Uint8Array($.length))},nodebuffer:function($){return zM($,GJ.allocBuffer($.length))}};i7.array={string:YW,array:$W,arraybuffer:function($){return new Uint8Array($).buffer},uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return GJ.newBufferFrom($)}};i7.arraybuffer={string:function($){return YW(new Uint8Array($))},array:function($){return UM(new Uint8Array($),Array($.byteLength))},arraybuffer:$W,uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return GJ.newBufferFrom(new Uint8Array($))}};i7.uint8array={string:YW,array:function($){return UM($,Array($.length))},arraybuffer:function($){return $.buffer},uint8array:$W,nodebuffer:function($){return GJ.newBufferFrom($)}};i7.nodebuffer={string:YW,array:function($){return UM($,Array($.length))},arraybuffer:function($){return i7.nodebuffer.uint8array($).buffer},uint8array:function($){return UM($,new Uint8Array($.length))},nodebuffer:$W};dd0.transformTo=function($,Y){if(!Y)Y="";if(!$)return Y;dd0.checkSupport($);var z=dd0.getTypeOf(Y),U=i7[z][$](Y);return U};dd0.resolve=function($){var Y=$.split("/"),z=[];for(var U=0;U"u")$[z]=arguments[Y][z];return $};dd0.prepareContent=function($,Y,z,U,Q){var J=ag.Promise.resolve(Y).then(function(I){var K=b7.blob&&(I instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(I))!==-1);if(K&&typeof FileReader<"u")return new ag.Promise(function(G,H){var W=new FileReader;W.onload=function(X){G(X.target.result)},W.onerror=function(X){H(X.target.error)},W.readAsArrayBuffer(I)});else return I});return J.then(function(I){var K=dd0.getTypeOf(I);if(!K)return ag.Promise.reject(Error("Can't read the data of '"+$+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(K==="arraybuffer")I=dd0.transformTo("uint8array",I);else if(K==="string"){if(Q)I=cd0.decode(I);else if(z){if(U!==!0)I=pd0(I)}}return I})}});var K$=E((Pd1,y80)=>{function g80($){this.name=$||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}g80.prototype={push:function($){this.emit("data",$)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch($){this.emit("error",$)}return!0},error:function($){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=$;else{if(this.isFinished=!0,this.emit("error",$),this.previous)this.previous.error($);this.cleanUp()}return!0},on:function($,Y){return this._listeners[$].push(Y),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function($,Y){if(this._listeners[$])for(var z=0;z "+$;else return $}};y80.exports=g80});var WJ=E((Im0)=>{var HJ=c4(),aY=I3(),zm0=aH(),QM=K$(),zW=Array(256);for(Y9=0;Y9<256;Y9++)zW[Y9]=Y9>=252?6:Y9>=248?5:Y9>=240?4:Y9>=224?3:Y9>=192?2:1;var Y9;zW[254]=zW[254]=1;var Um0=function($){var Y,z,U,Q,J,I=$.length,K=0;for(Q=0;Q>>6,Y[J++]=128|z&63;else if(z<65536)Y[J++]=224|z>>>12,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63;else Y[J++]=240|z>>>18,Y[J++]=128|z>>>12&63,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63}return Y},Qm0=function($,Y){var z;if(Y=Y||$.length,Y>$.length)Y=$.length;z=Y-1;while(z>=0&&($[z]&192)===128)z--;if(z<0)return Y;if(z===0)return Y;return z+zW[$[z]]>Y?z:Y},Jm0=function($){var Y,z,U,Q,J=$.length,I=Array(J*2);for(z=0,Y=0;Y4){I[z++]=65533,Y+=Q-1;continue}U&=Q===2?31:Q===3?15:7;while(Q>1&&Y1){I[z++]=65533;continue}if(U<65536)I[z++]=U;else U-=65536,I[z++]=55296|U>>10&1023,I[z++]=56320|U&1023}if(I.length!==z)if(I.subarray)I=I.subarray(0,z);else I.length=z;return HJ.applyFromCharCode(I)};Im0.utf8encode=function(Y){if(aY.nodebuffer)return zm0.newBufferFrom(Y,"utf-8");return Um0(Y)};Im0.utf8decode=function(Y){if(aY.nodebuffer)return HJ.transformTo("nodebuffer",Y).toString("utf-8");return Y=HJ.transformTo(aY.uint8array?"uint8array":"array",Y),Jm0(Y)};function JM(){QM.call(this,"utf-8 decode"),this.leftOver=null}HJ.inherits(JM,QM);JM.prototype.processChunk=function($){var Y=HJ.transformTo(aY.uint8array?"uint8array":"array",$.data);if(this.leftOver&&this.leftOver.length){if(aY.uint8array){var z=Y;Y=new Uint8Array(z.length+this.leftOver.length),Y.set(this.leftOver,0),Y.set(z,this.leftOver.length)}else Y=this.leftOver.concat(Y);this.leftOver=null}var U=Qm0(Y),Q=Y;if(U!==Y.length)if(aY.uint8array)Q=Y.subarray(0,U),this.leftOver=Y.subarray(U,Y.length);else Q=Y.slice(0,U),this.leftOver=Y.slice(U,Y.length);this.push({data:Im0.utf8decode(Q),meta:$.meta})};JM.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:Im0.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};Im0.Utf8DecodeWorker=JM;function eg(){QM.call(this,"utf-8 encode")}HJ.inherits(eg,QM);eg.prototype.processChunk=function($){this.push({data:Im0.utf8encode($.data),meta:$.meta})};Im0.Utf8EncodeWorker=eg});var b80=E((Td1,u80)=>{var x80=K$(),f80=c4();function Yy($){x80.call(this,"ConvertWorker to "+$),this.destType=$}f80.inherits(Yy,x80);Yy.prototype.processChunk=function($){this.push({data:f80.transformTo(this.destType,$.data),meta:$.meta})};u80.exports=Yy});var c80=E((Ed1,n80)=>{var i80=ng().Readable,Hm0=c4();Hm0.inherits(zy,i80);function zy($,Y,z){i80.call(this,Y),this._helper=$;var U=this;$.on("data",function(Q,J){if(!U.push(Q))U._helper.pause();if(z)z(J)}).on("error",function(Q){U.emit("error",Q)}).on("end",function(){U.push(null)})}zy.prototype._read=function(){this._helper.resume()};n80.exports=zy});var Uy=E((Cd1,m80)=>{var tY=c4(),Wm0=b80(),Xm0=K$(),Zm0=dg(),qm0=I3(),Vm0=KJ(),p80=null;if(qm0.nodestream)try{p80=c80()}catch($){}function Lm0($,Y,z){switch($){case"blob":return tY.newBlob(tY.transformTo("arraybuffer",Y),z);case"base64":return Zm0.encode(Y);default:return tY.transformTo($,Y)}}function Fm0($,Y){var z,U=0,Q=null,J=0;for(z=0;z{wm0.base64=!1;wm0.binary=!1;wm0.dir=!1;wm0.createFolders=!0;wm0.date=null;wm0.compression=null;wm0.compressionOptions=null;wm0.comment=null;wm0.unixPermissions=null;wm0.dosPermissions=null});var Jy=E((_d1,l80)=>{var IM=c4(),KM=K$(),Rm0=16384;function XJ($){KM.call(this,"DataWorker");var Y=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,$.then(function(z){if(Y.dataIsReady=!0,Y.data=z,Y.max=z&&z.length||0,Y.type=IM.getTypeOf(z),!Y.isPaused)Y._tickAndRepeat()},function(z){Y.error(z)})}IM.inherits(XJ,KM);XJ.prototype.cleanUp=function(){KM.prototype.cleanUp.call(this),this.data=null};XJ.prototype.resume=function(){if(!KM.prototype.resume.call(this))return!1;if(!this._tickScheduled&&this.dataIsReady)this._tickScheduled=!0,IM.delay(this._tickAndRepeat,[],this);return!0};XJ.prototype._tickAndRepeat=function(){if(this._tickScheduled=!1,this.isPaused||this.isFinished)return;if(this._tick(),!this.isFinished)IM.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0};XJ.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var $=Rm0,Y=null,z=Math.min(this.max,this.index+$);if(this.index>=this.max)return this.end();else{switch(this.type){case"string":Y=this.data.substring(this.index,z);break;case"uint8array":Y=this.data.subarray(this.index,z);break;case"array":case"nodebuffer":Y=this.data.slice(this.index,z);break}return this.index=z,this.push({data:Y,meta:{percent:this.max?this.index/this.max*100:0}})}};l80.exports=XJ});var GM=E((vd1,r80)=>{var _m0=c4();function vm0(){var $,Y=[];for(var z=0;z<256;z++){$=z;for(var U=0;U<8;U++)$=$&1?3988292384^$>>>1:$>>>1;Y[z]=$}return Y}var o80=vm0();function hm0($,Y,z,U){var Q=o80,J=U+z;$=$^-1;for(var I=U;I>>8^Q[($^Y[I])&255];return $^-1}function Sm0($,Y,z,U){var Q=o80,J=U+z;$=$^-1;for(var I=U;I>>8^Q[($^Y.charCodeAt(I))&255];return $^-1}r80.exports=function(Y,z){if(typeof Y>"u"||!Y.length)return 0;var U=_m0.getTypeOf(Y)!=="string";if(U)return hm0(z|0,Y,Y.length,0);else return Sm0(z|0,Y,Y.length,0)}});var Ky=E((hd1,a80)=>{var s80=K$(),gm0=GM(),ym0=c4();function Iy(){s80.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}ym0.inherits(Iy,s80);Iy.prototype.processChunk=function($){this.streamInfo.crc32=gm0($.data,this.streamInfo.crc32||0),this.push($)};a80.exports=Iy});var e80=E((Sd1,t80)=>{var km0=c4(),Gy=K$();function Hy($){Gy.call(this,"DataLengthProbe for "+$),this.propName=$,this.withStreamInfo($,0)}km0.inherits(Hy,Gy);Hy.prototype.processChunk=function($){if($){var Y=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=Y+$.data.length}Gy.prototype.processChunk.call(this,$)};t80.exports=Hy});var HM=E((gd1,z$0)=>{var $$0=KJ(),Y$0=Jy(),xm0=Ky(),Wy=e80();function Xy($,Y,z,U,Q){this.compressedSize=$,this.uncompressedSize=Y,this.crc32=z,this.compression=U,this.compressedContent=Q}Xy.prototype={getContentWorker:function(){var $=new Y$0($$0.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Wy("data_length")),Y=this;return $.on("end",function(){if(this.streamInfo.data_length!==Y.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),$},getCompressedWorker:function(){return new Y$0($$0.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};Xy.createWorkerFrom=function($,Y,z){return $.pipe(new xm0).pipe(new Wy("uncompressedSize")).pipe(Y.compressWorker(z)).pipe(new Wy("compressedSize")).withStreamInfo("compression",Y)};z$0.exports=Xy});var I$0=E((yd1,J$0)=>{var fm0=Uy(),um0=Jy(),Zy=WJ(),qy=HM(),U$0=K$(),Vy=function($,Y,z){this.name=$,this.dir=z.dir,this.date=z.date,this.comment=z.comment,this.unixPermissions=z.unixPermissions,this.dosPermissions=z.dosPermissions,this._data=Y,this._dataBinary=z.binary,this.options={compression:z.compression,compressionOptions:z.compressionOptions}};Vy.prototype={internalStream:function($){var Y=null,z="string";try{if(!$)throw Error("No output type specified.");z=$.toLowerCase();var U=z==="string"||z==="text";if(z==="binarystring"||z==="text")z="string";Y=this._decompressWorker();var Q=!this._dataBinary;if(Q&&!U)Y=Y.pipe(new Zy.Utf8EncodeWorker);if(!Q&&U)Y=Y.pipe(new Zy.Utf8DecodeWorker)}catch(J){Y=new U$0("error"),Y.error(J)}return new fm0(Y,z,"")},async:function($,Y){return this.internalStream($).accumulate(Y)},nodeStream:function($,Y){return this.internalStream($||"nodebuffer").toNodejsStream(Y)},_compressWorker:function($,Y){if(this._data instanceof qy&&this._data.compression.magic===$.magic)return this._data.getCompressedWorker();else{var z=this._decompressWorker();if(!this._dataBinary)z=z.pipe(new Zy.Utf8EncodeWorker);return qy.createWorkerFrom(z,$,Y)}},_decompressWorker:function(){if(this._data instanceof qy)return this._data.getContentWorker();else if(this._data instanceof U$0)return this._data;else return new um0(this._data)}};var Q$0=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],bm0=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(UW=0;UW{var pm0=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function dm0($,Y){return Object.prototype.hasOwnProperty.call($,Y)}Ly.assign=function($){var Y=Array.prototype.slice.call(arguments,1);while(Y.length){var z=Y.shift();if(!z)continue;if(typeof z!=="object")throw TypeError(z+"must be non-object");for(var U in z)if(dm0(z,U))$[U]=z[U]}return $};Ly.shrinkBuf=function($,Y){if($.length===Y)return $;if($.subarray)return $.subarray(0,Y);return $.length=Y,$};var mm0={arraySet:function($,Y,z,U,Q){if(Y.subarray&&$.subarray){$.set(Y.subarray(z,z+U),Q);return}for(var J=0;J{var rm0=K3(),sm0=4,G$0=0,H$0=1,am0=2;function qJ($){var Y=$.length;while(--Y>=0)$[Y]=0}var tm0=0,L$0=1,em0=2,$l0=3,Yl0=258,By=29,HW=256,JW=HW+1+By,ZJ=30,Py=19,F$0=2*JW+1,eY=15,Oy=16,zl0=7,jy=256,O$0=16,w$0=17,M$0=18,Dy=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],WM=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ul0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N$0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ql0=512,G3=Array((JW+2)*2);qJ(G3);var QW=Array(ZJ*2);qJ(QW);var IW=Array(Ql0);qJ(IW);var KW=Array(Yl0-$l0+1);qJ(KW);var Ty=Array(By);qJ(Ty);var XM=Array(ZJ);qJ(XM);function wy($,Y,z,U,Q){this.static_tree=$,this.extra_bits=Y,this.extra_base=z,this.elems=U,this.max_length=Q,this.has_stree=$&&$.length}var D$0,A$0,B$0;function My($,Y){this.dyn_tree=$,this.max_code=0,this.stat_desc=Y}function P$0($){return $<256?IW[$]:IW[256+($>>>7)]}function GW($,Y){$.pending_buf[$.pending++]=Y&255,$.pending_buf[$.pending++]=Y>>>8&255}function p8($,Y,z){if($.bi_valid>Oy-z)$.bi_buf|=Y<<$.bi_valid&65535,GW($,$.bi_buf),$.bi_buf=Y>>Oy-$.bi_valid,$.bi_valid+=z-Oy;else $.bi_buf|=Y<<$.bi_valid&65535,$.bi_valid+=z}function z9($,Y,z){p8($,z[Y*2],z[Y*2+1])}function j$0($,Y){var z=0;do z|=$&1,$>>>=1,z<<=1;while(--Y>0);return z>>>1}function Jl0($){if($.bi_valid===16)GW($,$.bi_buf),$.bi_buf=0,$.bi_valid=0;else if($.bi_valid>=8)$.pending_buf[$.pending++]=$.bi_buf&255,$.bi_buf>>=8,$.bi_valid-=8}function Il0($,Y){var{dyn_tree:z,max_code:U}=Y,Q=Y.stat_desc.static_tree,J=Y.stat_desc.has_stree,I=Y.stat_desc.extra_bits,K=Y.stat_desc.extra_base,G=Y.stat_desc.max_length,H,W,X,Z,q,V,F=0;for(Z=0;Z<=eY;Z++)$.bl_count[Z]=0;z[$.heap[$.heap_max]*2+1]=0;for(H=$.heap_max+1;HG)Z=G,F++;if(z[W*2+1]=Z,W>U)continue;if($.bl_count[Z]++,q=0,W>=K)q=I[W-K];if(V=z[W*2],$.opt_len+=V*(Z+q),J)$.static_len+=V*(Q[W*2+1]+q)}if(F===0)return;do{Z=G-1;while($.bl_count[Z]===0)Z--;$.bl_count[Z]--,$.bl_count[Z+1]+=2,$.bl_count[G]--,F-=2}while(F>0);for(Z=G;Z!==0;Z--){W=$.bl_count[Z];while(W!==0){if(X=$.heap[--H],X>U)continue;if(z[X*2+1]!==Z)$.opt_len+=(Z-z[X*2+1])*z[X*2],z[X*2+1]=Z;W--}}}function T$0($,Y,z){var U=Array(eY+1),Q=0,J,I;for(J=1;J<=eY;J++)U[J]=Q=Q+z[J-1]<<1;for(I=0;I<=Y;I++){var K=$[I*2+1];if(K===0)continue;$[I*2]=j$0(U[K]++,K)}}function Kl0(){var $,Y,z,U,Q,J=Array(eY+1);z=0;for(U=0;U>=7;for(;U8)GW($,$.bi_buf);else if($.bi_valid>0)$.pending_buf[$.pending++]=$.bi_buf;$.bi_buf=0,$.bi_valid=0}function Gl0($,Y,z,U){if(C$0($),U)GW($,z),GW($,~z);rm0.arraySet($.pending_buf,$.window,Y,z,$.pending),$.pending+=z}function W$0($,Y,z,U){var Q=Y*2,J=z*2;return $[Q]<$[J]||$[Q]===$[J]&&U[Y]<=U[z]}function Ny($,Y,z){var U=$.heap[z],Q=z<<1;while(Q<=$.heap_len){if(Q<$.heap_len&&W$0(Y,$.heap[Q+1],$.heap[Q],$.depth))Q++;if(W$0(Y,U,$.heap[Q],$.depth))break;$.heap[z]=$.heap[Q],z=Q,Q<<=1}$.heap[z]=U}function X$0($,Y,z){var U,Q,J=0,I,K;if($.last_lit!==0)do if(U=$.pending_buf[$.d_buf+J*2]<<8|$.pending_buf[$.d_buf+J*2+1],Q=$.pending_buf[$.l_buf+J],J++,U===0)z9($,Q,Y);else{if(I=KW[Q],z9($,I+HW+1,Y),K=Dy[I],K!==0)Q-=Ty[I],p8($,Q,K);if(U--,I=P$0(U),z9($,I,z),K=WM[I],K!==0)U-=XM[I],p8($,U,K)}while(J<$.last_lit);z9($,jy,Y)}function Ay($,Y){var z=Y.dyn_tree,U=Y.stat_desc.static_tree,Q=Y.stat_desc.has_stree,J=Y.stat_desc.elems,I,K,G=-1,H;$.heap_len=0,$.heap_max=F$0;for(I=0;I>1;I>=1;I--)Ny($,z,I);H=J;do I=$.heap[1],$.heap[1]=$.heap[$.heap_len--],Ny($,z,1),K=$.heap[1],$.heap[--$.heap_max]=I,$.heap[--$.heap_max]=K,z[H*2]=z[I*2]+z[K*2],$.depth[H]=($.depth[I]>=$.depth[K]?$.depth[I]:$.depth[K])+1,z[I*2+1]=z[K*2+1]=H,$.heap[1]=H++,Ny($,z,1);while($.heap_len>=2);$.heap[--$.heap_max]=$.heap[1],Il0($,Y),T$0(z,G,$.bl_count)}function Z$0($,Y,z){var U,Q=-1,J,I=Y[1],K=0,G=7,H=4;if(I===0)G=138,H=3;Y[(z+1)*2+1]=65535;for(U=0;U<=z;U++){if(J=I,I=Y[(U+1)*2+1],++K=3;Y--)if($.bl_tree[N$0[Y]*2+1]!==0)break;return $.opt_len+=3*(Y+1)+5+5+4,Y}function Wl0($,Y,z,U){var Q;p8($,Y-257,5),p8($,z-1,5),p8($,U-4,4);for(Q=0;Q>>=1)if(Y&1&&$.dyn_ltree[z*2]!==0)return G$0;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return H$0;for(z=32;z0){if($.strm.data_type===am0)$.strm.data_type=Xl0($);if(Ay($,$.l_desc),Ay($,$.d_desc),I=Hl0($),Q=$.opt_len+3+7>>>3,J=$.static_len+3+7>>>3,J<=Q)Q=J}else Q=J=z+5;if(z+4<=Q&&Y!==-1)R$0($,Y,z,U);else if($.strategy===sm0||J===Q)p8($,(L$0<<1)+(U?1:0),3),X$0($,G3,QW);else p8($,(em0<<1)+(U?1:0),3),Wl0($,$.l_desc.max_code+1,$.d_desc.max_code+1,I+1),X$0($,$.dyn_ltree,$.dyn_dtree);if(E$0($),U)C$0($)}function Ll0($,Y,z){if($.pending_buf[$.d_buf+$.last_lit*2]=Y>>>8&255,$.pending_buf[$.d_buf+$.last_lit*2+1]=Y&255,$.pending_buf[$.l_buf+$.last_lit]=z&255,$.last_lit++,Y===0)$.dyn_ltree[z*2]++;else $.matches++,Y--,$.dyn_ltree[(KW[z]+HW+1)*2]++,$.dyn_dtree[P$0(Y)*2]++;return $.last_lit===$.lit_bufsize-1}Fl0._tr_init=Zl0;Fl0._tr_stored_block=R$0;Fl0._tr_flush_block=Vl0;Fl0._tr_tally=Ll0;Fl0._tr_align=ql0});var Ey=E((fd1,v$0)=>{function Al0($,Y,z,U){var Q=$&65535|0,J=$>>>16&65535|0,I=0;while(z!==0){I=z>2000?2000:z,z-=I;do Q=Q+Y[U++]|0,J=J+Q|0;while(--I);Q%=65521,J%=65521}return Q|J<<16|0}v$0.exports=Al0});var Cy=E((ud1,h$0)=>{function Bl0(){var $,Y=[];for(var z=0;z<256;z++){$=z;for(var U=0;U<8;U++)$=$&1?3988292384^$>>>1:$>>>1;Y[z]=$}return Y}var Pl0=Bl0();function jl0($,Y,z,U){var Q=Pl0,J=U+z;$^=-1;for(var I=U;I>>8^Q[($^Y[I])&255];return $^-1}h$0.exports=jl0});var ZM=E((bd1,S$0)=>{S$0.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var n$0=E((Qo0)=>{var E8=K3(),E$=_$0(),x$0=Ey(),n7=Cy(),Tl0=ZM(),Uz=0,El0=1,Cl0=3,l7=4,g$0=5,Q9=0,y$0=1,C$=-2,Rl0=-3,Ry=-5,_l0=-1,vl0=1,qM=2,hl0=3,Sl0=4,gl0=0,yl0=2,OM=8,kl0=9,xl0=15,fl0=8,ul0=29,bl0=256,vy=bl0+1+ul0,il0=30,nl0=19,cl0=2*vy+1,pl0=15,f1=3,d7=258,X5=d7+f1+1,dl0=32,wM=42,hy=69,VM=73,LM=91,FM=103,$z=113,XW=666,P6=1,ZW=2,Yz=3,FJ=4,ml0=3;function m7($,Y){return $.msg=Tl0[Y],Y}function k$0($){return($<<1)-($>4?9:0)}function p7($){var Y=$.length;while(--Y>=0)$[Y]=0}function c7($){var Y=$.state,z=Y.pending;if(z>$.avail_out)z=$.avail_out;if(z===0)return;if(E8.arraySet($.output,Y.pending_buf,Y.pending_out,z,$.next_out),$.next_out+=z,Y.pending_out+=z,$.total_out+=z,$.avail_out-=z,Y.pending-=z,Y.pending===0)Y.pending_out=0}function l6($,Y){E$._tr_flush_block($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,Y),$.block_start=$.strstart,c7($.strm)}function r1($,Y){$.pending_buf[$.pending++]=Y}function WW($,Y){$.pending_buf[$.pending++]=Y>>>8&255,$.pending_buf[$.pending++]=Y&255}function ll0($,Y,z,U){var Q=$.avail_in;if(Q>U)Q=U;if(Q===0)return 0;if($.avail_in-=Q,E8.arraySet(Y,$.input,$.next_in,Q,z),$.state.wrap===1)$.adler=x$0($.adler,Y,Q,z);else if($.state.wrap===2)$.adler=n7($.adler,Y,Q,z);return $.next_in+=Q,$.total_in+=Q,Q}function f$0($,Y){var{max_chain_length:z,strstart:U}=$,Q,J,I=$.prev_length,K=$.nice_match,G=$.strstart>$.w_size-X5?$.strstart-($.w_size-X5):0,H=$.window,W=$.w_mask,X=$.prev,Z=$.strstart+d7,q=H[U+I-1],V=H[U+I];if($.prev_length>=$.good_match)z>>=2;if(K>$.lookahead)K=$.lookahead;do{if(Q=Y,H[Q+I]!==V||H[Q+I-1]!==q||H[Q]!==H[U]||H[++Q]!==H[U+1])continue;U+=2,Q++;do;while(H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&H[++U]===H[++Q]&&UI){if($.match_start=Y,I=J,J>=K)break;q=H[U+I-1],V=H[U+I]}}while((Y=X[Y&W])>G&&--z!==0);if(I<=$.lookahead)return I;return $.lookahead}function zz($){var Y=$.w_size,z,U,Q,J,I;do{if(J=$.window_size-$.lookahead-$.strstart,$.strstart>=Y+(Y-X5)){E8.arraySet($.window,$.window,Y,Y,0),$.match_start-=Y,$.strstart-=Y,$.block_start-=Y,U=$.hash_size,z=U;do Q=$.head[--z],$.head[z]=Q>=Y?Q-Y:0;while(--U);U=Y,z=U;do Q=$.prev[--z],$.prev[z]=Q>=Y?Q-Y:0;while(--U);J+=Y}if($.strm.avail_in===0)break;if(U=ll0($.strm,$.window,$.strstart+$.lookahead,J),$.lookahead+=U,$.lookahead+$.insert>=f1){I=$.strstart-$.insert,$.ins_h=$.window[I],$.ins_h=($.ins_h<<$.hash_shift^$.window[I+1])&$.hash_mask;while($.insert)if($.ins_h=($.ins_h<<$.hash_shift^$.window[I+f1-1])&$.hash_mask,$.prev[I&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=I,I++,$.insert--,$.lookahead+$.insert$.pending_buf_size-5)z=$.pending_buf_size-5;for(;;){if($.lookahead<=1){if(zz($),$.lookahead===0&&Y===Uz)return P6;if($.lookahead===0)break}$.strstart+=$.lookahead,$.lookahead=0;var U=$.block_start+z;if($.strstart===0||$.strstart>=U){if($.lookahead=$.strstart-U,$.strstart=U,l6($,!1),$.strm.avail_out===0)return P6}if($.strstart-$.block_start>=$.w_size-X5){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=0,Y===l7){if(l6($,!0),$.strm.avail_out===0)return Yz;return FJ}if($.strstart>$.block_start){if(l6($,!1),$.strm.avail_out===0)return P6}return P6}function _y($,Y){var z,U;for(;;){if($.lookahead=f1)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if(z!==0&&$.strstart-z<=$.w_size-X5)$.match_length=f$0($,z);if($.match_length>=f1)if(U=E$._tr_tally($,$.strstart-$.match_start,$.match_length-f1),$.lookahead-=$.match_length,$.match_length<=$.max_lazy_match&&$.lookahead>=f1){$.match_length--;do $.strstart++,$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.match_length!==0);$.strstart++}else $.strstart+=$.match_length,$.match_length=0,$.ins_h=$.window[$.strstart],$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+1])&$.hash_mask;else U=E$._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(U){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=$.strstart=f1)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if($.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=f1-1,z!==0&&$.prev_length<$.max_lazy_match&&$.strstart-z<=$.w_size-X5){if($.match_length=f$0($,z),$.match_length<=5&&($.strategy===vl0||$.match_length===f1&&$.strstart-$.match_start>4096))$.match_length=f1-1}if($.prev_length>=f1&&$.match_length<=$.prev_length){Q=$.strstart+$.lookahead-f1,U=E$._tr_tally($,$.strstart-1-$.prev_match,$.prev_length-f1),$.lookahead-=$.prev_length-1,$.prev_length-=2;do if(++$.strstart<=Q)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+f1-1])&$.hash_mask,z=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.prev_length!==0);if($.match_available=0,$.match_length=f1-1,$.strstart++,U){if(l6($,!1),$.strm.avail_out===0)return P6}}else if($.match_available){if(U=E$._tr_tally($,0,$.window[$.strstart-1]),U)l6($,!1);if($.strstart++,$.lookahead--,$.strm.avail_out===0)return P6}else $.match_available=1,$.strstart++,$.lookahead--}if($.match_available)U=E$._tr_tally($,0,$.window[$.strstart-1]),$.match_available=0;if($.insert=$.strstart=f1&&$.strstart>0){if(Q=$.strstart-1,U=I[Q],U===I[++Q]&&U===I[++Q]&&U===I[++Q]){J=$.strstart+d7;do;while(U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&U===I[++Q]&&Q$.lookahead)$.match_length=$.lookahead}}if($.match_length>=f1)z=E$._tr_tally($,1,$.match_length-f1),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0;else z=E$._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(z){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=0,Y===l7){if(l6($,!0),$.strm.avail_out===0)return Yz;return FJ}if($.last_lit){if(l6($,!1),$.strm.avail_out===0)return P6}return ZW}function sl0($,Y){var z;for(;;){if($.lookahead===0){if(zz($),$.lookahead===0){if(Y===Uz)return P6;break}}if($.match_length=0,z=E$._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,z){if(l6($,!1),$.strm.avail_out===0)return P6}}if($.insert=0,Y===l7){if(l6($,!0),$.strm.avail_out===0)return Yz;return FJ}if($.last_lit){if(l6($,!1),$.strm.avail_out===0)return P6}return ZW}function U9($,Y,z,U,Q){this.good_length=$,this.max_lazy=Y,this.nice_length=z,this.max_chain=U,this.func=Q}var LJ;LJ=[new U9(0,0,0,0,ol0),new U9(4,4,8,4,_y),new U9(4,5,16,8,_y),new U9(4,6,32,32,_y),new U9(4,4,16,16,VJ),new U9(8,16,32,32,VJ),new U9(8,16,128,128,VJ),new U9(8,32,128,256,VJ),new U9(32,128,258,1024,VJ),new U9(32,258,258,4096,VJ)];function al0($){$.window_size=2*$.w_size,p7($.head),$.max_lazy_match=LJ[$.level].max_lazy,$.good_match=LJ[$.level].good_length,$.nice_match=LJ[$.level].nice_length,$.max_chain_length=LJ[$.level].max_chain,$.strstart=0,$.block_start=0,$.lookahead=0,$.insert=0,$.match_length=$.prev_length=f1-1,$.match_available=0,$.ins_h=0}function tl0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=OM,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E8.Buf16(cl0*2),this.dyn_dtree=new E8.Buf16((2*il0+1)*2),this.bl_tree=new E8.Buf16((2*nl0+1)*2),p7(this.dyn_ltree),p7(this.dyn_dtree),p7(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E8.Buf16(pl0+1),this.heap=new E8.Buf16(2*vy+1),p7(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E8.Buf16(2*vy+1),p7(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u$0($){var Y;if(!$||!$.state)return m7($,C$);if($.total_in=$.total_out=0,$.data_type=yl0,Y=$.state,Y.pending=0,Y.pending_out=0,Y.wrap<0)Y.wrap=-Y.wrap;return Y.status=Y.wrap?wM:$z,$.adler=Y.wrap===2?0:1,Y.last_flush=Uz,E$._tr_init(Y),Q9}function b$0($){var Y=u$0($);if(Y===Q9)al0($.state);return Y}function el0($,Y){if(!$||!$.state)return C$;if($.state.wrap!==2)return C$;return $.state.gzhead=Y,Q9}function i$0($,Y,z,U,Q,J){if(!$)return C$;var I=1;if(Y===_l0)Y=6;if(U<0)I=0,U=-U;else if(U>15)I=2,U-=16;if(Q<1||Q>kl0||z!==OM||U<8||U>15||Y<0||Y>9||J<0||J>Sl0)return m7($,C$);if(U===8)U=9;var K=new tl0;return $.state=K,K.strm=$,K.wrap=I,K.gzhead=null,K.w_bits=U,K.w_size=1<g$0||Y<0)return $?m7($,C$):C$;if(U=$.state,!$.output||!$.input&&$.avail_in!==0||U.status===XW&&Y!==l7)return m7($,$.avail_out===0?Ry:C$);if(U.strm=$,z=U.last_flush,U.last_flush=Y,U.status===wM)if(U.wrap===2)if($.adler=0,r1(U,31),r1(U,139),r1(U,8),!U.gzhead)r1(U,0),r1(U,0),r1(U,0),r1(U,0),r1(U,0),r1(U,U.level===9?2:U.strategy>=qM||U.level<2?4:0),r1(U,ml0),U.status=$z;else{if(r1(U,(U.gzhead.text?1:0)+(U.gzhead.hcrc?2:0)+(!U.gzhead.extra?0:4)+(!U.gzhead.name?0:8)+(!U.gzhead.comment?0:16)),r1(U,U.gzhead.time&255),r1(U,U.gzhead.time>>8&255),r1(U,U.gzhead.time>>16&255),r1(U,U.gzhead.time>>24&255),r1(U,U.level===9?2:U.strategy>=qM||U.level<2?4:0),r1(U,U.gzhead.os&255),U.gzhead.extra&&U.gzhead.extra.length)r1(U,U.gzhead.extra.length&255),r1(U,U.gzhead.extra.length>>8&255);if(U.gzhead.hcrc)$.adler=n7($.adler,U.pending_buf,U.pending,0);U.gzindex=0,U.status=hy}else{var I=OM+(U.w_bits-8<<4)<<8,K=-1;if(U.strategy>=qM||U.level<2)K=0;else if(U.level<6)K=1;else if(U.level===6)K=2;else K=3;if(I|=K<<6,U.strstart!==0)I|=dl0;if(I+=31-I%31,U.status=$z,WW(U,I),U.strstart!==0)WW(U,$.adler>>>16),WW(U,$.adler&65535);$.adler=1}if(U.status===hy)if(U.gzhead.extra){Q=U.pending;while(U.gzindex<(U.gzhead.extra.length&65535)){if(U.pending===U.pending_buf_size){if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(c7($),Q=U.pending,U.pending===U.pending_buf_size)break}r1(U,U.gzhead.extra[U.gzindex]&255),U.gzindex++}if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(U.gzindex===U.gzhead.extra.length)U.gzindex=0,U.status=VM}else U.status=VM;if(U.status===VM)if(U.gzhead.name){Q=U.pending;do{if(U.pending===U.pending_buf_size){if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(c7($),Q=U.pending,U.pending===U.pending_buf_size){J=1;break}}if(U.gzindexQ)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(J===0)U.gzindex=0,U.status=LM}else U.status=LM;if(U.status===LM)if(U.gzhead.comment){Q=U.pending;do{if(U.pending===U.pending_buf_size){if(U.gzhead.hcrc&&U.pending>Q)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(c7($),Q=U.pending,U.pending===U.pending_buf_size){J=1;break}}if(U.gzindexQ)$.adler=n7($.adler,U.pending_buf,U.pending-Q,Q);if(J===0)U.status=FM}else U.status=FM;if(U.status===FM)if(U.gzhead.hcrc){if(U.pending+2>U.pending_buf_size)c7($);if(U.pending+2<=U.pending_buf_size)r1(U,$.adler&255),r1(U,$.adler>>8&255),$.adler=0,U.status=$z}else U.status=$z;if(U.pending!==0){if(c7($),$.avail_out===0)return U.last_flush=-1,Q9}else if($.avail_in===0&&k$0(Y)<=k$0(z)&&Y!==l7)return m7($,Ry);if(U.status===XW&&$.avail_in!==0)return m7($,Ry);if($.avail_in!==0||U.lookahead!==0||Y!==Uz&&U.status!==XW){var G=U.strategy===qM?sl0(U,Y):U.strategy===hl0?rl0(U,Y):LJ[U.level].func(U,Y);if(G===Yz||G===FJ)U.status=XW;if(G===P6||G===Yz){if($.avail_out===0)U.last_flush=-1;return Q9}if(G===ZW){if(Y===El0)E$._tr_align(U);else if(Y!==g$0){if(E$._tr_stored_block(U,0,0,!1),Y===Cl0){if(p7(U.head),U.lookahead===0)U.strstart=0,U.block_start=0,U.insert=0}}if(c7($),$.avail_out===0)return U.last_flush=-1,Q9}}if(Y!==l7)return Q9;if(U.wrap<=0)return y$0;if(U.wrap===2)r1(U,$.adler&255),r1(U,$.adler>>8&255),r1(U,$.adler>>16&255),r1(U,$.adler>>24&255),r1(U,$.total_in&255),r1(U,$.total_in>>8&255),r1(U,$.total_in>>16&255),r1(U,$.total_in>>24&255);else WW(U,$.adler>>>16),WW(U,$.adler&65535);if(c7($),U.wrap>0)U.wrap=-U.wrap;return U.pending!==0?Q9:y$0}function zo0($){var Y;if(!$||!$.state)return C$;if(Y=$.state.status,Y!==wM&&Y!==hy&&Y!==VM&&Y!==LM&&Y!==FM&&Y!==$z&&Y!==XW)return m7($,C$);return $.state=null,Y===$z?m7($,Rl0):Q9}function Uo0($,Y){var z=Y.length,U,Q,J,I,K,G,H,W;if(!$||!$.state)return C$;if(U=$.state,I=U.wrap,I===2||I===1&&U.status!==wM||U.lookahead)return C$;if(I===1)$.adler=x$0($.adler,Y,z,0);if(U.wrap=0,z>=U.w_size){if(I===0)p7(U.head),U.strstart=0,U.block_start=0,U.insert=0;W=new E8.Buf8(U.w_size),E8.arraySet(W,Y,z-U.w_size,U.w_size,0),Y=W,z=U.w_size}K=$.avail_in,G=$.next_in,H=$.input,$.avail_in=z,$.next_in=0,$.input=Y,zz(U);while(U.lookahead>=f1){Q=U.strstart,J=U.lookahead-(f1-1);do U.ins_h=(U.ins_h<{var MM=K3(),c$0=!0,p$0=!0;try{String.fromCharCode.apply(null,[0])}catch($){c$0=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch($){p$0=!1}var qW=new MM.Buf8(256);for(J9=0;J9<256;J9++)qW[J9]=J9>=252?6:J9>=248?5:J9>=240?4:J9>=224?3:J9>=192?2:1;var J9;qW[254]=qW[254]=1;Vo0.string2buf=function($){var Y,z,U,Q,J,I=$.length,K=0;for(Q=0;Q>>6,Y[J++]=128|z&63;else if(z<65536)Y[J++]=224|z>>>12,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63;else Y[J++]=240|z>>>18,Y[J++]=128|z>>>12&63,Y[J++]=128|z>>>6&63,Y[J++]=128|z&63}return Y};function d$0($,Y){if(Y<65534){if($.subarray&&p$0||!$.subarray&&c$0)return String.fromCharCode.apply(null,MM.shrinkBuf($,Y))}var z="";for(var U=0;U4){K[U++]=65533,z+=J-1;continue}Q&=J===2?31:J===3?15:7;while(J>1&&z1){K[U++]=65533;continue}if(Q<65536)K[U++]=Q;else Q-=65536,K[U++]=55296|Q>>10&1023,K[U++]=56320|Q&1023}return d$0(K,U)};Vo0.utf8border=function($,Y){var z;if(Y=Y||$.length,Y>$.length)Y=$.length;z=Y-1;while(z>=0&&($[z]&192)===128)z--;if(z<0)return Y;if(z===0)return Y;return z+qW[$[z]]>Y?z:Y}});var gy=E((cd1,m$0)=>{function No0(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}m$0.exports=No0});var s$0=E((Co0)=>{var VW=n$0(),LW=K3(),ky=Sy(),xy=ZM(),Do0=gy(),r$0=Object.prototype.toString,Ao0=0,yy=4,OJ=0,l$0=1,o$0=2,Bo0=-1,Po0=0,jo0=8;function Qz($){if(!(this instanceof Qz))return new Qz($);this.options=LW.assign({level:Bo0,method:jo0,chunkSize:16384,windowBits:15,memLevel:8,strategy:Po0,to:""},$||{});var Y=this.options;if(Y.raw&&Y.windowBits>0)Y.windowBits=-Y.windowBits;else if(Y.gzip&&Y.windowBits>0&&Y.windowBits<16)Y.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Do0,this.strm.avail_out=0;var z=VW.deflateInit2(this.strm,Y.level,Y.method,Y.windowBits,Y.memLevel,Y.strategy);if(z!==OJ)throw Error(xy[z]);if(Y.header)VW.deflateSetHeader(this.strm,Y.header);if(Y.dictionary){var U;if(typeof Y.dictionary==="string")U=ky.string2buf(Y.dictionary);else if(r$0.call(Y.dictionary)==="[object ArrayBuffer]")U=new Uint8Array(Y.dictionary);else U=Y.dictionary;if(z=VW.deflateSetDictionary(this.strm,U),z!==OJ)throw Error(xy[z]);this._dict_set=!0}}Qz.prototype.push=function($,Y){var z=this.strm,U=this.options.chunkSize,Q,J;if(this.ended)return!1;if(J=Y===~~Y?Y:Y===!0?yy:Ao0,typeof $==="string")z.input=ky.string2buf($);else if(r$0.call($)==="[object ArrayBuffer]")z.input=new Uint8Array($);else z.input=$;z.next_in=0,z.avail_in=z.input.length;do{if(z.avail_out===0)z.output=new LW.Buf8(U),z.next_out=0,z.avail_out=U;if(Q=VW.deflate(z,J),Q!==l$0&&Q!==OJ)return this.onEnd(Q),this.ended=!0,!1;if(z.avail_out===0||z.avail_in===0&&(J===yy||J===o$0))if(this.options.to==="string")this.onData(ky.buf2binstring(LW.shrinkBuf(z.output,z.next_out)));else this.onData(LW.shrinkBuf(z.output,z.next_out))}while((z.avail_in>0||z.avail_out===0)&&Q!==l$0);if(J===yy)return Q=VW.deflateEnd(this.strm),this.onEnd(Q),this.ended=!0,Q===OJ;if(J===o$0)return this.onEnd(OJ),z.avail_out=0,!0;return!0};Qz.prototype.onData=function($){this.chunks.push($)};Qz.prototype.onEnd=function($){if($===OJ)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=LW.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function fy($,Y){var z=new Qz(Y);if(z.push($,!0),z.err)throw z.msg||xy[z.err];return z.result}function To0($,Y){return Y=Y||{},Y.raw=!0,fy($,Y)}function Eo0($,Y){return Y=Y||{},Y.gzip=!0,fy($,Y)}Co0.Deflate=Qz;Co0.deflate=fy;Co0.deflateRaw=To0;Co0.gzip=Eo0});var t$0=E((dd1,a$0)=>{var NM=30,So0=12;a$0.exports=function(Y,z){var U,Q,J,I,K,G,H,W,X,Z,q,V,F,w,O,N,M,D,P,j,A,T,C,b,k;U=Y.state,Q=Y.next_in,b=Y.input,J=Q+(Y.avail_in-5),I=Y.next_out,k=Y.output,K=I-(z-Y.avail_out),G=I+(Y.avail_out-257),H=U.dmax,W=U.wsize,X=U.whave,Z=U.wnext,q=U.window,V=U.hold,F=U.bits,w=U.lencode,O=U.distcode,N=(1<>>24,V>>>=P,F-=P,P=D>>>16&255,P===0)k[I++]=D&65535;else if(P&16){if(j=D&65535,P&=15,P){if(F>>=P,F-=P}if(F<15)V+=b[Q++]<>>24,V>>>=P,F-=P,P=D>>>16&255,P&16){if(A=D&65535,P&=15,FH){Y.msg="invalid distance too far back",U.mode=NM;break $}if(V>>>=P,F-=P,P=I-K,A>P){if(P=A-P,P>X){if(U.sane){Y.msg="invalid distance too far back",U.mode=NM;break $}}if(T=0,C=q,Z===0){if(T+=W-P,P2)k[I++]=C[T++],k[I++]=C[T++],k[I++]=C[T++],j-=3;if(j){if(k[I++]=C[T++],j>1)k[I++]=C[T++]}}else{T=I-A;do k[I++]=k[T++],k[I++]=k[T++],k[I++]=k[T++],j-=3;while(j>2);if(j){if(k[I++]=k[T++],j>1)k[I++]=k[T++]}}}else if((P&64)===0){D=O[(D&65535)+(V&(1<>3,Q-=j,F-=j<<3,V&=(1<{var e$0=K3(),wJ=15,$50=852,Y50=592,z50=0,uy=1,U50=2,go0=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],yo0=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ko0=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],xo0=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Q50.exports=function(Y,z,U,Q,J,I,K,G){var H=G.bits,W=0,X=0,Z=0,q=0,V=0,F=0,w=0,O=0,N=0,M=0,D,P,j,A,T,C=null,b=0,k,S=new e$0.Buf16(wJ+1),i=new e$0.Buf16(wJ+1),n=null,U0=0,x,d,t;for(W=0;W<=wJ;W++)S[W]=0;for(X=0;X=1;q--)if(S[q]!==0)break;if(V>q)V=q;if(q===0)return J[I++]=20971520,J[I++]=20971520,G.bits=1,0;for(Z=1;Z0&&(Y===z50||q!==1))return-1;i[1]=0;for(W=1;W$50||Y===U50&&N>Y50)return 1;for(;;){if(x=W-w,K[X]k)d=n[U0+K[X]],t=C[b+K[X]];else d=96,t=0;D=1<>w)+P]=x<<24|d<<16|t|0;while(P!==0);D=1<>=1;if(D!==0)M&=D-1,M+=D;else M=0;if(X++,--S[W]===0){if(W===q)break;W=z[U+K[X]]}if(W>V&&(M&A)!==j){if(w===0)w=V;T+=Z,F=W-w,O=1<$50||Y===U50&&N>Y50)return 1;j=M&A,J[j]=V<<24|F<<16|T-I|0}}if(M!==0)J[T+M]=W-w<<24|4194304|0;return G.bits=V,0}});var b50=E((zr0)=>{var G$=K3(),dy=Ey(),I9=Cy(),fo0=t$0(),FW=J50(),uo0=0,v50=1,h50=2,I50=4,bo0=5,DM=6,Jz=0,io0=1,no0=2,R$=-2,S50=-3,my=-4,co0=-5,K50=8,g50=1,G50=2,H50=3,W50=4,X50=5,Z50=6,q50=7,V50=8,L50=9,F50=10,PM=11,H3=12,by=13,O50=14,iy=15,w50=16,M50=17,N50=18,D50=19,AM=20,BM=21,A50=22,B50=23,P50=24,j50=25,T50=26,ny=27,E50=28,C50=29,y4=30,ly=31,po0=32,do0=852,mo0=592,lo0=15,oo0=lo0;function R50($){return($>>>24&255)+($>>>8&65280)+(($&65280)<<8)+(($&255)<<24)}function ro0(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new G$.Buf16(320),this.work=new G$.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y50($){var Y;if(!$||!$.state)return R$;if(Y=$.state,$.total_in=$.total_out=Y.total=0,$.msg="",Y.wrap)$.adler=Y.wrap&1;return Y.mode=g50,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new G$.Buf32(do0),Y.distcode=Y.distdyn=new G$.Buf32(mo0),Y.sane=1,Y.back=-1,Jz}function k50($){var Y;if(!$||!$.state)return R$;return Y=$.state,Y.wsize=0,Y.whave=0,Y.wnext=0,y50($)}function x50($,Y){var z,U;if(!$||!$.state)return R$;if(U=$.state,Y<0)z=0,Y=-Y;else if(z=(Y>>4)+1,Y<48)Y&=15;if(Y&&(Y<8||Y>15))return R$;if(U.window!==null&&U.wbits!==Y)U.window=null;return U.wrap=z,U.wbits=Y,k50($)}function f50($,Y){var z,U;if(!$)return R$;if(U=new ro0,$.state=U,U.window=null,z=x50($,Y),z!==Jz)$.state=null;return z}function so0($){return f50($,oo0)}var _50=!0,cy,py;function ao0($){if(_50){var Y;cy=new G$.Buf32(512),py=new G$.Buf32(32),Y=0;while(Y<144)$.lens[Y++]=8;while(Y<256)$.lens[Y++]=9;while(Y<280)$.lens[Y++]=7;while(Y<288)$.lens[Y++]=8;FW(v50,$.lens,0,288,cy,0,$.work,{bits:9}),Y=0;while(Y<32)$.lens[Y++]=5;FW(h50,$.lens,0,32,py,0,$.work,{bits:5}),_50=!1}$.lencode=cy,$.lenbits=9,$.distcode=py,$.distbits=5}function u50($,Y,z,U){var Q,J=$.state;if(J.window===null)J.wsize=1<=J.wsize)G$.arraySet(J.window,Y,z-J.wsize,J.wsize,0),J.wnext=0,J.whave=J.wsize;else{if(Q=J.wsize-J.wnext,Q>U)Q=U;if(G$.arraySet(J.window,Y,z-U,Q,J.wnext),U-=Q,U)G$.arraySet(J.window,Y,z-U,U,0),J.wnext=U,J.whave=J.wsize;else{if(J.wnext+=Q,J.wnext===J.wsize)J.wnext=0;if(J.whave>>8&255,z.check=I9(z.check,C,2,0),H=0,W=0,z.mode=G50;break}if(z.flags=0,z.head)z.head.done=!1;if(!(z.wrap&1)||(((H&255)<<8)+(H>>8))%31){$.msg="incorrect header check",z.mode=y4;break}if((H&15)!==K50){$.msg="unknown compression method",z.mode=y4;break}if(H>>>=4,W-=4,A=(H&15)+8,z.wbits===0)z.wbits=A;else if(A>z.wbits){$.msg="invalid window size",z.mode=y4;break}z.dmax=1<>8&1;if(z.flags&512)C[0]=H&255,C[1]=H>>>8&255,z.check=I9(z.check,C,2,0);H=0,W=0,z.mode=H50;case H50:while(W<32){if(K===0)break $;K--,H+=U[J++]<>>8&255,C[2]=H>>>16&255,C[3]=H>>>24&255,z.check=I9(z.check,C,4,0);H=0,W=0,z.mode=W50;case W50:while(W<16){if(K===0)break $;K--,H+=U[J++]<>8;if(z.flags&512)C[0]=H&255,C[1]=H>>>8&255,z.check=I9(z.check,C,2,0);H=0,W=0,z.mode=X50;case X50:if(z.flags&1024){while(W<16){if(K===0)break $;K--,H+=U[J++]<>>8&255,z.check=I9(z.check,C,2,0);H=0,W=0}else if(z.head)z.head.extra=null;z.mode=Z50;case Z50:if(z.flags&1024){if(q=z.length,q>K)q=K;if(q){if(z.head){if(A=z.head.extra_len-z.length,!z.head.extra)z.head.extra=Array(z.head.extra_len);G$.arraySet(z.head.extra,U,J,q,A)}if(z.flags&512)z.check=I9(z.check,U,q,J);K-=q,J+=q,z.length-=q}if(z.length)break $}z.length=0,z.mode=q50;case q50:if(z.flags&2048){if(K===0)break $;q=0;do if(A=U[J+q++],z.head&&A&&z.length<65536)z.head.name+=String.fromCharCode(A);while(A&&q>9&1,z.head.done=!0;$.adler=z.check=0,z.mode=H3;break;case F50:while(W<32){if(K===0)break $;K--,H+=U[J++]<>>=W&7,W-=W&7,z.mode=ny;break}while(W<3){if(K===0)break $;K--,H+=U[J++]<>>=1,W-=1,H&3){case 0:z.mode=O50;break;case 1:if(ao0(z),z.mode=AM,Y===DM){H>>>=2,W-=2;break $}break;case 2:z.mode=M50;break;case 3:$.msg="invalid block type",z.mode=y4}H>>>=2,W-=2;break;case O50:H>>>=W&7,W-=W&7;while(W<32){if(K===0)break $;K--,H+=U[J++]<>>16^65535)){$.msg="invalid stored block lengths",z.mode=y4;break}if(z.length=H&65535,H=0,W=0,z.mode=iy,Y===DM)break $;case iy:z.mode=w50;case w50:if(q=z.length,q){if(q>K)q=K;if(q>G)q=G;if(q===0)break $;G$.arraySet(Q,U,J,q,I),K-=q,J+=q,G-=q,I+=q,z.length-=q;break}z.mode=H3;break;case M50:while(W<14){if(K===0)break $;K--,H+=U[J++]<>>=5,W-=5,z.ndist=(H&31)+1,H>>>=5,W-=5,z.ncode=(H&15)+4,H>>>=4,W-=4,z.nlen>286||z.ndist>30){$.msg="too many length or distance symbols",z.mode=y4;break}z.have=0,z.mode=N50;case N50:while(z.have>>=3,W-=3}while(z.have<19)z.lens[S[z.have++]]=0;if(z.lencode=z.lendyn,z.lenbits=7,b={bits:z.lenbits},T=FW(uo0,z.lens,0,19,z.lencode,0,z.work,b),z.lenbits=b.bits,T){$.msg="invalid code lengths set",z.mode=y4;break}z.have=0,z.mode=D50;case D50:while(z.have>>24,N=w>>>16&255,M=w&65535,O<=W)break;if(K===0)break $;K--,H+=U[J++]<>>=O,W-=O,z.lens[z.have++]=M;else{if(M===16){k=O+2;while(W>>=O,W-=O,z.have===0){$.msg="invalid bit length repeat",z.mode=y4;break}A=z.lens[z.have-1],q=3+(H&3),H>>>=2,W-=2}else if(M===17){k=O+3;while(W>>=O,W-=O,A=0,q=3+(H&7),H>>>=3,W-=3}else{k=O+7;while(W>>=O,W-=O,A=0,q=11+(H&127),H>>>=7,W-=7}if(z.have+q>z.nlen+z.ndist){$.msg="invalid bit length repeat",z.mode=y4;break}while(q--)z.lens[z.have++]=A}}if(z.mode===y4)break;if(z.lens[256]===0){$.msg="invalid code -- missing end-of-block",z.mode=y4;break}if(z.lenbits=9,b={bits:z.lenbits},T=FW(v50,z.lens,0,z.nlen,z.lencode,0,z.work,b),z.lenbits=b.bits,T){$.msg="invalid literal/lengths set",z.mode=y4;break}if(z.distbits=6,z.distcode=z.distdyn,b={bits:z.distbits},T=FW(h50,z.lens,z.nlen,z.ndist,z.distcode,0,z.work,b),z.distbits=b.bits,T){$.msg="invalid distances set",z.mode=y4;break}if(z.mode=AM,Y===DM)break $;case AM:z.mode=BM;case BM:if(K>=6&&G>=258){if($.next_out=I,$.avail_out=G,$.next_in=J,$.avail_in=K,z.hold=H,z.bits=W,fo0($,Z),I=$.next_out,Q=$.output,G=$.avail_out,J=$.next_in,U=$.input,K=$.avail_in,H=z.hold,W=z.bits,z.mode===H3)z.back=-1;break}z.back=0;for(;;){if(w=z.lencode[H&(1<>>24,N=w>>>16&255,M=w&65535,O<=W)break;if(K===0)break $;K--,H+=U[J++]<>D)],O=w>>>24,N=w>>>16&255,M=w&65535,D+O<=W)break;if(K===0)break $;K--,H+=U[J++]<>>=D,W-=D,z.back+=D}if(H>>>=O,W-=O,z.back+=O,z.length=M,N===0){z.mode=T50;break}if(N&32){z.back=-1,z.mode=H3;break}if(N&64){$.msg="invalid literal/length code",z.mode=y4;break}z.extra=N&15,z.mode=A50;case A50:if(z.extra){k=z.extra;while(W>>=z.extra,W-=z.extra,z.back+=z.extra}z.was=z.length,z.mode=B50;case B50:for(;;){if(w=z.distcode[H&(1<>>24,N=w>>>16&255,M=w&65535,O<=W)break;if(K===0)break $;K--,H+=U[J++]<>D)],O=w>>>24,N=w>>>16&255,M=w&65535,D+O<=W)break;if(K===0)break $;K--,H+=U[J++]<>>=D,W-=D,z.back+=D}if(H>>>=O,W-=O,z.back+=O,N&64){$.msg="invalid distance code",z.mode=y4;break}z.offset=M,z.extra=N&15,z.mode=P50;case P50:if(z.extra){k=z.extra;while(W>>=z.extra,W-=z.extra,z.back+=z.extra}if(z.offset>z.dmax){$.msg="invalid distance too far back",z.mode=y4;break}z.mode=j50;case j50:if(G===0)break $;if(q=Z-G,z.offset>q){if(q=z.offset-q,q>z.whave){if(z.sane){$.msg="invalid distance too far back",z.mode=y4;break}}if(q>z.wnext)q-=z.wnext,V=z.wsize-q;else V=z.wnext-q;if(q>z.length)q=z.length;F=z.window}else F=Q,V=I-z.offset,q=z.length;if(q>G)q=G;G-=q,z.length-=q;do Q[I++]=F[V++];while(--q);if(z.length===0)z.mode=BM;break;case T50:if(G===0)break $;Q[I++]=z.length,G--,z.mode=BM;break;case ny:if(z.wrap){while(W<32){if(K===0)break $;K--,H|=U[J++]<{i50.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var c50=E((rd1,n50)=>{function qr0(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n50.exports=qr0});var d50=E((Or0)=>{var MJ=b50(),OW=K3(),jM=Sy(),G6=oy(),ry=ZM(),Vr0=gy(),Lr0=c50(),p50=Object.prototype.toString;function Iz($){if(!(this instanceof Iz))return new Iz($);this.options=OW.assign({chunkSize:16384,windowBits:0,to:""},$||{});var Y=this.options;if(Y.raw&&Y.windowBits>=0&&Y.windowBits<16){if(Y.windowBits=-Y.windowBits,Y.windowBits===0)Y.windowBits=-15}if(Y.windowBits>=0&&Y.windowBits<16&&!($&&$.windowBits))Y.windowBits+=32;if(Y.windowBits>15&&Y.windowBits<48){if((Y.windowBits&15)===0)Y.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vr0,this.strm.avail_out=0;var z=MJ.inflateInit2(this.strm,Y.windowBits);if(z!==G6.Z_OK)throw Error(ry[z]);if(this.header=new Lr0,MJ.inflateGetHeader(this.strm,this.header),Y.dictionary){if(typeof Y.dictionary==="string")Y.dictionary=jM.string2buf(Y.dictionary);else if(p50.call(Y.dictionary)==="[object ArrayBuffer]")Y.dictionary=new Uint8Array(Y.dictionary);if(Y.raw){if(z=MJ.inflateSetDictionary(this.strm,Y.dictionary),z!==G6.Z_OK)throw Error(ry[z])}}}Iz.prototype.push=function($,Y){var z=this.strm,U=this.options.chunkSize,Q=this.options.dictionary,J,I,K,G,H,W=!1;if(this.ended)return!1;if(I=Y===~~Y?Y:Y===!0?G6.Z_FINISH:G6.Z_NO_FLUSH,typeof $==="string")z.input=jM.binstring2buf($);else if(p50.call($)==="[object ArrayBuffer]")z.input=new Uint8Array($);else z.input=$;z.next_in=0,z.avail_in=z.input.length;do{if(z.avail_out===0)z.output=new OW.Buf8(U),z.next_out=0,z.avail_out=U;if(J=MJ.inflate(z,G6.Z_NO_FLUSH),J===G6.Z_NEED_DICT&&Q)J=MJ.inflateSetDictionary(this.strm,Q);if(J===G6.Z_BUF_ERROR&&W===!0)J=G6.Z_OK,W=!1;if(J!==G6.Z_STREAM_END&&J!==G6.Z_OK)return this.onEnd(J),this.ended=!0,!1;if(z.next_out){if(z.avail_out===0||J===G6.Z_STREAM_END||z.avail_in===0&&(I===G6.Z_FINISH||I===G6.Z_SYNC_FLUSH))if(this.options.to==="string"){if(K=jM.utf8border(z.output,z.next_out),G=z.next_out-K,H=jM.buf2string(z.output,K),z.next_out=G,z.avail_out=U-G,G)OW.arraySet(z.output,z.output,K,G,0);this.onData(H)}else this.onData(OW.shrinkBuf(z.output,z.next_out))}if(z.avail_in===0&&z.avail_out===0)W=!0}while((z.avail_in>0||z.avail_out===0)&&J!==G6.Z_STREAM_END);if(J===G6.Z_STREAM_END)I=G6.Z_FINISH;if(I===G6.Z_FINISH)return J=MJ.inflateEnd(this.strm),this.onEnd(J),this.ended=!0,J===G6.Z_OK;if(I===G6.Z_SYNC_FLUSH)return this.onEnd(G6.Z_OK),z.avail_out=0,!0;return!0};Iz.prototype.onData=function($){this.chunks.push($)};Iz.prototype.onEnd=function($){if($===G6.Z_OK)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=OW.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function sy($,Y){var z=new Iz(Y);if(z.push($,!0),z.err)throw z.msg||ry[z.err];return z.result}function Fr0($,Y){return Y=Y||{},Y.raw=!0,sy($,Y)}Or0.Inflate=Iz;Or0.inflate=sy;Or0.inflateRaw=Fr0;Or0.ungzip=sy});var o50=E((ad1,l50)=>{var Ar0=K3().assign,Br0=s$0(),Pr0=d50(),jr0=oy(),m50={};Ar0(m50,Br0,Pr0,jr0);l50.exports=m50});var s50=E((Rr0)=>{var Tr0=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Er0=o50(),r50=c4(),TM=K$(),Cr0=Tr0?"uint8array":"array";Rr0.magic="\b\x00";function Kz($,Y){TM.call(this,"FlateWorker/"+$),this._pako=null,this._pakoAction=$,this._pakoOptions=Y,this.meta={}}r50.inherits(Kz,TM);Kz.prototype.processChunk=function($){if(this.meta=$.meta,this._pako===null)this._createPako();this._pako.push(r50.transformTo(Cr0,$.data),!1)};Kz.prototype.flush=function(){if(TM.prototype.flush.call(this),this._pako===null)this._createPako();this._pako.push([],!0)};Kz.prototype.cleanUp=function(){TM.prototype.cleanUp.call(this),this._pako=null};Kz.prototype._createPako=function(){this._pako=new Er0[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var $=this;this._pako.onData=function(Y){$.push({data:Y,meta:$.meta})}};Rr0.compressWorker=function($){return new Kz("Deflate",$)};Rr0.uncompressWorker=function(){return new Kz("Inflate",{})}});var ay=E((Sr0)=>{var a50=K$();Sr0.STORE={magic:"\x00\x00",compressWorker:function(){return new a50("STORE compression")},uncompressWorker:function(){return new a50("STORE decompression")}};Sr0.DEFLATE=s50()});var ty=E((kr0)=>{kr0.LOCAL_FILE_HEADER="PK\x03\x04";kr0.CENTRAL_FILE_HEADER="PK\x01\x02";kr0.CENTRAL_DIRECTORY_END="PK\x05\x06";kr0.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";kr0.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";kr0.DATA_DESCRIPTOR="PK\x07\b"});var Y90=E((Ym1,$90)=>{var NJ=c4(),DJ=K$(),ey=WJ(),t50=GM(),EM=ty(),N4=function($,Y){var z="",U;for(U=0;U>>8;return z},cr0=function($,Y){var z=$;if(!$)z=Y?16893:33204;return(z&65535)<<16},pr0=function($){return($||0)&63},e50=function($,Y,z,U,Q,J){var{file:I,compression:K}=$,G=J!==ey.utf8encode,H=NJ.transformTo("string",J(I.name)),W=NJ.transformTo("string",ey.utf8encode(I.name)),X=I.comment,Z=NJ.transformTo("string",J(X)),q=NJ.transformTo("string",ey.utf8encode(X)),V=W.length!==I.name.length,F=q.length!==X.length,w,O,N="",M="",D="",P=I.dir,j=I.date,A={crc32:0,compressedSize:0,uncompressedSize:0};if(!Y||z)A.crc32=$.crc32,A.compressedSize=$.compressedSize,A.uncompressedSize=$.uncompressedSize;var T=0;if(Y)T|=8;if(!G&&(V||F))T|=2048;var C=0,b=0;if(P)C|=16;if(Q==="UNIX")b=798,C|=cr0(I.unixPermissions,P);else b=20,C|=pr0(I.dosPermissions,P);if(w=j.getUTCHours(),w=w<<6,w=w|j.getUTCMinutes(),w=w<<5,w=w|j.getUTCSeconds()/2,O=j.getUTCFullYear()-1980,O=O<<4,O=O|j.getUTCMonth()+1,O=O<<5,O=O|j.getUTCDate(),V)M=N4(1,1)+N4(t50(H),4)+W,N+="up"+N4(M.length,2)+M;if(F)D=N4(1,1)+N4(t50(Z),4)+q,N+="uc"+N4(D.length,2)+D;var k="";k+=` \x00`,k+=N4(T,2),k+=K.magic,k+=N4(w,2),k+=N4(O,2),k+=N4(A.crc32,4),k+=N4(A.compressedSize,4),k+=N4(A.uncompressedSize,4),k+=N4(H.length,2),k+=N4(N.length,2);var S=EM.LOCAL_FILE_HEADER+k+H+N,i=EM.CENTRAL_FILE_HEADER+N4(b,2)+k+N4(Z.length,2)+"\x00\x00\x00\x00"+N4(C,4)+N4(U,4)+H+N+Z;return{fileRecord:S,dirRecord:i}},dr0=function($,Y,z,U,Q){var J="",I=NJ.transformTo("string",Q(U));return J=EM.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+N4($,2)+N4($,2)+N4(Y,4)+N4(z,4)+N4(I.length,2)+I,J},mr0=function($){var Y="";return Y=EM.DATA_DESCRIPTOR+N4($.crc32,4)+N4($.compressedSize,4)+N4($.uncompressedSize,4),Y};function Z5($,Y,z,U){DJ.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=Y,this.zipPlatform=z,this.encodeFileName=U,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}NJ.inherits(Z5,DJ);Z5.prototype.push=function($){var Y=$.meta.percent||0,z=this.entriesCount,U=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,DJ.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:z?(Y+100*(z-U-1))/z:100}})};Z5.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var Y=this.streamFiles&&!$.file.dir;if(Y){var z=e50($,Y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:z.fileRecord,meta:{percent:0}})}else this.accumulate=!0};Z5.prototype.closedSource=function($){this.accumulate=!1;var Y=this.streamFiles&&!$.file.dir,z=e50($,Y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(z.dirRecord),Y)this.push({data:mr0($),meta:{percent:100}});else{this.push({data:z.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};Z5.prototype.flush=function(){var $=this.bytesWritten;for(var Y=0;Y{var lr0=ay(),or0=Y90(),rr0=function($,Y){var z=$||Y,U=lr0[z];if(!U)throw Error(z+" is not a valid compression method !");return U};sr0.generateWorker=function($,Y,z){var U=new or0(Y.streamFiles,z,Y.platform,Y.encodeFileName),Q=0;try{$.forEach(function(J,I){Q++;var K=rr0(I.options.compression,Y.compression),G=I.options.compressionOptions||Y.compressionOptions||{},H=I.dir,W=I.date;I._compressWorker(K,G).withStreamInfo("file",{name:J,dir:H,date:W,comment:I.comment||"",unixPermissions:I.unixPermissions,dosPermissions:I.dosPermissions}).pipe(U)}),U.entriesCount=Q}catch(J){U.error(J)}return U}});var Q90=E((Um1,U90)=>{var tr0=c4(),CM=K$();function wW($,Y){CM.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(Y)}tr0.inherits(wW,CM);wW.prototype._bindStream=function($){var Y=this;this._stream=$,$.pause(),$.on("data",function(z){Y.push({data:z,meta:{percent:0}})}).on("error",function(z){if(Y.isPaused)this.generatedError=z;else Y.error(z)}).on("end",function(){if(Y.isPaused)Y._upstreamEnded=!0;else Y.end()})};wW.prototype.pause=function(){if(!CM.prototype.pause.call(this))return!1;return this._stream.pause(),!0};wW.prototype.resume=function(){if(!CM.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};U90.exports=wW});var V90=E((Qm1,q90)=>{var er0=WJ(),MW=c4(),G90=K$(),$s0=Uy(),H90=Qy(),J90=HM(),Ys0=I$0(),zs0=z90(),I90=aH(),Us0=Q90(),W90=function($,Y,z){var U=MW.getTypeOf(Y),Q,J=MW.extend(z||{},H90);if(J.date=J.date||new Date,J.compression!==null)J.compression=J.compression.toUpperCase();if(typeof J.unixPermissions==="string")J.unixPermissions=parseInt(J.unixPermissions,8);if(J.unixPermissions&&J.unixPermissions&16384)J.dir=!0;if(J.dosPermissions&&J.dosPermissions&16)J.dir=!0;if(J.dir)$=X90($);if(J.createFolders&&(Q=Qs0($)))Z90.call(this,Q,!0);var I=U==="string"&&J.binary===!1&&J.base64===!1;if(!z||typeof z.binary>"u")J.binary=!I;var K=Y instanceof J90&&Y.uncompressedSize===0;if(K||J.dir||!Y||Y.length===0)J.base64=!1,J.binary=!0,Y="",J.compression="STORE",U="string";var G=null;if(Y instanceof J90||Y instanceof G90)G=Y;else if(I90.isNode&&I90.isStream(Y))G=new Us0($,Y);else G=MW.prepareContent($,Y,J.binary,J.optimizedBinaryString,J.base64);var H=new Ys0($,G,J);this.files[$]=H},Qs0=function($){if($.slice(-1)==="/")$=$.substring(0,$.length-1);var Y=$.lastIndexOf("/");return Y>0?$.substring(0,Y):""},X90=function($){if($.slice(-1)!=="/")$+="/";return $},Z90=function($,Y){if(Y=typeof Y<"u"?Y:H90.createFolders,$=X90($),!this.files[$])W90.call(this,$,null,{dir:!0,createFolders:Y});return this.files[$]};function K90($){return Object.prototype.toString.call($)==="[object RegExp]"}var Js0={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function($){var Y,z,U;for(Y in this.files)if(U=this.files[Y],z=Y.slice(this.root.length,Y.length),z&&Y.slice(0,this.root.length)===this.root)$(z,U)},filter:function($){var Y=[];return this.forEach(function(z,U){if($(z,U))Y.push(U)}),Y},file:function($,Y,z){if(arguments.length===1)if(K90($)){var U=$;return this.filter(function(J,I){return!I.dir&&U.test(J)})}else{var Q=this.files[this.root+$];if(Q&&!Q.dir)return Q;else return null}else $=this.root+$,W90.call(this,$,Y,z);return this},folder:function($){if(!$)return this;if(K90($))return this.filter(function(Q,J){return J.dir&&$.test(Q)});var Y=this.root+$,z=Z90.call(this,Y),U=this.clone();return U.root=z.name,U},remove:function($){$=this.root+$;var Y=this.files[$];if(!Y){if($.slice(-1)!=="/")$+="/";Y=this.files[$]}if(Y&&!Y.dir)delete this.files[$];else{var z=this.filter(function(Q,J){return J.name.slice(0,$.length)===$});for(var U=0;U{var Is0=c4();function L90($){this.data=$,this.length=$.length,this.index=0,this.zero=0}L90.prototype={checkOffset:function($){this.checkIndex(this.index+$)},checkIndex:function($){if(this.length=this.index;z--)Y=(Y<<8)+this.byteAt(z);return this.index+=$,Y},readString:function($){return Is0.transformTo("string",this.readData($))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var $=this.readInt(4);return new Date(Date.UTC(($>>25&127)+1980,($>>21&15)-1,$>>16&31,$>>11&31,$>>5&63,($&31)<<1))}};F90.exports=L90});var Yk=E((Im1,w90)=>{var O90=$k(),Ks0=c4();function AJ($){O90.call(this,$);for(var Y=0;Y=0;--J)if(this.data[J]===Y&&this.data[J+1]===z&&this.data[J+2]===U&&this.data[J+3]===Q)return J-this.zero;return-1};AJ.prototype.readAndCheckSignature=function($){var Y=$.charCodeAt(0),z=$.charCodeAt(1),U=$.charCodeAt(2),Q=$.charCodeAt(3),J=this.readData(4);return Y===J[0]&&z===J[1]&&U===J[2]&&Q===J[3]};AJ.prototype.readData=function($){if(this.checkOffset($),$===0)return[];var Y=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Y};w90.exports=AJ});var D90=E((Km1,N90)=>{var M90=$k(),Gs0=c4();function BJ($){M90.call(this,$)}Gs0.inherits(BJ,M90);BJ.prototype.byteAt=function($){return this.data.charCodeAt(this.zero+$)};BJ.prototype.lastIndexOfSignature=function($){return this.data.lastIndexOf($)-this.zero};BJ.prototype.readAndCheckSignature=function($){var Y=this.readData(4);return $===Y};BJ.prototype.readData=function($){this.checkOffset($);var Y=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Y};N90.exports=BJ});var Uk=E((Gm1,B90)=>{var A90=Yk(),Hs0=c4();function zk($){A90.call(this,$)}Hs0.inherits(zk,A90);zk.prototype.readData=function($){if(this.checkOffset($),$===0)return new Uint8Array(0);var Y=this.data.subarray(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Y};B90.exports=zk});var T90=E((Hm1,j90)=>{var P90=Uk(),Ws0=c4();function Qk($){P90.call(this,$)}Ws0.inherits(Qk,P90);Qk.prototype.readData=function($){this.checkOffset($);var Y=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Y};j90.exports=Qk});var Jk=E((Wm1,C90)=>{var RM=c4(),E90=I3(),Xs0=Yk(),Zs0=D90(),qs0=T90(),Vs0=Uk();C90.exports=function($){var Y=RM.getTypeOf($);if(RM.checkSupport(Y),Y==="string"&&!E90.uint8array)return new Zs0($);if(Y==="nodebuffer")return new qs0($);if(E90.uint8array)return new Vs0(RM.transformTo("uint8array",$));return new Xs0(RM.transformTo("array",$))}});var h90=E((Xm1,v90)=>{var Ik=Jk(),o7=c4(),Ls0=HM(),R90=GM(),_M=WJ(),vM=ay(),Fs0=I3(),Os0=0,ws0=3,Ms0=function($){for(var Y in vM){if(!Object.prototype.hasOwnProperty.call(vM,Y))continue;if(vM[Y].magic===$)return vM[Y]}return null};function _90($,Y){this.options=$,this.loadOptions=Y}_90.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function($){var Y,z;if($.skip(22),this.fileNameLength=$.readInt(2),z=$.readInt(2),this.fileName=$.readData(this.fileNameLength),$.skip(z),this.compressedSize===-1||this.uncompressedSize===-1)throw Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(Y=Ms0(this.compressionMethod),Y===null)throw Error("Corrupted zip : compression "+o7.pretty(this.compressionMethod)+" unknown (inner file : "+o7.transformTo("string",this.fileName)+")");this.decompressed=new Ls0(this.compressedSize,this.uncompressedSize,this.crc32,Y,$.readData(this.compressedSize))},readCentralPart:function($){this.versionMadeBy=$.readInt(2),$.skip(2),this.bitFlag=$.readInt(2),this.compressionMethod=$.readString(2),this.date=$.readDate(),this.crc32=$.readInt(4),this.compressedSize=$.readInt(4),this.uncompressedSize=$.readInt(4);var Y=$.readInt(2);if(this.extraFieldsLength=$.readInt(2),this.fileCommentLength=$.readInt(2),this.diskNumberStart=$.readInt(2),this.internalFileAttributes=$.readInt(2),this.externalFileAttributes=$.readInt(4),this.localHeaderOffset=$.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");$.skip(Y),this.readExtraFields($),this.parseZIP64ExtraField($),this.fileComment=$.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var $=this.versionMadeBy>>8;if(this.dir=this.externalFileAttributes&16?!0:!1,$===Os0)this.dosPermissions=this.externalFileAttributes&63;if($===ws0)this.unixPermissions=this.externalFileAttributes>>16&65535;if(!this.dir&&this.fileNameStr.slice(-1)==="/")this.dir=!0},parseZIP64ExtraField:function(){if(!this.extraFields[1])return;var $=Ik(this.extraFields[1].value);if(this.uncompressedSize===o7.MAX_VALUE_32BITS)this.uncompressedSize=$.readInt(8);if(this.compressedSize===o7.MAX_VALUE_32BITS)this.compressedSize=$.readInt(8);if(this.localHeaderOffset===o7.MAX_VALUE_32BITS)this.localHeaderOffset=$.readInt(8);if(this.diskNumberStart===o7.MAX_VALUE_32BITS)this.diskNumberStart=$.readInt(4)},readExtraFields:function($){var Y=$.index+this.extraFieldsLength,z,U,Q;if(!this.extraFields)this.extraFields={};while($.index+4{var Ns0=Jk(),W3=c4(),q5=ty(),Ds0=h90(),As0=I3();function S90($){this.files=[],this.loadOptions=$}S90.prototype={checkSignature:function($){if(!this.reader.readAndCheckSignature($)){this.reader.index-=4;var Y=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+W3.pretty(Y)+", expected "+W3.pretty($)+")")}},isSignature:function($,Y){var z=this.reader.index;this.reader.setIndex($);var U=this.reader.readString(4),Q=U===Y;return this.reader.setIndex(z),Q},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var $=this.reader.readData(this.zipCommentLength),Y=As0.uint8array?"uint8array":"array",z=W3.transformTo(Y,$);this.zipComment=this.loadOptions.decodeFileName(z)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};var $=this.zip64EndOfCentralSize-44,Y=0,z,U,Q;while(Y<$)z=this.reader.readInt(2),U=this.reader.readInt(4),Q=this.reader.readData(U),this.zip64ExtensibleData[z]={id:z,length:U,value:Q}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var $,Y;for($=0;$0)if(this.isSignature(z,q5.CENTRAL_FILE_HEADER));else this.reader.zero=Q;else if(Q<0)throw Error("Corrupted zip: missing "+Math.abs(Q)+" bytes.")},prepareReader:function($){this.reader=Ns0($)},load:function($){this.prepareReader($),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};g90.exports=S90});var f90=E((qm1,x90)=>{var Kk=c4(),hM=KJ(),Bs0=WJ(),Ps0=y90(),js0=Ky(),k90=aH();function Ts0($){return new hM.Promise(function(Y,z){var U=$.decompressed.getContentWorker().pipe(new js0);U.on("error",function(Q){z(Q)}).on("end",function(){if(U.streamInfo.crc32!==$.decompressed.crc32)z(Error("Corrupted zip : CRC32 mismatch"));else Y()}).resume()})}x90.exports=function($,Y){var z=this;if(Y=Kk.extend(Y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:Bs0.utf8decode}),k90.isNode&&k90.isStream($))return hM.Promise.reject(Error("JSZip can't accept a stream when loading a zip file."));return Kk.prepareContent("the loaded zip file",$,!0,Y.optimizedBinaryString,Y.base64).then(function(U){var Q=new Ps0(Y);return Q.load(U),Q}).then(function(Q){var J=[hM.Promise.resolve(Q)],I=Q.files;if(Y.checkCRC32)for(var K=0;K{function _$(){if(!(this instanceof _$))return new _$;if(arguments.length)throw Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var $=new _$;for(var Y in this)if(typeof this[Y]!=="function")$[Y]=this[Y];return $}}_$.prototype=V90();_$.prototype.loadAsync=f90();_$.support=I3();_$.defaults=Qy();_$.version="3.10.1";_$.loadAsync=function($,Y){return new _$().loadAsync($,Y)};_$.external=KJ();u90.exports=_$});var d90=E((Lm1,p90)=>{function b90($,Y){var z=Object.keys($);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols($);Y&&(U=U.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),z.push.apply(z,U)}return z}function i90($){for(var Y=1;Y0)this.tail.next=U;else this.head=U;this.tail=U,++this.length}},{key:"unshift",value:function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q}},{key:"concat",value:function(z){if(this.length===0)return SM.alloc(0);var U=SM.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)gs0(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U}},{key:"consume",value:function(z,U){var Q;if(zI.length?I.length:z;if(K===I.length)J+=I;else J+=I.slice(0,z);if(z-=K,z===0){if(K===I.length)if(++Q,U.next)this.head=U.next;else this.head=this.tail=null;else this.head=U,U.data=I.slice(K);break}++Q}return this.length-=Q,J}},{key:"_getBuffer",value:function(z){var U=SM.allocUnsafe(z),Q=this.head,J=1;Q.data.copy(U),z-=Q.data.length;while(Q=Q.next){var I=Q.data,K=z>I.length?I.length:z;if(I.copy(U,U.length-z,0,K),z-=K,z===0){if(K===I.length)if(++J,Q.next)this.head=Q.next;else this.head=this.tail=null;else this.head=Q,Q.data=I.slice(K);break}++J}return this.length-=J,U}},{key:Ss0,value:function(z,U){return Hk(this,i90(i90({},U),{},{depth:0,customInspect:!1}))}}]),$}()});var Xk=E((Fm1,l90)=>{function ys0($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)process.nextTick(Wk,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(Wk,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J)if(!z._writableState)process.nextTick(m90,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,process.nextTick(m90,z,J);else process.nextTick(gM,z);else if(Y)process.nextTick(gM,z),Y(J);else process.nextTick(gM,z)}),this}function m90($,Y){Wk($,Y),gM($)}function gM($){if($._writableState&&!$._writableState.emitClose)return;if($._readableState&&!$._readableState.emitClose)return;$.emit("close")}function ks0(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function Wk($,Y){$.emit("error",Y)}function xs0($,Y){var{_readableState:z,_writableState:U}=$;if(z&&z.autoDestroy||U&&U.autoDestroy)$.destroy(Y);else $.emit("error",Y)}l90.exports={destroy:ys0,undestroy:ks0,errorOrDestroy:xs0}});var r7=E((is0,s90)=>{var r90={};function v$($,Y,z){if(!z)z=Error;function U(J,I,K){if(typeof Y==="string")return Y;else return Y(J,I,K)}class Q extends z{constructor(J,I,K){super(U(J,I,K))}}Q.prototype.name=z.name,Q.prototype.code=$,r90[$]=Q}function o90($,Y){if(Array.isArray($)){let z=$.length;if($=$.map((U)=>String(U)),z>2)return`one of ${Y} ${$.slice(0,z-1).join(", ")}, or `+$[z-1];else if(z===2)return`one of ${Y} ${$[0]} or ${$[1]}`;else return`of ${Y} ${$[0]}`}else return`of ${Y} ${String($)}`}function fs0($,Y,z){return $.substr(!z||z<0?0:+z,Y.length)===Y}function us0($,Y,z){if(z===void 0||z>$.length)z=$.length;return $.substring(z-Y.length,z)===Y}function bs0($,Y,z){if(typeof z!=="number")z=0;if(z+Y.length>$.length)return!1;else return $.indexOf(Y,z)!==-1}v$("ERR_INVALID_OPT_VALUE",function($,Y){return'The value "'+Y+'" is invalid for option "'+$+'"'},TypeError);v$("ERR_INVALID_ARG_TYPE",function($,Y,z){let U;if(typeof Y==="string"&&fs0(Y,"not "))U="must not be",Y=Y.replace(/^not /,"");else U="must be";let Q;if(us0($," argument"))Q=`The ${$} ${U} ${o90(Y,"type")}`;else{let J=bs0($,".")?"property":"argument";Q=`The "${$}" ${J} ${U} ${o90(Y,"type")}`}return Q+=`. Received type ${typeof z}`,Q},TypeError);v$("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");v$("ERR_METHOD_NOT_IMPLEMENTED",function($){return"The "+$+" method is not implemented"});v$("ERR_STREAM_PREMATURE_CLOSE","Premature close");v$("ERR_STREAM_DESTROYED",function($){return"Cannot call "+$+" after a stream was destroyed"});v$("ERR_MULTIPLE_CALLBACK","Callback called multiple times");v$("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");v$("ERR_STREAM_WRITE_AFTER_END","write after end");v$("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);v$("ERR_UNKNOWN_ENCODING",function($){return"Unknown encoding: "+$},TypeError);v$("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");is0.codes=r90});var Zk=E((Om1,a90)=>{var cs0=r7().codes.ERR_INVALID_OPT_VALUE;function ps0($,Y,z){return $.highWaterMark!=null?$.highWaterMark:Y?$[z]:null}function ds0($,Y,z,U){var Q=ps0(Y,U,z);if(Q!=null){if(!(isFinite(Q)&&Math.floor(Q)===Q)||Q<0){var J=U?z:"highWaterMark";throw new cs0(J,Q)}return Math.floor(Q)}return $.objectMode?16:16384}a90.exports={getHighWaterMark:ds0}});var Lk=E((wm1,U30)=>{U30.exports=z6;function e90($){var Y=this;this.next=null,this.entry=null,this.finish=function(){wa0(Y,$)}}var PJ;z6.WritableState=DW;var ms0={deprecate:f7()},$30=I0("stream"),kM=I0("buffer").Buffer,ls0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function os0($){return kM.from($)}function rs0($){return kM.isBuffer($)||$ instanceof ls0}var Vk=Xk(),ss0=Zk(),as0=ss0.getHighWaterMark,s7=r7().codes,ts0=s7.ERR_INVALID_ARG_TYPE,es0=s7.ERR_METHOD_NOT_IMPLEMENTED,$a0=s7.ERR_MULTIPLE_CALLBACK,Ya0=s7.ERR_STREAM_CANNOT_PIPE,za0=s7.ERR_STREAM_DESTROYED,Ua0=s7.ERR_STREAM_NULL_VALUES,Qa0=s7.ERR_STREAM_WRITE_AFTER_END,Ja0=s7.ERR_UNKNOWN_ENCODING,jJ=Vk.errorOrDestroy;X1()(z6,$30);function Ia0(){}function DW($,Y,z){if(PJ=PJ||Gz(),$=$||{},typeof z!=="boolean")z=Y instanceof PJ;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;this.highWaterMark=as0(this,$,"writableHighWaterMark",z),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=$.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){qa0(Y,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e90(this)}DW.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(DW.prototype,"buffer",{get:ms0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var yM;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")yM=Function.prototype[Symbol.hasInstance],Object.defineProperty(z6,Symbol.hasInstance,{value:function(Y){if(yM.call(this,Y))return!0;if(this!==z6)return!1;return Y&&Y._writableState instanceof DW}});else yM=function(Y){return Y instanceof this};function z6($){PJ=PJ||Gz();var Y=this instanceof PJ;if(!Y&&!yM.call(z6,this))return new z6($);if(this._writableState=new DW($,this,Y),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}$30.call(this)}z6.prototype.pipe=function(){jJ(this,new Ya0)};function Ka0($,Y){var z=new Qa0;jJ($,z),process.nextTick(Y,z)}function Ga0($,Y,z,U){var Q;if(z===null)Q=new Ua0;else if(typeof z!=="string"&&!Y.objectMode)Q=new ts0("chunk",["string","Buffer"],z);if(Q)return jJ($,Q),process.nextTick(U,Q),!1;return!0}z6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&rs0($);if(J&&!kM.isBuffer($))$=os0($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=Ia0;if(U.ending)Ka0(this,z);else if(J||Ga0(this,U,$,z))U.pendingcb++,Q=Wa0(this,U,J,$,Y,z);return Q};z6.prototype.cork=function(){this._writableState.corked++};z6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)Y30(this,$)}};z6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new Ja0(Y);return this._writableState.defaultEncoding=Y,this};Object.defineProperty(z6.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Ha0($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=kM.from(Y,z);return Y}Object.defineProperty(z6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Wa0($,Y,z,U,Q,J){if(!z){var I=Ha0(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var Ma0=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};J30.exports=K9;var Q30=Ok(),Fk=Lk();X1()(K9,Q30);{xM=Ma0(Fk.prototype);for(AW=0;AW{/*! safe-buffer. MIT License. Feross Aboukhadijeh */var fM=I0("buffer"),G9=fM.Buffer;function I30($,Y){for(var z in $)Y[z]=$[z]}if(G9.from&&G9.alloc&&G9.allocUnsafe&&G9.allocUnsafeSlow)K30.exports=fM;else I30(fM,wk),wk.Buffer=Hz;function Hz($,Y,z){return G9($,Y,z)}Hz.prototype=Object.create(G9.prototype);I30(G9,Hz);Hz.from=function($,Y,z){if(typeof $==="number")throw TypeError("Argument must not be a number");return G9($,Y,z)};Hz.alloc=function($,Y,z){if(typeof $!=="number")throw TypeError("Argument must be a number");var U=G9($);if(Y!==void 0)if(typeof z==="string")U.fill(Y,z);else U.fill(Y);else U.fill(0);return U};Hz.allocUnsafe=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return G9($)};Hz.allocUnsafeSlow=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return fM.SlowBuffer($)}});var TJ=E((ya0)=>{var Nk=G30().Buffer,H30=Nk.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Aa0($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function Ba0($){var Y=Aa0($);if(typeof Y!=="string"&&(Nk.isEncoding===H30||!H30($)))throw Error("Unknown encoding: "+$);return Y||$}ya0.StringDecoder=PW;function PW($){this.encoding=Ba0($);var Y;switch(this.encoding){case"utf16le":this.text=Ra0,this.end=_a0,Y=4;break;case"utf8":this.fillLast=Ta0,Y=4;break;case"base64":this.text=va0,this.end=ha0,Y=3;break;default:this.write=Sa0,this.end=ga0;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Nk.allocUnsafe(Y)}PW.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};PW.prototype.end=Ca0;PW.prototype.text=Ea0;PW.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function Mk($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function Pa0($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function ja0($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function Ta0($){var Y=this.lastTotal-this.lastNeed,z=ja0(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function Ea0($,Y){var z=Pa0(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function Ca0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function Ra0($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function _a0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function va0($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function ha0($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function Sa0($){return $.toString(this.encoding)}function ga0($){return $&&$.length?this.write($):""}});var uM=E((Dm1,Z30)=>{var W30=r7().codes.ERR_STREAM_PREMATURE_CLOSE;function xa0($){var Y=!1;return function(){if(Y)return;Y=!0;for(var z=arguments.length,U=Array(z),Q=0;Q{var bM;function a7($,Y,z){if(Y=ba0(Y),Y in $)Object.defineProperty($,Y,{value:z,enumerable:!0,configurable:!0,writable:!0});else $[Y]=z;return $}function ba0($){var Y=ia0($,"string");return typeof Y==="symbol"?Y:String(Y)}function ia0($,Y){if(typeof $!=="object"||$===null)return $;var z=$[Symbol.toPrimitive];if(z!==void 0){var U=z.call($,Y||"default");if(typeof U!=="object")return U;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var na0=uM(),t7=Symbol("lastResolve"),Wz=Symbol("lastReject"),jW=Symbol("error"),iM=Symbol("ended"),Xz=Symbol("lastPromise"),Dk=Symbol("handlePromise"),Zz=Symbol("stream");function e7($,Y){return{value:$,done:Y}}function ca0($){var Y=$[t7];if(Y!==null){var z=$[Zz].read();if(z!==null)$[Xz]=null,$[t7]=null,$[Wz]=null,Y(e7(z,!1))}}function pa0($){process.nextTick(ca0,$)}function da0($,Y){return function(z,U){$.then(function(){if(Y[iM]){z(e7(void 0,!0));return}Y[Dk](z,U)},U)}}var ma0=Object.getPrototypeOf(function(){}),la0=Object.setPrototypeOf((bM={get stream(){return this[Zz]},next:function(){var Y=this,z=this[jW];if(z!==null)return Promise.reject(z);if(this[iM])return Promise.resolve(e7(void 0,!0));if(this[Zz].destroyed)return new Promise(function(I,K){process.nextTick(function(){if(Y[jW])K(Y[jW]);else I(e7(void 0,!0))})});var U=this[Xz],Q;if(U)Q=new Promise(da0(U,this));else{var J=this[Zz].read();if(J!==null)return Promise.resolve(e7(J,!1));Q=new Promise(this[Dk])}return this[Xz]=Q,Q}},a7(bM,Symbol.asyncIterator,function(){return this}),a7(bM,"return",function(){var Y=this;return new Promise(function(z,U){Y[Zz].destroy(null,function(Q){if(Q){U(Q);return}z(e7(void 0,!0))})})}),bM),ma0),oa0=function(Y){var z,U=Object.create(la0,(z={},a7(z,Zz,{value:Y,writable:!0}),a7(z,t7,{value:null,writable:!0}),a7(z,Wz,{value:null,writable:!0}),a7(z,jW,{value:null,writable:!0}),a7(z,iM,{value:Y._readableState.endEmitted,writable:!0}),a7(z,Dk,{value:function(J,I){var K=U[Zz].read();if(K)U[Xz]=null,U[t7]=null,U[Wz]=null,J(e7(K,!1));else U[t7]=J,U[Wz]=I},writable:!0}),z));return U[Xz]=null,na0(Y,function(Q){if(Q&&Q.code!=="ERR_STREAM_PREMATURE_CLOSE"){var J=U[Wz];if(J!==null)U[Xz]=null,U[t7]=null,U[Wz]=null,J(Q);U[jW]=Q;return}var I=U[t7];if(I!==null)U[Xz]=null,U[t7]=null,U[Wz]=null,I(e7(void 0,!0));U[iM]=!0}),Y.on("readable",pa0.bind(null,U)),U};q30.exports=oa0});var w30=E((Bm1,O30)=>{function L30($,Y,z,U,Q,J,I){try{var K=$[J](I),G=K.value}catch(H){z(H);return}if(K.done)Y(G);else Promise.resolve(G).then(U,Q)}function ra0($){return function(){var Y=this,z=arguments;return new Promise(function(U,Q){var J=$.apply(Y,z);function I(G){L30(J,U,Q,I,K,"next",G)}function K(G){L30(J,U,Q,I,K,"throw",G)}I(void 0)})}}function F30($,Y){var z=Object.keys($);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols($);Y&&(U=U.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),z.push.apply(z,U)}return z}function sa0($){for(var Y=1;Y{C30.exports=p1;var EJ;p1.ReadableState=A30;var Pm1=I0("events").EventEmitter,D30=function(Y,z){return Y.listeners(z).length},EW=I0("stream"),nM=I0("buffer").Buffer,zt0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ut0($){return nM.from($)}function Qt0($){return nM.isBuffer($)||$ instanceof zt0}var Ak=I0("util"),C1;if(Ak&&Ak.debuglog)C1=Ak.debuglog("stream");else C1=function(){};var Jt0=d90(),Rk=Xk(),It0=Zk(),Kt0=It0.getHighWaterMark,cM=r7().codes,Gt0=cM.ERR_INVALID_ARG_TYPE,Ht0=cM.ERR_STREAM_PUSH_AFTER_EOF,Wt0=cM.ERR_METHOD_NOT_IMPLEMENTED,Xt0=cM.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,CJ,Bk,Pk;X1()(p1,EW);var TW=Rk.errorOrDestroy,jk=["error","close","destroy","pause","resume"];function Zt0($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(Array.isArray($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function A30($,Y,z){if(EJ=EJ||Gz(),$=$||{},typeof z!=="boolean")z=Y instanceof EJ;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;if(this.highWaterMark=Kt0(this,$,"readableHighWaterMark",z),this.buffer=new Jt0,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!CJ)CJ=TJ().StringDecoder;this.decoder=new CJ($.encoding),this.encoding=$.encoding}}function p1($){if(EJ=EJ||Gz(),!(this instanceof p1))return new p1($);var Y=this instanceof EJ;if(this._readableState=new A30($,this,Y),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}EW.call(this)}Object.defineProperty(p1.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(Y){if(!this._readableState)return;this._readableState.destroyed=Y}});p1.prototype.destroy=Rk.destroy;p1.prototype._undestroy=Rk.undestroy;p1.prototype._destroy=function($,Y){Y($)};p1.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=nM.from($,Y),Y="";U=!0}}else U=!0;return B30(this,$,Y,!1,U)};p1.prototype.unshift=function($){return B30(this,$,null,!0,!1)};function B30($,Y,z,U,Q){C1("readableAddChunk",Y);var J=$._readableState;if(Y===null)J.reading=!1,Lt0($,J);else{var I;if(!Q)I=qt0(J,Y);if(I)TW($,I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==nM.prototype)Y=Ut0(Y);if(U)if(J.endEmitted)TW($,new Xt0);else Tk($,J,Y,!0);else if(J.ended)TW($,new Ht0);else if(J.destroyed)return!1;else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)Tk($,J,Y,!1);else Ck($,J);else Tk($,J,Y,!1)}else if(!U)J.reading=!1,Ck($,J)}return!J.ended&&(J.length=M30)$=M30;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function N30($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=Vt0($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}p1.prototype.read=function($){C1("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended)){if(C1("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)Ek(this);else pM(this);return null}if($=N30($,Y),$===0&&Y.ended){if(Y.length===0)Ek(this);return null}var U=Y.needReadable;if(C1("need readable",U),Y.length===0||Y.length-$0)Q=T30($,Y);else Q=null;if(Q===null)Y.needReadable=Y.length<=Y.highWaterMark,$=0;else Y.length-=$,Y.awaitDrain=0;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)Ek(this)}if(Q!==null)this.emit("data",Q);return Q};function Lt0($,Y){if(C1("onEofChunk"),Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}if(Y.ended=!0,Y.sync)pM($);else if(Y.needReadable=!1,!Y.emittedReadable)Y.emittedReadable=!0,P30($)}function pM($){var Y=$._readableState;if(C1("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,!Y.emittedReadable)C1("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(P30,$)}function P30($){var Y=$._readableState;if(C1("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended))$.emit("readable"),Y.emittedReadable=!1;Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,_k($)}function Ck($,Y){if(!Y.readingMore)Y.readingMore=!0,process.nextTick(Ft0,$,Y)}function Ft0($,Y){while(!Y.reading&&!Y.ended&&(Y.length1&&E30(U.pipes,$)!==-1)&&!H)C1("false write response, pause",U.awaitDrain),U.awaitDrain++;z.pause()}}function Z(w){if(C1("onerror",w),F(),$.removeListener("error",Z),D30($,"error")===0)TW($,w)}Zt0($,"error",Z);function q(){$.removeListener("finish",V),F()}$.once("close",q);function V(){C1("onfinish"),$.removeListener("close",q),F()}$.once("finish",V);function F(){C1("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)C1("pipe resume"),z.resume();return $};function Ot0($){return function(){var z=$._readableState;if(C1("pipeOnDrain",z.awaitDrain),z.awaitDrain)z.awaitDrain--;if(z.awaitDrain===0&&D30($,"data"))z.flowing=!0,_k($)}}p1.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J0,U.flowing!==!1)this.resume()}else if($==="readable"){if(!U.endEmitted&&!U.readableListening){if(U.readableListening=U.needReadable=!0,U.flowing=!1,U.emittedReadable=!1,C1("on readable",U.length,U.reading),U.length)pM(this);else if(!U.reading)process.nextTick(wt0,this)}}return z};p1.prototype.addListener=p1.prototype.on;p1.prototype.removeListener=function($,Y){var z=EW.prototype.removeListener.call(this,$,Y);if($==="readable")process.nextTick(j30,this);return z};p1.prototype.removeAllListeners=function($){var Y=EW.prototype.removeAllListeners.apply(this,arguments);if($==="readable"||$===void 0)process.nextTick(j30,this);return Y};function j30($){var Y=$._readableState;if(Y.readableListening=$.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused)Y.flowing=!0;else if($.listenerCount("data")>0)$.resume()}function wt0($){C1("readable nexttick read 0"),$.read(0)}p1.prototype.resume=function(){var $=this._readableState;if(!$.flowing)C1("resume"),$.flowing=!$.readableListening,Mt0(this,$);return $.paused=!1,this};function Mt0($,Y){if(!Y.resumeScheduled)Y.resumeScheduled=!0,process.nextTick(Nt0,$,Y)}function Nt0($,Y){if(C1("resume",Y.reading),!Y.reading)$.read(0);if(Y.resumeScheduled=!1,$.emit("resume"),_k($),Y.flowing&&!Y.reading)$.read(0)}p1.prototype.pause=function(){if(C1("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)C1("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function _k($){var Y=$._readableState;C1("flow",Y.flowing);while(Y.flowing&&$.read()!==null);}p1.prototype.wrap=function($){var Y=this,z=this._readableState,U=!1;$.on("end",function(){if(C1("wrapped end"),z.decoder&&!z.ended){var I=z.decoder.end();if(I&&I.length)Y.push(I)}Y.push(null)}),$.on("data",function(I){if(C1("wrapped data"),z.decoder)I=z.decoder.write(I);if(z.objectMode&&(I===null||I===void 0))return;else if(!z.objectMode&&(!I||!I.length))return;var K=Y.push(I);if(!K)U=!0,$.pause()});for(var Q in $)if(this[Q]===void 0&&typeof $[Q]==="function")this[Q]=function(K){return function(){return $[K].apply($,arguments)}}(Q);for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.first();else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=Y.buffer.consume($,Y.decoder);return z}function Ek($){var Y=$._readableState;if(C1("endReadable",Y.endEmitted),!Y.endEmitted)Y.ended=!0,process.nextTick(Dt0,Y,$)}function Dt0($,Y){if(C1("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0){if($.endEmitted=!0,Y.readable=!1,Y.emit("end"),$.autoDestroy){var z=Y._writableState;if(!z||z.autoDestroy&&z.finished)Y.destroy()}}}if(typeof Symbol==="function")p1.from=function($,Y){if(Pk===void 0)Pk=w30();return Pk(p1,$,Y)};function E30($,Y){for(var z=0,U=$.length;z{_30.exports=X3;var dM=r7().codes,At0=dM.ERR_METHOD_NOT_IMPLEMENTED,Bt0=dM.ERR_MULTIPLE_CALLBACK,Pt0=dM.ERR_TRANSFORM_ALREADY_TRANSFORMING,jt0=dM.ERR_TRANSFORM_WITH_LENGTH_0,mM=Gz();X1()(X3,mM);function Tt0($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(U===null)return this.emit("error",new Bt0);if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{h30.exports=CW;var v30=vk();X1()(CW,v30);function CW($){if(!(this instanceof CW))return new CW($);v30.call(this,$)}CW.prototype._transform=function($,Y,z){z(null,$)}});var f30=E((Cm1,x30)=>{var hk;function Ct0($){var Y=!1;return function(){if(Y)return;Y=!0,$.apply(void 0,arguments)}}var k30=r7().codes,Rt0=k30.ERR_MISSING_ARGS,_t0=k30.ERR_STREAM_DESTROYED;function g30($){if($)throw $}function vt0($){return $.setHeader&&typeof $.abort==="function"}function ht0($,Y,z,U){U=Ct0(U);var Q=!1;if($.on("close",function(){Q=!0}),hk===void 0)hk=uM();hk($,{readable:Y,writable:z},function(I){if(I)return U(I);Q=!0,U()});var J=!1;return function(I){if(Q)return;if(J)return;if(J=!0,vt0($))return $.abort();if(typeof $.destroy==="function")return $.destroy();U(I||new _t0("pipe"))}}function y30($){$()}function St0($,Y){return $.pipe(Y)}function gt0($){if(!$.length)return g30;if(typeof $[$.length-1]!=="function")return g30;return $.pop()}function yt0(){for(var $=arguments.length,Y=Array($),z=0;z<$;z++)Y[z]=arguments[z];var U=gt0(Y);if(Array.isArray(Y[0]))Y=Y[0];if(Y.length<2)throw new Rt0("streams");var Q,J=Y.map(function(I,K){var G=K0;return ht0(I,G,H,function(W){if(!Q)Q=W;if(W)J.forEach(y30);if(G)return;J.forEach(y30),U(Q)})});return Y.reduce(St0)}x30.exports=yt0});var C8=E((h$,_W)=>{var RW=I0("stream");if(process.env.READABLE_STREAM==="disable"&&RW)_W.exports=RW.Readable,Object.assign(_W.exports,RW),_W.exports.Stream=RW;else h$=_W.exports=Ok(),h$.Stream=RW||h$,h$.Readable=h$,h$.Writable=Lk(),h$.Duplex=Gz(),h$.Transform=vk(),h$.PassThrough=S30(),h$.finished=uM(),h$.pipeline=f30()});var Z8=E((Rm1,i30)=>{var u30=I0("fs"),kt0=function($,Y,z,U){if($.super_=Y,!U)U=z,z=null;if(z)Object.keys(z).forEach((J)=>{Object.defineProperty($,J,Object.getOwnPropertyDescriptor(z,J))});let Q={constructor:{value:$,enumerable:!1,writable:!1,configurable:!0}};if(U)Object.keys(U).forEach((J)=>{Q[J]=Object.getOwnPropertyDescriptor(U,J)});$.prototype=Object.create(Y.prototype,Q)},xt0=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,b30={nop(){},promiseImmediate($){return new Promise((Y)=>{if(global.setImmediate)setImmediate(()=>{Y($)});else setTimeout(()=>{Y($)},1)})},inherits:kt0,dateToExcel($,Y){return 25569+$.getTime()/86400000-(Y?1462:0)},excelToDate($,Y){let z=Math.round(($-25569+(Y?1462:0))*24*3600*1000);return new Date(z)},parsePath($){let Y=$.lastIndexOf("/");return{path:$.substring(0,Y),name:$.substring(Y+1)}},getRelsPath($){let Y=b30.parsePath($);return`${Y.path}/_rels/${Y.name}.rels`},xmlEncode($){let Y=xt0.exec($);if(!Y)return $;let z="",U="",Q=0,J=Y.index;for(;J<$.length;J++){let I=$.charCodeAt(J);switch(I){case 34:U=""";break;case 38:U="&";break;case 39:U="'";break;case 60:U="<";break;case 62:U=">";break;case 127:U="";break;default:{if(I<=31&&(I<=8||I>=11&&I!==13)){U="";break}continue}}if(Q!==J)z+=$.substring(Q,J);if(Q=J+1,U)z+=U}if(Q!==J)return z+$.substring(Q,J);return z},xmlDecode($){return $.replace(/&([a-z]*);/g,(Y)=>{switch(Y){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return Y}})},validInt($){let Y=parseInt($,10);return!Number.isNaN(Y)?Y:0},isDateFmt($){if(!$)return!1;return $=$.replace(/\[[^\]]*]/g,""),$=$.replace(/"[^"]*"/g,""),$.match(/[ymdhMsb]+/)!==null},fs:{exists($){return new Promise((Y)=>{u30.access($,u30.constants.F_OK,(z)=>{Y(!z)})})}},toIsoDateString($){return $.toIsoString().subsstr(0,10)},parseBoolean($){return $===!0||$==="true"||$===1||$==="1"}};i30.exports=b30});var Sk=E((_m1,c30)=>{class n30{constructor($){this._buf=Buffer.alloc($&&$.size||16384),this._encoding=$&&$.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){if(!this._buffer)this._buffer=Buffer.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length);return this._buffer}reset($){$=$||0,this._buffer=void 0,this._inPos=$}_grow($){let Y=this._buf.length*2;while(Y<$)Y*=2;let z=Buffer.alloc(Y);this._buf.copy(z,0),this._buf=z}addText($){this._buffer=void 0;let Y=this._inPos+this._buf.write($,this._inPos,this._encoding);while(Y>=this._buf.length-4)this._grow(this._inPos+$.length),Y=this._inPos+this._buf.write($,this._inPos,this._encoding);this._inPos=Y}addStringBuf($){if($.length){if(this._buffer=void 0,this.length+$.length>this.capacity)this._grow(this.length+$.length);$._buf.copy(this._buf,this._inPos,0,$.length),this._inPos+=$.length}}}c30.exports=n30});var vW=E((vm1,s30)=>{var ft0=C8(),p30=Z8(),ut0=Sk();class d30{constructor($,Y){this._data=$,this._encoding=Y}get length(){return this.toBuffer().length}copy($,Y,z,U){return this.toBuffer().copy($,Y,z,U)}toBuffer(){if(!this._buffer)this._buffer=Buffer.from(this._data,this._encoding);return this._buffer}}class m30{constructor($){this._data=$}get length(){return this._data.length}copy($,Y,z,U){return this._data._buf.copy($,Y,z,U)}toBuffer(){return this._data.toBuffer()}}class l30{constructor($){this._data=$}get length(){return this._data.length}copy($,Y,z,U){this._data.copy($,Y,z,U)}toBuffer(){return this._data}}class o30{constructor($){this.size=$,this.buffer=Buffer.alloc($),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let $=Buffer.alloc(this.iWrite-this.iRead);return this.buffer.copy($,0,this.iRead,this.iWrite),$}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read($){let Y;if($===0)return null;if($===void 0||$>=this.length)return Y=this.toBuffer(),this.iRead=this.iWrite,Y;return Y=Buffer.alloc($),this.buffer.copy(Y,0,this.iRead,$),this.iRead+=$,Y}write($,Y,z){let U=Math.min(z,this.size-this.iWrite);return $.copy(this.buffer,this.iWrite,Y,Y+U),this.iWrite+=U,U}}var r30=function($){$=$||{},this.bufSize=$.bufSize||1048576,this.buffers=[],this.batch=$.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};p30.inherits(r30,ft0.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return Buffer.concat(this.buffers.map(($)=>$.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let Y=this.buffers[this.buffers.length-1];if(!Y.full)return Y}let $=new o30(this.bufSize);return this.buffers.push($),$},async _pipe($){let Y=function(z){return new Promise((U)=>{z.write($.toBuffer(),()=>{U()})})};await Promise.all(this.pipes.map(Y))},_writeToBuffers($){let Y=0,z=$.length;while(Y1)this._pipe(this.buffers.shift())}else if(!this.corked)await this._pipe(U),z();else this._writeToBuffers(U),process.nextTick(z);else{if(!this.paused)this.emit("data",U.toBuffer());this._writeToBuffers(U),this.emit("readable")}return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)while(this.buffers.length)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end($,Y,z){let U=(Q)=>{if(Q)z(Q);else this._flush(),this.pipes.forEach((J)=>{J.end()}),this.emit("finish")};if($)this.write($,Y,U);else U()},read($){let Y;if($){Y=[];while($&&this.buffers.length&&!this.buffers[0].eod){let z=this.buffers[0],U=z.read($);if($-=U.length,Y.push(U),z.eod&&z.full)this.buffers.shift()}return Buffer.concat(Y)}return Y=this.buffers.map((z)=>z.toBuffer()).filter(Boolean),this.buffers=[],Buffer.concat(Y)},setEncoding($){this.encoding=$},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe($){if(this.pipes.push($),!this.paused&&this.buffers.length)this.end()},unpipe($){this.pipes=this.pipes.filter((Y)=>Y!==$)},unshift(){throw Error("Not Implemented")},wrap(){throw Error("Not Implemented")}});s30.exports=r30});var e30=E((it0)=>{var a30=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:t30}=I0("buffer");function bt0($){if(typeof $!=="string")return $;if(a30)return t30.from(a30.encode($).buffer);return t30.from($)}it0.stringToBuffer=bt0});var z70=E((gm1,Y70)=>{var ct0=I0("events"),pt0=Gk(),dt0=vW(),{stringToBuffer:Sm1}=e30();class $70 extends ct0.EventEmitter{constructor($){super();this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},$),this.zip=new pt0,this.stream=new dt0}append($,Y){if(Y.hasOwnProperty("base64")&&Y.base64)this.zip.file(Y.name,$,{base64:!0});else this.zip.file(Y.name,$)}async finalize(){let $=await this.zip.generateAsync(this.options);this.stream.end($),this.emit("finish")}read($){return this.stream.read($)}setEncoding($){return this.stream.setEncoding($)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe($,Y){return this.stream.pipe($,Y)}unpipe($){return this.stream.unpipe($)}unshift($){return this.stream.unshift($)}wrap($){return this.stream.wrap($)}}Y70.exports={ZipWriter:$70}});var o6=E((ym1,J70)=>{var mt0=Y6(),U70=Z8();function Q70($,Y,z){$.push(` ${Y}="${U70.xmlEncode(z.toString())}"`)}function gk($,Y){if(Y){let z=[];mt0.each(Y,(U,Q)=>{if(U!==void 0)Q70(z,Q,U)}),$.push(z.join(""))}}class yk{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml($){let Y=this._xml;Y.push(" `)}openNode($,Y){let z=this.tos,U=this._xml;if(z&&this.open)U.push(">");this._stack.push($),U.push("<"),U.push($),gk(U,Y),this.leaf=!0,this.open=!0}addAttribute($,Y){if(!this.open)throw Error("Cannot write attributes to node if it is not open");if(Y!==void 0)Q70(this._xml,$,Y)}addAttributes($){if(!this.open)throw Error("Cannot write attributes to node if it is not open");gk(this._xml,$)}writeText($){let Y=this._xml;if(this.open)Y.push(">"),this.open=!1;this.leaf=!1,Y.push(U70.xmlEncode($.toString()))}writeXml($){if(this.open)this._xml.push(">"),this.open=!1;this.leaf=!1,this._xml.push($)}closeNode(){let $=this._stack.pop(),Y=this._xml;if(this.leaf)Y.push("/>");else Y.push("");this.open=!1,this.leaf=!1}leafNode($,Y,z){if(this.openNode($,Y),z!==void 0)this.writeText(z);this.closeNode()}closeAll(){while(this._stack.length)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let $=this._rollbacks.pop();if(this._xml.length>$.xml)this._xml.splice($.xml,this._xml.length-$.xml);if(this._stack.length>$.stack)this._stack.splice($.stack,this._stack.length-$.stack);this.leaf=$.leaf,this.open=$.open}get xml(){return this.closeAll(),this._xml.join("")}}yk.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};J70.exports=yk});var kk=E((ot0)=>{var I70=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function lt0($){if(typeof $==="string")return $;if(I70)return I70.decode($);return $.toString()}ot0.bufferToString=lt0});var X70=E((G70)=>{Object.defineProperty(G70,"__esModule",{value:!0});G70.CHAR=` \r -퟿-�\uD800\uDC00-\uDBFF\uDFFF`;G70.S=` \r @@ -90,18 +90,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs. `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,$||{}),typeof($===null||$===void 0?void 0:$.quoteHeaders)>"u")this.quoteHeaders=this.quoteColumns;if(($===null||$===void 0?void 0:$.quote)===!0)this.quote='"';else if(($===null||$===void 0?void 0:$.quote)===!1)this.quote="";if(typeof($===null||$===void 0?void 0:$.escape)!=="string")this.escape=this.quote;this.shouldWriteHeaders=!!this.headers&&((Y=$.writeHeaders)!==null&&Y!==void 0?Y:!0),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}PI0.FormatterOptions=BI0});var kN=E((qr1,RI0)=>{var f51="[object AsyncFunction]",u51="[object Function]",b51="[object GeneratorFunction]",i51="[object Null]",n51="[object Proxy]",c51="[object Undefined]",p51=typeof global=="object"&&global&&global.Object===Object&&global,d51=typeof self=="object"&&self&&self.Object===Object&&self,m51=p51||d51||Function("return this")(),EI0=Object.prototype,l51=EI0.hasOwnProperty,CI0=EI0.toString,TI0=m51.Symbol,Dz=TI0?TI0.toStringTag:void 0;function o51($){if($==null)return $===void 0?c51:i51;return Dz&&Dz in Object($)?r51($):s51($)}function r51($){var Y=l51.call($,Dz),z=$[Dz];try{$[Dz]=void 0;var U=!0}catch(J){}var Q=CI0.call($);if(U)if(Y)$[Dz]=z;else delete $[Dz];return Q}function s51($){return CI0.call($)}function a51($){if(!t51($))return!1;var Y=o51($);return Y==u51||Y==b51||Y==f51||Y==n51}function t51($){var Y=typeof $;return $!=null&&(Y=="object"||Y=="function")}RI0.exports=a51});var WK0=E((xN,pJ)=>{var e51=200,Bf="__lodash_hash_undefined__",dN=1,iI0=2,nI0=9007199254740991,fN="[object Arguments]",Ff="[object Array]",$91="[object AsyncFunction]",cI0="[object Boolean]",pI0="[object Date]",dI0="[object Error]",mI0="[object Function]",Y91="[object GeneratorFunction]",uN="[object Map]",lI0="[object Number]",z91="[object Null]",cJ="[object Object]",_I0="[object Promise]",U91="[object Proxy]",oI0="[object RegExp]",bN="[object Set]",rI0="[object String]",Q91="[object Symbol]",J91="[object Undefined]",Of="[object WeakMap]",sI0="[object ArrayBuffer]",iN="[object DataView]",I91="[object Float32Array]",K91="[object Float64Array]",G91="[object Int8Array]",H91="[object Int16Array]",W91="[object Int32Array]",X91="[object Uint8Array]",Z91="[object Uint8ClampedArray]",q91="[object Uint16Array]",V91="[object Uint32Array]",L91=/[\\^$.*+?()[\]{}|]/g,F91=/^\[object .+?Constructor\]$/,O91=/^(?:0|[1-9]\d*)$/,j4={};j4[I91]=j4[K91]=j4[G91]=j4[H91]=j4[W91]=j4[X91]=j4[Z91]=j4[q91]=j4[V91]=!0;j4[fN]=j4[Ff]=j4[sI0]=j4[cI0]=j4[iN]=j4[pI0]=j4[dI0]=j4[mI0]=j4[uN]=j4[lI0]=j4[cJ]=j4[oI0]=j4[bN]=j4[rI0]=j4[Of]=!1;var aI0=typeof global=="object"&&global&&global.Object===Object&&global,w91=typeof self=="object"&&self&&self.Object===Object&&self,V3=aI0||w91||Function("return this")(),tI0=typeof xN=="object"&&xN&&!xN.nodeType&&xN,vI0=tI0&&typeof pJ=="object"&&pJ&&!pJ.nodeType&&pJ,eI0=vI0&&vI0.exports===tI0,qf=eI0&&aI0.process,hI0=function(){try{return qf&&qf.binding&&qf.binding("util")}catch($){}}(),SI0=hI0&&hI0.isTypedArray;function M91($,Y){var z=-1,U=$==null?0:$.length,Q=0,J=[];while(++z-1}function r91($,Y){var z=this.__data__,U=lN(z,$);if(U<0)++this.size,z.push([$,Y]);else z[U][1]=Y;return this}L3.prototype.clear=d91;L3.prototype.delete=m91;L3.prototype.get=l91;L3.prototype.has=o91;L3.prototype.set=r91;function Pz($){var Y=-1,z=$==null?0:$.length;this.clear();while(++YK))return!1;var H=J.get($);if(H&&J.get(Y))return H==Y;var W=-1,X=!0,Z=z&iI0?new cN:void 0;J.set($,Y),J.set(Y,$);while(++W-1&&$%1==0&&$-1&&$%1==0&&$<=nI0}function GK0($){var Y=typeof $;return $!=null&&(Y=="object"||Y=="function")}function pW($){return $!=null&&typeof $=="object"}var HK0=SI0?B91(SI0):Z31;function T31($){return P31($)?G31($):q31($)}function E31(){return[]}function C31(){return!1}pJ.exports=j31});var ZK0=E((Lr1,XK0)=>{var R31="[object Boolean]",_31=Object.prototype,v31=_31.toString;function h31($){return $===!0||$===!1||S31($)&&v31.call($)==R31}function S31($){return!!$&&typeof $=="object"}XK0.exports=h31});var Pf=E((Fr1,qK0)=>{function g31($){return $==null}qK0.exports=g31});var jf=E((Or1,wK0)=>{var y31=1/0,k31="[object Symbol]",OK0=/[\\^$.*+?()[\]{}|]/g,x31=RegExp(OK0.source),f31=typeof global=="object"&&global&&global.Object===Object&&global,u31=typeof self=="object"&&self&&self.Object===Object&&self,b31=f31||u31||Function("return this")(),i31=Object.prototype,n31=i31.toString,VK0=b31.Symbol,LK0=VK0?VK0.prototype:void 0,FK0=LK0?LK0.toString:void 0;function c31($){if(typeof $=="string")return $;if(d31($))return FK0?FK0.call($):"";var Y=$+"";return Y=="0"&&1/$==-y31?"-0":Y}function p31($){return!!$&&typeof $=="object"}function d31($){return typeof $=="symbol"||p31($)&&n31.call($)==k31}function m31($){return $==null?"":c31($)}function l31($){return $=m31($),$&&x31.test($)?$.replace(OK0,"\\$&"):$}wK0.exports=l31});var Ef=E((mJ)=>{var Tf=mJ&&mJ.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(mJ,"__esModule",{value:!0});mJ.FieldFormatter=void 0;var o31=Tf(ZK0()),r31=Tf(Pf()),s31=Tf(jf());class MK0{constructor($){if(this._headers=null,this.formatterOptions=$,$.headers!==null)this.headers=$.headers;this.REPLACE_REGEXP=new RegExp($.quote,"g");let Y=`[${$.delimiter}${s31.default($.rowDelimiter)}|\r| ]`;this.ESCAPE_REGEXP=new RegExp(Y)}set headers($){this._headers=$}shouldQuote($,Y){let z=Y?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;if(o31.default(z))return z;if(Array.isArray(z))return z[$];if(this._headers!==null)return z[this._headers[$]];return!1}format($,Y,z){let U=`${r31.default($)?"":$}`.replace(/\0/g,""),{formatterOptions:Q}=this;if(Q.quote!==""){if(U.indexOf(Q.quote)!==-1)return this.quoteField(U.replace(this.REPLACE_REGEXP,Q.escapedQuote))}if(U.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(Y,z))return this.quoteField(U);return U}quoteField($){let{quote:Y}=this.formatterOptions;return`${Y}${$}${Y}`}}mJ.FieldFormatter=MK0});var Cf=E((NK0)=>{Object.defineProperty(NK0,"__esModule",{value:!0});NK0.isSyncTransform=void 0;NK0.isSyncTransform=($)=>$.length===1});var BK0=E((lJ)=>{var AK0=lJ&&lJ.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(lJ,"__esModule",{value:!0});lJ.RowFormatter=void 0;var a31=AK0(kN()),t31=AK0(WK0()),e31=Ef(),$71=Cf();class Tz{constructor($){if(this.rowCount=0,this.formatterOptions=$,this.fieldFormatter=new e31.FieldFormatter($),this.headers=$.headers,this.shouldWriteHeaders=$.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null)this.fieldFormatter.headers=this.headers;if($.transform)this.rowTransform=$.transform}static isRowHashArray($){if(Array.isArray($))return Array.isArray($[0])&&$[0].length===2;return!1}static isRowArray($){return Array.isArray($)&&!this.isRowHashArray($)}static gatherHeaders($){if(Tz.isRowHashArray($))return $.map((Y)=>Y[0]);if(Array.isArray($))return $;return Object.keys($)}static createTransform($){if($71.isSyncTransform($))return(Y,z)=>{let U=null;try{U=$(Y)}catch(Q){return z(Q)}return z(null,U)};return(Y,z)=>{$(Y,z)}}set rowTransform($){if(!a31.default($))throw TypeError("The transform should be a function");this._rowTransform=Tz.createTransform($)}format($,Y){this.callTransformer($,(z,U)=>{if(z)return Y(z);if(!$)return Y(null);let Q=[];if(U){let{shouldFormatColumns:J,headers:I}=this.checkHeaders(U);if(this.shouldWriteHeaders&&I&&!this.hasWrittenHeaders)Q.push(this.formatColumns(I,!0)),this.hasWrittenHeaders=!0;if(J){let K=this.gatherColumns(U);Q.push(this.formatColumns(K,!1))}}return Y(null,Q)})}finish($){let Y=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return $(Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));Y.push(this.formatColumns(this.headers,!0))}if(this.formatterOptions.includeEndRowDelimiter)Y.push(this.formatterOptions.rowDelimiter);return $(null,Y)}checkHeaders($){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let Y=Tz.gatherHeaders($);if(this.headers=Y,this.fieldFormatter.headers=Y,!this.shouldWriteHeaders)return{shouldFormatColumns:!0,headers:null};return{shouldFormatColumns:!t31.default(Y,$),headers:Y}}gatherColumns($){if(this.headers===null)throw Error("Headers is currently null");if(!Array.isArray($))return this.headers.map((Y)=>$[Y]);if(Tz.isRowHashArray($))return this.headers.map((Y,z)=>{let U=$[z];if(U)return U[1];return""});if(Tz.isRowArray($)&&!this.shouldWriteHeaders)return $;return this.headers.map((Y,z)=>$[z])}callTransformer($,Y){if(!this._rowTransform)return Y(null,$);return this._rowTransform($,Y)}formatColumns($,Y){let z=$.map((Q,J)=>this.fieldFormatter.format(Q,J,Y)).join(this.formatterOptions.delimiter),{rowCount:U}=this;if(this.rowCount+=1,U)return[this.formatterOptions.rowDelimiter,z].join("");return z}}lJ.RowFormatter=Tz});var PK0=E((rN)=>{Object.defineProperty(rN,"__esModule",{value:!0});rN.FieldFormatter=rN.RowFormatter=void 0;var Y71=BK0();Object.defineProperty(rN,"RowFormatter",{enumerable:!0,get:function(){return Y71.RowFormatter}});var z71=Ef();Object.defineProperty(rN,"FieldFormatter",{enumerable:!0,get:function(){return z71.FieldFormatter}})});var Rf=E((TK0)=>{Object.defineProperty(TK0,"__esModule",{value:!0});TK0.CsvFormatterStream=void 0;var Q71=I0("stream"),J71=PK0();class jK0 extends Q71.Transform{constructor($){super({writableObjectMode:$.objectMode});this.hasWrittenBOM=!1,this.formatterOptions=$,this.rowFormatter=new J71.RowFormatter($),this.hasWrittenBOM=!$.writeBOM}transform($){return this.rowFormatter.rowTransform=$,this}_transform($,Y,z){let U=!1;try{if(!this.hasWrittenBOM)this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0;this.rowFormatter.format($,(Q,J)=>{if(Q)return U=!0,z(Q);if(J)J.forEach((I)=>{this.push(Buffer.from(I,"utf8"))});return U=!0,z()})}catch(Q){if(U)throw Q;z(Q)}}_flush($){this.rowFormatter.finish((Y,z)=>{if(Y)return $(Y);if(z)z.forEach((U)=>{this.push(Buffer.from(U,"utf8"))});return $()})}}TK0.CsvFormatterStream=jK0});var RK0=E((s1)=>{var CK0=s1&&s1.__createBinding||(Object.create?function($,Y,z,U){if(U===void 0)U=z;Object.defineProperty($,U,{enumerable:!0,get:function(){return Y[z]}})}:function($,Y,z,U){if(U===void 0)U=z;$[U]=Y[z]}),I71=s1&&s1.__setModuleDefault||(Object.create?function($,Y){Object.defineProperty($,"default",{enumerable:!0,value:Y})}:function($,Y){$.default=Y}),K71=s1&&s1.__importStar||function($){if($&&$.__esModule)return $;var Y={};if($!=null){for(var z in $)if(z!=="default"&&Object.prototype.hasOwnProperty.call($,z))CK0(Y,$,z)}return I71(Y,$),Y},G71=s1&&s1.__exportStar||function($,Y){for(var z in $)if(z!=="default"&&!Object.prototype.hasOwnProperty.call(Y,z))CK0(Y,$,z)};Object.defineProperty(s1,"__esModule",{value:!0});s1.writeToPath=s1.writeToString=s1.writeToBuffer=s1.writeToStream=s1.write=s1.format=s1.FormatterOptions=s1.CsvFormatterStream=void 0;var H71=I0("util"),W71=I0("stream"),X71=K71(I0("fs")),Z71=Zf(),q71=Rf();G71(Cf(),s1);var V71=Rf();Object.defineProperty(s1,"CsvFormatterStream",{enumerable:!0,get:function(){return V71.CsvFormatterStream}});var L71=Zf();Object.defineProperty(s1,"FormatterOptions",{enumerable:!0,get:function(){return L71.FormatterOptions}});s1.format=($)=>new q71.CsvFormatterStream(new Z71.FormatterOptions($));s1.write=($,Y)=>{let z=s1.format(Y),U=H71.promisify((Q,J)=>{z.write(Q,void 0,J)});return $.reduce((Q,J)=>Q.then(()=>U(J)),Promise.resolve()).then(()=>z.end()).catch((Q)=>{z.emit("error",Q)}),z};s1.writeToStream=($,Y,z)=>s1.write(Y,z).pipe($);s1.writeToBuffer=($,Y={})=>{let z=[],U=new W71.Writable({write(Q,J,I){z.push(Q),I()}});return new Promise((Q,J)=>{U.on("error",J).on("finish",()=>Q(Buffer.concat(z))),s1.write($,Y).pipe(U)})};s1.writeToString=($,Y)=>s1.writeToBuffer($,Y).then((z)=>z.toString());s1.writeToPath=($,Y,z)=>{let U=X71.createWriteStream($,{encoding:"utf8"});return s1.write(Y,z).pipe(U)}});var _f=E((oJ)=>{var _K0=oJ&&oJ.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(oJ,"__esModule",{value:!0});oJ.ParserOptions=void 0;var F71=_K0(jf()),O71=_K0(Pf());class vK0{constructor($){var Y;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,$||{}),this.delimiter.length>1)throw Error("delimiter option must be one character long");if(this.escapedDelimiter=F71.default(this.delimiter),this.escapeChar=(Y=this.escape)!==null&&Y!==void 0?Y:this.quote,this.supportsComments=!O71.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0)this.limitRows=!0}}oJ.ParserOptions=vK0});var vf=E((hK0)=>{Object.defineProperty(hK0,"__esModule",{value:!0});hK0.isSyncValidate=hK0.isSyncTransform=void 0;hK0.isSyncTransform=($)=>$.length===1;hK0.isSyncValidate=($)=>$.length===1});var kK0=E((rJ)=>{var M71=rJ&&rJ.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(rJ,"__esModule",{value:!0});rJ.RowTransformerValidator=void 0;var gK0=M71(kN()),yK0=vf();class sN{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform($){if(yK0.isSyncTransform($))return(Y,z)=>{let U=null;try{U=$(Y)}catch(Q){return z(Q)}return z(null,U)};return $}static createValidator($){if(yK0.isSyncValidate($))return(Y,z)=>{z(null,{row:Y,isValid:$(Y)})};return(Y,z)=>{$(Y,(U,Q,J)=>{if(U)return z(U);if(Q)return z(null,{row:Y,isValid:Q,reason:J});return z(null,{row:Y,isValid:!1,reason:J})})}}set rowTransform($){if(!gK0.default($))throw TypeError("The transform should be a function");this._rowTransform=sN.createTransform($)}set rowValidator($){if(!gK0.default($))throw TypeError("The validate should be a function");this._rowValidator=sN.createValidator($)}transformAndValidate($,Y){return this.callTransformer($,(z,U)=>{if(z)return Y(z);if(!U)return Y(null,{row:null,isValid:!0});return this.callValidator(U,(Q,J)=>{if(Q)return Y(Q);if(J&&!J.isValid)return Y(null,{row:U,isValid:!1,reason:J.reason});return Y(null,{row:U,isValid:!0})})})}callTransformer($,Y){if(!this._rowTransform)return Y(null,$);return this._rowTransform($,Y)}callValidator($,Y){if(!this._rowValidator)return Y(null,{row:$,isValid:!0});return this._rowValidator($,Y)}}rJ.RowTransformerValidator=sN});var fK0=E((Cr1,xK0)=>{function N71($){return $===void 0}xK0.exports=N71});var dK0=E((Rr1,pK0)=>{var D71=200,gf="__lodash_hash_undefined__",A71=1/0,B71="[object Function]",P71="[object GeneratorFunction]",j71=/[\\^$.*+?()[\]{}|]/g,T71=/^\[object .+?Constructor\]$/,E71=typeof global=="object"&&global&&global.Object===Object&&global,C71=typeof self=="object"&&self&&self.Object===Object&&self,yf=E71||C71||Function("return this")();function R71($,Y){var z=$?$.length:0;return!!z&&h71($,Y,0)>-1}function _71($,Y,z){var U=-1,Q=$?$.length:0;while(++U-1}function t71($,Y){var z=this.__data__,U=tN(z,$);if(U<0)z.push([$,Y]);else z[U][1]=Y;return this}sJ.prototype.clear=o71;sJ.prototype.delete=r71;sJ.prototype.get=s71;sJ.prototype.has=a71;sJ.prototype.set=t71;function aJ($){var Y=-1,z=$?$.length:0;this.clear();while(++Y=D71){var H=Y?null:G21($);if(H)return bK0(H);I=!1,Q=g71,G=new aN}else G=Y?[]:K;$:while(++U{var F21=200,O21="Expected a function",of="__lodash_hash_undefined__",GD=1,$I=2,YG0=1/0,zG0=9007199254740991,YD="[object Arguments]",bf="[object Array]",UG0="[object Boolean]",QG0="[object Date]",JG0="[object Error]",IG0="[object Function]",w21="[object GeneratorFunction]",zD="[object Map]",KG0="[object Number]",tJ="[object Object]",mK0="[object Promise]",GG0="[object RegExp]",UD="[object Set]",HG0="[object String]",WG0="[object Symbol]",nf="[object WeakMap]",XG0="[object ArrayBuffer]",QD="[object DataView]",M21="[object Float32Array]",N21="[object Float64Array]",D21="[object Int8Array]",A21="[object Int16Array]",B21="[object Int32Array]",P21="[object Uint8Array]",j21="[object Uint8ClampedArray]",T21="[object Uint16Array]",E21="[object Uint32Array]",C21=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,R21=/^\w*$/,_21=/^\./,v21=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h21=/[\\^$.*+?()[\]{}|]/g,S21=/\\(\\)?/g,g21=/^\[object .+?Constructor\]$/,y21=/^(?:0|[1-9]\d*)$/,T4={};T4[M21]=T4[N21]=T4[D21]=T4[A21]=T4[B21]=T4[P21]=T4[j21]=T4[T21]=T4[E21]=!0;T4[YD]=T4[bf]=T4[XG0]=T4[UG0]=T4[QD]=T4[QG0]=T4[JG0]=T4[IG0]=T4[zD]=T4[KG0]=T4[tJ]=T4[GG0]=T4[UD]=T4[HG0]=T4[nf]=!1;var ZG0=typeof global=="object"&&global&&global.Object===Object&&global,k21=typeof self=="object"&&self&&self.Object===Object&&self,W2=ZG0||k21||Function("return this")(),qG0=typeof $D=="object"&&$D&&!$D.nodeType&&$D,lK0=qG0&&typeof eJ=="object"&&eJ&&!eJ.nodeType&&eJ,x21=lK0&&lK0.exports===qG0,oK0=x21&&ZG0.process,rK0=function(){try{return oK0&&oK0.binding("util")}catch($){}}(),sK0=rK0&&rK0.isTypedArray;function f21($,Y,z,U){var Q=-1,J=$?$.length:0;while(++Q-1}function qY1($,Y){var z=this.__data__,U=WD(z,$);if(U<0)z.push([$,Y]);else z[U][1]=Y;return this}O3.prototype.clear=HY1;O3.prototype.delete=WY1;O3.prototype.get=XY1;O3.prototype.has=ZY1;O3.prototype.set=qY1;function w3($){var Y=-1,z=$?$.length:0;this.clear();while(++YK))return!1;var H=J.get($);if(H&&J.get(Y))return H==Y;var W=-1,X=!0,Z=Q&GD?new ID:void 0;J.set($,Y),J.set(Y,$);while(++W-1&&$%1==0&&$-1&&$%1==0&&$<=zG0}function VD($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function LD($){return!!$&&typeof $=="object"}function ef($){return typeof $=="symbol"||LD($)&&YI.call($)==WG0}var zz1=sK0?n21(sK0):kY1;function Uz1($){return $==null?"":nY1($)}function Qz1($,Y,z){var U=$==null?void 0:LG0($,Y);return U===void 0?z:U}function Jz1($,Y){return $!=null&&rY1($,Y,hY1)}function KD($){return af($)?TY1($):fY1($)}function Iz1($){return $}function Kz1($){return ZD($)?b21(qD($)):iY1($)}eJ.exports=$z1});var EG0=E((UI)=>{var FD=UI&&UI.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(UI,"__esModule",{value:!0});UI.HeaderTransformer=void 0;var jG0=FD(fK0()),Gz1=FD(kN()),Hz1=FD(dK0()),Wz1=FD(PG0());class TG0{constructor($){if(this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=$,$.headers===!0)this.shouldUseFirstRow=!0;else if(Array.isArray($.headers))this.setHeaders($.headers);else if(Gz1.default($.headers))this.headersTransform=$.headers}transform($,Y){if(!this.shouldMapRow($))return Y(null,{row:null,isValid:!0});return Y(null,this.processRow($))}shouldMapRow($){let{parserOptions:Y}=this;if(!this.headersTransform&&Y.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray($)){if(this.headersTransform)this.setHeaders(this.headersTransform($));else if(this.shouldUseFirstRow)this.setHeaders($);else return!0;return!1}return!0}processRow($){if(!this.headers)return{row:$,isValid:!0};let{parserOptions:Y}=this;if(!Y.discardUnmappedColumns&&$.length>this.headersLength){if(!Y.strictColumnHandling)throw Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${$.length}`);return{row:$,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${$.length}`}}if(Y.strictColumnHandling&&$.length!!U);if(Hz1.default(z).length!==z.length){let U=Wz1.default(z),Q=Object.keys(U).filter((J)=>U[J].length>1);throw Error(`Duplicate headers found ${JSON.stringify(Q)}`)}this.headers=$,this.receivedHeaders=!0,this.headersLength=((Y=this.headers)===null||Y===void 0?void 0:Y.length)||0}}UI.HeaderTransformer=TG0});var CG0=E((OD)=>{Object.defineProperty(OD,"__esModule",{value:!0});OD.HeaderTransformer=OD.RowTransformerValidator=void 0;var Xz1=kK0();Object.defineProperty(OD,"RowTransformerValidator",{enumerable:!0,get:function(){return Xz1.RowTransformerValidator}});var Zz1=EG0();Object.defineProperty(OD,"HeaderTransformer",{enumerable:!0,get:function(){return Zz1.HeaderTransformer}})});var X2=E((_G0)=>{Object.defineProperty(_G0,"__esModule",{value:!0});_G0.Token=void 0;class RG0{constructor($){this.token=$.token,this.startCursor=$.startCursor,this.endCursor=$.endCursor}static isTokenRowDelimiter($){let Y=$.token;return Y==="\r"||Y===` `||Y===`\r -`}static isTokenCarriageReturn($,Y){return $.token===Y.carriageReturn}static isTokenComment($,Y){return Y.supportsComments&&!!$&&$.token===Y.comment}static isTokenEscapeCharacter($,Y){return $.token===Y.escapeChar}static isTokenQuote($,Y){return $.token===Y.quote}static isTokenDelimiter($,Y){return $.token===Y.delimiter}}_G0.Token=RG0});var $u=E((gG0)=>{Object.defineProperty(gG0,"__esModule",{value:!0});gG0.Scanner=void 0;var hG0=X2(),Vz1=/((?:\r\n)|\n|\r)/;class SG0{constructor($){this.cursor=0,this.line=$.line,this.lineLength=this.line.length,this.parserOptions=$.parserOptions,this.hasMoreData=$.hasMoreData,this.cursor=$.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:$}=this,Y=this.parserOptions.NEXT_TOKEN_REGEXP;if($.search(Y)===-1)return null;let z=Y.exec($);if(z==null)return null;let U=z[1],Q=this.cursor+(z.index||0);return new hG0.Token({token:U,startCursor:Q,endCursor:Q+U.length-1})}get nextCharacterToken(){let{cursor:$,lineLength:Y}=this;if(Y<=$)return null;return new hG0.Token({token:this.line[$],startCursor:$,endCursor:$})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $=Vz1.exec(this.lineFromCursor);if(!$){if(this.hasMoreData)return null;return this.cursor=this.lineLength,this}return this.cursor+=($.index||0)+$[0].length,this}advanceTo($){return this.cursor=$,this}advanceToToken($){return this.cursor=$.startCursor,this}advancePastToken($){return this.cursor=$.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}gG0.Scanner=SG0});var wD=E((xG0)=>{Object.defineProperty(xG0,"__esModule",{value:!0});xG0.ColumnFormatter=void 0;class kG0{constructor($){if($.trim)this.format=(Y)=>Y.trim();else if($.ltrim)this.format=(Y)=>Y.trimLeft();else if($.rtrim)this.format=(Y)=>Y.trimRight();else this.format=(Y)=>Y}}xG0.ColumnFormatter=kG0});var Yu=E((iG0)=>{Object.defineProperty(iG0,"__esModule",{value:!0});iG0.NonQuotedColumnParser=void 0;var Lz1=wD(),uG0=X2();class bG0{constructor($){this.parserOptions=$,this.columnFormatter=new Lz1.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let{parserOptions:Y}=this,z=[],U=$.nextCharacterToken;for(;U;U=$.nextCharacterToken){if(uG0.Token.isTokenDelimiter(U,Y)||uG0.Token.isTokenRowDelimiter(U))break;z.push(U.token),$.advancePastToken(U)}return this.columnFormatter.format(z.join(""))}}iG0.NonQuotedColumnParser=bG0});var zu=E((pG0)=>{Object.defineProperty(pG0,"__esModule",{value:!0});pG0.QuotedColumnParser=void 0;var Fz1=wD(),QI=X2();class cG0{constructor($){this.parserOptions=$,this.columnFormatter=new Fz1.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let Y=$.cursor,{foundClosingQuote:z,col:U}=this.gatherDataBetweenQuotes($);if(!z){if($.advanceTo(Y),!$.hasMoreData)throw Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${$.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn($),U}gatherDataBetweenQuotes($){let{parserOptions:Y}=this,z=!1,U=!1,Q=[],J=$.nextCharacterToken;for(;!U&&J!==null;J=$.nextCharacterToken){let I=QI.Token.isTokenQuote(J,Y);if(!z&&I)z=!0;else if(z)if(QI.Token.isTokenEscapeCharacter(J,Y)){$.advancePastToken(J);let K=$.nextCharacterToken;if(K!==null&&(QI.Token.isTokenQuote(K,Y)||QI.Token.isTokenEscapeCharacter(K,Y)))Q.push(K.token),J=K;else if(I)U=!0;else Q.push(J.token)}else if(I)U=!0;else Q.push(J.token);$.advancePastToken(J)}return{col:this.columnFormatter.format(Q.join("")),foundClosingQuote:U}}checkForMalformedColumn($){let{parserOptions:Y}=this,{nextNonSpaceToken:z}=$;if(z){let U=QI.Token.isTokenDelimiter(z,Y),Q=QI.Token.isTokenRowDelimiter(z);if(!(U||Q)){let J=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw Error(`Parse Error: expected: '${Y.escapedDelimiter}' OR new line got: '${z.token}'. at '${J}`)}$.advanceToToken(z)}else if(!$.hasMoreData)$.advancePastLine()}}pG0.QuotedColumnParser=cG0});var rG0=E((lG0)=>{Object.defineProperty(lG0,"__esModule",{value:!0});lG0.ColumnParser=void 0;var Oz1=Yu(),wz1=zu(),Mz1=X2();class mG0{constructor($){this.parserOptions=$,this.quotedColumnParser=new wz1.QuotedColumnParser($),this.nonQuotedColumnParser=new Oz1.NonQuotedColumnParser($)}parse($){let{nextNonSpaceToken:Y}=$;if(Y!==null&&Mz1.Token.isTokenQuote(Y,this.parserOptions))return $.advanceToToken(Y),this.quotedColumnParser.parse($);return this.nonQuotedColumnParser.parse($)}}lG0.ColumnParser=mG0});var Uu=E((JI)=>{Object.defineProperty(JI,"__esModule",{value:!0});JI.ColumnFormatter=JI.QuotedColumnParser=JI.NonQuotedColumnParser=JI.ColumnParser=void 0;var Nz1=rG0();Object.defineProperty(JI,"ColumnParser",{enumerable:!0,get:function(){return Nz1.ColumnParser}});var Dz1=Yu();Object.defineProperty(JI,"NonQuotedColumnParser",{enumerable:!0,get:function(){return Dz1.NonQuotedColumnParser}});var Az1=zu();Object.defineProperty(JI,"QuotedColumnParser",{enumerable:!0,get:function(){return Az1.QuotedColumnParser}});var Bz1=wD();Object.defineProperty(JI,"ColumnFormatter",{enumerable:!0,get:function(){return Bz1.ColumnFormatter}})});var Ju=E((aG0)=>{Object.defineProperty(aG0,"__esModule",{value:!0});aG0.RowParser=void 0;var jz1=Uu(),II=X2(),Qu="";class sG0{constructor($){this.parserOptions=$,this.columnParser=new jz1.ColumnParser($)}static isEmptyRow($){return $.join(Qu).replace(/\s+/g,Qu)===Qu}parse($){let{parserOptions:Y}=this,{hasMoreData:z}=$,U=$,Q=[],J=this.getStartToken(U,Q);while(J){if(II.Token.isTokenRowDelimiter(J)){if(U.advancePastToken(J),!U.hasMoreCharacters&&II.Token.isTokenCarriageReturn(J,Y)&&z)return null;return U.truncateToCursor(),Q}if(!this.shouldSkipColumnParse(U,J,Q)){let I=this.columnParser.parse(U);if(I===null)return null;Q.push(I)}J=U.nextNonSpaceToken}if(!z)return U.truncateToCursor(),Q;return null}getStartToken($,Y){let z=$.nextNonSpaceToken;if(z!==null&&II.Token.isTokenDelimiter(z,this.parserOptions))return Y.push(""),$.nextNonSpaceToken;return z}shouldSkipColumnParse($,Y,z){let{parserOptions:U}=this;if(II.Token.isTokenDelimiter(Y,U)){$.advancePastToken(Y);let Q=$.nextCharacterToken;if(!$.hasMoreCharacters||Q!==null&&II.Token.isTokenRowDelimiter(Q))return z.push(""),!0;if(Q!==null&&II.Token.isTokenDelimiter(Q,U))return z.push(""),!0}return!1}}aG0.RowParser=sG0});var zH0=E(($H0)=>{Object.defineProperty($H0,"__esModule",{value:!0});$H0.Parser=void 0;var Tz1=$u(),eG0=Ju(),Ez1=X2();class Iu{constructor($){this.parserOptions=$,this.rowParser=new eG0.RowParser(this.parserOptions)}static removeBOM($){if($&&$.charCodeAt(0)===65279)return $.slice(1);return $}parse($,Y){let z=new Tz1.Scanner({line:Iu.removeBOM($),parserOptions:this.parserOptions,hasMoreData:Y});if(this.parserOptions.supportsComments)return this.parseWithComments(z);return this.parseWithoutComments(z)}parseWithoutComments($){let Y=[],z=!0;while(z)z=this.parseRow($,Y);return{line:$.line,rows:Y}}parseWithComments($){let{parserOptions:Y}=this,z=[];for(let U=$.nextCharacterToken;U!==null;U=$.nextCharacterToken)if(Ez1.Token.isTokenComment(U,Y)){if($.advancePastLine()===null)return{line:$.lineFromCursor,rows:z};if(!$.hasMoreCharacters)return{line:$.lineFromCursor,rows:z};$.truncateToCursor()}else if(!this.parseRow($,z))break;return{line:$.line,rows:z}}parseRow($,Y){if(!$.nextNonSpaceToken)return!1;let U=this.rowParser.parse($);if(U===null)return!1;if(this.parserOptions.ignoreEmpty&&eG0.RowParser.isEmptyRow(U))return!0;return Y.push(U),!0}}$H0.Parser=Iu});var UH0=E((M3)=>{Object.defineProperty(M3,"__esModule",{value:!0});M3.QuotedColumnParser=M3.NonQuotedColumnParser=M3.ColumnParser=M3.Token=M3.Scanner=M3.RowParser=M3.Parser=void 0;var Cz1=zH0();Object.defineProperty(M3,"Parser",{enumerable:!0,get:function(){return Cz1.Parser}});var Rz1=Ju();Object.defineProperty(M3,"RowParser",{enumerable:!0,get:function(){return Rz1.RowParser}});var _z1=$u();Object.defineProperty(M3,"Scanner",{enumerable:!0,get:function(){return _z1.Scanner}});var vz1=X2();Object.defineProperty(M3,"Token",{enumerable:!0,get:function(){return vz1.Token}});var Ku=Uu();Object.defineProperty(M3,"ColumnParser",{enumerable:!0,get:function(){return Ku.ColumnParser}});Object.defineProperty(M3,"NonQuotedColumnParser",{enumerable:!0,get:function(){return Ku.NonQuotedColumnParser}});Object.defineProperty(M3,"QuotedColumnParser",{enumerable:!0,get:function(){return Ku.QuotedColumnParser}})});var Gu=E((JH0)=>{Object.defineProperty(JH0,"__esModule",{value:!0});JH0.CsvParserStream=void 0;var Sz1=I0("string_decoder"),gz1=I0("stream"),QH0=CG0(),yz1=UH0();class MD extends gz1.Transform{constructor($){super({objectMode:$.objectMode});this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=$,this.parser=new yz1.Parser($),this.headerTransformer=new QH0.HeaderTransformer($),this.decoder=new Sz1.StringDecoder($.encoding),this.rowTransformerValidator=new QH0.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform($){return this.rowTransformerValidator.rowTransform=$,this}validate($){return this.rowTransformerValidator.rowValidator=$,this}emit($,...Y){if($==="end"){if(!this.endEmitted)this.endEmitted=!0,super.emit("end",this.rowCount);return!1}return super.emit($,...Y)}_transform($,Y,z){if(this.hasHitRowLimit)return z();let U=MD.wrapDoneCallback(z);try{let{lines:Q}=this,J=Q+this.decoder.write($),I=this.parse(J,!0);return this.processRows(I,U)}catch(Q){return U(Q)}}_flush($){let Y=MD.wrapDoneCallback($);if(this.hasHitRowLimit)return Y();try{let z=this.lines+this.decoder.end(),U=this.parse(z,!1);return this.processRows(U,Y)}catch(z){return Y(z)}}parse($,Y){if(!$)return[];let{line:z,rows:U}=this.parser.parse($,Y);return this.lines=z,U}processRows($,Y){let z=$.length,U=(Q)=>{let J=(G)=>{if(G)return Y(G);if(Q%100===0){setImmediate(()=>U(Q+1));return}return U(Q+1)};if(this.checkAndEmitHeaders(),Q>=z||this.hasHitRowLimit)return Y();if(this.parsedLineCount+=1,this.shouldSkipLine)return J();let I=$[Q];this.rowCount+=1,this.parsedRowCount+=1;let K=this.rowCount;return this.transformRow(I,(G,H)=>{if(G)return this.rowCount-=1,J(G);if(!H)return J(Error("expected transform result"));if(!H.isValid)this.emit("data-invalid",H.row,K,H.reason);else if(H.row)return this.pushRow(H.row,J);return J()})};U(0)}transformRow($,Y){try{this.headerTransformer.transform($,(z,U)=>{if(z)return Y(z);if(!U)return Y(Error("Expected result from header transform"));if(!U.isValid){if(this.shouldEmitRows)return Y(null,{isValid:!1,row:$});return this.skipRow(Y)}if(U.row){if(this.shouldEmitRows)return this.rowTransformerValidator.transformAndValidate(U.row,Y);return this.skipRow(Y)}return this.rowCount-=1,this.parsedRowCount-=1,Y(null,{row:null,isValid:!0})})}catch(z){Y(z)}}checkAndEmitHeaders(){if(!this.headersEmitted&&this.headerTransformer.headers)this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers)}skipRow($){return this.rowCount-=1,$(null,{row:null,isValid:!0})}pushRow($,Y){try{if(!this.parserOptions.objectMode)this.push(JSON.stringify($));else this.push($);Y()}catch(z){Y(z)}}static wrapDoneCallback($){let Y=!1;return(z,...U)=>{if(z){if(Y)throw z;Y=!0,$(z);return}$(...U)}}}JH0.CsvParserStream=MD});var GH0=E((p4)=>{var KH0=p4&&p4.__createBinding||(Object.create?function($,Y,z,U){if(U===void 0)U=z;Object.defineProperty($,U,{enumerable:!0,get:function(){return Y[z]}})}:function($,Y,z,U){if(U===void 0)U=z;$[U]=Y[z]}),kz1=p4&&p4.__setModuleDefault||(Object.create?function($,Y){Object.defineProperty($,"default",{enumerable:!0,value:Y})}:function($,Y){$.default=Y}),xz1=p4&&p4.__importStar||function($){if($&&$.__esModule)return $;var Y={};if($!=null){for(var z in $)if(z!=="default"&&Object.prototype.hasOwnProperty.call($,z))KH0(Y,$,z)}return kz1(Y,$),Y},fz1=p4&&p4.__exportStar||function($,Y){for(var z in $)if(z!=="default"&&!Object.prototype.hasOwnProperty.call(Y,z))KH0(Y,$,z)};Object.defineProperty(p4,"__esModule",{value:!0});p4.parseString=p4.parseFile=p4.parseStream=p4.parse=p4.ParserOptions=p4.CsvParserStream=void 0;var uz1=xz1(I0("fs")),bz1=I0("stream"),ND=_f(),DD=Gu();fz1(vf(),p4);var iz1=Gu();Object.defineProperty(p4,"CsvParserStream",{enumerable:!0,get:function(){return iz1.CsvParserStream}});var nz1=_f();Object.defineProperty(p4,"ParserOptions",{enumerable:!0,get:function(){return nz1.ParserOptions}});p4.parse=($)=>new DD.CsvParserStream(new ND.ParserOptions($));p4.parseStream=($,Y)=>$.pipe(new DD.CsvParserStream(new ND.ParserOptions(Y)));p4.parseFile=($,Y={})=>uz1.createReadStream($).pipe(new DD.CsvParserStream(new ND.ParserOptions(Y)));p4.parseString=($,Y)=>{let z=new bz1.Readable;return z.push($),z.push(null),z.pipe(new DD.CsvParserStream(new ND.ParserOptions(Y)))}});var HH0=E((V8)=>{Object.defineProperty(V8,"__esModule",{value:!0});V8.CsvParserStream=V8.ParserOptions=V8.parseFile=V8.parseStream=V8.parseString=V8.parse=V8.FormatterOptions=V8.CsvFormatterStream=V8.writeToPath=V8.writeToString=V8.writeToBuffer=V8.writeToStream=V8.write=V8.format=void 0;var Z2=RK0();Object.defineProperty(V8,"format",{enumerable:!0,get:function(){return Z2.format}});Object.defineProperty(V8,"write",{enumerable:!0,get:function(){return Z2.write}});Object.defineProperty(V8,"writeToStream",{enumerable:!0,get:function(){return Z2.writeToStream}});Object.defineProperty(V8,"writeToBuffer",{enumerable:!0,get:function(){return Z2.writeToBuffer}});Object.defineProperty(V8,"writeToString",{enumerable:!0,get:function(){return Z2.writeToString}});Object.defineProperty(V8,"writeToPath",{enumerable:!0,get:function(){return Z2.writeToPath}});Object.defineProperty(V8,"CsvFormatterStream",{enumerable:!0,get:function(){return Z2.CsvFormatterStream}});Object.defineProperty(V8,"FormatterOptions",{enumerable:!0,get:function(){return Z2.FormatterOptions}});var KI=GH0();Object.defineProperty(V8,"parse",{enumerable:!0,get:function(){return KI.parse}});Object.defineProperty(V8,"parseString",{enumerable:!0,get:function(){return KI.parseString}});Object.defineProperty(V8,"parseStream",{enumerable:!0,get:function(){return KI.parseStream}});Object.defineProperty(V8,"parseFile",{enumerable:!0,get:function(){return KI.parseFile}});Object.defineProperty(V8,"ParserOptions",{enumerable:!0,get:function(){return KI.ParserOptions}});Object.defineProperty(V8,"CsvParserStream",{enumerable:!0,get:function(){return KI.CsvParserStream}})});var WH0=E((Hu,Wu)=>{(function($,Y){typeof Hu=="object"&&typeof Wu<"u"?Wu.exports=Y():typeof define=="function"&&define.amd?define(Y):($=typeof globalThis<"u"?globalThis:$||self).dayjs_plugin_customParseFormat=Y()})(Hu,function(){var $={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Y=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,z=/\d/,U=/\d\d/,Q=/\d\d?/,J=/\d*[^-_:/,()\s\d]+/,I={},K=function(V){return(V=+V)+(V>68?1900:2000)},G=function(V){return function(F){this[V]=+F}},H=[/[+-]\d\d:?(\d\d)?|Z/,function(V){(this.zone||(this.zone={})).offset=function(F){if(!F)return 0;if(F==="Z")return 0;var w=F.match(/([+-]|\d\d)/g),O=60*w[1]+(+w[2]||0);return O===0?0:w[0]==="+"?-O:O}(V)}],W=function(V){var F=I[V];return F&&(F.indexOf?F:F.s.concat(F.f))},X=function(V,F){var w,O=I.meridiem;if(O){for(var N=1;N<=24;N+=1)if(V.indexOf(O(N,0,F))>-1){w=N>12;break}}else w=V===(F?"pm":"PM");return w},Z={A:[J,function(V){this.afternoon=X(V,!1)}],a:[J,function(V){this.afternoon=X(V,!0)}],Q:[z,function(V){this.month=3*(V-1)+1}],S:[z,function(V){this.milliseconds=100*+V}],SS:[U,function(V){this.milliseconds=10*+V}],SSS:[/\d{3}/,function(V){this.milliseconds=+V}],s:[Q,G("seconds")],ss:[Q,G("seconds")],m:[Q,G("minutes")],mm:[Q,G("minutes")],H:[Q,G("hours")],h:[Q,G("hours")],HH:[Q,G("hours")],hh:[Q,G("hours")],D:[Q,G("day")],DD:[U,G("day")],Do:[J,function(V){var F=I.ordinal,w=V.match(/\d+/);if(this.day=w[0],F)for(var O=1;O<=31;O+=1)F(O).replace(/\[|\]/g,"")===V&&(this.day=O)}],w:[Q,G("week")],ww:[U,G("week")],M:[Q,G("month")],MM:[U,G("month")],MMM:[J,function(V){var F=W("months"),w=(W("monthsShort")||F.map(function(O){return O.slice(0,3)})).indexOf(V)+1;if(w<1)throw Error();this.month=w%12||w}],MMMM:[J,function(V){var F=W("months").indexOf(V)+1;if(F<1)throw Error();this.month=F%12||F}],Y:[/[+-]?\d+/,G("year")],YY:[U,function(V){this.year=K(V)}],YYYY:[/\d{4}/,G("year")],Z:H,ZZ:H};function q(V){var F,w;F=V,w=I&&I.formats;for(var O=(V=F.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,C,b){var k=b&&b.toUpperCase();return C||w[b]||$[b]||w[k].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(S,i,n){return i||n.slice(1)})})).match(Y),N=O.length,M=0;M-1)return new Date((x==="X"?1000:1)*U0);var e=q(x)(U0),y=e.year,p=e.month,Y0=e.day,g=e.hours,a=e.minutes,$0=e.seconds,N0=e.milliseconds,T0=e.zone,v0=e.week,G0=new Date,f0=Y0||(y||p?1:G0.getDate()),e0=y||G0.getFullYear(),r=0;y&&!p||(r=p>0?p-1:G0.getMonth());var H0,F0=g||0,b0=a||0,i0=$0||0,n0=N0||0;return T0?new Date(Date.UTC(e0,r,f0,F0,b0,i0,n0+60*T0.offset*1000)):d?new Date(Date.UTC(e0,r,f0,F0,b0,i0,n0)):(H0=new Date(e0,r,f0,F0,b0,i0,n0),v0&&(H0=t(H0).week(v0).toDate()),H0)}catch(w1){return new Date("")}}(D,A,P,w),this.init(),k&&k!==!0&&(this.$L=this.locale(k).$L),b&&D!=this.format(A)&&(this.$d=new Date("")),I={}}else if(A instanceof Array)for(var S=A.length,i=1;i<=S;i+=1){j[1]=A[i-1];var n=w.apply(this,j);if(n.isValid()){this.$d=n.$d,this.$L=n.$L,this.init();break}i===S&&(this.$d=new Date(""))}else N.call(this,M)}}})});var XH0=E((Xu,Zu)=>{(function($,Y){typeof Xu=="object"&&typeof Zu<"u"?Zu.exports=Y():typeof define=="function"&&define.amd?define(Y):($=typeof globalThis<"u"?globalThis:$||self).dayjs_plugin_utc=Y()})(Xu,function(){var $="minute",Y=/[+-]\d\d(?::?\d\d)?/g,z=/([+-]|\d\d)/g;return function(U,Q,J){var I=Q.prototype;J.utc=function(q){var V={date:q,utc:!0,args:arguments};return new Q(V)},I.utc=function(q){var V=J(this.toDate(),{locale:this.$L,utc:!0});return q?V.add(this.utcOffset(),$):V},I.local=function(){return J(this.toDate(),{locale:this.$L,utc:!1})};var K=I.parse;I.parse=function(q){q.utc&&(this.$u=!0),this.$utils().u(q.$offset)||(this.$offset=q.$offset),K.call(this,q)};var G=I.init;I.init=function(){if(this.$u){var q=this.$d;this.$y=q.getUTCFullYear(),this.$M=q.getUTCMonth(),this.$D=q.getUTCDate(),this.$W=q.getUTCDay(),this.$H=q.getUTCHours(),this.$m=q.getUTCMinutes(),this.$s=q.getUTCSeconds(),this.$ms=q.getUTCMilliseconds()}else G.call(this)};var H=I.utcOffset;I.utcOffset=function(q,V){var F=this.$utils().u;if(F(q))return this.$u?0:F(this.$offset)?H.call(this):this.$offset;if(typeof q=="string"&&(q=function(M){M===void 0&&(M="");var D=M.match(Y);if(!D)return null;var P=(""+D[0]).match(z)||["-",0,0],j=P[0],A=60*+P[1]+ +P[2];return A===0?0:j==="+"?A:-A}(q),q===null))return this;var w=Math.abs(q)<=16?60*q:q;if(w===0)return this.utc(V);var O=this.clone();if(V)return O.$offset=w,O.$u=!1,O;var N=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(O=this.local().add(w+N,$)).$offset=w,O.$x.$localOffset=N,O};var W=I.format;I.format=function(q){var V=q||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return W.call(this,V)},I.valueOf=function(){var q=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-60000*q},I.isUTC=function(){return!!this.$u},I.toISOString=function(){return this.toDate().toISOString()},I.toString=function(){return this.toDate().toUTCString()};var X=I.toDate;I.toDate=function(q){return q==="s"&&this.$offset?J(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():X.call(this)};var Z=I.diff;I.diff=function(q,V,F){if(q&&this.$u===q.$u)return Z.call(this,q,V,F);var w=this.local(),O=J(q).local();return Z.call(w,O,V,F)}}})});var ZH0=E((qu,Vu)=>{(function($,Y){typeof qu=="object"&&typeof Vu<"u"?Vu.exports=Y():typeof define=="function"&&define.amd?define(Y):($=typeof globalThis<"u"?globalThis:$||self).dayjs=Y()})(qu,function(){var $=1000,Y=60000,z=3600000,U="millisecond",Q="second",J="minute",I="hour",K="day",G="week",H="month",W="quarter",X="year",Z="date",q="Invalid Date",V=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var i=["th","st","nd","rd"],n=S%100;return"["+S+(i[(n-20)%10]||i[n]||i[0])+"]"}},O=function(S,i,n){var U0=String(S);return!U0||U0.length>=i?S:""+Array(i+1-U0.length).join(n)+S},N={s:O,z:function(S){var i=-S.utcOffset(),n=Math.abs(i),U0=Math.floor(n/60),x=n%60;return(i<=0?"+":"-")+O(U0,2,"0")+":"+O(x,2,"0")},m:function S(i,n){if(i.date()1)return S(t[0])}else{var e=i.name;D[e]=i,x=e}return!U0&&x&&(M=x),x||!U0&&M},T=function(S,i){if(j(S))return S.clone();var n=typeof i=="object"?i:{};return n.date=S,n.args=arguments,new b(n)},C=N;C.l=A,C.i=j,C.w=function(S,i){return T(S,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var b=function(){function S(n){this.$L=A(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[P]=!0}var i=S.prototype;return i.parse=function(n){this.$d=function(U0){var{date:x,utc:d}=U0;if(x===null)return new Date(NaN);if(C.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var t=x.match(V);if(t){var e=t[2]-1||0,y=(t[7]||"0").substring(0,3);return d?new Date(Date.UTC(t[1],e,t[3]||1,t[4]||0,t[5]||0,t[6]||0,y)):new Date(t[1],e,t[3]||1,t[4]||0,t[5]||0,t[6]||0,y)}}return new Date(x)}(n),this.init()},i.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},i.$utils=function(){return C},i.isValid=function(){return this.$d.toString()!==q},i.isSame=function(n,U0){var x=T(n);return this.startOf(U0)<=x&&x<=this.endOf(U0)},i.isAfter=function(n,U0){return T(n){var qH0=I0("fs"),VH0=HH0(),pz1=WH0(),dz1=XH0(),rW=ZH0().extend(pz1).extend(dz1),mz1=vW(),{fs:{exists:lz1}}=Z8(),oz1={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};class LH0{constructor($){this.workbook=$,this.worksheet=null}async readFile($,Y){if(Y=Y||{},!await lz1($))throw Error(`File not found: ${$}`);let z=qH0.createReadStream($),U=await this.read(z,Y);return z.close(),U}read($,Y){return Y=Y||{},new Promise((z,U)=>{let Q=this.workbook.addWorksheet(Y.sheetName),J=Y.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],I=Y.map||function(G){if(G==="")return null;let H=Number(G);if(!Number.isNaN(H)&&H!==1/0)return H;let W=J.reduce((Z,q)=>{if(Z)return Z;let V=rW(G,q,!0);if(V.isValid())return V;return null},null);if(W)return new Date(W.valueOf());let X=oz1[G];if(X!==void 0)return X;return G},K=VH0.parse(Y.parserOptions).on("data",(G)=>{Q.addRow(G.map(I))}).on("end",()=>{K.emit("worksheet",Q)});K.on("worksheet",z).on("error",U),$.pipe(K)})}createInputStream(){throw Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write($,Y){return new Promise((z,U)=>{Y=Y||{};let Q=this.workbook.getWorksheet(Y.sheetName||Y.sheetId),J=VH0.format(Y.formatterOptions);$.on("finish",()=>{z()}),J.on("error",U),J.pipe($);let{dateFormat:I,dateUTC:K}=Y,G=Y.map||((X)=>{if(X){if(X.text||X.hyperlink)return X.hyperlink||X.text||"";if(X.formula||X.result)return X.result||"";if(X instanceof Date){if(I)return K?rW.utc(X).format(I):rW(X).format(I);return K?rW.utc(X).format():rW(X).format()}if(X.error)return X.error;if(typeof X==="object")return JSON.stringify(X)}return X}),H=Y.includeEmptyRows===void 0||Y.includeEmptyRows,W=1;if(Q)Q.eachRow((X,Z)=>{if(H)while(W++{var wH0=j60(),rz1=Dg(),sz1=Xf(),az1=OH0();class MH0{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new rz1}get xlsx(){if(!this._xlsx)this._xlsx=new sz1(this);return this._xlsx}get csv(){if(!this._csv)this._csv=new az1(this);return this._csv}get nextId(){for(let $=1;$(K&&K.orderNo)>I?K.orderNo:I,0),Q=Object.assign({},Y,{id:z,name:$,orderNo:U+1,workbook:this}),J=new wH0(Q);return this._worksheets[z]=J,J}removeWorksheetEx($){delete this._worksheets[$.id]}removeWorksheet($){let Y=this.getWorksheet($);if(Y)Y.destroy()}getWorksheet($){if($===void 0)return this._worksheets.find(Boolean);if(typeof $==="number")return this._worksheets[$];if(typeof $==="string")return this._worksheets.find((Y)=>Y&&Y.name===$);return}get worksheets(){return this._worksheets.slice(1).sort(($,Y)=>$.orderNo-Y.orderNo).filter(Boolean)}eachSheet($){this.worksheets.forEach((Y)=>{$(Y,Y.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage($){let Y=this.media.length;return this.media.push(Object.assign({},$,{type:"image"})),Y}getImage($){return this.media[$]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(($)=>$.model),sheets:this.worksheets.map(($)=>$.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model($){this.creator=$.creator,this.lastModifiedBy=$.lastModifiedBy,this.lastPrinted=$.lastPrinted,this.created=$.created,this.modified=$.modified,this.company=$.company,this.manager=$.manager,this.title=$.title,this.subject=$.subject,this.keywords=$.keywords,this.category=$.category,this.description=$.description,this.language=$.language,this.revision=$.revision,this.contentStatus=$.contentStatus,this.properties=$.properties,this.calcProperties=$.calcProperties,this._worksheets=[],$.worksheets.forEach((Y)=>{let{id:z,name:U,state:Q}=Y,J=$.sheets&&$.sheets.findIndex((K)=>K.id===z),I=this._worksheets[z]=new wH0({id:z,name:U,orderNo:J,state:Q,workbook:this});I.model=Y}),this._definedNames.model=$.definedNames,this.views=$.views,this._themes=$.themes,this.media=$.media||[]}}NH0.exports=MH0});var PH0=E((Os1,BH0)=>{var tz1=Xf();class AH0{constructor($){this.model=$}get xlsx(){if(!this._xlsx)this._xlsx=new tz1(this);return this._xlsx}}BH0.exports=AH0});var TH0=E((ws1,jH0)=>{var ez1=typeof process==="object"&&process&&process.platform==="win32";jH0.exports=ez1?{sep:"\\"}:{sep:"/"}});var vH0=E((Ms1,_H0)=>{_H0.exports=CH0;function CH0($,Y,z){if($ instanceof RegExp)$=EH0($,z);if(Y instanceof RegExp)Y=EH0(Y,z);var U=RH0($,Y,z);return U&&{start:U[0],end:U[1],pre:z.slice(0,U[0]),body:z.slice(U[0]+$.length,U[1]),post:z.slice(U[1]+Y.length)}}function EH0($,Y){var z=Y.match($);return z?z[0]:null}CH0.range=RH0;function RH0($,Y,z){var U,Q,J,I,K,G=z.indexOf($),H=z.indexOf(Y,G+1),W=G;if(G>=0&&H>0){if($===Y)return[G,H];U=[],J=z.length;while(W>=0&&!K){if(W==G)U.push(W),G=z.indexOf($,W+1);else if(U.length==1)K=[U.pop(),H];else{if(Q=U.pop(),Q=0?G:H}if(U.length)K=[J,I]}return K}});var uH0=E((Ns1,fH0)=>{var hH0=vH0();fH0.exports=QU1;var SH0="\x00SLASH"+Math.random()+"\x00",gH0="\x00OPEN"+Math.random()+"\x00",Ou="\x00CLOSE"+Math.random()+"\x00",yH0="\x00COMMA"+Math.random()+"\x00",kH0="\x00PERIOD"+Math.random()+"\x00",$U1=1e5,YU1=4000000;function Lu($){return parseInt($,10)==$?parseInt($,10):$.charCodeAt(0)}function zU1($){return $.split("\\\\").join(SH0).split("\\{").join(gH0).split("\\}").join(Ou).split("\\,").join(yH0).split("\\.").join(kH0)}function UU1($){return $.split(SH0).join("\\").split(gH0).join("{").split(Ou).join("}").split(yH0).join(",").split(kH0).join(".")}function xH0($){if(!$)return[""];var Y=[],z=hH0("{","}",$);if(!z)return $.split(",");var{pre:U,body:Q,post:J}=z,I=U.split(",");I[I.length-1]+="{"+Q+"}";var K=xH0(J);if(J.length)I[I.length-1]+=K.shift(),I.push.apply(I,K);return Y.push.apply(Y,I),Y}function QU1($,Y){if(!$)return[];Y=Y||{};var z=Y.max==null?$U1:Y.max,U=Y.maxLength==null?YU1:Y.maxLength;if($.substr(0,2)==="{}")$="\\{\\}"+$.substr(2);return Fu(zU1($),z,U,!0).map(UU1)}function JU1($){return"{"+$+"}"}function IU1($){return/^-?0\d/.test($)}function KU1($,Y){return $<=Y}function GU1($,Y){return $>=Y}function sW($,Y,z,U,Q,J){var I=[],K=0;for(var G=0;G<$.length;G++)for(var H=0;H=U)return I;var W=$[G]+Y+z[H];if(J&&!W)continue;if(K+W.length>Q)return I;I.push(W),K+=W.length}return I}function HU1($,Y,z,U){var Q=$.split(/\.\./),J=[];if(Q[0]===void 0||Q[1]===void 0)return J;var I=Lu(Q[0]),K=Lu(Q[1]),G=Math.max(Q[0].length,Q[1].length),H=Q.length===3&&Q[2]!==void 0?Math.max(Math.abs(Lu(Q[2])),1):1,W=KU1,X=K0){var O=Array(w+1).join("0");if(V<0)F="-"+O+F.slice(1);else F=O+F}}if(q+F.length>U)break;J.push(F),q+=F.length}return J}function Fu($,Y,z,U){var Q=[""],J=!1,I=!0;for(;;){let D=hH0("{","}",$);if(!D)return sW(Q,$,[""],Y,z,J);let P=D.pre;if(/\$$/.test(P)){if(Q=sW(Q,P+"{"+D.body+"}",[""],Y,z,J&&!D.post.length),I=!1,!D.post.length)break;$=D.post;continue}var K=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(D.body),G=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(D.body),H=K||G,W=D.body.indexOf(",")>=0;if(!H&&!W){if(D.post.match(/,(?!,).*\}/)){$=D.pre+"{"+D.body+Ou+D.post,U=!0;continue}return sW(Q,P+"{"+D.body+"}"+D.post,[""],Y,z,J)}if(I)J=U&&!H,I=!1;var X;if(H)X=HU1(D.body,G,Y,z);else{var Z=xH0(D.body);if(Z.length===1&&Z[0]!==void 0){if(Z=Fu(Z[0],Y,z,!1).map(JU1),Z.length===1){if(Q=sW(Q,P+Z[0],[""],Y,z,J&&!D.post.length),!D.post.length)break;$=D.post;continue}}var q=J&&!D.post.length&&!P;for(var V=0;q&&V=Y||F+M.length>z)break $;X.push(M),F+=M.length}}}if(Q=sW(Q,P,X,Y,z,J&&!D.post.length),!D.post.length)break;$=D.post}return Q}});var dH0=E((Ds1,Au)=>{var W$=Au.exports=($,Y,z={})=>{if(AD(Y),!z.nocomment&&Y.charAt(0)==="#")return!1;return new aW(Y,z).match($)};Au.exports=W$;var Nu=TH0();W$.sep=Nu.sep;var _8=Symbol("globstar **");W$.GLOBSTAR=_8;var WU1=uH0(),bH0={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Du="[^/]",wu=Du+"*?",XU1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ZU1="(?:(?!(?:\\/|^)\\.).)*?",cH0=($)=>$.split("").reduce((Y,z)=>{return Y[z]=!0,Y},{}),iH0=cH0("().*{}+?[]^$\\!"),qU1=cH0("[.("),nH0=/\/+/;W$.filter=($,Y={})=>(z,U,Q)=>W$(z,$,Y);var q2=($,Y={})=>{let z={};return Object.keys($).forEach((U)=>z[U]=$[U]),Object.keys(Y).forEach((U)=>z[U]=Y[U]),z};W$.defaults=($)=>{if(!$||typeof $!=="object"||!Object.keys($).length)return W$;let Y=W$,z=(U,Q,J)=>Y(U,Q,q2($,J));return z.Minimatch=class extends Y.Minimatch{constructor(Q,J){super(Q,q2($,J))}},z.Minimatch.defaults=(U)=>Y.defaults(q2($,U)).Minimatch,z.filter=(U,Q)=>Y.filter(U,q2($,Q)),z.defaults=(U)=>Y.defaults(q2($,U)),z.makeRe=(U,Q)=>Y.makeRe(U,q2($,Q)),z.braceExpand=(U,Q)=>Y.braceExpand(U,q2($,Q)),z.match=(U,Q,J)=>Y.match(U,Q,q2($,J)),z};W$.braceExpand=($,Y)=>pH0($,Y);var pH0=($,Y={})=>{if(AD($),Y.nobrace||!/\{(?:(?!\{).)*\}/.test($))return[$];return WU1($)},VU1=65536,AD=($)=>{if(typeof $!=="string")throw TypeError("invalid pattern");if($.length>VU1)throw TypeError("pattern is too long")},Mu=Symbol("subparse");W$.makeRe=($,Y)=>new aW($,Y||{}).makeRe();W$.match=($,Y,z={})=>{let U=new aW(Y,z);if($=$.filter((Q)=>U.match(Q)),U.options.nonull&&!$.length)$.push(Y);return $};var LU1=($)=>$.replace(/\\(.)/g,"$1"),FU1=($)=>$.replace(/\\([^-\]])/g,"$1"),OU1=($)=>$.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),wU1=($)=>$.replace(/[[\]\\]/g,"\\$&");class aW{constructor($,Y){if(AD($),!Y)Y={};if(this.options=Y,this.maxGlobstarRecursion=Y.maxGlobstarRecursion!==void 0?Y.maxGlobstarRecursion:200,this.set=[],this.pattern=$,this.windowsPathsNoEscape=!!Y.windowsPathsNoEscape||Y.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!Y.partial,this.make()}debug(){}make(){let $=this.pattern,Y=this.options;if(!Y.nocomment&&$.charAt(0)==="#"){this.comment=!0;return}if(!$){this.empty=!0;return}this.parseNegate();let z=this.globSet=this.braceExpand();if(Y.debug)this.debug=(...U)=>console.error(...U);this.debug(this.pattern,z),z=this.globParts=z.map((U)=>U.split(nH0)),this.debug(this.pattern,z),z=z.map((U,Q,J)=>U.map(this.parse,this)),this.debug(this.pattern,z),z=z.filter((U)=>U.indexOf(!1)===-1),this.debug(this.pattern,z),this.set=z}parseNegate(){if(this.options.nonegate)return;let $=this.pattern,Y=!1,z=0;for(let U=0;U<$.length&&$.charAt(U)==="!";U++)Y=!Y,z++;if(z)this.pattern=$.slice(z);this.negate=Y}matchOne($,Y,z){if(Y.indexOf(_8)!==-1)return this._matchGlobstar($,Y,z,0,0);return this._matchOne($,Y,z,0,0)}_matchGlobstar($,Y,z,U,Q){let J=-1;for(let O=Q;O=0;O--)if(Y[O]===_8){I=O;break}let K=Y.slice(Q,J),G=z?Y.slice(J+1):Y.slice(J+1,I),H=z?[]:Y.slice(I+1);if(K.length){let O=$.slice(U,U+K.length);if(!this._matchOne(O,K,z,0,0))return!1;U+=K.length}let W=0;if(H.length){if(H.length+U>$.length)return!1;let O=$.length-H.length;if(this._matchOne($,H,z,O,0))W=H.length;else{if($[$.length-1]!==""||U+H.length===$.length)return!1;if(!this._matchOne($,H,z,O-1,0))return!1;W=H.length+1}}if(!G.length){let O=!!W;for(let N=U;N<$.length-W;N++){let M=String($[N]);if(O=!0,M==="."||M===".."||!this.options.dot&&M.charAt(0)===".")return!1}return z||O}let X=[[[],0]],Z=X[0],q=0,V=[0];for(let O of G)if(O===_8)V.push(q),Z=[[],0],X.push(Z);else Z[0].push(O),q++;let F=X.length-1,w=$.length-W;for(let O of X)O[1]=w-(V[F--]+O[0].length);return!!this._matchGlobStarBodySections($,X,U,0,z,0,!!W)}_matchGlobStarBodySections($,Y,z,U,Q,J,I){let K=Y[U];if(!K){for(let W=z;W<$.length;W++){I=!0;let X=$[W];if(X==="."||X===".."||!this.options.dot&&X.charAt(0)===".")return!1}return I}let[G,H]=K;while(z<=H){if(this._matchOne($.slice(0,z+G.length),G,Q,z,0)&&JF?"":w?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",N=(j)=>j.charAt(0)==="."?"":z.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",M=()=>{if(G){switch(G){case"*":U+=wu,Q=!0;break;case"?":U+=Du,Q=!0;break;default:U+="\\"+G;break}this.debug("clearStateChar %j %j",G,U),G=!1}};for(let j=0,A;j<$.length&&(A=$.charAt(j));j++){if(this.debug("%s\t%s %s %j",$,j,U,A),J){if(A==="/")return!1;if(iH0[A])U+="\\";U+=A,J=!1;continue}switch(A){case"/":return!1;case"\\":if(H&&$.charAt(j+1)==="-"){U+=A;continue}M(),J=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",$,j,U,A),H){if(this.debug(" in class"),A==="!"&&j===X+1)A="^";U+=A;continue}if(A==="*"&&G==="*")continue;if(this.debug("call clearStateChar %j",G),M(),G=A,z.noext)M();continue;case"(":{if(H){U+="(";continue}if(!G){U+="\\(";continue}let T={type:G,start:j-1,reStart:U.length,open:bH0[G].open,close:bH0[G].close};if(this.debug(this.pattern,"\t",T),I.push(T),U+=T.open,T.start===0&&T.type!=="!")F=!0,U+=N($.slice(j+1));this.debug("plType %j %j",G,U),G=!1;continue}case")":{let T=I[I.length-1];if(H||!T){U+="\\)";continue}if(I.pop(),M(),Q=!0,q=T,U+=q.close,q.type==="!")K.push(Object.assign(q,{reEnd:U.length}));continue}case"|":{let T=I[I.length-1];if(H||!T){U+="\\|";continue}if(M(),U+="|",T.start===0&&T.type!=="!")F=!0,U+=N($.slice(j+1));continue}case"[":if(M(),H){U+="\\"+A;continue}H=!0,X=j,W=U.length,U+=A;continue;case"]":if(j===X+1||!H){U+="\\"+A;continue}Z=$.substring(X+1,j);try{RegExp("["+wU1(FU1(Z))+"]"),U+=A}catch(T){U=U.substring(0,W)+"(?:$.)"}Q=!0,H=!1;continue;default:if(M(),iH0[A]&&!(A==="^"&&H))U+="\\";U+=A;break}}if(H)Z=$.slice(X+1),V=this.parse(Z,Mu),U=U.substring(0,W)+"\\["+V[0],Q=Q||V[1];for(q=I.pop();q;q=I.pop()){let j;j=U.slice(q.reStart+q.open.length),this.debug("setting tail",U,q),j=j.replace(/((?:\\{2}){0,64})(\\?)\|/g,(T,C,b)=>{if(!b)b="\\";return C+C+b+"|"}),this.debug(`tail=%j - %s`,j,j,q,U);let A=q.type==="*"?wu:q.type==="?"?Du:"\\"+q.type;Q=!0,U=U.slice(0,q.reStart)+A+"\\("+j}if(M(),J)U+="\\\\";let D=qU1[U.charAt(0)];for(let j=K.length-1;j>-1;j--){let A=K[j],T=U.slice(0,A.reStart),C=U.slice(A.reStart,A.reEnd-8),b=U.slice(A.reEnd),k=U.slice(A.reEnd-8,A.reEnd)+b,S=T.split(")").length,i=T.split("(").length-S,n=b;for(let x=0;x{return J=J.map((I)=>typeof I==="string"?OU1(I):I===_8?_8:I._src).reduce((I,K)=>{if(!(I[I.length-1]===_8&&K===_8))I.push(K);return I},[]),J.forEach((I,K)=>{if(I!==_8||J[K-1]===_8)return;if(K===0)if(J.length>1)J[K+1]="(?:\\/|"+z+"\\/)?"+J[K+1];else J[K]=z;else if(K===J.length-1)J[K-1]+="(?:\\/|"+z+")?";else J[K-1]+="(?:\\/|\\/"+z+"\\/)"+J[K+1],J[K+1]=_8}),J.filter((I)=>I!==_8).join("/")}).join("|");if(Q="^(?:"+Q+")$",this.negate)Q="^(?!"+Q+").*$";try{this.regexp=new RegExp(Q,U)}catch(J){this.regexp=!1}return this.regexp}match($,Y=this.partial){if(this.debug("match",$,this.pattern),this.comment)return!1;if(this.empty)return $==="";if($==="/"&&Y)return!0;let z=this.options;if(Nu.sep!=="/")$=$.split(Nu.sep).join("/");$=$.split(nH0),this.debug(this.pattern,"split",$);let U=this.set;this.debug(this.pattern,"set",U);let Q;for(let J=$.length-1;J>=0;J--)if(Q=$[J],Q)break;for(let J=0;J{rH0.exports=oH0;var Pu=I0("fs"),{EventEmitter:MU1}=I0("events"),{Minimatch:Bu}=dH0(),{resolve:NU1}=I0("path");function DU1($,Y){return new Promise((z,U)=>{Pu.readdir($,{withFileTypes:!0},(Q,J)=>{if(Q)switch(Q.code){case"ENOTDIR":if(Y)U(Q);else z([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":z([]);break;case"ELOOP":default:U(Q);break}else z(J)})})}function mH0($,Y){return new Promise((z,U)=>{(Y?Pu.stat:Pu.lstat)($,(J,I)=>{if(J)switch(J.code){case"ENOENT":if(Y)z(mH0($,!1));else z(null);break;default:z(null);break}else z(I)})})}async function*lH0($,Y,z,U,Q,J){let I=await DU1(Y+$,J);for(let K of I){let G=K.name;if(G===void 0)G=K,U=!0;let H=$+"/"+G,W=H.slice(1),X=Y+"/"+W,Z=null;if(U||z)Z=await mH0(X,z);if(!Z&&K.name!==void 0)Z=K;if(Z===null)Z={isDirectory:()=>!1};if(Z.isDirectory()){if(!Q(W))yield{relative:W,absolute:X,stats:Z},yield*lH0(H,Y,z,U,Q,!1)}else yield{relative:W,absolute:X,stats:Z}}}async function*AU1($,Y,z,U){yield*lH0("",$,Y,z,U,!0)}function BU1($){return{pattern:$.pattern,dot:!!$.dot,noglobstar:!!$.noglobstar,matchBase:!!$.matchBase,nocase:!!$.nocase,ignore:$.ignore,skip:$.skip,follow:!!$.follow,stat:!!$.stat,nodir:!!$.nodir,mark:!!$.mark,silent:!!$.silent,absolute:!!$.absolute}}class ju extends MU1{constructor($,Y,z){super();if(typeof Y==="function")z=Y,Y=null;if(this.options=BU1(Y||{}),this.matchers=[],this.options.pattern){let U=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=U.map((Q)=>new Bu(Q,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let U=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=U.map((Q)=>new Bu(Q,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let U=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=U.map((Q)=>new Bu(Q,{dot:!0}))}if(this.iterator=AU1(NU1($||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,z)this._matches=[],this.on("match",(U)=>this._matches.push(this.options.absolute?U.absolute:U.relative)),this.on("error",(U)=>z(U)),this.on("end",()=>z(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory($){return this.skipMatchers.some((Y)=>Y.match($))}_fileMatches($,Y){let z=$+(Y?"/":"");return(this.matchers.length===0||this.matchers.some((U)=>U.match(z)))&&!this.ignoreMatchers.some((U)=>U.match(z))&&(!this.options.nodir||!Y)}_next(){if(!this.paused&&!this.aborted)this.iterator.next().then(($)=>{if(!$.done){let Y=$.value.stats.isDirectory();if(this._fileMatches($.value.relative,Y)){let z=$.value.relative,U=$.value.absolute;if(this.options.mark&&Y)z+="/",U+="/";if(this.options.stat)this.emit("match",{relative:z,absolute:U,stat:$.value.stats});else this.emit("match",{relative:z,absolute:U})}this._next(this.iterator)}else this.emit("end")}).catch(($)=>{if(this.abort(),this.emit("error",$),!$.code&&!this.options.silent)console.error($)});else this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){if(this.paused=!1,this.inactive)this.inactive=!1,this._next()}}function oH0($,Y,z){return new ju($,Y,z)}oH0.ReaddirGlob=ju});var Tu=E((BD,aH0)=>{(function($,Y){typeof BD==="object"&&typeof aH0<"u"?Y(BD):typeof define==="function"&&define.amd?define(["exports"],Y):($=typeof globalThis<"u"?globalThis:$||self,Y($.async={}))})(BD,function($){function Y(f,...c){return(...o)=>f(...c,...o)}function z(f){return function(...c){var o=c.pop();return f.call(this,c,o)}}var U=typeof queueMicrotask==="function"&&queueMicrotask,Q=typeof setImmediate==="function"&&setImmediate,J=typeof process==="object"&&typeof process.nextTick==="function";function I(f){setTimeout(f,0)}function K(f){return(c,...o)=>f(()=>c(...o))}var G;if(U)G=queueMicrotask;else if(Q)G=setImmediate;else if(J)G=process.nextTick;else G=I;var H=K(G);function W(f){if(q(f))return function(...c){let o=c.pop(),K0=f.apply(this,c);return X(K0,o)};return z(function(c,o){var K0;try{K0=f.apply(this,c)}catch(O0){return o(O0)}if(K0&&typeof K0.then==="function")return X(K0,o);else o(null,K0)})}function X(f,c){return f.then((o)=>{Z(c,null,o)},(o)=>{Z(c,o&&(o instanceof Error||o.message)?o:Error(o))})}function Z(f,c,o){try{f(c,o)}catch(K0){H((O0)=>{throw O0},K0)}}function q(f){return f[Symbol.toStringTag]==="AsyncFunction"}function V(f){return f[Symbol.toStringTag]==="AsyncGenerator"}function F(f){return typeof f[Symbol.asyncIterator]==="function"}function w(f){if(typeof f!=="function")throw Error("expected a function");return q(f)?W(f):f}function O(f,c){if(!c)c=f.length;if(!c)throw Error("arity is undefined");function o(...K0){if(typeof K0[c-1]==="function")return f.apply(this,K0);return new Promise((O0,D0)=>{K0[c-1]=(P0,...j0)=>{if(P0)return D0(P0);O0(j0.length>1?j0:j0[0])},f.apply(this,K0)})}return o}function N(f){return function(o,...K0){return O(function(D0){var P0=this;return f(o,(j0,h0)=>{w(j0).apply(P0,K0.concat(h0))},D0)})}}function M(f,c,o,K0){c=c||[];var O0=[],D0=0,P0=w(o);return f(c,(j0,h0,z1)=>{var x1=D0++;P0(j0,(m1,i1)=>{O0[x1]=i1,z1(m1)})},(j0)=>{K0(j0,O0)})}function D(f){return f&&typeof f.length==="number"&&f.length>=0&&f.length%1===0}let P={};function j(f){function c(...o){if(f===null)return;var K0=f;f=null,K0.apply(this,o)}return Object.assign(c,f),c}function A(f){return f[Symbol.iterator]&&f[Symbol.iterator]()}function T(f){var c=-1,o=f.length;return function(){return++c=c||P0||O0)return;P0=!0,f.next().then(({value:i1,done:N$})=>{if(D0||O0)return;if(P0=!1,N$){if(O0=!0,j0<=0)K0(null);return}j0++,o(i1,h0,x1),h0++,z1()}).catch(m1)}function x1(i1,N$){if(j0-=1,D0)return;if(i1)return m1(i1);if(i1===!1){O0=!0,D0=!0;return}if(N$===P||O0&&j0<=0)return O0=!0,K0(null);z1()}function m1(i1){if(D0)return;P0=!1,O0=!0,K0(i1)}z1()}var n=(f)=>{return(c,o,K0)=>{if(K0=j(K0),f<=0)throw RangeError("concurrency limit cannot be less than 1");if(!c)return K0(null);if(V(c))return i(c,f,o,K0);if(F(c))return i(c[Symbol.asyncIterator](),f,o,K0);var O0=k(c),D0=!1,P0=!1,j0=0,h0=!1;function z1(m1,i1){if(P0)return;if(j0-=1,m1)D0=!0,K0(m1);else if(m1===!1)D0=!0,P0=!0;else if(i1===P||D0&&j0<=0)return D0=!0,K0(null);else if(!h0)x1()}function x1(){h0=!0;while(j01?O0:O0[0])}return o[G0]=new Promise((K0,O0)=>{f=K0,c=O0}),o}function e0(f,c,o){if(typeof c!=="number")o=c,c=null;o=j(o||f0());var K0=Object.keys(f).length;if(!K0)return o(null);if(!c)c=K0;var O0={},D0=0,P0=!1,j0=!1,h0=Object.create(null),z1=[],x1=[],m1={};Object.keys(f).forEach(($1)=>{var H1=f[$1];if(!Array.isArray(H1)){i1($1,[H1]),x1.push($1);return}var n1=H1.slice(0,H1.length-1),g4=n1.length;if(g4===0){i1($1,H1),x1.push($1);return}m1[$1]=g4,n1.forEach((h6)=>{if(!f[h6])throw Error("async.auto task `"+$1+"` has a non-existent dependency `"+h6+"` in "+n1.join(", "));cU(h6,()=>{if(g4--,g4===0)i1($1,H1)})})}),l1(),N$();function i1($1,H1){z1.push(()=>oK($1,H1))}function N$(){if(P0)return;if(z1.length===0&&D0===0)return o(null,O0);while(z1.length&&D0n1()),N$()}function oK($1,H1){if(j0)return;var n1=S((h6,...D$)=>{if(D0--,h6===!1){P0=!0;return}if(D$.length<2)[D$]=D$;if(h6){var pU={};if(Object.keys(O0).forEach((PY)=>{pU[PY]=O0[PY]}),pU[$1]=D$,j0=!0,h0=Object.create(null),P0)return;o(h6,pU)}else O0[$1]=D$,BY($1)});D0++;var g4=w(H1[H1.length-1]);if(H1.length>1)g4(O0,n1);else g4(n1)}function l1(){var $1,H1=0;while(x1.length)$1=x1.pop(),H1++,G1($1).forEach((n1)=>{if(--m1[n1]===0)x1.push(n1)});if(H1!==K0)throw Error("async.auto cannot execute tasks due to a recursive dependency")}function G1($1){var H1=[];return Object.keys(f).forEach((n1)=>{let g4=f[n1];if(Array.isArray(g4)&&g4.indexOf($1)>=0)H1.push(n1)}),H1}return o[G0]}var r=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,H0=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,F0=/,/,b0=/(=.+)?(\s*)$/;function i0(f){let c="",o=0,K0=f.indexOf("*/");while(o{Object.defineProperty(gG0,"__esModule",{value:!0});gG0.Scanner=void 0;var hG0=X2(),Vz1=/((?:\r\n)|\n|\r)/;class SG0{constructor($){this.cursor=0,this.line=$.line,this.lineLength=this.line.length,this.parserOptions=$.parserOptions,this.hasMoreData=$.hasMoreData,this.cursor=$.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:$}=this,Y=this.parserOptions.NEXT_TOKEN_REGEXP;if($.search(Y)===-1)return null;let z=Y.exec($);if(z==null)return null;let U=z[1],Q=this.cursor+(z.index||0);return new hG0.Token({token:U,startCursor:Q,endCursor:Q+U.length-1})}get nextCharacterToken(){let{cursor:$,lineLength:Y}=this;if(Y<=$)return null;return new hG0.Token({token:this.line[$],startCursor:$,endCursor:$})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let $=Vz1.exec(this.lineFromCursor);if(!$){if(this.hasMoreData)return null;return this.cursor=this.lineLength,this}return this.cursor+=($.index||0)+$[0].length,this}advanceTo($){return this.cursor=$,this}advanceToToken($){return this.cursor=$.startCursor,this}advancePastToken($){return this.cursor=$.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}gG0.Scanner=SG0});var wD=E((xG0)=>{Object.defineProperty(xG0,"__esModule",{value:!0});xG0.ColumnFormatter=void 0;class kG0{constructor($){if($.trim)this.format=(Y)=>Y.trim();else if($.ltrim)this.format=(Y)=>Y.trimLeft();else if($.rtrim)this.format=(Y)=>Y.trimRight();else this.format=(Y)=>Y}}xG0.ColumnFormatter=kG0});var Yu=E((iG0)=>{Object.defineProperty(iG0,"__esModule",{value:!0});iG0.NonQuotedColumnParser=void 0;var Lz1=wD(),uG0=X2();class bG0{constructor($){this.parserOptions=$,this.columnFormatter=new Lz1.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let{parserOptions:Y}=this,z=[],U=$.nextCharacterToken;for(;U;U=$.nextCharacterToken){if(uG0.Token.isTokenDelimiter(U,Y)||uG0.Token.isTokenRowDelimiter(U))break;z.push(U.token),$.advancePastToken(U)}return this.columnFormatter.format(z.join(""))}}iG0.NonQuotedColumnParser=bG0});var zu=E((pG0)=>{Object.defineProperty(pG0,"__esModule",{value:!0});pG0.QuotedColumnParser=void 0;var Fz1=wD(),QI=X2();class cG0{constructor($){this.parserOptions=$,this.columnFormatter=new Fz1.ColumnFormatter($)}parse($){if(!$.hasMoreCharacters)return null;let Y=$.cursor,{foundClosingQuote:z,col:U}=this.gatherDataBetweenQuotes($);if(!z){if($.advanceTo(Y),!$.hasMoreData)throw Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${$.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn($),U}gatherDataBetweenQuotes($){let{parserOptions:Y}=this,z=!1,U=!1,Q=[],J=$.nextCharacterToken;for(;!U&&J!==null;J=$.nextCharacterToken){let I=QI.Token.isTokenQuote(J,Y);if(!z&&I)z=!0;else if(z)if(QI.Token.isTokenEscapeCharacter(J,Y)){$.advancePastToken(J);let K=$.nextCharacterToken;if(K!==null&&(QI.Token.isTokenQuote(K,Y)||QI.Token.isTokenEscapeCharacter(K,Y)))Q.push(K.token),J=K;else if(I)U=!0;else Q.push(J.token)}else if(I)U=!0;else Q.push(J.token);$.advancePastToken(J)}return{col:this.columnFormatter.format(Q.join("")),foundClosingQuote:U}}checkForMalformedColumn($){let{parserOptions:Y}=this,{nextNonSpaceToken:z}=$;if(z){let U=QI.Token.isTokenDelimiter(z,Y),Q=QI.Token.isTokenRowDelimiter(z);if(!(U||Q)){let J=$.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw Error(`Parse Error: expected: '${Y.escapedDelimiter}' OR new line got: '${z.token}'. at '${J}`)}$.advanceToToken(z)}else if(!$.hasMoreData)$.advancePastLine()}}pG0.QuotedColumnParser=cG0});var rG0=E((lG0)=>{Object.defineProperty(lG0,"__esModule",{value:!0});lG0.ColumnParser=void 0;var Oz1=Yu(),wz1=zu(),Mz1=X2();class mG0{constructor($){this.parserOptions=$,this.quotedColumnParser=new wz1.QuotedColumnParser($),this.nonQuotedColumnParser=new Oz1.NonQuotedColumnParser($)}parse($){let{nextNonSpaceToken:Y}=$;if(Y!==null&&Mz1.Token.isTokenQuote(Y,this.parserOptions))return $.advanceToToken(Y),this.quotedColumnParser.parse($);return this.nonQuotedColumnParser.parse($)}}lG0.ColumnParser=mG0});var Uu=E((JI)=>{Object.defineProperty(JI,"__esModule",{value:!0});JI.ColumnFormatter=JI.QuotedColumnParser=JI.NonQuotedColumnParser=JI.ColumnParser=void 0;var Nz1=rG0();Object.defineProperty(JI,"ColumnParser",{enumerable:!0,get:function(){return Nz1.ColumnParser}});var Dz1=Yu();Object.defineProperty(JI,"NonQuotedColumnParser",{enumerable:!0,get:function(){return Dz1.NonQuotedColumnParser}});var Az1=zu();Object.defineProperty(JI,"QuotedColumnParser",{enumerable:!0,get:function(){return Az1.QuotedColumnParser}});var Bz1=wD();Object.defineProperty(JI,"ColumnFormatter",{enumerable:!0,get:function(){return Bz1.ColumnFormatter}})});var Ju=E((aG0)=>{Object.defineProperty(aG0,"__esModule",{value:!0});aG0.RowParser=void 0;var jz1=Uu(),II=X2(),Qu="";class sG0{constructor($){this.parserOptions=$,this.columnParser=new jz1.ColumnParser($)}static isEmptyRow($){return $.join(Qu).replace(/\s+/g,Qu)===Qu}parse($){let{parserOptions:Y}=this,{hasMoreData:z}=$,U=$,Q=[],J=this.getStartToken(U,Q);while(J){if(II.Token.isTokenRowDelimiter(J)){if(U.advancePastToken(J),!U.hasMoreCharacters&&II.Token.isTokenCarriageReturn(J,Y)&&z)return null;return U.truncateToCursor(),Q}if(!this.shouldSkipColumnParse(U,J,Q)){let I=this.columnParser.parse(U);if(I===null)return null;Q.push(I)}J=U.nextNonSpaceToken}if(!z)return U.truncateToCursor(),Q;return null}getStartToken($,Y){let z=$.nextNonSpaceToken;if(z!==null&&II.Token.isTokenDelimiter(z,this.parserOptions))return Y.push(""),$.nextNonSpaceToken;return z}shouldSkipColumnParse($,Y,z){let{parserOptions:U}=this;if(II.Token.isTokenDelimiter(Y,U)){$.advancePastToken(Y);let Q=$.nextCharacterToken;if(!$.hasMoreCharacters||Q!==null&&II.Token.isTokenRowDelimiter(Q))return z.push(""),!0;if(Q!==null&&II.Token.isTokenDelimiter(Q,U))return z.push(""),!0}return!1}}aG0.RowParser=sG0});var zH0=E(($H0)=>{Object.defineProperty($H0,"__esModule",{value:!0});$H0.Parser=void 0;var Tz1=$u(),eG0=Ju(),Ez1=X2();class Iu{constructor($){this.parserOptions=$,this.rowParser=new eG0.RowParser(this.parserOptions)}static removeBOM($){if($&&$.charCodeAt(0)===65279)return $.slice(1);return $}parse($,Y){let z=new Tz1.Scanner({line:Iu.removeBOM($),parserOptions:this.parserOptions,hasMoreData:Y});if(this.parserOptions.supportsComments)return this.parseWithComments(z);return this.parseWithoutComments(z)}parseWithoutComments($){let Y=[],z=!0;while(z)z=this.parseRow($,Y);return{line:$.line,rows:Y}}parseWithComments($){let{parserOptions:Y}=this,z=[];for(let U=$.nextCharacterToken;U!==null;U=$.nextCharacterToken)if(Ez1.Token.isTokenComment(U,Y)){if($.advancePastLine()===null)return{line:$.lineFromCursor,rows:z};if(!$.hasMoreCharacters)return{line:$.lineFromCursor,rows:z};$.truncateToCursor()}else if(!this.parseRow($,z))break;return{line:$.line,rows:z}}parseRow($,Y){if(!$.nextNonSpaceToken)return!1;let U=this.rowParser.parse($);if(U===null)return!1;if(this.parserOptions.ignoreEmpty&&eG0.RowParser.isEmptyRow(U))return!0;return Y.push(U),!0}}$H0.Parser=Iu});var UH0=E((M3)=>{Object.defineProperty(M3,"__esModule",{value:!0});M3.QuotedColumnParser=M3.NonQuotedColumnParser=M3.ColumnParser=M3.Token=M3.Scanner=M3.RowParser=M3.Parser=void 0;var Cz1=zH0();Object.defineProperty(M3,"Parser",{enumerable:!0,get:function(){return Cz1.Parser}});var Rz1=Ju();Object.defineProperty(M3,"RowParser",{enumerable:!0,get:function(){return Rz1.RowParser}});var _z1=$u();Object.defineProperty(M3,"Scanner",{enumerable:!0,get:function(){return _z1.Scanner}});var vz1=X2();Object.defineProperty(M3,"Token",{enumerable:!0,get:function(){return vz1.Token}});var Ku=Uu();Object.defineProperty(M3,"ColumnParser",{enumerable:!0,get:function(){return Ku.ColumnParser}});Object.defineProperty(M3,"NonQuotedColumnParser",{enumerable:!0,get:function(){return Ku.NonQuotedColumnParser}});Object.defineProperty(M3,"QuotedColumnParser",{enumerable:!0,get:function(){return Ku.QuotedColumnParser}})});var Gu=E((JH0)=>{Object.defineProperty(JH0,"__esModule",{value:!0});JH0.CsvParserStream=void 0;var Sz1=I0("string_decoder"),gz1=I0("stream"),QH0=CG0(),yz1=UH0();class MD extends gz1.Transform{constructor($){super({objectMode:$.objectMode});this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=$,this.parser=new yz1.Parser($),this.headerTransformer=new QH0.HeaderTransformer($),this.decoder=new Sz1.StringDecoder($.encoding),this.rowTransformerValidator=new QH0.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform($){return this.rowTransformerValidator.rowTransform=$,this}validate($){return this.rowTransformerValidator.rowValidator=$,this}emit($,...Y){if($==="end"){if(!this.endEmitted)this.endEmitted=!0,super.emit("end",this.rowCount);return!1}return super.emit($,...Y)}_transform($,Y,z){if(this.hasHitRowLimit)return z();let U=MD.wrapDoneCallback(z);try{let{lines:Q}=this,J=Q+this.decoder.write($),I=this.parse(J,!0);return this.processRows(I,U)}catch(Q){return U(Q)}}_flush($){let Y=MD.wrapDoneCallback($);if(this.hasHitRowLimit)return Y();try{let z=this.lines+this.decoder.end(),U=this.parse(z,!1);return this.processRows(U,Y)}catch(z){return Y(z)}}parse($,Y){if(!$)return[];let{line:z,rows:U}=this.parser.parse($,Y);return this.lines=z,U}processRows($,Y){let z=$.length,U=(Q)=>{let J=(G)=>{if(G)return Y(G);if(Q%100===0){setImmediate(()=>U(Q+1));return}return U(Q+1)};if(this.checkAndEmitHeaders(),Q>=z||this.hasHitRowLimit)return Y();if(this.parsedLineCount+=1,this.shouldSkipLine)return J();let I=$[Q];this.rowCount+=1,this.parsedRowCount+=1;let K=this.rowCount;return this.transformRow(I,(G,H)=>{if(G)return this.rowCount-=1,J(G);if(!H)return J(Error("expected transform result"));if(!H.isValid)this.emit("data-invalid",H.row,K,H.reason);else if(H.row)return this.pushRow(H.row,J);return J()})};U(0)}transformRow($,Y){try{this.headerTransformer.transform($,(z,U)=>{if(z)return Y(z);if(!U)return Y(Error("Expected result from header transform"));if(!U.isValid){if(this.shouldEmitRows)return Y(null,{isValid:!1,row:$});return this.skipRow(Y)}if(U.row){if(this.shouldEmitRows)return this.rowTransformerValidator.transformAndValidate(U.row,Y);return this.skipRow(Y)}return this.rowCount-=1,this.parsedRowCount-=1,Y(null,{row:null,isValid:!0})})}catch(z){Y(z)}}checkAndEmitHeaders(){if(!this.headersEmitted&&this.headerTransformer.headers)this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers)}skipRow($){return this.rowCount-=1,$(null,{row:null,isValid:!0})}pushRow($,Y){try{if(!this.parserOptions.objectMode)this.push(JSON.stringify($));else this.push($);Y()}catch(z){Y(z)}}static wrapDoneCallback($){let Y=!1;return(z,...U)=>{if(z){if(Y)throw z;Y=!0,$(z);return}$(...U)}}}JH0.CsvParserStream=MD});var GH0=E((p4)=>{var KH0=p4&&p4.__createBinding||(Object.create?function($,Y,z,U){if(U===void 0)U=z;Object.defineProperty($,U,{enumerable:!0,get:function(){return Y[z]}})}:function($,Y,z,U){if(U===void 0)U=z;$[U]=Y[z]}),kz1=p4&&p4.__setModuleDefault||(Object.create?function($,Y){Object.defineProperty($,"default",{enumerable:!0,value:Y})}:function($,Y){$.default=Y}),xz1=p4&&p4.__importStar||function($){if($&&$.__esModule)return $;var Y={};if($!=null){for(var z in $)if(z!=="default"&&Object.prototype.hasOwnProperty.call($,z))KH0(Y,$,z)}return kz1(Y,$),Y},fz1=p4&&p4.__exportStar||function($,Y){for(var z in $)if(z!=="default"&&!Object.prototype.hasOwnProperty.call(Y,z))KH0(Y,$,z)};Object.defineProperty(p4,"__esModule",{value:!0});p4.parseString=p4.parseFile=p4.parseStream=p4.parse=p4.ParserOptions=p4.CsvParserStream=void 0;var uz1=xz1(I0("fs")),bz1=I0("stream"),ND=_f(),DD=Gu();fz1(vf(),p4);var iz1=Gu();Object.defineProperty(p4,"CsvParserStream",{enumerable:!0,get:function(){return iz1.CsvParserStream}});var nz1=_f();Object.defineProperty(p4,"ParserOptions",{enumerable:!0,get:function(){return nz1.ParserOptions}});p4.parse=($)=>new DD.CsvParserStream(new ND.ParserOptions($));p4.parseStream=($,Y)=>$.pipe(new DD.CsvParserStream(new ND.ParserOptions(Y)));p4.parseFile=($,Y={})=>uz1.createReadStream($).pipe(new DD.CsvParserStream(new ND.ParserOptions(Y)));p4.parseString=($,Y)=>{let z=new bz1.Readable;return z.push($),z.push(null),z.pipe(new DD.CsvParserStream(new ND.ParserOptions(Y)))}});var HH0=E((V8)=>{Object.defineProperty(V8,"__esModule",{value:!0});V8.CsvParserStream=V8.ParserOptions=V8.parseFile=V8.parseStream=V8.parseString=V8.parse=V8.FormatterOptions=V8.CsvFormatterStream=V8.writeToPath=V8.writeToString=V8.writeToBuffer=V8.writeToStream=V8.write=V8.format=void 0;var Z2=RK0();Object.defineProperty(V8,"format",{enumerable:!0,get:function(){return Z2.format}});Object.defineProperty(V8,"write",{enumerable:!0,get:function(){return Z2.write}});Object.defineProperty(V8,"writeToStream",{enumerable:!0,get:function(){return Z2.writeToStream}});Object.defineProperty(V8,"writeToBuffer",{enumerable:!0,get:function(){return Z2.writeToBuffer}});Object.defineProperty(V8,"writeToString",{enumerable:!0,get:function(){return Z2.writeToString}});Object.defineProperty(V8,"writeToPath",{enumerable:!0,get:function(){return Z2.writeToPath}});Object.defineProperty(V8,"CsvFormatterStream",{enumerable:!0,get:function(){return Z2.CsvFormatterStream}});Object.defineProperty(V8,"FormatterOptions",{enumerable:!0,get:function(){return Z2.FormatterOptions}});var KI=GH0();Object.defineProperty(V8,"parse",{enumerable:!0,get:function(){return KI.parse}});Object.defineProperty(V8,"parseString",{enumerable:!0,get:function(){return KI.parseString}});Object.defineProperty(V8,"parseStream",{enumerable:!0,get:function(){return KI.parseStream}});Object.defineProperty(V8,"parseFile",{enumerable:!0,get:function(){return KI.parseFile}});Object.defineProperty(V8,"ParserOptions",{enumerable:!0,get:function(){return KI.ParserOptions}});Object.defineProperty(V8,"CsvParserStream",{enumerable:!0,get:function(){return KI.CsvParserStream}})});var WH0=E((Hu,Wu)=>{(function($,Y){typeof Hu=="object"&&typeof Wu<"u"?Wu.exports=Y():typeof define=="function"&&define.amd?define(Y):($=typeof globalThis<"u"?globalThis:$||self).dayjs_plugin_customParseFormat=Y()})(Hu,function(){var $={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Y=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,z=/\d/,U=/\d\d/,Q=/\d\d?/,J=/\d*[^-_:/,()\s\d]+/,I={},K=function(V){return(V=+V)+(V>68?1900:2000)},G=function(V){return function(F){this[V]=+F}},H=[/[+-]\d\d:?(\d\d)?|Z/,function(V){(this.zone||(this.zone={})).offset=function(F){if(!F)return 0;if(F==="Z")return 0;var w=F.match(/([+-]|\d\d)/g),O=60*w[1]+(+w[2]||0);return O===0?0:w[0]==="+"?-O:O}(V)}],W=function(V){var F=I[V];return F&&(F.indexOf?F:F.s.concat(F.f))},X=function(V,F){var w,O=I.meridiem;if(O){for(var N=1;N<=24;N+=1)if(V.indexOf(O(N,0,F))>-1){w=N>12;break}}else w=V===(F?"pm":"PM");return w},Z={A:[J,function(V){this.afternoon=X(V,!1)}],a:[J,function(V){this.afternoon=X(V,!0)}],Q:[z,function(V){this.month=3*(V-1)+1}],S:[z,function(V){this.milliseconds=100*+V}],SS:[U,function(V){this.milliseconds=10*+V}],SSS:[/\d{3}/,function(V){this.milliseconds=+V}],s:[Q,G("seconds")],ss:[Q,G("seconds")],m:[Q,G("minutes")],mm:[Q,G("minutes")],H:[Q,G("hours")],h:[Q,G("hours")],HH:[Q,G("hours")],hh:[Q,G("hours")],D:[Q,G("day")],DD:[U,G("day")],Do:[J,function(V){var F=I.ordinal,w=V.match(/\d+/);if(this.day=w[0],F)for(var O=1;O<=31;O+=1)F(O).replace(/\[|\]/g,"")===V&&(this.day=O)}],w:[Q,G("week")],ww:[U,G("week")],M:[Q,G("month")],MM:[U,G("month")],MMM:[J,function(V){var F=W("months"),w=(W("monthsShort")||F.map(function(O){return O.slice(0,3)})).indexOf(V)+1;if(w<1)throw Error();this.month=w%12||w}],MMMM:[J,function(V){var F=W("months").indexOf(V)+1;if(F<1)throw Error();this.month=F%12||F}],Y:[/[+-]?\d+/,G("year")],YY:[U,function(V){this.year=K(V)}],YYYY:[/\d{4}/,G("year")],Z:H,ZZ:H};function q(V){var F,w;F=V,w=I&&I.formats;for(var O=(V=F.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,C,b){var k=b&&b.toUpperCase();return C||w[b]||$[b]||w[k].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(S,i,n){return i||n.slice(1)})})).match(Y),N=O.length,M=0;M-1)return new Date((x==="X"?1000:1)*U0);var e=q(x)(U0),g=e.year,p=e.month,Y0=e.day,y=e.hours,r=e.minutes,$0=e.seconds,N0=e.milliseconds,T0=e.zone,_0=e.week,G0=new Date,f0=Y0||(g||p?1:G0.getDate()),e0=g||G0.getFullYear(),s=0;g&&!p||(s=p>0?p-1:G0.getMonth());var H0,F0=y||0,b0=r||0,i0=$0||0,n0=N0||0;return T0?new Date(Date.UTC(e0,s,f0,F0,b0,i0,n0+60*T0.offset*1000)):d?new Date(Date.UTC(e0,s,f0,F0,b0,i0,n0)):(H0=new Date(e0,s,f0,F0,b0,i0,n0),_0&&(H0=t(H0).week(_0).toDate()),H0)}catch(w1){return new Date("")}}(D,A,P,w),this.init(),k&&k!==!0&&(this.$L=this.locale(k).$L),b&&D!=this.format(A)&&(this.$d=new Date("")),I={}}else if(A instanceof Array)for(var S=A.length,i=1;i<=S;i+=1){j[1]=A[i-1];var n=w.apply(this,j);if(n.isValid()){this.$d=n.$d,this.$L=n.$L,this.init();break}i===S&&(this.$d=new Date(""))}else N.call(this,M)}}})});var XH0=E((Xu,Zu)=>{(function($,Y){typeof Xu=="object"&&typeof Zu<"u"?Zu.exports=Y():typeof define=="function"&&define.amd?define(Y):($=typeof globalThis<"u"?globalThis:$||self).dayjs_plugin_utc=Y()})(Xu,function(){var $="minute",Y=/[+-]\d\d(?::?\d\d)?/g,z=/([+-]|\d\d)/g;return function(U,Q,J){var I=Q.prototype;J.utc=function(q){var V={date:q,utc:!0,args:arguments};return new Q(V)},I.utc=function(q){var V=J(this.toDate(),{locale:this.$L,utc:!0});return q?V.add(this.utcOffset(),$):V},I.local=function(){return J(this.toDate(),{locale:this.$L,utc:!1})};var K=I.parse;I.parse=function(q){q.utc&&(this.$u=!0),this.$utils().u(q.$offset)||(this.$offset=q.$offset),K.call(this,q)};var G=I.init;I.init=function(){if(this.$u){var q=this.$d;this.$y=q.getUTCFullYear(),this.$M=q.getUTCMonth(),this.$D=q.getUTCDate(),this.$W=q.getUTCDay(),this.$H=q.getUTCHours(),this.$m=q.getUTCMinutes(),this.$s=q.getUTCSeconds(),this.$ms=q.getUTCMilliseconds()}else G.call(this)};var H=I.utcOffset;I.utcOffset=function(q,V){var F=this.$utils().u;if(F(q))return this.$u?0:F(this.$offset)?H.call(this):this.$offset;if(typeof q=="string"&&(q=function(M){M===void 0&&(M="");var D=M.match(Y);if(!D)return null;var P=(""+D[0]).match(z)||["-",0,0],j=P[0],A=60*+P[1]+ +P[2];return A===0?0:j==="+"?A:-A}(q),q===null))return this;var w=Math.abs(q)<=16?60*q:q;if(w===0)return this.utc(V);var O=this.clone();if(V)return O.$offset=w,O.$u=!1,O;var N=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(O=this.local().add(w+N,$)).$offset=w,O.$x.$localOffset=N,O};var W=I.format;I.format=function(q){var V=q||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return W.call(this,V)},I.valueOf=function(){var q=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-60000*q},I.isUTC=function(){return!!this.$u},I.toISOString=function(){return this.toDate().toISOString()},I.toString=function(){return this.toDate().toUTCString()};var X=I.toDate;I.toDate=function(q){return q==="s"&&this.$offset?J(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():X.call(this)};var Z=I.diff;I.diff=function(q,V,F){if(q&&this.$u===q.$u)return Z.call(this,q,V,F);var w=this.local(),O=J(q).local();return Z.call(w,O,V,F)}}})});var ZH0=E((qu,Vu)=>{(function($,Y){typeof qu=="object"&&typeof Vu<"u"?Vu.exports=Y():typeof define=="function"&&define.amd?define(Y):($=typeof globalThis<"u"?globalThis:$||self).dayjs=Y()})(qu,function(){var $=1000,Y=60000,z=3600000,U="millisecond",Q="second",J="minute",I="hour",K="day",G="week",H="month",W="quarter",X="year",Z="date",q="Invalid Date",V=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var i=["th","st","nd","rd"],n=S%100;return"["+S+(i[(n-20)%10]||i[n]||i[0])+"]"}},O=function(S,i,n){var U0=String(S);return!U0||U0.length>=i?S:""+Array(i+1-U0.length).join(n)+S},N={s:O,z:function(S){var i=-S.utcOffset(),n=Math.abs(i),U0=Math.floor(n/60),x=n%60;return(i<=0?"+":"-")+O(U0,2,"0")+":"+O(x,2,"0")},m:function S(i,n){if(i.date()1)return S(t[0])}else{var e=i.name;D[e]=i,x=e}return!U0&&x&&(M=x),x||!U0&&M},T=function(S,i){if(j(S))return S.clone();var n=typeof i=="object"?i:{};return n.date=S,n.args=arguments,new b(n)},C=N;C.l=A,C.i=j,C.w=function(S,i){return T(S,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var b=function(){function S(n){this.$L=A(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[P]=!0}var i=S.prototype;return i.parse=function(n){this.$d=function(U0){var{date:x,utc:d}=U0;if(x===null)return new Date(NaN);if(C.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var t=x.match(V);if(t){var e=t[2]-1||0,g=(t[7]||"0").substring(0,3);return d?new Date(Date.UTC(t[1],e,t[3]||1,t[4]||0,t[5]||0,t[6]||0,g)):new Date(t[1],e,t[3]||1,t[4]||0,t[5]||0,t[6]||0,g)}}return new Date(x)}(n),this.init()},i.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},i.$utils=function(){return C},i.isValid=function(){return this.$d.toString()!==q},i.isSame=function(n,U0){var x=T(n);return this.startOf(U0)<=x&&x<=this.endOf(U0)},i.isAfter=function(n,U0){return T(n){var qH0=I0("fs"),VH0=HH0(),pz1=WH0(),dz1=XH0(),rW=ZH0().extend(pz1).extend(dz1),mz1=vW(),{fs:{exists:lz1}}=Z8(),oz1={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};class LH0{constructor($){this.workbook=$,this.worksheet=null}async readFile($,Y){if(Y=Y||{},!await lz1($))throw Error(`File not found: ${$}`);let z=qH0.createReadStream($),U=await this.read(z,Y);return z.close(),U}read($,Y){return Y=Y||{},new Promise((z,U)=>{let Q=this.workbook.addWorksheet(Y.sheetName),J=Y.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],I=Y.map||function(G){if(G==="")return null;let H=Number(G);if(!Number.isNaN(H)&&H!==1/0)return H;let W=J.reduce((Z,q)=>{if(Z)return Z;let V=rW(G,q,!0);if(V.isValid())return V;return null},null);if(W)return new Date(W.valueOf());let X=oz1[G];if(X!==void 0)return X;return G},K=VH0.parse(Y.parserOptions).on("data",(G)=>{Q.addRow(G.map(I))}).on("end",()=>{K.emit("worksheet",Q)});K.on("worksheet",z).on("error",U),$.pipe(K)})}createInputStream(){throw Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write($,Y){return new Promise((z,U)=>{Y=Y||{};let Q=this.workbook.getWorksheet(Y.sheetName||Y.sheetId),J=VH0.format(Y.formatterOptions);$.on("finish",()=>{z()}),J.on("error",U),J.pipe($);let{dateFormat:I,dateUTC:K}=Y,G=Y.map||((X)=>{if(X){if(X.text||X.hyperlink)return X.hyperlink||X.text||"";if(X.formula||X.result)return X.result||"";if(X instanceof Date){if(I)return K?rW.utc(X).format(I):rW(X).format(I);return K?rW.utc(X).format():rW(X).format()}if(X.error)return X.error;if(typeof X==="object")return JSON.stringify(X)}return X}),H=Y.includeEmptyRows===void 0||Y.includeEmptyRows,W=1;if(Q)Q.eachRow((X,Z)=>{if(H)while(W++{var wH0=j60(),rz1=Dg(),sz1=Xf(),az1=OH0();class MH0{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new rz1}get xlsx(){if(!this._xlsx)this._xlsx=new sz1(this);return this._xlsx}get csv(){if(!this._csv)this._csv=new az1(this);return this._csv}get nextId(){for(let $=1;$(K&&K.orderNo)>I?K.orderNo:I,0),Q=Object.assign({},Y,{id:z,name:$,orderNo:U+1,workbook:this}),J=new wH0(Q);return this._worksheets[z]=J,J}removeWorksheetEx($){delete this._worksheets[$.id]}removeWorksheet($){let Y=this.getWorksheet($);if(Y)Y.destroy()}getWorksheet($){if($===void 0)return this._worksheets.find(Boolean);if(typeof $==="number")return this._worksheets[$];if(typeof $==="string")return this._worksheets.find((Y)=>Y&&Y.name===$);return}get worksheets(){return this._worksheets.slice(1).sort(($,Y)=>$.orderNo-Y.orderNo).filter(Boolean)}eachSheet($){this.worksheets.forEach((Y)=>{$(Y,Y.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage($){let Y=this.media.length;return this.media.push(Object.assign({},$,{type:"image"})),Y}getImage($){return this.media[$]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(($)=>$.model),sheets:this.worksheets.map(($)=>$.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model($){this.creator=$.creator,this.lastModifiedBy=$.lastModifiedBy,this.lastPrinted=$.lastPrinted,this.created=$.created,this.modified=$.modified,this.company=$.company,this.manager=$.manager,this.title=$.title,this.subject=$.subject,this.keywords=$.keywords,this.category=$.category,this.description=$.description,this.language=$.language,this.revision=$.revision,this.contentStatus=$.contentStatus,this.properties=$.properties,this.calcProperties=$.calcProperties,this._worksheets=[],$.worksheets.forEach((Y)=>{let{id:z,name:U,state:Q}=Y,J=$.sheets&&$.sheets.findIndex((K)=>K.id===z),I=this._worksheets[z]=new wH0({id:z,name:U,orderNo:J,state:Q,workbook:this});I.model=Y}),this._definedNames.model=$.definedNames,this.views=$.views,this._themes=$.themes,this.media=$.media||[]}}NH0.exports=MH0});var PH0=E((Os1,BH0)=>{var tz1=Xf();class AH0{constructor($){this.model=$}get xlsx(){if(!this._xlsx)this._xlsx=new tz1(this);return this._xlsx}}BH0.exports=AH0});var TH0=E((ws1,jH0)=>{var ez1=typeof process==="object"&&process&&process.platform==="win32";jH0.exports=ez1?{sep:"\\"}:{sep:"/"}});var vH0=E((Ms1,_H0)=>{_H0.exports=CH0;function CH0($,Y,z){if($ instanceof RegExp)$=EH0($,z);if(Y instanceof RegExp)Y=EH0(Y,z);var U=RH0($,Y,z);return U&&{start:U[0],end:U[1],pre:z.slice(0,U[0]),body:z.slice(U[0]+$.length,U[1]),post:z.slice(U[1]+Y.length)}}function EH0($,Y){var z=Y.match($);return z?z[0]:null}CH0.range=RH0;function RH0($,Y,z){var U,Q,J,I,K,G=z.indexOf($),H=z.indexOf(Y,G+1),W=G;if(G>=0&&H>0){if($===Y)return[G,H];U=[],J=z.length;while(W>=0&&!K){if(W==G)U.push(W),G=z.indexOf($,W+1);else if(U.length==1)K=[U.pop(),H];else{if(Q=U.pop(),Q=0?G:H}if(U.length)K=[J,I]}return K}});var uH0=E((Ns1,fH0)=>{var hH0=vH0();fH0.exports=QU1;var SH0="\x00SLASH"+Math.random()+"\x00",gH0="\x00OPEN"+Math.random()+"\x00",Ou="\x00CLOSE"+Math.random()+"\x00",yH0="\x00COMMA"+Math.random()+"\x00",kH0="\x00PERIOD"+Math.random()+"\x00",$U1=1e5,YU1=4000000;function Lu($){return parseInt($,10)==$?parseInt($,10):$.charCodeAt(0)}function zU1($){return $.split("\\\\").join(SH0).split("\\{").join(gH0).split("\\}").join(Ou).split("\\,").join(yH0).split("\\.").join(kH0)}function UU1($){return $.split(SH0).join("\\").split(gH0).join("{").split(Ou).join("}").split(yH0).join(",").split(kH0).join(".")}function xH0($){if(!$)return[""];var Y=[],z=hH0("{","}",$);if(!z)return $.split(",");var{pre:U,body:Q,post:J}=z,I=U.split(",");I[I.length-1]+="{"+Q+"}";var K=xH0(J);if(J.length)I[I.length-1]+=K.shift(),I.push.apply(I,K);return Y.push.apply(Y,I),Y}function QU1($,Y){if(!$)return[];Y=Y||{};var z=Y.max==null?$U1:Y.max,U=Y.maxLength==null?YU1:Y.maxLength;if($.substr(0,2)==="{}")$="\\{\\}"+$.substr(2);return Fu(zU1($),z,U,!0).map(UU1)}function JU1($){return"{"+$+"}"}function IU1($){return/^-?0\d/.test($)}function KU1($,Y){return $<=Y}function GU1($,Y){return $>=Y}function sW($,Y,z,U,Q,J){var I=[],K=0;for(var G=0;G<$.length;G++)for(var H=0;H=U)return I;var W=$[G]+Y+z[H];if(J&&!W)continue;if(K+W.length>Q)return I;I.push(W),K+=W.length}return I}function HU1($,Y,z,U){var Q=$.split(/\.\./),J=[];if(Q[0]===void 0||Q[1]===void 0)return J;var I=Lu(Q[0]),K=Lu(Q[1]),G=Math.max(Q[0].length,Q[1].length),H=Q.length===3&&Q[2]!==void 0?Math.max(Math.abs(Lu(Q[2])),1):1,W=KU1,X=K0){var O=Array(w+1).join("0");if(V<0)F="-"+O+F.slice(1);else F=O+F}}if(q+F.length>U)break;J.push(F),q+=F.length}return J}function Fu($,Y,z,U){var Q=[""],J=!1,I=!0;for(;;){let D=hH0("{","}",$);if(!D)return sW(Q,$,[""],Y,z,J);let P=D.pre;if(/\$$/.test(P)){if(Q=sW(Q,P+"{"+D.body+"}",[""],Y,z,J&&!D.post.length),I=!1,!D.post.length)break;$=D.post;continue}var K=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(D.body),G=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(D.body),H=K||G,W=D.body.indexOf(",")>=0;if(!H&&!W){if(D.post.match(/,(?!,).*\}/)){$=D.pre+"{"+D.body+Ou+D.post,U=!0;continue}return sW(Q,P+"{"+D.body+"}"+D.post,[""],Y,z,J)}if(I)J=U&&!H,I=!1;var X;if(H)X=HU1(D.body,G,Y,z);else{var Z=xH0(D.body);if(Z.length===1&&Z[0]!==void 0){if(Z=Fu(Z[0],Y,z,!1).map(JU1),Z.length===1){if(Q=sW(Q,P+Z[0],[""],Y,z,J&&!D.post.length),!D.post.length)break;$=D.post;continue}}var q=J&&!D.post.length&&!P;for(var V=0;q&&V=Y||F+M.length>z)break $;X.push(M),F+=M.length}}}if(Q=sW(Q,P,X,Y,z,J&&!D.post.length),!D.post.length)break;$=D.post}return Q}});var dH0=E((Ds1,Au)=>{var W$=Au.exports=($,Y,z={})=>{if(AD(Y),!z.nocomment&&Y.charAt(0)==="#")return!1;return new aW(Y,z).match($)};Au.exports=W$;var Nu=TH0();W$.sep=Nu.sep;var _8=Symbol("globstar **");W$.GLOBSTAR=_8;var WU1=uH0(),bH0={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Du="[^/]",wu=Du+"*?",XU1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ZU1="(?:(?!(?:\\/|^)\\.).)*?",cH0=($)=>$.split("").reduce((Y,z)=>{return Y[z]=!0,Y},{}),iH0=cH0("().*{}+?[]^$\\!"),qU1=cH0("[.("),nH0=/\/+/;W$.filter=($,Y={})=>(z,U,Q)=>W$(z,$,Y);var q2=($,Y={})=>{let z={};return Object.keys($).forEach((U)=>z[U]=$[U]),Object.keys(Y).forEach((U)=>z[U]=Y[U]),z};W$.defaults=($)=>{if(!$||typeof $!=="object"||!Object.keys($).length)return W$;let Y=W$,z=(U,Q,J)=>Y(U,Q,q2($,J));return z.Minimatch=class extends Y.Minimatch{constructor(Q,J){super(Q,q2($,J))}},z.Minimatch.defaults=(U)=>Y.defaults(q2($,U)).Minimatch,z.filter=(U,Q)=>Y.filter(U,q2($,Q)),z.defaults=(U)=>Y.defaults(q2($,U)),z.makeRe=(U,Q)=>Y.makeRe(U,q2($,Q)),z.braceExpand=(U,Q)=>Y.braceExpand(U,q2($,Q)),z.match=(U,Q,J)=>Y.match(U,Q,q2($,J)),z};W$.braceExpand=($,Y)=>pH0($,Y);var pH0=($,Y={})=>{if(AD($),Y.nobrace||!/\{(?:(?!\{).)*\}/.test($))return[$];return WU1($)},VU1=65536,AD=($)=>{if(typeof $!=="string")throw TypeError("invalid pattern");if($.length>VU1)throw TypeError("pattern is too long")},Mu=Symbol("subparse");W$.makeRe=($,Y)=>new aW($,Y||{}).makeRe();W$.match=($,Y,z={})=>{let U=new aW(Y,z);if($=$.filter((Q)=>U.match(Q)),U.options.nonull&&!$.length)$.push(Y);return $};var LU1=($)=>$.replace(/\\(.)/g,"$1"),FU1=($)=>$.replace(/\\([^-\]])/g,"$1"),OU1=($)=>$.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),wU1=($)=>$.replace(/[[\]\\]/g,"\\$&");class aW{constructor($,Y){if(AD($),!Y)Y={};if(this.options=Y,this.maxGlobstarRecursion=Y.maxGlobstarRecursion!==void 0?Y.maxGlobstarRecursion:200,this.set=[],this.pattern=$,this.windowsPathsNoEscape=!!Y.windowsPathsNoEscape||Y.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!Y.partial,this.make()}debug(){}make(){let $=this.pattern,Y=this.options;if(!Y.nocomment&&$.charAt(0)==="#"){this.comment=!0;return}if(!$){this.empty=!0;return}this.parseNegate();let z=this.globSet=this.braceExpand();if(Y.debug)this.debug=(...U)=>console.error(...U);this.debug(this.pattern,z),z=this.globParts=z.map((U)=>U.split(nH0)),this.debug(this.pattern,z),z=z.map((U,Q,J)=>U.map(this.parse,this)),this.debug(this.pattern,z),z=z.filter((U)=>U.indexOf(!1)===-1),this.debug(this.pattern,z),this.set=z}parseNegate(){if(this.options.nonegate)return;let $=this.pattern,Y=!1,z=0;for(let U=0;U<$.length&&$.charAt(U)==="!";U++)Y=!Y,z++;if(z)this.pattern=$.slice(z);this.negate=Y}matchOne($,Y,z){if(Y.indexOf(_8)!==-1)return this._matchGlobstar($,Y,z,0,0);return this._matchOne($,Y,z,0,0)}_matchGlobstar($,Y,z,U,Q){let J=-1;for(let O=Q;O=0;O--)if(Y[O]===_8){I=O;break}let K=Y.slice(Q,J),G=z?Y.slice(J+1):Y.slice(J+1,I),H=z?[]:Y.slice(I+1);if(K.length){let O=$.slice(U,U+K.length);if(!this._matchOne(O,K,z,0,0))return!1;U+=K.length}let W=0;if(H.length){if(H.length+U>$.length)return!1;let O=$.length-H.length;if(this._matchOne($,H,z,O,0))W=H.length;else{if($[$.length-1]!==""||U+H.length===$.length)return!1;if(!this._matchOne($,H,z,O-1,0))return!1;W=H.length+1}}if(!G.length){let O=!!W;for(let N=U;N<$.length-W;N++){let M=String($[N]);if(O=!0,M==="."||M===".."||!this.options.dot&&M.charAt(0)===".")return!1}return z||O}let X=[[[],0]],Z=X[0],q=0,V=[0];for(let O of G)if(O===_8)V.push(q),Z=[[],0],X.push(Z);else Z[0].push(O),q++;let F=X.length-1,w=$.length-W;for(let O of X)O[1]=w-(V[F--]+O[0].length);return!!this._matchGlobStarBodySections($,X,U,0,z,0,!!W)}_matchGlobStarBodySections($,Y,z,U,Q,J,I){let K=Y[U];if(!K){for(let W=z;W<$.length;W++){I=!0;let X=$[W];if(X==="."||X===".."||!this.options.dot&&X.charAt(0)===".")return!1}return I}let[G,H]=K;while(z<=H){if(this._matchOne($.slice(0,z+G.length),G,Q,z,0)&&JF?"":w?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",N=(j)=>j.charAt(0)==="."?"":z.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",M=()=>{if(G){switch(G){case"*":U+=wu,Q=!0;break;case"?":U+=Du,Q=!0;break;default:U+="\\"+G;break}this.debug("clearStateChar %j %j",G,U),G=!1}};for(let j=0,A;j<$.length&&(A=$.charAt(j));j++){if(this.debug("%s\t%s %s %j",$,j,U,A),J){if(A==="/")return!1;if(iH0[A])U+="\\";U+=A,J=!1;continue}switch(A){case"/":return!1;case"\\":if(H&&$.charAt(j+1)==="-"){U+=A;continue}M(),J=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",$,j,U,A),H){if(this.debug(" in class"),A==="!"&&j===X+1)A="^";U+=A;continue}if(A==="*"&&G==="*")continue;if(this.debug("call clearStateChar %j",G),M(),G=A,z.noext)M();continue;case"(":{if(H){U+="(";continue}if(!G){U+="\\(";continue}let T={type:G,start:j-1,reStart:U.length,open:bH0[G].open,close:bH0[G].close};if(this.debug(this.pattern,"\t",T),I.push(T),U+=T.open,T.start===0&&T.type!=="!")F=!0,U+=N($.slice(j+1));this.debug("plType %j %j",G,U),G=!1;continue}case")":{let T=I[I.length-1];if(H||!T){U+="\\)";continue}if(I.pop(),M(),Q=!0,q=T,U+=q.close,q.type==="!")K.push(Object.assign(q,{reEnd:U.length}));continue}case"|":{let T=I[I.length-1];if(H||!T){U+="\\|";continue}if(M(),U+="|",T.start===0&&T.type!=="!")F=!0,U+=N($.slice(j+1));continue}case"[":if(M(),H){U+="\\"+A;continue}H=!0,X=j,W=U.length,U+=A;continue;case"]":if(j===X+1||!H){U+="\\"+A;continue}Z=$.substring(X+1,j);try{RegExp("["+wU1(FU1(Z))+"]"),U+=A}catch(T){U=U.substring(0,W)+"(?:$.)"}Q=!0,H=!1;continue;default:if(M(),iH0[A]&&!(A==="^"&&H))U+="\\";U+=A;break}}if(H)Z=$.slice(X+1),V=this.parse(Z,Mu),U=U.substring(0,W)+"\\["+V[0],Q=Q||V[1];for(q=I.pop();q;q=I.pop()){let j;j=U.slice(q.reStart+q.open.length),this.debug("setting tail",U,q),j=j.replace(/((?:\\{2}){0,64})(\\?)\|/g,(T,C,b)=>{if(!b)b="\\";return C+C+b+"|"}),this.debug(`tail=%j + %s`,j,j,q,U);let A=q.type==="*"?wu:q.type==="?"?Du:"\\"+q.type;Q=!0,U=U.slice(0,q.reStart)+A+"\\("+j}if(M(),J)U+="\\\\";let D=qU1[U.charAt(0)];for(let j=K.length-1;j>-1;j--){let A=K[j],T=U.slice(0,A.reStart),C=U.slice(A.reStart,A.reEnd-8),b=U.slice(A.reEnd),k=U.slice(A.reEnd-8,A.reEnd)+b,S=T.split(")").length,i=T.split("(").length-S,n=b;for(let x=0;x{return J=J.map((I)=>typeof I==="string"?OU1(I):I===_8?_8:I._src).reduce((I,K)=>{if(!(I[I.length-1]===_8&&K===_8))I.push(K);return I},[]),J.forEach((I,K)=>{if(I!==_8||J[K-1]===_8)return;if(K===0)if(J.length>1)J[K+1]="(?:\\/|"+z+"\\/)?"+J[K+1];else J[K]=z;else if(K===J.length-1)J[K-1]+="(?:\\/|"+z+")?";else J[K-1]+="(?:\\/|\\/"+z+"\\/)"+J[K+1],J[K+1]=_8}),J.filter((I)=>I!==_8).join("/")}).join("|");if(Q="^(?:"+Q+")$",this.negate)Q="^(?!"+Q+").*$";try{this.regexp=new RegExp(Q,U)}catch(J){this.regexp=!1}return this.regexp}match($,Y=this.partial){if(this.debug("match",$,this.pattern),this.comment)return!1;if(this.empty)return $==="";if($==="/"&&Y)return!0;let z=this.options;if(Nu.sep!=="/")$=$.split(Nu.sep).join("/");$=$.split(nH0),this.debug(this.pattern,"split",$);let U=this.set;this.debug(this.pattern,"set",U);let Q;for(let J=$.length-1;J>=0;J--)if(Q=$[J],Q)break;for(let J=0;J{rH0.exports=oH0;var Pu=I0("fs"),{EventEmitter:MU1}=I0("events"),{Minimatch:Bu}=dH0(),{resolve:NU1}=I0("path");function DU1($,Y){return new Promise((z,U)=>{Pu.readdir($,{withFileTypes:!0},(Q,J)=>{if(Q)switch(Q.code){case"ENOTDIR":if(Y)U(Q);else z([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":z([]);break;case"ELOOP":default:U(Q);break}else z(J)})})}function mH0($,Y){return new Promise((z,U)=>{(Y?Pu.stat:Pu.lstat)($,(J,I)=>{if(J)switch(J.code){case"ENOENT":if(Y)z(mH0($,!1));else z(null);break;default:z(null);break}else z(I)})})}async function*lH0($,Y,z,U,Q,J){let I=await DU1(Y+$,J);for(let K of I){let G=K.name;if(G===void 0)G=K,U=!0;let H=$+"/"+G,W=H.slice(1),X=Y+"/"+W,Z=null;if(U||z)Z=await mH0(X,z);if(!Z&&K.name!==void 0)Z=K;if(Z===null)Z={isDirectory:()=>!1};if(Z.isDirectory()){if(!Q(W))yield{relative:W,absolute:X,stats:Z},yield*lH0(H,Y,z,U,Q,!1)}else yield{relative:W,absolute:X,stats:Z}}}async function*AU1($,Y,z,U){yield*lH0("",$,Y,z,U,!0)}function BU1($){return{pattern:$.pattern,dot:!!$.dot,noglobstar:!!$.noglobstar,matchBase:!!$.matchBase,nocase:!!$.nocase,ignore:$.ignore,skip:$.skip,follow:!!$.follow,stat:!!$.stat,nodir:!!$.nodir,mark:!!$.mark,silent:!!$.silent,absolute:!!$.absolute}}class ju extends MU1{constructor($,Y,z){super();if(typeof Y==="function")z=Y,Y=null;if(this.options=BU1(Y||{}),this.matchers=[],this.options.pattern){let U=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=U.map((Q)=>new Bu(Q,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let U=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=U.map((Q)=>new Bu(Q,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let U=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=U.map((Q)=>new Bu(Q,{dot:!0}))}if(this.iterator=AU1(NU1($||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,z)this._matches=[],this.on("match",(U)=>this._matches.push(this.options.absolute?U.absolute:U.relative)),this.on("error",(U)=>z(U)),this.on("end",()=>z(null,this._matches));setTimeout(()=>this._next(),0)}_shouldSkipDirectory($){return this.skipMatchers.some((Y)=>Y.match($))}_fileMatches($,Y){let z=$+(Y?"/":"");return(this.matchers.length===0||this.matchers.some((U)=>U.match(z)))&&!this.ignoreMatchers.some((U)=>U.match(z))&&(!this.options.nodir||!Y)}_next(){if(!this.paused&&!this.aborted)this.iterator.next().then(($)=>{if(!$.done){let Y=$.value.stats.isDirectory();if(this._fileMatches($.value.relative,Y)){let z=$.value.relative,U=$.value.absolute;if(this.options.mark&&Y)z+="/",U+="/";if(this.options.stat)this.emit("match",{relative:z,absolute:U,stat:$.value.stats});else this.emit("match",{relative:z,absolute:U})}this._next(this.iterator)}else this.emit("end")}).catch(($)=>{if(this.abort(),this.emit("error",$),!$.code&&!this.options.silent)console.error($)});else this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){if(this.paused=!1,this.inactive)this.inactive=!1,this._next()}}function oH0($,Y,z){return new ju($,Y,z)}oH0.ReaddirGlob=ju});var Tu=E((BD,aH0)=>{(function($,Y){typeof BD==="object"&&typeof aH0<"u"?Y(BD):typeof define==="function"&&define.amd?define(["exports"],Y):($=typeof globalThis<"u"?globalThis:$||self,Y($.async={}))})(BD,function($){function Y(f,...c){return(...o)=>f(...c,...o)}function z(f){return function(...c){var o=c.pop();return f.call(this,c,o)}}var U=typeof queueMicrotask==="function"&&queueMicrotask,Q=typeof setImmediate==="function"&&setImmediate,J=typeof process==="object"&&typeof process.nextTick==="function";function I(f){setTimeout(f,0)}function K(f){return(c,...o)=>f(()=>c(...o))}var G;if(U)G=queueMicrotask;else if(Q)G=setImmediate;else if(J)G=process.nextTick;else G=I;var H=K(G);function W(f){if(q(f))return function(...c){let o=c.pop(),K0=f.apply(this,c);return X(K0,o)};return z(function(c,o){var K0;try{K0=f.apply(this,c)}catch(O0){return o(O0)}if(K0&&typeof K0.then==="function")return X(K0,o);else o(null,K0)})}function X(f,c){return f.then((o)=>{Z(c,null,o)},(o)=>{Z(c,o&&(o instanceof Error||o.message)?o:Error(o))})}function Z(f,c,o){try{f(c,o)}catch(K0){H((O0)=>{throw O0},K0)}}function q(f){return f[Symbol.toStringTag]==="AsyncFunction"}function V(f){return f[Symbol.toStringTag]==="AsyncGenerator"}function F(f){return typeof f[Symbol.asyncIterator]==="function"}function w(f){if(typeof f!=="function")throw Error("expected a function");return q(f)?W(f):f}function O(f,c){if(!c)c=f.length;if(!c)throw Error("arity is undefined");function o(...K0){if(typeof K0[c-1]==="function")return f.apply(this,K0);return new Promise((O0,D0)=>{K0[c-1]=(P0,...j0)=>{if(P0)return D0(P0);O0(j0.length>1?j0:j0[0])},f.apply(this,K0)})}return o}function N(f){return function(o,...K0){return O(function(D0){var P0=this;return f(o,(j0,h0)=>{w(j0).apply(P0,K0.concat(h0))},D0)})}}function M(f,c,o,K0){c=c||[];var O0=[],D0=0,P0=w(o);return f(c,(j0,h0,z1)=>{var x1=D0++;P0(j0,(m1,i1)=>{O0[x1]=i1,z1(m1)})},(j0)=>{K0(j0,O0)})}function D(f){return f&&typeof f.length==="number"&&f.length>=0&&f.length%1===0}let P={};function j(f){function c(...o){if(f===null)return;var K0=f;f=null,K0.apply(this,o)}return Object.assign(c,f),c}function A(f){return f[Symbol.iterator]&&f[Symbol.iterator]()}function T(f){var c=-1,o=f.length;return function(){return++c=c||P0||O0)return;P0=!0,f.next().then(({value:i1,done:N$})=>{if(D0||O0)return;if(P0=!1,N$){if(O0=!0,j0<=0)K0(null);return}j0++,o(i1,h0,x1),h0++,z1()}).catch(m1)}function x1(i1,N$){if(j0-=1,D0)return;if(i1)return m1(i1);if(i1===!1){O0=!0,D0=!0;return}if(N$===P||O0&&j0<=0)return O0=!0,K0(null);z1()}function m1(i1){if(D0)return;P0=!1,O0=!0,K0(i1)}z1()}var n=(f)=>{return(c,o,K0)=>{if(K0=j(K0),f<=0)throw RangeError("concurrency limit cannot be less than 1");if(!c)return K0(null);if(V(c))return i(c,f,o,K0);if(F(c))return i(c[Symbol.asyncIterator](),f,o,K0);var O0=k(c),D0=!1,P0=!1,j0=0,h0=!1;function z1(m1,i1){if(P0)return;if(j0-=1,m1)D0=!0,K0(m1);else if(m1===!1)D0=!0,P0=!0;else if(i1===P||D0&&j0<=0)return D0=!0,K0(null);else if(!h0)x1()}function x1(){h0=!0;while(j01?O0:O0[0])}return o[G0]=new Promise((K0,O0)=>{f=K0,c=O0}),o}function e0(f,c,o){if(typeof c!=="number")o=c,c=null;o=j(o||f0());var K0=Object.keys(f).length;if(!K0)return o(null);if(!c)c=K0;var O0={},D0=0,P0=!1,j0=!1,h0=Object.create(null),z1=[],x1=[],m1={};Object.keys(f).forEach(($1)=>{var H1=f[$1];if(!Array.isArray(H1)){i1($1,[H1]),x1.push($1);return}var n1=H1.slice(0,H1.length-1),g4=n1.length;if(g4===0){i1($1,H1),x1.push($1);return}m1[$1]=g4,n1.forEach((h6)=>{if(!f[h6])throw Error("async.auto task `"+$1+"` has a non-existent dependency `"+h6+"` in "+n1.join(", "));cU(h6,()=>{if(g4--,g4===0)i1($1,H1)})})}),l1(),N$();function i1($1,H1){z1.push(()=>oK($1,H1))}function N$(){if(P0)return;if(z1.length===0&&D0===0)return o(null,O0);while(z1.length&&D0n1()),N$()}function oK($1,H1){if(j0)return;var n1=S((h6,...D$)=>{if(D0--,h6===!1){P0=!0;return}if(D$.length<2)[D$]=D$;if(h6){var pU={};if(Object.keys(O0).forEach((PY)=>{pU[PY]=O0[PY]}),pU[$1]=D$,j0=!0,h0=Object.create(null),P0)return;o(h6,pU)}else O0[$1]=D$,BY($1)});D0++;var g4=w(H1[H1.length-1]);if(H1.length>1)g4(O0,n1);else g4(n1)}function l1(){var $1,H1=0;while(x1.length)$1=x1.pop(),H1++,G1($1).forEach((n1)=>{if(--m1[n1]===0)x1.push(n1)});if(H1!==K0)throw Error("async.auto cannot execute tasks due to a recursive dependency")}function G1($1){var H1=[];return Object.keys(f).forEach((n1)=>{let g4=f[n1];if(Array.isArray(g4)&&g4.indexOf($1)>=0)H1.push(n1)}),H1}return o[G0]}var s=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,H0=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,F0=/,/,b0=/(=.+)?(\s*)$/;function i0(f){let c="",o=0,K0=f.indexOf("*/");while(oO0.replace(b0,"").trim())}function w1(f,c){var o={};return Object.keys(f).forEach((K0)=>{var O0=f[K0],D0,P0=q(O0),j0=!P0&&O0.length===1||P0&&O0.length===0;if(Array.isArray(O0))D0=[...O0],O0=D0.pop(),o[K0]=D0.concat(D0.length>0?h0:O0);else if(j0)o[K0]=O0;else{if(D0=n0(O0),O0.length===0&&!P0&&D0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!P0)D0.pop();o[K0]=D0.concat(h0)}function h0(z1,x1){var m1=D0.map((i1)=>z1[i1]);m1.push(x1),w(O0)(...m1)}}),e0(o,c)}class k1{constructor(){this.head=this.tail=null,this.length=0}removeLink(f){if(f.prev)f.prev.next=f.next;else this.head=f.next;if(f.next)f.next.prev=f.prev;else this.tail=f.prev;return f.prev=f.next=null,this.length-=1,f}empty(){while(this.head)this.shift();return this}insertAfter(f,c){if(c.prev=f,c.next=f.next,f.next)f.next.prev=c;else this.tail=c;f.next=c,this.length+=1}insertBefore(f,c){if(c.prev=f.prev,c.next=f,f.prev)f.prev.next=c;else this.head=c;f.prev=c,this.length+=1}unshift(f){if(this.head)this.insertBefore(this.head,f);else u1(this,f)}push(f){if(this.tail)this.insertAfter(this.tail,f);else u1(this,f)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var f=this.head;while(f)yield f.data,f=f.next}remove(f){var c=this.head;while(c){var{next:o}=c;if(f(c))this.removeLink(c);c=o}return this}}function u1(f,c){f.length=1,f.head=f.tail=c}function b1(f,c,o){if(c==null)c=1;else if(c===0)throw RangeError("Concurrency must not be zero");var K0=w(f),O0=0,D0=[];let P0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function j0(G1,$1){P0[G1].push($1)}function h0(G1,$1){let H1=(...n1)=>{z1(G1,H1),$1(...n1)};P0[G1].push(H1)}function z1(G1,$1){if(!G1)return Object.keys(P0).forEach((H1)=>P0[H1]=[]);if(!$1)return P0[G1]=[];P0[G1]=P0[G1].filter((H1)=>H1!==$1)}function x1(G1,...$1){P0[G1].forEach((H1)=>H1(...$1))}var m1=!1;function i1(G1,$1,H1,n1){if(n1!=null&&typeof n1!=="function")throw Error("task callback must be a function");l1.started=!0;var g4,h6;function D$(PY,...rK){if(PY)return H1?h6(PY):g4();if(rK.length<=1)return g4(rK[0]);g4(rK)}var pU=l1._createTaskItem(G1,H1?D$:n1||D$);if($1)l1._tasks.unshift(pU);else l1._tasks.push(pU);if(!m1)m1=!0,H(()=>{m1=!1,l1.process()});if(H1||!n1)return new Promise((PY,rK)=>{g4=PY,h6=rK})}function N$(G1){return function($1,...H1){O0-=1;for(var n1=0,g4=G1.length;n10)D0.splice(D$,1);if(h6.callback($1,...H1),$1!=null)x1("error",$1,h6.data)}if(O0<=l1.concurrency-l1.buffer)x1("unsaturated");if(l1.idle())x1("drain");l1.process()}}function cU(G1){if(G1.length===0&&l1.idle())return H(()=>x1("drain")),!0;return!1}let BY=(G1)=>($1)=>{if(!$1)return new Promise((H1,n1)=>{h0(G1,(g4,h6)=>{if(g4)return n1(g4);H1(h6)})});z1(G1),j0(G1,$1)};var oK=!1,l1={_tasks:new k1,_createTaskItem(G1,$1){return{data:G1,callback:$1}},*[Symbol.iterator](){yield*l1._tasks[Symbol.iterator]()},concurrency:c,payload:o,buffer:c/4,started:!1,paused:!1,push(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!1,!1,$1))}return i1(G1,!1,!1,$1)},pushAsync(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!1,!0,$1))}return i1(G1,!1,!0,$1)},kill(){z1(),l1._tasks.empty()},unshift(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!0,!1,$1))}return i1(G1,!0,!1,$1)},unshiftAsync(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!0,!0,$1))}return i1(G1,!0,!0,$1)},remove(G1){l1._tasks.remove(G1)},process(){if(oK)return;oK=!0;while(!l1.paused&&O0{O0(c,D0,(h0,z1)=>{c=z1,j0(h0)})},(D0)=>K0(D0,c))}var v=O(B,4);function u(...f){var c=f.map(w);return function(...o){var K0=this,O0=o[o.length-1];if(typeof O0=="function")o.pop();else O0=f0();return v(c,o,(D0,P0,j0)=>{P0.apply(K0,D0.concat((h0,...z1)=>{j0(h0,z1)}))},(D0,P0)=>O0(D0,...P0)),O0[G0]}}function s(...f){return u(...f.reverse())}function X0(f,c,o,K0){return M(n(c),f,o,K0)}var J0=O(X0,4);function q0(f,c,o,K0){var O0=w(o);return J0(f,c,(D0,P0)=>{O0(D0,(j0,...h0)=>{if(j0)return P0(j0);return P0(j0,h0)})},(D0,P0)=>{var j0=[];for(var h0=0;h0{var P0=!1,j0;let h0=w(O0);o(K0,(z1,x1,m1)=>{h0(z1,(i1,N$)=>{if(i1||i1===!1)return m1(i1);if(f(N$)&&!j0)return P0=!0,j0=c(!0,z1),m1(null,P);m1()})},(z1)=>{if(z1)return D0(z1);D0(null,P0?j0:c(!1))})}}function u4(f,c,o){return S1((K0)=>K0,(K0,O0)=>O0)(y,f,c,o)}var N8=O(u4,3);function $$(f,c,o,K0){return S1((O0)=>O0,(O0,D0)=>D0)(n(c),f,o,K0)}var v5=O($$,4);function a3(f,c,o){return S1((K0)=>K0,(K0,O0)=>O0)(n(1),f,c,o)}var M$=O(a3,3);function y9(f){return(c,...o)=>w(c)(...o,(K0,...O0)=>{if(typeof console==="object"){if(K0){if(console.error)console.error(K0)}else if(console[f])O0.forEach((D0)=>console[f](D0))}})}var k9=y9("dir");function t3(f,c,o){o=S(o);var K0=w(f),O0=w(c),D0;function P0(h0,...z1){if(h0)return o(h0);if(h0===!1)return;D0=z1,O0(...z1,j0)}function j0(h0,z1){if(h0)return o(h0);if(h0===!1)return;if(!z1)return o(null,...D0);K0(P0)}return j0(null,!0)}var s4=O(t3,3);function e3(f,c,o){let K0=w(c);return s4(f,(...O0)=>{let D0=O0.pop();K0(...O0,(P0,j0)=>D0(P0,!j0))},o)}function zY(f){return(c,o,K0)=>f(c,K0)}function $7(f,c,o){return y(f,zY(w(c)),o)}var h5=O($7,3);function UY(f,c,o,K0){return n(c)(f,zY(w(o)),K0)}var e$=O(UY,4);function QY(f,c,o){return e$(f,1,c,o)}var $5=O(QY,3);function x9(f){if(q(f))return f;return function(...c){var o=c.pop(),K0=!0;c.push((...O0)=>{if(K0)H(()=>o(...O0));else o(...O0)}),f.apply(this,c),K0=!1}}function JY(f,c,o){return S1((K0)=>!K0,(K0)=>!K0)(y,f,c,o)}var f9=O(JY,3);function IY(f,c,o,K0){return S1((O0)=>!O0,(O0)=>!O0)(n(c),f,o,K0)}var Y$=O(IY,4);function KY(f,c,o){return S1((K0)=>!K0,(K0)=>!K0)($0,f,c,o)}var S5=O(KY,3);function GY(f,c,o,K0){var O0=Array(c.length);f(c,(D0,P0,j0)=>{o(D0,(h0,z1)=>{O0[P0]=!!z1,j0(h0)})},(D0)=>{if(D0)return K0(D0);var P0=[];for(var j0=0;j0{o(D0,(h0,z1)=>{if(h0)return j0(h0);if(z1)O0.push({index:P0,value:D0});j0(h0)})},(D0)=>{if(D0)return K0(D0);K0(null,O0.sort((P0,j0)=>P0.index-j0.index).map((P0)=>P0.value))})}function g5(f,c,o,K0){var O0=D(c)?GY:HY;return O0(f,c,w(o),K0)}function WY(f,c,o){return g5(y,f,c,o)}var y5=O(WY,3);function XY(f,c,o,K0){return g5(n(c),f,o,K0)}var k5=O(XY,4);function ZY(f,c,o){return g5($0,f,c,o)}var x5=O(ZY,3);function qY(f,c){var o=S(c),K0=w(x9(f));function O0(D0){if(D0)return o(D0);if(D0===!1)return;K0(O0)}return O0()}var f5=O(qY,2);function u9(f,c,o,K0){var O0=w(o);return J0(f,c,(D0,P0)=>{O0(D0,(j0,h0)=>{if(j0)return P0(j0);return P0(j0,{key:h0,val:D0})})},(D0,P0)=>{var j0={},{hasOwnProperty:h0}=Object.prototype;for(var z1=0;z1{D0(P0,j0,(z1,x1)=>{if(z1)return h0(z1);O0[j0]=x1,h0(z1)})},(P0)=>K0(P0,O0))}var K8=O(LY,4);function FY(f,c,o){return K8(f,1/0,c,o)}function OY(f,c,o){return K8(f,1,c,o)}function wY(f,c=(o)=>o){var o=Object.create(null),K0=Object.create(null),O0=w(f),D0=z((P0,j0)=>{var h0=c(...P0);if(h0 in o)H(()=>j0(null,...o[h0]));else if(h0 in K0)K0[h0].push(j0);else K0[h0]=[j0],O0(...P0,(z1,...x1)=>{if(!z1)o[h0]=x1;var m1=K0[h0];delete K0[h0];for(var i1=0,N$=m1.length;i1{var K0=D(c)?[]:{};f(c,(O0,D0,P0)=>{w(O0)((j0,...h0)=>{if(h0.length<2)[h0]=h0;K0[D0]=h0,P0(j0)})},(O0)=>o(O0,K0))},3);function NY(f,c){return Y7(y,f,c)}function z7(f,c,o){return Y7(n(c),f,o)}function U7(f,c){var o=w(f);return b1((K0,O0)=>{o(K0[0],O0)},c,1)}class DY{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(f){let c;while(f>0&&I7(this.heap[f],this.heap[c=J7(f)])){let o=this.heap[f];this.heap[f]=this.heap[c],this.heap[c]=o,f=c}}percDown(f){let c;while((c=Q7(f))=0;o--)this.percDown(o);return this}}function Q7(f){return(f<<1)+1}function J7(f){return(f+1>>1)-1}function I7(f,c){if(f.priority!==c.priority)return f.priority{return{data:P0,priority:j0,callback:h0}};function D0(P0,j0){if(!Array.isArray(P0))return{data:P0,priority:j0};return P0.map((h0)=>{return{data:h0,priority:j0}})}return o.push=function(P0,j0=0,h0){return K0(D0(P0,j0),h0)},o.pushAsync=function(P0,j0=0,h0){return O0(D0(P0,j0),h0)},delete o.unshift,delete o.unshiftAsync,o}function nU(f,c){if(c=j(c),!Array.isArray(f))return c(TypeError("First argument to race must be an array of functions"));if(!f.length)return c();for(var o=0,K0=f.length;o{let j0={};if(D0)j0.error=D0;if(P0.length>0){var h0=P0;if(P0.length<=1)[h0]=P0;j0.value=h0}O0(null,j0)}),c.apply(this,K0)})}function u5(f){var c;if(Array.isArray(f))c=f.map(n9);else c={},Object.keys(f).forEach((o)=>{c[o]=n9.call(this,f[o])});return c}function b5(f,c,o,K0){let O0=w(o);return g5(f,c,(D0,P0)=>{O0(D0,(j0,h0)=>{P0(j0,!h0)})},K0)}function K7(f,c,o){return b5(y,f,c,o)}var c9=O(K7,3);function pK(f,c,o,K0){return b5(n(c),f,o,K0)}var p6=O(pK,4);function b4(f,c,o){return b5($0,f,c,o)}var i5=O(b4,3);function N6(f){return function(){return f}}let dK=5,mK=0;function pq(f,c,o){var K0={times:dK,intervalFunc:N6(mK)};if(arguments.length<3&&typeof f==="function")o=c||f0(),c=f;else Cy0(K0,f),o=o||f0();if(typeof c!=="function")throw Error("Invalid arguments for async.retry");var O0=w(c),D0=1;function P0(){O0((j0,...h0)=>{if(j0===!1)return;if(j0&&D0++{if(O0.lengthK0)(y,f,c,o)}var dq=O(Ry0,3);function _y0(f,c,o,K0){return S1(Boolean,(O0)=>O0)(n(c),f,o,K0)}var mq=O(_y0,4);function vy0(f,c,o){return S1(Boolean,(K0)=>K0)($0,f,c,o)}var lq=O(vy0,3);function hy0(f,c,o){var K0=w(c);return Y0(f,(D0,P0)=>{K0(D0,(j0,h0)=>{if(j0)return P0(j0);P0(j0,{value:D0,criteria:h0})})},(D0,P0)=>{if(D0)return o(D0);o(null,P0.sort(O0).map((j0)=>j0.value))});function O0(D0,P0){var j0=D0.criteria,h0=P0.criteria;return j0h0?1:0}}var eo=O(hy0,3);function $r(f,c,o){var K0=w(f);return z((O0,D0)=>{var P0=!1,j0;function h0(){var z1=f.name||"anonymous",x1=Error('Callback function "'+z1+'" timed out.');if(x1.code="ETIMEDOUT",o)x1.info=o;P0=!0,D0(x1)}O0.push((...z1)=>{if(!P0)D0(...z1),clearTimeout(j0)}),j0=setTimeout(h0,c),K0(...O0)})}function Sy0(f){var c=Array(f);while(f--)c[f]=f;return c}function oq(f,c,o,K0){var O0=w(o);return J0(Sy0(f),c,O0,K0)}function Yr(f,c,o){return oq(f,1/0,c,o)}function zr(f,c,o){return oq(f,1,c,o)}function Ur(f,c,o,K0){if(arguments.length<=3&&typeof c==="function")K0=o,o=c,c=Array.isArray(f)?[]:{};K0=j(K0||f0());var O0=w(o);return y(f,(D0,P0,j0)=>{O0(c,D0,P0,j0)},(D0)=>K0(D0,c)),K0[G0]}function gy0(f,c){var o=null,K0;return $5(f,(O0,D0)=>{w(O0)((P0,...j0)=>{if(P0===!1)return D0(P0);if(j0.length<2)[K0]=j0;else K0=j0;o=P0,D0(P0?null:{})})},()=>c(o,K0))}var Qr=O(gy0);function Jr(f){return(...c)=>{return(f.unmemoized||f)(...c)}}function yy0(f,c,o){o=S(o);var K0=w(c),O0=w(f),D0=[];function P0(h0,...z1){if(h0)return o(h0);if(D0=z1,h0===!1)return;O0(j0)}function j0(h0,z1){if(h0)return o(h0);if(h0===!1)return;if(!z1)return o(null,...D0);K0(P0)}return O0(j0)}var lK=O(yy0,3);function Ir(f,c,o){let K0=w(f);return lK((O0)=>K0((D0,P0)=>O0(D0,!P0)),c,o)}function ky0(f,c){if(c=j(c),!Array.isArray(f))return c(Error("First argument to waterfall must be an array of functions"));if(!f.length)return c();var o=0;function K0(D0){var P0=w(f[o++]);P0(...D0,S(O0))}function O0(D0,...P0){if(D0===!1)return;if(D0||o===f.length)return c(D0,...P0);K0(P0)}K0([])}var Kr=O(ky0),xy0={apply:Y,applyEach:g,applyEachSeries:v0,asyncify:W,auto:e0,autoInject:w1,cargo:A0,cargoQueue:Q0,compose:s,concat:r0,concatLimit:w0,concatSeries:U1,constant:A1,detect:N8,detectLimit:v5,detectSeries:M$,dir:k9,doUntil:e3,doWhilst:s4,each:h5,eachLimit:e$,eachOf:y,eachOfLimit:x,eachOfSeries:$0,eachSeries:$5,ensureAsync:x9,every:f9,everyLimit:Y$,everySeries:S5,filter:y5,filterLimit:k5,filterSeries:x5,forever:f5,groupBy:VY,groupByLimit:b9,groupBySeries:J8,log:I8,map:Y0,mapLimit:J0,mapSeries:T0,mapValues:FY,mapValuesLimit:K8,mapValuesSeries:OY,memoize:wY,nextTick:MY,parallel:NY,parallelLimit:z7,priorityQueue:AY,queue:U7,race:Y5,reduce:v,reduceRight:M6,reflect:n9,reflectAll:u5,reject:c9,rejectLimit:p6,rejectSeries:i5,retry:pq,retryable:ao,seq:u,series:to,setImmediate:H,some:dq,someLimit:mq,someSeries:lq,sortBy:eo,timeout:$r,times:Yr,timesLimit:oq,timesSeries:zr,transform:Ur,tryEach:Qr,unmemoize:Jr,until:Ir,waterfall:Kr,whilst:lK,all:f9,allLimit:Y$,allSeries:S5,any:dq,anyLimit:mq,anySeries:lq,find:N8,findLimit:v5,findSeries:M$,flatMap:r0,flatMapLimit:w0,flatMapSeries:U1,forEach:h5,forEachSeries:$5,forEachLimit:e$,forEachOf:y,forEachOfSeries:$0,forEachOfLimit:x,inject:v,foldl:v,foldr:M6,select:y5,selectLimit:k5,selectSeries:x5,wrapSync:W,during:lK,doDuring:s4};$.all=f9,$.allLimit=Y$,$.allSeries=S5,$.any=dq,$.anyLimit=mq,$.anySeries=lq,$.apply=Y,$.applyEach=g,$.applyEachSeries=v0,$.asyncify=W,$.auto=e0,$.autoInject=w1,$.cargo=A0,$.cargoQueue=Q0,$.compose=s,$.concat=r0,$.concatLimit=w0,$.concatSeries=U1,$.constant=A1,$.default=xy0,$.detect=N8,$.detectLimit=v5,$.detectSeries=M$,$.dir=k9,$.doDuring=s4,$.doUntil=e3,$.doWhilst=s4,$.during=lK,$.each=h5,$.eachLimit=e$,$.eachOf=y,$.eachOfLimit=x,$.eachOfSeries=$0,$.eachSeries=$5,$.ensureAsync=x9,$.every=f9,$.everyLimit=Y$,$.everySeries=S5,$.filter=y5,$.filterLimit=k5,$.filterSeries=x5,$.find=N8,$.findLimit=v5,$.findSeries=M$,$.flatMap=r0,$.flatMapLimit=w0,$.flatMapSeries=U1,$.foldl=v,$.foldr=M6,$.forEach=h5,$.forEachLimit=e$,$.forEachOf=y,$.forEachOfLimit=x,$.forEachOfSeries=$0,$.forEachSeries=$5,$.forever=f5,$.groupBy=VY,$.groupByLimit=b9,$.groupBySeries=J8,$.inject=v,$.log=I8,$.map=Y0,$.mapLimit=J0,$.mapSeries=T0,$.mapValues=FY,$.mapValuesLimit=K8,$.mapValuesSeries=OY,$.memoize=wY,$.nextTick=MY,$.parallel=NY,$.parallelLimit=z7,$.priorityQueue=AY,$.queue=U7,$.race=Y5,$.reduce=v,$.reduceRight=M6,$.reflect=n9,$.reflectAll=u5,$.reject=c9,$.rejectLimit=p6,$.rejectSeries=i5,$.retry=pq,$.retryable=ao,$.select=y5,$.selectLimit=k5,$.selectSeries=x5,$.seq=u,$.series=to,$.setImmediate=H,$.some=dq,$.someLimit=mq,$.someSeries=lq,$.sortBy=eo,$.timeout=$r,$.times=Yr,$.timesLimit=oq,$.timesSeries=zr,$.transform=Ur,$.tryEach=Qr,$.unmemoize=Jr,$.until=Ir,$.waterfall=Kr,$.whilst=lK,$.wrapSync=W,Object.defineProperty($,"__esModule",{value:!0})})});var eH0=E((Bs1,tH0)=>{var V2=I0("constants"),PU1=process.cwd,PD=null,jU1=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!PD)PD=PU1.call(process);return PD};try{process.cwd()}catch($){}if(typeof process.chdir==="function"){if(jD=process.chdir,process.chdir=function($){PD=null,jD.call(process,$)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,jD)}var jD;tH0.exports=TU1;function TU1($){if(V2.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))Y($);if(!$.lutimes)z($);if($.chown=J($.chown),$.fchown=J($.fchown),$.lchown=J($.lchown),$.chmod=U($.chmod),$.fchmod=U($.fchmod),$.lchmod=U($.lchmod),$.chownSync=I($.chownSync),$.fchownSync=I($.fchownSync),$.lchownSync=I($.lchownSync),$.chmodSync=Q($.chmodSync),$.fchmodSync=Q($.fchmodSync),$.lchmodSync=Q($.lchmodSync),$.stat=K($.stat),$.fstat=K($.fstat),$.lstat=K($.lstat),$.statSync=G($.statSync),$.fstatSync=G($.fstatSync),$.lstatSync=G($.lstatSync),$.chmod&&!$.lchmod)$.lchmod=function(W,X,Z){if(Z)process.nextTick(Z)},$.lchmodSync=function(){};if($.chown&&!$.lchown)$.lchown=function(W,X,Z,q){if(q)process.nextTick(q)},$.lchownSync=function(){};if(jU1==="win32")$.rename=typeof $.rename!=="function"?$.rename:function(W){function X(Z,q,V){var F=Date.now(),w=0;W(Z,q,function O(N){if(N&&(N.code==="EACCES"||N.code==="EPERM"||N.code==="EBUSY")&&Date.now()-F<60000){if(setTimeout(function(){$.stat(q,function(M,D){if(M&&M.code==="ENOENT")W(Z,q,O);else V(N)})},w),w<100)w+=10;return}if(V)V(N)})}if(Object.setPrototypeOf)Object.setPrototypeOf(X,W);return X}($.rename);$.read=typeof $.read!=="function"?$.read:function(W){function X(Z,q,V,F,w,O){var N;if(O&&typeof O==="function"){var M=0;N=function(D,P,j){if(D&&D.code==="EAGAIN"&&M<10)return M++,W.call($,Z,q,V,F,w,N);O.apply(this,arguments)}}return W.call($,Z,q,V,F,w,N)}if(Object.setPrototypeOf)Object.setPrototypeOf(X,W);return X}($.read),$.readSync=typeof $.readSync!=="function"?$.readSync:function(W){return function(X,Z,q,V,F){var w=0;while(!0)try{return W.call($,X,Z,q,V,F)}catch(O){if(O.code==="EAGAIN"&&w<10){w++;continue}throw O}}}($.readSync);function Y(W){W.lchmod=function(X,Z,q){W.open(X,V2.O_WRONLY|V2.O_SYMLINK,Z,function(V,F){if(V){if(q)q(V);return}W.fchmod(F,Z,function(w){W.close(F,function(O){if(q)q(w||O)})})})},W.lchmodSync=function(X,Z){var q=W.openSync(X,V2.O_WRONLY|V2.O_SYMLINK,Z),V=!0,F;try{F=W.fchmodSync(q,Z),V=!1}finally{if(V)try{W.closeSync(q)}catch(w){}else W.closeSync(q)}return F}}function z(W){if(V2.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(X,Z,q,V){W.open(X,V2.O_SYMLINK,function(F,w){if(F){if(V)V(F);return}W.futimes(w,Z,q,function(O){W.close(w,function(N){if(V)V(O||N)})})})},W.lutimesSync=function(X,Z,q){var V=W.openSync(X,V2.O_SYMLINK),F,w=!0;try{F=W.futimesSync(V,Z,q),w=!1}finally{if(w)try{W.closeSync(V)}catch(O){}else W.closeSync(V)}return F};else if(W.futimes)W.lutimes=function(X,Z,q,V){if(V)process.nextTick(V)},W.lutimesSync=function(){}}function U(W){if(!W)return W;return function(X,Z,q){return W.call($,X,Z,function(V){if(H(V))V=null;if(q)q.apply(this,arguments)})}}function Q(W){if(!W)return W;return function(X,Z){try{return W.call($,X,Z)}catch(q){if(!H(q))throw q}}}function J(W){if(!W)return W;return function(X,Z,q,V){return W.call($,X,Z,q,function(F){if(H(F))F=null;if(V)V.apply(this,arguments)})}}function I(W){if(!W)return W;return function(X,Z,q){try{return W.call($,X,Z,q)}catch(V){if(!H(V))throw V}}}function K(W){if(!W)return W;return function(X,Z,q){if(typeof Z==="function")q=Z,Z=null;function V(F,w){if(w){if(w.uid<0)w.uid+=4294967296;if(w.gid<0)w.gid+=4294967296}if(q)q.apply(this,arguments)}return Z?W.call($,X,Z,V):W.call($,X,V)}}function G(W){if(!W)return W;return function(X,Z){var q=Z?W.call($,X,Z):W.call($,X);if(q){if(q.uid<0)q.uid+=4294967296;if(q.gid<0)q.gid+=4294967296}return q}}function H(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var X=!process.getuid||process.getuid()!==0;if(X){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var zW0=E((Ps1,YW0)=>{var $W0=I0("stream").Stream;YW0.exports=EU1;function EU1($){return{ReadStream:Y,WriteStream:z};function Y(U,Q){if(!(this instanceof Y))return new Y(U,Q);$W0.call(this);var J=this;this.path=U,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var I=Object.keys(Q);for(var K=0,G=I.length;Kthis.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){J._read()});return}$.open(this.path,this.flags,this.mode,function(W,X){if(W){J.emit("error",W),J.readable=!1;return}J.fd=X,J.emit("open",X),J._read()})}function z(U,Q){if(!(this instanceof z))return new z(U,Q);$W0.call(this),this.path=U,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var J=Object.keys(Q);for(var I=0,K=J.length;I= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=$.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var QW0=E((js1,UW0)=>{UW0.exports=RU1;var CU1=Object.getPrototypeOf||function($){return $.__proto__};function RU1($){if($===null||typeof $!=="object")return $;if($ instanceof Object)var Y={__proto__:CU1($)};else var Y=Object.create(null);return Object.getOwnPropertyNames($).forEach(function(z){Object.defineProperty(Y,z,Object.getOwnPropertyDescriptor($,z))}),Y}});var o8=E((Ts1,_u)=>{var d4=I0("fs"),_U1=eH0(),vU1=zW0(),hU1=QW0(),TD=I0("util"),a6,CD;if(typeof Symbol==="function"&&typeof Symbol.for==="function")a6=Symbol.for("graceful-fs.queue"),CD=Symbol.for("graceful-fs.previous");else a6="___graceful-fs.queue",CD="___graceful-fs.previous";function SU1(){}function IW0($,Y){Object.defineProperty($,a6,{get:function(){return Y}})}var _z=SU1;if(TD.debuglog)_z=TD.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))_z=function(){var $=TD.format.apply(TD,arguments);$="GFS4: "+$.split(/\n/).join(` -GFS4: `),console.error($)};if(!d4[a6]){if(Eu=global[a6]||[],IW0(d4,Eu),d4.close=function($){function Y(z,U){return $.call(d4,z,function(Q){if(!Q)JW0();if(typeof U==="function")U.apply(this,arguments)})}return Object.defineProperty(Y,CD,{value:$}),Y}(d4.close),d4.closeSync=function($){function Y(z){$.apply(d4,arguments),JW0()}return Object.defineProperty(Y,CD,{value:$}),Y}(d4.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){_z(d4[a6]),I0("assert").equal(d4[a6].length,0)})}var Eu;if(!global[a6])IW0(global,d4[a6]);_u.exports=Cu(hU1(d4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!d4.__patched)_u.exports=Cu(d4),d4.__patched=!0;function Cu($){_U1($),$.gracefulify=Cu,$.createReadStream=P,$.createWriteStream=j;var Y=$.readFile;$.readFile=z;function z(C,b,k){if(typeof b==="function")k=b,b=null;return S(C,b,k);function S(i,n,U0,x){return Y(i,n,function(d){if(d&&(d.code==="EMFILE"||d.code==="ENFILE"))GI([S,[i,n,U0],d,x||Date.now(),Date.now()]);else if(typeof U0==="function")U0.apply(this,arguments)})}}var U=$.writeFile;$.writeFile=Q;function Q(C,b,k,S){if(typeof k==="function")S=k,k=null;return i(C,b,k,S);function i(n,U0,x,d,t){return U(n,U0,x,function(e){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}var J=$.appendFile;if(J)$.appendFile=I;function I(C,b,k,S){if(typeof k==="function")S=k,k=null;return i(C,b,k,S);function i(n,U0,x,d,t){return J(n,U0,x,function(e){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}var K=$.copyFile;if(K)$.copyFile=G;function G(C,b,k,S){if(typeof k==="function")S=k,k=0;return i(C,b,k,S);function i(n,U0,x,d,t){return K(n,U0,x,function(e){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}var H=$.readdir;$.readdir=X;var W=/^v[0-5]\./;function X(C,b,k){if(typeof b==="function")k=b,b=null;var S=W.test(process.version)?function(U0,x,d,t){return H(U0,i(U0,x,d,t))}:function(U0,x,d,t){return H(U0,x,i(U0,x,d,t))};return S(C,b,k);function i(n,U0,x,d){return function(t,e){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))GI([S,[n,U0,x],t,d||Date.now(),Date.now()]);else{if(e&&e.sort)e.sort();if(typeof x==="function")x.call(this,t,e)}}}}if(process.version.substr(0,4)==="v0.8"){var Z=vU1($);O=Z.ReadStream,M=Z.WriteStream}var q=$.ReadStream;if(q)O.prototype=Object.create(q.prototype),O.prototype.open=N;var V=$.WriteStream;if(V)M.prototype=Object.create(V.prototype),M.prototype.open=D;Object.defineProperty($,"ReadStream",{get:function(){return O},set:function(C){O=C},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return M},set:function(C){M=C},enumerable:!0,configurable:!0});var F=O;Object.defineProperty($,"FileReadStream",{get:function(){return F},set:function(C){F=C},enumerable:!0,configurable:!0});var w=M;Object.defineProperty($,"FileWriteStream",{get:function(){return w},set:function(C){w=C},enumerable:!0,configurable:!0});function O(C,b){if(this instanceof O)return q.apply(this,arguments),this;else return O.apply(Object.create(O.prototype),arguments)}function N(){var C=this;T(C.path,C.flags,C.mode,function(b,k){if(b){if(C.autoClose)C.destroy();C.emit("error",b)}else C.fd=k,C.emit("open",k),C.read()})}function M(C,b){if(this instanceof M)return V.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function D(){var C=this;T(C.path,C.flags,C.mode,function(b,k){if(b)C.destroy(),C.emit("error",b);else C.fd=k,C.emit("open",k)})}function P(C,b){return new $.ReadStream(C,b)}function j(C,b){return new $.WriteStream(C,b)}var A=$.open;$.open=T;function T(C,b,k,S){if(typeof k==="function")S=k,k=null;return i(C,b,k,S);function i(n,U0,x,d,t){return A(n,U0,x,function(e,y){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}return $}function GI($){_z("ENQUEUE",$[0].name,$[1]),d4[a6].push($),Ru()}var ED;function JW0(){var $=Date.now();for(var Y=0;Y2)d4[a6][Y][3]=$,d4[a6][Y][4]=$;Ru()}function Ru(){if(clearTimeout(ED),ED=void 0,d4[a6].length===0)return;var $=d4[a6].shift(),Y=$[0],z=$[1],U=$[2],Q=$[3],J=$[4];if(Q===void 0)_z("RETRY",Y.name,z),Y.apply(null,z);else if(Date.now()-Q>=60000){_z("TIMEOUT",Y.name,z);var I=z.pop();if(typeof I==="function")I.call(null,U)}else{var K=Date.now()-J,G=Math.max(J-Q,1),H=Math.min(G*1.2,100);if(K>=H)_z("RETRY",Y.name,z),Y.apply(null,z.concat([Q]));else d4[a6].push($)}if(ED===void 0)ED=setTimeout(Ru,0)}});var GW0=E((Es1,vu)=>{function gU1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var KW0=K6().Buffer,tW=I0("util");function yU1($,Y,z){$.copy(Y,z)}vu.exports=function(){function $(){gU1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return KW0.alloc(0);var U=KW0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)yU1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(tW&&tW.inspect&&tW.inspect.custom)vu.exports.prototype[tW.inspect.custom]=function(){var $=tW.inspect({length:this.length});return this.constructor.name+" "+$}});var hu=E((Cs1,HW0)=>{var RD=I6();function kU1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)RD.nextTick(_D,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,RD.nextTick(_D,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)RD.nextTick(_D,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,RD.nextTick(_D,z,J)}else if(Y)Y(J)}),this}function xU1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function _D($,Y){$.emit("error",Y)}HW0.exports={destroy:kU1,undestroy:xU1}});var gu=E((Rs1,OW0)=>{var vz=I6();OW0.exports=q6;function XW0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){YQ1(Y,$)}}var fU1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:vz.nextTick,HI;q6.WritableState=$X;var ZW0=Object.create(M4());ZW0.inherits=X1();var uU1={deprecate:f7()},qW0=I0("stream"),hD=K6().Buffer,bU1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function iU1($){return hD.from($)}function nU1($){return hD.isBuffer($)||$ instanceof bU1}var VW0=hu();ZW0.inherits(q6,qW0);function cU1(){}function $X($,Y){HI=HI||hz(),$=$||{};var z=Y instanceof HI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){sU1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new XW0(this)}$X.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty($X.prototype,"buffer",{get:uU1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var vD;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")vD=Function.prototype[Symbol.hasInstance],Object.defineProperty(q6,Symbol.hasInstance,{value:function($){if(vD.call(this,$))return!0;if(this!==q6)return!1;return $&&$._writableState instanceof $X}});else vD=function($){return $ instanceof this};function q6($){if(HI=HI||hz(),!vD.call(q6,this)&&!(this instanceof HI))return new q6($);if(this._writableState=new $X($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}qW0.call(this)}q6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function pU1($,Y){var z=Error("write after end");$.emit("error",z),vz.nextTick(Y,z)}function dU1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),vz.nextTick(U,J),Q=!1;return Q}q6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&nU1($);if(J&&!hD.isBuffer($))$=iU1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=cU1;if(U.ended)pU1(this,z);else if(J||dU1(this,U,$,z))U.pendingcb++,Q=lU1(this,U,J,$,Y,z);return Q};q6.prototype.cork=function(){var $=this._writableState;$.corked++};q6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)LW0(this,$)}};q6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function mU1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=hD.from(Y,z);return Y}Object.defineProperty(q6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function lU1($,Y,z,U,Q,J){if(!z){var I=mU1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var wW0=I6(),zQ1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};DW0.exports=N3;var MW0=Object.create(M4());MW0.inherits=X1();var NW0=ku(),yu=gu();MW0.inherits(N3,NW0);{SD=zQ1(yu.prototype);for(YX=0;YX{var fu=K6().Buffer,AW0=fu.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function JQ1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function IQ1($){var Y=JQ1($);if(typeof Y!=="string"&&(fu.isEncoding===AW0||!AW0($)))throw Error("Unknown encoding: "+$);return Y||$}wQ1.StringDecoder=UX;function UX($){this.encoding=IQ1($);var Y;switch(this.encoding){case"utf16le":this.text=ZQ1,this.end=qQ1,Y=4;break;case"utf8":this.fillLast=HQ1,Y=4;break;case"base64":this.text=VQ1,this.end=LQ1,Y=3;break;default:this.write=FQ1,this.end=OQ1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fu.allocUnsafe(Y)}UX.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};UX.prototype.end=XQ1;UX.prototype.text=WQ1;UX.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function xu($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function KQ1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function GQ1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function HQ1($){var Y=this.lastTotal-this.lastNeed,z=GQ1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function WQ1($,Y){var z=KQ1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function XQ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function ZQ1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function qQ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function VQ1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function LQ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function FQ1($){return $.toString(this.encoding)}function OQ1($){return $&&$.length?this.write($):""}});var ku=E((Ss1,gW0)=>{var XI=I6();gW0.exports=E4;var NQ1=$J(),QX;E4.ReadableState=RW0;var hs1=I0("events").EventEmitter,TW0=function($,Y){return $.listeners(Y).length},pu=I0("stream"),JX=K6().Buffer,DQ1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function AQ1($){return JX.from($)}function BQ1($){return JX.isBuffer($)||$ instanceof DQ1}var EW0=Object.create(M4());EW0.inherits=X1();var bu=I0("util"),e1=void 0;if(bu&&bu.debuglog)e1=bu.debuglog("stream");else e1=function(){};var PQ1=GW0(),CW0=hu(),WI;EW0.inherits(E4,pu);var iu=["error","close","destroy","pause","resume"];function jQ1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(NQ1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function RW0($,Y){QX=QX||hz(),$=$||{};var z=Y instanceof QX;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new PQ1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!WI)WI=uu().StringDecoder;this.decoder=new WI($.encoding),this.encoding=$.encoding}}function E4($){if(QX=QX||hz(),!(this instanceof E4))return new E4($);if(this._readableState=new RW0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}pu.call(this)}Object.defineProperty(E4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});E4.prototype.destroy=CW0.destroy;E4.prototype._undestroy=CW0.undestroy;E4.prototype._destroy=function($,Y){this.push(null),Y($)};E4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=JX.from($,Y),Y="";U=!0}}else U=!0;return _W0(this,$,Y,!1,U)};E4.prototype.unshift=function($){return _W0(this,$,null,!0,!1)};function _W0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,RQ1($,J);else{var I;if(!Q)I=TQ1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==JX.prototype)Y=AQ1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else nu($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)nu($,J,Y,!1);else vW0($,J);else nu($,J,Y,!1)}else if(!U)J.reading=!1}return EQ1(J)}function nu($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)gD($)}vW0($,Y)}function TQ1($,Y){var z;if(!BQ1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function EQ1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}E4.prototype.isPaused=function(){return this._readableState.flowing===!1};E4.prototype.setEncoding=function($){if(!WI)WI=uu().StringDecoder;return this._readableState.decoder=new WI($),this._readableState.encoding=$,this};var BW0=8388608;function CQ1($){if($>=BW0)$=BW0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function PW0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=CQ1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}E4.prototype.read=function($){e1("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(e1("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)cu(this);else gD(this);return null}if($=PW0($,Y),$===0&&Y.ended){if(Y.length===0)cu(this);return null}var U=Y.needReadable;if(e1("need readable",U),Y.length===0||Y.length-$0)Q=hW0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)cu(this)}if(Q!==null)this.emit("data",Q);return Q};function RQ1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,gD($)}function gD($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(e1("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)XI.nextTick(jW0,$);else jW0($)}function jW0($){e1("emit readable"),$.emit("readable"),du($)}function vW0($,Y){if(!Y.readingMore)Y.readingMore=!0,XI.nextTick(_Q1,$,Y)}function _Q1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&SW0(U.pipes,$)!==-1)&&!H)e1("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(e1("onerror",O),w(),$.removeListener("error",q),TW0($,"error")===0)$.emit("error",O)}jQ1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){e1("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){e1("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)e1("pipe resume"),z.resume();return $};function vQ1($){return function(){var Y=$._readableState;if(e1("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&TW0($,"data"))Y.flowing=!0,du($)}}E4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=yQ1($,Y.buffer,Y.decoder);return z}function yQ1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function xQ1($,Y){var z=JX.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function cu($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,XI.nextTick(fQ1,Y,$)}function fQ1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function SW0($,Y){for(var z=0,U=$.length;z{xW0.exports=D3;var yD=hz(),kW0=Object.create(M4());kW0.inherits=X1();kW0.inherits(D3,yD);function uQ1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{bW0.exports=IX;var fW0=mu(),uW0=Object.create(M4());uW0.inherits=X1();uW0.inherits(IX,fW0);function IX($){if(!(this instanceof IX))return new IX($);fW0.call(this,$)}IX.prototype._transform=function($,Y,z){z(null,$)}});var nW0=E((t6,kD)=>{var q9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&q9)kD.exports=q9,t6=kD.exports=q9.Readable,t6.Readable=q9.Readable,t6.Writable=q9.Writable,t6.Duplex=q9.Duplex,t6.Transform=q9.Transform,t6.PassThrough=q9.PassThrough,t6.Stream=q9;else t6=kD.exports=ku(),t6.Stream=q9||t6,t6.Readable=t6,t6.Writable=gu(),t6.Duplex=hz(),t6.Transform=mu(),t6.PassThrough=iW0()});var pW0=E((ks1,cW0)=>{cW0.exports=nW0().PassThrough});var bD=E((xs1,lW0)=>{var dW0=I0("util"),uD=pW0();lW0.exports={Readable:xD,Writable:fD};dW0.inherits(xD,uD);dW0.inherits(fD,uD);function mW0($,Y,z){$[Y]=function(){return delete $[Y],z.apply(this,arguments),this[Y].apply(this,arguments)}}function xD($,Y){if(!(this instanceof xD))return new xD($,Y);uD.call(this,Y),mW0(this,"_read",function(){var z=$.call(this,Y),U=this.emit.bind(this,"error");z.on("error",U),z.pipe(this)}),this.emit("readable")}function fD($,Y){if(!(this instanceof fD))return new fD($,Y);uD.call(this,Y),mW0(this,"_write",function(){var z=$.call(this,Y),U=this.emit.bind(this,"error");z.on("error",U),this.pipe(z)}),this.emit("writable")}});var Sz=E((fs1,oW0)=>{/*! +`+c);let[,K0]=o;return K0.replace(/\s/g,"").split(F0).map((O0)=>O0.replace(b0,"").trim())}function w1(f,c){var o={};return Object.keys(f).forEach((K0)=>{var O0=f[K0],D0,P0=q(O0),j0=!P0&&O0.length===1||P0&&O0.length===0;if(Array.isArray(O0))D0=[...O0],O0=D0.pop(),o[K0]=D0.concat(D0.length>0?h0:O0);else if(j0)o[K0]=O0;else{if(D0=n0(O0),O0.length===0&&!P0&&D0.length===0)throw Error("autoInject task functions require explicit parameters.");if(!P0)D0.pop();o[K0]=D0.concat(h0)}function h0(z1,x1){var m1=D0.map((i1)=>z1[i1]);m1.push(x1),w(O0)(...m1)}}),e0(o,c)}class k1{constructor(){this.head=this.tail=null,this.length=0}removeLink(f){if(f.prev)f.prev.next=f.next;else this.head=f.next;if(f.next)f.next.prev=f.prev;else this.tail=f.prev;return f.prev=f.next=null,this.length-=1,f}empty(){while(this.head)this.shift();return this}insertAfter(f,c){if(c.prev=f,c.next=f.next,f.next)f.next.prev=c;else this.tail=c;f.next=c,this.length+=1}insertBefore(f,c){if(c.prev=f.prev,c.next=f,f.prev)f.prev.next=c;else this.head=c;f.prev=c,this.length+=1}unshift(f){if(this.head)this.insertBefore(this.head,f);else u1(this,f)}push(f){if(this.tail)this.insertAfter(this.tail,f);else u1(this,f)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var f=this.head;while(f)yield f.data,f=f.next}remove(f){var c=this.head;while(c){var{next:o}=c;if(f(c))this.removeLink(c);c=o}return this}}function u1(f,c){f.length=1,f.head=f.tail=c}function b1(f,c,o){if(c==null)c=1;else if(c===0)throw RangeError("Concurrency must not be zero");var K0=w(f),O0=0,D0=[];let P0={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function j0(G1,$1){P0[G1].push($1)}function h0(G1,$1){let H1=(...n1)=>{z1(G1,H1),$1(...n1)};P0[G1].push(H1)}function z1(G1,$1){if(!G1)return Object.keys(P0).forEach((H1)=>P0[H1]=[]);if(!$1)return P0[G1]=[];P0[G1]=P0[G1].filter((H1)=>H1!==$1)}function x1(G1,...$1){P0[G1].forEach((H1)=>H1(...$1))}var m1=!1;function i1(G1,$1,H1,n1){if(n1!=null&&typeof n1!=="function")throw Error("task callback must be a function");l1.started=!0;var g4,h6;function D$(PY,...rK){if(PY)return H1?h6(PY):g4();if(rK.length<=1)return g4(rK[0]);g4(rK)}var pU=l1._createTaskItem(G1,H1?D$:n1||D$);if($1)l1._tasks.unshift(pU);else l1._tasks.push(pU);if(!m1)m1=!0,H(()=>{m1=!1,l1.process()});if(H1||!n1)return new Promise((PY,rK)=>{g4=PY,h6=rK})}function N$(G1){return function($1,...H1){O0-=1;for(var n1=0,g4=G1.length;n10)D0.splice(D$,1);if(h6.callback($1,...H1),$1!=null)x1("error",$1,h6.data)}if(O0<=l1.concurrency-l1.buffer)x1("unsaturated");if(l1.idle())x1("drain");l1.process()}}function cU(G1){if(G1.length===0&&l1.idle())return H(()=>x1("drain")),!0;return!1}let BY=(G1)=>($1)=>{if(!$1)return new Promise((H1,n1)=>{h0(G1,(g4,h6)=>{if(g4)return n1(g4);H1(h6)})});z1(G1),j0(G1,$1)};var oK=!1,l1={_tasks:new k1,_createTaskItem(G1,$1){return{data:G1,callback:$1}},*[Symbol.iterator](){yield*l1._tasks[Symbol.iterator]()},concurrency:c,payload:o,buffer:c/4,started:!1,paused:!1,push(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!1,!1,$1))}return i1(G1,!1,!1,$1)},pushAsync(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!1,!0,$1))}return i1(G1,!1,!0,$1)},kill(){z1(),l1._tasks.empty()},unshift(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!0,!1,$1))}return i1(G1,!0,!1,$1)},unshiftAsync(G1,$1){if(Array.isArray(G1)){if(cU(G1))return;return G1.map((H1)=>i1(H1,!0,!0,$1))}return i1(G1,!0,!0,$1)},remove(G1){l1._tasks.remove(G1)},process(){if(oK)return;oK=!0;while(!l1.paused&&O0{O0(c,D0,(h0,z1)=>{c=z1,j0(h0)})},(D0)=>K0(D0,c))}var v=O(B,4);function u(...f){var c=f.map(w);return function(...o){var K0=this,O0=o[o.length-1];if(typeof O0=="function")o.pop();else O0=f0();return v(c,o,(D0,P0,j0)=>{P0.apply(K0,D0.concat((h0,...z1)=>{j0(h0,z1)}))},(D0,P0)=>O0(D0,...P0)),O0[G0]}}function a(...f){return u(...f.reverse())}function X0(f,c,o,K0){return M(n(c),f,o,K0)}var J0=O(X0,4);function q0(f,c,o,K0){var O0=w(o);return J0(f,c,(D0,P0)=>{O0(D0,(j0,...h0)=>{if(j0)return P0(j0);return P0(j0,h0)})},(D0,P0)=>{var j0=[];for(var h0=0;h0{var P0=!1,j0;let h0=w(O0);o(K0,(z1,x1,m1)=>{h0(z1,(i1,N$)=>{if(i1||i1===!1)return m1(i1);if(f(N$)&&!j0)return P0=!0,j0=c(!0,z1),m1(null,P);m1()})},(z1)=>{if(z1)return D0(z1);D0(null,P0?j0:c(!1))})}}function u4(f,c,o){return S1((K0)=>K0,(K0,O0)=>O0)(g,f,c,o)}var N8=O(u4,3);function $$(f,c,o,K0){return S1((O0)=>O0,(O0,D0)=>D0)(n(c),f,o,K0)}var v5=O($$,4);function a3(f,c,o){return S1((K0)=>K0,(K0,O0)=>O0)(n(1),f,c,o)}var M$=O(a3,3);function y9(f){return(c,...o)=>w(c)(...o,(K0,...O0)=>{if(typeof console==="object"){if(K0){if(console.error)console.error(K0)}else if(console[f])O0.forEach((D0)=>console[f](D0))}})}var k9=y9("dir");function t3(f,c,o){o=S(o);var K0=w(f),O0=w(c),D0;function P0(h0,...z1){if(h0)return o(h0);if(h0===!1)return;D0=z1,O0(...z1,j0)}function j0(h0,z1){if(h0)return o(h0);if(h0===!1)return;if(!z1)return o(null,...D0);K0(P0)}return j0(null,!0)}var s4=O(t3,3);function e3(f,c,o){let K0=w(c);return s4(f,(...O0)=>{let D0=O0.pop();K0(...O0,(P0,j0)=>D0(P0,!j0))},o)}function zY(f){return(c,o,K0)=>f(c,K0)}function $7(f,c,o){return g(f,zY(w(c)),o)}var h5=O($7,3);function UY(f,c,o,K0){return n(c)(f,zY(w(o)),K0)}var e$=O(UY,4);function QY(f,c,o){return e$(f,1,c,o)}var $5=O(QY,3);function x9(f){if(q(f))return f;return function(...c){var o=c.pop(),K0=!0;c.push((...O0)=>{if(K0)H(()=>o(...O0));else o(...O0)}),f.apply(this,c),K0=!1}}function JY(f,c,o){return S1((K0)=>!K0,(K0)=>!K0)(g,f,c,o)}var f9=O(JY,3);function IY(f,c,o,K0){return S1((O0)=>!O0,(O0)=>!O0)(n(c),f,o,K0)}var Y$=O(IY,4);function KY(f,c,o){return S1((K0)=>!K0,(K0)=>!K0)($0,f,c,o)}var S5=O(KY,3);function GY(f,c,o,K0){var O0=Array(c.length);f(c,(D0,P0,j0)=>{o(D0,(h0,z1)=>{O0[P0]=!!z1,j0(h0)})},(D0)=>{if(D0)return K0(D0);var P0=[];for(var j0=0;j0{o(D0,(h0,z1)=>{if(h0)return j0(h0);if(z1)O0.push({index:P0,value:D0});j0(h0)})},(D0)=>{if(D0)return K0(D0);K0(null,O0.sort((P0,j0)=>P0.index-j0.index).map((P0)=>P0.value))})}function g5(f,c,o,K0){var O0=D(c)?GY:HY;return O0(f,c,w(o),K0)}function WY(f,c,o){return g5(g,f,c,o)}var y5=O(WY,3);function XY(f,c,o,K0){return g5(n(c),f,o,K0)}var k5=O(XY,4);function ZY(f,c,o){return g5($0,f,c,o)}var x5=O(ZY,3);function qY(f,c){var o=S(c),K0=w(x9(f));function O0(D0){if(D0)return o(D0);if(D0===!1)return;K0(O0)}return O0()}var f5=O(qY,2);function u9(f,c,o,K0){var O0=w(o);return J0(f,c,(D0,P0)=>{O0(D0,(j0,h0)=>{if(j0)return P0(j0);return P0(j0,{key:h0,val:D0})})},(D0,P0)=>{var j0={},{hasOwnProperty:h0}=Object.prototype;for(var z1=0;z1{D0(P0,j0,(z1,x1)=>{if(z1)return h0(z1);O0[j0]=x1,h0(z1)})},(P0)=>K0(P0,O0))}var K8=O(LY,4);function FY(f,c,o){return K8(f,1/0,c,o)}function OY(f,c,o){return K8(f,1,c,o)}function wY(f,c=(o)=>o){var o=Object.create(null),K0=Object.create(null),O0=w(f),D0=z((P0,j0)=>{var h0=c(...P0);if(h0 in o)H(()=>j0(null,...o[h0]));else if(h0 in K0)K0[h0].push(j0);else K0[h0]=[j0],O0(...P0,(z1,...x1)=>{if(!z1)o[h0]=x1;var m1=K0[h0];delete K0[h0];for(var i1=0,N$=m1.length;i1{var K0=D(c)?[]:{};f(c,(O0,D0,P0)=>{w(O0)((j0,...h0)=>{if(h0.length<2)[h0]=h0;K0[D0]=h0,P0(j0)})},(O0)=>o(O0,K0))},3);function NY(f,c){return Y7(g,f,c)}function z7(f,c,o){return Y7(n(c),f,o)}function U7(f,c){var o=w(f);return b1((K0,O0)=>{o(K0[0],O0)},c,1)}class DY{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(f){let c;while(f>0&&I7(this.heap[f],this.heap[c=J7(f)])){let o=this.heap[f];this.heap[f]=this.heap[c],this.heap[c]=o,f=c}}percDown(f){let c;while((c=Q7(f))=0;o--)this.percDown(o);return this}}function Q7(f){return(f<<1)+1}function J7(f){return(f+1>>1)-1}function I7(f,c){if(f.priority!==c.priority)return f.priority{return{data:P0,priority:j0,callback:h0}};function D0(P0,j0){if(!Array.isArray(P0))return{data:P0,priority:j0};return P0.map((h0)=>{return{data:h0,priority:j0}})}return o.push=function(P0,j0=0,h0){return K0(D0(P0,j0),h0)},o.pushAsync=function(P0,j0=0,h0){return O0(D0(P0,j0),h0)},delete o.unshift,delete o.unshiftAsync,o}function nU(f,c){if(c=j(c),!Array.isArray(f))return c(TypeError("First argument to race must be an array of functions"));if(!f.length)return c();for(var o=0,K0=f.length;o{let j0={};if(D0)j0.error=D0;if(P0.length>0){var h0=P0;if(P0.length<=1)[h0]=P0;j0.value=h0}O0(null,j0)}),c.apply(this,K0)})}function u5(f){var c;if(Array.isArray(f))c=f.map(n9);else c={},Object.keys(f).forEach((o)=>{c[o]=n9.call(this,f[o])});return c}function b5(f,c,o,K0){let O0=w(o);return g5(f,c,(D0,P0)=>{O0(D0,(j0,h0)=>{P0(j0,!h0)})},K0)}function K7(f,c,o){return b5(g,f,c,o)}var c9=O(K7,3);function pK(f,c,o,K0){return b5(n(c),f,o,K0)}var p6=O(pK,4);function b4(f,c,o){return b5($0,f,c,o)}var i5=O(b4,3);function N6(f){return function(){return f}}let dK=5,mK=0;function pq(f,c,o){var K0={times:dK,intervalFunc:N6(mK)};if(arguments.length<3&&typeof f==="function")o=c||f0(),c=f;else Cy0(K0,f),o=o||f0();if(typeof c!=="function")throw Error("Invalid arguments for async.retry");var O0=w(c),D0=1;function P0(){O0((j0,...h0)=>{if(j0===!1)return;if(j0&&D0++{if(O0.lengthK0)(g,f,c,o)}var dq=O(Ry0,3);function _y0(f,c,o,K0){return S1(Boolean,(O0)=>O0)(n(c),f,o,K0)}var mq=O(_y0,4);function vy0(f,c,o){return S1(Boolean,(K0)=>K0)($0,f,c,o)}var lq=O(vy0,3);function hy0(f,c,o){var K0=w(c);return Y0(f,(D0,P0)=>{K0(D0,(j0,h0)=>{if(j0)return P0(j0);P0(j0,{value:D0,criteria:h0})})},(D0,P0)=>{if(D0)return o(D0);o(null,P0.sort(O0).map((j0)=>j0.value))});function O0(D0,P0){var j0=D0.criteria,h0=P0.criteria;return j0h0?1:0}}var eo=O(hy0,3);function $r(f,c,o){var K0=w(f);return z((O0,D0)=>{var P0=!1,j0;function h0(){var z1=f.name||"anonymous",x1=Error('Callback function "'+z1+'" timed out.');if(x1.code="ETIMEDOUT",o)x1.info=o;P0=!0,D0(x1)}O0.push((...z1)=>{if(!P0)D0(...z1),clearTimeout(j0)}),j0=setTimeout(h0,c),K0(...O0)})}function Sy0(f){var c=Array(f);while(f--)c[f]=f;return c}function oq(f,c,o,K0){var O0=w(o);return J0(Sy0(f),c,O0,K0)}function Yr(f,c,o){return oq(f,1/0,c,o)}function zr(f,c,o){return oq(f,1,c,o)}function Ur(f,c,o,K0){if(arguments.length<=3&&typeof c==="function")K0=o,o=c,c=Array.isArray(f)?[]:{};K0=j(K0||f0());var O0=w(o);return g(f,(D0,P0,j0)=>{O0(c,D0,P0,j0)},(D0)=>K0(D0,c)),K0[G0]}function gy0(f,c){var o=null,K0;return $5(f,(O0,D0)=>{w(O0)((P0,...j0)=>{if(P0===!1)return D0(P0);if(j0.length<2)[K0]=j0;else K0=j0;o=P0,D0(P0?null:{})})},()=>c(o,K0))}var Qr=O(gy0);function Jr(f){return(...c)=>{return(f.unmemoized||f)(...c)}}function yy0(f,c,o){o=S(o);var K0=w(c),O0=w(f),D0=[];function P0(h0,...z1){if(h0)return o(h0);if(D0=z1,h0===!1)return;O0(j0)}function j0(h0,z1){if(h0)return o(h0);if(h0===!1)return;if(!z1)return o(null,...D0);K0(P0)}return O0(j0)}var lK=O(yy0,3);function Ir(f,c,o){let K0=w(f);return lK((O0)=>K0((D0,P0)=>O0(D0,!P0)),c,o)}function ky0(f,c){if(c=j(c),!Array.isArray(f))return c(Error("First argument to waterfall must be an array of functions"));if(!f.length)return c();var o=0;function K0(D0){var P0=w(f[o++]);P0(...D0,S(O0))}function O0(D0,...P0){if(D0===!1)return;if(D0||o===f.length)return c(D0,...P0);K0(P0)}K0([])}var Kr=O(ky0),xy0={apply:Y,applyEach:y,applyEachSeries:_0,asyncify:W,auto:e0,autoInject:w1,cargo:A0,cargoQueue:Q0,compose:a,concat:r0,concatLimit:w0,concatSeries:U1,constant:A1,detect:N8,detectLimit:v5,detectSeries:M$,dir:k9,doUntil:e3,doWhilst:s4,each:h5,eachLimit:e$,eachOf:g,eachOfLimit:x,eachOfSeries:$0,eachSeries:$5,ensureAsync:x9,every:f9,everyLimit:Y$,everySeries:S5,filter:y5,filterLimit:k5,filterSeries:x5,forever:f5,groupBy:VY,groupByLimit:b9,groupBySeries:J8,log:I8,map:Y0,mapLimit:J0,mapSeries:T0,mapValues:FY,mapValuesLimit:K8,mapValuesSeries:OY,memoize:wY,nextTick:MY,parallel:NY,parallelLimit:z7,priorityQueue:AY,queue:U7,race:Y5,reduce:v,reduceRight:M6,reflect:n9,reflectAll:u5,reject:c9,rejectLimit:p6,rejectSeries:i5,retry:pq,retryable:ao,seq:u,series:to,setImmediate:H,some:dq,someLimit:mq,someSeries:lq,sortBy:eo,timeout:$r,times:Yr,timesLimit:oq,timesSeries:zr,transform:Ur,tryEach:Qr,unmemoize:Jr,until:Ir,waterfall:Kr,whilst:lK,all:f9,allLimit:Y$,allSeries:S5,any:dq,anyLimit:mq,anySeries:lq,find:N8,findLimit:v5,findSeries:M$,flatMap:r0,flatMapLimit:w0,flatMapSeries:U1,forEach:h5,forEachSeries:$5,forEachLimit:e$,forEachOf:g,forEachOfSeries:$0,forEachOfLimit:x,inject:v,foldl:v,foldr:M6,select:y5,selectLimit:k5,selectSeries:x5,wrapSync:W,during:lK,doDuring:s4};$.all=f9,$.allLimit=Y$,$.allSeries=S5,$.any=dq,$.anyLimit=mq,$.anySeries=lq,$.apply=Y,$.applyEach=y,$.applyEachSeries=_0,$.asyncify=W,$.auto=e0,$.autoInject=w1,$.cargo=A0,$.cargoQueue=Q0,$.compose=a,$.concat=r0,$.concatLimit=w0,$.concatSeries=U1,$.constant=A1,$.default=xy0,$.detect=N8,$.detectLimit=v5,$.detectSeries=M$,$.dir=k9,$.doDuring=s4,$.doUntil=e3,$.doWhilst=s4,$.during=lK,$.each=h5,$.eachLimit=e$,$.eachOf=g,$.eachOfLimit=x,$.eachOfSeries=$0,$.eachSeries=$5,$.ensureAsync=x9,$.every=f9,$.everyLimit=Y$,$.everySeries=S5,$.filter=y5,$.filterLimit=k5,$.filterSeries=x5,$.find=N8,$.findLimit=v5,$.findSeries=M$,$.flatMap=r0,$.flatMapLimit=w0,$.flatMapSeries=U1,$.foldl=v,$.foldr=M6,$.forEach=h5,$.forEachLimit=e$,$.forEachOf=g,$.forEachOfLimit=x,$.forEachOfSeries=$0,$.forEachSeries=$5,$.forever=f5,$.groupBy=VY,$.groupByLimit=b9,$.groupBySeries=J8,$.inject=v,$.log=I8,$.map=Y0,$.mapLimit=J0,$.mapSeries=T0,$.mapValues=FY,$.mapValuesLimit=K8,$.mapValuesSeries=OY,$.memoize=wY,$.nextTick=MY,$.parallel=NY,$.parallelLimit=z7,$.priorityQueue=AY,$.queue=U7,$.race=Y5,$.reduce=v,$.reduceRight=M6,$.reflect=n9,$.reflectAll=u5,$.reject=c9,$.rejectLimit=p6,$.rejectSeries=i5,$.retry=pq,$.retryable=ao,$.select=y5,$.selectLimit=k5,$.selectSeries=x5,$.seq=u,$.series=to,$.setImmediate=H,$.some=dq,$.someLimit=mq,$.someSeries=lq,$.sortBy=eo,$.timeout=$r,$.times=Yr,$.timesLimit=oq,$.timesSeries=zr,$.transform=Ur,$.tryEach=Qr,$.unmemoize=Jr,$.until=Ir,$.waterfall=Kr,$.whilst=lK,$.wrapSync=W,Object.defineProperty($,"__esModule",{value:!0})})});var eH0=E((Bs1,tH0)=>{var V2=I0("constants"),PU1=process.cwd,PD=null,jU1=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!PD)PD=PU1.call(process);return PD};try{process.cwd()}catch($){}if(typeof process.chdir==="function"){if(jD=process.chdir,process.chdir=function($){PD=null,jD.call(process,$)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,jD)}var jD;tH0.exports=TU1;function TU1($){if(V2.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))Y($);if(!$.lutimes)z($);if($.chown=J($.chown),$.fchown=J($.fchown),$.lchown=J($.lchown),$.chmod=U($.chmod),$.fchmod=U($.fchmod),$.lchmod=U($.lchmod),$.chownSync=I($.chownSync),$.fchownSync=I($.fchownSync),$.lchownSync=I($.lchownSync),$.chmodSync=Q($.chmodSync),$.fchmodSync=Q($.fchmodSync),$.lchmodSync=Q($.lchmodSync),$.stat=K($.stat),$.fstat=K($.fstat),$.lstat=K($.lstat),$.statSync=G($.statSync),$.fstatSync=G($.fstatSync),$.lstatSync=G($.lstatSync),$.chmod&&!$.lchmod)$.lchmod=function(W,X,Z){if(Z)process.nextTick(Z)},$.lchmodSync=function(){};if($.chown&&!$.lchown)$.lchown=function(W,X,Z,q){if(q)process.nextTick(q)},$.lchownSync=function(){};if(jU1==="win32")$.rename=typeof $.rename!=="function"?$.rename:function(W){function X(Z,q,V){var F=Date.now(),w=0;W(Z,q,function O(N){if(N&&(N.code==="EACCES"||N.code==="EPERM"||N.code==="EBUSY")&&Date.now()-F<60000){if(setTimeout(function(){$.stat(q,function(M,D){if(M&&M.code==="ENOENT")W(Z,q,O);else V(N)})},w),w<100)w+=10;return}if(V)V(N)})}if(Object.setPrototypeOf)Object.setPrototypeOf(X,W);return X}($.rename);$.read=typeof $.read!=="function"?$.read:function(W){function X(Z,q,V,F,w,O){var N;if(O&&typeof O==="function"){var M=0;N=function(D,P,j){if(D&&D.code==="EAGAIN"&&M<10)return M++,W.call($,Z,q,V,F,w,N);O.apply(this,arguments)}}return W.call($,Z,q,V,F,w,N)}if(Object.setPrototypeOf)Object.setPrototypeOf(X,W);return X}($.read),$.readSync=typeof $.readSync!=="function"?$.readSync:function(W){return function(X,Z,q,V,F){var w=0;while(!0)try{return W.call($,X,Z,q,V,F)}catch(O){if(O.code==="EAGAIN"&&w<10){w++;continue}throw O}}}($.readSync);function Y(W){W.lchmod=function(X,Z,q){W.open(X,V2.O_WRONLY|V2.O_SYMLINK,Z,function(V,F){if(V){if(q)q(V);return}W.fchmod(F,Z,function(w){W.close(F,function(O){if(q)q(w||O)})})})},W.lchmodSync=function(X,Z){var q=W.openSync(X,V2.O_WRONLY|V2.O_SYMLINK,Z),V=!0,F;try{F=W.fchmodSync(q,Z),V=!1}finally{if(V)try{W.closeSync(q)}catch(w){}else W.closeSync(q)}return F}}function z(W){if(V2.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(X,Z,q,V){W.open(X,V2.O_SYMLINK,function(F,w){if(F){if(V)V(F);return}W.futimes(w,Z,q,function(O){W.close(w,function(N){if(V)V(O||N)})})})},W.lutimesSync=function(X,Z,q){var V=W.openSync(X,V2.O_SYMLINK),F,w=!0;try{F=W.futimesSync(V,Z,q),w=!1}finally{if(w)try{W.closeSync(V)}catch(O){}else W.closeSync(V)}return F};else if(W.futimes)W.lutimes=function(X,Z,q,V){if(V)process.nextTick(V)},W.lutimesSync=function(){}}function U(W){if(!W)return W;return function(X,Z,q){return W.call($,X,Z,function(V){if(H(V))V=null;if(q)q.apply(this,arguments)})}}function Q(W){if(!W)return W;return function(X,Z){try{return W.call($,X,Z)}catch(q){if(!H(q))throw q}}}function J(W){if(!W)return W;return function(X,Z,q,V){return W.call($,X,Z,q,function(F){if(H(F))F=null;if(V)V.apply(this,arguments)})}}function I(W){if(!W)return W;return function(X,Z,q){try{return W.call($,X,Z,q)}catch(V){if(!H(V))throw V}}}function K(W){if(!W)return W;return function(X,Z,q){if(typeof Z==="function")q=Z,Z=null;function V(F,w){if(w){if(w.uid<0)w.uid+=4294967296;if(w.gid<0)w.gid+=4294967296}if(q)q.apply(this,arguments)}return Z?W.call($,X,Z,V):W.call($,X,V)}}function G(W){if(!W)return W;return function(X,Z){var q=Z?W.call($,X,Z):W.call($,X);if(q){if(q.uid<0)q.uid+=4294967296;if(q.gid<0)q.gid+=4294967296}return q}}function H(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var X=!process.getuid||process.getuid()!==0;if(X){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var zW0=E((Ps1,YW0)=>{var $W0=I0("stream").Stream;YW0.exports=EU1;function EU1($){return{ReadStream:Y,WriteStream:z};function Y(U,Q){if(!(this instanceof Y))return new Y(U,Q);$W0.call(this);var J=this;this.path=U,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var I=Object.keys(Q);for(var K=0,G=I.length;Kthis.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){J._read()});return}$.open(this.path,this.flags,this.mode,function(W,X){if(W){J.emit("error",W),J.readable=!1;return}J.fd=X,J.emit("open",X),J._read()})}function z(U,Q){if(!(this instanceof z))return new z(U,Q);$W0.call(this),this.path=U,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var J=Object.keys(Q);for(var I=0,K=J.length;I= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=$.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var QW0=E((js1,UW0)=>{UW0.exports=RU1;var CU1=Object.getPrototypeOf||function($){return $.__proto__};function RU1($){if($===null||typeof $!=="object")return $;if($ instanceof Object)var Y={__proto__:CU1($)};else var Y=Object.create(null);return Object.getOwnPropertyNames($).forEach(function(z){Object.defineProperty(Y,z,Object.getOwnPropertyDescriptor($,z))}),Y}});var o8=E((Ts1,_u)=>{var d4=I0("fs"),_U1=eH0(),vU1=zW0(),hU1=QW0(),TD=I0("util"),a6,CD;if(typeof Symbol==="function"&&typeof Symbol.for==="function")a6=Symbol.for("graceful-fs.queue"),CD=Symbol.for("graceful-fs.previous");else a6="___graceful-fs.queue",CD="___graceful-fs.previous";function SU1(){}function IW0($,Y){Object.defineProperty($,a6,{get:function(){return Y}})}var _z=SU1;if(TD.debuglog)_z=TD.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))_z=function(){var $=TD.format.apply(TD,arguments);$="GFS4: "+$.split(/\n/).join(` +GFS4: `),console.error($)};if(!d4[a6]){if(Eu=global[a6]||[],IW0(d4,Eu),d4.close=function($){function Y(z,U){return $.call(d4,z,function(Q){if(!Q)JW0();if(typeof U==="function")U.apply(this,arguments)})}return Object.defineProperty(Y,CD,{value:$}),Y}(d4.close),d4.closeSync=function($){function Y(z){$.apply(d4,arguments),JW0()}return Object.defineProperty(Y,CD,{value:$}),Y}(d4.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){_z(d4[a6]),I0("assert").equal(d4[a6].length,0)})}var Eu;if(!global[a6])IW0(global,d4[a6]);_u.exports=Cu(hU1(d4));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!d4.__patched)_u.exports=Cu(d4),d4.__patched=!0;function Cu($){_U1($),$.gracefulify=Cu,$.createReadStream=P,$.createWriteStream=j;var Y=$.readFile;$.readFile=z;function z(C,b,k){if(typeof b==="function")k=b,b=null;return S(C,b,k);function S(i,n,U0,x){return Y(i,n,function(d){if(d&&(d.code==="EMFILE"||d.code==="ENFILE"))GI([S,[i,n,U0],d,x||Date.now(),Date.now()]);else if(typeof U0==="function")U0.apply(this,arguments)})}}var U=$.writeFile;$.writeFile=Q;function Q(C,b,k,S){if(typeof k==="function")S=k,k=null;return i(C,b,k,S);function i(n,U0,x,d,t){return U(n,U0,x,function(e){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}var J=$.appendFile;if(J)$.appendFile=I;function I(C,b,k,S){if(typeof k==="function")S=k,k=null;return i(C,b,k,S);function i(n,U0,x,d,t){return J(n,U0,x,function(e){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}var K=$.copyFile;if(K)$.copyFile=G;function G(C,b,k,S){if(typeof k==="function")S=k,k=0;return i(C,b,k,S);function i(n,U0,x,d,t){return K(n,U0,x,function(e){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}var H=$.readdir;$.readdir=X;var W=/^v[0-5]\./;function X(C,b,k){if(typeof b==="function")k=b,b=null;var S=W.test(process.version)?function(U0,x,d,t){return H(U0,i(U0,x,d,t))}:function(U0,x,d,t){return H(U0,x,i(U0,x,d,t))};return S(C,b,k);function i(n,U0,x,d){return function(t,e){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))GI([S,[n,U0,x],t,d||Date.now(),Date.now()]);else{if(e&&e.sort)e.sort();if(typeof x==="function")x.call(this,t,e)}}}}if(process.version.substr(0,4)==="v0.8"){var Z=vU1($);O=Z.ReadStream,M=Z.WriteStream}var q=$.ReadStream;if(q)O.prototype=Object.create(q.prototype),O.prototype.open=N;var V=$.WriteStream;if(V)M.prototype=Object.create(V.prototype),M.prototype.open=D;Object.defineProperty($,"ReadStream",{get:function(){return O},set:function(C){O=C},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return M},set:function(C){M=C},enumerable:!0,configurable:!0});var F=O;Object.defineProperty($,"FileReadStream",{get:function(){return F},set:function(C){F=C},enumerable:!0,configurable:!0});var w=M;Object.defineProperty($,"FileWriteStream",{get:function(){return w},set:function(C){w=C},enumerable:!0,configurable:!0});function O(C,b){if(this instanceof O)return q.apply(this,arguments),this;else return O.apply(Object.create(O.prototype),arguments)}function N(){var C=this;T(C.path,C.flags,C.mode,function(b,k){if(b){if(C.autoClose)C.destroy();C.emit("error",b)}else C.fd=k,C.emit("open",k),C.read()})}function M(C,b){if(this instanceof M)return V.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function D(){var C=this;T(C.path,C.flags,C.mode,function(b,k){if(b)C.destroy(),C.emit("error",b);else C.fd=k,C.emit("open",k)})}function P(C,b){return new $.ReadStream(C,b)}function j(C,b){return new $.WriteStream(C,b)}var A=$.open;$.open=T;function T(C,b,k,S){if(typeof k==="function")S=k,k=null;return i(C,b,k,S);function i(n,U0,x,d,t){return A(n,U0,x,function(e,g){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))GI([i,[n,U0,x,d],e,t||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}return $}function GI($){_z("ENQUEUE",$[0].name,$[1]),d4[a6].push($),Ru()}var ED;function JW0(){var $=Date.now();for(var Y=0;Y2)d4[a6][Y][3]=$,d4[a6][Y][4]=$;Ru()}function Ru(){if(clearTimeout(ED),ED=void 0,d4[a6].length===0)return;var $=d4[a6].shift(),Y=$[0],z=$[1],U=$[2],Q=$[3],J=$[4];if(Q===void 0)_z("RETRY",Y.name,z),Y.apply(null,z);else if(Date.now()-Q>=60000){_z("TIMEOUT",Y.name,z);var I=z.pop();if(typeof I==="function")I.call(null,U)}else{var K=Date.now()-J,G=Math.max(J-Q,1),H=Math.min(G*1.2,100);if(K>=H)_z("RETRY",Y.name,z),Y.apply(null,z.concat([Q]));else d4[a6].push($)}if(ED===void 0)ED=setTimeout(Ru,0)}});var GW0=E((Es1,vu)=>{function gU1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var KW0=K6().Buffer,tW=I0("util");function yU1($,Y,z){$.copy(Y,z)}vu.exports=function(){function $(){gU1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return KW0.alloc(0);var U=KW0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)yU1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(tW&&tW.inspect&&tW.inspect.custom)vu.exports.prototype[tW.inspect.custom]=function(){var $=tW.inspect({length:this.length});return this.constructor.name+" "+$}});var hu=E((Cs1,HW0)=>{var RD=I6();function kU1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)RD.nextTick(_D,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,RD.nextTick(_D,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)RD.nextTick(_D,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,RD.nextTick(_D,z,J)}else if(Y)Y(J)}),this}function xU1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function _D($,Y){$.emit("error",Y)}HW0.exports={destroy:kU1,undestroy:xU1}});var gu=E((Rs1,OW0)=>{var vz=I6();OW0.exports=q6;function XW0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){YQ1(Y,$)}}var fU1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:vz.nextTick,HI;q6.WritableState=$X;var ZW0=Object.create(M4());ZW0.inherits=X1();var uU1={deprecate:f7()},qW0=I0("stream"),hD=K6().Buffer,bU1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function iU1($){return hD.from($)}function nU1($){return hD.isBuffer($)||$ instanceof bU1}var VW0=hu();ZW0.inherits(q6,qW0);function cU1(){}function $X($,Y){HI=HI||hz(),$=$||{};var z=Y instanceof HI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){sU1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new XW0(this)}$X.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty($X.prototype,"buffer",{get:uU1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var vD;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")vD=Function.prototype[Symbol.hasInstance],Object.defineProperty(q6,Symbol.hasInstance,{value:function($){if(vD.call(this,$))return!0;if(this!==q6)return!1;return $&&$._writableState instanceof $X}});else vD=function($){return $ instanceof this};function q6($){if(HI=HI||hz(),!vD.call(q6,this)&&!(this instanceof HI))return new q6($);if(this._writableState=new $X($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}qW0.call(this)}q6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function pU1($,Y){var z=Error("write after end");$.emit("error",z),vz.nextTick(Y,z)}function dU1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),vz.nextTick(U,J),Q=!1;return Q}q6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&nU1($);if(J&&!hD.isBuffer($))$=iU1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=cU1;if(U.ended)pU1(this,z);else if(J||dU1(this,U,$,z))U.pendingcb++,Q=lU1(this,U,J,$,Y,z);return Q};q6.prototype.cork=function(){var $=this._writableState;$.corked++};q6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)LW0(this,$)}};q6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function mU1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=hD.from(Y,z);return Y}Object.defineProperty(q6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function lU1($,Y,z,U,Q,J){if(!z){var I=mU1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var wW0=I6(),zQ1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};DW0.exports=N3;var MW0=Object.create(M4());MW0.inherits=X1();var NW0=ku(),yu=gu();MW0.inherits(N3,NW0);{SD=zQ1(yu.prototype);for(YX=0;YX{var fu=K6().Buffer,AW0=fu.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function JQ1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function IQ1($){var Y=JQ1($);if(typeof Y!=="string"&&(fu.isEncoding===AW0||!AW0($)))throw Error("Unknown encoding: "+$);return Y||$}wQ1.StringDecoder=UX;function UX($){this.encoding=IQ1($);var Y;switch(this.encoding){case"utf16le":this.text=ZQ1,this.end=qQ1,Y=4;break;case"utf8":this.fillLast=HQ1,Y=4;break;case"base64":this.text=VQ1,this.end=LQ1,Y=3;break;default:this.write=FQ1,this.end=OQ1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fu.allocUnsafe(Y)}UX.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};UX.prototype.end=XQ1;UX.prototype.text=WQ1;UX.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function xu($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function KQ1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function GQ1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function HQ1($){var Y=this.lastTotal-this.lastNeed,z=GQ1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function WQ1($,Y){var z=KQ1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function XQ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function ZQ1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function qQ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function VQ1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function LQ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function FQ1($){return $.toString(this.encoding)}function OQ1($){return $&&$.length?this.write($):""}});var ku=E((Ss1,gW0)=>{var XI=I6();gW0.exports=E4;var NQ1=$J(),QX;E4.ReadableState=RW0;var hs1=I0("events").EventEmitter,TW0=function($,Y){return $.listeners(Y).length},pu=I0("stream"),JX=K6().Buffer,DQ1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function AQ1($){return JX.from($)}function BQ1($){return JX.isBuffer($)||$ instanceof DQ1}var EW0=Object.create(M4());EW0.inherits=X1();var bu=I0("util"),e1=void 0;if(bu&&bu.debuglog)e1=bu.debuglog("stream");else e1=function(){};var PQ1=GW0(),CW0=hu(),WI;EW0.inherits(E4,pu);var iu=["error","close","destroy","pause","resume"];function jQ1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(NQ1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function RW0($,Y){QX=QX||hz(),$=$||{};var z=Y instanceof QX;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new PQ1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!WI)WI=uu().StringDecoder;this.decoder=new WI($.encoding),this.encoding=$.encoding}}function E4($){if(QX=QX||hz(),!(this instanceof E4))return new E4($);if(this._readableState=new RW0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}pu.call(this)}Object.defineProperty(E4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});E4.prototype.destroy=CW0.destroy;E4.prototype._undestroy=CW0.undestroy;E4.prototype._destroy=function($,Y){this.push(null),Y($)};E4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=JX.from($,Y),Y="";U=!0}}else U=!0;return _W0(this,$,Y,!1,U)};E4.prototype.unshift=function($){return _W0(this,$,null,!0,!1)};function _W0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,RQ1($,J);else{var I;if(!Q)I=TQ1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==JX.prototype)Y=AQ1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else nu($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)nu($,J,Y,!1);else vW0($,J);else nu($,J,Y,!1)}else if(!U)J.reading=!1}return EQ1(J)}function nu($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)gD($)}vW0($,Y)}function TQ1($,Y){var z;if(!BQ1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function EQ1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}E4.prototype.isPaused=function(){return this._readableState.flowing===!1};E4.prototype.setEncoding=function($){if(!WI)WI=uu().StringDecoder;return this._readableState.decoder=new WI($),this._readableState.encoding=$,this};var BW0=8388608;function CQ1($){if($>=BW0)$=BW0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function PW0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=CQ1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}E4.prototype.read=function($){e1("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(e1("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)cu(this);else gD(this);return null}if($=PW0($,Y),$===0&&Y.ended){if(Y.length===0)cu(this);return null}var U=Y.needReadable;if(e1("need readable",U),Y.length===0||Y.length-$0)Q=hW0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)cu(this)}if(Q!==null)this.emit("data",Q);return Q};function RQ1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,gD($)}function gD($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(e1("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)XI.nextTick(jW0,$);else jW0($)}function jW0($){e1("emit readable"),$.emit("readable"),du($)}function vW0($,Y){if(!Y.readingMore)Y.readingMore=!0,XI.nextTick(_Q1,$,Y)}function _Q1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&SW0(U.pipes,$)!==-1)&&!H)e1("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(e1("onerror",O),w(),$.removeListener("error",q),TW0($,"error")===0)$.emit("error",O)}jQ1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){e1("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){e1("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)e1("pipe resume"),z.resume();return $};function vQ1($){return function(){var Y=$._readableState;if(e1("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&TW0($,"data"))Y.flowing=!0,du($)}}E4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=yQ1($,Y.buffer,Y.decoder);return z}function yQ1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function xQ1($,Y){var z=JX.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function cu($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,XI.nextTick(fQ1,Y,$)}function fQ1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function SW0($,Y){for(var z=0,U=$.length;z{xW0.exports=D3;var yD=hz(),kW0=Object.create(M4());kW0.inherits=X1();kW0.inherits(D3,yD);function uQ1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{bW0.exports=IX;var fW0=mu(),uW0=Object.create(M4());uW0.inherits=X1();uW0.inherits(IX,fW0);function IX($){if(!(this instanceof IX))return new IX($);fW0.call(this,$)}IX.prototype._transform=function($,Y,z){z(null,$)}});var nW0=E((t6,kD)=>{var q9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&q9)kD.exports=q9,t6=kD.exports=q9.Readable,t6.Readable=q9.Readable,t6.Writable=q9.Writable,t6.Duplex=q9.Duplex,t6.Transform=q9.Transform,t6.PassThrough=q9.PassThrough,t6.Stream=q9;else t6=kD.exports=ku(),t6.Stream=q9||t6,t6.Readable=t6,t6.Writable=gu(),t6.Duplex=hz(),t6.Transform=mu(),t6.PassThrough=iW0()});var pW0=E((ks1,cW0)=>{cW0.exports=nW0().PassThrough});var bD=E((xs1,lW0)=>{var dW0=I0("util"),uD=pW0();lW0.exports={Readable:xD,Writable:fD};dW0.inherits(xD,uD);dW0.inherits(fD,uD);function mW0($,Y,z){$[Y]=function(){return delete $[Y],z.apply(this,arguments),this[Y].apply(this,arguments)}}function xD($,Y){if(!(this instanceof xD))return new xD($,Y);uD.call(this,Y),mW0(this,"_read",function(){var z=$.call(this,Y),U=this.emit.bind(this,"error");z.on("error",U),z.pipe(this)}),this.emit("readable")}function fD($,Y){if(!(this instanceof fD))return new fD($,Y);uD.call(this,Y),mW0(this,"_write",function(){var z=$.call(this,Y),U=this.emit.bind(this,"error");z.on("error",U),this.pipe(z)}),this.emit("writable")}});var Sz=E((fs1,oW0)=>{/*! * normalize-path * * Copyright (c) 2014-2018, Jon Schlinkert. * Released under the MIT License. - */oW0.exports=function($,Y){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/")return"/";var z=$.length;if(z<=1)return $;var U="";if(z>4&&$[3]==="\\"){var Q=$[2];if((Q==="?"||Q===".")&&$.slice(0,2)==="\\\\")$=$.slice(2),U="//"}var J=$.split(/[/\\]+/);if(Y!==!1&&J[J.length-1]==="")J.pop();return U+J.join("/")}});var su=E((us1,YX0)=>{var sW0=9007199254740991,iQ1="[object Arguments]",nQ1="[object Function]",cQ1="[object GeneratorFunction]",pQ1=/^(?:0|[1-9]\d*)$/;function aW0($,Y,z){switch(z.length){case 0:return $.call(Y);case 1:return $.call(Y,z[0]);case 2:return $.call(Y,z[0],z[1]);case 3:return $.call(Y,z[0],z[1],z[2])}return $.apply(Y,z)}function dQ1($,Y){var z=-1,U=Array($);while(++z<$)U[z]=Y(z);return U}var KX=Object.prototype,GX=KX.hasOwnProperty,tW0=KX.toString,mQ1=KX.propertyIsEnumerable,rW0=Math.max;function lQ1($,Y){var z=UJ1($)||zJ1($)?dQ1($.length,String):[],U=z.length,Q=!!U;for(var J in $)if((Y||GX.call($,J))&&!(Q&&(J=="length"||$X0(J,U))))z.push(J);return z}function oQ1($,Y,z,U){if($===void 0||lu($,KX[z])&&!GX.call(U,z))return Y;return $}function rQ1($,Y,z){var U=$[Y];if(!(GX.call($,Y)&&lu(U,z))||z===void 0&&!(Y in $))$[Y]=z}function sQ1($){if(!ru($))return YJ1($);var Y=$J1($),z=[];for(var U in $)if(!(U=="constructor"&&(Y||!GX.call($,U))))z.push(U);return z}function eW0($,Y){return Y=rW0(Y===void 0?$.length-1:Y,0),function(){var z=arguments,U=-1,Q=rW0(z.length-Y,0),J=Array(Q);while(++U1?z[Q-1]:void 0,I=Q>2?z[2]:void 0;if(J=$.length>3&&typeof J=="function"?(Q--,J):void 0,I&&eQ1(z[0],z[1],I))J=Q<3?void 0:J,Q=1;Y=Object(Y);while(++U-1&&$%1==0&&$-1&&$%1==0&&$<=sW0}function ru($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function KJ1($){return!!$&&typeof $=="object"}var GJ1=tQ1(function($,Y,z,U){aQ1(Y,WJ1(Y),$,U)}),HJ1=eW0(function($){return $.push(void 0,oQ1),aW0(GJ1,void 0,$)});function WJ1($){return ou($)?lQ1($,!0):sQ1($)}YX0.exports=HJ1});var UX0=E((bs1,au)=>{function XJ1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var zX0=K6().Buffer,HX=I0("util");function ZJ1($,Y,z){$.copy(Y,z)}au.exports=function(){function $(){XJ1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return zX0.alloc(0);var U=zX0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)ZJ1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(HX&&HX.inspect&&HX.inspect.custom)au.exports.prototype[HX.inspect.custom]=function(){var $=HX.inspect({length:this.length});return this.constructor.name+" "+$}});var tu=E((is1,QX0)=>{var iD=I6();function qJ1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)iD.nextTick(nD,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,iD.nextTick(nD,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)iD.nextTick(nD,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,iD.nextTick(nD,z,J)}else if(Y)Y(J)}),this}function VJ1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function nD($,Y){$.emit("error",Y)}QX0.exports={destroy:qJ1,undestroy:VJ1}});var $b=E((ns1,ZX0)=>{var gz=I6();ZX0.exports=V6;function IX0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){hJ1(Y,$)}}var LJ1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:gz.nextTick,ZI;V6.WritableState=XX;var KX0=Object.create(M4());KX0.inherits=X1();var FJ1={deprecate:f7()},GX0=I0("stream"),pD=K6().Buffer,OJ1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function wJ1($){return pD.from($)}function MJ1($){return pD.isBuffer($)||$ instanceof OJ1}var HX0=tu();KX0.inherits(V6,GX0);function NJ1(){}function XX($,Y){ZI=ZI||yz(),$=$||{};var z=Y instanceof ZI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){EJ1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new IX0(this)}XX.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(XX.prototype,"buffer",{get:FJ1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var cD;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")cD=Function.prototype[Symbol.hasInstance],Object.defineProperty(V6,Symbol.hasInstance,{value:function($){if(cD.call(this,$))return!0;if(this!==V6)return!1;return $&&$._writableState instanceof XX}});else cD=function($){return $ instanceof this};function V6($){if(ZI=ZI||yz(),!cD.call(V6,this)&&!(this instanceof ZI))return new V6($);if(this._writableState=new XX($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}GX0.call(this)}V6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function DJ1($,Y){var z=Error("write after end");$.emit("error",z),gz.nextTick(Y,z)}function AJ1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),gz.nextTick(U,J),Q=!1;return Q}V6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&MJ1($);if(J&&!pD.isBuffer($))$=wJ1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=NJ1;if(U.ended)DJ1(this,z);else if(J||AJ1(this,U,$,z))U.pendingcb++,Q=PJ1(this,U,J,$,Y,z);return Q};V6.prototype.cork=function(){var $=this._writableState;$.corked++};V6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)WX0(this,$)}};V6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function BJ1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=pD.from(Y,z);return Y}Object.defineProperty(V6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function PJ1($,Y,z,U,Q,J){if(!z){var I=BJ1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var qX0=I6(),SJ1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};FX0.exports=A3;var VX0=Object.create(M4());VX0.inherits=X1();var LX0=zb(),Yb=$b();VX0.inherits(A3,LX0);{dD=SJ1(Yb.prototype);for(ZX=0;ZX{var Qb=K6().Buffer,OX0=Qb.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function kJ1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function xJ1($){var Y=kJ1($);if(typeof Y!=="string"&&(Qb.isEncoding===OX0||!OX0($)))throw Error("Unknown encoding: "+$);return Y||$}rJ1.StringDecoder=VX;function VX($){this.encoding=xJ1($);var Y;switch(this.encoding){case"utf16le":this.text=cJ1,this.end=pJ1,Y=4;break;case"utf8":this.fillLast=bJ1,Y=4;break;case"base64":this.text=dJ1,this.end=mJ1,Y=3;break;default:this.write=lJ1,this.end=oJ1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Qb.allocUnsafe(Y)}VX.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};VX.prototype.end=nJ1;VX.prototype.text=iJ1;VX.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function Ub($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function fJ1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function uJ1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function bJ1($){var Y=this.lastTotal-this.lastNeed,z=uJ1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function iJ1($,Y){var z=fJ1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function nJ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function cJ1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function pJ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function dJ1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function mJ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function lJ1($){return $.toString(this.encoding)}function oJ1($){return $&&$.length?this.write($):""}});var zb=E((ms1,RX0)=>{var VI=I6();RX0.exports=C4;var aJ1=$J(),LX;C4.ReadableState=PX0;var ds1=I0("events").EventEmitter,DX0=function($,Y){return $.listeners(Y).length},Wb=I0("stream"),FX=K6().Buffer,tJ1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function eJ1($){return FX.from($)}function $I1($){return FX.isBuffer($)||$ instanceof tJ1}var AX0=Object.create(M4());AX0.inherits=X1();var Ib=I0("util"),$4=void 0;if(Ib&&Ib.debuglog)$4=Ib.debuglog("stream");else $4=function(){};var YI1=UX0(),BX0=tu(),qI;AX0.inherits(C4,Wb);var Kb=["error","close","destroy","pause","resume"];function zI1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(aJ1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function PX0($,Y){LX=LX||yz(),$=$||{};var z=Y instanceof LX;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new YI1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!qI)qI=Jb().StringDecoder;this.decoder=new qI($.encoding),this.encoding=$.encoding}}function C4($){if(LX=LX||yz(),!(this instanceof C4))return new C4($);if(this._readableState=new PX0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}Wb.call(this)}Object.defineProperty(C4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});C4.prototype.destroy=BX0.destroy;C4.prototype._undestroy=BX0.undestroy;C4.prototype._destroy=function($,Y){this.push(null),Y($)};C4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=FX.from($,Y),Y="";U=!0}}else U=!0;return jX0(this,$,Y,!1,U)};C4.prototype.unshift=function($){return jX0(this,$,null,!0,!1)};function jX0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,II1($,J);else{var I;if(!Q)I=UI1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==FX.prototype)Y=eJ1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else Gb($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)Gb($,J,Y,!1);else TX0($,J);else Gb($,J,Y,!1)}else if(!U)J.reading=!1}return QI1(J)}function Gb($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)mD($)}TX0($,Y)}function UI1($,Y){var z;if(!$I1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function QI1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}C4.prototype.isPaused=function(){return this._readableState.flowing===!1};C4.prototype.setEncoding=function($){if(!qI)qI=Jb().StringDecoder;return this._readableState.decoder=new qI($),this._readableState.encoding=$,this};var wX0=8388608;function JI1($){if($>=wX0)$=wX0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function MX0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=JI1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}C4.prototype.read=function($){$4("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if($4("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)Hb(this);else mD(this);return null}if($=MX0($,Y),$===0&&Y.ended){if(Y.length===0)Hb(this);return null}var U=Y.needReadable;if($4("need readable",U),Y.length===0||Y.length-$0)Q=EX0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)Hb(this)}if(Q!==null)this.emit("data",Q);return Q};function II1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,mD($)}function mD($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if($4("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)VI.nextTick(NX0,$);else NX0($)}function NX0($){$4("emit readable"),$.emit("readable"),Xb($)}function TX0($,Y){if(!Y.readingMore)Y.readingMore=!0,VI.nextTick(KI1,$,Y)}function KI1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&CX0(U.pipes,$)!==-1)&&!H)$4("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if($4("onerror",O),w(),$.removeListener("error",q),DX0($,"error")===0)$.emit("error",O)}zI1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){$4("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){$4("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)$4("pipe resume"),z.resume();return $};function GI1($){return function(){var Y=$._readableState;if($4("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&DX0($,"data"))Y.flowing=!0,Xb($)}}C4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=ZI1($,Y.buffer,Y.decoder);return z}function ZI1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function VI1($,Y){var z=FX.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function Hb($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,VI.nextTick(LI1,Y,$)}function LI1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function CX0($,Y){for(var z=0,U=$.length;z{hX0.exports=B3;var lD=yz(),vX0=Object.create(M4());vX0.inherits=X1();vX0.inherits(B3,lD);function FI1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{yX0.exports=OX;var SX0=Zb(),gX0=Object.create(M4());gX0.inherits=X1();gX0.inherits(OX,SX0);function OX($){if(!(this instanceof OX))return new OX($);SX0.call(this,$)}OX.prototype._transform=function($,Y,z){z(null,$)}});var xX0=E((e6,oD)=>{var V9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&V9)oD.exports=V9,e6=oD.exports=V9.Readable,e6.Readable=V9.Readable,e6.Writable=V9.Writable,e6.Duplex=V9.Duplex,e6.Transform=V9.Transform,e6.PassThrough=V9.PassThrough,e6.Stream=V9;else e6=oD.exports=zb(),e6.Stream=V9||e6,e6.Readable=e6,e6.Writable=$b(),e6.Duplex=yz(),e6.Transform=Zb(),e6.PassThrough=kX0()});var Vb=E((rs1,nX0)=>{var wI1=9007199254740991,MI1="[object Arguments]",NI1="[object Function]",DI1="[object GeneratorFunction]",AI1=typeof global=="object"&&global&&global.Object===Object&&global,BI1=typeof self=="object"&&self&&self.Object===Object&&self,PI1=AI1||BI1||Function("return this")();function jI1($,Y){var z=-1,U=Y.length,Q=$.length;while(++z0&&z(K))if(Y>1)iX0(K,Y-1,z,U,Q);else jI1(Q,K);else if(!U)Q[Q.length]=K}return Q}function CI1($){return vI1($)||_I1($)||!!(uX0&&$&&$[uX0])}function RI1($){var Y=$?$.length:0;return Y?iX0($,1):[]}function _I1($){return SI1($)&&TI1.call($,"callee")&&(!EI1.call($,"callee")||bX0.call($)==MI1)}var vI1=Array.isArray;function hI1($){return $!=null&&yI1($.length)&&!gI1($)}function SI1($){return xI1($)&&hI1($)}function gI1($){var Y=kI1($)?bX0.call($):"";return Y==NI1||Y==DI1}function yI1($){return typeof $=="number"&&$>-1&&$%1==0&&$<=wI1}function kI1($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function xI1($){return!!$&&typeof $=="object"}nX0.exports=RI1});var Nb=E((ss1,eX0)=>{var fI1=200,Ob="__lodash_hash_undefined__",uI1=9007199254740991,bI1="[object Arguments]",iI1="[object Function]",nI1="[object GeneratorFunction]",cI1=/[\\^$.*+?()[\]{}|]/g,pI1=/^\[object .+?Constructor\]$/,dI1=typeof global=="object"&&global&&global.Object===Object&&global,mI1=typeof self=="object"&&self&&self.Object===Object&&self,wb=dI1||mI1||Function("return this")();function lI1($,Y,z){switch(z.length){case 0:return $.call(Y);case 1:return $.call(Y,z[0]);case 2:return $.call(Y,z[0],z[1]);case 3:return $.call(Y,z[0],z[1],z[2])}return $.apply(Y,z)}function oI1($,Y){var z=$?$.length:0;return!!z&&eI1($,Y,0)>-1}function rI1($,Y,z){var U=-1,Q=$?$.length:0;while(++U-1}function NK1($,Y){var z=this.__data__,U=aD(z,$);if(U<0)z.push([$,Y]);else z[U][1]=Y;return this}LI.prototype.clear=FK1;LI.prototype.delete=OK1;LI.prototype.get=wK1;LI.prototype.has=MK1;LI.prototype.set=NK1;function FI($){var Y=-1,z=$?$.length:0;this.clear();while(++Y=fI1)J=zK1,I=!1,Y=new rD(Y);$:while(++Q0&&z(K))if(Y>1)rX0(K,Y-1,z,U,Q);else aI1(Q,K);else if(!U)Q[Q.length]=K}return Q}function RK1($){if(!tX0($)||SK1($))return!1;var Y=aX0($)||QK1($)?KK1:pI1;return Y.test(gK1($))}function _K1($,Y){return Y=mX0(Y===void 0?$.length-1:Y,0),function(){var z=arguments,U=-1,Q=mX0(z.length-Y,0),J=Array(Q);while(++U-1&&$%1==0&&$<=uI1}function tX0($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function iK1($){return!!$&&typeof $=="object"}eX0.exports=yK1});var Tb=E((as1,XZ0)=>{var nK1=200,Bb="__lodash_hash_undefined__",cK1=1/0,pK1=9007199254740991,dK1="[object Arguments]",mK1="[object Function]",lK1="[object GeneratorFunction]",oK1=/[\\^$.*+?()[\]{}|]/g,rK1=/^\[object .+?Constructor\]$/,sK1=typeof global=="object"&&global&&global.Object===Object&&global,aK1=typeof self=="object"&&self&&self.Object===Object&&self,$A=sK1||aK1||Function("return this")();function tK1($,Y,z){switch(z.length){case 0:return $.call(Y);case 1:return $.call(Y,z[0]);case 2:return $.call(Y,z[0],z[1]);case 3:return $.call(Y,z[0],z[1],z[2])}return $.apply(Y,z)}function eK1($,Y){var z=$?$.length:0;return!!z&&UG1($,Y,0)>-1}function $G1($,Y,z){var U=-1,Q=$?$.length:0;while(++U-1}function BG1($,Y){var z=this.__data__,U=zA(z,$);if(U<0)z.push([$,Y]);else z[U][1]=Y;return this}OI.prototype.clear=MG1;OI.prototype.delete=NG1;OI.prototype.get=DG1;OI.prototype.has=AG1;OI.prototype.set=BG1;function wI($){var Y=-1,z=$?$.length:0;this.clear();while(++Y0&&z(K))if(Y>1)KZ0(K,Y-1,z,U,Q);else YG1(Q,K);else if(!U)Q[Q.length]=K}return Q}function vG1($){if(!WZ0($)||xG1($))return!1;var Y=HZ0($)||KG1($)?WG1:rK1;return Y.test(fG1($))}function hG1($,Y){return Y=UZ0(Y===void 0?$.length-1:Y,0),function(){var z=arguments,U=-1,Q=UZ0(z.length-Y,0),J=Array(Q);while(++U=nK1){var H=Y?null:gG1($);if(H)return QZ0(H);I=!1,Q=JG1,G=new eD}else G=Y?[]:K;$:while(++U-1&&$%1==0&&$<=pK1}function WZ0($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function dG1($){return!!$&&typeof $=="object"}function mG1(){}XZ0.exports=uG1});var Eb=E((ts1,VZ0)=>{var lG1="[object Object]";function oG1($){var Y=!1;if($!=null&&typeof $.toString!="function")try{Y=!!($+"")}catch(z){}return Y}function rG1($,Y){return function(z){return $(Y(z))}}var sG1=Function.prototype,ZZ0=Object.prototype,qZ0=sG1.toString,aG1=ZZ0.hasOwnProperty,tG1=qZ0.call(Object),eG1=ZZ0.toString,$H1=rG1(Object.getPrototypeOf,Object);function YH1($){return!!$&&typeof $=="object"}function zH1($){if(!YH1($)||eG1.call($)!=lG1||oG1($))return!1;var Y=$H1($);if(Y===null)return!0;var z=aG1.call(Y,"constructor")&&Y.constructor;return typeof z=="function"&&z instanceof z&&qZ0.call(z)==tG1}VZ0.exports=zH1});var LZ0=E((IH1)=>{var fz=I0("path"),F2=process.platform==="win32",L2=I0("fs"),UH1=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function QH1(){var $;if(UH1){var Y=Error();$=z}else $=U;return $;function z(Q){if(Q)Y.message=Q.message,Q=Y,U(Q)}function U(Q){if(Q){if(process.throwDeprecation)throw Q;else if(!process.noDeprecation){var J="fs: missing callback "+(Q.stack||Q.message);if(process.traceDeprecation)console.trace(J);else console.error(J)}}}}function JH1($){return typeof $==="function"?$:QH1()}var es1=fz.normalize;if(F2)L9=/(.*?)(?:[\/\\]+|$)/g;else L9=/(.*?)(?:[\/]+|$)/g;var L9;if(F2)MI=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else MI=/^[\/]*/;var MI;IH1.realpathSync=function(Y,z){if(Y=fz.resolve(Y),z&&Object.prototype.hasOwnProperty.call(z,Y))return z[Y];var U=Y,Q={},J={},I,K,G,H;W();function W(){var w=MI.exec(Y);if(I=w[0].length,K=w[0],G=w[0],H="",F2&&!J[G])L2.lstatSync(G),J[G]=!0}while(I=Y.length){if(z)z[Q]=Y;return U(null,Y)}L9.lastIndex=K;var w=L9.exec(Y);if(W=G,G+=w[0],H=W+w[1],K=L9.lastIndex,I[H]||z&&z[H]===H)return process.nextTick(Z);if(z&&Object.prototype.hasOwnProperty.call(z,H))return F(z[H]);return L2.lstat(H,q)}function q(w,O){if(w)return U(w);if(!O.isSymbolicLink()){if(I[H]=!0,z)z[H]=H;return process.nextTick(Z)}if(!F2){var N=O.dev.toString(32)+":"+O.ino.toString(32);if(J.hasOwnProperty(N))return V(null,J[N],H)}L2.stat(H,function(M){if(M)return U(M);L2.readlink(H,function(D,P){if(!F2)J[N]=P;V(D,P)})})}function V(w,O,N){if(w)return U(w);var M=fz.resolve(W,O);if(z)z[N]=M;F(M)}function F(w){Y=fz.resolve(w,Y.slice(K)),X()}}});var vb=E((Ya1,MZ0)=>{MZ0.exports=O2;O2.realpath=O2;O2.sync=_b;O2.realpathSync=_b;O2.monkeypatch=WH1;O2.unmonkeypatch=XH1;var NI=I0("fs"),Cb=NI.realpath,Rb=NI.realpathSync,HH1=process.version,FZ0=/^v[0-5]\./.test(HH1),OZ0=LZ0();function wZ0($){return $&&$.syscall==="realpath"&&($.code==="ELOOP"||$.code==="ENOMEM"||$.code==="ENAMETOOLONG")}function O2($,Y,z){if(FZ0)return Cb($,Y,z);if(typeof Y==="function")z=Y,Y=null;Cb($,Y,function(U,Q){if(wZ0(U))OZ0.realpath($,Y,z);else z(U,Q)})}function _b($,Y){if(FZ0)return Rb($,Y);try{return Rb($,Y)}catch(z){if(wZ0(z))return OZ0.realpathSync($,Y);else throw z}}function WH1(){NI.realpath=O2,NI.realpathSync=_b}function XH1(){NI.realpath=Cb,NI.realpathSync=Rb}});var DZ0=E((za1,NZ0)=>{NZ0.exports=function($,Y){var z=[];for(var U=0;U<$.length;U++){var Q=Y($[U],U);if(ZH1(Q))z.push.apply(z,Q);else z.push(Q)}return z};var ZH1=Array.isArray||function($){return Object.prototype.toString.call($)==="[object Array]"}});var TZ0=E((Ua1,jZ0)=>{jZ0.exports=BZ0;function BZ0($,Y,z){if($ instanceof RegExp)$=AZ0($,z);if(Y instanceof RegExp)Y=AZ0(Y,z);var U=PZ0($,Y,z);return U&&{start:U[0],end:U[1],pre:z.slice(0,U[0]),body:z.slice(U[0]+$.length,U[1]),post:z.slice(U[1]+Y.length)}}function AZ0($,Y){var z=Y.match($);return z?z[0]:null}BZ0.range=PZ0;function PZ0($,Y,z){var U,Q,J,I,K,G=z.indexOf($),H=z.indexOf(Y,G+1),W=G;if(G>=0&&H>0){if($===Y)return[G,H];U=[],J=z.length;while(W>=0&&!K){if(W==G)U.push(W),G=z.indexOf($,W+1);else if(U.length==1)K=[U.pop(),H];else{if(Q=U.pop(),Q=0?G:H}if(U.length)K=[J,I]}return K}});var gZ0=E((Ja1,SZ0)=>{var Qa1=DZ0(),EZ0=TZ0();SZ0.exports=OH1;var CZ0="\x00SLASH"+Math.random()+"\x00",RZ0="\x00OPEN"+Math.random()+"\x00",gb="\x00CLOSE"+Math.random()+"\x00",_Z0="\x00COMMA"+Math.random()+"\x00",vZ0="\x00PERIOD"+Math.random()+"\x00",qH1=1e5,VH1=4000000;function hb($){return parseInt($,10)==$?parseInt($,10):$.charCodeAt(0)}function LH1($){return $.split("\\\\").join(CZ0).split("\\{").join(RZ0).split("\\}").join(gb).split("\\,").join(_Z0).split("\\.").join(vZ0)}function FH1($){return $.split(CZ0).join("\\").split(RZ0).join("{").split(gb).join("}").split(_Z0).join(",").split(vZ0).join(".")}function hZ0($){if(!$)return[""];var Y=[],z=EZ0("{","}",$);if(!z)return $.split(",");var{pre:U,body:Q,post:J}=z,I=U.split(",");I[I.length-1]+="{"+Q+"}";var K=hZ0(J);if(J.length)I[I.length-1]+=K.shift(),I.push.apply(I,K);return Y.push.apply(Y,I),Y}function OH1($,Y){if(!$)return[];Y=Y||{};var z=Y.max==null?qH1:Y.max,U=Y.maxLength==null?VH1:Y.maxLength;if($.substr(0,2)==="{}")$="\\{\\}"+$.substr(2);return Sb(LH1($),z,U,!0).map(FH1)}function wH1($){return"{"+$+"}"}function MH1($){return/^-?0\d/.test($)}function NH1($,Y){return $<=Y}function DH1($,Y){return $>=Y}function NX($,Y,z,U,Q,J,I,K){var G=[],H=0;for(var W=0;W<$.length;W++)for(var X=0;X=Q)return G;var Z=$[W]+z+U[X];if(I&&Z.length===Y[W])continue;if(H+Z.length>J)return G;G.push(Z),K.push(Y[W]),H+=Z.length}return G}function AH1($,Y,z,U){var Q=$.split(/\.\./),J=[];if(Q[0]===void 0||Q[1]===void 0)return J;var I=hb(Q[0]),K=hb(Q[1]),G=Math.max(Q[0].length,Q[1].length),H=Q.length===3&&Q[2]!==void 0?Math.max(Math.abs(hb(Q[2])),1):1,W=NH1,X=K0){var O=Array(w+1).join("0");if(V<0)F="-"+O+F.slice(1);else F=O+F}}if(q+F.length>U)break;J.push(F),q+=F.length}return J}function Sb($,Y,z,U){var Q=[""],J=[0],I=!1,K=!0,G;for(;;){var H=EZ0("{","}",$);if(!H)return NX(Q,J,$,[""],Y,z,I,[]);var W=H.pre;if(/\$$/.test(W))return NX(Q,J,$,[""],Y,z,I,[]);var X=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(H.body),Z=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(H.body),q=X||Z,V=H.body.indexOf(",")>=0;if(!q&&!V){if(H.post.match(/,(?!,).*\}/)){$=H.pre+"{"+H.body+gb+H.post,U=!0,K=!0,I=!1,J=[];for(var F=0;F=Y||D+T.length>z)break $;w.push(T),D+=T.length}}}if(G=[],Q=NX(Q,J,W,w,Y,z,I&&!H.post.length,G),J=G,!H.post.length)break;$=H.post}return Q}});var IA=E((Ia1,uZ0)=>{uZ0.exports=X$;X$.Minimatch=L6;var DX=function(){try{return I0("path")}catch($){}}()||{sep:"/"};X$.sep=DX.sep;var uz=X$.GLOBSTAR=L6.GLOBSTAR={},BH1=gZ0(),yZ0={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},yb="[^/]",kb=yb+"*?",PH1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",jH1="(?:(?!(?:\\/|^)\\.).)*?",kZ0=TH1("().*{}+?[]^$\\!");function TH1($){return $.split("").reduce(function(Y,z){return Y[z]=!0,Y},{})}var xZ0=/\/+/;X$.filter=EH1;function EH1($,Y){return Y=Y||{},function(z,U,Q){return X$(z,$,Y)}}function w2($,Y){Y=Y||{};var z={};return Object.keys($).forEach(function(U){z[U]=$[U]}),Object.keys(Y).forEach(function(U){z[U]=Y[U]}),z}X$.defaults=function($){if(!$||typeof $!=="object"||!Object.keys($).length)return X$;var Y=X$,z=function(Q,J,I){return Y(Q,J,w2($,I))};return z.Minimatch=function(Q,J){return new Y.Minimatch(Q,w2($,J))},z.Minimatch.defaults=function(Q){return Y.defaults(w2($,Q)).Minimatch},z.filter=function(Q,J){return Y.filter(Q,w2($,J))},z.defaults=function(Q){return Y.defaults(w2($,Q))},z.makeRe=function(Q,J){return Y.makeRe(Q,w2($,J))},z.braceExpand=function(Q,J){return Y.braceExpand(Q,w2($,J))},z.match=function(U,Q,J){return Y.match(U,Q,w2($,J))},z};L6.defaults=function($){return X$.defaults($).Minimatch};function X$($,Y,z){if(JA(Y),!z)z={};if(!z.nocomment&&Y.charAt(0)==="#")return!1;return new L6(Y,z).match($)}function L6($,Y){if(!(this instanceof L6))return new L6($,Y);if(JA($),!Y)Y={};if($=$.trim(),!Y.allowWindowsEscape&&DX.sep!=="/")$=$.split(DX.sep).join("/");this.options=Y,this.maxGlobstarRecursion=Y.maxGlobstarRecursion!==void 0?Y.maxGlobstarRecursion:200,this.set=[],this.pattern=$,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!Y.partial,this.make()}L6.prototype.debug=function(){};L6.prototype.make=CH1;function CH1(){var $=this.pattern,Y=this.options;if(!Y.nocomment&&$.charAt(0)==="#"){this.comment=!0;return}if(!$){this.empty=!0;return}this.parseNegate();var z=this.globSet=this.braceExpand();if(Y.debug)this.debug=function(){console.error.apply(console,arguments)};this.debug(this.pattern,z),z=this.globParts=z.map(function(U){return U.split(xZ0)}),this.debug(this.pattern,z),z=z.map(function(U,Q,J){return U.map(this.parse,this)},this),this.debug(this.pattern,z),z=z.filter(function(U){return U.indexOf(!1)===-1}),this.debug(this.pattern,z),this.set=z}L6.prototype.parseNegate=RH1;function RH1(){var $=this.pattern,Y=!1,z=this.options,U=0;if(z.nonegate)return;for(var Q=0,J=$.length;Q"u"?this.pattern:$,JA($),Y.nobrace||!/\{(?:(?!\{).)*\}/.test($))return[$];return BH1($)}var _H1=65536,JA=function($){if(typeof $!=="string")throw TypeError("invalid pattern");if($.length>_H1)throw TypeError("pattern is too long")};L6.prototype.parse=vH1;var QA={};function vH1($,Y){JA($);var z=this.options;if($==="**")if(!z.noglobstar)return uz;else $="*";if($==="")return"";var U="",Q=!!z.nocase,J=!1,I=[],K=[],G,H=!1,W=-1,X=-1,Z=$.charAt(0)==="."?"":z.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",q=this;function V(){if(G){switch(G){case"*":U+=kb,Q=!0;break;case"?":U+=yb,Q=!0;break;default:U+="\\"+G;break}q.debug("clearStateChar %j %j",G,U),G=!1}}for(var F=0,w=$.length,O;F-1;T--){var C=K[T],b=U.slice(0,C.reStart),k=U.slice(C.reStart,C.reEnd-8),S=U.slice(C.reEnd-8,C.reEnd),i=U.slice(C.reEnd);S+=i;var n=b.split("(").length-1,U0=i;for(F=0;F"u")z=this.partial;if(this.debug("match",Y,this.pattern),this.comment)return!1;if(this.empty)return Y==="";if(Y==="/"&&z)return!0;var U=this.options;if(DX.sep!=="/")Y=Y.split(DX.sep).join("/");Y=Y.split(xZ0),this.debug(this.pattern,"split",Y);var Q=this.set;this.debug(this.pattern,"set",Q);var J,I;for(I=Y.length-1;I>=0;I--)if(J=Y[I],J)break;for(I=0;I=0;J--)if(Y[J]===uz){K=J;break}var G=Y.slice(Q,I),H=z?Y.slice(I+1):Y.slice(I+1,K),W=z?[]:Y.slice(K+1);if(G.length){var X=$.slice(U,U+G.length);if(!this._matchOne(X,G,z,0,0))return!1;U+=G.length}var Z=0;if(W.length){if(W.length+U>$.length)return!1;var q=$.length-W.length;if(this._matchOne($,W,z,q,0))Z=W.length;else{if($[$.length-1]!==""||U+W.length===$.length)return!1;if(q--,!this._matchOne($,W,z,q,0))return!1;Z=W.length+1}}if(!H.length){var V=!!Z;for(J=U;J<$.length-Z;J++){var F=String($[J]);if(V=!0,F==="."||F===".."||!this.options.dot&&F.charAt(0)===".")return!1}return z||V}var w=[[[],0]],O=w[0],N=0,M=[0];for(var D=0;D{function bZ0($){return $.charAt(0)==="/"}function iZ0($){var Y=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,z=Y.exec($),U=z[1]||"",Q=Boolean(U&&U.charAt(1)!==":");return Boolean(z[2]||Q)}KA.exports=process.platform==="win32"?iZ0:bZ0;KA.exports.posix=bZ0;KA.exports.win32=iZ0});var fb=E((pH1)=>{pH1.setopts=bH1;pH1.ownProp=nZ0;pH1.makeAbs=AX;pH1.finish=iH1;pH1.mark=nH1;pH1.isIgnored=pZ0;pH1.childrenIgnored=cH1;function nZ0($,Y){return Object.prototype.hasOwnProperty.call($,Y)}var yH1=I0("fs"),DI=I0("path"),kH1=IA(),cZ0=GA(),xb=kH1.Minimatch;function xH1($,Y){return $.localeCompare(Y,"en")}function fH1($,Y){if($.ignore=Y.ignore||[],!Array.isArray($.ignore))$.ignore=[$.ignore];if($.ignore.length)$.ignore=$.ignore.map(uH1)}function uH1($){var Y=null;if($.slice(-3)==="/**"){var z=$.replace(/(\/\*\*)+$/,"");Y=new xb(z,{dot:!0})}return{matcher:new xb($,{dot:!0}),gmatcher:Y}}function bH1($,Y,z){if(!z)z={};if(z.matchBase&&Y.indexOf("/")===-1){if(z.noglobstar)throw Error("base matching requires globstar");Y="**/"+Y}if($.silent=!!z.silent,$.pattern=Y,$.strict=z.strict!==!1,$.realpath=!!z.realpath,$.realpathCache=z.realpathCache||Object.create(null),$.follow=!!z.follow,$.dot=!!z.dot,$.mark=!!z.mark,$.nodir=!!z.nodir,$.nodir)$.mark=!0;$.sync=!!z.sync,$.nounique=!!z.nounique,$.nonull=!!z.nonull,$.nosort=!!z.nosort,$.nocase=!!z.nocase,$.stat=!!z.stat,$.noprocess=!!z.noprocess,$.absolute=!!z.absolute,$.fs=z.fs||yH1,$.maxLength=z.maxLength||1/0,$.cache=z.cache||Object.create(null),$.statCache=z.statCache||Object.create(null),$.symlinks=z.symlinks||Object.create(null),fH1($,z),$.changedCwd=!1;var U=process.cwd();if(!nZ0(z,"cwd"))$.cwd=U;else $.cwd=DI.resolve(z.cwd),$.changedCwd=$.cwd!==U;if($.root=z.root||DI.resolve($.cwd,"/"),$.root=DI.resolve($.root),process.platform==="win32")$.root=$.root.replace(/\\/g,"/");if($.cwdAbs=cZ0($.cwd)?$.cwd:AX($,$.cwd),process.platform==="win32")$.cwdAbs=$.cwdAbs.replace(/\\/g,"/");$.nomount=!!z.nomount,z.nonegate=!0,z.nocomment=!0,z.allowWindowsEscape=!1,$.minimatch=new xb(Y,z),$.options=$.minimatch.options}function iH1($){var Y=$.nounique,z=Y?[]:Object.create(null);for(var U=0,Q=$.matches.length;U{oZ0.exports=lZ0;lZ0.GlobSync=T6;var tH1=vb(),dZ0=IA(),Ha1=dZ0.Minimatch,Wa1=BX().Glob,Xa1=I0("util"),ub=I0("path"),mZ0=I0("assert"),HA=GA(),bz=fb(),eH1=bz.setopts,bb=bz.ownProp,$W1=bz.childrenIgnored,YW1=bz.isIgnored;function lZ0($,Y){if(typeof Y==="function"||arguments.length===3)throw TypeError(`callback provided to sync glob + */oW0.exports=function($,Y){if(typeof $!=="string")throw TypeError("expected path to be a string");if($==="\\"||$==="/")return"/";var z=$.length;if(z<=1)return $;var U="";if(z>4&&$[3]==="\\"){var Q=$[2];if((Q==="?"||Q===".")&&$.slice(0,2)==="\\\\")$=$.slice(2),U="//"}var J=$.split(/[/\\]+/);if(Y!==!1&&J[J.length-1]==="")J.pop();return U+J.join("/")}});var su=E((us1,YX0)=>{var sW0=9007199254740991,iQ1="[object Arguments]",nQ1="[object Function]",cQ1="[object GeneratorFunction]",pQ1=/^(?:0|[1-9]\d*)$/;function aW0($,Y,z){switch(z.length){case 0:return $.call(Y);case 1:return $.call(Y,z[0]);case 2:return $.call(Y,z[0],z[1]);case 3:return $.call(Y,z[0],z[1],z[2])}return $.apply(Y,z)}function dQ1($,Y){var z=-1,U=Array($);while(++z<$)U[z]=Y(z);return U}var KX=Object.prototype,GX=KX.hasOwnProperty,tW0=KX.toString,mQ1=KX.propertyIsEnumerable,rW0=Math.max;function lQ1($,Y){var z=UJ1($)||zJ1($)?dQ1($.length,String):[],U=z.length,Q=!!U;for(var J in $)if((Y||GX.call($,J))&&!(Q&&(J=="length"||$X0(J,U))))z.push(J);return z}function oQ1($,Y,z,U){if($===void 0||lu($,KX[z])&&!GX.call(U,z))return Y;return $}function rQ1($,Y,z){var U=$[Y];if(!(GX.call($,Y)&&lu(U,z))||z===void 0&&!(Y in $))$[Y]=z}function sQ1($){if(!ru($))return YJ1($);var Y=$J1($),z=[];for(var U in $)if(!(U=="constructor"&&(Y||!GX.call($,U))))z.push(U);return z}function eW0($,Y){return Y=rW0(Y===void 0?$.length-1:Y,0),function(){var z=arguments,U=-1,Q=rW0(z.length-Y,0),J=Array(Q);while(++U1?z[Q-1]:void 0,I=Q>2?z[2]:void 0;if(J=$.length>3&&typeof J=="function"?(Q--,J):void 0,I&&eQ1(z[0],z[1],I))J=Q<3?void 0:J,Q=1;Y=Object(Y);while(++U-1&&$%1==0&&$-1&&$%1==0&&$<=sW0}function ru($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function KJ1($){return!!$&&typeof $=="object"}var GJ1=tQ1(function($,Y,z,U){aQ1(Y,WJ1(Y),$,U)}),HJ1=eW0(function($){return $.push(void 0,oQ1),aW0(GJ1,void 0,$)});function WJ1($){return ou($)?lQ1($,!0):sQ1($)}YX0.exports=HJ1});var UX0=E((bs1,au)=>{function XJ1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var zX0=K6().Buffer,HX=I0("util");function ZJ1($,Y,z){$.copy(Y,z)}au.exports=function(){function $(){XJ1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return zX0.alloc(0);var U=zX0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)ZJ1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(HX&&HX.inspect&&HX.inspect.custom)au.exports.prototype[HX.inspect.custom]=function(){var $=HX.inspect({length:this.length});return this.constructor.name+" "+$}});var tu=E((is1,QX0)=>{var iD=I6();function qJ1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)iD.nextTick(nD,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,iD.nextTick(nD,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)iD.nextTick(nD,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,iD.nextTick(nD,z,J)}else if(Y)Y(J)}),this}function VJ1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function nD($,Y){$.emit("error",Y)}QX0.exports={destroy:qJ1,undestroy:VJ1}});var $b=E((ns1,ZX0)=>{var gz=I6();ZX0.exports=V6;function IX0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){hJ1(Y,$)}}var LJ1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:gz.nextTick,ZI;V6.WritableState=XX;var KX0=Object.create(M4());KX0.inherits=X1();var FJ1={deprecate:f7()},GX0=I0("stream"),pD=K6().Buffer,OJ1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function wJ1($){return pD.from($)}function MJ1($){return pD.isBuffer($)||$ instanceof OJ1}var HX0=tu();KX0.inherits(V6,GX0);function NJ1(){}function XX($,Y){ZI=ZI||yz(),$=$||{};var z=Y instanceof ZI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){EJ1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new IX0(this)}XX.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(XX.prototype,"buffer",{get:FJ1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var cD;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")cD=Function.prototype[Symbol.hasInstance],Object.defineProperty(V6,Symbol.hasInstance,{value:function($){if(cD.call(this,$))return!0;if(this!==V6)return!1;return $&&$._writableState instanceof XX}});else cD=function($){return $ instanceof this};function V6($){if(ZI=ZI||yz(),!cD.call(V6,this)&&!(this instanceof ZI))return new V6($);if(this._writableState=new XX($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}GX0.call(this)}V6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function DJ1($,Y){var z=Error("write after end");$.emit("error",z),gz.nextTick(Y,z)}function AJ1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),gz.nextTick(U,J),Q=!1;return Q}V6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&MJ1($);if(J&&!pD.isBuffer($))$=wJ1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=NJ1;if(U.ended)DJ1(this,z);else if(J||AJ1(this,U,$,z))U.pendingcb++,Q=PJ1(this,U,J,$,Y,z);return Q};V6.prototype.cork=function(){var $=this._writableState;$.corked++};V6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)WX0(this,$)}};V6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function BJ1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=pD.from(Y,z);return Y}Object.defineProperty(V6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function PJ1($,Y,z,U,Q,J){if(!z){var I=BJ1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var qX0=I6(),SJ1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};FX0.exports=A3;var VX0=Object.create(M4());VX0.inherits=X1();var LX0=zb(),Yb=$b();VX0.inherits(A3,LX0);{dD=SJ1(Yb.prototype);for(ZX=0;ZX{var Qb=K6().Buffer,OX0=Qb.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function kJ1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function xJ1($){var Y=kJ1($);if(typeof Y!=="string"&&(Qb.isEncoding===OX0||!OX0($)))throw Error("Unknown encoding: "+$);return Y||$}rJ1.StringDecoder=VX;function VX($){this.encoding=xJ1($);var Y;switch(this.encoding){case"utf16le":this.text=cJ1,this.end=pJ1,Y=4;break;case"utf8":this.fillLast=bJ1,Y=4;break;case"base64":this.text=dJ1,this.end=mJ1,Y=3;break;default:this.write=lJ1,this.end=oJ1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Qb.allocUnsafe(Y)}VX.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};VX.prototype.end=nJ1;VX.prototype.text=iJ1;VX.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function Ub($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function fJ1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function uJ1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function bJ1($){var Y=this.lastTotal-this.lastNeed,z=uJ1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function iJ1($,Y){var z=fJ1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function nJ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function cJ1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function pJ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function dJ1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function mJ1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function lJ1($){return $.toString(this.encoding)}function oJ1($){return $&&$.length?this.write($):""}});var zb=E((ms1,RX0)=>{var VI=I6();RX0.exports=C4;var aJ1=$J(),LX;C4.ReadableState=PX0;var ds1=I0("events").EventEmitter,DX0=function($,Y){return $.listeners(Y).length},Wb=I0("stream"),FX=K6().Buffer,tJ1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function eJ1($){return FX.from($)}function $I1($){return FX.isBuffer($)||$ instanceof tJ1}var AX0=Object.create(M4());AX0.inherits=X1();var Ib=I0("util"),$4=void 0;if(Ib&&Ib.debuglog)$4=Ib.debuglog("stream");else $4=function(){};var YI1=UX0(),BX0=tu(),qI;AX0.inherits(C4,Wb);var Kb=["error","close","destroy","pause","resume"];function zI1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(aJ1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function PX0($,Y){LX=LX||yz(),$=$||{};var z=Y instanceof LX;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new YI1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!qI)qI=Jb().StringDecoder;this.decoder=new qI($.encoding),this.encoding=$.encoding}}function C4($){if(LX=LX||yz(),!(this instanceof C4))return new C4($);if(this._readableState=new PX0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}Wb.call(this)}Object.defineProperty(C4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});C4.prototype.destroy=BX0.destroy;C4.prototype._undestroy=BX0.undestroy;C4.prototype._destroy=function($,Y){this.push(null),Y($)};C4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=FX.from($,Y),Y="";U=!0}}else U=!0;return jX0(this,$,Y,!1,U)};C4.prototype.unshift=function($){return jX0(this,$,null,!0,!1)};function jX0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,II1($,J);else{var I;if(!Q)I=UI1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==FX.prototype)Y=eJ1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else Gb($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)Gb($,J,Y,!1);else TX0($,J);else Gb($,J,Y,!1)}else if(!U)J.reading=!1}return QI1(J)}function Gb($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)mD($)}TX0($,Y)}function UI1($,Y){var z;if(!$I1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function QI1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}C4.prototype.isPaused=function(){return this._readableState.flowing===!1};C4.prototype.setEncoding=function($){if(!qI)qI=Jb().StringDecoder;return this._readableState.decoder=new qI($),this._readableState.encoding=$,this};var wX0=8388608;function JI1($){if($>=wX0)$=wX0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function MX0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=JI1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}C4.prototype.read=function($){$4("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if($4("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)Hb(this);else mD(this);return null}if($=MX0($,Y),$===0&&Y.ended){if(Y.length===0)Hb(this);return null}var U=Y.needReadable;if($4("need readable",U),Y.length===0||Y.length-$0)Q=EX0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)Hb(this)}if(Q!==null)this.emit("data",Q);return Q};function II1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,mD($)}function mD($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if($4("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)VI.nextTick(NX0,$);else NX0($)}function NX0($){$4("emit readable"),$.emit("readable"),Xb($)}function TX0($,Y){if(!Y.readingMore)Y.readingMore=!0,VI.nextTick(KI1,$,Y)}function KI1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&CX0(U.pipes,$)!==-1)&&!H)$4("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if($4("onerror",O),w(),$.removeListener("error",q),DX0($,"error")===0)$.emit("error",O)}zI1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){$4("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){$4("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)$4("pipe resume"),z.resume();return $};function GI1($){return function(){var Y=$._readableState;if($4("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&DX0($,"data"))Y.flowing=!0,Xb($)}}C4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=ZI1($,Y.buffer,Y.decoder);return z}function ZI1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function VI1($,Y){var z=FX.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function Hb($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,VI.nextTick(LI1,Y,$)}function LI1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function CX0($,Y){for(var z=0,U=$.length;z{hX0.exports=B3;var lD=yz(),vX0=Object.create(M4());vX0.inherits=X1();vX0.inherits(B3,lD);function FI1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{yX0.exports=OX;var SX0=Zb(),gX0=Object.create(M4());gX0.inherits=X1();gX0.inherits(OX,SX0);function OX($){if(!(this instanceof OX))return new OX($);SX0.call(this,$)}OX.prototype._transform=function($,Y,z){z(null,$)}});var xX0=E((e6,oD)=>{var V9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&V9)oD.exports=V9,e6=oD.exports=V9.Readable,e6.Readable=V9.Readable,e6.Writable=V9.Writable,e6.Duplex=V9.Duplex,e6.Transform=V9.Transform,e6.PassThrough=V9.PassThrough,e6.Stream=V9;else e6=oD.exports=zb(),e6.Stream=V9||e6,e6.Readable=e6,e6.Writable=$b(),e6.Duplex=yz(),e6.Transform=Zb(),e6.PassThrough=kX0()});var Vb=E((rs1,nX0)=>{var wI1=9007199254740991,MI1="[object Arguments]",NI1="[object Function]",DI1="[object GeneratorFunction]",AI1=typeof global=="object"&&global&&global.Object===Object&&global,BI1=typeof self=="object"&&self&&self.Object===Object&&self,PI1=AI1||BI1||Function("return this")();function jI1($,Y){var z=-1,U=Y.length,Q=$.length;while(++z0&&z(K))if(Y>1)iX0(K,Y-1,z,U,Q);else jI1(Q,K);else if(!U)Q[Q.length]=K}return Q}function CI1($){return vI1($)||_I1($)||!!(uX0&&$&&$[uX0])}function RI1($){var Y=$?$.length:0;return Y?iX0($,1):[]}function _I1($){return SI1($)&&TI1.call($,"callee")&&(!EI1.call($,"callee")||bX0.call($)==MI1)}var vI1=Array.isArray;function hI1($){return $!=null&&yI1($.length)&&!gI1($)}function SI1($){return xI1($)&&hI1($)}function gI1($){var Y=kI1($)?bX0.call($):"";return Y==NI1||Y==DI1}function yI1($){return typeof $=="number"&&$>-1&&$%1==0&&$<=wI1}function kI1($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function xI1($){return!!$&&typeof $=="object"}nX0.exports=RI1});var Nb=E((ss1,eX0)=>{var fI1=200,Ob="__lodash_hash_undefined__",uI1=9007199254740991,bI1="[object Arguments]",iI1="[object Function]",nI1="[object GeneratorFunction]",cI1=/[\\^$.*+?()[\]{}|]/g,pI1=/^\[object .+?Constructor\]$/,dI1=typeof global=="object"&&global&&global.Object===Object&&global,mI1=typeof self=="object"&&self&&self.Object===Object&&self,wb=dI1||mI1||Function("return this")();function lI1($,Y,z){switch(z.length){case 0:return $.call(Y);case 1:return $.call(Y,z[0]);case 2:return $.call(Y,z[0],z[1]);case 3:return $.call(Y,z[0],z[1],z[2])}return $.apply(Y,z)}function oI1($,Y){var z=$?$.length:0;return!!z&&eI1($,Y,0)>-1}function rI1($,Y,z){var U=-1,Q=$?$.length:0;while(++U-1}function NK1($,Y){var z=this.__data__,U=aD(z,$);if(U<0)z.push([$,Y]);else z[U][1]=Y;return this}LI.prototype.clear=FK1;LI.prototype.delete=OK1;LI.prototype.get=wK1;LI.prototype.has=MK1;LI.prototype.set=NK1;function FI($){var Y=-1,z=$?$.length:0;this.clear();while(++Y=fI1)J=zK1,I=!1,Y=new rD(Y);$:while(++Q0&&z(K))if(Y>1)rX0(K,Y-1,z,U,Q);else aI1(Q,K);else if(!U)Q[Q.length]=K}return Q}function RK1($){if(!tX0($)||SK1($))return!1;var Y=aX0($)||QK1($)?KK1:pI1;return Y.test(gK1($))}function _K1($,Y){return Y=mX0(Y===void 0?$.length-1:Y,0),function(){var z=arguments,U=-1,Q=mX0(z.length-Y,0),J=Array(Q);while(++U-1&&$%1==0&&$<=uI1}function tX0($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function iK1($){return!!$&&typeof $=="object"}eX0.exports=yK1});var Tb=E((as1,XZ0)=>{var nK1=200,Bb="__lodash_hash_undefined__",cK1=1/0,pK1=9007199254740991,dK1="[object Arguments]",mK1="[object Function]",lK1="[object GeneratorFunction]",oK1=/[\\^$.*+?()[\]{}|]/g,rK1=/^\[object .+?Constructor\]$/,sK1=typeof global=="object"&&global&&global.Object===Object&&global,aK1=typeof self=="object"&&self&&self.Object===Object&&self,$A=sK1||aK1||Function("return this")();function tK1($,Y,z){switch(z.length){case 0:return $.call(Y);case 1:return $.call(Y,z[0]);case 2:return $.call(Y,z[0],z[1]);case 3:return $.call(Y,z[0],z[1],z[2])}return $.apply(Y,z)}function eK1($,Y){var z=$?$.length:0;return!!z&&UG1($,Y,0)>-1}function $G1($,Y,z){var U=-1,Q=$?$.length:0;while(++U-1}function BG1($,Y){var z=this.__data__,U=zA(z,$);if(U<0)z.push([$,Y]);else z[U][1]=Y;return this}OI.prototype.clear=MG1;OI.prototype.delete=NG1;OI.prototype.get=DG1;OI.prototype.has=AG1;OI.prototype.set=BG1;function wI($){var Y=-1,z=$?$.length:0;this.clear();while(++Y0&&z(K))if(Y>1)KZ0(K,Y-1,z,U,Q);else YG1(Q,K);else if(!U)Q[Q.length]=K}return Q}function vG1($){if(!WZ0($)||xG1($))return!1;var Y=HZ0($)||KG1($)?WG1:rK1;return Y.test(fG1($))}function hG1($,Y){return Y=UZ0(Y===void 0?$.length-1:Y,0),function(){var z=arguments,U=-1,Q=UZ0(z.length-Y,0),J=Array(Q);while(++U=nK1){var H=Y?null:gG1($);if(H)return QZ0(H);I=!1,Q=JG1,G=new eD}else G=Y?[]:K;$:while(++U-1&&$%1==0&&$<=pK1}function WZ0($){var Y=typeof $;return!!$&&(Y=="object"||Y=="function")}function dG1($){return!!$&&typeof $=="object"}function mG1(){}XZ0.exports=uG1});var Eb=E((ts1,VZ0)=>{var lG1="[object Object]";function oG1($){var Y=!1;if($!=null&&typeof $.toString!="function")try{Y=!!($+"")}catch(z){}return Y}function rG1($,Y){return function(z){return $(Y(z))}}var sG1=Function.prototype,ZZ0=Object.prototype,qZ0=sG1.toString,aG1=ZZ0.hasOwnProperty,tG1=qZ0.call(Object),eG1=ZZ0.toString,$H1=rG1(Object.getPrototypeOf,Object);function YH1($){return!!$&&typeof $=="object"}function zH1($){if(!YH1($)||eG1.call($)!=lG1||oG1($))return!1;var Y=$H1($);if(Y===null)return!0;var z=aG1.call(Y,"constructor")&&Y.constructor;return typeof z=="function"&&z instanceof z&&qZ0.call(z)==tG1}VZ0.exports=zH1});var LZ0=E((IH1)=>{var fz=I0("path"),F2=process.platform==="win32",L2=I0("fs"),UH1=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function QH1(){var $;if(UH1){var Y=Error();$=z}else $=U;return $;function z(Q){if(Q)Y.message=Q.message,Q=Y,U(Q)}function U(Q){if(Q){if(process.throwDeprecation)throw Q;else if(!process.noDeprecation){var J="fs: missing callback "+(Q.stack||Q.message);if(process.traceDeprecation)console.trace(J);else console.error(J)}}}}function JH1($){return typeof $==="function"?$:QH1()}var es1=fz.normalize;if(F2)L9=/(.*?)(?:[\/\\]+|$)/g;else L9=/(.*?)(?:[\/]+|$)/g;var L9;if(F2)MI=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else MI=/^[\/]*/;var MI;IH1.realpathSync=function(Y,z){if(Y=fz.resolve(Y),z&&Object.prototype.hasOwnProperty.call(z,Y))return z[Y];var U=Y,Q={},J={},I,K,G,H;W();function W(){var w=MI.exec(Y);if(I=w[0].length,K=w[0],G=w[0],H="",F2&&!J[G])L2.lstatSync(G),J[G]=!0}while(I=Y.length){if(z)z[Q]=Y;return U(null,Y)}L9.lastIndex=K;var w=L9.exec(Y);if(W=G,G+=w[0],H=W+w[1],K=L9.lastIndex,I[H]||z&&z[H]===H)return process.nextTick(Z);if(z&&Object.prototype.hasOwnProperty.call(z,H))return F(z[H]);return L2.lstat(H,q)}function q(w,O){if(w)return U(w);if(!O.isSymbolicLink()){if(I[H]=!0,z)z[H]=H;return process.nextTick(Z)}if(!F2){var N=O.dev.toString(32)+":"+O.ino.toString(32);if(J.hasOwnProperty(N))return V(null,J[N],H)}L2.stat(H,function(M){if(M)return U(M);L2.readlink(H,function(D,P){if(!F2)J[N]=P;V(D,P)})})}function V(w,O,N){if(w)return U(w);var M=fz.resolve(W,O);if(z)z[N]=M;F(M)}function F(w){Y=fz.resolve(w,Y.slice(K)),X()}}});var vb=E((Ya1,MZ0)=>{MZ0.exports=O2;O2.realpath=O2;O2.sync=_b;O2.realpathSync=_b;O2.monkeypatch=WH1;O2.unmonkeypatch=XH1;var NI=I0("fs"),Cb=NI.realpath,Rb=NI.realpathSync,HH1=process.version,FZ0=/^v[0-5]\./.test(HH1),OZ0=LZ0();function wZ0($){return $&&$.syscall==="realpath"&&($.code==="ELOOP"||$.code==="ENOMEM"||$.code==="ENAMETOOLONG")}function O2($,Y,z){if(FZ0)return Cb($,Y,z);if(typeof Y==="function")z=Y,Y=null;Cb($,Y,function(U,Q){if(wZ0(U))OZ0.realpath($,Y,z);else z(U,Q)})}function _b($,Y){if(FZ0)return Rb($,Y);try{return Rb($,Y)}catch(z){if(wZ0(z))return OZ0.realpathSync($,Y);else throw z}}function WH1(){NI.realpath=O2,NI.realpathSync=_b}function XH1(){NI.realpath=Cb,NI.realpathSync=Rb}});var DZ0=E((za1,NZ0)=>{NZ0.exports=function($,Y){var z=[];for(var U=0;U<$.length;U++){var Q=Y($[U],U);if(ZH1(Q))z.push.apply(z,Q);else z.push(Q)}return z};var ZH1=Array.isArray||function($){return Object.prototype.toString.call($)==="[object Array]"}});var TZ0=E((Ua1,jZ0)=>{jZ0.exports=BZ0;function BZ0($,Y,z){if($ instanceof RegExp)$=AZ0($,z);if(Y instanceof RegExp)Y=AZ0(Y,z);var U=PZ0($,Y,z);return U&&{start:U[0],end:U[1],pre:z.slice(0,U[0]),body:z.slice(U[0]+$.length,U[1]),post:z.slice(U[1]+Y.length)}}function AZ0($,Y){var z=Y.match($);return z?z[0]:null}BZ0.range=PZ0;function PZ0($,Y,z){var U,Q,J,I,K,G=z.indexOf($),H=z.indexOf(Y,G+1),W=G;if(G>=0&&H>0){if($===Y)return[G,H];U=[],J=z.length;while(W>=0&&!K){if(W==G)U.push(W),G=z.indexOf($,W+1);else if(U.length==1)K=[U.pop(),H];else{if(Q=U.pop(),Q=0?G:H}if(U.length)K=[J,I]}return K}});var gZ0=E((Ja1,SZ0)=>{var Qa1=DZ0(),EZ0=TZ0();SZ0.exports=OH1;var CZ0="\x00SLASH"+Math.random()+"\x00",RZ0="\x00OPEN"+Math.random()+"\x00",gb="\x00CLOSE"+Math.random()+"\x00",_Z0="\x00COMMA"+Math.random()+"\x00",vZ0="\x00PERIOD"+Math.random()+"\x00",qH1=1e5,VH1=4000000;function hb($){return parseInt($,10)==$?parseInt($,10):$.charCodeAt(0)}function LH1($){return $.split("\\\\").join(CZ0).split("\\{").join(RZ0).split("\\}").join(gb).split("\\,").join(_Z0).split("\\.").join(vZ0)}function FH1($){return $.split(CZ0).join("\\").split(RZ0).join("{").split(gb).join("}").split(_Z0).join(",").split(vZ0).join(".")}function hZ0($){if(!$)return[""];var Y=[],z=EZ0("{","}",$);if(!z)return $.split(",");var{pre:U,body:Q,post:J}=z,I=U.split(",");I[I.length-1]+="{"+Q+"}";var K=hZ0(J);if(J.length)I[I.length-1]+=K.shift(),I.push.apply(I,K);return Y.push.apply(Y,I),Y}function OH1($,Y){if(!$)return[];Y=Y||{};var z=Y.max==null?qH1:Y.max,U=Y.maxLength==null?VH1:Y.maxLength;if($.substr(0,2)==="{}")$="\\{\\}"+$.substr(2);return Sb(LH1($),z,U,!0).map(FH1)}function wH1($){return"{"+$+"}"}function MH1($){return/^-?0\d/.test($)}function NH1($,Y){return $<=Y}function DH1($,Y){return $>=Y}function NX($,Y,z,U,Q,J,I,K){var G=[],H=0;for(var W=0;W<$.length;W++)for(var X=0;X=Q)return G;var Z=$[W]+z+U[X];if(I&&Z.length===Y[W])continue;if(H+Z.length>J)return G;G.push(Z),K.push(Y[W]),H+=Z.length}return G}function AH1($,Y,z,U){var Q=$.split(/\.\./),J=[];if(Q[0]===void 0||Q[1]===void 0)return J;var I=hb(Q[0]),K=hb(Q[1]),G=Math.max(Q[0].length,Q[1].length),H=Q.length===3&&Q[2]!==void 0?Math.max(Math.abs(hb(Q[2])),1):1,W=NH1,X=K0){var O=Array(w+1).join("0");if(V<0)F="-"+O+F.slice(1);else F=O+F}}if(q+F.length>U)break;J.push(F),q+=F.length}return J}function Sb($,Y,z,U){var Q=[""],J=[0],I=!1,K=!0,G;for(;;){var H=EZ0("{","}",$);if(!H)return NX(Q,J,$,[""],Y,z,I,[]);var W=H.pre;if(/\$$/.test(W))return NX(Q,J,$,[""],Y,z,I,[]);var X=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(H.body),Z=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(H.body),q=X||Z,V=H.body.indexOf(",")>=0;if(!q&&!V){if(H.post.match(/,(?!,).*\}/)){$=H.pre+"{"+H.body+gb+H.post,U=!0,K=!0,I=!1,J=[];for(var F=0;F=Y||D+T.length>z)break $;w.push(T),D+=T.length}}}if(G=[],Q=NX(Q,J,W,w,Y,z,I&&!H.post.length,G),J=G,!H.post.length)break;$=H.post}return Q}});var IA=E((Ia1,uZ0)=>{uZ0.exports=X$;X$.Minimatch=L6;var DX=function(){try{return I0("path")}catch($){}}()||{sep:"/"};X$.sep=DX.sep;var uz=X$.GLOBSTAR=L6.GLOBSTAR={},BH1=gZ0(),yZ0={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},yb="[^/]",kb=yb+"*?",PH1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",jH1="(?:(?!(?:\\/|^)\\.).)*?",kZ0=TH1("().*{}+?[]^$\\!");function TH1($){return $.split("").reduce(function(Y,z){return Y[z]=!0,Y},{})}var xZ0=/\/+/;X$.filter=EH1;function EH1($,Y){return Y=Y||{},function(z,U,Q){return X$(z,$,Y)}}function w2($,Y){Y=Y||{};var z={};return Object.keys($).forEach(function(U){z[U]=$[U]}),Object.keys(Y).forEach(function(U){z[U]=Y[U]}),z}X$.defaults=function($){if(!$||typeof $!=="object"||!Object.keys($).length)return X$;var Y=X$,z=function(Q,J,I){return Y(Q,J,w2($,I))};return z.Minimatch=function(Q,J){return new Y.Minimatch(Q,w2($,J))},z.Minimatch.defaults=function(Q){return Y.defaults(w2($,Q)).Minimatch},z.filter=function(Q,J){return Y.filter(Q,w2($,J))},z.defaults=function(Q){return Y.defaults(w2($,Q))},z.makeRe=function(Q,J){return Y.makeRe(Q,w2($,J))},z.braceExpand=function(Q,J){return Y.braceExpand(Q,w2($,J))},z.match=function(U,Q,J){return Y.match(U,Q,w2($,J))},z};L6.defaults=function($){return X$.defaults($).Minimatch};function X$($,Y,z){if(JA(Y),!z)z={};if(!z.nocomment&&Y.charAt(0)==="#")return!1;return new L6(Y,z).match($)}function L6($,Y){if(!(this instanceof L6))return new L6($,Y);if(JA($),!Y)Y={};if($=$.trim(),!Y.allowWindowsEscape&&DX.sep!=="/")$=$.split(DX.sep).join("/");this.options=Y,this.maxGlobstarRecursion=Y.maxGlobstarRecursion!==void 0?Y.maxGlobstarRecursion:200,this.set=[],this.pattern=$,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!Y.partial,this.make()}L6.prototype.debug=function(){};L6.prototype.make=CH1;function CH1(){var $=this.pattern,Y=this.options;if(!Y.nocomment&&$.charAt(0)==="#"){this.comment=!0;return}if(!$){this.empty=!0;return}this.parseNegate();var z=this.globSet=this.braceExpand();if(Y.debug)this.debug=function(){console.error.apply(console,arguments)};this.debug(this.pattern,z),z=this.globParts=z.map(function(U){return U.split(xZ0)}),this.debug(this.pattern,z),z=z.map(function(U,Q,J){return U.map(this.parse,this)},this),this.debug(this.pattern,z),z=z.filter(function(U){return U.indexOf(!1)===-1}),this.debug(this.pattern,z),this.set=z}L6.prototype.parseNegate=RH1;function RH1(){var $=this.pattern,Y=!1,z=this.options,U=0;if(z.nonegate)return;for(var Q=0,J=$.length;Q"u"?this.pattern:$,JA($),Y.nobrace||!/\{(?:(?!\{).)*\}/.test($))return[$];return BH1($)}var _H1=65536,JA=function($){if(typeof $!=="string")throw TypeError("invalid pattern");if($.length>_H1)throw TypeError("pattern is too long")};L6.prototype.parse=vH1;var QA={};function vH1($,Y){JA($);var z=this.options;if($==="**")if(!z.noglobstar)return uz;else $="*";if($==="")return"";var U="",Q=!!z.nocase,J=!1,I=[],K=[],G,H=!1,W=-1,X=-1,Z=$.charAt(0)==="."?"":z.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",q=this;function V(){if(G){switch(G){case"*":U+=kb,Q=!0;break;case"?":U+=yb,Q=!0;break;default:U+="\\"+G;break}q.debug("clearStateChar %j %j",G,U),G=!1}}for(var F=0,w=$.length,O;F-1;T--){var C=K[T],b=U.slice(0,C.reStart),k=U.slice(C.reStart,C.reEnd-8),S=U.slice(C.reEnd-8,C.reEnd),i=U.slice(C.reEnd);S+=i;var n=b.split("(").length-1,U0=i;for(F=0;F"u")z=this.partial;if(this.debug("match",Y,this.pattern),this.comment)return!1;if(this.empty)return Y==="";if(Y==="/"&&z)return!0;var U=this.options;if(DX.sep!=="/")Y=Y.split(DX.sep).join("/");Y=Y.split(xZ0),this.debug(this.pattern,"split",Y);var Q=this.set;this.debug(this.pattern,"set",Q);var J,I;for(I=Y.length-1;I>=0;I--)if(J=Y[I],J)break;for(I=0;I=0;J--)if(Y[J]===uz){K=J;break}var G=Y.slice(Q,I),H=z?Y.slice(I+1):Y.slice(I+1,K),W=z?[]:Y.slice(K+1);if(G.length){var X=$.slice(U,U+G.length);if(!this._matchOne(X,G,z,0,0))return!1;U+=G.length}var Z=0;if(W.length){if(W.length+U>$.length)return!1;var q=$.length-W.length;if(this._matchOne($,W,z,q,0))Z=W.length;else{if($[$.length-1]!==""||U+W.length===$.length)return!1;if(q--,!this._matchOne($,W,z,q,0))return!1;Z=W.length+1}}if(!H.length){var V=!!Z;for(J=U;J<$.length-Z;J++){var F=String($[J]);if(V=!0,F==="."||F===".."||!this.options.dot&&F.charAt(0)===".")return!1}return z||V}var w=[[[],0]],O=w[0],N=0,M=[0];for(var D=0;D{function bZ0($){return $.charAt(0)==="/"}function iZ0($){var Y=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,z=Y.exec($),U=z[1]||"",Q=Boolean(U&&U.charAt(1)!==":");return Boolean(z[2]||Q)}KA.exports=process.platform==="win32"?iZ0:bZ0;KA.exports.posix=bZ0;KA.exports.win32=iZ0});var fb=E((pH1)=>{pH1.setopts=bH1;pH1.ownProp=nZ0;pH1.makeAbs=AX;pH1.finish=iH1;pH1.mark=nH1;pH1.isIgnored=pZ0;pH1.childrenIgnored=cH1;function nZ0($,Y){return Object.prototype.hasOwnProperty.call($,Y)}var yH1=I0("fs"),DI=I0("path"),kH1=IA(),cZ0=GA(),xb=kH1.Minimatch;function xH1($,Y){return $.localeCompare(Y,"en")}function fH1($,Y){if($.ignore=Y.ignore||[],!Array.isArray($.ignore))$.ignore=[$.ignore];if($.ignore.length)$.ignore=$.ignore.map(uH1)}function uH1($){var Y=null;if($.slice(-3)==="/**"){var z=$.replace(/(\/\*\*)+$/,"");Y=new xb(z,{dot:!0})}return{matcher:new xb($,{dot:!0}),gmatcher:Y}}function bH1($,Y,z){if(!z)z={};if(z.matchBase&&Y.indexOf("/")===-1){if(z.noglobstar)throw Error("base matching requires globstar");Y="**/"+Y}if($.silent=!!z.silent,$.pattern=Y,$.strict=z.strict!==!1,$.realpath=!!z.realpath,$.realpathCache=z.realpathCache||Object.create(null),$.follow=!!z.follow,$.dot=!!z.dot,$.mark=!!z.mark,$.nodir=!!z.nodir,$.nodir)$.mark=!0;$.sync=!!z.sync,$.nounique=!!z.nounique,$.nonull=!!z.nonull,$.nosort=!!z.nosort,$.nocase=!!z.nocase,$.stat=!!z.stat,$.noprocess=!!z.noprocess,$.absolute=!!z.absolute,$.fs=z.fs||yH1,$.maxLength=z.maxLength||1/0,$.cache=z.cache||Object.create(null),$.statCache=z.statCache||Object.create(null),$.symlinks=z.symlinks||Object.create(null),fH1($,z),$.changedCwd=!1;var U=process.cwd();if(!nZ0(z,"cwd"))$.cwd=U;else $.cwd=DI.resolve(z.cwd),$.changedCwd=$.cwd!==U;if($.root=z.root||DI.resolve($.cwd,"/"),$.root=DI.resolve($.root),process.platform==="win32")$.root=$.root.replace(/\\/g,"/");if($.cwdAbs=cZ0($.cwd)?$.cwd:AX($,$.cwd),process.platform==="win32")$.cwdAbs=$.cwdAbs.replace(/\\/g,"/");$.nomount=!!z.nomount,z.nonegate=!0,z.nocomment=!0,z.allowWindowsEscape=!1,$.minimatch=new xb(Y,z),$.options=$.minimatch.options}function iH1($){var Y=$.nounique,z=Y?[]:Object.create(null);for(var U=0,Q=$.matches.length;U{oZ0.exports=lZ0;lZ0.GlobSync=T6;var tH1=vb(),dZ0=IA(),Ha1=dZ0.Minimatch,Wa1=BX().Glob,Xa1=I0("util"),ub=I0("path"),mZ0=I0("assert"),HA=GA(),bz=fb(),eH1=bz.setopts,bb=bz.ownProp,$W1=bz.childrenIgnored,YW1=bz.isIgnored;function lZ0($,Y){if(typeof Y==="function"||arguments.length===3)throw TypeError(`callback provided to sync glob See: https://github.com/isaacs/node-glob/issues/167`);return new T6($,Y).found}function T6($,Y){if(!$)throw Error("must provide pattern");if(typeof Y==="function"||arguments.length===3)throw TypeError(`callback provided to sync glob See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof T6))return new T6($,Y);if(eH1(this,$,Y),this.noprocess)return this;var z=this.minimatch.set.length;this.matches=Array(z);for(var U=0;Uthis.maxLength)return!1;if(!this.stat&&bb(this.cache,Y)){var I=this.cache[Y];if(Array.isArray(I))I="DIR";if(!z||I==="DIR")return I;if(z&&I==="FILE")return!1}var U,Q=this.statCache[Y];if(!Q){var J;try{J=this.fs.lstatSync(Y)}catch(K){if(K&&(K.code==="ENOENT"||K.code==="ENOTDIR"))return this.statCache[Y]=!1,!1}if(J&&J.isSymbolicLink())try{Q=this.fs.statSync(Y)}catch(K){Q=J}else Q=J}this.statCache[Y]=Q;var I=!0;if(Q)I=Q.isDirectory()?"DIR":"FILE";if(this.cache[Y]=this.cache[Y]||I,z&&I==="FILE")return!1;return I};T6.prototype._mark=function($){return bz.mark(this,$)};T6.prototype._makeAbs=function($){return bz.makeAbs(this,$)}});var ib=E((qa1,aZ0)=>{aZ0.exports=sZ0;function sZ0($,Y){if($&&Y)return sZ0($)(Y);if(typeof $!=="function")throw TypeError("need wrapper function");return Object.keys($).forEach(function(U){z[U]=$[U]}),z;function z(){var U=Array(arguments.length);for(var Q=0;Q{var tZ0=ib();nb.exports=tZ0(WA);nb.exports.strict=tZ0(eZ0);WA.proto=WA(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return WA(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return eZ0(this)},configurable:!0})});function WA($){var Y=function(){if(Y.called)return Y.value;return Y.called=!0,Y.value=$.apply(this,arguments)};return Y.called=!1,Y}function eZ0($){var Y=function(){if(Y.called)throw Error(Y.onceError);return Y.called=!0,Y.value=$.apply(this,arguments)},z=$.name||"Function wrapped with `once`";return Y.onceError=z+" shouldn't be called more than once",Y.called=!1,Y}});var Yq0=E((La1,$q0)=>{var zW1=ib(),PX=Object.create(null),UW1=XA();$q0.exports=zW1(QW1);function QW1($,Y){if(PX[$])return PX[$].push(Y),null;else return PX[$]=[Y],JW1($)}function JW1($){return UW1(function Y(){var z=PX[$],U=z.length,Q=IW1(arguments);try{for(var J=0;JU)z.splice(0,U),process.nextTick(function(){Y.apply(null,Q)});else delete PX[$]}})}function IW1($){var Y=$.length,z=[];for(var U=0;U{Uq0.exports=iz;var KW1=vb(),zq0=IA(),Fa1=zq0.Minimatch,GW1=X1(),HW1=I0("events").EventEmitter,cb=I0("path"),pb=I0("assert"),jX=GA(),mb=rZ0(),nz=fb(),WW1=nz.setopts,db=nz.ownProp,lb=Yq0(),Oa1=I0("util"),XW1=nz.childrenIgnored,ZW1=nz.isIgnored,qW1=XA();function iz($,Y,z){if(typeof Y==="function")z=Y,Y={};if(!Y)Y={};if(Y.sync){if(z)throw TypeError("callback provided to sync glob");return mb($,Y)}return new I4($,Y,z)}iz.sync=mb;var VW1=iz.GlobSync=mb.GlobSync;iz.glob=iz;function LW1($,Y){if(Y===null||typeof Y!=="object")return $;var z=Object.keys(Y),U=z.length;while(U--)$[z[U]]=Y[z[U]];return $}iz.hasMagic=function($,Y){var z=LW1({},Y);z.noprocess=!0;var U=new I4($,z),Q=U.minimatch.set;if(!$)return!1;if(Q.length>1)return!0;for(var J=0;Jthis.maxLength)return Y();if(!this.stat&&db(this.cache,z)){var Q=this.cache[z];if(Array.isArray(Q))Q="DIR";if(!U||Q==="DIR")return Y(null,Q);if(U&&Q==="FILE")return Y()}var J,I=this.statCache[z];if(I!==void 0)if(I===!1)return Y(null,I);else{var K=I.isDirectory()?"DIR":"FILE";if(U&&K==="FILE")return Y();else return Y(null,K,I)}var G=this,H=lb("stat\x00"+z,W);if(H)G.fs.lstat(z,H);function W(X,Z){if(Z&&Z.isSymbolicLink())return G.fs.stat(z,function(q,V){if(q)G._stat2($,z,null,Z,Y);else G._stat2($,z,q,V,Y)});else G._stat2($,z,X,Z,Y)}};I4.prototype._stat2=function($,Y,z,U,Q){if(z&&(z.code==="ENOENT"||z.code==="ENOTDIR"))return this.statCache[Y]=!1,Q();var J=$.slice(-1)==="/";if(this.statCache[Y]=U,Y.slice(-1)==="/"&&U&&!U.isDirectory())return Q(null,!1,U);var I=!0;if(U)I=U.isDirectory()?"DIR":"FILE";if(this.cache[Y]=this.cache[Y]||I,J&&I==="FILE")return Q();return Q(null,I,U)}});var Kq0=E((Ma1,Iq0)=>{var Jq0=o8(),AI=I0("path"),ob=Vb(),OW1=Nb(),wW1=Tb(),MW1=Eb(),NW1=BX(),cz=Iq0.exports={},Qq0=/[\/\\]/g,DW1=function($,Y){var z=[];return ob($).forEach(function(U){var Q=U.indexOf("!")===0;if(Q)U=U.slice(1);var J=Y(U);if(Q)z=OW1(z,J);else z=wW1(z,J)}),z};cz.exists=function(){var $=AI.join.apply(AI,arguments);return Jq0.existsSync($)};cz.expand=function(...$){var Y=MW1($[0])?$.shift():{},z=Array.isArray($[0])?$[0]:$;if(z.length===0)return[];var U=DW1(z,function(Q){return NW1.sync(Q,Y)});if(Y.filter)U=U.filter(function(Q){Q=AI.join(Y.cwd||"",Q);try{if(typeof Y.filter==="function")return Y.filter(Q);else return Jq0.statSync(Q)[Y.filter]()}catch(J){return!1}});return U};cz.expandMapping=function($,Y,z){z=Object.assign({rename:function(J,I){return AI.join(J||"",I)}},z);var U=[],Q={};return cz.expand(z,$).forEach(function(J){var I=J;if(z.flatten)I=AI.basename(I);if(z.ext)I=I.replace(/(\.[^\/]*)?$/,z.ext);var K=z.rename(Y,I,z);if(z.cwd)J=AI.join(z.cwd,J);if(K=K.replace(Qq0,"/"),J=J.replace(Qq0,"/"),Q[K])Q[K].src.push(J);else U.push({src:[J],dest:K}),Q[K]=U[U.length-1]}),U};cz.normalizeFilesArray=function($){var Y=[];if($.forEach(function(z){var U;if("src"in z||"dest"in z)Y.push(z)}),Y.length===0)return[];return Y=_(Y).chain().forEach(function(z){if(!("src"in z)||!z.src)return;if(Array.isArray(z.src))z.src=ob(z.src);else z.src=[z.src]}).map(function(z){var U=Object.assign({},z);if(delete U.src,delete U.dest,z.expand)return cz.expandMapping(z.src,z.dest,U).map(function(J){var I=Object.assign({},z);return I.orig=Object.assign({},z),I.src=J.src,I.dest=J.dest,["expand","cwd","flatten","rename","ext"].forEach(function(K){delete I[K]}),I});var Q=Object.assign({},z);if(Q.orig=Object.assign({},z),"src"in Q)Object.defineProperty(Q,"src",{enumerable:!0,get:function J(){var I;if(!("result"in J))I=z.src,I=Array.isArray(I)?ob(I):[I],J.result=cz.expand(U,I);return J.result}});if("dest"in Q)Q.dest=z.dest;return Q}).flatten().value(),Y}});var TX=E((Da1,Wq0)=>{var rb=o8(),Gq0=I0("path"),Na1=I0("util"),AW1=bD(),Hq0=Sz(),BW1=su(),PW1=I0("stream").Stream,jW1=xX0().PassThrough,Z$=Wq0.exports={};Z$.file=Kq0();Z$.collectStream=function($,Y){var z=[],U=0;$.on("error",Y),$.on("data",function(Q){z.push(Q),U+=Q.length}),$.on("end",function(){var Q=new Buffer(U),J=0;z.forEach(function(I){I.copy(Q,J),J+=I.length}),Y(null,Q)})};Z$.dateify=function($){if($=$||new Date,$ instanceof Date)$=$;else if(typeof $==="string")$=new Date($);else $=new Date;return $};Z$.defaults=function($,Y,z){var U=arguments;return U[0]=U[0]||{},BW1(...U)};Z$.isStream=function($){return $ instanceof PW1};Z$.lazyReadStream=function($){return new AW1.Readable(function(){return rb.createReadStream($)})};Z$.normalizeInputSource=function($){if($===null)return new Buffer(0);else if(typeof $==="string")return new Buffer($);else if(Z$.isStream($)&&!$._readableState){var Y=new jW1;return $.pipe(Y),Y}return $};Z$.sanitizePath=function($){return Hq0($,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};Z$.trailingSlashIt=function($){return $.slice(-1)!=="/"?$+"/":$};Z$.unixifyPath=function($){return Hq0($,!1).replace(/^\w+:/,"")};Z$.walkdir=function($,Y,z){var U=[];if(typeof Y==="function")z=Y,Y=$;rb.readdir($,function(Q,J){var I=0,K,G;if(Q)return z(Q);(function H(){if(K=J[I++],!K)return z(null,U);G=Gq0.join($,K),rb.stat(G,function(W,X){if(U.push({path:G,relative:Gq0.relative(Y,G).replace(/\\/g,"/"),stats:X}),X&&X.isDirectory())Z$.walkdir(G,Y,function(Z,q){q.forEach(function(V){U.push(V)}),H()});else H()})})()})}});var Vq0=E((Zq0,qq0)=>{var TW1=I0("util"),EW1={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function Xq0($,Y){Error.captureStackTrace(this,this.constructor),this.message=EW1[$]||$,this.code=$,this.data=Y}TW1.inherits(Xq0,Error);Zq0=qq0.exports=Xq0});var Mq0=E((Aa1,wq0)=>{var tb=I0("fs"),Fq0=sH0(),Lq0=Tu(),sb=I0("path"),F9=TX(),CW1=I0("util").inherits,U6=Vq0(),Oq0=C8().Transform,ab=process.platform==="win32",a1=function($,Y){if(!(this instanceof a1))return new a1($,Y);if(typeof $!=="string")Y=$,$="zip";Y=this.options=F9.defaults(Y,{highWaterMark:1048576,statConcurrency:4}),Oq0.call(this,Y),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=Lq0.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=Lq0.queue(this._onStatQueueTask.bind(this),Y.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};CW1(a1,Oq0);a1.prototype._abort=function(){if(this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle())this._shutdown()};a1.prototype._append=function($,Y){Y=Y||{};var z={source:null,filepath:$};if(!Y.name)Y.name=$;if(Y.sourcePath=$,z.data=Y,this._entriesCount++,Y.stats&&Y.stats instanceof tb.Stats){if(z=this._updateQueueTaskWithStats(z,Y.stats),z){if(Y.stats.size)this._fsEntriesTotalBytes+=Y.stats.size;this._queue.push(z)}}else this._statQueue.push(z)};a1.prototype._finalize=function(){if(this._state.finalizing||this._state.finalized||this._state.aborted)return;this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0};a1.prototype._maybeFinalize=function(){if(this._state.finalizing||this._state.finalized||this._state.aborted)return!1;if(this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle())return this._finalize(),!0;return!1};a1.prototype._moduleAppend=function($,Y,z){if(this._state.aborted){z();return}this._module.append($,Y,function(U){if(this._task=null,this._state.aborted){this._shutdown();return}if(U){this.emit("error",U),setImmediate(z);return}if(this.emit("entry",Y),this._entriesProcessedCount++,Y.stats&&Y.stats.size)this._fsEntriesProcessedBytes+=Y.stats.size;this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(z)}.bind(this))};a1.prototype._moduleFinalize=function(){if(typeof this._module.finalize==="function")this._module.finalize();else if(typeof this._module.end==="function")this._module.end();else this.emit("error",new U6("NOENDMETHOD"))};a1.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0};a1.prototype._moduleSupports=function($){if(!this._module.supports||!this._module.supports[$])return!1;return this._module.supports[$]};a1.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1};a1.prototype._normalizeEntryData=function($,Y){if($=F9.defaults($,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),Y&&$.stats===!1)$.stats=Y;var z=$.type==="directory";if($.name){if(typeof $.prefix==="string"&&$.prefix!=="")$.name=$.prefix+"/"+$.name,$.prefix=null;if($.name=F9.sanitizePath($.name),$.type!=="symlink"&&$.name.slice(-1)==="/")z=!0,$.type="directory";else if(z)$.name+="/"}if(typeof $.mode==="number")if(ab)$.mode&=511;else $.mode&=4095;else if($.stats&&$.mode===null){if(ab)$.mode=$.stats.mode&511;else $.mode=$.stats.mode&4095;if(ab&&z)$.mode=493}else if($.mode===null)$.mode=z?493:420;if($.stats&&$.date===null)$.date=$.stats.mtime;else $.date=F9.dateify($.date);return $};a1.prototype._onModuleError=function($){this.emit("error",$)};a1.prototype._onQueueDrain=function(){if(this._state.finalizing||this._state.finalized||this._state.aborted)return;if(this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle())this._finalize()};a1.prototype._onQueueTask=function($,Y){var z=()=>{if($.data.callback)$.data.callback();Y()};if(this._state.finalizing||this._state.finalized||this._state.aborted){z();return}this._task=$,this._moduleAppend($.source,$.data,z)};a1.prototype._onStatQueueTask=function($,Y){if(this._state.finalizing||this._state.finalized||this._state.aborted){Y();return}tb.lstat($.filepath,function(z,U){if(this._state.aborted){setImmediate(Y);return}if(z){this._entriesCount--,this.emit("warning",z),setImmediate(Y);return}if($=this._updateQueueTaskWithStats($,U),$){if(U.size)this._fsEntriesTotalBytes+=U.size;this._queue.push($)}setImmediate(Y)}.bind(this))};a1.prototype._shutdown=function(){this._moduleUnpipe(),this.end()};a1.prototype._transform=function($,Y,z){if($)this._pointer+=$.length;z(null,$)};a1.prototype._updateQueueTaskWithStats=function($,Y){if(Y.isFile())$.data.type="file",$.data.sourceType="stream",$.source=F9.lazyReadStream($.filepath);else if(Y.isDirectory()&&this._moduleSupports("directory"))$.data.name=F9.trailingSlashIt($.data.name),$.data.type="directory",$.data.sourcePath=F9.trailingSlashIt($.filepath),$.data.sourceType="buffer",$.source=Buffer.concat([]);else if(Y.isSymbolicLink()&&this._moduleSupports("symlink")){var z=tb.readlinkSync($.filepath),U=sb.dirname($.filepath);$.data.type="symlink",$.data.linkname=sb.relative(U,sb.resolve(U,z)),$.data.sourceType="buffer",$.source=Buffer.concat([])}else{if(Y.isDirectory())this.emit("warning",new U6("DIRECTORYNOTSUPPORTED",$.data));else if(Y.isSymbolicLink())this.emit("warning",new U6("SYMLINKNOTSUPPORTED",$.data));else this.emit("warning",new U6("ENTRYNOTSUPPORTED",$.data));return null}return $.data=this._normalizeEntryData($.data,Y),$};a1.prototype.abort=function(){if(this._state.aborted||this._state.finalized)return this;return this._abort(),this};a1.prototype.append=function($,Y){if(this._state.finalize||this._state.aborted)return this.emit("error",new U6("QUEUECLOSED")),this;if(Y=this._normalizeEntryData(Y),typeof Y.name!=="string"||Y.name.length===0)return this.emit("error",new U6("ENTRYNAMEREQUIRED")),this;if(Y.type==="directory"&&!this._moduleSupports("directory"))return this.emit("error",new U6("DIRECTORYNOTSUPPORTED",{name:Y.name})),this;if($=F9.normalizeInputSource($),Buffer.isBuffer($))Y.sourceType="buffer";else if(F9.isStream($))Y.sourceType="stream";else return this.emit("error",new U6("INPUTSTEAMBUFFERREQUIRED",{name:Y.name})),this;return this._entriesCount++,this._queue.push({data:Y,source:$}),this};a1.prototype.directory=function($,Y,z){if(this._state.finalize||this._state.aborted)return this.emit("error",new U6("QUEUECLOSED")),this;if(typeof $!=="string"||$.length===0)return this.emit("error",new U6("DIRECTORYDIRPATHREQUIRED")),this;if(this._pending++,Y===!1)Y="";else if(typeof Y!=="string")Y=$;var U=!1;if(typeof z==="function")U=z,z={};else if(typeof z!=="object")z={};var Q={stat:!0,dot:!0};function J(){this._pending--,this._maybeFinalize()}function I(H){this.emit("error",H)}function K(H){G.pause();var W=!1,X=Object.assign({},z);X.name=H.relative,X.prefix=Y,X.stats=H.stat,X.callback=G.resume.bind(G);try{if(U){if(X=U(X),X===!1)W=!0;else if(typeof X!=="object")throw new U6("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:$})}}catch(Z){this.emit("error",Z);return}if(W){G.resume();return}this._append(H.absolute,X)}var G=Fq0($,Q);return G.on("error",I.bind(this)),G.on("match",K.bind(this)),G.on("end",J.bind(this)),this};a1.prototype.file=function($,Y){if(this._state.finalize||this._state.aborted)return this.emit("error",new U6("QUEUECLOSED")),this;if(typeof $!=="string"||$.length===0)return this.emit("error",new U6("FILEFILEPATHREQUIRED")),this;return this._append($,Y),this};a1.prototype.glob=function($,Y,z){this._pending++,Y=F9.defaults(Y,{stat:!0,pattern:$});function U(){this._pending--,this._maybeFinalize()}function Q(K){this.emit("error",K)}function J(K){I.pause();var G=Object.assign({},z);G.callback=I.resume.bind(I),G.stats=K.stat,G.name=K.relative,this._append(K.absolute,G)}var I=Fq0(Y.cwd||".",Y);return I.on("error",Q.bind(this)),I.on("match",J.bind(this)),I.on("end",U.bind(this)),this};a1.prototype.finalize=function(){if(this._state.aborted){var $=new U6("ABORTED");return this.emit("error",$),Promise.reject($)}if(this._state.finalize){var Y=new U6("FINALIZING");return this.emit("error",Y),Promise.reject(Y)}if(this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle())this._finalize();var z=this;return new Promise(function(U,Q){var J;z._module.on("end",function(){if(!J)U()}),z._module.on("error",function(I){J=!0,Q(I)})})};a1.prototype.setFormat=function($){if(this._format)return this.emit("error",new U6("FORMATSET")),this;return this._format=$,this};a1.prototype.setModule=function($){if(this._state.aborted)return this.emit("error",new U6("ABORTED")),this;if(this._state.module)return this.emit("error",new U6("MODULESET")),this;return this._module=$,this._modulePipe(),this};a1.prototype.symlink=function($,Y,z){if(this._state.finalize||this._state.aborted)return this.emit("error",new U6("QUEUECLOSED")),this;if(typeof $!=="string"||$.length===0)return this.emit("error",new U6("SYMLINKFILEPATHREQUIRED")),this;if(typeof Y!=="string"||Y.length===0)return this.emit("error",new U6("SYMLINKTARGETREQUIRED",{filepath:$})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new U6("SYMLINKNOTSUPPORTED",{filepath:$})),this;var U={};if(U.type="symlink",U.name=$.replace(/\\/g,"/"),U.linkname=Y.replace(/\\/g,"/"),U.sourceType="buffer",typeof z==="number")U.mode=z;return this._entriesCount++,this._queue.push({data:U,source:Buffer.concat([])}),this};a1.prototype.pointer=function(){return this._pointer};a1.prototype.use=function($){return this._streams.push($),this};wq0.exports=a1});var qA=E((Ba1,Nq0)=>{var ZA=Nq0.exports=function(){};ZA.prototype.getName=function(){};ZA.prototype.getSize=function(){};ZA.prototype.getLastModifiedDate=function(){};ZA.prototype.isDirectory=function(){}});var VA=E((Pa1,Dq0)=>{var y$=Dq0.exports={};y$.dateToDos=function($,Y){Y=Y||!1;var z=Y?$.getFullYear():$.getUTCFullYear();if(z<1980)return 2162688;else if(z>=2044)return 2141175677;var U={year:z,month:Y?$.getMonth():$.getUTCMonth(),date:Y?$.getDate():$.getUTCDate(),hours:Y?$.getHours():$.getUTCHours(),minutes:Y?$.getMinutes():$.getUTCMinutes(),seconds:Y?$.getSeconds():$.getUTCSeconds()};return U.year-1980<<25|U.month+1<<21|U.date<<16|U.hours<<11|U.minutes<<5|U.seconds/2};y$.dosToDate=function($){return new Date(($>>25&127)+1980,($>>21&15)-1,$>>16&31,$>>11&31,$>>5&63,($&31)<<1)};y$.fromDosTime=function($){return y$.dosToDate($.readUInt32LE(0))};y$.getEightBytes=function($){var Y=Buffer.alloc(8);return Y.writeUInt32LE($%4294967296,0),Y.writeUInt32LE($/4294967296|0,4),Y};y$.getShortBytes=function($){var Y=Buffer.alloc(2);return Y.writeUInt16LE(($&65535)>>>0,0),Y};y$.getShortBytesValue=function($,Y){return $.readUInt16LE(Y)};y$.getLongBytes=function($){var Y=Buffer.alloc(4);return Y.writeUInt32LE(($&4294967295)>>>0,0),Y};y$.getLongBytesValue=function($,Y){return $.readUInt32LE(Y)};y$.toDosTime=function($){return y$.getLongBytes(y$.dateToDos($))}});var eb=E((ja1,Eq0)=>{var Aq0=VA(),Bq0=8,Pq0=1,RW1=4,_W1=2,jq0=64,Tq0=2048,$8=Eq0.exports=function(){if(!(this instanceof $8))return new $8;return this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this};$8.prototype.encode=function(){return Aq0.getShortBytes((this.descriptor?Bq0:0)|(this.utf8?Tq0:0)|(this.encryption?Pq0:0)|(this.strongEncryption?jq0:0))};$8.prototype.parse=function($,Y){var z=Aq0.getShortBytesValue($,Y),U=new $8;return U.useDataDescriptor((z&Bq0)!==0),U.useUTF8ForNames((z&Tq0)!==0),U.useStrongEncryption((z&jq0)!==0),U.useEncryption((z&Pq0)!==0),U.setSlidingDictionarySize((z&_W1)!==0?8192:4096),U.setNumberOfShannonFanoTrees((z&RW1)!==0?3:2),U};$8.prototype.setNumberOfShannonFanoTrees=function($){this.numberOfShannonFanoTrees=$};$8.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};$8.prototype.setSlidingDictionarySize=function($){this.slidingDictionarySize=$};$8.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};$8.prototype.useDataDescriptor=function($){this.descriptor=$};$8.prototype.usesDataDescriptor=function(){return this.descriptor};$8.prototype.useEncryption=function($){this.encryption=$};$8.prototype.usesEncryption=function(){return this.encryption};$8.prototype.useStrongEncryption=function($){this.strongEncryption=$};$8.prototype.usesStrongEncryption=function(){return this.strongEncryption};$8.prototype.useUTF8ForNames=function($){this.utf8=$};$8.prototype.usesUTF8ForNames=function(){return this.utf8}});var Rq0=E((Ta1,Cq0)=>{Cq0.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}});var $i=E((Ea1,_q0)=>{_q0.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}});var Yi=E((Ca1,yq0)=>{var vW1=I0("util").inherits,hW1=Sz(),hq0=qA(),Sq0=eb(),vq0=Rq0(),v8=$i(),gq0=VA(),R1=yq0.exports=function($){if(!(this instanceof R1))return new R1($);if(hq0.call(this),this.platform=v8.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new Sq0,this.crc=0,this.time=-1,this.minver=v8.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,$)this.setName($)};vW1(R1,hq0);R1.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};R1.prototype.getComment=function(){return this.comment!==null?this.comment:""};R1.prototype.getCompressedSize=function(){return this.csize};R1.prototype.getCrc=function(){return this.crc};R1.prototype.getExternalAttributes=function(){return this.exattr};R1.prototype.getExtra=function(){return this.extra!==null?this.extra:v8.EMPTY};R1.prototype.getGeneralPurposeBit=function(){return this.gpb};R1.prototype.getInternalAttributes=function(){return this.inattr};R1.prototype.getLastModifiedDate=function(){return this.getTime()};R1.prototype.getLocalFileDataExtra=function(){return this.getExtra()};R1.prototype.getMethod=function(){return this.method};R1.prototype.getName=function(){return this.name};R1.prototype.getPlatform=function(){return this.platform};R1.prototype.getSize=function(){return this.size};R1.prototype.getTime=function(){return this.time!==-1?gq0.dosToDate(this.time):-1};R1.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};R1.prototype.getUnixMode=function(){return this.platform!==v8.PLATFORM_UNIX?0:this.getExternalAttributes()>>v8.SHORT_SHIFT&v8.SHORT_MASK};R1.prototype.getVersionNeededToExtract=function(){return this.minver};R1.prototype.setComment=function($){if(Buffer.byteLength($)!==$.length)this.getGeneralPurposeBit().useUTF8ForNames(!0);this.comment=$};R1.prototype.setCompressedSize=function($){if($<0)throw Error("invalid entry compressed size");this.csize=$};R1.prototype.setCrc=function($){if($<0)throw Error("invalid entry crc32");this.crc=$};R1.prototype.setExternalAttributes=function($){this.exattr=$>>>0};R1.prototype.setExtra=function($){this.extra=$};R1.prototype.setGeneralPurposeBit=function($){if(!($ instanceof Sq0))throw Error("invalid entry GeneralPurposeBit");this.gpb=$};R1.prototype.setInternalAttributes=function($){this.inattr=$};R1.prototype.setMethod=function($){if($<0)throw Error("invalid entry compression method");this.method=$};R1.prototype.setName=function($,Y=!1){if($=hW1($,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),Y)$=`/${$}`;if(Buffer.byteLength($)!==$.length)this.getGeneralPurposeBit().useUTF8ForNames(!0);this.name=$};R1.prototype.setPlatform=function($){this.platform=$};R1.prototype.setSize=function($){if($<0)throw Error("invalid entry size");this.size=$};R1.prototype.setTime=function($,Y){if(!($ instanceof Date))throw Error("invalid entry time");this.time=gq0.dateToDos($,Y)};R1.prototype.setUnixMode=function($){$|=this.isDirectory()?v8.S_IFDIR:v8.S_IFREG;var Y=0;Y|=$<v8.ZIP64_MAGIC||this.size>v8.ZIP64_MAGIC}});var Ui=E((Ra1,kq0)=>{var SW1=I0("stream").Stream,gW1=C8().PassThrough,zi=kq0.exports={};zi.isStream=function($){return $ instanceof SW1};zi.normalizeInputSource=function($){if($===null)return Buffer.alloc(0);else if(typeof $==="string")return Buffer.from($);else if(zi.isStream($)&&!$._readableState){var Y=new gW1;return $.pipe(Y),Y}return $}});var Ji=E((_a1,fq0)=>{var yW1=I0("util").inherits,Qi=C8().Transform,kW1=qA(),xq0=Ui(),q$=fq0.exports=function($){if(!(this instanceof q$))return new q$($);Qi.call(this,$),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};yW1(q$,Qi);q$.prototype._appendBuffer=function($,Y,z){};q$.prototype._appendStream=function($,Y,z){};q$.prototype._emitErrorCallback=function($){if($)this.emit("error",$)};q$.prototype._finish=function($){};q$.prototype._normalizeEntry=function($){};q$.prototype._transform=function($,Y,z){z(null,$)};q$.prototype.entry=function($,Y,z){if(Y=Y||null,typeof z!=="function")z=this._emitErrorCallback.bind(this);if(!($ instanceof kW1)){z(Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){z(Error("unacceptable entry after finish"));return}if(this._archive.processing){z(Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry($),this._entry=$,Y=xq0.normalizeInputSource(Y),Buffer.isBuffer(Y))this._appendBuffer($,Y,z);else if(xq0.isStream(Y))this._appendStream($,Y,z);else{this._archive.processing=!1,z(Error("input source must be valid Stream or Buffer instance"));return}return this};q$.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()};q$.prototype.getBytesWritten=function(){return this.offset};q$.prototype.write=function($,Y){if($)this.offset+=$.length;return Qi.prototype.write.call(this,$,Y)}});var Hi=E((va1,bq0)=>{var M2=I0("buffer").Buffer,Ii=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];if(typeof Int32Array<"u")Ii=new Int32Array(Ii);function uq0($){if(M2.isBuffer($))return $;var Y=typeof M2.alloc==="function"&&typeof M2.from==="function";if(typeof $==="number")return Y?M2.alloc($):new M2($);else if(typeof $==="string")return Y?M2.from($):new M2($);else throw Error("input must be buffer, number, or string, received "+typeof $)}function xW1($){var Y=uq0(4);return Y.writeInt32BE($,0),Y}function Ki($,Y){if($=uq0($),M2.isBuffer(Y))Y=Y.readUInt32BE(0);var z=~~Y^-1;for(var U=0;U<$.length;U++)z=Ii[(z^$[U])&255]^z>>>8;return z^-1}function Gi(){return xW1(Ki.apply(null,arguments))}Gi.signed=function(){return Ki.apply(null,arguments)};Gi.unsigned=function(){return Ki.apply(null,arguments)>>>0};bq0.exports=Gi});var BI=E((Wi)=>{/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var iq0;(function($){if(typeof DO_NOT_EXPORT_CRC>"u")if(typeof Wi==="object")$(Wi);else if(typeof define==="function"&&define.amd)define(function(){var Y={};return $(Y),Y});else $(iq0={});else $(iq0={})})(function($){$.version="1.2.2";function Y(){var A=0,T=Array(256);for(var C=0;C!=256;++C)A=C,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,T[C]=A;return typeof Int32Array<"u"?new Int32Array(T):T}var z=Y();function U(A){var T=0,C=0,b=0,k=typeof Int32Array<"u"?new Int32Array(4096):Array(4096);for(b=0;b!=256;++b)k[b]=A[b];for(b=0;b!=256;++b){C=A[b];for(T=256+b;T<4096;T+=256)C=k[T]=C>>>8^A[C&255]}var S=[];for(b=1;b!=16;++b)S[b-1]=typeof Int32Array<"u"?k.subarray(b*256,b*256+256):k.slice(b*256,b*256+256);return S}var Q=U(z),J=Q[0],I=Q[1],K=Q[2],G=Q[3],H=Q[4],W=Q[5],X=Q[6],Z=Q[7],q=Q[8],V=Q[9],F=Q[10],w=Q[11],O=Q[12],N=Q[13],M=Q[14];function D(A,T){var C=T^-1;for(var b=0,k=A.length;b>>8^z[(C^A.charCodeAt(b++))&255];return~C}function P(A,T){var C=T^-1,b=A.length-15,k=0;for(;k>8&255]^O[A[k++]^C>>16&255]^w[A[k++]^C>>>24]^F[A[k++]]^V[A[k++]]^q[A[k++]]^Z[A[k++]]^X[A[k++]]^W[A[k++]]^H[A[k++]]^G[A[k++]]^K[A[k++]]^I[A[k++]]^J[A[k++]]^z[A[k++]];b+=15;while(k>>8^z[(C^A[k++])&255];return~C}function j(A,T){var C=T^-1;for(var b=0,k=A.length,S=0,i=0;b>>8^z[(C^S)&255];else if(S<2048)C=C>>>8^z[(C^(192|S>>6&31))&255],C=C>>>8^z[(C^(128|S&63))&255];else if(S>=55296&&S<57344)S=(S&1023)+64,i=A.charCodeAt(b++)&1023,C=C>>>8^z[(C^(240|S>>8&7))&255],C=C>>>8^z[(C^(128|S>>2&63))&255],C=C>>>8^z[(C^(128|i>>6&15|(S&3)<<4))&255],C=C>>>8^z[(C^(128|i&63))&255];else C=C>>>8^z[(C^(224|S>>12&15))&255],C=C>>>8^z[(C^(128|S>>6&63))&255],C=C>>>8^z[(C^(128|S&63))&255];return~C}$.table=z,$.bstr=D,$.buf=P,$.str=j})});var pq0=E((Sa1,cq0)=>{var{Transform:fW1}=C8(),uW1=BI();class nq0 extends fW1{constructor($){super($);this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform($,Y,z){if($)this.checksum=uW1.buf($,this.checksum)>>>0,this.rawSize+=$.length;z(null,$)}digest($){let Y=Buffer.allocUnsafe(4);return Y.writeUInt32BE(this.checksum>>>0,0),$?Y.toString($):Y}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}cq0.exports=nq0});var lq0=E((ga1,mq0)=>{var{DeflateRaw:bW1}=I0("zlib"),iW1=BI();class dq0 extends bW1{constructor($){super($);this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push($,Y){if($)this.compressedSize+=$.length;return super.push($,Y)}_transform($,Y,z){if($)this.checksum=iW1.buf($,this.checksum)>>>0,this.rawSize+=$.length;super._transform($,Y,z)}digest($){let Y=Buffer.allocUnsafe(4);return Y.writeUInt32BE(this.checksum>>>0,0),$?Y.toString($):Y}hex(){return this.digest("hex").toUpperCase()}size($=!1){if($)return this.compressedSize;else return this.rawSize}}mq0.exports=dq0});var Xi=E((ya1,oq0)=>{oq0.exports={CRC32Stream:pq0(),DeflateCRC32Stream:lq0()}});var aq0=E((ua1,sq0)=>{var nW1=I0("util").inherits,cW1=Hi(),{CRC32Stream:pW1}=Xi(),{DeflateCRC32Stream:dW1}=Xi(),rq0=Ji(),ka1=Yi(),xa1=eb(),D1=$i(),fa1=Ui(),K1=VA(),k6=sq0.exports=function($){if(!(this instanceof k6))return new k6($);$=this.options=this._defaults($),rq0.call(this,$),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:$.forceZip64,forceLocalTime:$.forceLocalTime}};nW1(k6,rq0);k6.prototype._afterAppend=function($){if(this._entries.push($),$.getGeneralPurposeBit().usesDataDescriptor())this._writeDataDescriptor($);if(this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished)this._finish()};k6.prototype._appendBuffer=function($,Y,z){if(Y.length===0)$.setMethod(D1.METHOD_STORED);var U=$.getMethod();if(U===D1.METHOD_STORED)$.setSize(Y.length),$.setCompressedSize(Y.length),$.setCrc(cW1.unsigned(Y));if(this._writeLocalFileHeader($),U===D1.METHOD_STORED){this.write(Y),this._afterAppend($),z(null,$);return}else if(U===D1.METHOD_DEFLATED){this._smartStream($,z).end(Y);return}else{z(Error("compression method "+U+" not implemented"));return}};k6.prototype._appendStream=function($,Y,z){$.getGeneralPurposeBit().useDataDescriptor(!0),$.setVersionNeededToExtract(D1.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader($);var U=this._smartStream($,z);Y.once("error",function(Q){U.emit("error",Q),U.end()}),Y.pipe(U)};k6.prototype._defaults=function($){if(typeof $!=="object")$={};if(typeof $.zlib!=="object")$.zlib={};if(typeof $.zlib.level!=="number")$.zlib.level=D1.ZLIB_BEST_SPEED;return $.forceZip64=!!$.forceZip64,$.forceLocalTime=!!$.forceLocalTime,$};k6.prototype._finish=function(){if(this._archive.centralOffset=this.offset,this._entries.forEach(function($){this._writeCentralFileHeader($)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64())this._writeCentralDirectoryZip64();this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()};k6.prototype._normalizeEntry=function($){if($.getMethod()===-1)$.setMethod(D1.METHOD_DEFLATED);if($.getMethod()===D1.METHOD_DEFLATED)$.getGeneralPurposeBit().useDataDescriptor(!0),$.setVersionNeededToExtract(D1.MIN_VERSION_DATA_DESCRIPTOR);if($.getTime()===-1)$.setTime(new Date,this._archive.forceLocalTime);$._offsets={file:0,data:0,contents:0}};k6.prototype._smartStream=function($,Y){var z=$.getMethod()===D1.METHOD_DEFLATED,U=z?new dW1(this.options.zlib):new pW1,Q=null;function J(){var I=U.digest().readUInt32BE(0);$.setCrc(I),$.setSize(U.size()),$.setCompressedSize(U.size(!0)),this._afterAppend($),Y(Q,$)}return U.once("end",J.bind(this)),U.once("error",function(I){Q=I}),U.pipe(this,{end:!1}),U};k6.prototype._writeCentralDirectoryEnd=function(){var $=this._entries.length,Y=this._archive.centralLength,z=this._archive.centralOffset;if(this.isZip64())$=D1.ZIP64_MAGIC_SHORT,Y=D1.ZIP64_MAGIC,z=D1.ZIP64_MAGIC;this.write(K1.getLongBytes(D1.SIG_EOCD)),this.write(D1.SHORT_ZERO),this.write(D1.SHORT_ZERO),this.write(K1.getShortBytes($)),this.write(K1.getShortBytes($)),this.write(K1.getLongBytes(Y)),this.write(K1.getLongBytes(z));var U=this.getComment(),Q=Buffer.byteLength(U);this.write(K1.getShortBytes(Q)),this.write(U)};k6.prototype._writeCentralDirectoryZip64=function(){this.write(K1.getLongBytes(D1.SIG_ZIP64_EOCD)),this.write(K1.getEightBytes(44)),this.write(K1.getShortBytes(D1.MIN_VERSION_ZIP64)),this.write(K1.getShortBytes(D1.MIN_VERSION_ZIP64)),this.write(D1.LONG_ZERO),this.write(D1.LONG_ZERO),this.write(K1.getEightBytes(this._entries.length)),this.write(K1.getEightBytes(this._entries.length)),this.write(K1.getEightBytes(this._archive.centralLength)),this.write(K1.getEightBytes(this._archive.centralOffset)),this.write(K1.getLongBytes(D1.SIG_ZIP64_EOCD_LOC)),this.write(D1.LONG_ZERO),this.write(K1.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(K1.getLongBytes(1))};k6.prototype._writeCentralFileHeader=function($){var Y=$.getGeneralPurposeBit(),z=$.getMethod(),U=$._offsets,Q=$.getSize(),J=$.getCompressedSize();if($.isZip64()||U.file>D1.ZIP64_MAGIC){Q=D1.ZIP64_MAGIC,J=D1.ZIP64_MAGIC,$.setVersionNeededToExtract(D1.MIN_VERSION_ZIP64);var I=Buffer.concat([K1.getShortBytes(D1.ZIP64_EXTRA_ID),K1.getShortBytes(24),K1.getEightBytes($.getSize()),K1.getEightBytes($.getCompressedSize()),K1.getEightBytes(U.file)],28);$.setExtra(I)}this.write(K1.getLongBytes(D1.SIG_CFH)),this.write(K1.getShortBytes($.getPlatform()<<8|D1.VERSION_MADEBY)),this.write(K1.getShortBytes($.getVersionNeededToExtract())),this.write(Y.encode()),this.write(K1.getShortBytes(z)),this.write(K1.getLongBytes($.getTimeDos())),this.write(K1.getLongBytes($.getCrc())),this.write(K1.getLongBytes(J)),this.write(K1.getLongBytes(Q));var K=$.getName(),G=$.getComment(),H=$.getCentralDirectoryExtra();if(Y.usesUTF8ForNames())K=Buffer.from(K),G=Buffer.from(G);if(this.write(K1.getShortBytes(K.length)),this.write(K1.getShortBytes(H.length)),this.write(K1.getShortBytes(G.length)),this.write(D1.SHORT_ZERO),this.write(K1.getShortBytes($.getInternalAttributes())),this.write(K1.getLongBytes($.getExternalAttributes())),U.file>D1.ZIP64_MAGIC)this.write(K1.getLongBytes(D1.ZIP64_MAGIC));else this.write(K1.getLongBytes(U.file));this.write(K),this.write(H),this.write(G)};k6.prototype._writeDataDescriptor=function($){if(this.write(K1.getLongBytes(D1.SIG_DD)),this.write(K1.getLongBytes($.getCrc())),$.isZip64())this.write(K1.getEightBytes($.getCompressedSize())),this.write(K1.getEightBytes($.getSize()));else this.write(K1.getLongBytes($.getCompressedSize())),this.write(K1.getLongBytes($.getSize()))};k6.prototype._writeLocalFileHeader=function($){var Y=$.getGeneralPurposeBit(),z=$.getMethod(),U=$.getName(),Q=$.getLocalFileDataExtra();if($.isZip64())Y.useDataDescriptor(!0),$.setVersionNeededToExtract(D1.MIN_VERSION_ZIP64);if(Y.usesUTF8ForNames())U=Buffer.from(U);if($._offsets.file=this.offset,this.write(K1.getLongBytes(D1.SIG_LFH)),this.write(K1.getShortBytes($.getVersionNeededToExtract())),this.write(Y.encode()),this.write(K1.getShortBytes(z)),this.write(K1.getLongBytes($.getTimeDos())),$._offsets.data=this.offset,Y.usesDataDescriptor())this.write(D1.LONG_ZERO),this.write(D1.LONG_ZERO),this.write(D1.LONG_ZERO);else this.write(K1.getLongBytes($.getCrc())),this.write(K1.getLongBytes($.getCompressedSize())),this.write(K1.getLongBytes($.getSize()));this.write(K1.getShortBytes(U.length)),this.write(K1.getShortBytes(Q.length)),this.write(U),this.write(Q),$._offsets.contents=this.offset};k6.prototype.getComment=function($){return this._archive.comment!==null?this._archive.comment:""};k6.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>D1.ZIP64_MAGIC_SHORT||this._archive.centralLength>D1.ZIP64_MAGIC||this._archive.centralOffset>D1.ZIP64_MAGIC};k6.prototype.setComment=function($){this._archive.comment=$}});var Zi=E((ba1,tq0)=>{tq0.exports={ArchiveEntry:qA(),ZipArchiveEntry:Yi(),ArchiveOutputStream:Ji(),ZipArchiveOutputStream:aq0()}});var zV0=E((ia1,YV0)=>{var $V0=o8(),PI=I0("path"),qi=Vb(),mW1=Nb(),lW1=Tb(),oW1=Eb(),rW1=BX(),pz=YV0.exports={},eq0=/[\/\\]/g,sW1=function($,Y){var z=[];return qi($).forEach(function(U){var Q=U.indexOf("!")===0;if(Q)U=U.slice(1);var J=Y(U);if(Q)z=mW1(z,J);else z=lW1(z,J)}),z};pz.exists=function(){var $=PI.join.apply(PI,arguments);return $V0.existsSync($)};pz.expand=function(...$){var Y=oW1($[0])?$.shift():{},z=Array.isArray($[0])?$[0]:$;if(z.length===0)return[];var U=sW1(z,function(Q){return rW1.sync(Q,Y)});if(Y.filter)U=U.filter(function(Q){Q=PI.join(Y.cwd||"",Q);try{if(typeof Y.filter==="function")return Y.filter(Q);else return $V0.statSync(Q)[Y.filter]()}catch(J){return!1}});return U};pz.expandMapping=function($,Y,z){z=Object.assign({rename:function(J,I){return PI.join(J||"",I)}},z);var U=[],Q={};return pz.expand(z,$).forEach(function(J){var I=J;if(z.flatten)I=PI.basename(I);if(z.ext)I=I.replace(/(\.[^\/]*)?$/,z.ext);var K=z.rename(Y,I,z);if(z.cwd)J=PI.join(z.cwd,J);if(K=K.replace(eq0,"/"),J=J.replace(eq0,"/"),Q[K])Q[K].src.push(J);else U.push({src:[J],dest:K}),Q[K]=U[U.length-1]}),U};pz.normalizeFilesArray=function($){var Y=[];if($.forEach(function(z){var U;if("src"in z||"dest"in z)Y.push(z)}),Y.length===0)return[];return Y=_(Y).chain().forEach(function(z){if(!("src"in z)||!z.src)return;if(Array.isArray(z.src))z.src=qi(z.src);else z.src=[z.src]}).map(function(z){var U=Object.assign({},z);if(delete U.src,delete U.dest,z.expand)return pz.expandMapping(z.src,z.dest,U).map(function(J){var I=Object.assign({},z);return I.orig=Object.assign({},z),I.src=J.src,I.dest=J.dest,["expand","cwd","flatten","rename","ext"].forEach(function(K){delete I[K]}),I});var Q=Object.assign({},z);if(Q.orig=Object.assign({},z),"src"in Q)Object.defineProperty(Q,"src",{enumerable:!0,get:function J(){var I;if(!("result"in J))I=z.src,I=Array.isArray(I)?qi(I):[I],J.result=pz.expand(U,I);return J.result}});if("dest"in Q)Q.dest=z.dest;return Q}).flatten().value(),Y}});var IV0=E((na1,JV0)=>{var Vi=o8(),UV0=I0("path"),aW1=bD(),QV0=Sz(),tW1=su(),eW1=I0("stream").Stream,$X1=C8().PassThrough,V$=JV0.exports={};V$.file=zV0();V$.collectStream=function($,Y){var z=[],U=0;$.on("error",Y),$.on("data",function(Q){z.push(Q),U+=Q.length}),$.on("end",function(){var Q=Buffer.alloc(U),J=0;z.forEach(function(I){I.copy(Q,J),J+=I.length}),Y(null,Q)})};V$.dateify=function($){if($=$||new Date,$ instanceof Date)$=$;else if(typeof $==="string")$=new Date($);else $=new Date;return $};V$.defaults=function($,Y,z){var U=arguments;return U[0]=U[0]||{},tW1(...U)};V$.isStream=function($){return $ instanceof eW1};V$.lazyReadStream=function($){return new aW1.Readable(function(){return Vi.createReadStream($)})};V$.normalizeInputSource=function($){if($===null)return Buffer.alloc(0);else if(typeof $==="string")return Buffer.from($);else if(V$.isStream($))return $.pipe(new $X1);return $};V$.sanitizePath=function($){return QV0($,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};V$.trailingSlashIt=function($){return $.slice(-1)!=="/"?$+"/":$};V$.unixifyPath=function($){return QV0($,!1).replace(/^\w+:/,"")};V$.walkdir=function($,Y,z){var U=[];if(typeof Y==="function")z=Y,Y=$;Vi.readdir($,function(Q,J){var I=0,K,G;if(Q)return z(Q);(function H(){if(K=J[I++],!K)return z(null,U);G=UV0.join($,K),Vi.stat(G,function(W,X){if(U.push({path:G,relative:UV0.relative(Y,G).replace(/\\/g,"/"),stats:X}),X&&X.isDirectory())V$.walkdir(G,Y,function(Z,q){q.forEach(function(V){U.push(V)}),H()});else H()})})()})}});var GV0=E((ca1,KV0)=>{var YX1=I0("util").inherits,Fi=Zi().ZipArchiveOutputStream,zX1=Zi().ZipArchiveEntry,Li=IV0(),jI=KV0.exports=function($){if(!(this instanceof jI))return new jI($);if($=this.options=$||{},$.zlib=$.zlib||{},Fi.call(this,$),typeof $.level==="number"&&$.level>=0)$.zlib.level=$.level,delete $.level;if(!$.forceZip64&&typeof $.zlib.level==="number"&&$.zlib.level===0)$.store=!0;if($.namePrependSlash=$.namePrependSlash||!1,$.comment&&$.comment.length>0)this.setComment($.comment)};YX1(jI,Fi);jI.prototype._normalizeFileData=function($){$=Li.defaults($,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var Y=$.type==="directory",z=$.type==="symlink";if($.name){if($.name=Li.sanitizePath($.name),!z&&$.name.slice(-1)==="/")Y=!0,$.type="directory";else if(Y)$.name+="/"}if(Y||z)$.store=!0;return $.date=Li.dateify($.date),$};jI.prototype.entry=function($,Y,z){if(typeof z!=="function")z=this._emitErrorCallback.bind(this);if(Y=this._normalizeFileData(Y),Y.type!=="file"&&Y.type!=="directory"&&Y.type!=="symlink"){z(Error(Y.type+" entries not currently supported"));return}if(typeof Y.name!=="string"||Y.name.length===0){z(Error("entry name must be a non-empty string value"));return}if(Y.type==="symlink"&&typeof Y.linkname!=="string"){z(Error("entry linkname must be a non-empty string value when type equals symlink"));return}var U=new zX1(Y.name);if(U.setTime(Y.date,this.options.forceLocalTime),Y.namePrependSlash)U.setName(Y.name,!0);if(Y.store)U.setMethod(0);if(Y.comment.length>0)U.setComment(Y.comment);if(Y.type==="symlink"&&typeof Y.mode!=="number")Y.mode=40960;if(typeof Y.mode==="number"){if(Y.type==="symlink")Y.mode|=40960;U.setUnixMode(Y.mode)}if(Y.type==="symlink"&&typeof Y.linkname==="string")$=Buffer.from(Y.linkname);return Fi.prototype.entry.call(this,U,$,z)};jI.prototype.finalize=function(){this.finish()}});var WV0=E((pa1,HV0)=>{var UX1=GV0(),QX1=TX(),N2=function($){if(!(this instanceof N2))return new N2($);$=this.options=QX1.defaults($,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new UX1($)};N2.prototype.append=function($,Y,z){this.engine.entry($,Y,z)};N2.prototype.finalize=function(){this.engine.finalize()};N2.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};N2.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};N2.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};HV0.exports=N2});var FV0=E((da1,LV0)=>{function XV0($,Y){var z=Object.keys($);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols($);Y&&(U=U.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),z.push.apply(z,U)}return z}function ZV0($){for(var Y=1;Y0)this.tail.next=U;else this.head=U;this.tail=U,++this.length}},{key:"unshift",value:function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q}},{key:"concat",value:function(z){if(this.length===0)return LA.alloc(0);var U=LA.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)ZX1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U}},{key:"consume",value:function(z,U){var Q;if(zI.length?I.length:z;if(K===I.length)J+=I;else J+=I.slice(0,z);if(z-=K,z===0){if(K===I.length)if(++Q,U.next)this.head=U.next;else this.head=this.tail=null;else this.head=U,U.data=I.slice(K);break}++Q}return this.length-=Q,J}},{key:"_getBuffer",value:function(z){var U=LA.allocUnsafe(z),Q=this.head,J=1;Q.data.copy(U),z-=Q.data.length;while(Q=Q.next){var I=Q.data,K=z>I.length?I.length:z;if(I.copy(U,U.length-z,0,K),z-=K,z===0){if(K===I.length)if(++J,Q.next)this.head=Q.next;else this.head=this.tail=null;else this.head=Q,Q.data=I.slice(K);break}++J}return this.length-=J,U}},{key:XX1,value:function(z,U){return Oi(this,ZV0(ZV0({},U),{},{depth:0,customInspect:!1}))}}]),$}()});var Mi=E((ma1,wV0)=>{function qX1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)process.nextTick(wi,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(wi,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J)if(!z._writableState)process.nextTick(OV0,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,process.nextTick(OV0,z,J);else process.nextTick(FA,z);else if(Y)process.nextTick(FA,z),Y(J);else process.nextTick(FA,z)}),this}function OV0($,Y){wi($,Y),FA($)}function FA($){if($._writableState&&!$._writableState.emitClose)return;if($._readableState&&!$._readableState.emitClose)return;$.emit("close")}function VX1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function wi($,Y){$.emit("error",Y)}function LX1($,Y){var{_readableState:z,_writableState:U}=$;if(z&&z.autoDestroy||U&&U.autoDestroy)$.destroy(Y);else $.emit("error",Y)}wV0.exports={destroy:qX1,undestroy:VX1,errorOrDestroy:LX1}});var D2=E((MX1,DV0)=>{var NV0={};function k$($,Y,z){if(!z)z=Error;function U(J,I,K){if(typeof Y==="string")return Y;else return Y(J,I,K)}class Q extends z{constructor(J,I,K){super(U(J,I,K))}}Q.prototype.name=z.name,Q.prototype.code=$,NV0[$]=Q}function MV0($,Y){if(Array.isArray($)){let z=$.length;if($=$.map((U)=>String(U)),z>2)return`one of ${Y} ${$.slice(0,z-1).join(", ")}, or `+$[z-1];else if(z===2)return`one of ${Y} ${$[0]} or ${$[1]}`;else return`of ${Y} ${$[0]}`}else return`of ${Y} ${String($)}`}function FX1($,Y,z){return $.substr(!z||z<0?0:+z,Y.length)===Y}function OX1($,Y,z){if(z===void 0||z>$.length)z=$.length;return $.substring(z-Y.length,z)===Y}function wX1($,Y,z){if(typeof z!=="number")z=0;if(z+Y.length>$.length)return!1;else return $.indexOf(Y,z)!==-1}k$("ERR_INVALID_OPT_VALUE",function($,Y){return'The value "'+Y+'" is invalid for option "'+$+'"'},TypeError);k$("ERR_INVALID_ARG_TYPE",function($,Y,z){let U;if(typeof Y==="string"&&FX1(Y,"not "))U="must not be",Y=Y.replace(/^not /,"");else U="must be";let Q;if(OX1($," argument"))Q=`The ${$} ${U} ${MV0(Y,"type")}`;else{let J=wX1($,".")?"property":"argument";Q=`The "${$}" ${J} ${U} ${MV0(Y,"type")}`}return Q+=`. Received type ${typeof z}`,Q},TypeError);k$("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");k$("ERR_METHOD_NOT_IMPLEMENTED",function($){return"The "+$+" method is not implemented"});k$("ERR_STREAM_PREMATURE_CLOSE","Premature close");k$("ERR_STREAM_DESTROYED",function($){return"Cannot call "+$+" after a stream was destroyed"});k$("ERR_MULTIPLE_CALLBACK","Callback called multiple times");k$("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");k$("ERR_STREAM_WRITE_AFTER_END","write after end");k$("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);k$("ERR_UNKNOWN_ENCODING",function($){return"Unknown encoding: "+$},TypeError);k$("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");MX1.codes=NV0});var Ni=E((la1,AV0)=>{var DX1=D2().codes.ERR_INVALID_OPT_VALUE;function AX1($,Y,z){return $.highWaterMark!=null?$.highWaterMark:Y?$[z]:null}function BX1($,Y,z,U){var Q=AX1(Y,U,z);if(Q!=null){if(!(isFinite(Q)&&Math.floor(Q)===Q)||Q<0){var J=U?z:"highWaterMark";throw new DX1(J,Q)}return Math.floor(Q)}return $.objectMode?16:16384}AV0.exports={getHighWaterMark:BX1}});var Bi=E((oa1,CV0)=>{CV0.exports=Q6;function PV0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){sX1(Y,$)}}var TI;Q6.WritableState=CX;var PX1={deprecate:f7()},jV0=I0("stream"),wA=I0("buffer").Buffer,jX1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function TX1($){return wA.from($)}function EX1($){return wA.isBuffer($)||$ instanceof jX1}var Ai=Mi(),CX1=Ni(),RX1=CX1.getHighWaterMark,A2=D2().codes,_X1=A2.ERR_INVALID_ARG_TYPE,vX1=A2.ERR_METHOD_NOT_IMPLEMENTED,hX1=A2.ERR_MULTIPLE_CALLBACK,SX1=A2.ERR_STREAM_CANNOT_PIPE,gX1=A2.ERR_STREAM_DESTROYED,yX1=A2.ERR_STREAM_NULL_VALUES,kX1=A2.ERR_STREAM_WRITE_AFTER_END,xX1=A2.ERR_UNKNOWN_ENCODING,EI=Ai.errorOrDestroy;X1()(Q6,jV0);function fX1(){}function CX($,Y,z){if(TI=TI||dz(),$=$||{},typeof z!=="boolean")z=Y instanceof TI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;this.highWaterMark=RX1(this,$,"writableHighWaterMark",z),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=$.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){dX1(Y,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new PV0(this)}CX.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(CX.prototype,"buffer",{get:PX1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var OA;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")OA=Function.prototype[Symbol.hasInstance],Object.defineProperty(Q6,Symbol.hasInstance,{value:function(Y){if(OA.call(this,Y))return!0;if(this!==Q6)return!1;return Y&&Y._writableState instanceof CX}});else OA=function(Y){return Y instanceof this};function Q6($){TI=TI||dz();var Y=this instanceof TI;if(!Y&&!OA.call(Q6,this))return new Q6($);if(this._writableState=new CX($,this,Y),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}jV0.call(this)}Q6.prototype.pipe=function(){EI(this,new SX1)};function uX1($,Y){var z=new kX1;EI($,z),process.nextTick(Y,z)}function bX1($,Y,z,U){var Q;if(z===null)Q=new yX1;else if(typeof z!=="string"&&!Y.objectMode)Q=new _X1("chunk",["string","Buffer"],z);if(Q)return EI($,Q),process.nextTick(U,Q),!1;return!0}Q6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&EX1($);if(J&&!wA.isBuffer($))$=TX1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=fX1;if(U.ending)uX1(this,z);else if(J||bX1(this,U,$,z))U.pendingcb++,Q=nX1(this,U,J,$,Y,z);return Q};Q6.prototype.cork=function(){this._writableState.corked++};Q6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)TV0(this,$)}};Q6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new xX1(Y);return this._writableState.defaultEncoding=Y,this};Object.defineProperty(Q6.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function iX1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=wA.from(Y,z);return Y}Object.defineProperty(Q6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function nX1($,Y,z,U,Q,J){if(!z){var I=iX1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var aX1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};_V0.exports=O9;var RV0=ji(),Pi=Bi();X1()(O9,RV0);{MA=aX1(Pi.prototype);for(RX=0;RX{var vV0=D2().codes.ERR_STREAM_PREMATURE_CLOSE;function $Z1($){var Y=!1;return function(){if(Y)return;Y=!0;for(var z=arguments.length,U=Array(z),Q=0;Q{var DA;function B2($,Y,z){if(Y=UZ1(Y),Y in $)Object.defineProperty($,Y,{value:z,enumerable:!0,configurable:!0,writable:!0});else $[Y]=z;return $}function UZ1($){var Y=QZ1($,"string");return typeof Y==="symbol"?Y:String(Y)}function QZ1($,Y){if(typeof $!=="object"||$===null)return $;var z=$[Symbol.toPrimitive];if(z!==void 0){var U=z.call($,Y||"default");if(typeof U!=="object")return U;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var JZ1=NA(),P2=Symbol("lastResolve"),mz=Symbol("lastReject"),vX=Symbol("error"),AA=Symbol("ended"),lz=Symbol("lastPromise"),Ti=Symbol("handlePromise"),oz=Symbol("stream");function j2($,Y){return{value:$,done:Y}}function IZ1($){var Y=$[P2];if(Y!==null){var z=$[oz].read();if(z!==null)$[lz]=null,$[P2]=null,$[mz]=null,Y(j2(z,!1))}}function KZ1($){process.nextTick(IZ1,$)}function GZ1($,Y){return function(z,U){$.then(function(){if(Y[AA]){z(j2(void 0,!0));return}Y[Ti](z,U)},U)}}var HZ1=Object.getPrototypeOf(function(){}),WZ1=Object.setPrototypeOf((DA={get stream(){return this[oz]},next:function(){var Y=this,z=this[vX];if(z!==null)return Promise.reject(z);if(this[AA])return Promise.resolve(j2(void 0,!0));if(this[oz].destroyed)return new Promise(function(I,K){process.nextTick(function(){if(Y[vX])K(Y[vX]);else I(j2(void 0,!0))})});var U=this[lz],Q;if(U)Q=new Promise(GZ1(U,this));else{var J=this[oz].read();if(J!==null)return Promise.resolve(j2(J,!1));Q=new Promise(this[Ti])}return this[lz]=Q,Q}},B2(DA,Symbol.asyncIterator,function(){return this}),B2(DA,"return",function(){var Y=this;return new Promise(function(z,U){Y[oz].destroy(null,function(Q){if(Q){U(Q);return}z(j2(void 0,!0))})})}),DA),HZ1),XZ1=function(Y){var z,U=Object.create(WZ1,(z={},B2(z,oz,{value:Y,writable:!0}),B2(z,P2,{value:null,writable:!0}),B2(z,mz,{value:null,writable:!0}),B2(z,vX,{value:null,writable:!0}),B2(z,AA,{value:Y._readableState.endEmitted,writable:!0}),B2(z,Ti,{value:function(J,I){var K=U[oz].read();if(K)U[lz]=null,U[P2]=null,U[mz]=null,J(j2(K,!1));else U[P2]=J,U[mz]=I},writable:!0}),z));return U[lz]=null,JZ1(Y,function(Q){if(Q&&Q.code!=="ERR_STREAM_PREMATURE_CLOSE"){var J=U[mz];if(J!==null)U[lz]=null,U[P2]=null,U[mz]=null,J(Q);U[vX]=Q;return}var I=U[P2];if(I!==null)U[lz]=null,U[P2]=null,U[mz]=null,I(j2(void 0,!0));U[AA]=!0}),Y.on("readable",KZ1.bind(null,U)),U};gV0.exports=XZ1});var uV0=E((ta1,fV0)=>{function kV0($,Y,z,U,Q,J,I){try{var K=$[J](I),G=K.value}catch(H){z(H);return}if(K.done)Y(G);else Promise.resolve(G).then(U,Q)}function ZZ1($){return function(){var Y=this,z=arguments;return new Promise(function(U,Q){var J=$.apply(Y,z);function I(G){kV0(J,U,Q,I,K,"next",G)}function K(G){kV0(J,U,Q,I,K,"throw",G)}I(void 0)})}}function xV0($,Y){var z=Object.keys($);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols($);Y&&(U=U.filter(function(Q){return Object.getOwnPropertyDescriptor($,Q).enumerable})),z.push.apply(z,U)}return z}function qZ1($){for(var Y=1;Y{rV0.exports=d1;var CI;d1.ReadableState=cV0;var ea1=I0("events").EventEmitter,nV0=function(Y,z){return Y.listeners(z).length},SX=I0("stream"),BA=I0("buffer").Buffer,MZ1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function NZ1($){return BA.from($)}function DZ1($){return BA.isBuffer($)||$ instanceof MZ1}var Ei=I0("util"),_1;if(Ei&&Ei.debuglog)_1=Ei.debuglog("stream");else _1=function(){};var AZ1=FV0(),gi=Mi(),BZ1=Ni(),PZ1=BZ1.getHighWaterMark,PA=D2().codes,jZ1=PA.ERR_INVALID_ARG_TYPE,TZ1=PA.ERR_STREAM_PUSH_AFTER_EOF,EZ1=PA.ERR_METHOD_NOT_IMPLEMENTED,CZ1=PA.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,RI,Ci,Ri;X1()(d1,SX);var hX=gi.errorOrDestroy,_i=["error","close","destroy","pause","resume"];function RZ1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(Array.isArray($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function cV0($,Y,z){if(CI=CI||dz(),$=$||{},typeof z!=="boolean")z=Y instanceof CI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;if(this.highWaterMark=PZ1(this,$,"readableHighWaterMark",z),this.buffer=new AZ1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!RI)RI=TJ().StringDecoder;this.decoder=new RI($.encoding),this.encoding=$.encoding}}function d1($){if(CI=CI||dz(),!(this instanceof d1))return new d1($);var Y=this instanceof CI;if(this._readableState=new cV0($,this,Y),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}SX.call(this)}Object.defineProperty(d1.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(Y){if(!this._readableState)return;this._readableState.destroyed=Y}});d1.prototype.destroy=gi.destroy;d1.prototype._undestroy=gi.undestroy;d1.prototype._destroy=function($,Y){Y($)};d1.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=BA.from($,Y),Y="";U=!0}}else U=!0;return pV0(this,$,Y,!1,U)};d1.prototype.unshift=function($){return pV0(this,$,null,!0,!1)};function pV0($,Y,z,U,Q){_1("readableAddChunk",Y);var J=$._readableState;if(Y===null)J.reading=!1,hZ1($,J);else{var I;if(!Q)I=_Z1(J,Y);if(I)hX($,I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==BA.prototype)Y=NZ1(Y);if(U)if(J.endEmitted)hX($,new CZ1);else vi($,J,Y,!0);else if(J.ended)hX($,new TZ1);else if(J.destroyed)return!1;else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)vi($,J,Y,!1);else Si($,J);else vi($,J,Y,!1)}else if(!U)J.reading=!1,Si($,J)}return!J.ended&&(J.length=bV0)$=bV0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function iV0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=vZ1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}d1.prototype.read=function($){_1("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended)){if(_1("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)hi(this);else jA(this);return null}if($=iV0($,Y),$===0&&Y.ended){if(Y.length===0)hi(this);return null}var U=Y.needReadable;if(_1("need readable",U),Y.length===0||Y.length-$0)Q=lV0($,Y);else Q=null;if(Q===null)Y.needReadable=Y.length<=Y.highWaterMark,$=0;else Y.length-=$,Y.awaitDrain=0;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)hi(this)}if(Q!==null)this.emit("data",Q);return Q};function hZ1($,Y){if(_1("onEofChunk"),Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}if(Y.ended=!0,Y.sync)jA($);else if(Y.needReadable=!1,!Y.emittedReadable)Y.emittedReadable=!0,dV0($)}function jA($){var Y=$._readableState;if(_1("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,!Y.emittedReadable)_1("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(dV0,$)}function dV0($){var Y=$._readableState;if(_1("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended))$.emit("readable"),Y.emittedReadable=!1;Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,yi($)}function Si($,Y){if(!Y.readingMore)Y.readingMore=!0,process.nextTick(SZ1,$,Y)}function SZ1($,Y){while(!Y.reading&&!Y.ended&&(Y.length1&&oV0(U.pipes,$)!==-1)&&!H)_1("false write response, pause",U.awaitDrain),U.awaitDrain++;z.pause()}}function Z(w){if(_1("onerror",w),F(),$.removeListener("error",Z),nV0($,"error")===0)hX($,w)}RZ1($,"error",Z);function q(){$.removeListener("finish",V),F()}$.once("close",q);function V(){_1("onfinish"),$.removeListener("close",q),F()}$.once("finish",V);function F(){_1("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)_1("pipe resume"),z.resume();return $};function gZ1($){return function(){var z=$._readableState;if(_1("pipeOnDrain",z.awaitDrain),z.awaitDrain)z.awaitDrain--;if(z.awaitDrain===0&&nV0($,"data"))z.flowing=!0,yi($)}}d1.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J0,U.flowing!==!1)this.resume()}else if($==="readable"){if(!U.endEmitted&&!U.readableListening){if(U.readableListening=U.needReadable=!0,U.flowing=!1,U.emittedReadable=!1,_1("on readable",U.length,U.reading),U.length)jA(this);else if(!U.reading)process.nextTick(yZ1,this)}}return z};d1.prototype.addListener=d1.prototype.on;d1.prototype.removeListener=function($,Y){var z=SX.prototype.removeListener.call(this,$,Y);if($==="readable")process.nextTick(mV0,this);return z};d1.prototype.removeAllListeners=function($){var Y=SX.prototype.removeAllListeners.apply(this,arguments);if($==="readable"||$===void 0)process.nextTick(mV0,this);return Y};function mV0($){var Y=$._readableState;if(Y.readableListening=$.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused)Y.flowing=!0;else if($.listenerCount("data")>0)$.resume()}function yZ1($){_1("readable nexttick read 0"),$.read(0)}d1.prototype.resume=function(){var $=this._readableState;if(!$.flowing)_1("resume"),$.flowing=!$.readableListening,kZ1(this,$);return $.paused=!1,this};function kZ1($,Y){if(!Y.resumeScheduled)Y.resumeScheduled=!0,process.nextTick(xZ1,$,Y)}function xZ1($,Y){if(_1("resume",Y.reading),!Y.reading)$.read(0);if(Y.resumeScheduled=!1,$.emit("resume"),yi($),Y.flowing&&!Y.reading)$.read(0)}d1.prototype.pause=function(){if(_1("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)_1("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function yi($){var Y=$._readableState;_1("flow",Y.flowing);while(Y.flowing&&$.read()!==null);}d1.prototype.wrap=function($){var Y=this,z=this._readableState,U=!1;$.on("end",function(){if(_1("wrapped end"),z.decoder&&!z.ended){var I=z.decoder.end();if(I&&I.length)Y.push(I)}Y.push(null)}),$.on("data",function(I){if(_1("wrapped data"),z.decoder)I=z.decoder.write(I);if(z.objectMode&&(I===null||I===void 0))return;else if(!z.objectMode&&(!I||!I.length))return;var K=Y.push(I);if(!K)U=!0,$.pause()});for(var Q in $)if(this[Q]===void 0&&typeof $[Q]==="function")this[Q]=function(K){return function(){return $[K].apply($,arguments)}}(Q);for(var J=0;J<_i.length;J++)$.on(_i[J],this.emit.bind(this,_i[J]));return this._read=function(I){if(_1("wrapped _read",I),U)U=!1,$.resume()},this};if(typeof Symbol==="function")d1.prototype[Symbol.asyncIterator]=function(){if(Ci===void 0)Ci=yV0();return Ci(this)};Object.defineProperty(d1.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(d1.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(d1.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){if(this._readableState)this._readableState.flowing=Y}});d1._fromList=lV0;Object.defineProperty(d1.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function lV0($,Y){if(Y.length===0)return null;var z;if(Y.objectMode)z=Y.buffer.shift();else if(!$||$>=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.first();else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=Y.buffer.consume($,Y.decoder);return z}function hi($){var Y=$._readableState;if(_1("endReadable",Y.endEmitted),!Y.endEmitted)Y.ended=!0,process.nextTick(fZ1,Y,$)}function fZ1($,Y){if(_1("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0){if($.endEmitted=!0,Y.readable=!1,Y.emit("end"),$.autoDestroy){var z=Y._writableState;if(!z||z.autoDestroy&&z.finished)Y.destroy()}}}if(typeof Symbol==="function")d1.from=function($,Y){if(Ri===void 0)Ri=uV0();return Ri(d1,$,Y)};function oV0($,Y){for(var z=0,U=$.length;z{aV0.exports=P3;var TA=D2().codes,uZ1=TA.ERR_METHOD_NOT_IMPLEMENTED,bZ1=TA.ERR_MULTIPLE_CALLBACK,iZ1=TA.ERR_TRANSFORM_ALREADY_TRANSFORMING,nZ1=TA.ERR_TRANSFORM_WITH_LENGTH_0,EA=dz();X1()(P3,EA);function cZ1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(U===null)return this.emit("error",new bZ1);if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{eV0.exports=gX;var tV0=ki();X1()(gX,tV0);function gX($){if(!(this instanceof gX))return new gX($);tV0.call(this,$)}gX.prototype._transform=function($,Y,z){z(null,$)}});var JL0=E((Ut1,QL0)=>{var xi;function dZ1($){var Y=!1;return function(){if(Y)return;Y=!0,$.apply(void 0,arguments)}}var UL0=D2().codes,mZ1=UL0.ERR_MISSING_ARGS,lZ1=UL0.ERR_STREAM_DESTROYED;function YL0($){if($)throw $}function oZ1($){return $.setHeader&&typeof $.abort==="function"}function rZ1($,Y,z,U){U=dZ1(U);var Q=!1;if($.on("close",function(){Q=!0}),xi===void 0)xi=NA();xi($,{readable:Y,writable:z},function(I){if(I)return U(I);Q=!0,U()});var J=!1;return function(I){if(Q)return;if(J)return;if(J=!0,oZ1($))return $.abort();if(typeof $.destroy==="function")return $.destroy();U(I||new lZ1("pipe"))}}function zL0($){$()}function sZ1($,Y){return $.pipe(Y)}function aZ1($){if(!$.length)return YL0;if(typeof $[$.length-1]!=="function")return YL0;return $.pop()}function tZ1(){for(var $=arguments.length,Y=Array($),z=0;z<$;z++)Y[z]=arguments[z];var U=aZ1(Y);if(Array.isArray(Y[0]))Y=Y[0];if(Y.length<2)throw new mZ1("streams");var Q,J=Y.map(function(I,K){var G=K0;return rZ1(I,G,H,function(W){if(!Q)Q=W;if(W)J.forEach(zL0);if(G)return;J.forEach(zL0),U(Q)})});return Y.reduce(sZ1)}QL0.exports=tZ1});var IL0=E((x$,kX)=>{var yX=I0("stream");if(process.env.READABLE_STREAM==="disable"&&yX)kX.exports=yX.Readable,Object.assign(kX.exports,yX),kX.exports.Stream=yX;else x$=kX.exports=ji(),x$.Stream=yX||x$,x$.Readable=x$,x$.Writable=Bi(),x$.Duplex=dz(),x$.Transform=ki(),x$.PassThrough=$L0(),x$.finished=NA(),x$.pipeline=JL0()});var HL0=E((Qt1,GL0)=>{var{Buffer:w5}=I0("buffer"),KL0=Symbol.for("BufferList");function D4($){if(!(this instanceof D4))return new D4($);D4._init.call(this,$)}D4._init=function(Y){if(Object.defineProperty(this,KL0,{value:!0}),this._bufs=[],this.length=0,Y)this.append(Y)};D4.prototype._new=function(Y){return new D4(Y)};D4.prototype._offset=function(Y){if(Y===0)return[0,0];let z=0;for(let U=0;Uthis.length||Y<0)return;let z=this._offset(Y);return this._bufs[z[0]][z[1]]};D4.prototype.slice=function(Y,z){if(typeof Y==="number"&&Y<0)Y+=this.length;if(typeof z==="number"&&z<0)z+=this.length;return this.copy(null,0,Y,z)};D4.prototype.copy=function(Y,z,U,Q){if(typeof U!=="number"||U<0)U=0;if(typeof Q!=="number"||Q>this.length)Q=this.length;if(U>=this.length)return Y||w5.alloc(0);if(Q<=0)return Y||w5.alloc(0);let J=!!Y,I=this._offset(U),K=Q-U,G=K,H=J&&z||0,W=I[1];if(U===0&&Q===this.length){if(!J)return this._bufs.length===1?this._bufs[0]:w5.concat(this._bufs,this.length);for(let X=0;XZ)this._bufs[X].copy(Y,H,W),H+=Z;else{this._bufs[X].copy(Y,H,W,W+G),H+=Z;break}if(G-=Z,W)W=0}if(Y.length>H)return Y.slice(0,H);return Y};D4.prototype.shallowSlice=function(Y,z){if(Y=Y||0,z=typeof z!=="number"?this.length:z,Y<0)Y+=this.length;if(z<0)z+=this.length;if(Y===z)return this._new();let U=this._offset(Y),Q=this._offset(z),J=this._bufs.slice(U[0],Q[0]+1);if(Q[1]===0)J.pop();else J[J.length-1]=J[J.length-1].slice(0,Q[1]);if(U[1]!==0)J[0]=J[0].slice(U[1]);return this._new(J)};D4.prototype.toString=function(Y,z,U){return this.slice(z,U).toString(Y)};D4.prototype.consume=function(Y){if(Y=Math.trunc(Y),Number.isNaN(Y)||Y<=0)return this;while(this._bufs.length)if(Y>=this._bufs[0].length)Y-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(Y),this.length-=Y;break}return this};D4.prototype.duplicate=function(){let Y=this._new();for(let z=0;zthis.length?this.length:Y;let U=this._offset(Y),Q=U[0],J=U[1];for(;Q=$.length){let G=I.indexOf($,J);if(G!==-1)return this._reverseOffset([Q,G]);J=I.length-$.length+1}else{let G=this._reverseOffset([Q,J]);if(this._match(G,$))return G;J++}J=0}return-1};D4.prototype._match=function($,Y){if(this.length-${var fi=IL0().Duplex,eZ1=X1(),xX=HL0();function L8($){if(!(this instanceof L8))return new L8($);if(typeof $==="function"){this._callback=$;let Y=function(U){if(this._callback)this._callback(U),this._callback=null}.bind(this);this.on("pipe",function(U){U.on("error",Y)}),this.on("unpipe",function(U){U.removeListener("error",Y)}),$=null}xX._init.call(this,$),fi.call(this)}eZ1(L8,fi);Object.assign(L8.prototype,xX.prototype);L8.prototype._new=function(Y){return new L8(Y)};L8.prototype._write=function(Y,z,U){if(this._appendBuffer(Y),typeof U==="function")U()};L8.prototype._read=function(Y){if(!this.length)return this.push(null);Y=Math.min(Y,this.length),this.push(this.slice(0,Y)),this.consume(Y)};L8.prototype.end=function(Y){if(fi.prototype.end.call(this,Y),this._callback)this._callback(null,this.slice()),this._callback=null};L8.prototype._destroy=function(Y,z){this._bufs.length=0,this.length=0,z(Y)};L8.prototype._isBufferList=function(Y){return Y instanceof L8||Y instanceof xX||L8.isBufferList(Y)};L8.isBufferList=xX.isBufferList;CA.exports=L8;CA.exports.BufferListStream=L8;CA.exports.BufferList=xX});var ii=E((Xq1)=>{var $q1=Buffer.alloc,Yq1="0000000000000000000",zq1="7777777777777777777",XL0=48,ZL0=Buffer.from("ustar\x00","binary"),Uq1=Buffer.from("00","binary"),Qq1=Buffer.from("ustar ","binary"),Jq1=Buffer.from(" \x00","binary"),Iq1=parseInt("7777",8),fX=257,bi=263,Kq1=function($,Y,z){if(typeof $!=="number")return z;if($=~~$,$>=Y)return Y;if($>=0)return $;if($+=Y,$>=0)return $;return 0},Gq1=function($){switch($){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},Hq1=function($){switch($){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},qL0=function($,Y,z,U){for(;zY)return zq1.slice(0,Y)+" ";else return Yq1.slice(0,Y-$.length)+$+" "};function Wq1($){var Y;if($[0]===128)Y=!0;else if($[0]===255)Y=!1;else return null;var z=[];for(var U=$.length-1;U>0;U--){var Q=$[U];if(Y)z.push(Q);else z.push(255-Q)}var J=0,I=z.length;for(U=0;U=Math.pow(10,z))z++;return Y+z+$};Xq1.decodeLongPath=function($,Y){return _I($,0,$.length,Y)};Xq1.encodePax=function($){var Y="";if($.name)Y+=ui(" path="+$.name+` `);if($.linkname)Y+=ui(" linkpath="+$.linkname+` @@ -119,29 +119,29 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof T6))r `;uA++,$=Array(uA*4+1).join(" ");for(var z=0;z{tF0.exports=function($,Y){var z=O4(),U=z.errorObj,Q=z.isObject;function J(X,Z){if(Q(X)){if(X instanceof $)return X;var q=K(X);if(q===U){if(Z)Z._pushContext();var V=$.reject(q.e);if(Z)Z._popContext();return V}else if(typeof q==="function"){if(H(X)){var V=new $(Y);return X._then(V._fulfill,V._reject,void 0,V,null),V}return W(X,q,Z)}}return X}function I(X){return X.then}function K(X){try{return I(X)}catch(Z){return U.e=Z,U}}var G={}.hasOwnProperty;function H(X){try{return G.call(X,"_promise0")}catch(Z){return!1}}function W(X,Z,q){var V=new $(Y),F=V;if(q)q._pushContext();if(V._captureStackTrace(),q)q._popContext();var w=!0,O=z.tryCatch(Z).call(X,N,M);if(w=!1,V&&O===U)V._rejectCallback(O.e,!0,!0),V=null;function N(D){if(!V)return;V._resolveCallback(D),V=null}function M(D){if(!V)return;V._rejectCallback(D,w,!0),V=null}return F}return J}});var YO0=E((gt1,$O0)=>{$O0.exports=function($,Y,z,U,Q){var J=O4(),I=J.isArray;function K(H){switch(H){case-2:return[];case-3:return{}}}function G(H){var W=this._promise=new $(Y);if(H instanceof $)W._propagateFrom(H,3);W._setOnCancel(this),this._values=H,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return J.inherits(G,Q),G.prototype.length=function(){return this._length},G.prototype.promise=function(){return this._promise},G.prototype._init=function H(W,X){var Z=z(this._values,this._promise);if(Z instanceof $){Z=Z._target();var q=Z._bitField;if(this._values=Z,(q&50397184)===0)return this._promise._setAsyncGuaranteed(),Z._then(H,this._reject,void 0,this,X);else if((q&33554432)!==0)Z=Z._value();else if((q&16777216)!==0)return this._reject(Z._reason());else return this._cancel()}if(Z=J.asArray(Z),Z===null){var V=U("expecting an array or an iterable object but got "+J.classString(Z)).reason();this._promise._rejectCallback(V,!1);return}if(Z.length===0){if(X===-5)this._resolveEmptyArray();else this._resolve(K(X));return}this._iterate(Z)},G.prototype._iterate=function(H){var W=this.getActualLength(H.length);this._length=W,this._values=this.shouldCopyValues()?Array(W):this._values;var X=this._promise,Z=!1,q=null;for(var V=0;V=this._length)return this._resolve(this._values),!0;return!1},G.prototype._promiseCancelled=function(){return this._cancel(),!0},G.prototype._promiseRejected=function(H){return this._totalResolved++,this._reject(H),!0},G.prototype._resultCancelled=function(){if(this._isResolved())return;var H=this._values;if(this._cancel(),H instanceof $)H.cancel();else for(var W=0;W{zO0.exports=function($){var Y=!1,z=[];$.prototype._promiseCreated=function(){},$.prototype._pushContext=function(){},$.prototype._popContext=function(){return null},$._peekContext=$.prototype._peekContext=function(){};function U(){this._trace=new U.CapturedTrace(J())}U.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,z.push(this._trace)},U.prototype._popContext=function(){if(this._trace!==void 0){var I=z.pop(),K=I._promiseCreated;return I._promiseCreated=null,K}return null};function Q(){if(Y)return new U}function J(){var I=z.length-1;if(I>=0)return z[I];return}return U.CapturedTrace=null,U.create=Q,U.deactivateLongStackTraces=function(){},U.activateLongStackTraces=function(){var I=$.prototype._pushContext,K=$.prototype._popContext,G=$._peekContext,H=$.prototype._peekContext,W=$.prototype._promiseCreated;U.deactivateLongStackTraces=function(){$.prototype._pushContext=I,$.prototype._popContext=K,$._peekContext=G,$.prototype._peekContext=H,$.prototype._promiseCreated=W,Y=!1},Y=!0,$.prototype._pushContext=U.prototype._pushContext,$.prototype._popContext=U.prototype._popContext,$._peekContext=$.prototype._peekContext=J,$.prototype._promiseCreated=function(){var X=this._peekContext();if(X&&X._promiseCreated==null)X._promiseCreated=this}},U}});var JO0=E((kt1,QO0)=>{QO0.exports=function($,Y){var{_getDomain:z,_async:U}=$,Q=E3().Warning,J=O4(),I=J.canAttachTrace,K,G,H=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,W=/\((?:timers\.js):\d+:\d+\)/,X=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Z=null,q=null,V=!1,F,w=!!(J.env("BLUEBIRD_DEBUG")!=0&&(J.env("BLUEBIRD_DEBUG")||J.env("NODE_ENV")==="development")),O=!!(J.env("BLUEBIRD_WARNINGS")!=0&&(w||J.env("BLUEBIRD_WARNINGS"))),N=!!(J.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(w||J.env("BLUEBIRD_LONG_STACK_TRACES"))),M=J.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(O||!!J.env("BLUEBIRD_W_FORGOTTEN_RETURN"));$.prototype.suppressUnhandledRejections=function(){var Q0=this._target();Q0._bitField=Q0._bitField&-1048577|524288},$.prototype._ensurePossibleRejectionHandled=function(){if((this._bitField&524288)!==0)return;this._setRejectionIsUnhandled(),U.invokeLater(this._notifyUnhandledRejection,this,void 0)},$.prototype._notifyUnhandledRejectionIsHandled=function(){r("rejectionHandled",K,void 0,this)},$.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456},$.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0},$.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var Q0=this._settledValue();this._setUnhandledRejectionIsNotified(),r("unhandledRejection",G,Q0,this)}},$.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144},$.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},$.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0},$.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576},$.prototype._unsetRejectionIsUnhandled=function(){if(this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified())this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled()},$.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0},$.prototype._warn=function(Q0,B,v){return a(Q0,B,v||this)},$.onPossiblyUnhandledRejection=function(Q0){var B=z();G=typeof Q0==="function"?B===null?Q0:J.domainBind(B,Q0):void 0},$.onUnhandledRejectionHandled=function(Q0){var B=z();K=typeof Q0==="function"?B===null?Q0:J.domainBind(B,Q0):void 0};var D=function(){};$.longStackTraces=function(){if(U.haveItemsQueued()&&!A0.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created +`}return uA--,Y};function pX($){if(!(this instanceof pX))return new pX($);if(yI(this,"name","OperationalError"),yI(this,"message",$),this.cause=$,this.isOperational=!0,$ instanceof Error)yI(this,"message",$.message),yI(this,"stack",$.stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}sF0(pX,Error);var $U=Error.__BluebirdErrorTypes__;if(!$U)$U=UL1({CancellationError:JL1,TimeoutError:IL1,OperationalError:pX,RejectionError:pX,AggregateError:dX}),wn.defineProperty(Error,"__BluebirdErrorTypes__",{value:$U,writable:!1,enumerable:!1,configurable:!1});aF0.exports={Error,TypeError:Fn,RangeError:On,CancellationError:$U.CancellationError,OperationalError:$U.OperationalError,TimeoutError:$U.TimeoutError,AggregateError:$U.AggregateError,Warning:QL1}});var eF0=E((St1,tF0)=>{tF0.exports=function($,Y){var z=O4(),U=z.errorObj,Q=z.isObject;function J(X,Z){if(Q(X)){if(X instanceof $)return X;var q=K(X);if(q===U){if(Z)Z._pushContext();var V=$.reject(q.e);if(Z)Z._popContext();return V}else if(typeof q==="function"){if(H(X)){var V=new $(Y);return X._then(V._fulfill,V._reject,void 0,V,null),V}return W(X,q,Z)}}return X}function I(X){return X.then}function K(X){try{return I(X)}catch(Z){return U.e=Z,U}}var G={}.hasOwnProperty;function H(X){try{return G.call(X,"_promise0")}catch(Z){return!1}}function W(X,Z,q){var V=new $(Y),F=V;if(q)q._pushContext();if(V._captureStackTrace(),q)q._popContext();var w=!0,O=z.tryCatch(Z).call(X,N,M);if(w=!1,V&&O===U)V._rejectCallback(O.e,!0,!0),V=null;function N(D){if(!V)return;V._resolveCallback(D),V=null}function M(D){if(!V)return;V._rejectCallback(D,w,!0),V=null}return F}return J}});var YO0=E((gt1,$O0)=>{$O0.exports=function($,Y,z,U,Q){var J=O4(),I=J.isArray;function K(H){switch(H){case-2:return[];case-3:return{}}}function G(H){var W=this._promise=new $(Y);if(H instanceof $)W._propagateFrom(H,3);W._setOnCancel(this),this._values=H,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return J.inherits(G,Q),G.prototype.length=function(){return this._length},G.prototype.promise=function(){return this._promise},G.prototype._init=function H(W,X){var Z=z(this._values,this._promise);if(Z instanceof $){Z=Z._target();var q=Z._bitField;if(this._values=Z,(q&50397184)===0)return this._promise._setAsyncGuaranteed(),Z._then(H,this._reject,void 0,this,X);else if((q&33554432)!==0)Z=Z._value();else if((q&16777216)!==0)return this._reject(Z._reason());else return this._cancel()}if(Z=J.asArray(Z),Z===null){var V=U("expecting an array or an iterable object but got "+J.classString(Z)).reason();this._promise._rejectCallback(V,!1);return}if(Z.length===0){if(X===-5)this._resolveEmptyArray();else this._resolve(K(X));return}this._iterate(Z)},G.prototype._iterate=function(H){var W=this.getActualLength(H.length);this._length=W,this._values=this.shouldCopyValues()?Array(W):this._values;var X=this._promise,Z=!1,q=null;for(var V=0;V=this._length)return this._resolve(this._values),!0;return!1},G.prototype._promiseCancelled=function(){return this._cancel(),!0},G.prototype._promiseRejected=function(H){return this._totalResolved++,this._reject(H),!0},G.prototype._resultCancelled=function(){if(this._isResolved())return;var H=this._values;if(this._cancel(),H instanceof $)H.cancel();else for(var W=0;W{zO0.exports=function($){var Y=!1,z=[];$.prototype._promiseCreated=function(){},$.prototype._pushContext=function(){},$.prototype._popContext=function(){return null},$._peekContext=$.prototype._peekContext=function(){};function U(){this._trace=new U.CapturedTrace(J())}U.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,z.push(this._trace)},U.prototype._popContext=function(){if(this._trace!==void 0){var I=z.pop(),K=I._promiseCreated;return I._promiseCreated=null,K}return null};function Q(){if(Y)return new U}function J(){var I=z.length-1;if(I>=0)return z[I];return}return U.CapturedTrace=null,U.create=Q,U.deactivateLongStackTraces=function(){},U.activateLongStackTraces=function(){var I=$.prototype._pushContext,K=$.prototype._popContext,G=$._peekContext,H=$.prototype._peekContext,W=$.prototype._promiseCreated;U.deactivateLongStackTraces=function(){$.prototype._pushContext=I,$.prototype._popContext=K,$._peekContext=G,$.prototype._peekContext=H,$.prototype._promiseCreated=W,Y=!1},Y=!0,$.prototype._pushContext=U.prototype._pushContext,$.prototype._popContext=U.prototype._popContext,$._peekContext=$.prototype._peekContext=J,$.prototype._promiseCreated=function(){var X=this._peekContext();if(X&&X._promiseCreated==null)X._promiseCreated=this}},U}});var JO0=E((kt1,QO0)=>{QO0.exports=function($,Y){var{_getDomain:z,_async:U}=$,Q=E3().Warning,J=O4(),I=J.canAttachTrace,K,G,H=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,W=/\((?:timers\.js):\d+:\d+\)/,X=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Z=null,q=null,V=!1,F,w=!!(J.env("BLUEBIRD_DEBUG")!=0&&(J.env("BLUEBIRD_DEBUG")||J.env("NODE_ENV")==="development")),O=!!(J.env("BLUEBIRD_WARNINGS")!=0&&(w||J.env("BLUEBIRD_WARNINGS"))),N=!!(J.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(w||J.env("BLUEBIRD_LONG_STACK_TRACES"))),M=J.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(O||!!J.env("BLUEBIRD_W_FORGOTTEN_RETURN"));$.prototype.suppressUnhandledRejections=function(){var Q0=this._target();Q0._bitField=Q0._bitField&-1048577|524288},$.prototype._ensurePossibleRejectionHandled=function(){if((this._bitField&524288)!==0)return;this._setRejectionIsUnhandled(),U.invokeLater(this._notifyUnhandledRejection,this,void 0)},$.prototype._notifyUnhandledRejectionIsHandled=function(){s("rejectionHandled",K,void 0,this)},$.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456},$.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0},$.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var Q0=this._settledValue();this._setUnhandledRejectionIsNotified(),s("unhandledRejection",G,Q0,this)}},$.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144},$.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},$.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0},$.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576},$.prototype._unsetRejectionIsUnhandled=function(){if(this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified())this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled()},$.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0},$.prototype._warn=function(Q0,B,v){return r(Q0,B,v||this)},$.onPossiblyUnhandledRejection=function(Q0){var B=z();G=typeof Q0==="function"?B===null?Q0:J.domainBind(B,Q0):void 0},$.onUnhandledRejectionHandled=function(Q0){var B=z();K=typeof Q0==="function"?B===null?Q0:J.domainBind(B,Q0):void 0};var D=function(){};$.longStackTraces=function(){if(U.haveItemsQueued()&&!A0.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);if(!A0.longStackTraces&&b0()){var Q0=$.prototype._captureStackTrace,B=$.prototype._attachExtraTrace;A0.longStackTraces=!0,D=function(){if(U.haveItemsQueued()&&!A0.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX -`);$.prototype._captureStackTrace=Q0,$.prototype._attachExtraTrace=B,Y.deactivateLongStackTraces(),U.enableTrampoline(),A0.longStackTraces=!1},$.prototype._captureStackTrace=y,$.prototype._attachExtraTrace=p,Y.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},$.hasLongStackTraces=function(){return A0.longStackTraces&&b0()};var P=function(){try{if(typeof CustomEvent==="function"){var Q0=new CustomEvent("CustomEvent");return J.global.dispatchEvent(Q0),function(B,v){var u=new CustomEvent(B.toLowerCase(),{detail:v,cancelable:!0});return!J.global.dispatchEvent(u)}}else if(typeof Event==="function"){var Q0=new Event("CustomEvent");return J.global.dispatchEvent(Q0),function(v,u){var s=new Event(v.toLowerCase(),{cancelable:!0});return s.detail=u,!J.global.dispatchEvent(s)}}else{var Q0=document.createEvent("CustomEvent");return Q0.initCustomEvent("testingtheevent",!1,!0,{}),J.global.dispatchEvent(Q0),function(v,u){var s=document.createEvent("CustomEvent");return s.initCustomEvent(v.toLowerCase(),!1,!0,u),!J.global.dispatchEvent(s)}}}catch(B){}return function(){return!1}}(),j=function(){if(J.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!J.global)return function(){return!1};return function(Q0){var B="on"+Q0.toLowerCase(),v=J.global[B];if(!v)return!1;return v.apply(J.global,[].slice.call(arguments,1)),!0}}}();function A(Q0,B){return{promise:B}}var T={promiseCreated:A,promiseFulfilled:A,promiseRejected:A,promiseResolved:A,promiseCancelled:A,promiseChained:function(Q0,B,v){return{promise:B,child:v}},warning:function(Q0,B){return{warning:B}},unhandledRejection:function(Q0,B,v){return{reason:B,promise:v}},rejectionHandled:A},C=function(Q0){var B=!1;try{B=j.apply(null,arguments)}catch(u){U.throwLater(u),B=!0}var v=!1;try{v=P(Q0,T[Q0].apply(null,arguments))}catch(u){U.throwLater(u),v=!0}return v||B};$.config=function(Q0){if(Q0=Object(Q0),"longStackTraces"in Q0){if(Q0.longStackTraces)$.longStackTraces();else if(!Q0.longStackTraces&&$.hasLongStackTraces())D()}if("warnings"in Q0){var B=Q0.warnings;if(A0.warnings=!!B,M=A0.warnings,J.isObject(B)){if("wForgottenReturn"in B)M=!!B.wForgottenReturn}}if("cancellation"in Q0&&Q0.cancellation&&!A0.cancellation){if(U.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use");$.prototype._clearCancellationData=U0,$.prototype._propagateFrom=x,$.prototype._onCancel=i,$.prototype._setOnCancel=n,$.prototype._attachCancellationCallback=S,$.prototype._execute=k,t=x,A0.cancellation=!0}if("monitoring"in Q0){if(Q0.monitoring&&!A0.monitoring)A0.monitoring=!0,$.prototype._fireEvent=C;else if(!Q0.monitoring&&A0.monitoring)A0.monitoring=!1,$.prototype._fireEvent=b}return $};function b(){return!1}$.prototype._fireEvent=b,$.prototype._execute=function(Q0,B,v){try{Q0(B,v)}catch(u){return u}},$.prototype._onCancel=function(){},$.prototype._setOnCancel=function(Q0){},$.prototype._attachCancellationCallback=function(Q0){},$.prototype._captureStackTrace=function(){},$.prototype._attachExtraTrace=function(){},$.prototype._clearCancellationData=function(){},$.prototype._propagateFrom=function(Q0,B){};function k(Q0,B,v){var u=this;try{Q0(B,v,function(s){if(typeof s!=="function")throw TypeError("onCancel must be a function, got: "+J.toString(s));u._attachCancellationCallback(s)})}catch(s){return s}}function S(Q0){if(!this._isCancellable())return this;var B=this._onCancel();if(B!==void 0)if(J.isArray(B))B.push(Q0);else this._setOnCancel([B,Q0]);else this._setOnCancel(Q0)}function i(){return this._onCancelField}function n(Q0){this._onCancelField=Q0}function U0(){this._cancellationParent=void 0,this._onCancelField=void 0}function x(Q0,B){if((B&1)!==0){this._cancellationParent=Q0;var v=Q0._branchesRemainingToCancel;if(v===void 0)v=0;Q0._branchesRemainingToCancel=v+1}if((B&2)!==0&&Q0._isBound())this._setBoundTo(Q0._boundTo)}function d(Q0,B){if((B&2)!==0&&Q0._isBound())this._setBoundTo(Q0._boundTo)}var t=d;function e(){var Q0=this._boundTo;if(Q0!==void 0){if(Q0 instanceof $)if(Q0.isFulfilled())return Q0.value();else return}return Q0}function y(){this._trace=new u1(this._peekContext())}function p(Q0,B){if(I(Q0)){var v=this._trace;if(v!==void 0){if(B)v=v._parent}if(v!==void 0)v.attachExtraTrace(Q0);else if(!Q0.__stackCleaned__){var u=f0(Q0);J.notEnumerableProp(Q0,"stack",u.message+` +`);$.prototype._captureStackTrace=Q0,$.prototype._attachExtraTrace=B,Y.deactivateLongStackTraces(),U.enableTrampoline(),A0.longStackTraces=!1},$.prototype._captureStackTrace=g,$.prototype._attachExtraTrace=p,Y.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},$.hasLongStackTraces=function(){return A0.longStackTraces&&b0()};var P=function(){try{if(typeof CustomEvent==="function"){var Q0=new CustomEvent("CustomEvent");return J.global.dispatchEvent(Q0),function(B,v){var u=new CustomEvent(B.toLowerCase(),{detail:v,cancelable:!0});return!J.global.dispatchEvent(u)}}else if(typeof Event==="function"){var Q0=new Event("CustomEvent");return J.global.dispatchEvent(Q0),function(v,u){var a=new Event(v.toLowerCase(),{cancelable:!0});return a.detail=u,!J.global.dispatchEvent(a)}}else{var Q0=document.createEvent("CustomEvent");return Q0.initCustomEvent("testingtheevent",!1,!0,{}),J.global.dispatchEvent(Q0),function(v,u){var a=document.createEvent("CustomEvent");return a.initCustomEvent(v.toLowerCase(),!1,!0,u),!J.global.dispatchEvent(a)}}}catch(B){}return function(){return!1}}(),j=function(){if(J.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!J.global)return function(){return!1};return function(Q0){var B="on"+Q0.toLowerCase(),v=J.global[B];if(!v)return!1;return v.apply(J.global,[].slice.call(arguments,1)),!0}}}();function A(Q0,B){return{promise:B}}var T={promiseCreated:A,promiseFulfilled:A,promiseRejected:A,promiseResolved:A,promiseCancelled:A,promiseChained:function(Q0,B,v){return{promise:B,child:v}},warning:function(Q0,B){return{warning:B}},unhandledRejection:function(Q0,B,v){return{reason:B,promise:v}},rejectionHandled:A},C=function(Q0){var B=!1;try{B=j.apply(null,arguments)}catch(u){U.throwLater(u),B=!0}var v=!1;try{v=P(Q0,T[Q0].apply(null,arguments))}catch(u){U.throwLater(u),v=!0}return v||B};$.config=function(Q0){if(Q0=Object(Q0),"longStackTraces"in Q0){if(Q0.longStackTraces)$.longStackTraces();else if(!Q0.longStackTraces&&$.hasLongStackTraces())D()}if("warnings"in Q0){var B=Q0.warnings;if(A0.warnings=!!B,M=A0.warnings,J.isObject(B)){if("wForgottenReturn"in B)M=!!B.wForgottenReturn}}if("cancellation"in Q0&&Q0.cancellation&&!A0.cancellation){if(U.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use");$.prototype._clearCancellationData=U0,$.prototype._propagateFrom=x,$.prototype._onCancel=i,$.prototype._setOnCancel=n,$.prototype._attachCancellationCallback=S,$.prototype._execute=k,t=x,A0.cancellation=!0}if("monitoring"in Q0){if(Q0.monitoring&&!A0.monitoring)A0.monitoring=!0,$.prototype._fireEvent=C;else if(!Q0.monitoring&&A0.monitoring)A0.monitoring=!1,$.prototype._fireEvent=b}return $};function b(){return!1}$.prototype._fireEvent=b,$.prototype._execute=function(Q0,B,v){try{Q0(B,v)}catch(u){return u}},$.prototype._onCancel=function(){},$.prototype._setOnCancel=function(Q0){},$.prototype._attachCancellationCallback=function(Q0){},$.prototype._captureStackTrace=function(){},$.prototype._attachExtraTrace=function(){},$.prototype._clearCancellationData=function(){},$.prototype._propagateFrom=function(Q0,B){};function k(Q0,B,v){var u=this;try{Q0(B,v,function(a){if(typeof a!=="function")throw TypeError("onCancel must be a function, got: "+J.toString(a));u._attachCancellationCallback(a)})}catch(a){return a}}function S(Q0){if(!this._isCancellable())return this;var B=this._onCancel();if(B!==void 0)if(J.isArray(B))B.push(Q0);else this._setOnCancel([B,Q0]);else this._setOnCancel(Q0)}function i(){return this._onCancelField}function n(Q0){this._onCancelField=Q0}function U0(){this._cancellationParent=void 0,this._onCancelField=void 0}function x(Q0,B){if((B&1)!==0){this._cancellationParent=Q0;var v=Q0._branchesRemainingToCancel;if(v===void 0)v=0;Q0._branchesRemainingToCancel=v+1}if((B&2)!==0&&Q0._isBound())this._setBoundTo(Q0._boundTo)}function d(Q0,B){if((B&2)!==0&&Q0._isBound())this._setBoundTo(Q0._boundTo)}var t=d;function e(){var Q0=this._boundTo;if(Q0!==void 0){if(Q0 instanceof $)if(Q0.isFulfilled())return Q0.value();else return}return Q0}function g(){this._trace=new u1(this._peekContext())}function p(Q0,B){if(I(Q0)){var v=this._trace;if(v!==void 0){if(B)v=v._parent}if(v!==void 0)v.attachExtraTrace(Q0);else if(!Q0.__stackCleaned__){var u=f0(Q0);J.notEnumerableProp(Q0,"stack",u.message+` `+u.stack.join(` -`)),J.notEnumerableProp(Q0,"__stackCleaned__",!0)}}}function Y0(Q0,B,v,u,s){if(Q0===void 0&&B!==null&&M){if(s!==void 0&&s._returnedNonUndefined())return;if((u._bitField&65535)===0)return;if(v)v=v+" ";var X0="",J0="";if(B._trace){var q0=B._trace.stack.split(` -`),w0=v0(q0);for(var B0=w0.length-1;B0>=0;--B0){var r0=w0[B0];if(!W.test(r0)){var I1=r0.match(X);if(I1)X0="at "+I1[1]+":"+I1[2]+":"+I1[3]+" ";break}}if(w0.length>0){var U1=w0[0];for(var B0=0;B00)J0=` -`+q0[B0-1];break}}}var A1="a promise was created in a "+v+"handler "+X0+"but was not returned from it, see http://goo.gl/rRqMUw"+J0;u._warn(A1,!0,B)}}function g(Q0,B){var v=Q0+" is deprecated and will be removed in a future version.";if(B)v+=" Use "+B+" instead.";return a(v)}function a(Q0,B,v){if(!A0.warnings)return;var u=new Q(Q0),s;if(B)v._attachExtraTrace(u);else if(A0.longStackTraces&&(s=$._peekContext()))s.attachExtraTrace(u);else{var X0=f0(u);u.stack=X0.message+` +`)),J.notEnumerableProp(Q0,"__stackCleaned__",!0)}}}function Y0(Q0,B,v,u,a){if(Q0===void 0&&B!==null&&M){if(a!==void 0&&a._returnedNonUndefined())return;if((u._bitField&65535)===0)return;if(v)v=v+" ";var X0="",J0="";if(B._trace){var q0=B._trace.stack.split(` +`),w0=_0(q0);for(var B0=w0.length-1;B0>=0;--B0){var r0=w0[B0];if(!W.test(r0)){var I1=r0.match(X);if(I1)X0="at "+I1[1]+":"+I1[2]+":"+I1[3]+" ";break}}if(w0.length>0){var U1=w0[0];for(var B0=0;B00)J0=` +`+q0[B0-1];break}}}var A1="a promise was created in a "+v+"handler "+X0+"but was not returned from it, see http://goo.gl/rRqMUw"+J0;u._warn(A1,!0,B)}}function y(Q0,B){var v=Q0+" is deprecated and will be removed in a future version.";if(B)v+=" Use "+B+" instead.";return r(v)}function r(Q0,B,v){if(!A0.warnings)return;var u=new Q(Q0),a;if(B)v._attachExtraTrace(u);else if(A0.longStackTraces&&(a=$._peekContext()))a.attachExtraTrace(u);else{var X0=f0(u);u.stack=X0.message+` `+X0.stack.join(` `)}if(!C("warning",u))e0(u,"",!0)}function $0(Q0,B){for(var v=0;v=0;--q0)if(u[q0]===X0){J0=q0;break}for(var q0=J0;q0>=0;--q0){var w0=u[q0];if(B[s]===w0)B.pop(),s--;else break}B=u}}function v0(Q0){var B=[];for(var v=0;v0&&Q0.name!="SyntaxError")B=B.slice(v);return B}function f0(Q0){var B=Q0.stack,v=Q0.toString();return B=typeof B==="string"&&B.length>0?G0(Q0):[" (No stack trace)"],{message:v,stack:Q0.name=="SyntaxError"?B:v0(B)}}function e0(Q0,B,v){if(typeof console<"u"){var u;if(J.isObject(Q0)){var s=Q0.stack;u=B+q(s,Q0)}else u=B+String(Q0);if(typeof F==="function")F(u,v);else if(typeof console.log==="function"||typeof console.log==="object")console.log(u)}}function r(Q0,B,v,u){var s=!1;try{if(typeof B==="function")if(s=!0,Q0==="rejectionHandled")B(u);else B(v,u)}catch(X0){U.throwLater(X0)}if(Q0==="unhandledRejection"){if(!C(Q0,v,u)&&!s)e0(v,"Unhandled rejection ")}else C(Q0,u)}function H0(Q0){var B;if(typeof Q0==="function")B="[function "+(Q0.name||"anonymous")+"]";else{B=Q0&&typeof Q0.toString==="function"?Q0.toString():J.toString(Q0);var v=/\[object [a-zA-Z0-9$_]+\]/;if(v.test(B))try{var u=JSON.stringify(Q0);B=u}catch(s){}if(B.length===0)B="(empty array)"}return"(<"+F0(B)+">, no stack trace)"}function F0(Q0){var B=41;if(Q0.length=0;--q0)if(u[q0]===X0){J0=q0;break}for(var q0=J0;q0>=0;--q0){var w0=u[q0];if(B[a]===w0)B.pop(),a--;else break}B=u}}function _0(Q0){var B=[];for(var v=0;v0&&Q0.name!="SyntaxError")B=B.slice(v);return B}function f0(Q0){var B=Q0.stack,v=Q0.toString();return B=typeof B==="string"&&B.length>0?G0(Q0):[" (No stack trace)"],{message:v,stack:Q0.name=="SyntaxError"?B:_0(B)}}function e0(Q0,B,v){if(typeof console<"u"){var u;if(J.isObject(Q0)){var a=Q0.stack;u=B+q(a,Q0)}else u=B+String(Q0);if(typeof F==="function")F(u,v);else if(typeof console.log==="function"||typeof console.log==="object")console.log(u)}}function s(Q0,B,v,u){var a=!1;try{if(typeof B==="function")if(a=!0,Q0==="rejectionHandled")B(u);else B(v,u)}catch(X0){U.throwLater(X0)}if(Q0==="unhandledRejection"){if(!C(Q0,v,u)&&!a)e0(v,"Unhandled rejection ")}else C(Q0,u)}function H0(Q0){var B;if(typeof Q0==="function")B="[function "+(Q0.name||"anonymous")+"]";else{B=Q0&&typeof Q0.toString==="function"?Q0.toString():J.toString(Q0);var v=/\[object [a-zA-Z0-9$_]+\]/;if(v.test(B))try{var u=JSON.stringify(Q0);B=u}catch(a){}if(B.length===0)B="(empty array)"}return"(<"+F0(B)+">, no stack trace)"}function F0(Q0){var B=41;if(Q0.length=X0)return;i0=function(r0){if(H.test(r0))return!0;var I1=w1(r0);if(I1){if(I1.fileName===J0&&(s<=I1.line&&I1.line<=X0))return!0}return!1}}function u1(Q0){this._parent=Q0,this._promisesCreated=0;var B=this._length=1+(Q0===void 0?0:Q0._length);if(b1(this,u1),B>32)this.uncycle()}J.inherits(u1,Error),Y.CapturedTrace=u1,u1.prototype.uncycle=function(){var Q0=this._length;if(Q0<2)return;var B=[],v={};for(var u=0,s=this;s!==void 0;++u)B.push(s),s=s._parent;Q0=this._length=u;for(var u=Q0-1;u>=0;--u){var X0=B[u].stack;if(v[X0]===void 0)v[X0]=u}for(var u=0;u0)B[q0-1]._parent=void 0,B[q0-1]._length=1;B[u]._parent=void 0,B[u]._length=1;var w0=u>0?B[u-1]:this;if(q0=0;--r0)B[r0]._length=B0,B0++;return}}},u1.prototype.attachExtraTrace=function(Q0){if(Q0.__stackCleaned__)return;this.uncycle();var B=f0(Q0),v=B.message,u=[B.stack],s=this;while(s!==void 0)u.push(v0(s.stack.split(` -`))),s=s._parent;T0(u),N0(u),J.notEnumerableProp(Q0,"stack",$0(v,u)),J.notEnumerableProp(Q0,"__stackCleaned__",!0)};var b1=function(){var B=/^\s*at\s*/,v=function(J0,q0){if(typeof J0==="string")return J0;if(q0.name!==void 0&&q0.message!==void 0)return q0.toString();return H0(q0)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,Z=B,q=v;var u=Error.captureStackTrace;return i0=function(J0){return H.test(J0)},function(J0,q0){Error.stackTraceLimit+=6,u(J0,q0),Error.stackTraceLimit-=6}}var s=Error();if(typeof s.stack==="string"&&s.stack.split(` -`)[0].indexOf("stackDetection@")>=0)return Z=/@/,q=v,V=!0,function(q0){q0.stack=Error().stack};var X0;try{throw Error()}catch(J0){X0="stack"in J0}if(!("stack"in s)&&X0&&typeof Error.stackTraceLimit==="number")return Z=B,q=v,function(q0){Error.stackTraceLimit+=6;try{throw Error()}catch(w0){q0.stack=w0.stack}Error.stackTraceLimit-=6};return q=function(J0,q0){if(typeof J0==="string")return J0;if((typeof q0==="object"||typeof q0==="function")&&q0.name!==void 0&&q0.message!==void 0)return q0.toString();return H0(q0)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(F=function(Q0){console.warn(Q0)},J.isNode&&process.stderr.isTTY)F=function(Q0,B){var v=B?"\x1B[33m":"\x1B[31m";console.warn(v+Q0+`\x1B[0m -`)};else if(!J.isNode&&typeof Error().stack==="string")F=function(Q0,B){console.warn("%c"+Q0,B?"color: darkorange":"color: red")}}var A0={warnings:O,longStackTraces:!1,cancellation:!1,monitoring:!1};if(N)$.longStackTraces();return{longStackTraces:function(){return A0.longStackTraces},warnings:function(){return A0.warnings},cancellation:function(){return A0.cancellation},monitoring:function(){return A0.monitoring},propagateFromFunction:function(){return t},boundValueFunction:function(){return e},checkForgottenReturns:Y0,setBounds:k1,warn:a,deprecated:g,CapturedTrace:u1,fireDomEvent:P,fireGlobalEvent:j}}});var KO0=E((xt1,IO0)=>{IO0.exports=function($,Y){var z=O4(),U=$.CancellationError,Q=z.errorObj;function J(X,Z,q){this.promise=X,this.type=Z,this.handler=q,this.called=!1,this.cancelPromise=null}J.prototype.isFinallyHandler=function(){return this.type===0};function I(X){this.finallyHandler=X}I.prototype._resultCancelled=function(){K(this.finallyHandler)};function K(X,Z){if(X.cancelPromise!=null){if(arguments.length>1)X.cancelPromise._reject(Z);else X.cancelPromise._cancel();return X.cancelPromise=null,!0}return!1}function G(){return W.call(this,this.promise._target()._settledValue())}function H(X){if(K(this,X))return;return Q.e=X,Q}function W(X){var Z=this.promise,q=this.handler;if(!this.called){this.called=!0;var V=this.isFinallyHandler()?q.call(Z._boundValue()):q.call(Z._boundValue(),X);if(V!==void 0){Z._setReturnedNonUndefined();var F=Y(V,Z);if(F instanceof $){if(this.cancelPromise!=null){if(F._isCancelled()){var w=new U("late cancellation observer");return Z._attachExtraTrace(w),Q.e=w,Q}else if(F.isPending())F._attachCancellationCallback(new I(this))}return F._then(G,H,void 0,this,void 0)}}}if(Z.isRejected())return K(this),Q.e=X,Q;else return K(this),X}return $.prototype._passThrough=function(X,Z,q,V){if(typeof X!=="function")return this.then();return this._then(q,V,void 0,new J(this,Z,X),void 0)},$.prototype.lastly=$.prototype.finally=function(X){return this._passThrough(X,0,W,W)},$.prototype.tap=function(X){return this._passThrough(X,1,W)},J}});var HO0=E((ft1,GO0)=>{GO0.exports=function($){var Y=O4(),z=az().keys,U=Y.tryCatch,Q=Y.errorObj;function J(I,K,G){return function(H){var W=G._boundValue();$:for(var X=0;X{var WO0=O4(),KL1=WO0.maybeWrapAsError,GL1=E3(),HL1=GL1.OperationalError,XO0=az();function WL1($){return $ instanceof Error&&XO0.getPrototypeOf($)===Error.prototype}var XL1=/^(?:name|message|stack|cause)$/;function ZL1($){var Y;if(WL1($)){Y=new HL1($),Y.name=$.name,Y.message=$.message,Y.stack=$.stack;var z=XO0.keys($);for(var U=0;U{qO0.exports=function($,Y,z,U,Q){var J=O4(),I=J.tryCatch;$.method=function(K){if(typeof K!=="function")throw new $.TypeError("expecting a function but got "+J.classString(K));return function(){var G=new $(Y);G._captureStackTrace(),G._pushContext();var H=I(K).apply(this,arguments),W=G._popContext();return Q.checkForgottenReturns(H,W,"Promise.method",G),G._resolveFromSyncValue(H),G}},$.attempt=$.try=function(K){if(typeof K!=="function")return U("expecting a function but got "+J.classString(K));var G=new $(Y);G._captureStackTrace(),G._pushContext();var H;if(arguments.length>1){Q.deprecated("calling Promise.try with more than 1 argument");var W=arguments[1],X=arguments[2];H=J.isArray(W)?I(K).apply(X,W):I(K).call(X,W)}else H=I(K)();var Z=G._popContext();return Q.checkForgottenReturns(H,Z,"Promise.try",G),G._resolveFromSyncValue(H),G},$.prototype._resolveFromSyncValue=function(K){if(K===J.errorObj)this._rejectCallback(K.e,!1);else this._resolveCallback(K,!0)}}});var FO0=E((it1,LO0)=>{LO0.exports=function($,Y,z,U){var Q=!1,J=function(H,W){this._reject(W)},I=function(H,W){W.promiseRejectionQueued=!0,W.bindingPromise._then(J,J,null,this,H)},K=function(H,W){if((this._bitField&50397184)===0)this._resolveCallback(W.target)},G=function(H,W){if(!W.promiseRejectionQueued)this._reject(H)};$.prototype.bind=function(H){if(!Q)Q=!0,$.prototype._propagateFrom=U.propagateFromFunction(),$.prototype._boundValue=U.boundValueFunction();var W=z(H),X=new $(Y);X._propagateFrom(this,1);var Z=this._target();if(X._setBoundTo(W),W instanceof $){var q={promiseRejectionQueued:!1,promise:X,target:Z,bindingPromise:W};Z._then(Y,I,void 0,X,q),W._then(K,G,void 0,X,q),X._setOnCancel(W)}else X._resolveCallback(Z);return X},$.prototype._setBoundTo=function(H){if(H!==void 0)this._bitField=this._bitField|2097152,this._boundTo=H;else this._bitField=this._bitField&-2097153},$.prototype._isBound=function(){return(this._bitField&2097152)===2097152},$.bind=function(H,W){return $.resolve(W).bind(H)}}});var wO0=E((nt1,OO0)=>{OO0.exports=function($,Y,z,U){var Q=O4(),J=Q.tryCatch,I=Q.errorObj,K=$._async;$.prototype.break=$.prototype.cancel=function(){if(!U.cancellation())return this._warn("cancellation is disabled");var G=this,H=G;while(G._isCancellable()){if(!G._cancelBy(H)){if(H._isFollowing())H._followee().cancel();else H._cancelBranched();break}var W=G._cancellationParent;if(W==null||!W._isCancellable()){if(G._isFollowing())G._followee().cancel();else G._cancelBranched();break}else{if(G._isFollowing())G._followee().cancel();G._setWillBeCancelled(),H=G,G=W}}},$.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},$.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},$.prototype._cancelBy=function(G){if(G===this)return this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0;else if(this._branchHasCancelled(),this._enoughBranchesHaveCancelled())return this._invokeOnCancel(),!0;return!1},$.prototype._cancelBranched=function(){if(this._enoughBranchesHaveCancelled())this._cancel()},$.prototype._cancel=function(){if(!this._isCancellable())return;this._setCancelled(),K.invoke(this._cancelPromises,this,void 0)},$.prototype._cancelPromises=function(){if(this._length()>0)this._settlePromises()},$.prototype._unsetOnCancel=function(){this._onCancelField=void 0},$.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},$.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},$.prototype._doInvokeOnCancel=function(G,H){if(Q.isArray(G))for(var W=0;W{MO0.exports=function($){function Y(){return this.value}function z(){throw this.reason}$.prototype.return=$.prototype.thenReturn=function(U){if(U instanceof $)U.suppressUnhandledRejections();return this._then(Y,void 0,void 0,{value:U},void 0)},$.prototype.throw=$.prototype.thenThrow=function(U){return this._then(z,void 0,void 0,{reason:U},void 0)},$.prototype.catchThrow=function(U){if(arguments.length<=1)return this._then(void 0,z,void 0,{reason:U},void 0);else{var Q=arguments[1],J=function(){throw Q};return this.caught(U,J)}},$.prototype.catchReturn=function(U){if(arguments.length<=1){if(U instanceof $)U.suppressUnhandledRejections();return this._then(void 0,Y,void 0,{value:U},void 0)}else{var Q=arguments[1];if(Q instanceof $)Q.suppressUnhandledRejections();var J=function(){return Q};return this.caught(U,J)}}}});var AO0=E((pt1,DO0)=>{DO0.exports=function($){function Y(G){if(G!==void 0)G=G._target(),this._bitField=G._bitField,this._settledValueField=G._isFateSealed()?G._settledValue():void 0;else this._bitField=0,this._settledValueField=void 0}Y.prototype._settledValue=function(){return this._settledValueField};var z=Y.prototype.value=function(){if(!this.isFulfilled())throw TypeError(`cannot get fulfillment value of a non-fulfilled promise +`),a=-1,X0=-1,J0,q0;for(var w0=0;w0=X0)return;i0=function(r0){if(H.test(r0))return!0;var I1=w1(r0);if(I1){if(I1.fileName===J0&&(a<=I1.line&&I1.line<=X0))return!0}return!1}}function u1(Q0){this._parent=Q0,this._promisesCreated=0;var B=this._length=1+(Q0===void 0?0:Q0._length);if(b1(this,u1),B>32)this.uncycle()}J.inherits(u1,Error),Y.CapturedTrace=u1,u1.prototype.uncycle=function(){var Q0=this._length;if(Q0<2)return;var B=[],v={};for(var u=0,a=this;a!==void 0;++u)B.push(a),a=a._parent;Q0=this._length=u;for(var u=Q0-1;u>=0;--u){var X0=B[u].stack;if(v[X0]===void 0)v[X0]=u}for(var u=0;u0)B[q0-1]._parent=void 0,B[q0-1]._length=1;B[u]._parent=void 0,B[u]._length=1;var w0=u>0?B[u-1]:this;if(q0=0;--r0)B[r0]._length=B0,B0++;return}}},u1.prototype.attachExtraTrace=function(Q0){if(Q0.__stackCleaned__)return;this.uncycle();var B=f0(Q0),v=B.message,u=[B.stack],a=this;while(a!==void 0)u.push(_0(a.stack.split(` +`))),a=a._parent;T0(u),N0(u),J.notEnumerableProp(Q0,"stack",$0(v,u)),J.notEnumerableProp(Q0,"__stackCleaned__",!0)};var b1=function(){var B=/^\s*at\s*/,v=function(J0,q0){if(typeof J0==="string")return J0;if(q0.name!==void 0&&q0.message!==void 0)return q0.toString();return H0(q0)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,Z=B,q=v;var u=Error.captureStackTrace;return i0=function(J0){return H.test(J0)},function(J0,q0){Error.stackTraceLimit+=6,u(J0,q0),Error.stackTraceLimit-=6}}var a=Error();if(typeof a.stack==="string"&&a.stack.split(` +`)[0].indexOf("stackDetection@")>=0)return Z=/@/,q=v,V=!0,function(q0){q0.stack=Error().stack};var X0;try{throw Error()}catch(J0){X0="stack"in J0}if(!("stack"in a)&&X0&&typeof Error.stackTraceLimit==="number")return Z=B,q=v,function(q0){Error.stackTraceLimit+=6;try{throw Error()}catch(w0){q0.stack=w0.stack}Error.stackTraceLimit-=6};return q=function(J0,q0){if(typeof J0==="string")return J0;if((typeof q0==="object"||typeof q0==="function")&&q0.name!==void 0&&q0.message!==void 0)return q0.toString();return H0(q0)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(F=function(Q0){console.warn(Q0)},J.isNode&&process.stderr.isTTY)F=function(Q0,B){var v=B?"\x1B[33m":"\x1B[31m";console.warn(v+Q0+`\x1B[0m +`)};else if(!J.isNode&&typeof Error().stack==="string")F=function(Q0,B){console.warn("%c"+Q0,B?"color: darkorange":"color: red")}}var A0={warnings:O,longStackTraces:!1,cancellation:!1,monitoring:!1};if(N)$.longStackTraces();return{longStackTraces:function(){return A0.longStackTraces},warnings:function(){return A0.warnings},cancellation:function(){return A0.cancellation},monitoring:function(){return A0.monitoring},propagateFromFunction:function(){return t},boundValueFunction:function(){return e},checkForgottenReturns:Y0,setBounds:k1,warn:r,deprecated:y,CapturedTrace:u1,fireDomEvent:P,fireGlobalEvent:j}}});var KO0=E((xt1,IO0)=>{IO0.exports=function($,Y){var z=O4(),U=$.CancellationError,Q=z.errorObj;function J(X,Z,q){this.promise=X,this.type=Z,this.handler=q,this.called=!1,this.cancelPromise=null}J.prototype.isFinallyHandler=function(){return this.type===0};function I(X){this.finallyHandler=X}I.prototype._resultCancelled=function(){K(this.finallyHandler)};function K(X,Z){if(X.cancelPromise!=null){if(arguments.length>1)X.cancelPromise._reject(Z);else X.cancelPromise._cancel();return X.cancelPromise=null,!0}return!1}function G(){return W.call(this,this.promise._target()._settledValue())}function H(X){if(K(this,X))return;return Q.e=X,Q}function W(X){var Z=this.promise,q=this.handler;if(!this.called){this.called=!0;var V=this.isFinallyHandler()?q.call(Z._boundValue()):q.call(Z._boundValue(),X);if(V!==void 0){Z._setReturnedNonUndefined();var F=Y(V,Z);if(F instanceof $){if(this.cancelPromise!=null){if(F._isCancelled()){var w=new U("late cancellation observer");return Z._attachExtraTrace(w),Q.e=w,Q}else if(F.isPending())F._attachCancellationCallback(new I(this))}return F._then(G,H,void 0,this,void 0)}}}if(Z.isRejected())return K(this),Q.e=X,Q;else return K(this),X}return $.prototype._passThrough=function(X,Z,q,V){if(typeof X!=="function")return this.then();return this._then(q,V,void 0,new J(this,Z,X),void 0)},$.prototype.lastly=$.prototype.finally=function(X){return this._passThrough(X,0,W,W)},$.prototype.tap=function(X){return this._passThrough(X,1,W)},J}});var HO0=E((ft1,GO0)=>{GO0.exports=function($){var Y=O4(),z=az().keys,U=Y.tryCatch,Q=Y.errorObj;function J(I,K,G){return function(H){var W=G._boundValue();$:for(var X=0;X{var WO0=O4(),KL1=WO0.maybeWrapAsError,GL1=E3(),HL1=GL1.OperationalError,XO0=az();function WL1($){return $ instanceof Error&&XO0.getPrototypeOf($)===Error.prototype}var XL1=/^(?:name|message|stack|cause)$/;function ZL1($){var Y;if(WL1($)){Y=new HL1($),Y.name=$.name,Y.message=$.message,Y.stack=$.stack;var z=XO0.keys($);for(var U=0;U{qO0.exports=function($,Y,z,U,Q){var J=O4(),I=J.tryCatch;$.method=function(K){if(typeof K!=="function")throw new $.TypeError("expecting a function but got "+J.classString(K));return function(){var G=new $(Y);G._captureStackTrace(),G._pushContext();var H=I(K).apply(this,arguments),W=G._popContext();return Q.checkForgottenReturns(H,W,"Promise.method",G),G._resolveFromSyncValue(H),G}},$.attempt=$.try=function(K){if(typeof K!=="function")return U("expecting a function but got "+J.classString(K));var G=new $(Y);G._captureStackTrace(),G._pushContext();var H;if(arguments.length>1){Q.deprecated("calling Promise.try with more than 1 argument");var W=arguments[1],X=arguments[2];H=J.isArray(W)?I(K).apply(X,W):I(K).call(X,W)}else H=I(K)();var Z=G._popContext();return Q.checkForgottenReturns(H,Z,"Promise.try",G),G._resolveFromSyncValue(H),G},$.prototype._resolveFromSyncValue=function(K){if(K===J.errorObj)this._rejectCallback(K.e,!1);else this._resolveCallback(K,!0)}}});var FO0=E((it1,LO0)=>{LO0.exports=function($,Y,z,U){var Q=!1,J=function(H,W){this._reject(W)},I=function(H,W){W.promiseRejectionQueued=!0,W.bindingPromise._then(J,J,null,this,H)},K=function(H,W){if((this._bitField&50397184)===0)this._resolveCallback(W.target)},G=function(H,W){if(!W.promiseRejectionQueued)this._reject(H)};$.prototype.bind=function(H){if(!Q)Q=!0,$.prototype._propagateFrom=U.propagateFromFunction(),$.prototype._boundValue=U.boundValueFunction();var W=z(H),X=new $(Y);X._propagateFrom(this,1);var Z=this._target();if(X._setBoundTo(W),W instanceof $){var q={promiseRejectionQueued:!1,promise:X,target:Z,bindingPromise:W};Z._then(Y,I,void 0,X,q),W._then(K,G,void 0,X,q),X._setOnCancel(W)}else X._resolveCallback(Z);return X},$.prototype._setBoundTo=function(H){if(H!==void 0)this._bitField=this._bitField|2097152,this._boundTo=H;else this._bitField=this._bitField&-2097153},$.prototype._isBound=function(){return(this._bitField&2097152)===2097152},$.bind=function(H,W){return $.resolve(W).bind(H)}}});var wO0=E((nt1,OO0)=>{OO0.exports=function($,Y,z,U){var Q=O4(),J=Q.tryCatch,I=Q.errorObj,K=$._async;$.prototype.break=$.prototype.cancel=function(){if(!U.cancellation())return this._warn("cancellation is disabled");var G=this,H=G;while(G._isCancellable()){if(!G._cancelBy(H)){if(H._isFollowing())H._followee().cancel();else H._cancelBranched();break}var W=G._cancellationParent;if(W==null||!W._isCancellable()){if(G._isFollowing())G._followee().cancel();else G._cancelBranched();break}else{if(G._isFollowing())G._followee().cancel();G._setWillBeCancelled(),H=G,G=W}}},$.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},$.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},$.prototype._cancelBy=function(G){if(G===this)return this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0;else if(this._branchHasCancelled(),this._enoughBranchesHaveCancelled())return this._invokeOnCancel(),!0;return!1},$.prototype._cancelBranched=function(){if(this._enoughBranchesHaveCancelled())this._cancel()},$.prototype._cancel=function(){if(!this._isCancellable())return;this._setCancelled(),K.invoke(this._cancelPromises,this,void 0)},$.prototype._cancelPromises=function(){if(this._length()>0)this._settlePromises()},$.prototype._unsetOnCancel=function(){this._onCancelField=void 0},$.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},$.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},$.prototype._doInvokeOnCancel=function(G,H){if(Q.isArray(G))for(var W=0;W{MO0.exports=function($){function Y(){return this.value}function z(){throw this.reason}$.prototype.return=$.prototype.thenReturn=function(U){if(U instanceof $)U.suppressUnhandledRejections();return this._then(Y,void 0,void 0,{value:U},void 0)},$.prototype.throw=$.prototype.thenThrow=function(U){return this._then(z,void 0,void 0,{reason:U},void 0)},$.prototype.catchThrow=function(U){if(arguments.length<=1)return this._then(void 0,z,void 0,{reason:U},void 0);else{var Q=arguments[1],J=function(){throw Q};return this.caught(U,J)}},$.prototype.catchReturn=function(U){if(arguments.length<=1){if(U instanceof $)U.suppressUnhandledRejections();return this._then(void 0,Y,void 0,{value:U},void 0)}else{var Q=arguments[1];if(Q instanceof $)Q.suppressUnhandledRejections();var J=function(){return Q};return this.caught(U,J)}}}});var AO0=E((pt1,DO0)=>{DO0.exports=function($){function Y(G){if(G!==void 0)G=G._target(),this._bitField=G._bitField,this._settledValueField=G._isFateSealed()?G._settledValue():void 0;else this._bitField=0,this._settledValueField=void 0}Y.prototype._settledValue=function(){return this._settledValueField};var z=Y.prototype.value=function(){if(!this.isFulfilled())throw TypeError(`cannot get fulfillment value of a non-fulfilled promise See http://goo.gl/MqrFmX `);return this._settledValue()},U=Y.prototype.error=Y.prototype.reason=function(){if(!this.isRejected())throw TypeError(`cannot get rejection reason of a non-rejected promise @@ -232,10 +232,10 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof T6))r `);var F=new q(V,this),w=F.promise();return F._run($.spawn),w}}});var kO0=E((at1,yO0)=>{yO0.exports=function($){var Y=O4(),z=$._async,U=Y.tryCatch,Q=Y.errorObj;function J(G,H){var W=this;if(!Y.isArray(G))return I.call(W,G,H);var X=U(H).apply(W._boundValue(),[null].concat(G));if(X===Q)z.throwLater(X.e)}function I(G,H){var W=this,X=W._boundValue(),Z=G===void 0?U(H).call(X,null):U(H).call(X,null,G);if(Z===Q)z.throwLater(Z.e)}function K(G,H){var W=this;if(!G){var X=Error(G+"");X.cause=G,G=X}var Z=U(H).call(W._boundValue(),G);if(Z===Q)z.throwLater(Z.e)}$.prototype.asCallback=$.prototype.nodeify=function(G,H){if(typeof G=="function"){var W=I;if(H!==void 0&&Object(H).spread)W=J;this._then(W,K,void 0,this,G)}return this}}});var fO0=E((tt1,xO0)=>{xO0.exports=function($,Y){var z={},U=O4(),Q=Mn(),J=U.withAppended,I=U.maybeWrapAsError,K=U.canEvaluate,G=E3().TypeError,H="Async",W={__isPromisified__:!0},X=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],Z=new RegExp("^(?:"+X.join("|")+")$"),q=function(i){return U.isIdentifier(i)&&i.charAt(0)!=="_"&&i!=="constructor"};function V(i){return!Z.test(i)}function F(i){try{return i.__isPromisified__===!0}catch(n){return!1}}function w(i,n,U0){var x=U.getDataPropertyOrDefault(i,n+U0,W);return x?F(x):!1}function O(i,n,U0){for(var x=0;x=U0;--x)n.push(x);for(var x=i+1;x<=3;++x)n.push(x);return n},j=function(i){return U.filledRange(i,"_arg","")},A=function(i){return U.filledRange(Math.max(i,3),"_arg","")},T=function(i){if(typeof i.length==="number")return Math.max(Math.min(i.length,1024),0);return 0};D=function(i,n,U0,x,d,t){var e=Math.max(0,T(x)-1),y=P(e),p=typeof i==="string"||n===z;function Y0(N0){var T0=j(N0).join(", "),v0=N0>0?", ":"",G0;if(p)G0=`ret = callback.call(this, {{args}}, nodeback); break; +`.replace("%s",n))}}}function N(i,n,U0,x){var d=U.inheritedDataKeys(i),t=[];for(var e=0;e=U0;--x)n.push(x);for(var x=i+1;x<=3;++x)n.push(x);return n},j=function(i){return U.filledRange(i,"_arg","")},A=function(i){return U.filledRange(Math.max(i,3),"_arg","")},T=function(i){if(typeof i.length==="number")return Math.max(Math.min(i.length,1024),0);return 0};D=function(i,n,U0,x,d,t){var e=Math.max(0,T(x)-1),g=P(e),p=typeof i==="string"||n===z;function Y0(N0){var T0=j(N0).join(", "),_0=N0>0?", ":"",G0;if(p)G0=`ret = callback.call(this, {{args}}, nodeback); break; `;else G0=n===void 0?`ret = callback({{args}}, nodeback); break; `:`ret = callback.call(receiver, {{args}}, nodeback); break; -`;return G0.replace("{{args}}",T0).replace(", ",v0)}function g(){var N0="";for(var T0=0;T0{uO0.exports=function($,Y,z,U){var Q=O4(),J=Q.isObject,I=az(),K;if(typeof Map==="function")K=Map;var G=function(){var Z=0,q=0;function V(F,w){this[Z]=F,this[Z+q]=w,Z++}return function(w){q=w.size,Z=0;var O=Array(w.size*2);return w.forEach(V,O),O}}(),H=function(Z){var q=new K,V=Z.length/2|0;for(var F=0;F=this._length){var F;if(this._isMap)F=H(this._values);else{F={};var w=this.length();for(var O=0,N=this.length();O>1};function X(Z){var q,V=z(Z);if(!J(V))return U(`cannot await properties of a non-object +`);var e=U.inheritedDataKeys(i);for(var g=0;g{uO0.exports=function($,Y,z,U){var Q=O4(),J=Q.isObject,I=az(),K;if(typeof Map==="function")K=Map;var G=function(){var Z=0,q=0;function V(F,w){this[Z]=F,this[Z+q]=w,Z++}return function(w){q=w.size,Z=0;var O=Array(w.size*2);return w.forEach(V,O),O}}(),H=function(Z){var q=new K,V=Z.length/2|0;for(var F=0;F=this._length){var F;if(this._isMap)F=H(this._values);else{F={};var w=this.length();for(var O=0,N=this.length();O>1};function X(Z){var q,V=z(Z);if(!J(V))return U(`cannot await properties of a non-object See http://goo.gl/MqrFmX `);else if(V instanceof $)q=V._then($.props,void 0,void 0,void 0,void 0);else q=new W(V).promise();if(V instanceof $)q._propagateFrom(V,2);return q}$.prototype.props=function(){return X(this)},$.props=function(Z){return X(Z)}}});var nO0=E(($e1,iO0)=>{iO0.exports=function($,Y,z,U){var Q=O4(),J=function(K){return K.then(function(G){return I(G,K)})};function I(K,G){var H=z(K);if(H instanceof $)return J(H);else if(K=Q.asArray(K),K===null)return U("expecting an array or an iterable object but got "+Q.classString(K));var W=new $(Y);if(G!==void 0)W._propagateFrom(G,3);var{_fulfill:X,_reject:Z}=W;for(var q=0,V=K.length;q{cO0.exports=function($,Y,z,U,Q,J){var I=$._getDomain,K=O4(),G=K.tryCatch;function H(V,F,w,O){this.constructor$(V);var N=I();if(this._fn=N===null?F:K.domainBind(N,F),w!==void 0)w=$.resolve(w),w._attachCancellationCallback(this);if(this._initialValue=w,this._currentCancellable=null,O===Q)this._eachValues=Array(this._length);else if(O===0)this._eachValues=null;else this._eachValues=void 0;this._promise._captureStackTrace(),this._init$(void 0,-5)}K.inherits(H,Y),H.prototype._gotAccum=function(V){if(this._eachValues!==void 0&&this._eachValues!==null&&V!==Q)this._eachValues.push(V)},H.prototype._eachComplete=function(V){if(this._eachValues!==null)this._eachValues.push(V);return this._eachValues},H.prototype._init=function(){},H.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},H.prototype.shouldCopyValues=function(){return!1},H.prototype._resolve=function(V){this._promise._resolveCallback(V),this._values=null},H.prototype._resultCancelled=function(V){if(V===this._initialValue)return this._cancel();if(this._isResolved())return;if(this._resultCancelled$(),this._currentCancellable instanceof $)this._currentCancellable.cancel();if(this._initialValue instanceof $)this._initialValue.cancel()},H.prototype._iterate=function(V){this._values=V;var F,w,O=V.length;if(this._initialValue!==void 0)F=this._initialValue,w=0;else F=$.resolve(V[0]),w=1;if(this._currentCancellable=F,!F.isRejected())for(;w{dO0.exports=function($,Y,z){var U=$.PromiseInspection,Q=O4();function J(I){this.constructor$(I)}Q.inherits(J,Y),J.prototype._promiseResolved=function(I,K){this._values[I]=K;var G=++this._totalResolved;if(G>=this._length)return this._resolve(this._values),!0;return!1},J.prototype._promiseFulfilled=function(I,K){var G=new U;return G._bitField=33554432,G._settledValueField=I,this._promiseResolved(K,G)},J.prototype._promiseRejected=function(I,K){var G=new U;return G._bitField=16777216,G._settledValueField=I,this._promiseResolved(K,G)},$.settle=function(I){return z.deprecated(".settle()",".reflect()"),new J(I).promise()},$.prototype.settle=function(){return $.settle(this)}}});var oO0=E((Ue1,lO0)=>{lO0.exports=function($,Y,z){var U=O4(),Q=E3().RangeError,J=E3().AggregateError,I=U.isArray,K={};function G(W){this.constructor$(W),this._howMany=0,this._unwrap=!1,this._initialized=!1}U.inherits(G,Y),G.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var W=I(this._values);if(!this._isResolved()&&W&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},G.prototype.init=function(){this._initialized=!0,this._init()},G.prototype.setUnwrap=function(){this._unwrap=!0},G.prototype.howMany=function(){return this._howMany},G.prototype.setHowMany=function(W){this._howMany=W},G.prototype._promiseFulfilled=function(W){if(this._addFulfilled(W),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap)this._resolve(this._values[0]);else this._resolve(this._values);return!0}return!1},G.prototype._promiseRejected=function(W){return this._addRejected(W),this._checkOutcome()},G.prototype._promiseCancelled=function(){if(this._values instanceof $||this._values==null)return this._cancel();return this._addRejected(K),this._checkOutcome()},G.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){var W=new J;for(var X=this.length();X0)this._reject(W);else this._cancel();return!0}return!1},G.prototype._fulfilled=function(){return this._totalResolved},G.prototype._rejected=function(){return this._values.length-this.length()},G.prototype._addRejected=function(W){this._values.push(W)},G.prototype._addFulfilled=function(W){this._values[this._totalResolved++]=W},G.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},G.prototype._getRangeError=function(W){var X="Input array must contain at least "+this._howMany+" items but contains only "+W+" items";return new Q(X)},G.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function H(W,X){if((X|0)!==X||X<0)return z(`expecting a positive integer @@ -285,7 +285,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof T6))r `)},Y=function(){return new S.PromiseInspection(this._target())},z=function(x){return S.reject(new X(x))};function U(){}var Q={},J=O4(),I;if(J.isNode)I=function(){var x=process.domain;if(x===void 0)x=null;return x};else I=function(){return null};J.notEnumerableProp(S,"_getDomain",I);var K=az(),G=oF0(),H=new G;K.defineProperty(S,"_async",{value:H});var W=E3(),X=S.TypeError=W.TypeError;S.RangeError=W.RangeError;var Z=S.CancellationError=W.CancellationError;S.TimeoutError=W.TimeoutError,S.OperationalError=W.OperationalError,S.RejectionError=W.OperationalError,S.AggregateError=W.AggregateError;var q=function(){},V={},F={},w=eF0()(S,q),O=YO0()(S,q,w,z,U),N=UO0()(S),M=N.create,D=JO0()(S,N),P=D.CapturedTrace,j=KO0()(S,w),A=HO0()(F),T=Mn(),C=J.errorObj,b=J.tryCatch;function k(x,d){if(typeof d!=="function")throw new X("expecting a function but got "+J.classString(d));if(x.constructor!==S)throw new X(`the promise constructor cannot be invoked directly See http://goo.gl/MqrFmX -`)}function S(x){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,x!==q)k(this,x),this._resolveFromExecutor(x);this._promiseCreated(),this._fireEvent("promiseCreated",this)}S.prototype.toString=function(){return"[object Promise]"},S.prototype.caught=S.prototype.catch=function(x){var d=arguments.length;if(d>1){var t=Array(d-1),e=0,y;for(y=0;y0&&typeof x!=="function"&&typeof d!=="function"){var t=".then() only accepts functions but was passed: "+J.classString(x);if(arguments.length>1)t+=", "+J.classString(d);this._warn(t)}return this._then(x,d,void 0,void 0,void 0)},S.prototype.done=function(x,d){var t=this._then(x,d,void 0,void 0,void 0);t._setIsFinal()},S.prototype.spread=function(x){if(typeof x!=="function")return z("expecting a function but got "+J.classString(x));return this.all()._then(x,void 0,void 0,V,void 0)},S.prototype.toJSON=function(){var x={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())x.fulfillmentValue=this.value(),x.isFulfilled=!0;else if(this.isRejected())x.rejectionReason=this.reason(),x.isRejected=!0;return x},S.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new O(this).promise()},S.prototype.error=function(x){return this.caught(J.originatesFromRejection,x)},S.getNewLibraryCopy=Dn.exports,S.is=function(x){return x instanceof S},S.fromNode=S.fromCallback=function(x){var d=new S(q);d._captureStackTrace();var t=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,e=b(x)(T(d,t));if(e===C)d._rejectCallback(e.e,!0);if(!d._isFateSealed())d._setAsyncGuaranteed();return d},S.all=function(x){return new O(x).promise()},S.cast=function(x){var d=w(x);if(!(d instanceof S))d=new S(q),d._captureStackTrace(),d._setFulfilled(),d._rejectionHandler0=x;return d},S.resolve=S.fulfilled=S.cast,S.reject=S.rejected=function(x){var d=new S(q);return d._captureStackTrace(),d._rejectCallback(x,!0),d},S.setScheduler=function(x){if(typeof x!=="function")throw new X("expecting a function but got "+J.classString(x));return H.setScheduler(x)},S.prototype._then=function(x,d,t,e,y){var p=y!==void 0,Y0=p?y:new S(q),g=this._target(),a=g._bitField;if(!p){if(Y0._propagateFrom(this,3),Y0._captureStackTrace(),e===void 0&&(this._bitField&2097152)!==0)if((a&50397184)!==0)e=this._boundValue();else e=g===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,Y0)}var $0=I();if((a&50397184)!==0){var N0,T0,v0=g._settlePromiseCtx;if((a&33554432)!==0)T0=g._rejectionHandler0,N0=x;else if((a&16777216)!==0)T0=g._fulfillmentHandler0,N0=d,g._unsetRejectionIsUnhandled();else v0=g._settlePromiseLateCancellationObserver,T0=new Z("late cancellation observer"),g._attachExtraTrace(T0),N0=d;H.invoke(v0,g,{handler:$0===null?N0:typeof N0==="function"&&J.domainBind($0,N0),promise:Y0,receiver:e,value:T0})}else g._addCallbacks(x,d,Y0,e,$0);return Y0},S.prototype._length=function(){return this._bitField&65535},S.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},S.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},S.prototype._setLength=function(x){this._bitField=this._bitField&-65536|x&65535},S.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},S.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},S.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},S.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},S.prototype._isFinal=function(){return(this._bitField&4194304)>0},S.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},S.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},S.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},S.prototype._setAsyncGuaranteed=function(){if(H.hasCustomScheduler())return;this._bitField=this._bitField|134217728},S.prototype._receiverAt=function(x){var d=x===0?this._receiver0:this[x*4-4+3];if(d===Q)return;else if(d===void 0&&this._isBound())return this._boundValue();return d},S.prototype._promiseAt=function(x){return this[x*4-4+2]},S.prototype._fulfillmentHandlerAt=function(x){return this[x*4-4+0]},S.prototype._rejectionHandlerAt=function(x){return this[x*4-4+1]},S.prototype._boundValue=function(){},S.prototype._migrateCallback0=function(x){var{_bitField:d,_fulfillmentHandler0:t,_rejectionHandler0:e,_promise0:y}=x,p=x._receiverAt(0);if(p===void 0)p=Q;this._addCallbacks(t,e,y,p,null)},S.prototype._migrateCallbackAt=function(x,d){var t=x._fulfillmentHandlerAt(d),e=x._rejectionHandlerAt(d),y=x._promiseAt(d),p=x._receiverAt(d);if(p===void 0)p=Q;this._addCallbacks(t,e,y,p,null)},S.prototype._addCallbacks=function(x,d,t,e,y){var p=this._length();if(p>=65531)p=0,this._setLength(0);if(p===0){if(this._promise0=t,this._receiver0=e,typeof x==="function")this._fulfillmentHandler0=y===null?x:J.domainBind(y,x);if(typeof d==="function")this._rejectionHandler0=y===null?d:J.domainBind(y,d)}else{var Y0=p*4-4;if(this[Y0+2]=t,this[Y0+3]=e,typeof x==="function")this[Y0+0]=y===null?x:J.domainBind(y,x);if(typeof d==="function")this[Y0+1]=y===null?d:J.domainBind(y,d)}return this._setLength(p+1),p},S.prototype._proxy=function(x,d){this._addCallbacks(void 0,void 0,d,x,null)},S.prototype._resolveCallback=function(x,d){if((this._bitField&117506048)!==0)return;if(x===this)return this._rejectCallback($(),!1);var t=w(x,this);if(!(t instanceof S))return this._fulfill(x);if(d)this._propagateFrom(t,2);var e=t._target();if(e===this){this._reject($());return}var y=e._bitField;if((y&50397184)===0){var p=this._length();if(p>0)e._migrateCallback0(this);for(var Y0=1;Y0>>16)return;if(x===this){var t=$();return this._attachExtraTrace(t),this._reject(t)}if(this._setFulfilled(),this._rejectionHandler0=x,(d&65535)>0)if((d&134217728)!==0)this._settlePromises();else H.settlePromises(this)},S.prototype._reject=function(x){var d=this._bitField;if((d&117506048)>>>16)return;if(this._setRejected(),this._fulfillmentHandler0=x,this._isFinal())return H.fatalError(x,J.isNode);if((d&65535)>0)H.settlePromises(this);else this._ensurePossibleRejectionHandled()},S.prototype._fulfillPromises=function(x,d){for(var t=1;t0){if((x&16842752)!==0){var t=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,t,x),this._rejectPromises(d,t)}else{var e=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,e,x),this._fulfillPromises(d,e)}this._setLength(0)}this._clearCancellationData()},S.prototype._settledValue=function(){var x=this._bitField;if((x&33554432)!==0)return this._rejectionHandler0;else if((x&16777216)!==0)return this._fulfillmentHandler0};function i(x){this.promise._resolveCallback(x)}function n(x){this.promise._rejectCallback(x,!1)}S.defer=S.pending=function(){D.deprecated("Promise.defer","new Promise");var x=new S(q);return{promise:x,resolve:i,reject:n}},J.notEnumerableProp(S,"_makeSelfResolutionError",$),VO0()(S,q,w,z,D),FO0()(S,q,w,D),wO0()(S,O,z,D),NO0()(S),AO0()(S),PO0()(S,O,w,q,H,I),S.Promise=S,S.version="3.4.7",TO0()(S,O,z,w,q,D),CO0()(S),_O0()(S,z,w,M,q,D),hO0()(S,q,D),gO0()(S,z,q,w,U,D),kO0()(S),fO0()(S,q),bO0()(S,O,w,z),nO0()(S,q,w,z),pO0()(S,O,z,w,q,D),mO0()(S,O,D),oO0()(S,O,z),sO0()(S,q),tO0()(S,q),$w0()(S),J.toFastProperties(S),J.toFastProperties(S.prototype);function U0(x){var d=new S(q);d._fulfillmentHandler0=x,d._rejectionHandler0=x,d._promise0=x,d._receiver0=x}return U0({a:1}),U0({b:2}),U0({c:3}),U0(1),U0(function(){}),U0(void 0),U0(!1),U0(new S(q)),D.setBounds(G.firstLineError,J.lastLineError),S}});var v2=E((Ge1,Uw0)=>{var zw0;if(typeof Promise<"u")zw0=Promise;function VL1(){try{if(Promise===nA)Promise=zw0}catch($){}return nA}var nA=Yw0()();nA.noConflict=VL1;Uw0.exports=nA});var fI=E((He1,Qw0)=>{var xI=I0("buffer").Buffer;if(xI.from===void 0)xI.from=function($,Y,z){return new xI($,Y,z)},xI.alloc=xI.from;Qw0.exports=xI});var Iw0=E((We1,An)=>{function LL1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var Jw0=K6().Buffer,mX=I0("util");function FL1($,Y,z){$.copy(Y,z)}An.exports=function(){function $(){LL1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return Jw0.alloc(0);var U=Jw0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)FL1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(mX&&mX.inspect&&mX.inspect.custom)An.exports.prototype[mX.inspect.custom]=function(){var $=mX.inspect({length:this.length});return this.constructor.name+" "+$}});var Bn=E((Xe1,Kw0)=>{var cA=I6();function OL1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)cA.nextTick(pA,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,cA.nextTick(pA,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)cA.nextTick(pA,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,cA.nextTick(pA,z,J)}else if(Y)Y(J)}),this}function wL1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function pA($,Y){$.emit("error",Y)}Kw0.exports={destroy:OL1,undestroy:wL1}});var jn=E((Ze1,Lw0)=>{var YU=I6();Lw0.exports=F6;function Hw0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){kL1(Y,$)}}var ML1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:YU.nextTick,uI;F6.WritableState=oX;var Ww0=Object.create(M4());Ww0.inherits=X1();var NL1={deprecate:f7()},Xw0=I0("stream"),mA=K6().Buffer,DL1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function AL1($){return mA.from($)}function BL1($){return mA.isBuffer($)||$ instanceof DL1}var Zw0=Bn();Ww0.inherits(F6,Xw0);function PL1(){}function oX($,Y){uI=uI||zU(),$=$||{};var z=Y instanceof uI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){vL1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Hw0(this)}oX.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(oX.prototype,"buffer",{get:NL1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var dA;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")dA=Function.prototype[Symbol.hasInstance],Object.defineProperty(F6,Symbol.hasInstance,{value:function($){if(dA.call(this,$))return!0;if(this!==F6)return!1;return $&&$._writableState instanceof oX}});else dA=function($){return $ instanceof this};function F6($){if(uI=uI||zU(),!dA.call(F6,this)&&!(this instanceof uI))return new F6($);if(this._writableState=new oX($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}Xw0.call(this)}F6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function jL1($,Y){var z=Error("write after end");$.emit("error",z),YU.nextTick(Y,z)}function TL1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),YU.nextTick(U,J),Q=!1;return Q}F6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&BL1($);if(J&&!mA.isBuffer($))$=AL1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=PL1;if(U.ended)jL1(this,z);else if(J||TL1(this,U,$,z))U.pendingcb++,Q=CL1(this,U,J,$,Y,z);return Q};F6.prototype.cork=function(){var $=this._writableState;$.corked++};F6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)qw0(this,$)}};F6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function EL1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=mA.from(Y,z);return Y}Object.defineProperty(F6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function CL1($,Y,z,U,Q,J){if(!z){var I=EL1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var Fw0=I6(),xL1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};Mw0.exports=C3;var Ow0=Object.create(M4());Ow0.inherits=X1();var ww0=En(),Tn=jn();Ow0.inherits(C3,ww0);{lA=xL1(Tn.prototype);for(rX=0;rX{var Rn=K6().Buffer,Nw0=Rn.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function bL1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function iL1($){var Y=bL1($);if(typeof Y!=="string"&&(Rn.isEncoding===Nw0||!Nw0($)))throw Error("Unknown encoding: "+$);return Y||$}eL1.StringDecoder=aX;function aX($){this.encoding=iL1($);var Y;switch(this.encoding){case"utf16le":this.text=lL1,this.end=oL1,Y=4;break;case"utf8":this.fillLast=pL1,Y=4;break;case"base64":this.text=rL1,this.end=sL1,Y=3;break;default:this.write=aL1,this.end=tL1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Rn.allocUnsafe(Y)}aX.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};aX.prototype.end=mL1;aX.prototype.text=dL1;aX.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function Cn($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function nL1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function cL1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function pL1($){var Y=this.lastTotal-this.lastNeed,z=cL1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function dL1($,Y){var z=nL1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function mL1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function lL1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function oL1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function rL1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function sL1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function aL1($){return $.toString(this.encoding)}function tL1($){return $&&$.length?this.write($):""}});var En=E((Fe1,hw0)=>{var iI=I6();hw0.exports=R4;var YF1=$J(),tX;R4.ReadableState=Ew0;var Le1=I0("events").EventEmitter,Pw0=function($,Y){return $.listeners(Y).length},yn=I0("stream"),eX=K6().Buffer,zF1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function UF1($){return eX.from($)}function QF1($){return eX.isBuffer($)||$ instanceof zF1}var jw0=Object.create(M4());jw0.inherits=X1();var vn=I0("util"),Y4=void 0;if(vn&&vn.debuglog)Y4=vn.debuglog("stream");else Y4=function(){};var JF1=Iw0(),Tw0=Bn(),bI;jw0.inherits(R4,yn);var hn=["error","close","destroy","pause","resume"];function IF1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(YF1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function Ew0($,Y){tX=tX||zU(),$=$||{};var z=Y instanceof tX;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new JF1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!bI)bI=_n().StringDecoder;this.decoder=new bI($.encoding),this.encoding=$.encoding}}function R4($){if(tX=tX||zU(),!(this instanceof R4))return new R4($);if(this._readableState=new Ew0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}yn.call(this)}Object.defineProperty(R4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});R4.prototype.destroy=Tw0.destroy;R4.prototype._undestroy=Tw0.undestroy;R4.prototype._destroy=function($,Y){this.push(null),Y($)};R4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=eX.from($,Y),Y="";U=!0}}else U=!0;return Cw0(this,$,Y,!1,U)};R4.prototype.unshift=function($){return Cw0(this,$,null,!0,!1)};function Cw0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,WF1($,J);else{var I;if(!Q)I=KF1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==eX.prototype)Y=UF1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else Sn($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)Sn($,J,Y,!1);else Rw0($,J);else Sn($,J,Y,!1)}else if(!U)J.reading=!1}return GF1(J)}function Sn($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)oA($)}Rw0($,Y)}function KF1($,Y){var z;if(!QF1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function GF1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}R4.prototype.isPaused=function(){return this._readableState.flowing===!1};R4.prototype.setEncoding=function($){if(!bI)bI=_n().StringDecoder;return this._readableState.decoder=new bI($),this._readableState.encoding=$,this};var Dw0=8388608;function HF1($){if($>=Dw0)$=Dw0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function Aw0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=HF1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}R4.prototype.read=function($){Y4("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(Y4("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)gn(this);else oA(this);return null}if($=Aw0($,Y),$===0&&Y.ended){if(Y.length===0)gn(this);return null}var U=Y.needReadable;if(Y4("need readable",U),Y.length===0||Y.length-$0)Q=_w0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)gn(this)}if(Q!==null)this.emit("data",Q);return Q};function WF1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,oA($)}function oA($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(Y4("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)iI.nextTick(Bw0,$);else Bw0($)}function Bw0($){Y4("emit readable"),$.emit("readable"),kn($)}function Rw0($,Y){if(!Y.readingMore)Y.readingMore=!0,iI.nextTick(XF1,$,Y)}function XF1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&vw0(U.pipes,$)!==-1)&&!H)Y4("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(Y4("onerror",O),w(),$.removeListener("error",q),Pw0($,"error")===0)$.emit("error",O)}IF1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){Y4("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){Y4("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)Y4("pipe resume"),z.resume();return $};function ZF1($){return function(){var Y=$._readableState;if(Y4("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&Pw0($,"data"))Y.flowing=!0,kn($)}}R4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=FF1($,Y.buffer,Y.decoder);return z}function FF1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function wF1($,Y){var z=eX.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function gn($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,iI.nextTick(MF1,Y,$)}function MF1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function vw0($,Y){for(var z=0,U=$.length;z{yw0.exports=R3;var rA=zU(),gw0=Object.create(M4());gw0.inherits=X1();gw0.inherits(R3,rA);function NF1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{fw0.exports=$Z;var kw0=xn(),xw0=Object.create(M4());xw0.inherits=X1();xw0.inherits($Z,kw0);function $Z($){if(!(this instanceof $Z))return new $Z($);kw0.call(this,$)}$Z.prototype._transform=function($,Y,z){z(null,$)}});var _3=E((Y8,sA)=>{var M9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&M9)sA.exports=M9,Y8=sA.exports=M9.Readable,Y8.Readable=M9.Readable,Y8.Writable=M9.Writable,Y8.Duplex=M9.Duplex,Y8.Transform=M9.Transform,Y8.PassThrough=M9.PassThrough,Y8.Stream=M9;else Y8=sA.exports=En(),Y8.Stream=M9||Y8,Y8.Readable=Y8,Y8.Writable=jn(),Y8.Duplex=zU(),Y8.Transform=xn(),Y8.PassThrough=uw0()});var tA=E((Me1,bw0)=>{var UU=I0("stream"),fn=v2(),AF1=I0("util"),aA=fI(),BF1="function";if(!UU.Writable||!UU.Writable.prototype.destroy)UU=_3();function h2(){if(!(this instanceof h2))return new h2;UU.Duplex.call(this,{decodeStrings:!1,objectMode:!0}),this.buffer=aA.from("");var $=this;$.on("finish",function(){$.finished=!0,$.emit("chunk",!1)})}AF1.inherits(h2,UU.Duplex);h2.prototype._write=function($,Y,z){this.buffer=aA.concat([this.buffer,$]),this.cb=z,this.emit("chunk")};h2.prototype.stream=function($,Y){var z=UU.PassThrough(),U,Q=this;function J(){if(typeof Q.cb===BF1){var K=Q.cb;return Q.cb=void 0,K()}}function I(){var K;if(Q.buffer&&Q.buffer.length){if(typeof $==="number")K=Q.buffer.slice(0,$),Q.buffer=Q.buffer.slice($),$-=K.length,U=!$;else{var G=Q.buffer.indexOf($);if(G!==-1){if(Q.match=G,Y)G=G+$.length;K=Q.buffer.slice(0,G),Q.buffer=Q.buffer.slice(G),U=!0}else{var H=Q.buffer.length-$.length;if(H<=0)J();else K=Q.buffer.slice(0,H),Q.buffer=Q.buffer.slice(H)}}if(K)z.write(K,function(){if(Q.buffer.length===0||$.length&&Q.buffer.length<=$.length)J()})}if(!U){if(Q.finished){Q.removeListener("chunk",I),Q.emit("error",Error("FILE_ENDED"));return}}else Q.removeListener("chunk",I),z.end()}return Q.on("chunk",I),I(),z};h2.prototype.pull=function($,Y){if($===0)return fn.resolve("");if(!isNaN($)&&this.buffer.length>$){var z=this.buffer.slice(0,$);return this.buffer=this.buffer.slice($),fn.resolve(z)}var U=aA.from(""),Q=this,J=UU.Transform();J._transform=function(G,H,W){U=aA.concat([U,G]),W()};var I,K;return new fn(function(G,H){if(I=H,K=function(W){Q.__emittedError=W,H(W)},Q.finished)return H(Error("FILE_ENDED"));Q.once("error",K),Q.stream($,Y).on("error",H).pipe(J).on("finish",function(){G(U)}).on("error",H)}).finally(function(){Q.removeListener("error",I),Q.removeListener("error",K)})};h2.prototype._read=function(){};bw0.exports=h2});var nw0=E((Ne1,iw0)=>{var YZ=I0("stream"),PF1=I0("util");if(!YZ.Writable||!YZ.Writable.prototype.destroy)YZ=_3();function zZ(){if(!(this instanceof zZ))return new zZ;YZ.Transform.call(this)}PF1.inherits(zZ,YZ.Transform);zZ.prototype._transform=function($,Y,z){z()};iw0.exports=zZ});var $B=E((De1,cw0)=>{var jF1=v2(),eA=I0("stream"),TF1=fI();if(!eA.Writable||!eA.Writable.prototype.destroy)eA=_3();cw0.exports=function($){return new jF1(function(Y,z){var U=[],Q=eA.Transform().on("finish",function(){Y(TF1.concat(U))}).on("error",z);Q._transform=function(J,I,K){U.push(J),K()},$.on("error",z).pipe(Q)})}});var YB=E((Ae1,pw0)=>{var EF1=cX();pw0.exports=function($,Y){var z;while(!z&&$&&$.length){var U=EF1.parse($).word16lu("signature").word16lu("partsize").word64lu("uncompressedSize").word64lu("compressedSize").word64lu("offset").word64lu("disknum").vars;if(U.signature===1)z=U;else $=$.slice(U.partsize+4)}if(z=z||{},Y.compressedSize===4294967295)Y.compressedSize=z.compressedSize;if(Y.uncompressedSize===4294967295)Y.uncompressedSize=z.uncompressedSize;if(Y.offsetToLocalFileHeader===4294967295)Y.offsetToLocalFileHeader=z.offset;return z}});var zB=E((Be1,dw0)=>{dw0.exports=function(Y,z){let U=Y&31,Q=Y>>5&15,J=(Y>>9&127)+1980,I=z?(z&31)*2:0,K=z?z>>5&63:0,G=z?z>>11:0;return new Date(Date.UTC(J,Q-1,U,G,K,I))}});var UB=E((Pe1,rw0)=>{var CF1=I0("util"),RF1=I0("zlib"),UZ=I0("stream"),QZ=cX(),un=v2(),mw0=tA(),_F1=nw0(),vF1=$B(),hF1=YB(),lw0=fI(),SF1=zB();if(!UZ.Writable||!UZ.Writable.prototype.destroy)UZ=_3();var ow0=lw0.alloc(4);ow0.writeUInt32LE(101010256,0);function M5($){if(!(this instanceof M5))return new M5($);var Y=this;Y._opts=$||{verbose:!1},mw0.call(Y,Y._opts),Y.on("finish",function(){Y.emit("end"),Y.emit("close")}),Y._readRecord().catch(function(z){if(!Y.__emittedError||Y.__emittedError!==z)Y.emit("error",z)})}CF1.inherits(M5,mw0);M5.prototype._readRecord=function(){var $=this;return $.pull(4).then(function(Y){if(Y.length===0)return;var z=Y.readUInt32LE(0);if(z===875721283)return $._readCrxHeader();if(z===67324752)return $._readFile();else if(z===33639248)return $.reachedCD=!0,$._readCentralDirectoryFileHeader();else if(z===101010256)return $._readEndOfCentralDirectoryRecord();else if($.reachedCD){var U=!0;return $.pull(ow0,U).then(function(){return $._readEndOfCentralDirectoryRecord()})}else $.emit("error",Error("invalid signature: 0x"+z.toString(16)))})};M5.prototype._readCrxHeader=function(){var $=this;return $.pull(12).then(function(Y){return $.crxHeader=QZ.parse(Y).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars,$.pull($.crxHeader.pubKeyLength+$.crxHeader.signatureLength)}).then(function(Y){return $.crxHeader.publicKey=Y.slice(0,$.crxHeader.pubKeyLength),$.crxHeader.signature=Y.slice($.crxHeader.pubKeyLength),$.emit("crx-header",$.crxHeader),$._readRecord()})};M5.prototype._readFile=function(){var $=this;return $.pull(26).then(function(Y){var z=QZ.parse(Y).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;if(z.lastModifiedDateTime=SF1(z.lastModifiedDate,z.lastModifiedTime),$.crxHeader)z.crxHeader=$.crxHeader;return $.pull(z.fileNameLength).then(function(U){var Q=U.toString("utf8"),J=UZ.PassThrough(),I=!1;if(J.autodrain=function(){I=!0;var K=J.pipe(_F1());return K.promise=function(){return new un(function(G,H){K.on("finish",G),K.on("error",H)})},K},J.buffer=function(){return vF1(J)},J.path=Q,J.props={},J.props.path=Q,J.props.pathBuffer=U,J.props.flags={isUnicode:(z.flags&2048)!=0},J.type=z.uncompressedSize===0&&/[\/\\]$/.test(Q)?"Directory":"File",$._opts.verbose){if(J.type==="Directory")console.log(" creating:",Q);else if(J.type==="File")if(z.compressionMethod===0)console.log(" extracting:",Q);else console.log(" inflating:",Q)}return $.pull(z.extraFieldLength).then(function(K){var G=hF1(K,z);if(J.vars=z,J.extra=G,$._opts.forceStream)$.push(J);else if($.emit("entry",J),$._readableState.pipesCount||$._readableState.pipes&&$._readableState.pipes.length)$.push(J);if($._opts.verbose)console.log({filename:Q,vars:z,extra:G});var H=!(z.flags&8)||z.compressedSize>0,W;J.__autodraining=I;var X=z.compressionMethod&&!I?RF1.createInflateRaw():UZ.PassThrough();if(H)J.size=z.uncompressedSize,W=z.compressedSize;else W=lw0.alloc(4),W.writeUInt32LE(134695760,0);return new un(function(Z,q){$.stream(W).pipe(X).on("error",function(V){$.emit("error",V)}).pipe(J).on("finish",function(){return H?$._readRecord().then(Z).catch(q):$._processDataDescriptor(J).then(Z).catch(q)})})})})})};M5.prototype._processDataDescriptor=function($){var Y=this;return Y.pull(16).then(function(z){var U=QZ.parse(z).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;return $.size=U.uncompressedSize,Y._readRecord()})};M5.prototype._readCentralDirectoryFileHeader=function(){var $=this;return $.pull(42).then(function(Y){var z=QZ.parse(Y).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return $.pull(z.fileNameLength).then(function(U){return z.fileName=U.toString("utf8"),$.pull(z.extraFieldLength)}).then(function(U){return $.pull(z.fileCommentLength)}).then(function(U){return $._readRecord()})})};M5.prototype._readEndOfCentralDirectoryRecord=function(){var $=this;return $.pull(18).then(function(Y){var z=QZ.parse(Y).word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;return $.pull(z.commentLength).then(function(U){U=U.toString("utf8"),$.end(),$.push(null)})})};M5.prototype.promise=function(){var $=this;return new un(function(Y,z){$.on("finish",Y),$.on("error",z)})};rw0.exports=M5});var aw0=E((je1,bn)=>{function gF1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var sw0=K6().Buffer,JZ=I0("util");function yF1($,Y,z){$.copy(Y,z)}bn.exports=function(){function $(){gF1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return sw0.alloc(0);var U=sw0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)yF1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(JZ&&JZ.inspect&&JZ.inspect.custom)bn.exports.prototype[JZ.inspect.custom]=function(){var $=JZ.inspect({length:this.length});return this.constructor.name+" "+$}});var nn=E((Te1,tw0)=>{var QB=I6();function kF1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)QB.nextTick(JB,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,QB.nextTick(JB,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)QB.nextTick(JB,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,QB.nextTick(JB,z,J)}else if(Y)Y(J)}),this}function xF1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function JB($,Y){$.emit("error",Y)}tw0.exports={destroy:kF1,undestroy:xF1}});var pn=E((Ee1,IM0)=>{var QU=I6();IM0.exports=O6;function $M0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){YO1(Y,$)}}var fF1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:QU.nextTick,nI;O6.WritableState=KZ;var YM0=Object.create(M4());YM0.inherits=X1();var uF1={deprecate:f7()},zM0=I0("stream"),KB=K6().Buffer,bF1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function iF1($){return KB.from($)}function nF1($){return KB.isBuffer($)||$ instanceof bF1}var UM0=nn();YM0.inherits(O6,zM0);function cF1(){}function KZ($,Y){nI=nI||JU(),$=$||{};var z=Y instanceof nI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){sF1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new $M0(this)}KZ.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(KZ.prototype,"buffer",{get:uF1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var IB;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")IB=Function.prototype[Symbol.hasInstance],Object.defineProperty(O6,Symbol.hasInstance,{value:function($){if(IB.call(this,$))return!0;if(this!==O6)return!1;return $&&$._writableState instanceof KZ}});else IB=function($){return $ instanceof this};function O6($){if(nI=nI||JU(),!IB.call(O6,this)&&!(this instanceof nI))return new O6($);if(this._writableState=new KZ($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}zM0.call(this)}O6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function pF1($,Y){var z=Error("write after end");$.emit("error",z),QU.nextTick(Y,z)}function dF1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),QU.nextTick(U,J),Q=!1;return Q}O6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&nF1($);if(J&&!KB.isBuffer($))$=iF1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=cF1;if(U.ended)pF1(this,z);else if(J||dF1(this,U,$,z))U.pendingcb++,Q=lF1(this,U,J,$,Y,z);return Q};O6.prototype.cork=function(){var $=this._writableState;$.corked++};O6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)QM0(this,$)}};O6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function mF1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=KB.from(Y,z);return Y}Object.defineProperty(O6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function lF1($,Y,z,U,Q,J){if(!z){var I=mF1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var KM0=I6(),zO1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};WM0.exports=v3;var GM0=Object.create(M4());GM0.inherits=X1();var HM0=mn(),dn=pn();GM0.inherits(v3,HM0);{GB=zO1(dn.prototype);for(GZ=0;GZ{var on=K6().Buffer,XM0=on.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function JO1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function IO1($){var Y=JO1($);if(typeof Y!=="string"&&(on.isEncoding===XM0||!XM0($)))throw Error("Unknown encoding: "+$);return Y||$}wO1.StringDecoder=WZ;function WZ($){this.encoding=IO1($);var Y;switch(this.encoding){case"utf16le":this.text=ZO1,this.end=qO1,Y=4;break;case"utf8":this.fillLast=HO1,Y=4;break;case"base64":this.text=VO1,this.end=LO1,Y=3;break;default:this.write=FO1,this.end=OO1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=on.allocUnsafe(Y)}WZ.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};WZ.prototype.end=XO1;WZ.prototype.text=WO1;WZ.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function ln($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function KO1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function GO1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function HO1($){var Y=this.lastTotal-this.lastNeed,z=GO1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function WO1($,Y){var z=KO1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function XO1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function ZO1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function qO1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function VO1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function LO1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function FO1($){return $.toString(this.encoding)}function OO1($){return $&&$.length?this.write($):""}});var mn=E((ve1,BM0)=>{var pI=I6();BM0.exports=_4;var NO1=$J(),XZ;_4.ReadableState=wM0;var _e1=I0("events").EventEmitter,LM0=function($,Y){return $.listeners(Y).length},$c=I0("stream"),ZZ=K6().Buffer,DO1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function AO1($){return ZZ.from($)}function BO1($){return ZZ.isBuffer($)||$ instanceof DO1}var FM0=Object.create(M4());FM0.inherits=X1();var sn=I0("util"),z4=void 0;if(sn&&sn.debuglog)z4=sn.debuglog("stream");else z4=function(){};var PO1=aw0(),OM0=nn(),cI;FM0.inherits(_4,$c);var an=["error","close","destroy","pause","resume"];function jO1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(NO1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function wM0($,Y){XZ=XZ||JU(),$=$||{};var z=Y instanceof XZ;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new PO1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!cI)cI=rn().StringDecoder;this.decoder=new cI($.encoding),this.encoding=$.encoding}}function _4($){if(XZ=XZ||JU(),!(this instanceof _4))return new _4($);if(this._readableState=new wM0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}$c.call(this)}Object.defineProperty(_4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});_4.prototype.destroy=OM0.destroy;_4.prototype._undestroy=OM0.undestroy;_4.prototype._destroy=function($,Y){this.push(null),Y($)};_4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=ZZ.from($,Y),Y="";U=!0}}else U=!0;return MM0(this,$,Y,!1,U)};_4.prototype.unshift=function($){return MM0(this,$,null,!0,!1)};function MM0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,RO1($,J);else{var I;if(!Q)I=TO1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==ZZ.prototype)Y=AO1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else tn($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)tn($,J,Y,!1);else NM0($,J);else tn($,J,Y,!1)}else if(!U)J.reading=!1}return EO1(J)}function tn($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)HB($)}NM0($,Y)}function TO1($,Y){var z;if(!BO1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function EO1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}_4.prototype.isPaused=function(){return this._readableState.flowing===!1};_4.prototype.setEncoding=function($){if(!cI)cI=rn().StringDecoder;return this._readableState.decoder=new cI($),this._readableState.encoding=$,this};var ZM0=8388608;function CO1($){if($>=ZM0)$=ZM0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function qM0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=CO1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}_4.prototype.read=function($){z4("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(z4("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)en(this);else HB(this);return null}if($=qM0($,Y),$===0&&Y.ended){if(Y.length===0)en(this);return null}var U=Y.needReadable;if(z4("need readable",U),Y.length===0||Y.length-$0)Q=DM0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)en(this)}if(Q!==null)this.emit("data",Q);return Q};function RO1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,HB($)}function HB($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(z4("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)pI.nextTick(VM0,$);else VM0($)}function VM0($){z4("emit readable"),$.emit("readable"),Yc($)}function NM0($,Y){if(!Y.readingMore)Y.readingMore=!0,pI.nextTick(_O1,$,Y)}function _O1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&AM0(U.pipes,$)!==-1)&&!H)z4("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(z4("onerror",O),w(),$.removeListener("error",q),LM0($,"error")===0)$.emit("error",O)}jO1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){z4("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){z4("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)z4("pipe resume"),z.resume();return $};function vO1($){return function(){var Y=$._readableState;if(z4("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&LM0($,"data"))Y.flowing=!0,Yc($)}}_4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=yO1($,Y.buffer,Y.decoder);return z}function yO1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function xO1($,Y){var z=ZZ.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function en($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,pI.nextTick(fO1,Y,$)}function fO1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function AM0($,Y){for(var z=0,U=$.length;z{TM0.exports=h3;var WB=JU(),jM0=Object.create(M4());jM0.inherits=X1();jM0.inherits(h3,WB);function uO1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{RM0.exports=qZ;var EM0=zc(),CM0=Object.create(M4());CM0.inherits=X1();CM0.inherits(qZ,EM0);function qZ($){if(!(this instanceof qZ))return new qZ($);EM0.call(this,$)}qZ.prototype._transform=function($,Y,z){z(null,$)}});var vM0=E((z8,XB)=>{var N9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&N9)XB.exports=N9,z8=XB.exports=N9.Readable,z8.Readable=N9.Readable,z8.Writable=N9.Writable,z8.Duplex=N9.Duplex,z8.Transform=N9.Transform,z8.PassThrough=N9.PassThrough,z8.Stream=N9;else z8=XB.exports=mn(),z8.Stream=N9||z8,z8.Readable=z8,z8.Writable=pn(),z8.Duplex=JU(),z8.Transform=zc(),z8.PassThrough=_M0()});var Jc=E((ge1,Qc)=>{var Uc=vM0();function dI($,Y,z){if(typeof z>"u")z=Y,Y=$,$=null;if(Uc.Duplex.call(this,$),typeof z.read!=="function")z=new Uc.Readable($).wrap(z);this._writable=Y,this._readable=z,this._waiting=!1;var U=this;if(Y.once("finish",function(){U.end()}),this.once("finish",function(){Y.end()}),z.on("readable",function(){if(U._waiting)U._waiting=!1,U._read()}),z.once("end",function(){U.push(null)}),!$||typeof $.bubbleErrors>"u"||$.bubbleErrors)Y.on("error",function(Q){U.emit("error",Q)}),z.on("error",function(Q){U.emit("error",Q)})}dI.prototype=Object.create(Uc.Duplex.prototype,{constructor:{value:dI}});dI.prototype._write=function(Y,z,U){this._writable.write(Y,z,U)};dI.prototype._read=function(){var Y,z=0;while((Y=this._readable.read())!==null)this.push(Y),z++;if(z===0)this._waiting=!0};Qc.exports=function(Y,z,U){return new dI(Y,z,U)};Qc.exports.DuplexWrapper=dI});var SM0=E((ye1,hM0)=>{var mI=I0("stream"),iO1=UB(),nO1=Jc(),cO1=$B();if(!mI.Writable||!mI.Writable.prototype.destroy)mI=_3();function pO1($,Y){var z=mI.PassThrough({objectMode:!0}),U=mI.PassThrough(),Q=mI.Transform({objectMode:!0}),J=$ instanceof RegExp?$:$&&new RegExp($),I;Q._transform=function(G,H,W){if(I||J&&!J.exec(G.path))return G.autodrain(),W();else I=!0,K.emit("entry",G),G.on("error",function(X){U.emit("error",X)}),G.pipe(U).on("error",function(X){W(X)}).on("finish",function(X){W(null,X)})},z.pipe(iO1(Y)).on("error",function(G){U.emit("error",G)}).pipe(Q).on("error",Object).on("finish",function(){if(!I)U.emit("error",Error("PATTERN_NOT_FOUND"));else U.end()});var K=nO1(z,U);return K.buffer=function(){return cO1(U)},K}hM0.exports=pO1});var ZB=E((ke1,yM0)=>{yM0.exports=S2;var Ic=I0("stream").Stream,dO1=X1();function S2(){Ic.call(this)}dO1(S2,Ic);S2.prototype.on=function($,Y){if($==="ready"&&this.ready)process.nextTick(Y.bind(this));else Ic.prototype.on.call(this,$,Y);return this};S2.prototype.abort=function(){this._aborted=!0,this.emit("abort")};S2.prototype.destroy=function(){};S2.prototype.warn=function($,Y){var z=this,U=gM0($,Y,z);if(!z.listeners("warn"))console.error(`%s %s +`)}function S(x){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,x!==q)k(this,x),this._resolveFromExecutor(x);this._promiseCreated(),this._fireEvent("promiseCreated",this)}S.prototype.toString=function(){return"[object Promise]"},S.prototype.caught=S.prototype.catch=function(x){var d=arguments.length;if(d>1){var t=Array(d-1),e=0,g;for(g=0;g0&&typeof x!=="function"&&typeof d!=="function"){var t=".then() only accepts functions but was passed: "+J.classString(x);if(arguments.length>1)t+=", "+J.classString(d);this._warn(t)}return this._then(x,d,void 0,void 0,void 0)},S.prototype.done=function(x,d){var t=this._then(x,d,void 0,void 0,void 0);t._setIsFinal()},S.prototype.spread=function(x){if(typeof x!=="function")return z("expecting a function but got "+J.classString(x));return this.all()._then(x,void 0,void 0,V,void 0)},S.prototype.toJSON=function(){var x={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())x.fulfillmentValue=this.value(),x.isFulfilled=!0;else if(this.isRejected())x.rejectionReason=this.reason(),x.isRejected=!0;return x},S.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new O(this).promise()},S.prototype.error=function(x){return this.caught(J.originatesFromRejection,x)},S.getNewLibraryCopy=Dn.exports,S.is=function(x){return x instanceof S},S.fromNode=S.fromCallback=function(x){var d=new S(q);d._captureStackTrace();var t=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,e=b(x)(T(d,t));if(e===C)d._rejectCallback(e.e,!0);if(!d._isFateSealed())d._setAsyncGuaranteed();return d},S.all=function(x){return new O(x).promise()},S.cast=function(x){var d=w(x);if(!(d instanceof S))d=new S(q),d._captureStackTrace(),d._setFulfilled(),d._rejectionHandler0=x;return d},S.resolve=S.fulfilled=S.cast,S.reject=S.rejected=function(x){var d=new S(q);return d._captureStackTrace(),d._rejectCallback(x,!0),d},S.setScheduler=function(x){if(typeof x!=="function")throw new X("expecting a function but got "+J.classString(x));return H.setScheduler(x)},S.prototype._then=function(x,d,t,e,g){var p=g!==void 0,Y0=p?g:new S(q),y=this._target(),r=y._bitField;if(!p){if(Y0._propagateFrom(this,3),Y0._captureStackTrace(),e===void 0&&(this._bitField&2097152)!==0)if((r&50397184)!==0)e=this._boundValue();else e=y===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,Y0)}var $0=I();if((r&50397184)!==0){var N0,T0,_0=y._settlePromiseCtx;if((r&33554432)!==0)T0=y._rejectionHandler0,N0=x;else if((r&16777216)!==0)T0=y._fulfillmentHandler0,N0=d,y._unsetRejectionIsUnhandled();else _0=y._settlePromiseLateCancellationObserver,T0=new Z("late cancellation observer"),y._attachExtraTrace(T0),N0=d;H.invoke(_0,y,{handler:$0===null?N0:typeof N0==="function"&&J.domainBind($0,N0),promise:Y0,receiver:e,value:T0})}else y._addCallbacks(x,d,Y0,e,$0);return Y0},S.prototype._length=function(){return this._bitField&65535},S.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},S.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},S.prototype._setLength=function(x){this._bitField=this._bitField&-65536|x&65535},S.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},S.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},S.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},S.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},S.prototype._isFinal=function(){return(this._bitField&4194304)>0},S.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},S.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},S.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},S.prototype._setAsyncGuaranteed=function(){if(H.hasCustomScheduler())return;this._bitField=this._bitField|134217728},S.prototype._receiverAt=function(x){var d=x===0?this._receiver0:this[x*4-4+3];if(d===Q)return;else if(d===void 0&&this._isBound())return this._boundValue();return d},S.prototype._promiseAt=function(x){return this[x*4-4+2]},S.prototype._fulfillmentHandlerAt=function(x){return this[x*4-4+0]},S.prototype._rejectionHandlerAt=function(x){return this[x*4-4+1]},S.prototype._boundValue=function(){},S.prototype._migrateCallback0=function(x){var{_bitField:d,_fulfillmentHandler0:t,_rejectionHandler0:e,_promise0:g}=x,p=x._receiverAt(0);if(p===void 0)p=Q;this._addCallbacks(t,e,g,p,null)},S.prototype._migrateCallbackAt=function(x,d){var t=x._fulfillmentHandlerAt(d),e=x._rejectionHandlerAt(d),g=x._promiseAt(d),p=x._receiverAt(d);if(p===void 0)p=Q;this._addCallbacks(t,e,g,p,null)},S.prototype._addCallbacks=function(x,d,t,e,g){var p=this._length();if(p>=65531)p=0,this._setLength(0);if(p===0){if(this._promise0=t,this._receiver0=e,typeof x==="function")this._fulfillmentHandler0=g===null?x:J.domainBind(g,x);if(typeof d==="function")this._rejectionHandler0=g===null?d:J.domainBind(g,d)}else{var Y0=p*4-4;if(this[Y0+2]=t,this[Y0+3]=e,typeof x==="function")this[Y0+0]=g===null?x:J.domainBind(g,x);if(typeof d==="function")this[Y0+1]=g===null?d:J.domainBind(g,d)}return this._setLength(p+1),p},S.prototype._proxy=function(x,d){this._addCallbacks(void 0,void 0,d,x,null)},S.prototype._resolveCallback=function(x,d){if((this._bitField&117506048)!==0)return;if(x===this)return this._rejectCallback($(),!1);var t=w(x,this);if(!(t instanceof S))return this._fulfill(x);if(d)this._propagateFrom(t,2);var e=t._target();if(e===this){this._reject($());return}var g=e._bitField;if((g&50397184)===0){var p=this._length();if(p>0)e._migrateCallback0(this);for(var Y0=1;Y0>>16)return;if(x===this){var t=$();return this._attachExtraTrace(t),this._reject(t)}if(this._setFulfilled(),this._rejectionHandler0=x,(d&65535)>0)if((d&134217728)!==0)this._settlePromises();else H.settlePromises(this)},S.prototype._reject=function(x){var d=this._bitField;if((d&117506048)>>>16)return;if(this._setRejected(),this._fulfillmentHandler0=x,this._isFinal())return H.fatalError(x,J.isNode);if((d&65535)>0)H.settlePromises(this);else this._ensurePossibleRejectionHandled()},S.prototype._fulfillPromises=function(x,d){for(var t=1;t0){if((x&16842752)!==0){var t=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,t,x),this._rejectPromises(d,t)}else{var e=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,e,x),this._fulfillPromises(d,e)}this._setLength(0)}this._clearCancellationData()},S.prototype._settledValue=function(){var x=this._bitField;if((x&33554432)!==0)return this._rejectionHandler0;else if((x&16777216)!==0)return this._fulfillmentHandler0};function i(x){this.promise._resolveCallback(x)}function n(x){this.promise._rejectCallback(x,!1)}S.defer=S.pending=function(){D.deprecated("Promise.defer","new Promise");var x=new S(q);return{promise:x,resolve:i,reject:n}},J.notEnumerableProp(S,"_makeSelfResolutionError",$),VO0()(S,q,w,z,D),FO0()(S,q,w,D),wO0()(S,O,z,D),NO0()(S),AO0()(S),PO0()(S,O,w,q,H,I),S.Promise=S,S.version="3.4.7",TO0()(S,O,z,w,q,D),CO0()(S),_O0()(S,z,w,M,q,D),hO0()(S,q,D),gO0()(S,z,q,w,U,D),kO0()(S),fO0()(S,q),bO0()(S,O,w,z),nO0()(S,q,w,z),pO0()(S,O,z,w,q,D),mO0()(S,O,D),oO0()(S,O,z),sO0()(S,q),tO0()(S,q),$w0()(S),J.toFastProperties(S),J.toFastProperties(S.prototype);function U0(x){var d=new S(q);d._fulfillmentHandler0=x,d._rejectionHandler0=x,d._promise0=x,d._receiver0=x}return U0({a:1}),U0({b:2}),U0({c:3}),U0(1),U0(function(){}),U0(void 0),U0(!1),U0(new S(q)),D.setBounds(G.firstLineError,J.lastLineError),S}});var v2=E((Ge1,Uw0)=>{var zw0;if(typeof Promise<"u")zw0=Promise;function VL1(){try{if(Promise===nA)Promise=zw0}catch($){}return nA}var nA=Yw0()();nA.noConflict=VL1;Uw0.exports=nA});var fI=E((He1,Qw0)=>{var xI=I0("buffer").Buffer;if(xI.from===void 0)xI.from=function($,Y,z){return new xI($,Y,z)},xI.alloc=xI.from;Qw0.exports=xI});var Iw0=E((We1,An)=>{function LL1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var Jw0=K6().Buffer,mX=I0("util");function FL1($,Y,z){$.copy(Y,z)}An.exports=function(){function $(){LL1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return Jw0.alloc(0);var U=Jw0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)FL1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(mX&&mX.inspect&&mX.inspect.custom)An.exports.prototype[mX.inspect.custom]=function(){var $=mX.inspect({length:this.length});return this.constructor.name+" "+$}});var Bn=E((Xe1,Kw0)=>{var cA=I6();function OL1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)cA.nextTick(pA,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,cA.nextTick(pA,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)cA.nextTick(pA,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,cA.nextTick(pA,z,J)}else if(Y)Y(J)}),this}function wL1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function pA($,Y){$.emit("error",Y)}Kw0.exports={destroy:OL1,undestroy:wL1}});var jn=E((Ze1,Lw0)=>{var YU=I6();Lw0.exports=F6;function Hw0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){kL1(Y,$)}}var ML1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:YU.nextTick,uI;F6.WritableState=oX;var Ww0=Object.create(M4());Ww0.inherits=X1();var NL1={deprecate:f7()},Xw0=I0("stream"),mA=K6().Buffer,DL1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function AL1($){return mA.from($)}function BL1($){return mA.isBuffer($)||$ instanceof DL1}var Zw0=Bn();Ww0.inherits(F6,Xw0);function PL1(){}function oX($,Y){uI=uI||zU(),$=$||{};var z=Y instanceof uI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){vL1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Hw0(this)}oX.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(oX.prototype,"buffer",{get:NL1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var dA;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")dA=Function.prototype[Symbol.hasInstance],Object.defineProperty(F6,Symbol.hasInstance,{value:function($){if(dA.call(this,$))return!0;if(this!==F6)return!1;return $&&$._writableState instanceof oX}});else dA=function($){return $ instanceof this};function F6($){if(uI=uI||zU(),!dA.call(F6,this)&&!(this instanceof uI))return new F6($);if(this._writableState=new oX($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}Xw0.call(this)}F6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function jL1($,Y){var z=Error("write after end");$.emit("error",z),YU.nextTick(Y,z)}function TL1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),YU.nextTick(U,J),Q=!1;return Q}F6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&BL1($);if(J&&!mA.isBuffer($))$=AL1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=PL1;if(U.ended)jL1(this,z);else if(J||TL1(this,U,$,z))U.pendingcb++,Q=CL1(this,U,J,$,Y,z);return Q};F6.prototype.cork=function(){var $=this._writableState;$.corked++};F6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)qw0(this,$)}};F6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function EL1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=mA.from(Y,z);return Y}Object.defineProperty(F6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function CL1($,Y,z,U,Q,J){if(!z){var I=EL1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var Fw0=I6(),xL1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};Mw0.exports=C3;var Ow0=Object.create(M4());Ow0.inherits=X1();var ww0=En(),Tn=jn();Ow0.inherits(C3,ww0);{lA=xL1(Tn.prototype);for(rX=0;rX{var Rn=K6().Buffer,Nw0=Rn.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function bL1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function iL1($){var Y=bL1($);if(typeof Y!=="string"&&(Rn.isEncoding===Nw0||!Nw0($)))throw Error("Unknown encoding: "+$);return Y||$}eL1.StringDecoder=aX;function aX($){this.encoding=iL1($);var Y;switch(this.encoding){case"utf16le":this.text=lL1,this.end=oL1,Y=4;break;case"utf8":this.fillLast=pL1,Y=4;break;case"base64":this.text=rL1,this.end=sL1,Y=3;break;default:this.write=aL1,this.end=tL1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Rn.allocUnsafe(Y)}aX.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};aX.prototype.end=mL1;aX.prototype.text=dL1;aX.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function Cn($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function nL1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function cL1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function pL1($){var Y=this.lastTotal-this.lastNeed,z=cL1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function dL1($,Y){var z=nL1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function mL1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function lL1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function oL1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function rL1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function sL1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function aL1($){return $.toString(this.encoding)}function tL1($){return $&&$.length?this.write($):""}});var En=E((Fe1,hw0)=>{var iI=I6();hw0.exports=R4;var YF1=$J(),tX;R4.ReadableState=Ew0;var Le1=I0("events").EventEmitter,Pw0=function($,Y){return $.listeners(Y).length},yn=I0("stream"),eX=K6().Buffer,zF1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function UF1($){return eX.from($)}function QF1($){return eX.isBuffer($)||$ instanceof zF1}var jw0=Object.create(M4());jw0.inherits=X1();var vn=I0("util"),Y4=void 0;if(vn&&vn.debuglog)Y4=vn.debuglog("stream");else Y4=function(){};var JF1=Iw0(),Tw0=Bn(),bI;jw0.inherits(R4,yn);var hn=["error","close","destroy","pause","resume"];function IF1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(YF1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function Ew0($,Y){tX=tX||zU(),$=$||{};var z=Y instanceof tX;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new JF1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!bI)bI=_n().StringDecoder;this.decoder=new bI($.encoding),this.encoding=$.encoding}}function R4($){if(tX=tX||zU(),!(this instanceof R4))return new R4($);if(this._readableState=new Ew0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}yn.call(this)}Object.defineProperty(R4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});R4.prototype.destroy=Tw0.destroy;R4.prototype._undestroy=Tw0.undestroy;R4.prototype._destroy=function($,Y){this.push(null),Y($)};R4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=eX.from($,Y),Y="";U=!0}}else U=!0;return Cw0(this,$,Y,!1,U)};R4.prototype.unshift=function($){return Cw0(this,$,null,!0,!1)};function Cw0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,WF1($,J);else{var I;if(!Q)I=KF1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==eX.prototype)Y=UF1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else Sn($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)Sn($,J,Y,!1);else Rw0($,J);else Sn($,J,Y,!1)}else if(!U)J.reading=!1}return GF1(J)}function Sn($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)oA($)}Rw0($,Y)}function KF1($,Y){var z;if(!QF1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function GF1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}R4.prototype.isPaused=function(){return this._readableState.flowing===!1};R4.prototype.setEncoding=function($){if(!bI)bI=_n().StringDecoder;return this._readableState.decoder=new bI($),this._readableState.encoding=$,this};var Dw0=8388608;function HF1($){if($>=Dw0)$=Dw0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function Aw0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=HF1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}R4.prototype.read=function($){Y4("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(Y4("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)gn(this);else oA(this);return null}if($=Aw0($,Y),$===0&&Y.ended){if(Y.length===0)gn(this);return null}var U=Y.needReadable;if(Y4("need readable",U),Y.length===0||Y.length-$0)Q=_w0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)gn(this)}if(Q!==null)this.emit("data",Q);return Q};function WF1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,oA($)}function oA($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(Y4("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)iI.nextTick(Bw0,$);else Bw0($)}function Bw0($){Y4("emit readable"),$.emit("readable"),kn($)}function Rw0($,Y){if(!Y.readingMore)Y.readingMore=!0,iI.nextTick(XF1,$,Y)}function XF1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&vw0(U.pipes,$)!==-1)&&!H)Y4("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(Y4("onerror",O),w(),$.removeListener("error",q),Pw0($,"error")===0)$.emit("error",O)}IF1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){Y4("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){Y4("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)Y4("pipe resume"),z.resume();return $};function ZF1($){return function(){var Y=$._readableState;if(Y4("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&Pw0($,"data"))Y.flowing=!0,kn($)}}R4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=FF1($,Y.buffer,Y.decoder);return z}function FF1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function wF1($,Y){var z=eX.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function gn($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,iI.nextTick(MF1,Y,$)}function MF1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function vw0($,Y){for(var z=0,U=$.length;z{yw0.exports=R3;var rA=zU(),gw0=Object.create(M4());gw0.inherits=X1();gw0.inherits(R3,rA);function NF1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{fw0.exports=$Z;var kw0=xn(),xw0=Object.create(M4());xw0.inherits=X1();xw0.inherits($Z,kw0);function $Z($){if(!(this instanceof $Z))return new $Z($);kw0.call(this,$)}$Z.prototype._transform=function($,Y,z){z(null,$)}});var _3=E((Y8,sA)=>{var M9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&M9)sA.exports=M9,Y8=sA.exports=M9.Readable,Y8.Readable=M9.Readable,Y8.Writable=M9.Writable,Y8.Duplex=M9.Duplex,Y8.Transform=M9.Transform,Y8.PassThrough=M9.PassThrough,Y8.Stream=M9;else Y8=sA.exports=En(),Y8.Stream=M9||Y8,Y8.Readable=Y8,Y8.Writable=jn(),Y8.Duplex=zU(),Y8.Transform=xn(),Y8.PassThrough=uw0()});var tA=E((Me1,bw0)=>{var UU=I0("stream"),fn=v2(),AF1=I0("util"),aA=fI(),BF1="function";if(!UU.Writable||!UU.Writable.prototype.destroy)UU=_3();function h2(){if(!(this instanceof h2))return new h2;UU.Duplex.call(this,{decodeStrings:!1,objectMode:!0}),this.buffer=aA.from("");var $=this;$.on("finish",function(){$.finished=!0,$.emit("chunk",!1)})}AF1.inherits(h2,UU.Duplex);h2.prototype._write=function($,Y,z){this.buffer=aA.concat([this.buffer,$]),this.cb=z,this.emit("chunk")};h2.prototype.stream=function($,Y){var z=UU.PassThrough(),U,Q=this;function J(){if(typeof Q.cb===BF1){var K=Q.cb;return Q.cb=void 0,K()}}function I(){var K;if(Q.buffer&&Q.buffer.length){if(typeof $==="number")K=Q.buffer.slice(0,$),Q.buffer=Q.buffer.slice($),$-=K.length,U=!$;else{var G=Q.buffer.indexOf($);if(G!==-1){if(Q.match=G,Y)G=G+$.length;K=Q.buffer.slice(0,G),Q.buffer=Q.buffer.slice(G),U=!0}else{var H=Q.buffer.length-$.length;if(H<=0)J();else K=Q.buffer.slice(0,H),Q.buffer=Q.buffer.slice(H)}}if(K)z.write(K,function(){if(Q.buffer.length===0||$.length&&Q.buffer.length<=$.length)J()})}if(!U){if(Q.finished){Q.removeListener("chunk",I),Q.emit("error",Error("FILE_ENDED"));return}}else Q.removeListener("chunk",I),z.end()}return Q.on("chunk",I),I(),z};h2.prototype.pull=function($,Y){if($===0)return fn.resolve("");if(!isNaN($)&&this.buffer.length>$){var z=this.buffer.slice(0,$);return this.buffer=this.buffer.slice($),fn.resolve(z)}var U=aA.from(""),Q=this,J=UU.Transform();J._transform=function(G,H,W){U=aA.concat([U,G]),W()};var I,K;return new fn(function(G,H){if(I=H,K=function(W){Q.__emittedError=W,H(W)},Q.finished)return H(Error("FILE_ENDED"));Q.once("error",K),Q.stream($,Y).on("error",H).pipe(J).on("finish",function(){G(U)}).on("error",H)}).finally(function(){Q.removeListener("error",I),Q.removeListener("error",K)})};h2.prototype._read=function(){};bw0.exports=h2});var nw0=E((Ne1,iw0)=>{var YZ=I0("stream"),PF1=I0("util");if(!YZ.Writable||!YZ.Writable.prototype.destroy)YZ=_3();function zZ(){if(!(this instanceof zZ))return new zZ;YZ.Transform.call(this)}PF1.inherits(zZ,YZ.Transform);zZ.prototype._transform=function($,Y,z){z()};iw0.exports=zZ});var $B=E((De1,cw0)=>{var jF1=v2(),eA=I0("stream"),TF1=fI();if(!eA.Writable||!eA.Writable.prototype.destroy)eA=_3();cw0.exports=function($){return new jF1(function(Y,z){var U=[],Q=eA.Transform().on("finish",function(){Y(TF1.concat(U))}).on("error",z);Q._transform=function(J,I,K){U.push(J),K()},$.on("error",z).pipe(Q)})}});var YB=E((Ae1,pw0)=>{var EF1=cX();pw0.exports=function($,Y){var z;while(!z&&$&&$.length){var U=EF1.parse($).word16lu("signature").word16lu("partsize").word64lu("uncompressedSize").word64lu("compressedSize").word64lu("offset").word64lu("disknum").vars;if(U.signature===1)z=U;else $=$.slice(U.partsize+4)}if(z=z||{},Y.compressedSize===4294967295)Y.compressedSize=z.compressedSize;if(Y.uncompressedSize===4294967295)Y.uncompressedSize=z.uncompressedSize;if(Y.offsetToLocalFileHeader===4294967295)Y.offsetToLocalFileHeader=z.offset;return z}});var zB=E((Be1,dw0)=>{dw0.exports=function(Y,z){let U=Y&31,Q=Y>>5&15,J=(Y>>9&127)+1980,I=z?(z&31)*2:0,K=z?z>>5&63:0,G=z?z>>11:0;return new Date(Date.UTC(J,Q-1,U,G,K,I))}});var UB=E((Pe1,rw0)=>{var CF1=I0("util"),RF1=I0("zlib"),UZ=I0("stream"),QZ=cX(),un=v2(),mw0=tA(),_F1=nw0(),vF1=$B(),hF1=YB(),lw0=fI(),SF1=zB();if(!UZ.Writable||!UZ.Writable.prototype.destroy)UZ=_3();var ow0=lw0.alloc(4);ow0.writeUInt32LE(101010256,0);function M5($){if(!(this instanceof M5))return new M5($);var Y=this;Y._opts=$||{verbose:!1},mw0.call(Y,Y._opts),Y.on("finish",function(){Y.emit("end"),Y.emit("close")}),Y._readRecord().catch(function(z){if(!Y.__emittedError||Y.__emittedError!==z)Y.emit("error",z)})}CF1.inherits(M5,mw0);M5.prototype._readRecord=function(){var $=this;return $.pull(4).then(function(Y){if(Y.length===0)return;var z=Y.readUInt32LE(0);if(z===875721283)return $._readCrxHeader();if(z===67324752)return $._readFile();else if(z===33639248)return $.reachedCD=!0,$._readCentralDirectoryFileHeader();else if(z===101010256)return $._readEndOfCentralDirectoryRecord();else if($.reachedCD){var U=!0;return $.pull(ow0,U).then(function(){return $._readEndOfCentralDirectoryRecord()})}else $.emit("error",Error("invalid signature: 0x"+z.toString(16)))})};M5.prototype._readCrxHeader=function(){var $=this;return $.pull(12).then(function(Y){return $.crxHeader=QZ.parse(Y).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars,$.pull($.crxHeader.pubKeyLength+$.crxHeader.signatureLength)}).then(function(Y){return $.crxHeader.publicKey=Y.slice(0,$.crxHeader.pubKeyLength),$.crxHeader.signature=Y.slice($.crxHeader.pubKeyLength),$.emit("crx-header",$.crxHeader),$._readRecord()})};M5.prototype._readFile=function(){var $=this;return $.pull(26).then(function(Y){var z=QZ.parse(Y).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;if(z.lastModifiedDateTime=SF1(z.lastModifiedDate,z.lastModifiedTime),$.crxHeader)z.crxHeader=$.crxHeader;return $.pull(z.fileNameLength).then(function(U){var Q=U.toString("utf8"),J=UZ.PassThrough(),I=!1;if(J.autodrain=function(){I=!0;var K=J.pipe(_F1());return K.promise=function(){return new un(function(G,H){K.on("finish",G),K.on("error",H)})},K},J.buffer=function(){return vF1(J)},J.path=Q,J.props={},J.props.path=Q,J.props.pathBuffer=U,J.props.flags={isUnicode:(z.flags&2048)!=0},J.type=z.uncompressedSize===0&&/[\/\\]$/.test(Q)?"Directory":"File",$._opts.verbose){if(J.type==="Directory")console.log(" creating:",Q);else if(J.type==="File")if(z.compressionMethod===0)console.log(" extracting:",Q);else console.log(" inflating:",Q)}return $.pull(z.extraFieldLength).then(function(K){var G=hF1(K,z);if(J.vars=z,J.extra=G,$._opts.forceStream)$.push(J);else if($.emit("entry",J),$._readableState.pipesCount||$._readableState.pipes&&$._readableState.pipes.length)$.push(J);if($._opts.verbose)console.log({filename:Q,vars:z,extra:G});var H=!(z.flags&8)||z.compressedSize>0,W;J.__autodraining=I;var X=z.compressionMethod&&!I?RF1.createInflateRaw():UZ.PassThrough();if(H)J.size=z.uncompressedSize,W=z.compressedSize;else W=lw0.alloc(4),W.writeUInt32LE(134695760,0);return new un(function(Z,q){$.stream(W).pipe(X).on("error",function(V){$.emit("error",V)}).pipe(J).on("finish",function(){return H?$._readRecord().then(Z).catch(q):$._processDataDescriptor(J).then(Z).catch(q)})})})})})};M5.prototype._processDataDescriptor=function($){var Y=this;return Y.pull(16).then(function(z){var U=QZ.parse(z).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;return $.size=U.uncompressedSize,Y._readRecord()})};M5.prototype._readCentralDirectoryFileHeader=function(){var $=this;return $.pull(42).then(function(Y){var z=QZ.parse(Y).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return $.pull(z.fileNameLength).then(function(U){return z.fileName=U.toString("utf8"),$.pull(z.extraFieldLength)}).then(function(U){return $.pull(z.fileCommentLength)}).then(function(U){return $._readRecord()})})};M5.prototype._readEndOfCentralDirectoryRecord=function(){var $=this;return $.pull(18).then(function(Y){var z=QZ.parse(Y).word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;return $.pull(z.commentLength).then(function(U){U=U.toString("utf8"),$.end(),$.push(null)})})};M5.prototype.promise=function(){var $=this;return new un(function(Y,z){$.on("finish",Y),$.on("error",z)})};rw0.exports=M5});var aw0=E((je1,bn)=>{function gF1($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}var sw0=K6().Buffer,JZ=I0("util");function yF1($,Y,z){$.copy(Y,z)}bn.exports=function(){function $(){gF1(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(z){var U={data:z,next:null};if(this.length>0)this.tail.next=U;else this.head=U;this.tail=U,++this.length},$.prototype.unshift=function(z){var U={data:z,next:this.head};if(this.length===0)this.tail=U;this.head=U,++this.length},$.prototype.shift=function(){if(this.length===0)return;var z=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,z},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(z){if(this.length===0)return"";var U=this.head,Q=""+U.data;while(U=U.next)Q+=z+U.data;return Q},$.prototype.concat=function(z){if(this.length===0)return sw0.alloc(0);var U=sw0.allocUnsafe(z>>>0),Q=this.head,J=0;while(Q)yF1(Q.data,U,J),J+=Q.data.length,Q=Q.next;return U},$}();if(JZ&&JZ.inspect&&JZ.inspect.custom)bn.exports.prototype[JZ.inspect.custom]=function(){var $=JZ.inspect({length:this.length});return this.constructor.name+" "+$}});var nn=E((Te1,tw0)=>{var QB=I6();function kF1($,Y){var z=this,U=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(U||Q){if(Y)Y($);else if($){if(!this._writableState)QB.nextTick(JB,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,QB.nextTick(JB,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(J){if(!Y&&J){if(!z._writableState)QB.nextTick(JB,z,J);else if(!z._writableState.errorEmitted)z._writableState.errorEmitted=!0,QB.nextTick(JB,z,J)}else if(Y)Y(J)}),this}function xF1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function JB($,Y){$.emit("error",Y)}tw0.exports={destroy:kF1,undestroy:xF1}});var pn=E((Ee1,IM0)=>{var QU=I6();IM0.exports=O6;function $M0($){var Y=this;this.next=null,this.entry=null,this.finish=function(){YO1(Y,$)}}var fF1=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:QU.nextTick,nI;O6.WritableState=KZ;var YM0=Object.create(M4());YM0.inherits=X1();var uF1={deprecate:f7()},zM0=I0("stream"),KB=K6().Buffer,bF1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function iF1($){return KB.from($)}function nF1($){return KB.isBuffer($)||$ instanceof bF1}var UM0=nn();YM0.inherits(O6,zM0);function cF1(){}function KZ($,Y){nI=nI||JU(),$=$||{};var z=Y instanceof nI;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:U,writableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=$.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){sF1(Y,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new $M0(this)}KZ.prototype.getBuffer=function(){var Y=this.bufferedRequest,z=[];while(Y)z.push(Y),Y=Y.next;return z};(function(){try{Object.defineProperty(KZ.prototype,"buffer",{get:uF1.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var IB;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")IB=Function.prototype[Symbol.hasInstance],Object.defineProperty(O6,Symbol.hasInstance,{value:function($){if(IB.call(this,$))return!0;if(this!==O6)return!1;return $&&$._writableState instanceof KZ}});else IB=function($){return $ instanceof this};function O6($){if(nI=nI||JU(),!IB.call(O6,this)&&!(this instanceof nI))return new O6($);if(this._writableState=new KZ($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}zM0.call(this)}O6.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function pF1($,Y){var z=Error("write after end");$.emit("error",z),QU.nextTick(Y,z)}function dF1($,Y,z,U){var Q=!0,J=!1;if(z===null)J=TypeError("May not write null values to stream");else if(typeof z!=="string"&&z!==void 0&&!Y.objectMode)J=TypeError("Invalid non-string/buffer chunk");if(J)$.emit("error",J),QU.nextTick(U,J),Q=!1;return Q}O6.prototype.write=function($,Y,z){var U=this._writableState,Q=!1,J=!U.objectMode&&nF1($);if(J&&!KB.isBuffer($))$=iF1($);if(typeof Y==="function")z=Y,Y=null;if(J)Y="buffer";else if(!Y)Y=U.defaultEncoding;if(typeof z!=="function")z=cF1;if(U.ended)pF1(this,z);else if(J||dF1(this,U,$,z))U.pendingcb++,Q=lF1(this,U,J,$,Y,z);return Q};O6.prototype.cork=function(){var $=this._writableState;$.corked++};O6.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)QM0(this,$)}};O6.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Y);return this._writableState.defaultEncoding=Y,this};function mF1($,Y,z){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=KB.from(Y,z);return Y}Object.defineProperty(O6.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function lF1($,Y,z,U,Q,J){if(!z){var I=mF1(Y,U,Q);if(U!==I)z=!0,Q="buffer",U=I}var K=Y.objectMode?1:U.length;Y.length+=K;var G=Y.length{var KM0=I6(),zO1=Object.keys||function($){var Y=[];for(var z in $)Y.push(z);return Y};WM0.exports=v3;var GM0=Object.create(M4());GM0.inherits=X1();var HM0=mn(),dn=pn();GM0.inherits(v3,HM0);{GB=zO1(dn.prototype);for(GZ=0;GZ{var on=K6().Buffer,XM0=on.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function JO1($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function IO1($){var Y=JO1($);if(typeof Y!=="string"&&(on.isEncoding===XM0||!XM0($)))throw Error("Unknown encoding: "+$);return Y||$}wO1.StringDecoder=WZ;function WZ($){this.encoding=IO1($);var Y;switch(this.encoding){case"utf16le":this.text=ZO1,this.end=qO1,Y=4;break;case"utf8":this.fillLast=HO1,Y=4;break;case"base64":this.text=VO1,this.end=LO1,Y=3;break;default:this.write=FO1,this.end=OO1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=on.allocUnsafe(Y)}WZ.prototype.write=function($){if($.length===0)return"";var Y,z;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<$.length)return Y?Y+this.text($,z):this.text($,z);return Y||""};WZ.prototype.end=XO1;WZ.prototype.text=WO1;WZ.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function ln($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function KO1($,Y,z){var U=Y.length-1;if(U=0){if(Q>0)$.lastNeed=Q-1;return Q}if(--U=0){if(Q>0)$.lastNeed=Q-2;return Q}if(--U=0){if(Q>0)if(Q===2)Q=0;else $.lastNeed=Q-3;return Q}return 0}function GO1($,Y,z){if((Y[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"�"}}}function HO1($){var Y=this.lastTotal-this.lastNeed,z=GO1(this,$,Y);if(z!==void 0)return z;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function WO1($,Y){var z=KO1(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=z;var U=$.length-(z-this.lastNeed);return $.copy(this.lastChar,0,U),$.toString("utf8",Y,U)}function XO1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"�";return Y}function ZO1($,Y){if(($.length-Y)%2===0){var z=$.toString("utf16le",Y);if(z){var U=z.charCodeAt(z.length-1);if(U>=55296&&U<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function qO1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,z)}return Y}function VO1($,Y){var z=($.length-Y)%3;if(z===0)return $.toString("base64",Y);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-z)}function LO1($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function FO1($){return $.toString(this.encoding)}function OO1($){return $&&$.length?this.write($):""}});var mn=E((ve1,BM0)=>{var pI=I6();BM0.exports=_4;var NO1=$J(),XZ;_4.ReadableState=wM0;var _e1=I0("events").EventEmitter,LM0=function($,Y){return $.listeners(Y).length},$c=I0("stream"),ZZ=K6().Buffer,DO1=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function AO1($){return ZZ.from($)}function BO1($){return ZZ.isBuffer($)||$ instanceof DO1}var FM0=Object.create(M4());FM0.inherits=X1();var sn=I0("util"),z4=void 0;if(sn&&sn.debuglog)z4=sn.debuglog("stream");else z4=function(){};var PO1=aw0(),OM0=nn(),cI;FM0.inherits(_4,$c);var an=["error","close","destroy","pause","resume"];function jO1($,Y,z){if(typeof $.prependListener==="function")return $.prependListener(Y,z);if(!$._events||!$._events[Y])$.on(Y,z);else if(NO1($._events[Y]))$._events[Y].unshift(z);else $._events[Y]=[z,$._events[Y]]}function wM0($,Y){XZ=XZ||JU(),$=$||{};var z=Y instanceof XZ;if(this.objectMode=!!$.objectMode,z)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:U,readableHighWaterMark:Q}=$,J=this.objectMode?16:16384;if(U||U===0)this.highWaterMark=U;else if(z&&(Q||Q===0))this.highWaterMark=Q;else this.highWaterMark=J;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new PO1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!cI)cI=rn().StringDecoder;this.decoder=new cI($.encoding),this.encoding=$.encoding}}function _4($){if(XZ=XZ||JU(),!(this instanceof _4))return new _4($);if(this._readableState=new wM0($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}$c.call(this)}Object.defineProperty(_4.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});_4.prototype.destroy=OM0.destroy;_4.prototype._undestroy=OM0.undestroy;_4.prototype._destroy=function($,Y){this.push(null),Y($)};_4.prototype.push=function($,Y){var z=this._readableState,U;if(!z.objectMode){if(typeof $==="string"){if(Y=Y||z.defaultEncoding,Y!==z.encoding)$=ZZ.from($,Y),Y="";U=!0}}else U=!0;return MM0(this,$,Y,!1,U)};_4.prototype.unshift=function($){return MM0(this,$,null,!0,!1)};function MM0($,Y,z,U,Q){var J=$._readableState;if(Y===null)J.reading=!1,RO1($,J);else{var I;if(!Q)I=TO1(J,Y);if(I)$.emit("error",I);else if(J.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!J.objectMode&&Object.getPrototypeOf(Y)!==ZZ.prototype)Y=AO1(Y);if(U)if(J.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else tn($,J,Y,!0);else if(J.ended)$.emit("error",Error("stream.push() after EOF"));else if(J.reading=!1,J.decoder&&!z)if(Y=J.decoder.write(Y),J.objectMode||Y.length!==0)tn($,J,Y,!1);else NM0($,J);else tn($,J,Y,!1)}else if(!U)J.reading=!1}return EO1(J)}function tn($,Y,z,U){if(Y.flowing&&Y.length===0&&!Y.sync)$.emit("data",z),$.read(0);else{if(Y.length+=Y.objectMode?1:z.length,U)Y.buffer.unshift(z);else Y.buffer.push(z);if(Y.needReadable)HB($)}NM0($,Y)}function TO1($,Y){var z;if(!BO1(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)z=TypeError("Invalid non-string/buffer chunk");return z}function EO1($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}_4.prototype.isPaused=function(){return this._readableState.flowing===!1};_4.prototype.setEncoding=function($){if(!cI)cI=rn().StringDecoder;return this._readableState.decoder=new cI($),this._readableState.encoding=$,this};var ZM0=8388608;function CO1($){if($>=ZM0)$=ZM0;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function qM0($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=CO1($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}_4.prototype.read=function($){z4("read",$),$=parseInt($,10);var Y=this._readableState,z=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&(Y.length>=Y.highWaterMark||Y.ended)){if(z4("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)en(this);else HB(this);return null}if($=qM0($,Y),$===0&&Y.ended){if(Y.length===0)en(this);return null}var U=Y.needReadable;if(z4("need readable",U),Y.length===0||Y.length-$0)Q=DM0($,Y);else Q=null;if(Q===null)Y.needReadable=!0,$=0;else Y.length-=$;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(z!==$&&Y.ended)en(this)}if(Q!==null)this.emit("data",Q);return Q};function RO1($,Y){if(Y.ended)return;if(Y.decoder){var z=Y.decoder.end();if(z&&z.length)Y.buffer.push(z),Y.length+=Y.objectMode?1:z.length}Y.ended=!0,HB($)}function HB($){var Y=$._readableState;if(Y.needReadable=!1,!Y.emittedReadable)if(z4("emitReadable",Y.flowing),Y.emittedReadable=!0,Y.sync)pI.nextTick(VM0,$);else VM0($)}function VM0($){z4("emit readable"),$.emit("readable"),Yc($)}function NM0($,Y){if(!Y.readingMore)Y.readingMore=!0,pI.nextTick(_O1,$,Y)}function _O1($,Y){var z=Y.length;while(!Y.reading&&!Y.flowing&&!Y.ended&&Y.length1&&AM0(U.pipes,$)!==-1)&&!H)z4("false write response, pause",U.awaitDrain),U.awaitDrain++,X=!0;z.pause()}}function q(O){if(z4("onerror",O),w(),$.removeListener("error",q),LM0($,"error")===0)$.emit("error",O)}jO1($,"error",q);function V(){$.removeListener("finish",F),w()}$.once("close",V);function F(){z4("onfinish"),$.removeListener("close",V),w()}$.once("finish",F);function w(){z4("unpipe"),z.unpipe($)}if($.emit("pipe",z),!U.flowing)z4("pipe resume"),z.resume();return $};function vO1($){return function(){var Y=$._readableState;if(z4("pipeOnDrain",Y.awaitDrain),Y.awaitDrain)Y.awaitDrain--;if(Y.awaitDrain===0&&LM0($,"data"))Y.flowing=!0,Yc($)}}_4.prototype.unpipe=function($){var Y=this._readableState,z={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,z);return this}if(!$){var{pipes:U,pipesCount:Q}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var J=0;J=Y.length){if(Y.decoder)z=Y.buffer.join("");else if(Y.buffer.length===1)z=Y.buffer.head.data;else z=Y.buffer.concat(Y.length);Y.buffer.clear()}else z=yO1($,Y.buffer,Y.decoder);return z}function yO1($,Y,z){var U;if($J.length?J.length:$;if(I===J.length)Q+=J;else Q+=J.slice(0,$);if($-=I,$===0){if(I===J.length)if(++U,z.next)Y.head=z.next;else Y.head=Y.tail=null;else Y.head=z,z.data=J.slice(I);break}++U}return Y.length-=U,Q}function xO1($,Y){var z=ZZ.allocUnsafe($),U=Y.head,Q=1;U.data.copy(z),$-=U.data.length;while(U=U.next){var J=U.data,I=$>J.length?J.length:$;if(J.copy(z,z.length-$,0,I),$-=I,$===0){if(I===J.length)if(++Q,U.next)Y.head=U.next;else Y.head=Y.tail=null;else Y.head=U,U.data=J.slice(I);break}++Q}return Y.length-=Q,z}function en($){var Y=$._readableState;if(Y.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Y.endEmitted)Y.ended=!0,pI.nextTick(fO1,Y,$)}function fO1($,Y){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Y.readable=!1,Y.emit("end")}function AM0($,Y){for(var z=0,U=$.length;z{TM0.exports=h3;var WB=JU(),jM0=Object.create(M4());jM0.inherits=X1();jM0.inherits(h3,WB);function uO1($,Y){var z=this._transformState;z.transforming=!1;var U=z.writecb;if(!U)return this.emit("error",Error("write callback called multiple times"));if(z.writechunk=null,z.writecb=null,Y!=null)this.push(Y);U($);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length{RM0.exports=qZ;var EM0=zc(),CM0=Object.create(M4());CM0.inherits=X1();CM0.inherits(qZ,EM0);function qZ($){if(!(this instanceof qZ))return new qZ($);EM0.call(this,$)}qZ.prototype._transform=function($,Y,z){z(null,$)}});var vM0=E((z8,XB)=>{var N9=I0("stream");if(process.env.READABLE_STREAM==="disable"&&N9)XB.exports=N9,z8=XB.exports=N9.Readable,z8.Readable=N9.Readable,z8.Writable=N9.Writable,z8.Duplex=N9.Duplex,z8.Transform=N9.Transform,z8.PassThrough=N9.PassThrough,z8.Stream=N9;else z8=XB.exports=mn(),z8.Stream=N9||z8,z8.Readable=z8,z8.Writable=pn(),z8.Duplex=JU(),z8.Transform=zc(),z8.PassThrough=_M0()});var Jc=E((ge1,Qc)=>{var Uc=vM0();function dI($,Y,z){if(typeof z>"u")z=Y,Y=$,$=null;if(Uc.Duplex.call(this,$),typeof z.read!=="function")z=new Uc.Readable($).wrap(z);this._writable=Y,this._readable=z,this._waiting=!1;var U=this;if(Y.once("finish",function(){U.end()}),this.once("finish",function(){Y.end()}),z.on("readable",function(){if(U._waiting)U._waiting=!1,U._read()}),z.once("end",function(){U.push(null)}),!$||typeof $.bubbleErrors>"u"||$.bubbleErrors)Y.on("error",function(Q){U.emit("error",Q)}),z.on("error",function(Q){U.emit("error",Q)})}dI.prototype=Object.create(Uc.Duplex.prototype,{constructor:{value:dI}});dI.prototype._write=function(Y,z,U){this._writable.write(Y,z,U)};dI.prototype._read=function(){var Y,z=0;while((Y=this._readable.read())!==null)this.push(Y),z++;if(z===0)this._waiting=!0};Qc.exports=function(Y,z,U){return new dI(Y,z,U)};Qc.exports.DuplexWrapper=dI});var SM0=E((ye1,hM0)=>{var mI=I0("stream"),iO1=UB(),nO1=Jc(),cO1=$B();if(!mI.Writable||!mI.Writable.prototype.destroy)mI=_3();function pO1($,Y){var z=mI.PassThrough({objectMode:!0}),U=mI.PassThrough(),Q=mI.Transform({objectMode:!0}),J=$ instanceof RegExp?$:$&&new RegExp($),I;Q._transform=function(G,H,W){if(I||J&&!J.exec(G.path))return G.autodrain(),W();else I=!0,K.emit("entry",G),G.on("error",function(X){U.emit("error",X)}),G.pipe(U).on("error",function(X){W(X)}).on("finish",function(X){W(null,X)})},z.pipe(iO1(Y)).on("error",function(G){U.emit("error",G)}).pipe(Q).on("error",Object).on("finish",function(){if(!I)U.emit("error",Error("PATTERN_NOT_FOUND"));else U.end()});var K=nO1(z,U);return K.buffer=function(){return cO1(U)},K}hM0.exports=pO1});var ZB=E((ke1,yM0)=>{yM0.exports=S2;var Ic=I0("stream").Stream,dO1=X1();function S2(){Ic.call(this)}dO1(S2,Ic);S2.prototype.on=function($,Y){if($==="ready"&&this.ready)process.nextTick(Y.bind(this));else Ic.prototype.on.call(this,$,Y);return this};S2.prototype.abort=function(){this._aborted=!0,this.emit("abort")};S2.prototype.destroy=function(){};S2.prototype.warn=function($,Y){var z=this,U=gM0($,Y,z);if(!z.listeners("warn"))console.error(`%s %s path = %s syscall = %s fstream_type = %s @@ -300,17 +300,17 @@ expect: `+$.props.size+` actual: `+$._bytesEmitted)}),Y.on("close",function(){if($._paused||$._buffer.length)$._buffer.push(cM0),$._read();else $.emit("close")}),Y.on("error",function(z){$.emit("error",z)}),$._read()};KU.prototype._read=function(){var $=this;if($._paused)return;if(!$._stream)return $._getStream();if($._buffer.length){var Y=$._buffer;for(var z=0,U=Y.length;z{mM0.exports=qB;var tO1=X1(),dM0=IU();tO1(qB,dM0);function qB($){var Y=this;if(!(Y instanceof qB))throw Error("SocketReader must be called as constructor.");if(!($.type==="Socket"&&$.Socket))throw Error("Non-socket type "+$.type);dM0.call(Y,$)}qB.prototype._read=function(){var $=this;if($._paused)return;if(!$._ended)$.emit("end"),$.emit("close"),$._ended=!0}});var qc=E((ne1,oM0)=>{oM0.exports=GU;var Zc=IU(),eO1=VZ(),$w1=X1(),Yw1=o8();$w1(GU,Zc);function GU($){var Y=this;if(!(Y instanceof GU))throw Error("ProxyReader must be called as constructor.");Y.props=$,Y._buffer=[],Y.ready=!1,Zc.call(Y,$)}GU.prototype._stat=function(){var $=this,Y=$.props,z=Y.follow?"stat":"lstat";Yw1[z](Y.path,function(U,Q){var J;if(U||!Q)J="File";else J=eO1(Q);Y[J]=!0,Y.type=$.type=J,$._old=Q,$._addProxy(Zc(Y,Q))})};GU.prototype._addProxy=function($){var Y=this;if(Y._proxyTarget)return Y.error("proxy already set");Y._proxyTarget=$,$._proxy=Y,["error","data","end","close","linkpath","entry","entryEnd","child","childEnd","warn","stat"].forEach(function(U){$.on(U,Y.emit.bind(Y,U))}),Y.emit("proxy",$),$.on("ready",function(){Y.ready=!0,Y.emit("ready")});var z=Y._buffer;Y._buffer.length=0,z.forEach(function(U){$[U[0]].apply($,U[1])})};GU.prototype.pause=function(){return this._proxyTarget?this._proxyTarget.pause():!1};GU.prototype.resume=function(){return this._proxyTarget?this._proxyTarget.resume():!1}});var IU=E((ce1,aM0)=>{aM0.exports=N5;var zw1=o8(),Uw1=I0("stream").Stream,Qw1=X1(),Vc=I0("path"),Lc=VZ(),VB=N5.hardLinks={},rM0=ZB();Qw1(N5,rM0);var sM0=Gc();function N5($,Y){var z=this;if(!(z instanceof N5))return new N5($,Y);if(typeof $==="string")$={path:$};var U,Q;if($.type&&typeof $.type==="function")U=$.type,Q=U;else U=Lc($),Q=N5;if(Y&&!U)U=Lc(Y),$[U]=!0,$.type=U;switch(U){case"Directory":Q=Wc();break;case"Link":case"File":Q=Xc();break;case"SymbolicLink":Q=sM0;break;case"Socket":Q=lM0();break;case null:Q=qc();break}if(!(z instanceof Q))return new Q($);if(rM0.call(z),!$.path)z.error("Must provide a path",null,!0);if(z.readable=!0,z.writable=!1,z.type=U,z.props=$,z.depth=$.depth=$.depth||0,z.parent=$.parent||null,z.root=$.root||$.parent&&$.parent.root||z,z._path=z.path=Vc.resolve($.path),process.platform==="win32"){if(z.path=z._path=z.path.replace(/\?/g,"_"),z._path.length>=260)z._swallowErrors=!0,z._path="\\\\?\\"+z.path.replace(/\//g,"\\")}if(z.basename=$.basename=Vc.basename(z.path),z.dirname=$.dirname=Vc.dirname(z.path),$.parent=$.root=null,z.size=$.size,z.filter=typeof $.filter==="function"?$.filter:null,$.sort==="alpha")$.sort=Jw1;z._stat(Y)}function Jw1($,Y){return $===Y?0:$.toLowerCase()>Y.toLowerCase()?1:$.toLowerCase()Y?1:-1}N5.prototype._stat=function($){var Y=this,z=Y.props,U=z.follow?"stat":"lstat";if($)process.nextTick(Q.bind(null,null,$));else zw1[U](Y._path,Q);function Q(J,I){if(J)return Y.error(J);if(Object.keys(I).forEach(function(q){z[q]=I[q]}),Y.size!==void 0&&z.size!==Y.size)return Y.error("incorrect size");Y.size=z.size;var K=Lc(z),G=z.hardlinks!==!1;if(G&&K!=="Directory"&&z.nlink&&z.nlink>1){var H=z.dev+":"+z.ino;if(VB[H]===Y._path||!VB[H])VB[H]=Y._path;else K=Y.type=Y.props.type="Link",Y.Link=Y.props.Link=!0,Y.linkpath=Y.props.linkpath=VB[H],Y._stat=Y._read=sM0.prototype._read}if(Y.type&&Y.type!==K)Y.error("Unexpected type: "+K);if(Y.filter){var W=Y._proxy||Y;if(!Y.filter.call(W,W,z)){if(!Y._disowned)Y.abort(),Y.emit("end"),Y.emit("close");return}}var X=["_stat","stat","ready"],Z=0;(function q(){if(Y._aborted){Y.emit("end"),Y.emit("close");return}if(Y._paused&&Y.type!=="Directory"){Y.once("resume",q);return}var V=X[Z++];if(!V)return Y._read();Y.emit(V,z),q()})()}};N5.prototype.pipe=function($){var Y=this;if(typeof $.add==="function")Y.on("entry",function(z){var U=$.add(z);if(U===!1)Y.pause()});return Uw1.prototype.pipe.apply(this,arguments)};N5.prototype.pause=function($){if(this._paused=!0,$=$||this,this.emit("pause",$),this._stream)this._stream.pause($)};N5.prototype.resume=function($){if(this._paused=!1,$=$||this,this.emit("resume",$),this._stream)this._stream.resume($);this._read()};N5.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}});var Mc=E((pe1,JN0)=>{JN0.exports=wc;wc.sync=QN0;var U4=I0("assert"),YN0=I0("path"),tM0=I0("fs"),lI=void 0;try{lI=BX()}catch($){}var zN0=parseInt("666",8),Iw1={nosort:!0,silent:!0},Fc=0,OZ=process.platform==="win32";function UN0($){var Y=["unlink","chmod","stat","lstat","rmdir","readdir"];if(Y.forEach(function(z){$[z]=$[z]||tM0[z],z=z+"Sync",$[z]=$[z]||tM0[z]}),$.maxBusyTries=$.maxBusyTries||3,$.emfileWait=$.emfileWait||1000,$.glob===!1)$.disableGlob=!0;if($.disableGlob!==!0&&lI===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");$.disableGlob=$.disableGlob||!1,$.glob=$.glob||Iw1}function wc($,Y,z){if(typeof Y==="function")z=Y,Y={};U4($,"rimraf: missing path"),U4.equal(typeof $,"string","rimraf: path should be a string"),U4.equal(typeof z,"function","rimraf: callback function required"),U4(Y,"rimraf: invalid options argument provided"),U4.equal(typeof Y,"object","rimraf: options should be object"),UN0(Y);var U=0,Q=null,J=0;if(Y.disableGlob||!lI.hasMagic($))return K(null,[$]);Y.lstat($,function(G,H){if(!G)return K(null,[$]);lI($,Y.glob,K)});function I(G){if(Q=Q||G,--J===0)z(Q)}function K(G,H){if(G)return z(G);if(J=H.length,J===0)return z();H.forEach(function(W){Oc(W,Y,function X(Z){if(Z){if((Z.code==="EBUSY"||Z.code==="ENOTEMPTY"||Z.code==="EPERM")&&U{Object.defineProperty(IN0,"__esModule",{value:!0});IN0.optsArg=void 0;var OB=I0("fs"),Hw1=($)=>{if(!$)$={mode:511};else if(typeof $==="object")$={mode:511,...$};else if(typeof $==="number")$={mode:$};else if(typeof $==="string")$={mode:parseInt($,8)};else throw TypeError("invalid options argument");let Y=$,z=$.fs||{};return $.mkdir=$.mkdir||z.mkdir||OB.mkdir,$.mkdirAsync=$.mkdirAsync?$.mkdirAsync:async(U,Q)=>{return new Promise((J,I)=>Y.mkdir(U,Q,(K,G)=>K?I(K):J(G)))},$.stat=$.stat||z.stat||OB.stat,$.statAsync=$.statAsync?$.statAsync:async(U)=>new Promise((Q,J)=>Y.stat(U,(I,K)=>I?J(I):Q(K))),$.statSync=$.statSync||z.statSync||OB.statSync,$.mkdirSync=$.mkdirSync||z.mkdirSync||OB.mkdirSync,Y};IN0.optsArg=Hw1});var NB=E((WN0)=>{Object.defineProperty(WN0,"__esModule",{value:!0});WN0.mkdirpManual=WN0.mkdirpManualSync=void 0;var GN0=I0("path"),HN0=wZ(),Ww1=($,Y,z)=>{let U=(0,GN0.dirname)($),Q={...(0,HN0.optsArg)(Y),recursive:!1};if(U===$)try{return Q.mkdirSync($,Q)}catch(J){let I=J;if(I&&I.code!=="EISDIR")throw J;return}try{return Q.mkdirSync($,Q),z||$}catch(J){let I=J;if(I&&I.code==="ENOENT")return WN0.mkdirpManualSync($,Q,WN0.mkdirpManualSync(U,Q,z));if(I&&I.code!=="EEXIST"&&I&&I.code!=="EROFS")throw J;try{if(!Q.statSync($).isDirectory())throw J}catch(K){throw J}}};WN0.mkdirpManualSync=Ww1;WN0.mkdirpManual=Object.assign(async($,Y,z)=>{let U=(0,HN0.optsArg)(Y);U.recursive=!1;let Q=(0,GN0.dirname)($);if(Q===$)return U.mkdirAsync($,U).catch((J)=>{let I=J;if(I&&I.code!=="EISDIR")throw J});return U.mkdirAsync($,U).then(()=>z||$,async(J)=>{let I=J;if(I&&I.code==="ENOENT")return WN0.mkdirpManual(Q,U).then((K)=>WN0.mkdirpManual($,U,K));if(I&&I.code!=="EEXIST"&&I.code!=="EROFS")throw J;return U.statAsync($).then((K)=>{if(K.isDirectory())return z;else throw J},()=>{throw J})})},{sync:WN0.mkdirpManualSync})});var VN0=E((ZN0)=>{Object.defineProperty(ZN0,"__esModule",{value:!0});ZN0.findMadeSync=ZN0.findMade=void 0;var XN0=I0("path"),Xw1=async($,Y,z)=>{if(z===Y)return;return $.statAsync(Y).then((U)=>U.isDirectory()?z:void 0,(U)=>{let Q=U;return Q&&Q.code==="ENOENT"?ZN0.findMade($,(0,XN0.dirname)(Y),Y):void 0})};ZN0.findMade=Xw1;var Zw1=($,Y,z)=>{if(z===Y)return;try{return $.statSync(Y).isDirectory()?z:void 0}catch(U){let Q=U;return Q&&Q.code==="ENOENT"?ZN0.findMadeSync($,(0,XN0.dirname)(Y),Y):void 0}};ZN0.findMadeSync=Zw1});var Dc=E((MN0)=>{Object.defineProperty(MN0,"__esModule",{value:!0});MN0.mkdirpNative=MN0.mkdirpNativeSync=void 0;var LN0=I0("path"),FN0=VN0(),ON0=NB(),wN0=wZ(),qw1=($,Y)=>{let z=(0,wN0.optsArg)(Y);if(z.recursive=!0,(0,LN0.dirname)($)===$)return z.mkdirSync($,z);let Q=(0,FN0.findMadeSync)(z,$);try{return z.mkdirSync($,z),Q}catch(J){let I=J;if(I&&I.code==="ENOENT")return(0,ON0.mkdirpManualSync)($,z);else throw J}};MN0.mkdirpNativeSync=qw1;MN0.mkdirpNative=Object.assign(async($,Y)=>{let z={...(0,wN0.optsArg)(Y),recursive:!0};if((0,LN0.dirname)($)===$)return await z.mkdirAsync($,z);return(0,FN0.findMade)(z,$).then((Q)=>z.mkdirAsync($,z).then((J)=>Q||J).catch((J)=>{let I=J;if(I&&I.code==="ENOENT")return(0,ON0.mkdirpManual)($,z);else throw J}))},{sync:MN0.mkdirpNativeSync})});var jN0=E((BN0)=>{Object.defineProperty(BN0,"__esModule",{value:!0});BN0.pathArg=void 0;var Vw1=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,AN0=I0("path"),Lw1=($)=>{if(/\0/.test($))throw Object.assign(TypeError("path must be a string without null bytes"),{path:$,code:"ERR_INVALID_ARG_VALUE"});if($=(0,AN0.resolve)($),Vw1==="win32"){let Y=/[*|"<>?:]/,{root:z}=(0,AN0.parse)($);if(Y.test($.substring(z.length)))throw Object.assign(Error("Illegal characters in path."),{path:$,code:"EINVAL"})}return $};BN0.pathArg=Lw1});var Bc=E((RN0)=>{Object.defineProperty(RN0,"__esModule",{value:!0});RN0.useNative=RN0.useNativeSync=void 0;var TN0=I0("fs"),EN0=wZ(),Fw1=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,Ac=Fw1.replace(/^v/,"").split("."),CN0=+Ac[0]>10||+Ac[0]===10&&+Ac[1]>=12;RN0.useNativeSync=!CN0?()=>!1:($)=>(0,EN0.optsArg)($).mkdirSync===TN0.mkdirSync;RN0.useNative=Object.assign(!CN0?()=>!1:($)=>(0,EN0.optsArg)($).mkdir===TN0.mkdir,{sync:RN0.useNativeSync})});var Pc=E((k2)=>{Object.defineProperty(k2,"__esModule",{value:!0});k2.mkdirp=k2.nativeSync=k2.native=k2.manualSync=k2.manual=k2.sync=k2.mkdirpSync=k2.useNativeSync=k2.useNative=k2.mkdirpNativeSync=k2.mkdirpNative=k2.mkdirpManualSync=k2.mkdirpManual=void 0;var g2=NB(),y2=Dc(),hN0=wZ(),SN0=jN0(),DB=Bc(),gN0=NB();Object.defineProperty(k2,"mkdirpManual",{enumerable:!0,get:function(){return gN0.mkdirpManual}});Object.defineProperty(k2,"mkdirpManualSync",{enumerable:!0,get:function(){return gN0.mkdirpManualSync}});var yN0=Dc();Object.defineProperty(k2,"mkdirpNative",{enumerable:!0,get:function(){return yN0.mkdirpNative}});Object.defineProperty(k2,"mkdirpNativeSync",{enumerable:!0,get:function(){return yN0.mkdirpNativeSync}});var kN0=Bc();Object.defineProperty(k2,"useNative",{enumerable:!0,get:function(){return kN0.useNative}});Object.defineProperty(k2,"useNativeSync",{enumerable:!0,get:function(){return kN0.useNativeSync}});var Ow1=($,Y)=>{$=(0,SN0.pathArg)($);let z=(0,hN0.optsArg)(Y);return(0,DB.useNativeSync)(z)?(0,y2.mkdirpNativeSync)($,z):(0,g2.mkdirpManualSync)($,z)};k2.mkdirpSync=Ow1;k2.sync=k2.mkdirpSync;k2.manual=g2.mkdirpManual;k2.manualSync=g2.mkdirpManualSync;k2.native=y2.mkdirpNative;k2.nativeSync=y2.mkdirpNativeSync;k2.mkdirp=Object.assign(async($,Y)=>{$=(0,SN0.pathArg)($);let z=(0,hN0.optsArg)(Y);return(0,DB.useNative)(z)?(0,y2.mkdirpNative)($,z):(0,g2.mkdirpManual)($,z)},{mkdirpSync:k2.mkdirpSync,mkdirpNative:y2.mkdirpNative,mkdirpNativeSync:y2.mkdirpNativeSync,mkdirpManual:g2.mkdirpManual,mkdirpManualSync:g2.mkdirpManualSync,sync:k2.mkdirpSync,native:y2.mkdirpNative,nativeSync:y2.mkdirpNativeSync,manual:g2.mkdirpManual,manualSync:g2.mkdirpManualSync,useNative:DB.useNative,useNativeSync:DB.useNativeSync})});var BB=E((Q04,fN0)=>{fN0.exports=jc;function jc($){if($._collected)return;if($._paused)return $.on("resume",jc.bind(null,$));$._collected=!0,$.pause(),$.on("data",z),$.on("end",z);var Y=[];function z(I){if(typeof I==="string")I=new Buffer(I);if(Buffer.isBuffer(I)&&!I.length)return;Y.push(I)}$.on("entry",Q);var U=[];function Q(I){jc(I),U.push(I)}$.on("proxy",J);function J(I){I.pause()}$.pipe=function(I){return function(K){var G=0;(function W(){var X=U[G++];if(!X)return H();if(X.on("end",W),K)K.add(X);else $.emit("entry",X)})();function H(){if($.removeListener("entry",Q),$.removeListener("data",z),$.removeListener("end",z),$.pipe=I,K)$.pipe(K);Y.forEach(function(W){if(W)$.emit("data",W);else $.emit("end")}),$.resume()}return K}}($.pipe)}});var Tc=E((J04,bN0)=>{bN0.exports=x2;var PB=oI(),Bw1=X1(),Pw1=Pc(),uN0=I0("path"),jw1=BB();Bw1(x2,PB);function x2($){var Y=this;if(!(Y instanceof x2))Y.error("DirWriter must be called as constructor.",null,!0);if($.type!=="Directory"||!$.Directory)Y.error("Non-directory type "+$.type+" "+JSON.stringify($),null,!0);PB.call(this,$)}x2.prototype._create=function(){var $=this;Pw1($._path,PB.dirmode,function(Y){if(Y)return $.error(Y);$.ready=!0,$.emit("ready"),$._process()})};x2.prototype.write=function(){return!0};x2.prototype.end=function(){this._ended=!0,this._process()};x2.prototype.add=function($){var Y=this;if(jw1($),!Y.ready||Y._currentEntry)return Y._buffer.push($),!1;if(Y._ended)return Y.error("add after end");return Y._buffer.push($),Y._process(),this._buffer.length===0};x2.prototype._process=function(){var $=this;if($._processing)return;var Y=$._buffer.shift();if(!Y){if($.emit("drain"),$._ended)$._finish();return}$._processing=!0,$.emit("entry",Y);var z=Y,U;do{if(U=z._path||z.path,U===$.root._path||U===$._path||U&&U.indexOf($._path)===0){if($._processing=!1,Y._collected)Y.pipe();return $._process()}z=z.parent}while(z);var Q={parent:$,root:$.root||$,type:Y.type,depth:$.depth+1};if(U=Y._path||Y.path||Y.props.path,Y.parent)U=U.substr(Y.parent._path.length+1);Q.path=uN0.join($.path,uN0.join("/",U)),Q.filter=$.filter,Object.keys(Y.props).forEach(function(G){if(!Q.hasOwnProperty(G))Q[G]=Y.props[G]});var J=$._currentChild=new PB(Q);J.on("ready",function(){Y.pipe(J),Y.resume()}),J.on("error",function(G){if(J._swallowErrors)$.warn(G),J.emit("end"),J.emit("close");else $.emit("error",G)}),J.on("close",K);var I=!1;function K(){if(I)return;I=!0,$._currentChild=null,$._processing=!1,$._process()}}});var Ec=E((I04,dN0)=>{dN0.exports=MZ;var nN0=o8(),cN0=oI(),Tw1=X1(),Ew1=I0("path"),Cw1=Mc();Tw1(MZ,cN0);function MZ($){var Y=this;if(!(Y instanceof MZ))throw Error("LinkWriter must be called as constructor.");if(!($.type==="Link"&&$.Link||$.type==="SymbolicLink"&&$.SymbolicLink))throw Error("Non-link type "+$.type);if($.linkpath==="")$.linkpath=".";if(!$.linkpath)Y.error("Need linkpath property to create "+$.type);cN0.call(this,$)}MZ.prototype._create=function(){var $=this,Y=$.type==="Link"||process.platform==="win32",z=Y?"link":"symlink",U=Y?Ew1.resolve($.dirname,$.linkpath):$.linkpath;if(Y)return iN0($,U,z);nN0.readlink($._path,function(Q,J){if(J&&J===U)return pN0($);iN0($,U,z)})};function iN0($,Y,z){Cw1($._path,function(U){if(U)return $.error(U);Rw1($,Y,z)})}function Rw1($,Y,z){nN0[z](Y,$._path,function(U){if(U)if((U.code==="ENOENT"||U.code==="EACCES"||U.code==="EPERM")&&process.platform==="win32")$.ready=!0,$.emit("ready"),$.emit("end"),$.emit("close"),$.end=$._finish=function(){};else return $.error(U);pN0($)})}function pN0($){if($.ready=!0,$.emit("ready"),$._ended&&!$._finished)$._finish()}MZ.prototype.end=function(){if(this._ended=!0,this.ready)this._finished=!0,this._finish()}});var Cc=E((K04,lN0)=>{lN0.exports=HU;var _w1=o8(),jB=oI(),vw1=X1(),mN0={};vw1(HU,jB);function HU($){var Y=this;if(!(Y instanceof HU))throw Error("FileWriter must be called as constructor.");if($.type!=="File"||!$.File)throw Error("Non-file type "+$.type);Y._buffer=[],Y._bytesWritten=0,jB.call(this,$)}HU.prototype._create=function(){var $=this;if($._stream)return;var Y={};if($.props.flags)Y.flags=$.props.flags;if(Y.mode=jB.filemode,$._old&&$._old.blksize)Y.bufferSize=$._old.blksize;$._stream=_w1.createWriteStream($._path,Y),$._stream.on("open",function(){$.ready=!0,$._buffer.forEach(function(z){if(z===mN0)$._stream.end();else $._stream.write(z)}),$.emit("ready"),$.emit("drain")}),$._stream.on("error",function(z){$.emit("error",z)}),$._stream.on("drain",function(){$.emit("drain")}),$._stream.on("close",function(){$._finish()})};HU.prototype.write=function($){var Y=this;if(Y._bytesWritten+=$.length,!Y.ready){if(!Buffer.isBuffer($)&&typeof $!=="string")throw Error("invalid write data");return Y._buffer.push($),!1}var z=Y._stream.write($);if(z===!1&&Y._stream._queue)return Y._stream._queue.length<=2;else return z};HU.prototype.end=function($){var Y=this;if($)Y.write($);if(!Y.ready)return Y._buffer.push(mN0),!1;return Y._stream.end()};HU.prototype._finish=function(){var $=this;if(typeof $.size==="number"&&$._bytesWritten!==$.size)$.error(`Did not get expected byte count. expect: `+$.size+` actual: `+$._bytesWritten);jB.prototype._finish.call($)}});var _c=E((G04,oN0)=>{oN0.exports=f2;var Rc=oI(),hw1=VZ(),Sw1=X1(),gw1=BB(),yw1=I0("fs");Sw1(f2,Rc);function f2($){var Y=this;if(!(Y instanceof f2))throw Error("ProxyWriter must be called as constructor.");Y.props=$,Y._needDrain=!1,Rc.call(Y,$)}f2.prototype._stat=function(){var $=this,Y=$.props,z=Y.follow?"stat":"lstat";yw1[z](Y.path,function(U,Q){var J;if(U||!Q)J="File";else J=hw1(Q);Y[J]=!0,Y.type=$.type=J,$._old=Q,$._addProxy(Rc(Y,Q))})};f2.prototype._addProxy=function($){var Y=this;if(Y._proxy)return Y.error("proxy already set");Y._proxy=$,["ready","error","close","pipe","drain","warn"].forEach(function(U){$.on(U,Y.emit.bind(Y,U))}),Y.emit("proxy",$);var z=Y._buffer;if(z.forEach(function(U){$[U[0]].apply($,U[1])}),Y._buffer.length=0,Y._needsDrain)Y.emit("drain")};f2.prototype.add=function($){if(gw1($),!this._proxy)return this._buffer.push(["add",[$]]),this._needDrain=!0,!1;return this._proxy.add($)};f2.prototype.write=function($){if(!this._proxy)return this._buffer.push(["write",[$]]),this._needDrain=!0,!1;return this._proxy.write($)};f2.prototype.end=function($){if(!this._proxy)return this._buffer.push(["end",[$]]),!1;return this._proxy.end($)}});var oI=E((H04,UD0)=>{UD0.exports=u$;var f$=o8(),kw1=X1(),xw1=Mc(),fw1=Pc(),NZ=I0("path"),sN0=process.platform==="win32"?0:process.umask(),aN0=VZ(),tN0=ZB();kw1(u$,tN0);u$.dirmode=parseInt("0777",8)&~sN0;u$.filemode=parseInt("0666",8)&~sN0;var uw1=Tc(),bw1=Ec(),iw1=Cc(),nw1=_c();function u$($,Y){var z=this;if(typeof $==="string")$={path:$};var U=aN0($),Q=u$;switch(U){case"Directory":Q=uw1;break;case"File":Q=iw1;break;case"Link":case"SymbolicLink":Q=bw1;break;case null:default:Q=nw1;break}if(!(z instanceof Q))return new Q($);if(tN0.call(z),!$.path)z.error("Must provide a path",null,!0);if(z.type=$.type,z.props=$,z.depth=$.depth||0,z.clobber=$.clobber===!1?$.clobber:!0,z.parent=$.parent||null,z.root=$.root||$.parent&&$.parent.root||z,z._path=z.path=NZ.resolve($.path),process.platform==="win32"){if(z.path=z._path=z.path.replace(/\?/g,"_"),z._path.length>=260)z._swallowErrors=!0,z._path="\\\\?\\"+z.path.replace(/\//g,"\\")}if(z.basename=NZ.basename($.path),z.dirname=NZ.dirname($.path),z.linkpath=$.linkpath||null,$.parent=$.root=null,z.size=$.size,typeof $.mode==="string")$.mode=parseInt($.mode,8);z.readable=!1,z.writable=!0,z._buffer=[],z.ready=!1,z.filter=typeof $.filter==="function"?$.filter:null,z._stat(Y)}u$.prototype._create=function(){var $=this;f$[$.props.follow?"stat":"lstat"]($._path,function(Y){if(Y)return $.warn("Cannot create "+$._path+` -Unsupported type: `+$.type,"ENOTSUP");$._finish()})};u$.prototype._stat=function($){var Y=this,z=Y.props,U=z.follow?"stat":"lstat",Q=Y._proxy||Y;if($)J(null,$);else f$[U](Y._path,J);function J(I,K){if(Y.filter&&!Y.filter.call(Q,Q,K)){Y._aborted=!0,Y.emit("end"),Y.emit("close");return}if(I||!K)return vc(Y);Y._old=K;var G=aN0(K);if(G!==Y.type||Y.type==="File"&&K.nlink>1)return xw1(Y._path,function(H){if(H)return Y.error(H);Y._old=null,vc(Y)});vc(Y)}};function vc($){fw1(NZ.dirname($._path),u$.dirmode,function(Y,z){if(Y)return $.error(Y);return $._madeDir=z,$._create()})}function eN0($,Y,z,U,Q){var J=Y.mode,I=Y.follow||$.type!=="SymbolicLink"?"chmod":"lchmod";if(!f$[I])return Q();if(typeof J!=="number")return Q();var K=z.mode&parseInt("0777",8);if(J=J&parseInt("0777",8),J===K)return Q();f$[I](U,J,Q)}function $D0($,Y,z,U,Q){if(process.platform==="win32")return Q();if(!process.getuid||process.getuid()!==0)return Q();if(typeof Y.uid!=="number"&&typeof Y.gid!=="number")return Q();if(z.uid===Y.uid&&z.gid===Y.gid)return Q();var J=$.props.follow||$.type!=="SymbolicLink"?"chown":"lchown";if(!f$[J])return Q();if(typeof Y.uid!=="number")Y.uid=z.uid;if(typeof Y.gid!=="number")Y.gid=z.gid;f$[J](U,Y.uid,Y.gid,Q)}function YD0($,Y,z,U,Q){if(!f$.utimes||process.platform==="win32")return Q();var J=Y.follow||$.type!=="SymbolicLink"?"utimes":"lutimes";if(J==="lutimes"&&!f$[J])J="utimes";if(!f$[J])return Q();var{atime:I,mtime:K}=z,G=Y.atime,H=Y.mtime;if(G===void 0)G=I;if(H===void 0)H=K;if(!rN0(G))G=new Date(G);if(!rN0(H))G=new Date(H);if(G.getTime()===I.getTime()&&H.getTime()===K.getTime())return Q();f$[J](U,G,H,Q)}u$.prototype._finish=function(){var $=this;if($._finishing)return;$._finishing=!0;var Y=0,z=null,U=!1;if($._old)$._old.atime=new Date(0),$._old.mtime=new Date(0),J($._old);else{var Q=$.props.follow?"stat":"lstat";f$[Q]($._path,function(K,G){if(K)if(K.code==="ENOENT"&&($.type==="Link"||$.type==="SymbolicLink")&&process.platform==="win32"){$.ready=!0,$.emit("ready"),$.emit("end"),$.emit("close"),$.end=$._finish=function(){};return}else return $.error(K);J($._old=G)})}return;function J(K){Y+=3,eN0($,$.props,K,$._path,I("chmod")),$D0($,$.props,K,$._path,I("chown")),YD0($,$.props,K,$._path,I("utimes"))}function I(K){return function(G){if(z)return;if(G)return G.fstream_finish_call=K,$.error(z=G);if(--Y>0)return;if(U)return;if(U=!0,!$._madeDir)return H();else zD0($,$._path,H);function H(W){if(W)return W.fstream_finish_call="setupMadeDir",$.error(W);$.emit("end"),$.emit("close")}}}};function zD0($,Y,z){var U=$._madeDir,Q=NZ.dirname(Y);cw1($,Q,function(J){if(J)return z(J);if(Q===U)return z();zD0($,Q,z)})}function cw1($,Y,z){var U={};Object.keys($.props).forEach(function(K){if(U[K]=$.props[K],K==="mode"&&$.type!=="Directory")U[K]=U[K]|parseInt("0111",8)});var Q=3,J=null;f$.stat(Y,function(K,G){if(K)return z(J=K);eN0($,U,G,Y,I),$D0($,U,G,Y,I),YD0($,U,G,Y,I)});function I(K){if(J)return;if(K)return z(J=K);if(--Q===0)return z()}}u$.prototype.pipe=function(){this.error("Can't pipe from writable stream")};u$.prototype.add=function(){this.error("Can't add to non-Directory type")};u$.prototype.write=function(){return!0};function pw1($){return Object.prototype.toString.call($)}function rN0($){return typeof $==="object"&&pw1($)==="[object Date]"}});var kc=E((dw1)=>{dw1.Abstract=ZB();dw1.Reader=IU();dw1.Writer=oI();dw1.File={Reader:Xc(),Writer:Cc()};dw1.Dir={Reader:Wc(),Writer:Tc()};dw1.Link={Reader:Gc(),Writer:Ec()};dw1.Proxy={Reader:qc(),Writer:_c()};dw1.Reader.Dir=dw1.DirReader=dw1.Dir.Reader;dw1.Reader.File=dw1.FileReader=dw1.File.Reader;dw1.Reader.Link=dw1.LinkReader=dw1.Link.Reader;dw1.Reader.Proxy=dw1.ProxyReader=dw1.Proxy.Reader;dw1.Writer.Dir=dw1.DirWriter=dw1.Dir.Writer;dw1.Writer.File=dw1.FileWriter=dw1.File.Writer;dw1.Writer.Link=dw1.LinkWriter=dw1.Link.Writer;dw1.Writer.Proxy=dw1.ProxyWriter=dw1.Proxy.Writer;dw1.collect=BB()});var JD0=E((M04,QD0)=>{QD0.exports=ew1;var ow1=UB(),rw1=kc().Writer,xc=I0("path"),sw1=I0("stream"),aw1=Jc(),tw1=v2();function ew1($){$.path=xc.resolve(xc.normalize($.path));var Y=new ow1($),z=new sw1.Writable({objectMode:!0});z._write=function(Q,J,I){if(Q.type=="Directory")return I();var K=xc.join($.path,Q.path);if(K.indexOf($.path)!=0)return I();let G=$.getWriter?$.getWriter({path:K}):rw1({path:K});Q.pipe(G).on("error",I).on("close",I)};var U=aw1(Y,z);return Y.once("crx-header",function(Q){U.crxHeader=Q}),Y.pipe(z).on("finish",function(){U.emit("close")}),U.promise=function(){return new tw1(function(Q,J){U.on("close",Q),U.on("error",J)})},U}});var ID0=E((N04,TB)=>{var E6=function($){var Y=1e7,z=7,U=9007199254740992,Q=Z(U),J="0123456789abcdefghijklmnopqrstuvwxyz",I=typeof BigInt==="function";function K(B,v,u,s){if(typeof B>"u")return K[0];if(typeof v<"u")return+v===10&&!u?A0(B):b0(B,v,u,s);return A0(B)}function G(B,v){this.value=B,this.sign=v,this.isSmall=!1}G.prototype=Object.create(K.prototype);function H(B){this.value=B,this.sign=B<0,this.isSmall=!0}H.prototype=Object.create(K.prototype);function W(B){this.value=B}W.prototype=Object.create(K.prototype);function X(B){return-U0)return Math.floor(B);return Math.ceil(B)}function O(B,v){var u=B.length,s=v.length,X0=Array(u),J0=0,q0=Y,w0,B0;for(B0=0;B0=q0?1:0,X0[B0]=w0-J0*q0;while(B00)X0.push(J0);return X0}function N(B,v){if(B.length>=v.length)return O(B,v);return O(v,B)}function M(B,v){var u=B.length,s=Array(u),X0=Y,J0,q0;for(q0=0;q00)s[q0++]=v%X0,v=Math.floor(v/X0);return s}G.prototype.add=function(B){var v=A0(B);if(this.sign!==v.sign)return this.subtract(v.negate());var u=this.value,s=v.value;if(v.isSmall)return new G(M(u,Math.abs(s)),this.sign);return new G(N(u,s),this.sign)},G.prototype.plus=G.prototype.add,H.prototype.add=function(B){var v=A0(B),u=this.value;if(u<0!==v.sign)return this.subtract(v.negate());var s=v.value;if(v.isSmall){if(X(u+s))return new H(u+s);s=Z(Math.abs(s))}return new G(M(s,Math.abs(u)),u<0)},H.prototype.plus=H.prototype.add,W.prototype.add=function(B){return new W(this.value+A0(B).value)},W.prototype.plus=W.prototype.add;function D(B,v){var u=B.length,s=v.length,X0=Array(u),J0=0,q0=Y,w0,B0;for(w0=0;w0=0)s=D(B,v);else s=D(v,B),u=!u;if(s=q(s),typeof s==="number"){if(u)s=-s;return new H(s)}return new G(s,u)}function j(B,v,u){var s=B.length,X0=Array(s),J0=-v,q0=Y,w0,B0;for(w0=0;w0=0)},H.prototype.minus=H.prototype.subtract,W.prototype.subtract=function(B){return new W(this.value-A0(B).value)},W.prototype.minus=W.prototype.subtract,G.prototype.negate=function(){return new G(this.value,!this.sign)},H.prototype.negate=function(){var B=this.sign,v=new H(-this.value);return v.sign=!B,v},W.prototype.negate=function(){return new W(-this.value)},G.prototype.abs=function(){return new G(this.value,!1)},H.prototype.abs=function(){return new H(Math.abs(this.value))},W.prototype.abs=function(){return new W(this.value>=0?this.value:-this.value)};function A(B,v){var u=B.length,s=v.length,X0=u+s,J0=F(X0),q0=Y,w0,B0,r0,I1,U1;for(r0=0;r00)s[w0++]=J0%X0,J0=Math.floor(J0/X0);return s}function C(B,v){var u=[];while(v-- >0)u.push(0);return u.concat(B)}function b(B,v){var u=Math.max(B.length,v.length);if(u<=30)return A(B,v);u=Math.ceil(u/2);var s=B.slice(u),X0=B.slice(0,u),J0=v.slice(u),q0=v.slice(0,u),w0=b(X0,q0),B0=b(s,J0),r0=b(N(X0,s),N(q0,J0)),I1=N(N(w0,C(D(D(r0,w0),B0),u)),C(B0,2*u));return V(I1),I1}function k(B,v){return-0.012*B-0.012*v+0.000015*B*v>0}G.prototype.multiply=function(B){var v=A0(B),u=this.value,s=v.value,X0=this.sign!==v.sign,J0;if(v.isSmall){if(s===0)return K[0];if(s===1)return this;if(s===-1)return this.negate();if(J0=Math.abs(s),J0=0;U1--){if(I1=X0-1,B0[U1+s]!==q0)I1=Math.floor((B0[U1+s]*X0+B0[U1+s-1])/q0);A1=0,S1=0,N8=r0.length;for(u4=0;u4s)r0=(r0+1)*q0;w0=Math.ceil(r0/I1);do{if(U1=T(v,w0),t(U1,J0)<=0)break;w0--}while(w0);X0.push(w0),J0=D(J0,U1)}return X0.reverse(),[q(X0),q(J0)]}function x(B,v){var u=B.length,s=F(u),X0=Y,J0,q0,w0,B0;w0=0;for(J0=u-1;J0>=0;--J0)B0=w0*X0+B[J0],q0=w(B0/v),w0=B0-q0*v,s[J0]=q0|0;return[s,w0|0]}function d(B,v){var u,s=A0(v);if(I)return[new W(B.value/s.value),new W(B.value%s.value)];var X0=B.value,J0=s.value,q0;if(J0===0)throw Error("Cannot divide by zero");if(B.isSmall){if(s.isSmall)return[new H(w(X0/J0)),new H(X0%J0)];return[K[0],B]}if(s.isSmall){if(J0===1)return[B,K[0]];if(J0==-1)return[B.negate(),K[0]];var w0=Math.abs(J0);if(w0v.length?1:-1;for(var u=B.length-1;u>=0;u--)if(B[u]!==v[u])return B[u]>v[u]?1:-1;return 0}G.prototype.compareAbs=function(B){var v=A0(B),u=this.value,s=v.value;if(v.isSmall)return 1;return t(u,s)},H.prototype.compareAbs=function(B){var v=A0(B),u=Math.abs(this.value),s=v.value;if(v.isSmall)return s=Math.abs(s),u===s?0:u>s?1:-1;return-1},W.prototype.compareAbs=function(B){var v=this.value,u=A0(B).value;return v=v>=0?v:-v,u=u>=0?u:-u,v===u?0:v>u?1:-1},G.prototype.compare=function(B){if(B===1/0)return-1;if(B===-1/0)return 1;var v=A0(B),u=this.value,s=v.value;if(this.sign!==v.sign)return v.sign?1:-1;if(v.isSmall)return this.sign?-1:1;return t(u,s)*(this.sign?-1:1)},G.prototype.compareTo=G.prototype.compare,H.prototype.compare=function(B){if(B===1/0)return-1;if(B===-1/0)return 1;var v=A0(B),u=this.value,s=v.value;if(v.isSmall)return u==s?0:u>s?1:-1;if(u<0!==v.sign)return u<0?-1:1;return u<0?1:-1},H.prototype.compareTo=H.prototype.compare,W.prototype.compare=function(B){if(B===1/0)return-1;if(B===-1/0)return 1;var v=this.value,u=A0(B).value;return v===u?0:v>u?1:-1},W.prototype.compareTo=W.prototype.compare,G.prototype.equals=function(B){return this.compare(B)===0},W.prototype.eq=W.prototype.equals=H.prototype.eq=H.prototype.equals=G.prototype.eq=G.prototype.equals,G.prototype.notEquals=function(B){return this.compare(B)!==0},W.prototype.neq=W.prototype.notEquals=H.prototype.neq=H.prototype.notEquals=G.prototype.neq=G.prototype.notEquals,G.prototype.greater=function(B){return this.compare(B)>0},W.prototype.gt=W.prototype.greater=H.prototype.gt=H.prototype.greater=G.prototype.gt=G.prototype.greater,G.prototype.lesser=function(B){return this.compare(B)<0},W.prototype.lt=W.prototype.lesser=H.prototype.lt=H.prototype.lesser=G.prototype.lt=G.prototype.lesser,G.prototype.greaterOrEquals=function(B){return this.compare(B)>=0},W.prototype.geq=W.prototype.greaterOrEquals=H.prototype.geq=H.prototype.greaterOrEquals=G.prototype.geq=G.prototype.greaterOrEquals,G.prototype.lesserOrEquals=function(B){return this.compare(B)<=0},W.prototype.leq=W.prototype.lesserOrEquals=H.prototype.leq=H.prototype.lesserOrEquals=G.prototype.leq=G.prototype.lesserOrEquals,G.prototype.isEven=function(){return(this.value[0]&1)===0},H.prototype.isEven=function(){return(this.value&1)===0},W.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},G.prototype.isOdd=function(){return(this.value[0]&1)===1},H.prototype.isOdd=function(){return(this.value&1)===1},W.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},G.prototype.isPositive=function(){return!this.sign},H.prototype.isPositive=function(){return this.value>0},W.prototype.isPositive=H.prototype.isPositive,G.prototype.isNegative=function(){return this.sign},H.prototype.isNegative=function(){return this.value<0},W.prototype.isNegative=H.prototype.isNegative,G.prototype.isUnit=function(){return!1},H.prototype.isUnit=function(){return Math.abs(this.value)===1},W.prototype.isUnit=function(){return this.abs().value===BigInt(1)},G.prototype.isZero=function(){return!1},H.prototype.isZero=function(){return this.value===0},W.prototype.isZero=function(){return this.value===BigInt(0)},G.prototype.isDivisibleBy=function(B){var v=A0(B);if(v.isZero())return!1;if(v.isUnit())return!0;if(v.compareAbs(2)===0)return this.isEven();return this.mod(v).isZero()},W.prototype.isDivisibleBy=H.prototype.isDivisibleBy=G.prototype.isDivisibleBy;function e(B){var v=B.abs();if(v.isUnit())return!1;if(v.equals(2)||v.equals(3)||v.equals(5))return!0;if(v.isEven()||v.isDivisibleBy(3)||v.isDivisibleBy(5))return!1;if(v.lesser(49))return!0}function y(B,v){var u=B.prev(),s=u,X0=0,J0,q0,w0,B0;while(s.isEven())s=s.divide(2),X0++;$:for(w0=0;w0-U)return new H(B-1);return new G(Q,!0)},W.prototype.prev=function(){return new W(this.value-BigInt(1))};var p=[1];while(2*p[p.length-1]<=Y)p.push(2*p[p.length-1]);var Y0=p.length,g=p[Y0-1];function a(B){return Math.abs(B)<=Y}G.prototype.shiftLeft=function(B){var v=A0(B).toJSNumber();if(!a(v))throw Error(String(v)+" is too large for shifting.");if(v<0)return this.shiftRight(-v);var u=this;if(u.isZero())return u;while(v>=Y0)u=u.multiply(g),v-=Y0-1;return u.multiply(p[v])},W.prototype.shiftLeft=H.prototype.shiftLeft=G.prototype.shiftLeft,G.prototype.shiftRight=function(B){var v,u=A0(B).toJSNumber();if(!a(u))throw Error(String(u)+" is too large for shifting.");if(u<0)return this.shiftLeft(-u);var s=this;while(u>=Y0){if(s.isZero()||s.isNegative()&&s.isUnit())return s;v=d(s,g),s=v[1].isNegative()?v[0].prev():v[0],u-=Y0-1}return v=d(s,p[u]),v[1].isNegative()?v[0].prev():v[0]},W.prototype.shiftRight=H.prototype.shiftRight=G.prototype.shiftRight;function $0(B,v,u){v=A0(v);var s=B.isNegative(),X0=v.isNegative(),J0=s?B.not():B,q0=X0?v.not():v,w0=0,B0=0,r0=null,I1=null,U1=[];while(!J0.isZero()||!q0.isZero()){if(r0=d(J0,g),w0=r0[1].toJSNumber(),s)w0=g-1-w0;if(I1=d(q0,g),B0=I1[1].toJSNumber(),X0)B0=g-1-B0;J0=r0[0],q0=I1[0],U1.push(u(w0,B0))}var A1=u(s?1:0,X0?1:0)!==0?E6(-1):E6(0);for(var S1=U1.length-1;S1>=0;S1-=1)A1=A1.multiply(g).add(E6(U1[S1]));return A1}G.prototype.not=function(){return this.negate().prev()},W.prototype.not=H.prototype.not=G.prototype.not,G.prototype.and=function(B){return $0(this,B,function(v,u){return v&u})},W.prototype.and=H.prototype.and=G.prototype.and,G.prototype.or=function(B){return $0(this,B,function(v,u){return v|u})},W.prototype.or=H.prototype.or=G.prototype.or,G.prototype.xor=function(B){return $0(this,B,function(v,u){return v^u})},W.prototype.xor=H.prototype.xor=G.prototype.xor;var N0=1073741824,T0=(Y&-Y)*(Y&-Y)|N0;function v0(B){var v=B.value,u=typeof v==="number"?v|N0:typeof v==="bigint"?v|BigInt(N0):v[0]+v[1]*Y|T0;return u&-u}function G0(B,v){if(v.compareTo(B)<=0){var u=G0(B,v.square(v)),s=u.p,X0=u.e,J0=s.multiply(v);return J0.compareTo(B)<=0?{p:J0,e:X0*2+1}:{p:s,e:X0*2}}return{p:E6(1),e:0}}G.prototype.bitLength=function(){var B=this;if(B.compareTo(E6(0))<0)B=B.negate().subtract(E6(1));if(B.compareTo(E6(0))===0)return E6(0);return E6(G0(B,E6(2)).e).add(E6(1))},W.prototype.bitLength=H.prototype.bitLength=G.prototype.bitLength;function f0(B,v){return B=A0(B),v=A0(v),B.greater(v)?B:v}function e0(B,v){return B=A0(B),v=A0(v),B.lesser(v)?B:v}function r(B,v){if(B=A0(B).abs(),v=A0(v).abs(),B.equals(v))return B;if(B.isZero())return v;if(v.isZero())return B;var u=K[1],s,X0;while(B.isEven()&&v.isEven())s=e0(v0(B),v0(v)),B=B.divide(s),v=v.divide(s),u=u.multiply(s);while(B.isEven())B=B.divide(v0(B));do{while(v.isEven())v=v.divide(v0(v));if(B.greater(v))X0=v,v=B,B=X0;v=v.subtract(B)}while(!v.isZero());return u.isUnit()?B:B.multiply(u)}function H0(B,v){return B=A0(B).abs(),v=A0(v).abs(),B.divide(r(B,v)).multiply(v)}function F0(B,v,u){B=A0(B),v=A0(v);var s=u||Math.random,X0=e0(B,v),J0=f0(B,v),q0=J0.subtract(X0).add(1);if(q0.isSmall)return X0.add(Math.floor(s()*q0));var w0=w1(q0,Y).value,B0=[],r0=!0;for(var I1=0;I1=q0){if(B0==="1"&&q0===1)continue;throw Error(B0+" is not a valid digit in base "+v+".")}}}v=A0(v);var r0=[],I1=B[0]==="-";for(J0=I1?1:0;J0"&&J0=0;J0--)s=s.add(B[J0].times(X0)),X0=X0.times(v);return u?s.negate():s}function n0(B,v){if(v=v||J,B"}function w1(B,v){if(v=E6(v),v.isZero()){if(B.isZero())return{value:[0],isNegative:!1};throw Error("Cannot convert nonzero numbers to base 0.")}if(v.equals(-1)){if(B.isZero())return{value:[0],isNegative:!1};if(B.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-B.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var u=Array.apply(null,Array(B.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return u.unshift([1]),{value:[].concat.apply([],u),isNegative:!1}}var s=!1;if(B.isNegative()&&v.isPositive())s=!0,B=B.abs();if(v.isUnit()){if(B.isZero())return{value:[0],isNegative:!1};return{value:Array.apply(null,Array(B.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:s}}var X0=[],J0=B,q0;while(J0.isNegative()||J0.compareAbs(v)>=0){q0=J0.divmod(v),J0=q0.quotient;var w0=q0.remainder;if(w0.isNegative())w0=v.minus(w0).abs(),J0=J0.next();X0.push(w0.toJSNumber())}return X0.push(J0.toJSNumber()),{value:X0.reverse(),isNegative:s}}function k1(B,v,u){var s=w1(B,v);return(s.isNegative?"-":"")+s.value.map(function(X0){return n0(X0,u)}).join("")}G.prototype.toArray=function(B){return w1(this,B)},H.prototype.toArray=function(B){return w1(this,B)},W.prototype.toArray=function(B){return w1(this,B)},G.prototype.toString=function(B,v){if(B===$)B=10;if(B!==10||v)return k1(this,B,v);var u=this.value,s=u.length,X0=String(u[--s]),J0="0000000",q0;while(--s>=0)q0=String(u[s]),X0+=J0.slice(q0.length)+q0;var w0=this.sign?"-":"";return w0+X0},H.prototype.toString=function(B,v){if(B===$)B=10;if(B!=10||v)return k1(this,B,v);return String(this.value)},W.prototype.toString=H.prototype.toString,W.prototype.toJSON=G.prototype.toJSON=H.prototype.toJSON=function(){return this.toString()},G.prototype.valueOf=function(){return parseInt(this.toString(),10)},G.prototype.toJSNumber=G.prototype.valueOf,H.prototype.valueOf=function(){return this.value},H.prototype.toJSNumber=H.prototype.valueOf,W.prototype.valueOf=W.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function u1(B){if(X(+B)){var v=+B;if(v===w(v))return I?new W(BigInt(v)):new H(v);throw Error("Invalid integer: "+B)}var u=B[0]==="-";if(u)B=B.slice(1);var s=B.split(/e/i);if(s.length>2)throw Error("Invalid integer: "+s.join("e"));if(s.length===2){var X0=s[1];if(X0[0]==="+")X0=X0.slice(1);if(X0=+X0,X0!==w(X0)||!X(X0))throw Error("Invalid integer: "+X0+" is not a valid exponent.");var J0=s[0],q0=J0.indexOf(".");if(q0>=0)X0-=J0.length-q0-1,J0=J0.slice(0,q0)+J0.slice(q0+1);if(X0<0)throw Error("Cannot include negative exponent part for integers");J0+=Array(X0+1).join("0"),B=J0}var w0=/^([0-9][0-9]*)$/.test(B);if(!w0)throw Error("Invalid integer: "+B);if(I)return new W(BigInt(u?"-"+B:B));var B0=[],r0=B.length,I1=z,U1=r0-I1;while(r0>0){if(B0.push(+B.slice(U1,r0)),U1-=I1,U1<0)U1=0;r0-=I1}return V(B0),new G(B0,u)}function b1(B){if(I)return new W(BigInt(B));if(X(B)){if(B!==w(B))throw Error(B+" is not an integer.");return new H(B)}return u1(B.toString())}function A0(B){if(typeof B==="number")return b1(B);if(typeof B==="string")return u1(B);if(typeof B==="bigint")return new W(B);return B}for(var Q0=0;Q0<1000;Q0++)if(K[Q0]=A0(Q0),Q0>0)K[-Q0]=A0(-Q0);return K.one=K[1],K.zero=K[0],K.minusOne=K[-1],K.max=f0,K.min=e0,K.gcd=r,K.lcm=H0,K.isInstance=function(B){return B instanceof G||B instanceof H||B instanceof W},K.randBetween=F0,K.fromArray=function(B,v,u){return i0(B.map(A0),A0(v||10),u)},K}();if(typeof TB<"u"&&TB.hasOwnProperty("exports"))TB.exports=E6;if(typeof define==="function"&&define.amd)define(function(){return E6})});var HD0=E((D04,GD0)=>{var u2=ID0(),EB=I0("stream");if(!EB.Writable||!EB.Writable.prototype.destroy)EB=_3();var CB;function $M1(){var $=3988292384,Y,z,U;CB=[];for(z=0;z<256;z++){Y=z;for(U=0;U<8;U++)Y=Y&1?$^Y>>>1:Y=Y>>>1;CB[z]=Y>>>0}}function KD0($,Y){if(!CB)$M1();if($.charCodeAt)$=$.charCodeAt(0);return u2(Y).shiftRight(8).and(16777215).xor(CB[u2(Y).xor($).and(255)]).value}function rI(){if(!(this instanceof rI))return new rI;this.key0=305419896,this.key1=591751049,this.key2=878082192}rI.prototype.update=function($){this.key0=KD0($,this.key0),this.key1=u2(this.key0).and(255).and(4294967295).add(this.key1),this.key1=u2(this.key1).multiply(134775813).add(1).and(4294967295).value,this.key2=KD0(u2(this.key1).shiftRight(24).and(255),this.key2)};rI.prototype.decryptByte=function($){var Y=u2(this.key2).or(2);return $=$^u2(Y).multiply(u2(Y^1)).shiftRight(8).and(255),this.update($),$};rI.prototype.stream=function(){var $=EB.Transform(),Y=this;return $._transform=function(z,U,Q){for(var J=0;J{var YM1=v2(),zM1=HD0(),UM1=tA(),BZ=I0("stream"),QM1=cX(),JM1=I0("zlib"),IM1=YB(),KM1=fI(),GM1=zB();if(!BZ.Writable||!BZ.Writable.prototype.destroy)BZ=_3();WD0.exports=function(Y,z,U,Q){var J=UM1(),I=BZ.PassThrough(),K=Y.stream(z);return K.pipe(J).on("error",function(G){I.emit("error",G)}),I.vars=J.pull(30).then(function(G){var H=QM1.parse(G).word32lu("signature").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;return H.lastModifiedDateTime=GM1(H.lastModifiedDate,H.lastModifiedTime),J.pull(H.fileNameLength).then(function(W){return H.fileName=W.toString("utf8"),J.pull(H.extraFieldLength)}).then(function(W){var X;if(H.extra=IM1(W,H),Q&&Q.compressedSize)H=Q;if(H.flags&1)X=J.pull(12).then(function(Z){if(!U)throw Error("MISSING_PASSWORD");var q=zM1();String(U).split("").forEach(function(w){q.update(w)});for(var V=0;V>8&255:H.crc32>>24&255;if(Z[11]!==F)throw Error("BAD_PASSWORD");return H});return YM1.resolve(X).then(function(){return I.emit("vars",H),H})})}),I.vars.then(function(G){var H=!(G.flags&8)||G.compressedSize>0,W,X=G.compressionMethod?JM1.createInflateRaw():BZ.PassThrough();if(H)I.size=G.uncompressedSize,W=G.compressedSize;else W=KM1.alloc(4),W.writeUInt32LE(134695760,0);var Z=J.stream(W);if(G.decrypt)Z=Z.pipe(G.decrypt.stream());Z.pipe(X).on("error",function(q){I.emit("error",q)}).pipe(I).on("finish",function(){if(K.destroy)K.destroy();else if(K.abort)K.abort();else if(K.close)K.close();else if(K.push)K.push();else console.log("warning - unable to close stream")})}).catch(function(G){I.emit("error",G)}),I}});var VD0=E((B04,qD0)=>{var TZ=cX(),jZ=tA(),HM1=XD0(),PZ=v2(),WM1=$B(),XM1=YB(),ZM1=fI(),fc=I0("path"),qM1=kc().Writer,VM1=zB(),ZD0=ZM1.alloc(4);ZD0.writeUInt32LE(101010256,0);function LM1($){var Y=$.stream(0).pipe(jZ());return Y.pull(4).then(function(z){var U=z.readUInt32LE(0);if(U===875721283){var Q;return Y.pull(12).then(function(J){Q=TZ.parse(J).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars}).then(function(){return Y.pull(Q.pubKeyLength+Q.signatureLength)}).then(function(J){return Q.publicKey=J.slice(0,Q.pubKeyLength),Q.signature=J.slice(Q.pubKeyLength),Q.size=16+Q.pubKeyLength+Q.signatureLength,Q})}})}function FM1($,Y){var z=TZ.parse(Y).word32lu("signature").word32lu("diskNumber").word64lu("offsetToStartOfCentralDirectory").word32lu("numberOfDisks").vars;if(z.signature!=117853008)throw Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+z.signature.toString(16));var U=jZ();return $.stream(z.offsetToStartOfCentralDirectory).pipe(U),U.pull(56)}function OM1($){var Y=TZ.parse($).word32lu("signature").word64lu("sizeOfCentralDirectory").word16lu("version").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskStart").word64lu("numberOfRecordsOnDisk").word64lu("numberOfRecords").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;if(Y.signature!=101075792)throw Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+Y.signature.toString(16));return Y}qD0.exports=function(Y,z){var U=jZ(),Q=jZ(),J=z&&z.tailSize||80,I,K,G,H;if(z&&z.crx)K=LM1(Y);return Y.size().then(function(W){return I=W,Y.stream(Math.max(0,W-J)).on("error",function(X){U.emit("error",X)}).pipe(U),U.pull(ZD0)}).then(function(){return PZ.props({directory:U.pull(22),crxHeader:K})}).then(function(W){var X=W.directory;if(G=W.crxHeader&&W.crxHeader.size||0,H=TZ.parse(X).word32lu("signature").word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars,H.numberOfRecords==65535||H.numberOfRecords==65535||H.offsetToStartOfCentralDirectory==4294967295){let q=I-(J-U.match+20),V=jZ();return Y.stream(q).pipe(V),V.pull(20).then(function(F){return FM1(Y,F)}).then(function(F){H=OM1(F)})}else H.offsetToStartOfCentralDirectory+=G}).then(function(){if(H.commentLength)return U.pull(H.commentLength).then(function(W){H.comment=W.toString("utf8")})}).then(function(){return Y.stream(H.offsetToStartOfCentralDirectory).pipe(Q),H.extract=function(W){if(!W||!W.path)throw Error("PATH_MISSING");return W.path=fc.resolve(fc.normalize(W.path)),H.files.then(function(X){return PZ.map(X,function(Z){if(Z.type=="Directory")return;var q=fc.join(W.path,Z.path);if(q.indexOf(W.path)!=0)return;var V=W.getWriter?W.getWriter({path:q}):qM1({path:q});return new PZ(function(F,w){Z.stream(W.password).on("error",w).pipe(V).on("close",F).on("error",w)})},{concurrency:W.concurrency>1?W.concurrency:1})})},H.files=PZ.mapSeries(Array(H.numberOfRecords),function(){return Q.pull(46).then(function(W){var X=TZ.parse(W).word32lu("signature").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return X.offsetToLocalFileHeader+=G,X.lastModifiedDateTime=VM1(X.lastModifiedDate,X.lastModifiedTime),Q.pull(X.fileNameLength).then(function(Z){return X.pathBuffer=Z,X.path=Z.toString("utf8"),X.isUnicode=(X.flags&2048)!=0,Q.pull(X.extraFieldLength)}).then(function(Z){return X.extra=XM1(Z,X),Q.pull(X.fileCommentLength)}).then(function(Z){return X.comment=Z,X.type=X.uncompressedSize===0&&/[\/\\]$/.test(X.path)?"Directory":"File",X.stream=function(q){return HM1(Y,X.offsetToLocalFileHeader,q,X)},X.buffer=function(q){return WM1(X.stream(q))},X})})}),PZ.props(H)})}});var OD0=E((P04,FD0)=>{var LD0=o8(),RB=v2(),EZ=VD0(),_B=I0("stream");if(!_B.Writable||!_B.Writable.prototype.destroy)_B=_3();FD0.exports={buffer:function($,Y){var z={stream:function(U,Q){var J=_B.PassThrough();return J.end($.slice(U,Q)),J},size:function(){return RB.resolve($.length)}};return EZ(z,Y)},file:function($,Y){var z={stream:function(U,Q){return LD0.createReadStream($,{start:U,end:Q&&U+Q})},size:function(){return new RB(function(U,Q){LD0.stat($,function(J,I){if(J)Q(J);else U(I.size)})})}};return EZ(z,Y)},url:function($,Y,z){if(typeof Y==="string")Y={url:Y};if(!Y.url)throw"URL missing";Y.headers=Y.headers||{};var U={stream:function(Q,J){var I=Object.create(Y);return I.headers=Object.create(Y.headers),I.headers.range="bytes="+Q+"-"+(J?J:""),$(I)},size:function(){return new RB(function(Q,J){var I=$(Y);I.on("response",function(K){if(I.abort(),!K.headers["content-length"])J(Error("Missing content length header"));else Q(K.headers["content-length"])}).on("error",J)})}};return EZ(U,z)},s3:function($,Y,z){var U={size:function(){return new RB(function(Q,J){$.headObject(Y,function(I,K){if(I)J(I);else Q(K.ContentLength)})})},stream:function(Q,J){var I={};for(var K in Y)I[K]=Y[K];return I.Range="bytes="+Q+"-"+(J?J:""),$.getObject(I).createReadStream()}};return EZ(U,z)},custom:function($,Y){return EZ($,Y)}}});var wD0=E((wM1)=>{qF0();OF0();sg();wM1.Parse=UB();wM1.ParseOne=SM0();wM1.Extract=JD0();wM1.Open=OD0()});var SD0=E((iM1,S3)=>{/*! +Unsupported type: `+$.type,"ENOTSUP");$._finish()})};u$.prototype._stat=function($){var Y=this,z=Y.props,U=z.follow?"stat":"lstat",Q=Y._proxy||Y;if($)J(null,$);else f$[U](Y._path,J);function J(I,K){if(Y.filter&&!Y.filter.call(Q,Q,K)){Y._aborted=!0,Y.emit("end"),Y.emit("close");return}if(I||!K)return vc(Y);Y._old=K;var G=aN0(K);if(G!==Y.type||Y.type==="File"&&K.nlink>1)return xw1(Y._path,function(H){if(H)return Y.error(H);Y._old=null,vc(Y)});vc(Y)}};function vc($){fw1(NZ.dirname($._path),u$.dirmode,function(Y,z){if(Y)return $.error(Y);return $._madeDir=z,$._create()})}function eN0($,Y,z,U,Q){var J=Y.mode,I=Y.follow||$.type!=="SymbolicLink"?"chmod":"lchmod";if(!f$[I])return Q();if(typeof J!=="number")return Q();var K=z.mode&parseInt("0777",8);if(J=J&parseInt("0777",8),J===K)return Q();f$[I](U,J,Q)}function $D0($,Y,z,U,Q){if(process.platform==="win32")return Q();if(!process.getuid||process.getuid()!==0)return Q();if(typeof Y.uid!=="number"&&typeof Y.gid!=="number")return Q();if(z.uid===Y.uid&&z.gid===Y.gid)return Q();var J=$.props.follow||$.type!=="SymbolicLink"?"chown":"lchown";if(!f$[J])return Q();if(typeof Y.uid!=="number")Y.uid=z.uid;if(typeof Y.gid!=="number")Y.gid=z.gid;f$[J](U,Y.uid,Y.gid,Q)}function YD0($,Y,z,U,Q){if(!f$.utimes||process.platform==="win32")return Q();var J=Y.follow||$.type!=="SymbolicLink"?"utimes":"lutimes";if(J==="lutimes"&&!f$[J])J="utimes";if(!f$[J])return Q();var{atime:I,mtime:K}=z,G=Y.atime,H=Y.mtime;if(G===void 0)G=I;if(H===void 0)H=K;if(!rN0(G))G=new Date(G);if(!rN0(H))G=new Date(H);if(G.getTime()===I.getTime()&&H.getTime()===K.getTime())return Q();f$[J](U,G,H,Q)}u$.prototype._finish=function(){var $=this;if($._finishing)return;$._finishing=!0;var Y=0,z=null,U=!1;if($._old)$._old.atime=new Date(0),$._old.mtime=new Date(0),J($._old);else{var Q=$.props.follow?"stat":"lstat";f$[Q]($._path,function(K,G){if(K)if(K.code==="ENOENT"&&($.type==="Link"||$.type==="SymbolicLink")&&process.platform==="win32"){$.ready=!0,$.emit("ready"),$.emit("end"),$.emit("close"),$.end=$._finish=function(){};return}else return $.error(K);J($._old=G)})}return;function J(K){Y+=3,eN0($,$.props,K,$._path,I("chmod")),$D0($,$.props,K,$._path,I("chown")),YD0($,$.props,K,$._path,I("utimes"))}function I(K){return function(G){if(z)return;if(G)return G.fstream_finish_call=K,$.error(z=G);if(--Y>0)return;if(U)return;if(U=!0,!$._madeDir)return H();else zD0($,$._path,H);function H(W){if(W)return W.fstream_finish_call="setupMadeDir",$.error(W);$.emit("end"),$.emit("close")}}}};function zD0($,Y,z){var U=$._madeDir,Q=NZ.dirname(Y);cw1($,Q,function(J){if(J)return z(J);if(Q===U)return z();zD0($,Q,z)})}function cw1($,Y,z){var U={};Object.keys($.props).forEach(function(K){if(U[K]=$.props[K],K==="mode"&&$.type!=="Directory")U[K]=U[K]|parseInt("0111",8)});var Q=3,J=null;f$.stat(Y,function(K,G){if(K)return z(J=K);eN0($,U,G,Y,I),$D0($,U,G,Y,I),YD0($,U,G,Y,I)});function I(K){if(J)return;if(K)return z(J=K);if(--Q===0)return z()}}u$.prototype.pipe=function(){this.error("Can't pipe from writable stream")};u$.prototype.add=function(){this.error("Can't add to non-Directory type")};u$.prototype.write=function(){return!0};function pw1($){return Object.prototype.toString.call($)}function rN0($){return typeof $==="object"&&pw1($)==="[object Date]"}});var kc=E((dw1)=>{dw1.Abstract=ZB();dw1.Reader=IU();dw1.Writer=oI();dw1.File={Reader:Xc(),Writer:Cc()};dw1.Dir={Reader:Wc(),Writer:Tc()};dw1.Link={Reader:Gc(),Writer:Ec()};dw1.Proxy={Reader:qc(),Writer:_c()};dw1.Reader.Dir=dw1.DirReader=dw1.Dir.Reader;dw1.Reader.File=dw1.FileReader=dw1.File.Reader;dw1.Reader.Link=dw1.LinkReader=dw1.Link.Reader;dw1.Reader.Proxy=dw1.ProxyReader=dw1.Proxy.Reader;dw1.Writer.Dir=dw1.DirWriter=dw1.Dir.Writer;dw1.Writer.File=dw1.FileWriter=dw1.File.Writer;dw1.Writer.Link=dw1.LinkWriter=dw1.Link.Writer;dw1.Writer.Proxy=dw1.ProxyWriter=dw1.Proxy.Writer;dw1.collect=BB()});var JD0=E((M04,QD0)=>{QD0.exports=ew1;var ow1=UB(),rw1=kc().Writer,xc=I0("path"),sw1=I0("stream"),aw1=Jc(),tw1=v2();function ew1($){$.path=xc.resolve(xc.normalize($.path));var Y=new ow1($),z=new sw1.Writable({objectMode:!0});z._write=function(Q,J,I){if(Q.type=="Directory")return I();var K=xc.join($.path,Q.path);if(K.indexOf($.path)!=0)return I();let G=$.getWriter?$.getWriter({path:K}):rw1({path:K});Q.pipe(G).on("error",I).on("close",I)};var U=aw1(Y,z);return Y.once("crx-header",function(Q){U.crxHeader=Q}),Y.pipe(z).on("finish",function(){U.emit("close")}),U.promise=function(){return new tw1(function(Q,J){U.on("close",Q),U.on("error",J)})},U}});var ID0=E((N04,TB)=>{var E6=function($){var Y=1e7,z=7,U=9007199254740992,Q=Z(U),J="0123456789abcdefghijklmnopqrstuvwxyz",I=typeof BigInt==="function";function K(B,v,u,a){if(typeof B>"u")return K[0];if(typeof v<"u")return+v===10&&!u?A0(B):b0(B,v,u,a);return A0(B)}function G(B,v){this.value=B,this.sign=v,this.isSmall=!1}G.prototype=Object.create(K.prototype);function H(B){this.value=B,this.sign=B<0,this.isSmall=!0}H.prototype=Object.create(K.prototype);function W(B){this.value=B}W.prototype=Object.create(K.prototype);function X(B){return-U0)return Math.floor(B);return Math.ceil(B)}function O(B,v){var u=B.length,a=v.length,X0=Array(u),J0=0,q0=Y,w0,B0;for(B0=0;B0=q0?1:0,X0[B0]=w0-J0*q0;while(B00)X0.push(J0);return X0}function N(B,v){if(B.length>=v.length)return O(B,v);return O(v,B)}function M(B,v){var u=B.length,a=Array(u),X0=Y,J0,q0;for(q0=0;q00)a[q0++]=v%X0,v=Math.floor(v/X0);return a}G.prototype.add=function(B){var v=A0(B);if(this.sign!==v.sign)return this.subtract(v.negate());var u=this.value,a=v.value;if(v.isSmall)return new G(M(u,Math.abs(a)),this.sign);return new G(N(u,a),this.sign)},G.prototype.plus=G.prototype.add,H.prototype.add=function(B){var v=A0(B),u=this.value;if(u<0!==v.sign)return this.subtract(v.negate());var a=v.value;if(v.isSmall){if(X(u+a))return new H(u+a);a=Z(Math.abs(a))}return new G(M(a,Math.abs(u)),u<0)},H.prototype.plus=H.prototype.add,W.prototype.add=function(B){return new W(this.value+A0(B).value)},W.prototype.plus=W.prototype.add;function D(B,v){var u=B.length,a=v.length,X0=Array(u),J0=0,q0=Y,w0,B0;for(w0=0;w0=0)a=D(B,v);else a=D(v,B),u=!u;if(a=q(a),typeof a==="number"){if(u)a=-a;return new H(a)}return new G(a,u)}function j(B,v,u){var a=B.length,X0=Array(a),J0=-v,q0=Y,w0,B0;for(w0=0;w0=0)},H.prototype.minus=H.prototype.subtract,W.prototype.subtract=function(B){return new W(this.value-A0(B).value)},W.prototype.minus=W.prototype.subtract,G.prototype.negate=function(){return new G(this.value,!this.sign)},H.prototype.negate=function(){var B=this.sign,v=new H(-this.value);return v.sign=!B,v},W.prototype.negate=function(){return new W(-this.value)},G.prototype.abs=function(){return new G(this.value,!1)},H.prototype.abs=function(){return new H(Math.abs(this.value))},W.prototype.abs=function(){return new W(this.value>=0?this.value:-this.value)};function A(B,v){var u=B.length,a=v.length,X0=u+a,J0=F(X0),q0=Y,w0,B0,r0,I1,U1;for(r0=0;r00)a[w0++]=J0%X0,J0=Math.floor(J0/X0);return a}function C(B,v){var u=[];while(v-- >0)u.push(0);return u.concat(B)}function b(B,v){var u=Math.max(B.length,v.length);if(u<=30)return A(B,v);u=Math.ceil(u/2);var a=B.slice(u),X0=B.slice(0,u),J0=v.slice(u),q0=v.slice(0,u),w0=b(X0,q0),B0=b(a,J0),r0=b(N(X0,a),N(q0,J0)),I1=N(N(w0,C(D(D(r0,w0),B0),u)),C(B0,2*u));return V(I1),I1}function k(B,v){return-0.012*B-0.012*v+0.000015*B*v>0}G.prototype.multiply=function(B){var v=A0(B),u=this.value,a=v.value,X0=this.sign!==v.sign,J0;if(v.isSmall){if(a===0)return K[0];if(a===1)return this;if(a===-1)return this.negate();if(J0=Math.abs(a),J0=0;U1--){if(I1=X0-1,B0[U1+a]!==q0)I1=Math.floor((B0[U1+a]*X0+B0[U1+a-1])/q0);A1=0,S1=0,N8=r0.length;for(u4=0;u4a)r0=(r0+1)*q0;w0=Math.ceil(r0/I1);do{if(U1=T(v,w0),t(U1,J0)<=0)break;w0--}while(w0);X0.push(w0),J0=D(J0,U1)}return X0.reverse(),[q(X0),q(J0)]}function x(B,v){var u=B.length,a=F(u),X0=Y,J0,q0,w0,B0;w0=0;for(J0=u-1;J0>=0;--J0)B0=w0*X0+B[J0],q0=w(B0/v),w0=B0-q0*v,a[J0]=q0|0;return[a,w0|0]}function d(B,v){var u,a=A0(v);if(I)return[new W(B.value/a.value),new W(B.value%a.value)];var X0=B.value,J0=a.value,q0;if(J0===0)throw Error("Cannot divide by zero");if(B.isSmall){if(a.isSmall)return[new H(w(X0/J0)),new H(X0%J0)];return[K[0],B]}if(a.isSmall){if(J0===1)return[B,K[0]];if(J0==-1)return[B.negate(),K[0]];var w0=Math.abs(J0);if(w0v.length?1:-1;for(var u=B.length-1;u>=0;u--)if(B[u]!==v[u])return B[u]>v[u]?1:-1;return 0}G.prototype.compareAbs=function(B){var v=A0(B),u=this.value,a=v.value;if(v.isSmall)return 1;return t(u,a)},H.prototype.compareAbs=function(B){var v=A0(B),u=Math.abs(this.value),a=v.value;if(v.isSmall)return a=Math.abs(a),u===a?0:u>a?1:-1;return-1},W.prototype.compareAbs=function(B){var v=this.value,u=A0(B).value;return v=v>=0?v:-v,u=u>=0?u:-u,v===u?0:v>u?1:-1},G.prototype.compare=function(B){if(B===1/0)return-1;if(B===-1/0)return 1;var v=A0(B),u=this.value,a=v.value;if(this.sign!==v.sign)return v.sign?1:-1;if(v.isSmall)return this.sign?-1:1;return t(u,a)*(this.sign?-1:1)},G.prototype.compareTo=G.prototype.compare,H.prototype.compare=function(B){if(B===1/0)return-1;if(B===-1/0)return 1;var v=A0(B),u=this.value,a=v.value;if(v.isSmall)return u==a?0:u>a?1:-1;if(u<0!==v.sign)return u<0?-1:1;return u<0?1:-1},H.prototype.compareTo=H.prototype.compare,W.prototype.compare=function(B){if(B===1/0)return-1;if(B===-1/0)return 1;var v=this.value,u=A0(B).value;return v===u?0:v>u?1:-1},W.prototype.compareTo=W.prototype.compare,G.prototype.equals=function(B){return this.compare(B)===0},W.prototype.eq=W.prototype.equals=H.prototype.eq=H.prototype.equals=G.prototype.eq=G.prototype.equals,G.prototype.notEquals=function(B){return this.compare(B)!==0},W.prototype.neq=W.prototype.notEquals=H.prototype.neq=H.prototype.notEquals=G.prototype.neq=G.prototype.notEquals,G.prototype.greater=function(B){return this.compare(B)>0},W.prototype.gt=W.prototype.greater=H.prototype.gt=H.prototype.greater=G.prototype.gt=G.prototype.greater,G.prototype.lesser=function(B){return this.compare(B)<0},W.prototype.lt=W.prototype.lesser=H.prototype.lt=H.prototype.lesser=G.prototype.lt=G.prototype.lesser,G.prototype.greaterOrEquals=function(B){return this.compare(B)>=0},W.prototype.geq=W.prototype.greaterOrEquals=H.prototype.geq=H.prototype.greaterOrEquals=G.prototype.geq=G.prototype.greaterOrEquals,G.prototype.lesserOrEquals=function(B){return this.compare(B)<=0},W.prototype.leq=W.prototype.lesserOrEquals=H.prototype.leq=H.prototype.lesserOrEquals=G.prototype.leq=G.prototype.lesserOrEquals,G.prototype.isEven=function(){return(this.value[0]&1)===0},H.prototype.isEven=function(){return(this.value&1)===0},W.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},G.prototype.isOdd=function(){return(this.value[0]&1)===1},H.prototype.isOdd=function(){return(this.value&1)===1},W.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},G.prototype.isPositive=function(){return!this.sign},H.prototype.isPositive=function(){return this.value>0},W.prototype.isPositive=H.prototype.isPositive,G.prototype.isNegative=function(){return this.sign},H.prototype.isNegative=function(){return this.value<0},W.prototype.isNegative=H.prototype.isNegative,G.prototype.isUnit=function(){return!1},H.prototype.isUnit=function(){return Math.abs(this.value)===1},W.prototype.isUnit=function(){return this.abs().value===BigInt(1)},G.prototype.isZero=function(){return!1},H.prototype.isZero=function(){return this.value===0},W.prototype.isZero=function(){return this.value===BigInt(0)},G.prototype.isDivisibleBy=function(B){var v=A0(B);if(v.isZero())return!1;if(v.isUnit())return!0;if(v.compareAbs(2)===0)return this.isEven();return this.mod(v).isZero()},W.prototype.isDivisibleBy=H.prototype.isDivisibleBy=G.prototype.isDivisibleBy;function e(B){var v=B.abs();if(v.isUnit())return!1;if(v.equals(2)||v.equals(3)||v.equals(5))return!0;if(v.isEven()||v.isDivisibleBy(3)||v.isDivisibleBy(5))return!1;if(v.lesser(49))return!0}function g(B,v){var u=B.prev(),a=u,X0=0,J0,q0,w0,B0;while(a.isEven())a=a.divide(2),X0++;$:for(w0=0;w0-U)return new H(B-1);return new G(Q,!0)},W.prototype.prev=function(){return new W(this.value-BigInt(1))};var p=[1];while(2*p[p.length-1]<=Y)p.push(2*p[p.length-1]);var Y0=p.length,y=p[Y0-1];function r(B){return Math.abs(B)<=Y}G.prototype.shiftLeft=function(B){var v=A0(B).toJSNumber();if(!r(v))throw Error(String(v)+" is too large for shifting.");if(v<0)return this.shiftRight(-v);var u=this;if(u.isZero())return u;while(v>=Y0)u=u.multiply(y),v-=Y0-1;return u.multiply(p[v])},W.prototype.shiftLeft=H.prototype.shiftLeft=G.prototype.shiftLeft,G.prototype.shiftRight=function(B){var v,u=A0(B).toJSNumber();if(!r(u))throw Error(String(u)+" is too large for shifting.");if(u<0)return this.shiftLeft(-u);var a=this;while(u>=Y0){if(a.isZero()||a.isNegative()&&a.isUnit())return a;v=d(a,y),a=v[1].isNegative()?v[0].prev():v[0],u-=Y0-1}return v=d(a,p[u]),v[1].isNegative()?v[0].prev():v[0]},W.prototype.shiftRight=H.prototype.shiftRight=G.prototype.shiftRight;function $0(B,v,u){v=A0(v);var a=B.isNegative(),X0=v.isNegative(),J0=a?B.not():B,q0=X0?v.not():v,w0=0,B0=0,r0=null,I1=null,U1=[];while(!J0.isZero()||!q0.isZero()){if(r0=d(J0,y),w0=r0[1].toJSNumber(),a)w0=y-1-w0;if(I1=d(q0,y),B0=I1[1].toJSNumber(),X0)B0=y-1-B0;J0=r0[0],q0=I1[0],U1.push(u(w0,B0))}var A1=u(a?1:0,X0?1:0)!==0?E6(-1):E6(0);for(var S1=U1.length-1;S1>=0;S1-=1)A1=A1.multiply(y).add(E6(U1[S1]));return A1}G.prototype.not=function(){return this.negate().prev()},W.prototype.not=H.prototype.not=G.prototype.not,G.prototype.and=function(B){return $0(this,B,function(v,u){return v&u})},W.prototype.and=H.prototype.and=G.prototype.and,G.prototype.or=function(B){return $0(this,B,function(v,u){return v|u})},W.prototype.or=H.prototype.or=G.prototype.or,G.prototype.xor=function(B){return $0(this,B,function(v,u){return v^u})},W.prototype.xor=H.prototype.xor=G.prototype.xor;var N0=1073741824,T0=(Y&-Y)*(Y&-Y)|N0;function _0(B){var v=B.value,u=typeof v==="number"?v|N0:typeof v==="bigint"?v|BigInt(N0):v[0]+v[1]*Y|T0;return u&-u}function G0(B,v){if(v.compareTo(B)<=0){var u=G0(B,v.square(v)),a=u.p,X0=u.e,J0=a.multiply(v);return J0.compareTo(B)<=0?{p:J0,e:X0*2+1}:{p:a,e:X0*2}}return{p:E6(1),e:0}}G.prototype.bitLength=function(){var B=this;if(B.compareTo(E6(0))<0)B=B.negate().subtract(E6(1));if(B.compareTo(E6(0))===0)return E6(0);return E6(G0(B,E6(2)).e).add(E6(1))},W.prototype.bitLength=H.prototype.bitLength=G.prototype.bitLength;function f0(B,v){return B=A0(B),v=A0(v),B.greater(v)?B:v}function e0(B,v){return B=A0(B),v=A0(v),B.lesser(v)?B:v}function s(B,v){if(B=A0(B).abs(),v=A0(v).abs(),B.equals(v))return B;if(B.isZero())return v;if(v.isZero())return B;var u=K[1],a,X0;while(B.isEven()&&v.isEven())a=e0(_0(B),_0(v)),B=B.divide(a),v=v.divide(a),u=u.multiply(a);while(B.isEven())B=B.divide(_0(B));do{while(v.isEven())v=v.divide(_0(v));if(B.greater(v))X0=v,v=B,B=X0;v=v.subtract(B)}while(!v.isZero());return u.isUnit()?B:B.multiply(u)}function H0(B,v){return B=A0(B).abs(),v=A0(v).abs(),B.divide(s(B,v)).multiply(v)}function F0(B,v,u){B=A0(B),v=A0(v);var a=u||Math.random,X0=e0(B,v),J0=f0(B,v),q0=J0.subtract(X0).add(1);if(q0.isSmall)return X0.add(Math.floor(a()*q0));var w0=w1(q0,Y).value,B0=[],r0=!0;for(var I1=0;I1=q0){if(B0==="1"&&q0===1)continue;throw Error(B0+" is not a valid digit in base "+v+".")}}}v=A0(v);var r0=[],I1=B[0]==="-";for(J0=I1?1:0;J0"&&J0=0;J0--)a=a.add(B[J0].times(X0)),X0=X0.times(v);return u?a.negate():a}function n0(B,v){if(v=v||J,B"}function w1(B,v){if(v=E6(v),v.isZero()){if(B.isZero())return{value:[0],isNegative:!1};throw Error("Cannot convert nonzero numbers to base 0.")}if(v.equals(-1)){if(B.isZero())return{value:[0],isNegative:!1};if(B.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-B.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var u=Array.apply(null,Array(B.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return u.unshift([1]),{value:[].concat.apply([],u),isNegative:!1}}var a=!1;if(B.isNegative()&&v.isPositive())a=!0,B=B.abs();if(v.isUnit()){if(B.isZero())return{value:[0],isNegative:!1};return{value:Array.apply(null,Array(B.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:a}}var X0=[],J0=B,q0;while(J0.isNegative()||J0.compareAbs(v)>=0){q0=J0.divmod(v),J0=q0.quotient;var w0=q0.remainder;if(w0.isNegative())w0=v.minus(w0).abs(),J0=J0.next();X0.push(w0.toJSNumber())}return X0.push(J0.toJSNumber()),{value:X0.reverse(),isNegative:a}}function k1(B,v,u){var a=w1(B,v);return(a.isNegative?"-":"")+a.value.map(function(X0){return n0(X0,u)}).join("")}G.prototype.toArray=function(B){return w1(this,B)},H.prototype.toArray=function(B){return w1(this,B)},W.prototype.toArray=function(B){return w1(this,B)},G.prototype.toString=function(B,v){if(B===$)B=10;if(B!==10||v)return k1(this,B,v);var u=this.value,a=u.length,X0=String(u[--a]),J0="0000000",q0;while(--a>=0)q0=String(u[a]),X0+=J0.slice(q0.length)+q0;var w0=this.sign?"-":"";return w0+X0},H.prototype.toString=function(B,v){if(B===$)B=10;if(B!=10||v)return k1(this,B,v);return String(this.value)},W.prototype.toString=H.prototype.toString,W.prototype.toJSON=G.prototype.toJSON=H.prototype.toJSON=function(){return this.toString()},G.prototype.valueOf=function(){return parseInt(this.toString(),10)},G.prototype.toJSNumber=G.prototype.valueOf,H.prototype.valueOf=function(){return this.value},H.prototype.toJSNumber=H.prototype.valueOf,W.prototype.valueOf=W.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function u1(B){if(X(+B)){var v=+B;if(v===w(v))return I?new W(BigInt(v)):new H(v);throw Error("Invalid integer: "+B)}var u=B[0]==="-";if(u)B=B.slice(1);var a=B.split(/e/i);if(a.length>2)throw Error("Invalid integer: "+a.join("e"));if(a.length===2){var X0=a[1];if(X0[0]==="+")X0=X0.slice(1);if(X0=+X0,X0!==w(X0)||!X(X0))throw Error("Invalid integer: "+X0+" is not a valid exponent.");var J0=a[0],q0=J0.indexOf(".");if(q0>=0)X0-=J0.length-q0-1,J0=J0.slice(0,q0)+J0.slice(q0+1);if(X0<0)throw Error("Cannot include negative exponent part for integers");J0+=Array(X0+1).join("0"),B=J0}var w0=/^([0-9][0-9]*)$/.test(B);if(!w0)throw Error("Invalid integer: "+B);if(I)return new W(BigInt(u?"-"+B:B));var B0=[],r0=B.length,I1=z,U1=r0-I1;while(r0>0){if(B0.push(+B.slice(U1,r0)),U1-=I1,U1<0)U1=0;r0-=I1}return V(B0),new G(B0,u)}function b1(B){if(I)return new W(BigInt(B));if(X(B)){if(B!==w(B))throw Error(B+" is not an integer.");return new H(B)}return u1(B.toString())}function A0(B){if(typeof B==="number")return b1(B);if(typeof B==="string")return u1(B);if(typeof B==="bigint")return new W(B);return B}for(var Q0=0;Q0<1000;Q0++)if(K[Q0]=A0(Q0),Q0>0)K[-Q0]=A0(-Q0);return K.one=K[1],K.zero=K[0],K.minusOne=K[-1],K.max=f0,K.min=e0,K.gcd=s,K.lcm=H0,K.isInstance=function(B){return B instanceof G||B instanceof H||B instanceof W},K.randBetween=F0,K.fromArray=function(B,v,u){return i0(B.map(A0),A0(v||10),u)},K}();if(typeof TB<"u"&&TB.hasOwnProperty("exports"))TB.exports=E6;if(typeof define==="function"&&define.amd)define(function(){return E6})});var HD0=E((D04,GD0)=>{var u2=ID0(),EB=I0("stream");if(!EB.Writable||!EB.Writable.prototype.destroy)EB=_3();var CB;function $M1(){var $=3988292384,Y,z,U;CB=[];for(z=0;z<256;z++){Y=z;for(U=0;U<8;U++)Y=Y&1?$^Y>>>1:Y=Y>>>1;CB[z]=Y>>>0}}function KD0($,Y){if(!CB)$M1();if($.charCodeAt)$=$.charCodeAt(0);return u2(Y).shiftRight(8).and(16777215).xor(CB[u2(Y).xor($).and(255)]).value}function rI(){if(!(this instanceof rI))return new rI;this.key0=305419896,this.key1=591751049,this.key2=878082192}rI.prototype.update=function($){this.key0=KD0($,this.key0),this.key1=u2(this.key0).and(255).and(4294967295).add(this.key1),this.key1=u2(this.key1).multiply(134775813).add(1).and(4294967295).value,this.key2=KD0(u2(this.key1).shiftRight(24).and(255),this.key2)};rI.prototype.decryptByte=function($){var Y=u2(this.key2).or(2);return $=$^u2(Y).multiply(u2(Y^1)).shiftRight(8).and(255),this.update($),$};rI.prototype.stream=function(){var $=EB.Transform(),Y=this;return $._transform=function(z,U,Q){for(var J=0;J{var YM1=v2(),zM1=HD0(),UM1=tA(),BZ=I0("stream"),QM1=cX(),JM1=I0("zlib"),IM1=YB(),KM1=fI(),GM1=zB();if(!BZ.Writable||!BZ.Writable.prototype.destroy)BZ=_3();WD0.exports=function(Y,z,U,Q){var J=UM1(),I=BZ.PassThrough(),K=Y.stream(z);return K.pipe(J).on("error",function(G){I.emit("error",G)}),I.vars=J.pull(30).then(function(G){var H=QM1.parse(G).word32lu("signature").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;return H.lastModifiedDateTime=GM1(H.lastModifiedDate,H.lastModifiedTime),J.pull(H.fileNameLength).then(function(W){return H.fileName=W.toString("utf8"),J.pull(H.extraFieldLength)}).then(function(W){var X;if(H.extra=IM1(W,H),Q&&Q.compressedSize)H=Q;if(H.flags&1)X=J.pull(12).then(function(Z){if(!U)throw Error("MISSING_PASSWORD");var q=zM1();String(U).split("").forEach(function(w){q.update(w)});for(var V=0;V>8&255:H.crc32>>24&255;if(Z[11]!==F)throw Error("BAD_PASSWORD");return H});return YM1.resolve(X).then(function(){return I.emit("vars",H),H})})}),I.vars.then(function(G){var H=!(G.flags&8)||G.compressedSize>0,W,X=G.compressionMethod?JM1.createInflateRaw():BZ.PassThrough();if(H)I.size=G.uncompressedSize,W=G.compressedSize;else W=KM1.alloc(4),W.writeUInt32LE(134695760,0);var Z=J.stream(W);if(G.decrypt)Z=Z.pipe(G.decrypt.stream());Z.pipe(X).on("error",function(q){I.emit("error",q)}).pipe(I).on("finish",function(){if(K.destroy)K.destroy();else if(K.abort)K.abort();else if(K.close)K.close();else if(K.push)K.push();else console.log("warning - unable to close stream")})}).catch(function(G){I.emit("error",G)}),I}});var VD0=E((B04,qD0)=>{var TZ=cX(),jZ=tA(),HM1=XD0(),PZ=v2(),WM1=$B(),XM1=YB(),ZM1=fI(),fc=I0("path"),qM1=kc().Writer,VM1=zB(),ZD0=ZM1.alloc(4);ZD0.writeUInt32LE(101010256,0);function LM1($){var Y=$.stream(0).pipe(jZ());return Y.pull(4).then(function(z){var U=z.readUInt32LE(0);if(U===875721283){var Q;return Y.pull(12).then(function(J){Q=TZ.parse(J).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars}).then(function(){return Y.pull(Q.pubKeyLength+Q.signatureLength)}).then(function(J){return Q.publicKey=J.slice(0,Q.pubKeyLength),Q.signature=J.slice(Q.pubKeyLength),Q.size=16+Q.pubKeyLength+Q.signatureLength,Q})}})}function FM1($,Y){var z=TZ.parse(Y).word32lu("signature").word32lu("diskNumber").word64lu("offsetToStartOfCentralDirectory").word32lu("numberOfDisks").vars;if(z.signature!=117853008)throw Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+z.signature.toString(16));var U=jZ();return $.stream(z.offsetToStartOfCentralDirectory).pipe(U),U.pull(56)}function OM1($){var Y=TZ.parse($).word32lu("signature").word64lu("sizeOfCentralDirectory").word16lu("version").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskStart").word64lu("numberOfRecordsOnDisk").word64lu("numberOfRecords").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;if(Y.signature!=101075792)throw Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+Y.signature.toString(16));return Y}qD0.exports=function(Y,z){var U=jZ(),Q=jZ(),J=z&&z.tailSize||80,I,K,G,H;if(z&&z.crx)K=LM1(Y);return Y.size().then(function(W){return I=W,Y.stream(Math.max(0,W-J)).on("error",function(X){U.emit("error",X)}).pipe(U),U.pull(ZD0)}).then(function(){return PZ.props({directory:U.pull(22),crxHeader:K})}).then(function(W){var X=W.directory;if(G=W.crxHeader&&W.crxHeader.size||0,H=TZ.parse(X).word32lu("signature").word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars,H.numberOfRecords==65535||H.numberOfRecords==65535||H.offsetToStartOfCentralDirectory==4294967295){let q=I-(J-U.match+20),V=jZ();return Y.stream(q).pipe(V),V.pull(20).then(function(F){return FM1(Y,F)}).then(function(F){H=OM1(F)})}else H.offsetToStartOfCentralDirectory+=G}).then(function(){if(H.commentLength)return U.pull(H.commentLength).then(function(W){H.comment=W.toString("utf8")})}).then(function(){return Y.stream(H.offsetToStartOfCentralDirectory).pipe(Q),H.extract=function(W){if(!W||!W.path)throw Error("PATH_MISSING");return W.path=fc.resolve(fc.normalize(W.path)),H.files.then(function(X){return PZ.map(X,function(Z){if(Z.type=="Directory")return;var q=fc.join(W.path,Z.path);if(q.indexOf(W.path)!=0)return;var V=W.getWriter?W.getWriter({path:q}):qM1({path:q});return new PZ(function(F,w){Z.stream(W.password).on("error",w).pipe(V).on("close",F).on("error",w)})},{concurrency:W.concurrency>1?W.concurrency:1})})},H.files=PZ.mapSeries(Array(H.numberOfRecords),function(){return Q.pull(46).then(function(W){var X=TZ.parse(W).word32lu("signature").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return X.offsetToLocalFileHeader+=G,X.lastModifiedDateTime=VM1(X.lastModifiedDate,X.lastModifiedTime),Q.pull(X.fileNameLength).then(function(Z){return X.pathBuffer=Z,X.path=Z.toString("utf8"),X.isUnicode=(X.flags&2048)!=0,Q.pull(X.extraFieldLength)}).then(function(Z){return X.extra=XM1(Z,X),Q.pull(X.fileCommentLength)}).then(function(Z){return X.comment=Z,X.type=X.uncompressedSize===0&&/[\/\\]$/.test(X.path)?"Directory":"File",X.stream=function(q){return HM1(Y,X.offsetToLocalFileHeader,q,X)},X.buffer=function(q){return WM1(X.stream(q))},X})})}),PZ.props(H)})}});var OD0=E((P04,FD0)=>{var LD0=o8(),RB=v2(),EZ=VD0(),_B=I0("stream");if(!_B.Writable||!_B.Writable.prototype.destroy)_B=_3();FD0.exports={buffer:function($,Y){var z={stream:function(U,Q){var J=_B.PassThrough();return J.end($.slice(U,Q)),J},size:function(){return RB.resolve($.length)}};return EZ(z,Y)},file:function($,Y){var z={stream:function(U,Q){return LD0.createReadStream($,{start:U,end:Q&&U+Q})},size:function(){return new RB(function(U,Q){LD0.stat($,function(J,I){if(J)Q(J);else U(I.size)})})}};return EZ(z,Y)},url:function($,Y,z){if(typeof Y==="string")Y={url:Y};if(!Y.url)throw"URL missing";Y.headers=Y.headers||{};var U={stream:function(Q,J){var I=Object.create(Y);return I.headers=Object.create(Y.headers),I.headers.range="bytes="+Q+"-"+(J?J:""),$(I)},size:function(){return new RB(function(Q,J){var I=$(Y);I.on("response",function(K){if(I.abort(),!K.headers["content-length"])J(Error("Missing content length header"));else Q(K.headers["content-length"])}).on("error",J)})}};return EZ(U,z)},s3:function($,Y,z){var U={size:function(){return new RB(function(Q,J){$.headObject(Y,function(I,K){if(I)J(I);else Q(K.ContentLength)})})},stream:function(Q,J){var I={};for(var K in Y)I[K]=Y[K];return I.Range="bytes="+Q+"-"+(J?J:""),$.getObject(I).createReadStream()}};return EZ(U,z)},custom:function($,Y){return EZ($,Y)}}});var wD0=E((wM1)=>{qF0();OF0();sg();wM1.Parse=UB();wM1.ParseOne=SM0();wM1.Extract=JD0();wM1.Open=OD0()});var SD0=E((iM1,S3)=>{/*! * Tmp * * Copyright (c) 2011-2017 KARASZI Istvan * * MIT Licensed - */var V4=I0("fs"),hB=I0("os"),C6=I0("path"),MD0=I0("crypto"),A9={fs:V4.constants,os:hB.constants},BD0=/XXXXXX/,PD0=(A9.O_CREAT||A9.fs.O_CREAT)|(A9.O_EXCL||A9.fs.O_EXCL)|(A9.O_RDWR||A9.fs.O_RDWR),BM1=hB.platform()==="win32",PM1=A9.EBADF||A9.os.errno.EBADF,jM1=A9.ENOENT||A9.os.errno.ENOENT,sI=[],jD0=V4.rmdirSync.bind(V4),TD0=!1;function TM1($,Y){return V4.rm($,{recursive:!0},Y)}function ED0($){return V4.rmSync($,{recursive:!0})}function nc($,Y){let z=aI($,Y),U=z[0],Q=z[1];kM1(U,function(J,I){if(J)return Q(J);let K=I.tries;(function G(){try{let H=RD0(I);V4.stat(H,function(W){if(!W){if(K-- >0)return G();return Q(Error("Could not get a unique tmp filename, max tries reached "+H))}Q(null,H)})}catch(H){Q(H)}})()})}function cc($){let Y=aI($),z=Y[0],U=xM1(z),Q=U.tries;do{let J=RD0(U);try{V4.statSync(J)}catch(I){return J}}while(Q-- >0);throw Error("Could not get a unique tmp filename, max tries reached")}function EM1($,Y){let z=aI($,Y),U=z[0],Q=z[1];nc(U,function(I,K){if(I)return Q(I);V4.open(K,PD0,U.mode||384,function(H,W){if(H)return Q(H);if(U.discardDescriptor)return V4.close(W,function(Z){return Q(Z,K,void 0,bc(K,-1,U,!1))});else{let X=U.discardDescriptor||U.detachDescriptor;Q(null,K,W,bc(K,X?-1:W,U,!1))}})})}function CM1($){let Y=aI($),z=Y[0],U=z.discardDescriptor||z.detachDescriptor,Q=cc(z),J=V4.openSync(Q,PD0,z.mode||384);if(z.discardDescriptor)V4.closeSync(J),J=void 0;return{name:Q,fd:J,removeCallback:bc(Q,U?-1:J,z,!0)}}function RM1($,Y){let z=aI($,Y),U=z[0],Q=z[1];nc(U,function(I,K){if(I)return Q(I);V4.mkdir(K,U.mode||448,function(H){if(H)return Q(H);Q(null,K,CD0(K,U,!1))})})}function _M1($){let Y=aI($),z=Y[0],U=cc(z);return V4.mkdirSync(U,z.mode||448),{name:U,removeCallback:CD0(U,z,!0)}}function vM1($,Y){let z=function(U){if(U&&!ic(U))return Y(U);Y()};if(0<=$[0])V4.close($[0],function(){V4.unlink($[1],z)});else V4.unlink($[1],z)}function hM1($){let Y=null;try{if(0<=$[0])V4.closeSync($[0])}catch(z){if(!fM1(z)&&!ic(z))throw z}finally{try{V4.unlinkSync($[1])}catch(z){if(!ic(z))Y=z}}if(Y!==null)throw Y}function bc($,Y,z,U){let Q=vB(hM1,[Y,$],U),J=vB(vM1,[Y,$],U,Q);if(!z.keep)sI.unshift(Q);return U?Q:J}function CD0($,Y,z){let U=Y.unsafeCleanup?TM1:V4.rmdir.bind(V4),Q=Y.unsafeCleanup?ED0:jD0,J=vB(Q,$,z),I=vB(U,$,z,J);if(!Y.keep)sI.unshift(J);return z?J:I}function vB($,Y,z,U){let Q=!1;return function J(I){if(!Q){let K=U||J,G=sI.indexOf(K);if(G>=0)sI.splice(G,1);if(Q=!0,z||$===jD0||$===ED0)return $(Y);else return $(Y,I||function(){})}}}function SM1(){if(!TD0)return;while(sI.length)try{sI[0]()}catch($){}}function ND0($){let Y=[],z=null;try{z=MD0.randomBytes($)}catch(U){z=MD0.pseudoRandomBytes($)}for(let U=0;U<$;U++)Y.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[z[U]%62]);return Y.join("")}function s8($){return typeof $>"u"}function aI($,Y){if(typeof $==="function")return[{},$];if(s8($))return[{},Y];let z={};for(let U of Object.getOwnPropertyNames($))z[U]=$[U];return[z,Y]}function gM1($,Y,z){let U=C6.isAbsolute($)?$:C6.join(Y,$);V4.stat(U,function(Q){if(Q)V4.realpath(C6.dirname(U),function(J,I){if(J)return z(J);z(null,C6.join(I,C6.basename(U)))});else V4.realpath(U,z)})}function yM1($,Y){let z=C6.isAbsolute($)?$:C6.join(Y,$);try{return V4.statSync(z),V4.realpathSync(z)}catch(U){let Q=V4.realpathSync(C6.dirname(z));return C6.join(Q,C6.basename(z))}}function RD0($){let Y=$.tmpdir;if(!s8($.name))return C6.join(Y,$.dir,$.name);if(!s8($.template))return C6.join(Y,$.dir,$.template).replace(BD0,ND0(6));let z=[$.prefix?$.prefix:"tmp","-",process.pid,"-",ND0(12),$.postfix?"-"+$.postfix:""].join("");return C6.join(Y,$.dir,z)}function uc($,Y){if(typeof Y!=="string")throw Error(`${$} option must be a string, got "${typeof Y}".`);if(Y.includes(".."))throw Error("Relative value not allowed");return Y}function _D0($){if(!s8($.name)){let Y=$.name;if(C6.isAbsolute(Y))throw Error(`name option must not contain an absolute path, found "${Y}".`);let z=C6.basename(Y);if(z===".."||z==="."||z!==Y)throw Error(`name option must not contain a path, found "${Y}".`)}if(!s8($.template)){if(typeof $.template!=="string")throw Error(`template option must be a string, got "${typeof $.template}".`);if(!$.template.match(BD0))throw Error(`Invalid template, found "${$.template}".`)}if(!s8($.tries)&&isNaN($.tries)||$.tries<0)throw Error(`Invalid tries, found "${$.tries}".`);$.tries=s8($.name)?$.tries||3:1,$.keep=!!$.keep,$.detachDescriptor=!!$.detachDescriptor,$.discardDescriptor=!!$.discardDescriptor,$.unsafeCleanup=!!$.unsafeCleanup,$.prefix=s8($.prefix)?"":uc("prefix",$.prefix),$.postfix=s8($.postfix)?"":uc("postfix",$.postfix),$.template=s8($.template)?void 0:uc("template",$.template)}function DD0($,Y,z,U){if(s8(Y))return U(null);gM1(Y,z,function(Q,J){if(Q)return U(Q);let I=C6.relative(z,J);if(I.startsWith("..")||C6.isAbsolute(I))return U(Error(`${$} option must be relative to "${z}", found "${I}".`));U(null,I)})}function AD0($,Y,z){if(s8(Y))return;let U=yM1(Y,z),Q=C6.relative(z,U);if(Q.startsWith("..")||C6.isAbsolute(Q))throw Error(`${$} option must be relative to "${z}", found "${Q}".`);return Q}function kM1($,Y){bM1($,function(z,U){if(z)return Y(z);$.tmpdir=U;try{_D0($,U)}catch(Q){return Y(Q)}DD0("dir",$.dir,U,function(Q,J){if(Q)return Y(Q);$.dir=s8(J)?"":J,DD0("template",$.template,U,function(I,K){if(I)return Y(I);$.template=K,Y(null,$)})})})}function xM1($){let Y=$.tmpdir=hD0($);_D0($,Y);let z=AD0("dir",$.dir,Y);return $.dir=s8(z)?"":z,$.template=AD0("template",$.template,Y),$}function fM1($){return vD0($,-PM1,"EBADF")}function ic($){return vD0($,-jM1,"ENOENT")}function vD0($,Y,z){return BM1?$.code===z:$.code===z&&$.errno===Y}function uM1(){TD0=!0}function bM1($,Y){return V4.realpath($&&$.tmpdir||hB.tmpdir(),Y)}function hD0($){return V4.realpathSync($&&$.tmpdir||hB.tmpdir())}process.addListener("exit",SM1);Object.defineProperty(iM1,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return hD0()}});iM1.dir=RM1;iM1.dirSync=_M1;iM1.file=EM1;iM1.fileSync=CM1;iM1.tmpName=nc;iM1.tmpNameSync=cc;iM1.setGracefulCleanup=uM1});var yD0=E((T04,gD0)=>{gD0.exports=async function*(Y){let z=[];Y.on("data",(K)=>z.push(K));let U,Q=new Promise((K)=>U=K),J=!1;Y.on("end",()=>{J=!0,U()});let I=!1;Y.on("error",(K)=>{I=K,U()});while(!J||z.length>0){if(z.length===0)Y.resume(),await Promise.race([rM1(Y,"data"),Q]);else Y.pause(),yield z.shift();if(I)throw I}U()};function rM1($,Y){return new Promise((z)=>{let U=!1,Q=()=>{if(!U)U=!0,$.removeListener(Y,Q),z()};$.addListener(Y,Q)})}});var bD0=E((E04,uD0)=>{var{EventEmitter:sM1}=I0("events"),aM1=yW(),tM1=Y6(),SB=Z8(),kD0=n4(),eM1=z3(),$N1=gw(),xD0=kw();class fD0 extends sM1{constructor({workbook:$,id:Y,iterator:z,options:U}){super();this.workbook=$,this.id=Y,this.iterator=z,this.options=U||{},this.name=`Sheet${this.id}`,this._columns=null,this._keys={},this._dimensions=new eM1}destroy(){throw Error("Invalid Operation: destroy")}get dimensions(){return this._dimensions}get columns(){return this._columns}getColumn($){if(typeof $==="string"){let Y=this._keys[$];if(Y)return Y;$=kD0.l2n($)}if(!this._columns)this._columns=[];if($>this._columns.length){let Y=this._columns.length+1;while(Y<=$)this._columns.push(new xD0(this,Y++))}return this._columns[$-1]}getColumnKey($){return this._keys[$]}setColumnKey($,Y){this._keys[$]=Y}deleteColumnKey($){delete this._keys[$]}eachColumnKey($){tM1.each(this._keys,$)}async read(){try{for await(let $ of this.parse())for(let{eventType:Y,value:z}of $)this.emit(Y,z);this.emit("finished")}catch($){this.emit("error",$)}}async*[Symbol.asyncIterator](){for await(let $ of this.parse())for(let{eventType:Y,value:z}of $)if(Y==="row")yield z}async*parse(){let{iterator:$,options:Y}=this,z=!1,U=!1,Q=null;switch(Y.worksheets){case"emit":z=!0;break;case"prep":break;default:break}switch(Y.hyperlinks){case"emit":U=!0;break;case"cache":this.hyperlinks=Q={};break;default:break}if(!z&&!U&&!Q)return;let{sharedStrings:J,styles:I,properties:K}=this.workbook,G=!1,H=!1,W=!1,X=null,Z=null,q=null,V=null;for await(let F of aM1($)){let w=[];for(let{eventType:O,value:N}of F)if(O==="opentag"){let M=N;if(z)switch(M.name){case"cols":G=!0,X=[];break;case"sheetData":H=!0;break;case"col":if(G)X.push({min:parseInt(M.attributes.min,10),max:parseInt(M.attributes.max,10),width:parseFloat(M.attributes.width),styleId:parseInt(M.attributes.style||"0",10)});break;case"row":if(H){let D=parseInt(M.attributes.r,10);if(Z=new $N1(this,D),M.attributes.ht)Z.height=parseFloat(M.attributes.ht);if(M.attributes.s){let P=parseInt(M.attributes.s,10),j=I.getStyleModel(P);if(j)Z.style=j}}break;case"c":if(Z)q={ref:M.attributes.r,s:parseInt(M.attributes.s,10),t:M.attributes.t};break;case"f":if(q)V=q.f={text:""};break;case"v":if(q)V=q.v={text:""};break;case"is":case"t":if(q)V=q.v={text:""};break;case"mergeCell":break;default:break}if(U||Q)switch(M.name){case"hyperlinks":W=!0;break;case"hyperlink":if(W){let D={ref:M.attributes.ref,rId:M.attributes["r:id"]};if(U)w.push({eventType:"hyperlink",value:D});else Q[D.ref]=D}break;default:break}}else if(O==="text"){if(z){if(V)V.text+=N}}else if(O==="closetag"){let M=N;if(z)switch(M.name){case"cols":G=!1,this._columns=xD0.fromModel(X);break;case"sheetData":H=!1;break;case"row":this._dimensions.expandRow(Z),w.push({eventType:"row",value:Z}),Z=null;break;case"c":if(Z&&q){let D=kD0.decodeAddress(q.ref),P=Z.getCell(D.col);if(q.s){let j=I.getStyleModel(q.s);if(j)P.style=j}if(q.f){let j={formula:q.f.text};if(q.v)if(q.t==="str")j.result=SB.xmlDecode(q.v.text);else j.result=parseFloat(q.v.text);P.value=j}else if(q.v)switch(q.t){case"s":{let j=parseInt(q.v.text,10);if(J)P.value=J[j];else P.value={sharedString:j};break}case"inlineStr":case"str":P.value=SB.xmlDecode(q.v.text);break;case"e":P.value={error:q.v.text};break;case"b":P.value=parseInt(q.v.text,10)!==0;break;default:if(SB.isDateFmt(P.numFmt))P.value=SB.excelToDate(parseFloat(q.v.text),K.model&&K.model.date1904);else P.value=parseFloat(q.v.text);break}if(Q){let j=Q[q.ref];if(j)P.text=P.value,P.value=void 0,P.hyperlink=j}q=null}break;default:break}if(U||Q)switch(M.name){case"hyperlinks":W=!1;break;default:break}}if(w.length>0)yield w}}}uD0.exports=fD0});var cD0=E((C04,nD0)=>{var{EventEmitter:YN1}=I0("events"),zN1=yW(),UN1=H5(),QN1=Q2();class iD0 extends YN1{constructor({workbook:$,id:Y,iterator:z,options:U}){super();this.workbook=$,this.id=Y,this.iterator=z,this.options=U}get count(){return this.hyperlinks&&this.hyperlinks.length||0}each($){return this.hyperlinks.forEach($)}async read(){let{iterator:$,options:Y}=this,z=!1,U=null;switch(Y.hyperlinks){case"emit":z=!0;break;case"cache":this.hyperlinks=U={};break;default:break}if(!z&&!U){this.emit("finished");return}try{for await(let Q of zN1($))for(let{eventType:J,value:I}of Q)if(J==="opentag"){let K=I;if(K.name==="Relationship"){let G=K.attributes.Id;switch(K.attributes.Type){case QN1.Hyperlink:{let H={type:UN1.RelationshipType.Styles,rId:G,target:K.attributes.Target,targetMode:K.attributes.TargetMode};if(z)this.emit("hyperlink",H);else U[H.rId]=H}break;default:break}}}this.emit("finished")}catch(Q){this.emit("error",Q)}}}nD0.exports=iD0});var lD0=E((R04,mD0)=>{var pc=I0("fs"),{EventEmitter:JN1}=I0("events"),{PassThrough:IN1,Readable:KN1}=C8(),GN1=I0("stream"),HN1=wD0(),dD0=SD0(),WU=yD0(),WN1=yW(),pD0=qN(),XN1=MN(),ZN1=ON(),qN1=bD0(),VN1=cD0();dD0.setGracefulCleanup();class dc extends JN1{constructor($,Y={}){super();this.input=$,this.options={worksheets:"emit",sharedStrings:"cache",hyperlinks:"ignore",styles:"ignore",entries:"ignore",...Y},this.styles=new pD0,this.styles.init()}_getStream($){if($ instanceof GN1.Readable||$ instanceof KN1)return $;if(typeof $==="string")return pc.createReadStream($);throw Error(`Could not recognise input: ${$}`)}async read($,Y){try{for await(let{eventType:z,value:U}of this.parse($,Y))switch(z){case"shared-strings":this.emit(z,U);break;case"worksheet":this.emit(z,U),await U.read();break;case"hyperlinks":this.emit(z,U);break}this.emit("end"),this.emit("finished")}catch(z){this.emit("error",z)}}async*[Symbol.asyncIterator](){for await(let{eventType:$,value:Y}of this.parse())if($==="worksheet")yield Y}async*parse($,Y){if(Y)this.options=Y;let z=this.stream=this._getStream($||this.input),U=HN1.Parse({forceStream:!0});z.pipe(U);let Q=[];for await(let J of WU(U)){let I,K;switch(J.path){case"_rels/.rels":break;case"xl/_rels/workbook.xml.rels":await this._parseRels(J);break;case"xl/workbook.xml":await this._parseWorkbook(J);break;case"xl/sharedStrings.xml":yield*this._parseSharedStrings(J);break;case"xl/styles.xml":await this._parseStyles(J);break;default:if(J.path.match(/xl\/worksheets\/sheet\d+[.]xml/))if(I=J.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/),K=I[1],this.sharedStrings&&this.workbookRels)yield*this._parseWorksheet(WU(J),K);else await new Promise((G,H)=>{dD0.file((W,X,Z,q)=>{if(W)return H(W);Q.push({sheetNo:K,path:X,tempFileCleanupCallback:q});let V=pc.createWriteStream(X);return V.on("error",H),J.pipe(V),V.on("finish",()=>{return G()})})});else if(J.path.match(/xl\/worksheets\/_rels\/sheet\d+[.]xml.rels/))I=J.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),K=I[1],yield*this._parseHyperlinks(WU(J),K);break}J.autodrain()}for(let{sheetNo:J,path:I,tempFileCleanupCallback:K}of Q){let G=pc.createReadStream(I);if(!G[Symbol.asyncIterator])G=G.pipe(new IN1);yield*this._parseWorksheet(G,J),K()}}_emitEntry($){if(this.options.entries==="emit")this.emit("entry",$)}async _parseRels($){let Y=new ZN1;this.workbookRels=await Y.parseStream(WU($))}async _parseWorkbook($){this._emitEntry({type:"workbook"});let Y=new XN1;await Y.parseStream(WU($)),this.properties=Y.map.workbookPr,this.model=Y.model}async*_parseSharedStrings($){switch(this._emitEntry({type:"shared-strings"}),this.options.sharedStrings){case"cache":this.sharedStrings=[];break;case"emit":break;default:return}let Y=null,z=[],U=0,Q=null;for await(let J of WN1(WU($)))for(let{eventType:I,value:K}of J)if(I==="opentag"){let G=K;switch(G.name){case"b":Q=Q||{},Q.bold=!0;break;case"charset":Q=Q||{},Q.charset=parseInt(G.attributes.charset,10);break;case"color":if(Q=Q||{},Q.color={},G.attributes.rgb)Q.color.argb=G.attributes.argb;if(G.attributes.val)Q.color.argb=G.attributes.val;if(G.attributes.theme)Q.color.theme=G.attributes.theme;break;case"family":Q=Q||{},Q.family=parseInt(G.attributes.val,10);break;case"i":Q=Q||{},Q.italic=!0;break;case"outline":Q=Q||{},Q.outline=!0;break;case"rFont":Q=Q||{},Q.name=G.value;break;case"si":Q=null,z=[],Y=null;break;case"sz":Q=Q||{},Q.size=parseInt(G.attributes.val,10);break;case"strike":break;case"t":Y=null;break;case"u":Q=Q||{},Q.underline=!0;break;case"vertAlign":Q=Q||{},Q.vertAlign=G.attributes.val;break}}else if(I==="text")Y=Y?Y+K:K;else if(I==="closetag")switch(K.name){case"r":z.push({font:Q,text:Y}),Q=null,Y=null;break;case"si":if(this.options.sharedStrings==="cache")this.sharedStrings.push(z.length?{richText:z}:Y);else if(this.options.sharedStrings==="emit")yield{index:U++,text:z.length?{richText:z}:Y};z=[],Q=null,Y=null;break}}async _parseStyles($){if(this._emitEntry({type:"styles"}),this.options.styles==="cache")this.styles=new pD0,await this.styles.parseStream(WU($))}*_parseWorksheet($,Y){this._emitEntry({type:"worksheet",id:Y});let z=new qN1({workbook:this,id:Y,iterator:$,options:this.options}),U=(this.workbookRels||[]).find((J)=>J.Target===`worksheets/sheet${Y}.xml`),Q=U&&(this.model.sheets||[]).find((J)=>J.rId===U.Id);if(Q)z.id=Q.id,z.name=Q.name,z.state=Q.state;if(this.options.worksheets==="emit")yield{eventType:"worksheet",value:z}}*_parseHyperlinks($,Y){this._emitEntry({type:"hyperlinks",id:Y});let z=new VN1({workbook:this,id:Y,iterator:$,options:this.options});if(this.options.hyperlinks==="emit")yield{eventType:"hyperlinks",value:z}}}dc.Options={worksheets:["emit","ignore"],sharedStrings:["cache","emit","ignore"],hyperlinks:["cache","emit","ignore"],styles:["cache","ignore"],entries:["emit","ignore"]};mD0.exports=dc});var sD0=E((_04,rD0)=>{var oD0={Workbook:DH0(),ModelContainer:PH0(),stream:{xlsx:{WorkbookWriter:XF0(),WorkbookReader:lD0()}}};Object.assign(oD0,H5());rD0.exports=oD0});var CZ=E((v04,aD0)=>{if(parseInt(process.versions.node.split(".")[0],10)<10)throw Error("For node versions older than 10, please use the ES5 Import: https://github.com/exceljs/exceljs#es5-imports");aD0.exports=sD0()});var tD0,eD0,D5,LN1,FN1,ON1,wN1,MN1,S04,g04,y04,k04,x04;var mc=m(()=>{P$();tD0={"freeflow.submit":"提交送审","freeflow.agree":"审批同意","freeflow.autoAgree":"自动同意","freeflow.reject":"审批驳回","freeflow.back":"审批退回","freeflow.print":"打印单据","freeflow.retract":"单据撤回","freeflow.addnode":"加签/转交","freeflow.comment":"发表评论","freeflow.pay":"支付成功","freeflow.paying":"发起支付","freeflow.carbonCopy":"抄送单据","freeflow.cc":"抄送单据"},eD0={APPROVING:"审批中",APPROVED:"审批通过",REJECTED:"审批驳回",REVOKED:"已撤回",CANCELED:"已取消",CANCELLED:"已取消",SKIPPED:"已跳过",SUBMITTED:"已提交",PENDING:"待审批",WAITING:"待处理",COMPLETED:"已完成",DRAFT:"草稿",PAID:"已支付",PAYING:"支付中"},D5=L.object({id:L.string().optional(),name:L.string().optional(),code:L.string().optional()}),LN1=L.object({id:L.string().optional(),nodeId:L.string().optional(),time:L.number().optional(),durationMs:L.number().optional(),state:L.string().optional(),rawState:L.string().optional(),action:L.string().optional(),rawAction:L.string().optional(),nodeName:L.string().optional(),comment:L.string().optional(),rawComment:L.string().optional(),automatic:L.boolean().default(!1),isEbot:L.boolean().default(!1),skipped:L.boolean().default(!1),operator:D5.optional(),nextOperators:L.array(D5).default([]),rejectTargetNodeName:L.string().optional(),rejectTargetOperator:D5.optional(),resubmitRuleText:L.string().optional(),isModification:L.boolean().default(!1)}),FN1=L.object({id:L.string().optional(),name:L.string().optional(),type:L.string().optional(),state:L.enum(["当前","后续","已完成"]).default("后续"),isCurrent:L.boolean().default(!1),approver:D5.optional(),approvers:L.array(D5).default([])}),ON1=L.object({rejectionNum:L.number().int().nonnegative().default(0),submitCount:L.number().int().positive().default(1),sourceFlowVersion:L.union([L.string(),L.number()]).optional(),isModifiedAfterReject:L.boolean().default(!1),retractCount:L.number().int().nonnegative().default(0),isResubmittedAfterRetract:L.boolean().default(!1)}),wN1=L.object({nodeName:L.string().optional(),operator:D5.optional(),action:L.string().optional(),rawAction:L.string().optional(),time:L.number().optional(),comment:L.string(),isEbot:L.boolean().default(!1)}),MN1=L.object({time:L.number().optional(),nodeName:L.string().optional(),operator:D5.optional(),isEbot:L.boolean().default(!1),reason:L.string(),rawComment:L.string().optional(),fromNodeName:L.string().optional(),targetNodeName:L.string().optional(),targetOperator:D5.optional(),resubmitRuleText:L.string().optional()}),S04=L.object({backlogId:L.string(),flowId:L.string().optional(),billCode:L.string().optional(),title:L.string().optional(),state:L.string().optional(),rawState:L.string().optional(),currentNode:L.string().optional(),specification:L.object({id:L.string().optional(),name:L.string().optional(),code:L.string().optional()}).optional(),submitter:D5.optional(),owner:D5.optional(),submitDate:L.number().optional(),updateTime:L.number().optional(),history:L.array(LN1),pending:L.array(FN1),metrics:ON1,staffOpinions:L.array(wN1),rejections:L.array(MN1),raw:L.record(L.string(),L.unknown()).optional()}),g04=L.object({id:L.string(),state:L.string().optional(),nodeName:L.string().optional(),flowId:L.record(L.string(),L.unknown()).optional(),nodeState:L.record(L.string(),L.unknown()).optional()}).passthrough(),y04=L.object({count:L.number().optional(),items:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),k04=L.object({value:L.record(L.string(),L.unknown()).optional(),items:L.array(L.record(L.string(),L.unknown())).optional()}).passthrough(),x04=L.object({recordId:L.string(),sourceDocumentSN:L.string().optional(),taskMode:L.string().optional(),aiDecision:L.string().optional(),aiAction:L.string().optional(),eHumanAction:L.string(),eHumanComment:L.string(),auditDrift:L.boolean().default(!1),auditDriftReason:L.string().optional(),operator:D5.optional()})});function $A0($,Y){let z=j$($.domain||"https://app.ekuaibao.com");return G5.create({prefix:z,timeout:30000,searchParams:{accessToken:$.accessToken},headers:{...Y},hooks:{beforeError:[async({error:U})=>{let Q=U instanceof D6?await U.response.text().catch(()=>""):"";return U.message=`${U.message}${Q?`: ${Q}`:""}`,U}]}})}async function tI($,Y){if($.source.type!=="hose")throw Error(`Unsupported Hose source type: ${$.source.type}. Expected 'hose'.`);let z=await lQ($);return $A0({domain:$.source.domain,accessToken:z},Y)}var gB=m(()=>{dQ();g7()});var yB=m(()=>{g7()});var YA0=m(()=>{gB();yB();gB();yB()});var g1,B9,b$,AN1,zA0,UA0,BN1,QA0,PN1,JA0,jN1,IA0,TN1,lc;var oc=m(()=>{P$();g1=L.preprocess(($)=>$===null?void 0:$,L.string().optional()),B9=L.preprocess(($)=>$===null?void 0:$,L.boolean().optional()),b$=L.preprocess(($)=>$===null?void 0:$,L.number().optional()),AN1=L.object({nodeId:g1,nodeName:g1,nextId:g1,nextName:g1,comment:g1,isUrgent:B9,isEbotNode:B9,isAuto:B9,isSkip:B9,skipped:B9,counterSign:B9,nextCounterSign:B9,complete:B9}).passthrough(),zA0=L.object({id:g1,action:g1,state:g1,operatorId:g1,nextOperatorId:g1,nextOperatorIds:L.preprocess(($)=>Array.isArray($)?$:[],L.array(L.string())).default([]),time:b$,attributes:L.preprocess(($)=>$===null?void 0:$,AN1.optional())}).passthrough(),UA0=L.object({code:g1,title:g1,submitterId:g1,submitDate:b$,expenseDate:b$,rejectionNum:L.preprocess(($)=>$===null?void 0:$,L.union([L.number(),L.string()]).optional()),reviewStatus:g1,specificationId:g1,payMoney:L.preprocess(($)=>$===null?void 0:$,L.record(L.string(),L.unknown()).optional()),expenseMoney:L.preprocess(($)=>$===null?void 0:$,L.record(L.string(),L.unknown()).optional()),details:L.preprocess(($)=>$===null?void 0:$,L.array(L.record(L.string(),L.unknown())).optional())}).passthrough(),BN1=L.object({id:L.string(),version:b$,state:g1,flowType:g1,formType:g1,ownerId:g1,createTime:b$,updateTime:b$,form:L.preprocess(($)=>$===null?void 0:$,UA0.optional()),logs:L.preprocess(($)=>Array.isArray($)?$:[],L.array(zA0)).default([]),actions:L.preprocess(($)=>$===null?void 0:$,L.record(L.string(),L.array(L.string())).optional())}).passthrough(),QA0=L.object({value:L.preprocess(($)=>$===null?void 0:$,BN1.optional())}).passthrough(),PN1=L.object({id:L.string(),flowId:g1,nodeId:g1,nodeName:g1,ownerId:g1,state:g1,logId:b$,action:g1,createTime:b$,updateTime:b$,isUrgent:B9}).passthrough(),JA0=L.object({count:L.preprocess(($)=>typeof $==="number"?$:0,L.number()).default(0),items:L.preprocess(($)=>Array.isArray($)?$:[],L.array(PN1)).default([])}).passthrough(),jN1=L.object({id:g1,flowId:g1,version:b$,state:g1,createTime:b$,updateTime:b$,form:L.preprocess(($)=>$===null?void 0:$,UA0.optional()),logs:L.preprocess(($)=>Array.isArray($)?$:[],L.array(zA0)).default([]),modifyFlowLog:L.preprocess(($)=>Array.isArray($)?$:void 0,L.array(L.record(L.string(),L.unknown())).optional())}).passthrough(),IA0=L.object({count:L.preprocess(($)=>typeof $==="number"?$:0,L.number()).default(0),items:L.preprocess(($)=>Array.isArray($)?$:[],L.array(jN1)).default([])}).passthrough(),TN1=L.object({id:L.string(),name:g1,enName:g1,nickName:g1,code:g1,cellphone:g1,email:g1,active:B9,userId:g1,defaultDepartment:g1}).passthrough(),lc=L.object({items:L.preprocess(($)=>Array.isArray($)?$:[],L.array(TN1)).default([])}).passthrough()});async function KA0($,Y){try{let z=await $.get("api/openapi/v1.1/flowDetails",{searchParams:{flowId:Y}}).json();return QA0.parse(z).value}catch(z){if(z instanceof D6&&(z.response.status===404||z.response.status===412))return;throw z}}async function GA0($,Y){try{let z=await $.get("api/openapi/v1.1/flowDetails/allLogs",{searchParams:{flowId:Y}}).json();return JA0.parse(z).items}catch(z){if(z instanceof D6&&(z.response.status===404||z.response.status===412))return[];throw z}}async function HA0($,Y,z){try{let U=await $.get("api/openapi/v1/flow/versioned",{searchParams:{flow_id:Y,pageNum:z?.pageNum??1,pageSize:z?.pageSize??20,convertFeeType:z?.convertFeeType??!0}}).json();return IA0.parse(U).items}catch(U){if(U instanceof D6&&(U.response.status===404||U.response.status===412))return[];throw U}}async function EN1($,Y){if(!Y.conditionIds||Y.conditionIds.length===0)return[];try{let z=await $.post("api/openapi/v1/staffs/getStaffIds",{json:{type:Y.type,conditionIds:Y.conditionIds.slice(0,100)}}).json();return lc.parse(z).items}catch(z){if(Y.conditionIds.length>1){let U=[];for(let Q of Y.conditionIds)try{let J=await $.post("api/openapi/v1/staffs/getStaffIds",{json:{type:Y.type,conditionIds:[Q]}}).json(),I=lc.parse(J);U.push(...I.items)}catch{}return U}return[]}}async function rc($,Y,z){let[U,Q,J]=await Promise.all([KA0($,Y),GA0($,Y).catch(()=>[]),HA0($,Y).catch(()=>[])]),I=z??new Map,K=[],G=(W)=>{if(W&&typeof W==="string"&&W!=="ebot"&&!I.has(W))K.push(W)};for(let W of Q)G(W.ownerId);for(let W of U?.logs||[])G(W.operatorId),G(W.nextOperatorId);let H=[...new Set(K)];if(H.length>0)try{let W=await EN1($,{type:"STAFFID",conditionIds:H});for(let X of W){if(X.id)I.set(X.id,X);if(X.cellphone)I.set(X.cellphone,X)}}catch{}return{flowDetails:U,allLogs:Q,versions:J,staffMap:I}}var sc=m(()=>{dQ();oc()});var CN1,Q14,J14;var ac=m(()=>{P$();CN1=L.object({id:L.string(),state:L.string().optional(),nodeName:L.string().optional(),flowId:L.record(L.string(),L.unknown()).optional(),nodeState:L.record(L.string(),L.unknown()).optional()}).passthrough(),Q14=L.object({count:L.number().optional(),items:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),J14=L.object({value:L.record(L.string(),L.unknown()).optional(),items:L.array(L.record(L.string(),L.unknown())).optional()}).passthrough()});var kB=m(()=>{ac()});var XA0=m(()=>{sc();kB();kB()});var tc=m(()=>{oc();gB();sc()});var ec=m(()=>{ac();yB();kB()});function xN1($){if(!$||typeof $!=="string")return;let Y=$.replace(/<[^>]*>/g,"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/ /g," ").trim();return Y.length>0?Y:void 0}function fN1($){if(!$)return;return tD0[$]||$}function VA0($){if(!$)return;return eD0[$.toUpperCase()]||$}function RZ($){if(typeof $==="string"){let J=$.trim();return J?{id:J}:void 0}if(!$||typeof $!=="object")return;let Y=$;if(Y.signerId&&typeof Y.signerId==="object")Y=Y.signerId;let z=typeof Y.id==="string"?Y.id.trim():void 0,U=typeof Y.name==="string"&&Y.name.trim()?Y.name.trim():typeof Y.nickName==="string"&&Y.nickName.trim()?Y.nickName.trim():void 0,Q=typeof Y.code==="string"&&Y.code.trim()?Y.code.trim():void 0;if(!z&&!U&&!Q)return;return{id:z,name:U,code:Q}}function uN1($,Y){if(Y?.isEbotNode===!0)return!0;if(`${$?.id||""} ${$?.name||""}`.toLowerCase().includes("ebot"))return!0;if($?.name?.includes("智能审批")||$?.name?.includes("AI审批"))return!0;if(typeof Y?.nodeName==="string"&&(Y.nodeName.toLowerCase().includes("ebot")||Y.nodeName.includes("智能审批")))return!0;return!1}function bN1($,Y=!1,z=!1){if(z)return{id:$?.id||"ebot",name:"Ebot (智能审批)",code:$?.code};if(!$&&Y)return{id:"system",name:"系统自动"};return $}function iN1($,Y,z,U){let J=[...Array.isArray($)?$.filter((G)=>Boolean(G&&typeof G==="object")):[]].sort((G,H)=>(Number(G.time)||0)-(Number(H.time)||0)),I=(G)=>{if(!G)return;let H=RZ(G);if(!H)return;if(!H.name&&Y&&H.id){let W=H.id.split(":"),X=Y.get(H.id)||(W.length>1&&W[1]?Y.get(W[1]):void 0);if(X?.name)return{...H,name:X.name,code:X.code||H.code}}return H},K=[];for(let G=0;Gy&&typeof y==="object"&&y.ownerId===x&&typeof y.nodeName==="string");if(e?.nodeName)t=String(e.nodeName).trim()}K.push({id:typeof n.flowVersionedId==="string"?`modify-${n.flowVersionedId}`:void 0,time:U0,state:"审批中",rawState:"MODIFY",action:"修改了单据",rawAction:"flow.modify",nodeName:t,comment:"修改了单据",rawComment:"修改了单据",automatic:!1,isEbot:!1,skipped:!1,isModification:!0,operator:d,nextOperators:[]})}}let Z=RZ(H.operatorId),q=uN1(Z,W),V=Boolean(W.isEbotNode===!0||W.isAuto===!0||H.action==="freeflow.autoAgree"||!H.operatorId||q),F=bN1(Z,V,q);if(F&&!F.name&&Y&&F.id){let n=I(F.id);if(n?.name)F=n}let w=typeof H.action==="string"?H.action:void 0,O=fN1(w),N=typeof H.state==="string"?H.state:void 0,M=VA0(N),D,P,j,A;if(w==="freeflow.reject"){let n;if(Array.isArray(z)){let t=z.find((e)=>e&&typeof e==="object"&&e.action==="freeflow.reject"&&(e.ownerId===H.operatorId||Math.abs((Number(e.updateTime)||0)-(X||0))<2000));if(t&&typeof t.nodeName==="string")n=t.nodeName.trim()}if(!n&&W.nodeId){let t=J.find((e)=>e&&typeof e==="object"&&e.attributes?.nodeId===W.nodeId&&e.action!=="freeflow.reject"&&e.attributes?.nodeName);if(t)n=String(t.attributes.nodeName).trim()}if(!n){let t=typeof H.operatorId==="object"?H.operatorId?.id:H.operatorId,e=J.find((y)=>{return(typeof y.operatorId==="object"?y.operatorId?.id:y.operatorId)===t&&y.action!=="freeflow.reject"&&y.attributes?.nodeName});if(e)n=String(e.attributes.nodeName).trim();else if(W.nodeName&&W.nodeName!=="提交人")n=String(W.nodeName).trim()}D=n||"审批节点",P=typeof W.nodeName==="string"&&W.nodeName?W.nodeName.trim():typeof W.nextName==="string"&&W.nextName?W.nextName.trim():"提交人";let U0=typeof H.nextOperatorId==="string"?H.nextOperatorId:void 0;if(U0)j=I(U0);if((!j||!j.name)&&(P==="提交人"||P.includes("提交"))&&U)j=I(U);let x=String(W.resubmitMethod||"").toUpperCase(),d=F?.name||"原审批人";if(x==="TO_REJECTOR")A=`重新提交后由${d}继续审批`;else if(x==="START_OVER"||x==="TO_START"||x==="ALL"||x==="RE_START")A="重新提交后重新全流程审批";else if(x==="NEXT_NODE")A="重新提交后流转至下一节点";else A=`重新提交后由${d}继续审批`}else D=typeof W.nodeName==="string"&&W.nodeName?W.nodeName:typeof W.nextName==="string"&&W.nextName?W.nextName:O==="打印单据"?"打印提醒":void 0;let T=typeof W.comment==="string"?W.comment:void 0,C=xN1(T),b=Boolean(W.isSkip===!0||W.skipped===!0||N==="SKIPPED"),S=(Array.isArray(H.nextOperatorIds)?H.nextOperatorIds:H.nextOperatorId?[H.nextOperatorId]:[]).map(I).filter((n)=>Boolean(n)),i=typeof W.nodeId==="string"&&W.nodeId?W.nodeId:typeof H.nodeId==="string"&&H.nodeId?H.nodeId:void 0;K.push({id:typeof H.id==="string"?H.id:void 0,nodeId:i,time:X,state:M,rawState:N,action:O,rawAction:w,nodeName:D,comment:C,rawComment:T,automatic:V,isEbot:q,skipped:b,operator:F,nextOperators:S,rejectTargetNodeName:P,rejectTargetOperator:j,resubmitRuleText:A,isModification:!1})}K.sort((G,H)=>(Number(G.time)||0)-(Number(H.time)||0));for(let G=0;G=H.time)H.durationMs=W.time-H.time}return K}function nN1($,Y){return $.filter((U)=>{let Q=String(U.state||"").toUpperCase();if(Q==="CANCELED"||Q==="CANCELLED"||Q==="PROCESSED"||Q==="COMPLETED"||Q==="PAID")return!1;return U.logId===-1||Q==="APPROVING"||Q==="PROCESSING"||Q==="PAYING"}).map((U,Q)=>{let J=RZ(U.ownerId);if(J&&!J.name&&Y&&U.ownerId){let I=U.ownerId.split(":"),K=Y.get(U.ownerId)||(I.length>1&&I[1]?Y.get(I[1]):void 0);if(K?.name)J={...J,name:K.name,code:K.code||J.code}}return{id:U.nodeId||U.id,name:U.nodeName,type:U.state,state:Q===0?"当前":"后续",isCurrent:Q===0,approver:J,approvers:J?[J]:[]}})}function cN1($,Y,z,U){let Q=$.form&&typeof $.form==="object"?$.form:{},J=Y.filter((O)=>O.rawAction==="freeflow.reject"||O.rawState==="REJECTED"||O.action==="审批驳回"),I=typeof Q.rejectionNum==="number"?Q.rejectionNum:typeof Q.rejectionNum==="string"?parseInt(Q.rejectionNum,10)||void 0:void 0,K=I!==void 0?I:J.length,G=Y.filter((O)=>O.rawAction==="freeflow.submit"||O.rawState==="SUBMITTED"||O.action==="提交送审"),H=typeof Q.submitCount==="number"?Q.submitCount:void 0,W=U&&U.length>0?U.length:void 0,X=H!==void 0?H:W!==void 0?Math.max(W,G.length,1):Math.max(1,G.length),Z=Y.filter((O)=>O.rawAction==="freeflow.retract"||O.rawState==="REVOKED"||O.action==="单据撤回"),q=Z.length,V=Q.sourceFlowVersion??$.sourceFlowVersion??Q.version??$.version,F=!1;if(K>0||J.length>0){let O=Math.max(...J.map((T)=>T.time??0),0),N=Y.some((T)=>(T.time??0)>O&&(T.rawAction==="freeflow.submit"||T.rawState==="SUBMITTED"||T.action==="提交送审")),M=Y.some((T)=>(T.time??0)>O&&T.rawAction!=="freeflow.reject"&&T.rawAction!=="freeflow.print"),P=String(z?.state??$.state??"").toUpperCase()==="REJECTED"||J.length>0&&Y.at(-1)?.rawAction==="freeflow.reject",j=typeof Q.submitDate==="number"?Q.submitDate:0,A=typeof Q.updateTime==="number"?Q.updateTime:typeof $.updateTime==="number"?$.updateTime:0;F=N||!P&&(M||j>O||A>O||X>K)}let w=!1;if(q>0){let O=Math.max(...Z.map((j)=>j.time??0),0),N=Y.some((j)=>(j.time??0)>O&&(j.rawAction==="freeflow.submit"||j.rawState==="SUBMITTED"||j.action==="提交送审")),D=String(z?.state??$.state??"").toUpperCase()==="REVOKED"||Z.length>0&&Y.at(-1)?.rawAction==="freeflow.retract",P=typeof Q.updateTime==="number"?Q.updateTime:typeof $.updateTime==="number"?$.updateTime:0;w=N||!D&&(X>1||P>O)}return{rejectionNum:K,submitCount:X,sourceFlowVersion:typeof V==="string"||typeof V==="number"?V:void 0,isModifiedAfterReject:F,retractCount:q,isResubmittedAfterRetract:w}}function pN1($){return $.filter((Y)=>Boolean(Y.comment&&Y.comment.trim())).map((Y)=>({nodeName:Y.nodeName,operator:Y.operator,action:Y.action,rawAction:Y.rawAction,time:Y.time,comment:Y.comment,isEbot:Y.isEbot}))}function dN1($){return $.filter((Y)=>Y.rawAction==="freeflow.reject"||Y.rawState==="REJECTED"||Y.action==="审批驳回").map((Y)=>({time:Y.time,nodeName:Y.nodeName,operator:Y.operator,isEbot:Y.isEbot,reason:Y.comment||"未填写驳回原因",rawComment:Y.rawComment,fromNodeName:Y.nodeName,targetNodeName:Y.rejectTargetNodeName,targetOperator:Y.rejectTargetOperator,resubmitRuleText:Y.resubmitRuleText}))}function mN1($,Y){let{flowDetails:z,allLogs:U,versions:Q,staffMap:J}=$;if(!z)return;let I=z.form||{},K=typeof I.submitterId==="string"?I.submitterId:typeof z.ownerId==="string"?z.ownerId:void 0,G=iN1(z.logs||[],J,U,K),H=z.state,W=VA0(H),X=String(H||"").toUpperCase(),q=["COMPLETED","APPROVED","PAID","REVOKED","CANCELED","CANCELLED","REJECTED"].includes(X)?[]:nN1(U,J),V=q.find((M)=>M.isCurrent)?.name,F=cN1(z,G,void 0,Q),w=pN1(G),O=dN1(G),N;if(I.specificationId&&typeof I.specificationId==="object"){let M=I.specificationId;N={id:typeof M.id==="string"?M.id:void 0,name:typeof M.name==="string"?M.name:void 0,code:typeof M.code==="string"?M.code:void 0}}else if(typeof I.specificationId==="string")N={id:I.specificationId};return{backlogId:z.id||Y||"",flowId:z.id,billCode:typeof I.code==="string"?I.code:void 0,title:typeof I.title==="string"?I.title:void 0,state:W,rawState:H,currentNode:V,specification:N,submitter:RZ(I.submitterId),owner:RZ(z.ownerId||I.ownerId),submitDate:typeof I.submitDate==="number"?I.submitDate:void 0,updateTime:typeof I.updateTime==="number"?I.updateTime:typeof z.updateTime==="number"?z.updateTime:void 0,history:G,pending:q,metrics:F,staffOpinions:w,rejections:O,raw:z}}async function xB($,Y,z){let U=await rc($,Y,z);return mN1(U,Y)}function ZA0($){if(!$)return"-";let Y=$.toUpperCase();if(Y==="APPROVE"||Y==="通过")return"通过";if(Y==="EXEMPT_APPROVE"||Y==="免审通过"||Y==="备注通过")return"备注通过";if(Y==="REVIEW"||Y==="转交复核")return"转交复核";if(Y==="REJECT"||Y==="驳回")return"驳回";if(Y==="ERROR"||Y==="错误")return"错误";return $}function eI($){let Y=[];for(let z of $){if(z.rawAction==="freeflow.carbonCopy"||z.rawAction==="freeflow.cc"||z.action==="抄送单据"||z.action==="抄送通知")continue;if((z.rawAction==="freeflow.print"||z.action==="打印提醒"||z.action==="打印单据")&&!z.comment)continue;let U=z.operator?.name||z.operator?.id||"未知",Q=z.rawAction==="freeflow.retract"||z.action==="单据撤回",J=z.nodeName?.trim()?`${z.nodeName.trim()}(${U})`:Q?`提交人(${U})`:U,I=z.comment;if(!I)if(z.rawAction==="flow.modify"||z.action==="修改了单据"||z.isModification)I="修改了单据";else if(z.rawAction==="freeflow.agree"||z.action==="审批同意")I="同意";else if(z.rawAction==="freeflow.autoAgree")I="自动同意";else if(z.rawAction==="freeflow.pay"||z.action==="支付成功"||z.action==="支付完成")I="支付成功";else if(z.rawAction==="freeflow.paying"||z.action==="发起支付"||z.action==="支付中")I="发起支付";else if(z.rawAction==="freeflow.reject"||z.action==="审批驳回")I="驳回";else if(z.rawAction==="freeflow.back"||z.action==="审批退回")I="退回修改";else if(z.rawAction==="freeflow.retract"||z.action==="单据撤回")I="单据撤回";else I=z.action||"-";let K="";if(z.rawAction==="flow.modify"||z.action==="修改了单据"||z.isModification||I==="修改了单据")K="✏️";else if(z.rawAction==="freeflow.autoAgree"||z.action==="自动同意"||I==="自动同意"||z.automatic)K="\uD83E\uDD16";else if(z.rawAction==="freeflow.retract"||z.action==="单据撤回"||I==="单据撤回")K="↩️";else if(z.rawAction==="freeflow.reject"||z.action==="审批驳回"||z.rawAction==="freeflow.back"||z.action==="审批退回"||I==="驳回"||I==="退回修改")K="❌";else if((z.rawAction==="freeflow.pay"||z.action==="支付成功"||z.action==="支付完成")&&(I==="支付成功"||I==="支付完成"||!I))K="\uD83D\uDCB0";else if(z.rawAction==="freeflow.addnode"||z.action?.includes("加签")||z.action?.includes("转交")||z.action?.includes("转办")||I?.includes("转交")||I?.includes("加签"))K="\uD83D\uDD00";else if(z.rawAction==="freeflow.paying"||z.rawAction==="freeflow.comment"||z.action==="发表评论"||z.action==="添加评论"||z.rawAction==="freeflow.pay"&&I!=="支付成功")K="\uD83D\uDCAC";let G=K?` ${K}`:"",H=`${J}${G}: ${I}`;if(Y.length===0||Y[Y.length-1]!==H)Y.push(H)}return Y}function $K($,Y=[],z="forward"){if($.length===0&&Y.length===0)return"-";if(z==="forward"){let J=[...$,...Y].map((G,H)=>`${H+1}. ${G}`),I=J.filter((G)=>G.includes("修改了单据")),K=J.filter((G)=>!G.includes("修改了单据"));return[...I,...K].join(` + */var V4=I0("fs"),hB=I0("os"),C6=I0("path"),MD0=I0("crypto"),A9={fs:V4.constants,os:hB.constants},BD0=/XXXXXX/,PD0=(A9.O_CREAT||A9.fs.O_CREAT)|(A9.O_EXCL||A9.fs.O_EXCL)|(A9.O_RDWR||A9.fs.O_RDWR),BM1=hB.platform()==="win32",PM1=A9.EBADF||A9.os.errno.EBADF,jM1=A9.ENOENT||A9.os.errno.ENOENT,sI=[],jD0=V4.rmdirSync.bind(V4),TD0=!1;function TM1($,Y){return V4.rm($,{recursive:!0},Y)}function ED0($){return V4.rmSync($,{recursive:!0})}function nc($,Y){let z=aI($,Y),U=z[0],Q=z[1];kM1(U,function(J,I){if(J)return Q(J);let K=I.tries;(function G(){try{let H=RD0(I);V4.stat(H,function(W){if(!W){if(K-- >0)return G();return Q(Error("Could not get a unique tmp filename, max tries reached "+H))}Q(null,H)})}catch(H){Q(H)}})()})}function cc($){let Y=aI($),z=Y[0],U=xM1(z),Q=U.tries;do{let J=RD0(U);try{V4.statSync(J)}catch(I){return J}}while(Q-- >0);throw Error("Could not get a unique tmp filename, max tries reached")}function EM1($,Y){let z=aI($,Y),U=z[0],Q=z[1];nc(U,function(I,K){if(I)return Q(I);V4.open(K,PD0,U.mode||384,function(H,W){if(H)return Q(H);if(U.discardDescriptor)return V4.close(W,function(Z){return Q(Z,K,void 0,bc(K,-1,U,!1))});else{let X=U.discardDescriptor||U.detachDescriptor;Q(null,K,W,bc(K,X?-1:W,U,!1))}})})}function CM1($){let Y=aI($),z=Y[0],U=z.discardDescriptor||z.detachDescriptor,Q=cc(z),J=V4.openSync(Q,PD0,z.mode||384);if(z.discardDescriptor)V4.closeSync(J),J=void 0;return{name:Q,fd:J,removeCallback:bc(Q,U?-1:J,z,!0)}}function RM1($,Y){let z=aI($,Y),U=z[0],Q=z[1];nc(U,function(I,K){if(I)return Q(I);V4.mkdir(K,U.mode||448,function(H){if(H)return Q(H);Q(null,K,CD0(K,U,!1))})})}function _M1($){let Y=aI($),z=Y[0],U=cc(z);return V4.mkdirSync(U,z.mode||448),{name:U,removeCallback:CD0(U,z,!0)}}function vM1($,Y){let z=function(U){if(U&&!ic(U))return Y(U);Y()};if(0<=$[0])V4.close($[0],function(){V4.unlink($[1],z)});else V4.unlink($[1],z)}function hM1($){let Y=null;try{if(0<=$[0])V4.closeSync($[0])}catch(z){if(!fM1(z)&&!ic(z))throw z}finally{try{V4.unlinkSync($[1])}catch(z){if(!ic(z))Y=z}}if(Y!==null)throw Y}function bc($,Y,z,U){let Q=vB(hM1,[Y,$],U),J=vB(vM1,[Y,$],U,Q);if(!z.keep)sI.unshift(Q);return U?Q:J}function CD0($,Y,z){let U=Y.unsafeCleanup?TM1:V4.rmdir.bind(V4),Q=Y.unsafeCleanup?ED0:jD0,J=vB(Q,$,z),I=vB(U,$,z,J);if(!Y.keep)sI.unshift(J);return z?J:I}function vB($,Y,z,U){let Q=!1;return function J(I){if(!Q){let K=U||J,G=sI.indexOf(K);if(G>=0)sI.splice(G,1);if(Q=!0,z||$===jD0||$===ED0)return $(Y);else return $(Y,I||function(){})}}}function SM1(){if(!TD0)return;while(sI.length)try{sI[0]()}catch($){}}function ND0($){let Y=[],z=null;try{z=MD0.randomBytes($)}catch(U){z=MD0.pseudoRandomBytes($)}for(let U=0;U<$;U++)Y.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[z[U]%62]);return Y.join("")}function s8($){return typeof $>"u"}function aI($,Y){if(typeof $==="function")return[{},$];if(s8($))return[{},Y];let z={};for(let U of Object.getOwnPropertyNames($))z[U]=$[U];return[z,Y]}function gM1($,Y,z){let U=C6.isAbsolute($)?$:C6.join(Y,$);V4.stat(U,function(Q){if(Q)V4.realpath(C6.dirname(U),function(J,I){if(J)return z(J);z(null,C6.join(I,C6.basename(U)))});else V4.realpath(U,z)})}function yM1($,Y){let z=C6.isAbsolute($)?$:C6.join(Y,$);try{return V4.statSync(z),V4.realpathSync(z)}catch(U){let Q=V4.realpathSync(C6.dirname(z));return C6.join(Q,C6.basename(z))}}function RD0($){let Y=$.tmpdir;if(!s8($.name))return C6.join(Y,$.dir,$.name);if(!s8($.template))return C6.join(Y,$.dir,$.template).replace(BD0,ND0(6));let z=[$.prefix?$.prefix:"tmp","-",process.pid,"-",ND0(12),$.postfix?"-"+$.postfix:""].join("");return C6.join(Y,$.dir,z)}function uc($,Y){if(typeof Y!=="string")throw Error(`${$} option must be a string, got "${typeof Y}".`);if(Y.includes(".."))throw Error("Relative value not allowed");return Y}function _D0($){if(!s8($.name)){let Y=$.name;if(C6.isAbsolute(Y))throw Error(`name option must not contain an absolute path, found "${Y}".`);let z=C6.basename(Y);if(z===".."||z==="."||z!==Y)throw Error(`name option must not contain a path, found "${Y}".`)}if(!s8($.template)){if(typeof $.template!=="string")throw Error(`template option must be a string, got "${typeof $.template}".`);if(!$.template.match(BD0))throw Error(`Invalid template, found "${$.template}".`)}if(!s8($.tries)&&isNaN($.tries)||$.tries<0)throw Error(`Invalid tries, found "${$.tries}".`);$.tries=s8($.name)?$.tries||3:1,$.keep=!!$.keep,$.detachDescriptor=!!$.detachDescriptor,$.discardDescriptor=!!$.discardDescriptor,$.unsafeCleanup=!!$.unsafeCleanup,$.prefix=s8($.prefix)?"":uc("prefix",$.prefix),$.postfix=s8($.postfix)?"":uc("postfix",$.postfix),$.template=s8($.template)?void 0:uc("template",$.template)}function DD0($,Y,z,U){if(s8(Y))return U(null);gM1(Y,z,function(Q,J){if(Q)return U(Q);let I=C6.relative(z,J);if(I.startsWith("..")||C6.isAbsolute(I))return U(Error(`${$} option must be relative to "${z}", found "${I}".`));U(null,I)})}function AD0($,Y,z){if(s8(Y))return;let U=yM1(Y,z),Q=C6.relative(z,U);if(Q.startsWith("..")||C6.isAbsolute(Q))throw Error(`${$} option must be relative to "${z}", found "${Q}".`);return Q}function kM1($,Y){bM1($,function(z,U){if(z)return Y(z);$.tmpdir=U;try{_D0($,U)}catch(Q){return Y(Q)}DD0("dir",$.dir,U,function(Q,J){if(Q)return Y(Q);$.dir=s8(J)?"":J,DD0("template",$.template,U,function(I,K){if(I)return Y(I);$.template=K,Y(null,$)})})})}function xM1($){let Y=$.tmpdir=hD0($);_D0($,Y);let z=AD0("dir",$.dir,Y);return $.dir=s8(z)?"":z,$.template=AD0("template",$.template,Y),$}function fM1($){return vD0($,-PM1,"EBADF")}function ic($){return vD0($,-jM1,"ENOENT")}function vD0($,Y,z){return BM1?$.code===z:$.code===z&&$.errno===Y}function uM1(){TD0=!0}function bM1($,Y){return V4.realpath($&&$.tmpdir||hB.tmpdir(),Y)}function hD0($){return V4.realpathSync($&&$.tmpdir||hB.tmpdir())}process.addListener("exit",SM1);Object.defineProperty(iM1,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return hD0()}});iM1.dir=RM1;iM1.dirSync=_M1;iM1.file=EM1;iM1.fileSync=CM1;iM1.tmpName=nc;iM1.tmpNameSync=cc;iM1.setGracefulCleanup=uM1});var yD0=E((T04,gD0)=>{gD0.exports=async function*(Y){let z=[];Y.on("data",(K)=>z.push(K));let U,Q=new Promise((K)=>U=K),J=!1;Y.on("end",()=>{J=!0,U()});let I=!1;Y.on("error",(K)=>{I=K,U()});while(!J||z.length>0){if(z.length===0)Y.resume(),await Promise.race([rM1(Y,"data"),Q]);else Y.pause(),yield z.shift();if(I)throw I}U()};function rM1($,Y){return new Promise((z)=>{let U=!1,Q=()=>{if(!U)U=!0,$.removeListener(Y,Q),z()};$.addListener(Y,Q)})}});var bD0=E((E04,uD0)=>{var{EventEmitter:sM1}=I0("events"),aM1=yW(),tM1=Y6(),SB=Z8(),kD0=n4(),eM1=z3(),$N1=gw(),xD0=kw();class fD0 extends sM1{constructor({workbook:$,id:Y,iterator:z,options:U}){super();this.workbook=$,this.id=Y,this.iterator=z,this.options=U||{},this.name=`Sheet${this.id}`,this._columns=null,this._keys={},this._dimensions=new eM1}destroy(){throw Error("Invalid Operation: destroy")}get dimensions(){return this._dimensions}get columns(){return this._columns}getColumn($){if(typeof $==="string"){let Y=this._keys[$];if(Y)return Y;$=kD0.l2n($)}if(!this._columns)this._columns=[];if($>this._columns.length){let Y=this._columns.length+1;while(Y<=$)this._columns.push(new xD0(this,Y++))}return this._columns[$-1]}getColumnKey($){return this._keys[$]}setColumnKey($,Y){this._keys[$]=Y}deleteColumnKey($){delete this._keys[$]}eachColumnKey($){tM1.each(this._keys,$)}async read(){try{for await(let $ of this.parse())for(let{eventType:Y,value:z}of $)this.emit(Y,z);this.emit("finished")}catch($){this.emit("error",$)}}async*[Symbol.asyncIterator](){for await(let $ of this.parse())for(let{eventType:Y,value:z}of $)if(Y==="row")yield z}async*parse(){let{iterator:$,options:Y}=this,z=!1,U=!1,Q=null;switch(Y.worksheets){case"emit":z=!0;break;case"prep":break;default:break}switch(Y.hyperlinks){case"emit":U=!0;break;case"cache":this.hyperlinks=Q={};break;default:break}if(!z&&!U&&!Q)return;let{sharedStrings:J,styles:I,properties:K}=this.workbook,G=!1,H=!1,W=!1,X=null,Z=null,q=null,V=null;for await(let F of aM1($)){let w=[];for(let{eventType:O,value:N}of F)if(O==="opentag"){let M=N;if(z)switch(M.name){case"cols":G=!0,X=[];break;case"sheetData":H=!0;break;case"col":if(G)X.push({min:parseInt(M.attributes.min,10),max:parseInt(M.attributes.max,10),width:parseFloat(M.attributes.width),styleId:parseInt(M.attributes.style||"0",10)});break;case"row":if(H){let D=parseInt(M.attributes.r,10);if(Z=new $N1(this,D),M.attributes.ht)Z.height=parseFloat(M.attributes.ht);if(M.attributes.s){let P=parseInt(M.attributes.s,10),j=I.getStyleModel(P);if(j)Z.style=j}}break;case"c":if(Z)q={ref:M.attributes.r,s:parseInt(M.attributes.s,10),t:M.attributes.t};break;case"f":if(q)V=q.f={text:""};break;case"v":if(q)V=q.v={text:""};break;case"is":case"t":if(q)V=q.v={text:""};break;case"mergeCell":break;default:break}if(U||Q)switch(M.name){case"hyperlinks":W=!0;break;case"hyperlink":if(W){let D={ref:M.attributes.ref,rId:M.attributes["r:id"]};if(U)w.push({eventType:"hyperlink",value:D});else Q[D.ref]=D}break;default:break}}else if(O==="text"){if(z){if(V)V.text+=N}}else if(O==="closetag"){let M=N;if(z)switch(M.name){case"cols":G=!1,this._columns=xD0.fromModel(X);break;case"sheetData":H=!1;break;case"row":this._dimensions.expandRow(Z),w.push({eventType:"row",value:Z}),Z=null;break;case"c":if(Z&&q){let D=kD0.decodeAddress(q.ref),P=Z.getCell(D.col);if(q.s){let j=I.getStyleModel(q.s);if(j)P.style=j}if(q.f){let j={formula:q.f.text};if(q.v)if(q.t==="str")j.result=SB.xmlDecode(q.v.text);else j.result=parseFloat(q.v.text);P.value=j}else if(q.v)switch(q.t){case"s":{let j=parseInt(q.v.text,10);if(J)P.value=J[j];else P.value={sharedString:j};break}case"inlineStr":case"str":P.value=SB.xmlDecode(q.v.text);break;case"e":P.value={error:q.v.text};break;case"b":P.value=parseInt(q.v.text,10)!==0;break;default:if(SB.isDateFmt(P.numFmt))P.value=SB.excelToDate(parseFloat(q.v.text),K.model&&K.model.date1904);else P.value=parseFloat(q.v.text);break}if(Q){let j=Q[q.ref];if(j)P.text=P.value,P.value=void 0,P.hyperlink=j}q=null}break;default:break}if(U||Q)switch(M.name){case"hyperlinks":W=!1;break;default:break}}if(w.length>0)yield w}}}uD0.exports=fD0});var cD0=E((C04,nD0)=>{var{EventEmitter:YN1}=I0("events"),zN1=yW(),UN1=H5(),QN1=Q2();class iD0 extends YN1{constructor({workbook:$,id:Y,iterator:z,options:U}){super();this.workbook=$,this.id=Y,this.iterator=z,this.options=U}get count(){return this.hyperlinks&&this.hyperlinks.length||0}each($){return this.hyperlinks.forEach($)}async read(){let{iterator:$,options:Y}=this,z=!1,U=null;switch(Y.hyperlinks){case"emit":z=!0;break;case"cache":this.hyperlinks=U={};break;default:break}if(!z&&!U){this.emit("finished");return}try{for await(let Q of zN1($))for(let{eventType:J,value:I}of Q)if(J==="opentag"){let K=I;if(K.name==="Relationship"){let G=K.attributes.Id;switch(K.attributes.Type){case QN1.Hyperlink:{let H={type:UN1.RelationshipType.Styles,rId:G,target:K.attributes.Target,targetMode:K.attributes.TargetMode};if(z)this.emit("hyperlink",H);else U[H.rId]=H}break;default:break}}}this.emit("finished")}catch(Q){this.emit("error",Q)}}}nD0.exports=iD0});var lD0=E((R04,mD0)=>{var pc=I0("fs"),{EventEmitter:JN1}=I0("events"),{PassThrough:IN1,Readable:KN1}=C8(),GN1=I0("stream"),HN1=wD0(),dD0=SD0(),WU=yD0(),WN1=yW(),pD0=qN(),XN1=MN(),ZN1=ON(),qN1=bD0(),VN1=cD0();dD0.setGracefulCleanup();class dc extends JN1{constructor($,Y={}){super();this.input=$,this.options={worksheets:"emit",sharedStrings:"cache",hyperlinks:"ignore",styles:"ignore",entries:"ignore",...Y},this.styles=new pD0,this.styles.init()}_getStream($){if($ instanceof GN1.Readable||$ instanceof KN1)return $;if(typeof $==="string")return pc.createReadStream($);throw Error(`Could not recognise input: ${$}`)}async read($,Y){try{for await(let{eventType:z,value:U}of this.parse($,Y))switch(z){case"shared-strings":this.emit(z,U);break;case"worksheet":this.emit(z,U),await U.read();break;case"hyperlinks":this.emit(z,U);break}this.emit("end"),this.emit("finished")}catch(z){this.emit("error",z)}}async*[Symbol.asyncIterator](){for await(let{eventType:$,value:Y}of this.parse())if($==="worksheet")yield Y}async*parse($,Y){if(Y)this.options=Y;let z=this.stream=this._getStream($||this.input),U=HN1.Parse({forceStream:!0});z.pipe(U);let Q=[];for await(let J of WU(U)){let I,K;switch(J.path){case"_rels/.rels":break;case"xl/_rels/workbook.xml.rels":await this._parseRels(J);break;case"xl/workbook.xml":await this._parseWorkbook(J);break;case"xl/sharedStrings.xml":yield*this._parseSharedStrings(J);break;case"xl/styles.xml":await this._parseStyles(J);break;default:if(J.path.match(/xl\/worksheets\/sheet\d+[.]xml/))if(I=J.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/),K=I[1],this.sharedStrings&&this.workbookRels)yield*this._parseWorksheet(WU(J),K);else await new Promise((G,H)=>{dD0.file((W,X,Z,q)=>{if(W)return H(W);Q.push({sheetNo:K,path:X,tempFileCleanupCallback:q});let V=pc.createWriteStream(X);return V.on("error",H),J.pipe(V),V.on("finish",()=>{return G()})})});else if(J.path.match(/xl\/worksheets\/_rels\/sheet\d+[.]xml.rels/))I=J.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),K=I[1],yield*this._parseHyperlinks(WU(J),K);break}J.autodrain()}for(let{sheetNo:J,path:I,tempFileCleanupCallback:K}of Q){let G=pc.createReadStream(I);if(!G[Symbol.asyncIterator])G=G.pipe(new IN1);yield*this._parseWorksheet(G,J),K()}}_emitEntry($){if(this.options.entries==="emit")this.emit("entry",$)}async _parseRels($){let Y=new ZN1;this.workbookRels=await Y.parseStream(WU($))}async _parseWorkbook($){this._emitEntry({type:"workbook"});let Y=new XN1;await Y.parseStream(WU($)),this.properties=Y.map.workbookPr,this.model=Y.model}async*_parseSharedStrings($){switch(this._emitEntry({type:"shared-strings"}),this.options.sharedStrings){case"cache":this.sharedStrings=[];break;case"emit":break;default:return}let Y=null,z=[],U=0,Q=null;for await(let J of WN1(WU($)))for(let{eventType:I,value:K}of J)if(I==="opentag"){let G=K;switch(G.name){case"b":Q=Q||{},Q.bold=!0;break;case"charset":Q=Q||{},Q.charset=parseInt(G.attributes.charset,10);break;case"color":if(Q=Q||{},Q.color={},G.attributes.rgb)Q.color.argb=G.attributes.argb;if(G.attributes.val)Q.color.argb=G.attributes.val;if(G.attributes.theme)Q.color.theme=G.attributes.theme;break;case"family":Q=Q||{},Q.family=parseInt(G.attributes.val,10);break;case"i":Q=Q||{},Q.italic=!0;break;case"outline":Q=Q||{},Q.outline=!0;break;case"rFont":Q=Q||{},Q.name=G.value;break;case"si":Q=null,z=[],Y=null;break;case"sz":Q=Q||{},Q.size=parseInt(G.attributes.val,10);break;case"strike":break;case"t":Y=null;break;case"u":Q=Q||{},Q.underline=!0;break;case"vertAlign":Q=Q||{},Q.vertAlign=G.attributes.val;break}}else if(I==="text")Y=Y?Y+K:K;else if(I==="closetag")switch(K.name){case"r":z.push({font:Q,text:Y}),Q=null,Y=null;break;case"si":if(this.options.sharedStrings==="cache")this.sharedStrings.push(z.length?{richText:z}:Y);else if(this.options.sharedStrings==="emit")yield{index:U++,text:z.length?{richText:z}:Y};z=[],Q=null,Y=null;break}}async _parseStyles($){if(this._emitEntry({type:"styles"}),this.options.styles==="cache")this.styles=new pD0,await this.styles.parseStream(WU($))}*_parseWorksheet($,Y){this._emitEntry({type:"worksheet",id:Y});let z=new qN1({workbook:this,id:Y,iterator:$,options:this.options}),U=(this.workbookRels||[]).find((J)=>J.Target===`worksheets/sheet${Y}.xml`),Q=U&&(this.model.sheets||[]).find((J)=>J.rId===U.Id);if(Q)z.id=Q.id,z.name=Q.name,z.state=Q.state;if(this.options.worksheets==="emit")yield{eventType:"worksheet",value:z}}*_parseHyperlinks($,Y){this._emitEntry({type:"hyperlinks",id:Y});let z=new VN1({workbook:this,id:Y,iterator:$,options:this.options});if(this.options.hyperlinks==="emit")yield{eventType:"hyperlinks",value:z}}}dc.Options={worksheets:["emit","ignore"],sharedStrings:["cache","emit","ignore"],hyperlinks:["cache","emit","ignore"],styles:["cache","ignore"],entries:["emit","ignore"]};mD0.exports=dc});var sD0=E((_04,rD0)=>{var oD0={Workbook:DH0(),ModelContainer:PH0(),stream:{xlsx:{WorkbookWriter:XF0(),WorkbookReader:lD0()}}};Object.assign(oD0,H5());rD0.exports=oD0});var CZ=E((v04,aD0)=>{if(parseInt(process.versions.node.split(".")[0],10)<10)throw Error("For node versions older than 10, please use the ES5 Import: https://github.com/exceljs/exceljs#es5-imports");aD0.exports=sD0()});var tD0,eD0,D5,LN1,FN1,ON1,wN1,MN1,S04,g04,y04,k04,x04;var mc=m(()=>{P$();tD0={"freeflow.submit":"提交送审","freeflow.agree":"审批同意","freeflow.autoAgree":"自动同意","freeflow.reject":"审批驳回","freeflow.back":"审批退回","freeflow.print":"打印单据","freeflow.retract":"单据撤回","freeflow.addnode":"加签/转交","freeflow.comment":"发表评论","freeflow.pay":"支付成功","freeflow.paying":"发起支付","freeflow.carbonCopy":"抄送单据","freeflow.cc":"抄送单据"},eD0={APPROVING:"审批中",APPROVED:"审批通过",REJECTED:"审批驳回",REVOKED:"已撤回",CANCELED:"已取消",CANCELLED:"已取消",SKIPPED:"已跳过",SUBMITTED:"已提交",PENDING:"待审批",WAITING:"待处理",COMPLETED:"已完成",DRAFT:"草稿",PAID:"已支付",PAYING:"支付中"},D5=L.object({id:L.string().optional(),name:L.string().optional(),code:L.string().optional()}),LN1=L.object({id:L.string().optional(),nodeId:L.string().optional(),time:L.number().optional(),durationMs:L.number().optional(),state:L.string().optional(),rawState:L.string().optional(),action:L.string().optional(),rawAction:L.string().optional(),nodeName:L.string().optional(),comment:L.string().optional(),rawComment:L.string().optional(),automatic:L.boolean().default(!1),isEbot:L.boolean().default(!1),skipped:L.boolean().default(!1),operator:D5.optional(),nextOperators:L.array(D5).default([]),rejectTargetNodeName:L.string().optional(),rejectTargetOperator:D5.optional(),resubmitRuleText:L.string().optional(),isModification:L.boolean().default(!1)}),FN1=L.object({id:L.string().optional(),name:L.string().optional(),type:L.string().optional(),state:L.enum(["当前","后续","已完成"]).default("后续"),isCurrent:L.boolean().default(!1),approver:D5.optional(),approvers:L.array(D5).default([])}),ON1=L.object({rejectionNum:L.number().int().nonnegative().default(0),submitCount:L.number().int().positive().default(1),sourceFlowVersion:L.union([L.string(),L.number()]).optional(),isModifiedAfterReject:L.boolean().default(!1),retractCount:L.number().int().nonnegative().default(0),isResubmittedAfterRetract:L.boolean().default(!1)}),wN1=L.object({nodeName:L.string().optional(),operator:D5.optional(),action:L.string().optional(),rawAction:L.string().optional(),time:L.number().optional(),comment:L.string(),isEbot:L.boolean().default(!1)}),MN1=L.object({time:L.number().optional(),nodeName:L.string().optional(),operator:D5.optional(),isEbot:L.boolean().default(!1),reason:L.string(),rawComment:L.string().optional(),fromNodeName:L.string().optional(),targetNodeName:L.string().optional(),targetOperator:D5.optional(),resubmitRuleText:L.string().optional()}),S04=L.object({backlogId:L.string(),flowId:L.string().optional(),billCode:L.string().optional(),title:L.string().optional(),state:L.string().optional(),rawState:L.string().optional(),currentNode:L.string().optional(),specification:L.object({id:L.string().optional(),name:L.string().optional(),code:L.string().optional()}).optional(),submitter:D5.optional(),owner:D5.optional(),submitDate:L.number().optional(),updateTime:L.number().optional(),history:L.array(LN1),pending:L.array(FN1),metrics:ON1,staffOpinions:L.array(wN1),rejections:L.array(MN1),raw:L.record(L.string(),L.unknown()).optional()}),g04=L.object({id:L.string(),state:L.string().optional(),nodeName:L.string().optional(),flowId:L.record(L.string(),L.unknown()).optional(),nodeState:L.record(L.string(),L.unknown()).optional()}).passthrough(),y04=L.object({count:L.number().optional(),items:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),k04=L.object({value:L.record(L.string(),L.unknown()).optional(),items:L.array(L.record(L.string(),L.unknown())).optional()}).passthrough(),x04=L.object({recordId:L.string(),sourceDocumentSN:L.string().optional(),taskMode:L.string().optional(),aiDecision:L.string().optional(),aiAction:L.string().optional(),eHumanAction:L.string(),eHumanComment:L.string(),auditDrift:L.boolean().default(!1),auditDriftReason:L.string().optional(),operator:D5.optional()})});function $A0($,Y){let z=j$($.domain||"https://app.ekuaibao.com");return G5.create({prefix:z,timeout:30000,searchParams:{accessToken:$.accessToken},headers:{...Y},hooks:{beforeError:[async({error:U})=>{let Q=U instanceof D6?await U.response.text().catch(()=>""):"";return U.message=`${U.message}${Q?`: ${Q}`:""}`,U}]}})}async function tI($,Y){if($.source.type!=="hose")throw Error(`Unsupported Hose source type: ${$.source.type}. Expected 'hose'.`);let z=await lQ($);return $A0({domain:$.source.domain,accessToken:z},Y)}var gB=m(()=>{dQ();g7()});var yB=m(()=>{g7()});var YA0=m(()=>{gB();yB();gB();yB()});var g1,B9,b$,AN1,zA0,UA0,BN1,QA0,PN1,JA0,jN1,IA0,TN1,lc;var oc=m(()=>{P$();g1=L.preprocess(($)=>$===null?void 0:$,L.string().optional()),B9=L.preprocess(($)=>$===null?void 0:$,L.boolean().optional()),b$=L.preprocess(($)=>$===null?void 0:$,L.number().optional()),AN1=L.object({nodeId:g1,nodeName:g1,nextId:g1,nextName:g1,comment:g1,isUrgent:B9,isEbotNode:B9,isAuto:B9,isSkip:B9,skipped:B9,counterSign:B9,nextCounterSign:B9,complete:B9}).passthrough(),zA0=L.object({id:g1,action:g1,state:g1,operatorId:g1,nextOperatorId:g1,nextOperatorIds:L.preprocess(($)=>Array.isArray($)?$:[],L.array(L.string())).default([]),time:b$,attributes:L.preprocess(($)=>$===null?void 0:$,AN1.optional())}).passthrough(),UA0=L.object({code:g1,title:g1,submitterId:g1,submitDate:b$,expenseDate:b$,rejectionNum:L.preprocess(($)=>$===null?void 0:$,L.union([L.number(),L.string()]).optional()),reviewStatus:g1,specificationId:g1,payMoney:L.preprocess(($)=>$===null?void 0:$,L.record(L.string(),L.unknown()).optional()),expenseMoney:L.preprocess(($)=>$===null?void 0:$,L.record(L.string(),L.unknown()).optional()),details:L.preprocess(($)=>$===null?void 0:$,L.array(L.record(L.string(),L.unknown())).optional())}).passthrough(),BN1=L.object({id:L.string(),version:b$,state:g1,flowType:g1,formType:g1,ownerId:g1,createTime:b$,updateTime:b$,form:L.preprocess(($)=>$===null?void 0:$,UA0.optional()),logs:L.preprocess(($)=>Array.isArray($)?$:[],L.array(zA0)).default([]),actions:L.preprocess(($)=>$===null?void 0:$,L.record(L.string(),L.array(L.string())).optional())}).passthrough(),QA0=L.object({value:L.preprocess(($)=>$===null?void 0:$,BN1.optional())}).passthrough(),PN1=L.object({id:L.string(),flowId:g1,nodeId:g1,nodeName:g1,ownerId:g1,state:g1,logId:b$,action:g1,createTime:b$,updateTime:b$,isUrgent:B9}).passthrough(),JA0=L.object({count:L.preprocess(($)=>typeof $==="number"?$:0,L.number()).default(0),items:L.preprocess(($)=>Array.isArray($)?$:[],L.array(PN1)).default([])}).passthrough(),jN1=L.object({id:g1,flowId:g1,version:b$,state:g1,createTime:b$,updateTime:b$,form:L.preprocess(($)=>$===null?void 0:$,UA0.optional()),logs:L.preprocess(($)=>Array.isArray($)?$:[],L.array(zA0)).default([]),modifyFlowLog:L.preprocess(($)=>Array.isArray($)?$:void 0,L.array(L.record(L.string(),L.unknown())).optional())}).passthrough(),IA0=L.object({count:L.preprocess(($)=>typeof $==="number"?$:0,L.number()).default(0),items:L.preprocess(($)=>Array.isArray($)?$:[],L.array(jN1)).default([])}).passthrough(),TN1=L.object({id:L.string(),name:g1,enName:g1,nickName:g1,code:g1,cellphone:g1,email:g1,active:B9,userId:g1,defaultDepartment:g1}).passthrough(),lc=L.object({items:L.preprocess(($)=>Array.isArray($)?$:[],L.array(TN1)).default([])}).passthrough()});async function KA0($,Y){try{let z=await $.get("api/openapi/v1.1/flowDetails",{searchParams:{flowId:Y}}).json();return QA0.parse(z).value}catch(z){if(z instanceof D6&&(z.response.status===404||z.response.status===412))return;throw z}}async function GA0($,Y){try{let z=await $.get("api/openapi/v1.1/flowDetails/allLogs",{searchParams:{flowId:Y}}).json();return JA0.parse(z).items}catch(z){if(z instanceof D6&&(z.response.status===404||z.response.status===412))return[];throw z}}async function HA0($,Y,z){try{let U=await $.get("api/openapi/v1/flow/versioned",{searchParams:{flow_id:Y,pageNum:z?.pageNum??1,pageSize:z?.pageSize??20,convertFeeType:z?.convertFeeType??!0}}).json();return IA0.parse(U).items}catch(U){if(U instanceof D6&&(U.response.status===404||U.response.status===412))return[];throw U}}async function EN1($,Y){if(!Y.conditionIds||Y.conditionIds.length===0)return[];try{let z=await $.post("api/openapi/v1/staffs/getStaffIds",{json:{type:Y.type,conditionIds:Y.conditionIds.slice(0,100)}}).json();return lc.parse(z).items}catch(z){if(Y.conditionIds.length>1){let U=[];for(let Q of Y.conditionIds)try{let J=await $.post("api/openapi/v1/staffs/getStaffIds",{json:{type:Y.type,conditionIds:[Q]}}).json(),I=lc.parse(J);U.push(...I.items)}catch{}return U}return[]}}async function rc($,Y,z){let[U,Q,J]=await Promise.all([KA0($,Y),GA0($,Y).catch(()=>[]),HA0($,Y).catch(()=>[])]),I=z??new Map,K=[],G=(W)=>{if(W&&typeof W==="string"&&W!=="ebot"&&!I.has(W))K.push(W)};for(let W of Q)G(W.ownerId);for(let W of U?.logs||[])G(W.operatorId),G(W.nextOperatorId);let H=[...new Set(K)];if(H.length>0)try{let W=await EN1($,{type:"STAFFID",conditionIds:H});for(let X of W){if(X.id)I.set(X.id,X);if(X.cellphone)I.set(X.cellphone,X)}}catch{}return{flowDetails:U,allLogs:Q,versions:J,staffMap:I}}var sc=m(()=>{dQ();oc()});var CN1,Q14,J14;var ac=m(()=>{P$();CN1=L.object({id:L.string(),state:L.string().optional(),nodeName:L.string().optional(),flowId:L.record(L.string(),L.unknown()).optional(),nodeState:L.record(L.string(),L.unknown()).optional()}).passthrough(),Q14=L.object({count:L.number().optional(),items:L.array(L.record(L.string(),L.unknown())).default([])}).passthrough(),J14=L.object({value:L.record(L.string(),L.unknown()).optional(),items:L.array(L.record(L.string(),L.unknown())).optional()}).passthrough()});var kB=m(()=>{ac()});var XA0=m(()=>{sc();kB();kB()});var tc=m(()=>{oc();gB();sc()});var ec=m(()=>{ac();yB();kB()});function xN1($){if(!$||typeof $!=="string")return;let Y=$.replace(/<[^>]*>/g,"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/ /g," ").trim();return Y.length>0?Y:void 0}function fN1($){if(!$)return;return tD0[$]||$}function VA0($){if(!$)return;return eD0[$.toUpperCase()]||$}function RZ($){if(typeof $==="string"){let J=$.trim();return J?{id:J}:void 0}if(!$||typeof $!=="object")return;let Y=$;if(Y.signerId&&typeof Y.signerId==="object")Y=Y.signerId;let z=typeof Y.id==="string"?Y.id.trim():void 0,U=typeof Y.name==="string"&&Y.name.trim()?Y.name.trim():typeof Y.nickName==="string"&&Y.nickName.trim()?Y.nickName.trim():void 0,Q=typeof Y.code==="string"&&Y.code.trim()?Y.code.trim():void 0;if(!z&&!U&&!Q)return;return{id:z,name:U,code:Q}}function uN1($,Y){if(Y?.isEbotNode===!0)return!0;if(`${$?.id||""} ${$?.name||""}`.toLowerCase().includes("ebot"))return!0;if($?.name?.includes("智能审批")||$?.name?.includes("AI审批"))return!0;if(typeof Y?.nodeName==="string"&&(Y.nodeName.toLowerCase().includes("ebot")||Y.nodeName.includes("智能审批")))return!0;return!1}function bN1($,Y=!1,z=!1){if(z)return{id:$?.id||"ebot",name:"Ebot (智能审批)",code:$?.code};if(!$&&Y)return{id:"system",name:"系统自动"};return $}function iN1($,Y,z,U){let J=[...Array.isArray($)?$.filter((G)=>Boolean(G&&typeof G==="object")):[]].sort((G,H)=>(Number(G.time)||0)-(Number(H.time)||0)),I=(G)=>{if(!G)return;let H=RZ(G);if(!H)return;if(!H.name&&Y&&H.id){let W=H.id.split(":"),X=Y.get(H.id)||(W.length>1&&W[1]?Y.get(W[1]):void 0);if(X?.name)return{...H,name:X.name,code:X.code||H.code}}return H},K=[];for(let G=0;Gg&&typeof g==="object"&&g.ownerId===x&&typeof g.nodeName==="string");if(e?.nodeName)t=String(e.nodeName).trim()}K.push({id:typeof n.flowVersionedId==="string"?`modify-${n.flowVersionedId}`:void 0,time:U0,state:"审批中",rawState:"MODIFY",action:"修改了单据",rawAction:"flow.modify",nodeName:t,comment:"修改了单据",rawComment:"修改了单据",automatic:!1,isEbot:!1,skipped:!1,isModification:!0,operator:d,nextOperators:[]})}}let Z=RZ(H.operatorId),q=uN1(Z,W),V=Boolean(W.isEbotNode===!0||W.isAuto===!0||H.action==="freeflow.autoAgree"||!H.operatorId||q),F=bN1(Z,V,q);if(F&&!F.name&&Y&&F.id){let n=I(F.id);if(n?.name)F=n}let w=typeof H.action==="string"?H.action:void 0,O=fN1(w),N=typeof H.state==="string"?H.state:void 0,M=VA0(N),D,P,j,A;if(w==="freeflow.reject"){let n;if(Array.isArray(z)){let t=z.find((e)=>e&&typeof e==="object"&&e.action==="freeflow.reject"&&(e.ownerId===H.operatorId||Math.abs((Number(e.updateTime)||0)-(X||0))<2000));if(t&&typeof t.nodeName==="string")n=t.nodeName.trim()}if(!n&&W.nodeId){let t=J.find((e)=>e&&typeof e==="object"&&e.attributes?.nodeId===W.nodeId&&e.action!=="freeflow.reject"&&e.attributes?.nodeName);if(t)n=String(t.attributes.nodeName).trim()}if(!n){let t=typeof H.operatorId==="object"?H.operatorId?.id:H.operatorId,e=J.find((g)=>{return(typeof g.operatorId==="object"?g.operatorId?.id:g.operatorId)===t&&g.action!=="freeflow.reject"&&g.attributes?.nodeName});if(e)n=String(e.attributes.nodeName).trim();else if(W.nodeName&&W.nodeName!=="提交人")n=String(W.nodeName).trim()}D=n||"审批节点",P=typeof W.nodeName==="string"&&W.nodeName?W.nodeName.trim():typeof W.nextName==="string"&&W.nextName?W.nextName.trim():"提交人";let U0=typeof H.nextOperatorId==="string"?H.nextOperatorId:void 0;if(U0)j=I(U0);if((!j||!j.name)&&(P==="提交人"||P.includes("提交"))&&U)j=I(U);let x=String(W.resubmitMethod||"").toUpperCase(),d=F?.name||"原审批人";if(x==="TO_REJECTOR")A=`重新提交后由${d}继续审批`;else if(x==="START_OVER"||x==="TO_START"||x==="ALL"||x==="RE_START")A="重新提交后重新全流程审批";else if(x==="NEXT_NODE")A="重新提交后流转至下一节点";else A=`重新提交后由${d}继续审批`}else D=typeof W.nodeName==="string"&&W.nodeName?W.nodeName:typeof W.nextName==="string"&&W.nextName?W.nextName:O==="打印单据"?"打印提醒":void 0;let T=typeof W.comment==="string"?W.comment:void 0,C=xN1(T),b=Boolean(W.isSkip===!0||W.skipped===!0||N==="SKIPPED"),S=(Array.isArray(H.nextOperatorIds)?H.nextOperatorIds:H.nextOperatorId?[H.nextOperatorId]:[]).map(I).filter((n)=>Boolean(n)),i=typeof W.nodeId==="string"&&W.nodeId?W.nodeId:typeof H.nodeId==="string"&&H.nodeId?H.nodeId:void 0;K.push({id:typeof H.id==="string"?H.id:void 0,nodeId:i,time:X,state:M,rawState:N,action:O,rawAction:w,nodeName:D,comment:C,rawComment:T,automatic:V,isEbot:q,skipped:b,operator:F,nextOperators:S,rejectTargetNodeName:P,rejectTargetOperator:j,resubmitRuleText:A,isModification:!1})}K.sort((G,H)=>(Number(G.time)||0)-(Number(H.time)||0));for(let G=0;G=H.time)H.durationMs=W.time-H.time}return K}function nN1($,Y){return $.filter((U)=>{let Q=String(U.state||"").toUpperCase();if(Q==="CANCELED"||Q==="CANCELLED"||Q==="PROCESSED"||Q==="COMPLETED"||Q==="PAID")return!1;return U.logId===-1||Q==="APPROVING"||Q==="PROCESSING"||Q==="PAYING"}).map((U,Q)=>{let J=RZ(U.ownerId);if(J&&!J.name&&Y&&U.ownerId){let I=U.ownerId.split(":"),K=Y.get(U.ownerId)||(I.length>1&&I[1]?Y.get(I[1]):void 0);if(K?.name)J={...J,name:K.name,code:K.code||J.code}}return{id:U.nodeId||U.id,name:U.nodeName,type:U.state,state:Q===0?"当前":"后续",isCurrent:Q===0,approver:J,approvers:J?[J]:[]}})}function cN1($,Y,z,U){let Q=$.form&&typeof $.form==="object"?$.form:{},J=Y.filter((O)=>O.rawAction==="freeflow.reject"||O.rawState==="REJECTED"||O.action==="审批驳回"),I=typeof Q.rejectionNum==="number"?Q.rejectionNum:typeof Q.rejectionNum==="string"?parseInt(Q.rejectionNum,10)||void 0:void 0,K=I!==void 0?I:J.length,G=Y.filter((O)=>O.rawAction==="freeflow.submit"||O.rawState==="SUBMITTED"||O.action==="提交送审"),H=typeof Q.submitCount==="number"?Q.submitCount:void 0,W=U&&U.length>0?U.length:void 0,X=H!==void 0?H:W!==void 0?Math.max(W,G.length,1):Math.max(1,G.length),Z=Y.filter((O)=>O.rawAction==="freeflow.retract"||O.rawState==="REVOKED"||O.action==="单据撤回"),q=Z.length,V=Q.sourceFlowVersion??$.sourceFlowVersion??Q.version??$.version,F=!1;if(K>0||J.length>0){let O=Math.max(...J.map((T)=>T.time??0),0),N=Y.some((T)=>(T.time??0)>O&&(T.rawAction==="freeflow.submit"||T.rawState==="SUBMITTED"||T.action==="提交送审")),M=Y.some((T)=>(T.time??0)>O&&T.rawAction!=="freeflow.reject"&&T.rawAction!=="freeflow.print"),P=String(z?.state??$.state??"").toUpperCase()==="REJECTED"||J.length>0&&Y.at(-1)?.rawAction==="freeflow.reject",j=typeof Q.submitDate==="number"?Q.submitDate:0,A=typeof Q.updateTime==="number"?Q.updateTime:typeof $.updateTime==="number"?$.updateTime:0;F=N||!P&&(M||j>O||A>O||X>K)}let w=!1;if(q>0){let O=Math.max(...Z.map((j)=>j.time??0),0),N=Y.some((j)=>(j.time??0)>O&&(j.rawAction==="freeflow.submit"||j.rawState==="SUBMITTED"||j.action==="提交送审")),D=String(z?.state??$.state??"").toUpperCase()==="REVOKED"||Z.length>0&&Y.at(-1)?.rawAction==="freeflow.retract",P=typeof Q.updateTime==="number"?Q.updateTime:typeof $.updateTime==="number"?$.updateTime:0;w=N||!D&&(X>1||P>O)}return{rejectionNum:K,submitCount:X,sourceFlowVersion:typeof V==="string"||typeof V==="number"?V:void 0,isModifiedAfterReject:F,retractCount:q,isResubmittedAfterRetract:w}}function pN1($){return $.filter((Y)=>Boolean(Y.comment&&Y.comment.trim())).map((Y)=>({nodeName:Y.nodeName,operator:Y.operator,action:Y.action,rawAction:Y.rawAction,time:Y.time,comment:Y.comment,isEbot:Y.isEbot}))}function dN1($){return $.filter((Y)=>Y.rawAction==="freeflow.reject"||Y.rawState==="REJECTED"||Y.action==="审批驳回").map((Y)=>({time:Y.time,nodeName:Y.nodeName,operator:Y.operator,isEbot:Y.isEbot,reason:Y.comment||"未填写驳回原因",rawComment:Y.rawComment,fromNodeName:Y.nodeName,targetNodeName:Y.rejectTargetNodeName,targetOperator:Y.rejectTargetOperator,resubmitRuleText:Y.resubmitRuleText}))}function mN1($,Y){let{flowDetails:z,allLogs:U,versions:Q,staffMap:J}=$;if(!z)return;let I=z.form||{},K=typeof I.submitterId==="string"?I.submitterId:typeof z.ownerId==="string"?z.ownerId:void 0,G=iN1(z.logs||[],J,U,K),H=z.state,W=VA0(H),X=String(H||"").toUpperCase(),q=["COMPLETED","APPROVED","PAID","REVOKED","CANCELED","CANCELLED","REJECTED"].includes(X)?[]:nN1(U,J),V=q.find((M)=>M.isCurrent)?.name,F=cN1(z,G,void 0,Q),w=pN1(G),O=dN1(G),N;if(I.specificationId&&typeof I.specificationId==="object"){let M=I.specificationId;N={id:typeof M.id==="string"?M.id:void 0,name:typeof M.name==="string"?M.name:void 0,code:typeof M.code==="string"?M.code:void 0}}else if(typeof I.specificationId==="string")N={id:I.specificationId};return{backlogId:z.id||Y||"",flowId:z.id,billCode:typeof I.code==="string"?I.code:void 0,title:typeof I.title==="string"?I.title:void 0,state:W,rawState:H,currentNode:V,specification:N,submitter:RZ(I.submitterId),owner:RZ(z.ownerId||I.ownerId),submitDate:typeof I.submitDate==="number"?I.submitDate:void 0,updateTime:typeof I.updateTime==="number"?I.updateTime:typeof z.updateTime==="number"?z.updateTime:void 0,history:G,pending:q,metrics:F,staffOpinions:w,rejections:O,raw:z}}async function xB($,Y,z){let U=await rc($,Y,z);return mN1(U,Y)}function ZA0($){if(!$)return"-";let Y=$.toUpperCase();if(Y==="APPROVE"||Y==="通过")return"通过";if(Y==="EXEMPT_APPROVE"||Y==="免审通过"||Y==="备注通过")return"备注通过";if(Y==="REVIEW"||Y==="转交复核")return"转交复核";if(Y==="REJECT"||Y==="驳回")return"驳回";if(Y==="ERROR"||Y==="错误")return"错误";return $}function eI($){let Y=[];for(let z of $){if(z.rawAction==="freeflow.carbonCopy"||z.rawAction==="freeflow.cc"||z.action==="抄送单据"||z.action==="抄送通知")continue;if((z.rawAction==="freeflow.print"||z.action==="打印提醒"||z.action==="打印单据")&&!z.comment)continue;let U=z.operator?.name||z.operator?.id||"未知",Q=z.rawAction==="freeflow.retract"||z.action==="单据撤回",J=z.nodeName?.trim()?`${z.nodeName.trim()}(${U})`:Q?`提交人(${U})`:U,I=z.comment;if(!I)if(z.rawAction==="flow.modify"||z.action==="修改了单据"||z.isModification)I="修改了单据";else if(z.rawAction==="freeflow.agree"||z.action==="审批同意")I="同意";else if(z.rawAction==="freeflow.autoAgree")I="自动同意";else if(z.rawAction==="freeflow.pay"||z.action==="支付成功"||z.action==="支付完成")I="支付成功";else if(z.rawAction==="freeflow.paying"||z.action==="发起支付"||z.action==="支付中")I="发起支付";else if(z.rawAction==="freeflow.reject"||z.action==="审批驳回")I="驳回";else if(z.rawAction==="freeflow.back"||z.action==="审批退回")I="退回修改";else if(z.rawAction==="freeflow.retract"||z.action==="单据撤回")I="单据撤回";else I=z.action||"-";let K="";if(z.rawAction==="flow.modify"||z.action==="修改了单据"||z.isModification||I==="修改了单据")K="✏️";else if(z.rawAction==="freeflow.autoAgree"||z.action==="自动同意"||I==="自动同意"||z.automatic)K="\uD83E\uDD16";else if(z.rawAction==="freeflow.retract"||z.action==="单据撤回"||I==="单据撤回")K="↩️";else if(z.rawAction==="freeflow.reject"||z.action==="审批驳回"||z.rawAction==="freeflow.back"||z.action==="审批退回"||I==="驳回"||I==="退回修改")K="❌";else if((z.rawAction==="freeflow.pay"||z.action==="支付成功"||z.action==="支付完成")&&(I==="支付成功"||I==="支付完成"||!I))K="\uD83D\uDCB0";else if(z.rawAction==="freeflow.addnode"||z.action?.includes("加签")||z.action?.includes("转交")||z.action?.includes("转办")||I?.includes("转交")||I?.includes("加签"))K="\uD83D\uDD00";else if(z.rawAction==="freeflow.paying"||z.rawAction==="freeflow.comment"||z.action==="发表评论"||z.action==="添加评论"||z.rawAction==="freeflow.pay"&&I!=="支付成功")K="\uD83D\uDCAC";let G=K?` ${K}`:"",H=`${J}${G}: ${I}`;if(Y.length===0||Y[Y.length-1]!==H)Y.push(H)}return Y}function $K($,Y=[],z="forward"){if($.length===0&&Y.length===0)return"-";if(z==="forward"){let J=[...$,...Y].map((G,H)=>`${H+1}. ${G}`),I=J.filter((G)=>G.includes("修改了单据")),K=J.filter((G)=>!G.includes("修改了单据"));return[...I,...K].join(` `)}let U=[];Y.forEach((Q,J)=>{let I=$.length+J+1,K=J===0?"⏳ ":"";U.push(`${K}${I}. ${Q}`)});for(let Q=$.length-1;Q>=0;Q--){let J=Q+1;U.push(`${J}. ${$[Q]}`)}return U.join(` `)}function $p($,Y,z,U,Q){let J=$?.operator||Y?.operator||z?.operator,I=J?.name||J?.id||z?.operatorName||"",K=($?.nodeName||Y?.fromNodeName||Y?.nodeName||z?.nodeName||"").trim();if(K==="合思审批节点"||K==="外部审批节点"||K.includes("合思审批")||K.includes("外部审批"))K="";if((!K||K==="提交人"||K==="审批节点")&&I&&U){let w=U.find((O)=>O.operator?.name===I&&O.nodeName&&O.nodeName.trim()!=="提交人"&&!O.isEbot&&O.rawAction!=="freeflow.reject");if(w?.nodeName)K=w.nodeName.trim()}let H=$?.comment||Y?.reason||z?.rejectComment||"修改";if(H.includes(":")){let w=H.split(":");if(w.length>1)H=w.slice(1).join(":").trim()}let W=H;if(K&&I)W=`${K}(${I}) ❌: ${H}`;else if(I)W=`${I} ❌: ${H}`;else if(K)W=`${K} ❌: ${H}`;else W=H;let X=$?.rejectTargetNodeName||Y?.targetNodeName||"提交人",Z=$?.rejectTargetOperator?.name||Y?.targetOperator?.name||Q?.submitter?.name,q=Z?`${X}(${Z})`:X,V=$?.resubmitRuleText||Y?.resubmitRuleText||(I?`重新提交后由${I}继续审批`:"重新提交后继续审批");return{comment:`${W} ↳ 驳回至: ${q} -↳ ${V}`,operator:J}}function qA0($){if(!$)return[];let Y=$.pending||[],z=String($.rawState||"").toUpperCase(),U=String($.state||"").toUpperCase(),Q=[];if(Y.length>0)for(let J of Y){let I=J.approver?.name||J.approver?.id||"待定",K=(J.name||$.currentNode||"").trim(),G=K?`${K}(${I})`:I,W=J.type?.toUpperCase()==="PAYING"||K.includes("支付")||z==="PAYING"||U==="支付中"?"待支付":"待审批";Q.push(`${G}: ${W}`)}else if($.currentNode?.trim()){let I=$.currentNode.includes("支付")||z==="PAYING"||U==="支付中"?"待支付":"待审批";Q.push(`${$.currentNode.trim()}: ${I}`)}return Q}function XU($,Y){let z=new Map;if(!$||$.length===0)return z;if(!Y){for(let q of $){let F=(q.result||{}).decision||q.aiDecision||"-";z.set(q.id,{recordId:q.id,sourceDocumentSN:q.sourceDocumentSN,taskMode:q.taskMode,aiDecision:ZA0(typeof F==="string"?F:"-"),aiAction:"-",eHumanAction:"-",eHumanComment:"-",auditDrift:!1})}return z}let U=[...$].sort((q,V)=>(Number(q.createdAt)||0)-(Number(V.createdAt)||0)),Q=Y.history||[],J=String(Y.rawState||"").toUpperCase(),I=String(Y.state||"").toUpperCase(),K=J==="DRAFT"||J==="REVOKED"||J==="CANCELED"||J==="CANCELLED"||I==="草稿"||I==="已撤回"||I==="已取消",G=J==="REJECTED"||J==="TERMINATED"||I==="审批驳回"||I==="已驳回",H=!K&&!G&&(J==="PAID"||I==="已支付"||Q.some((q)=>!q.isEbot&&(q.rawAction==="freeflow.pay"||q.action==="支付成功"||q.action==="支付完成"))),W=!K&&!G&&!H&&(J==="PAYING"||I==="支付中"||(Y.pending||[]).some((q)=>q.isCurrent&&(q.type?.toUpperCase()==="PAYING"||q.name?.includes("支付")))||Y.currentNode?.includes("支付")===!0),Z=H||!K&&!G&&!W&&(J==="COMPLETED"||J==="APPROVED"||I==="已完成"||I==="审批通过");for(let q=0;qA0.nodeId&&(A0.nodeId===P||P.includes(A0.nodeId))):void 0,A=j?.time??F,T=U[q+1],C=T?Number(T.createdAt)||1/0:1/0,b=q===U.length-1,k=Q.find((A0)=>(A0.time??0)>A+5000&&A0.isEbot&&(A0.nodeName?.includes("智能")||A0.nodeName?.includes("AI")||A0.action?.includes("智能")||A0.comment?.includes("AI")||A0.comment?.includes("approval-result"))&&!A0.nodeName?.includes("费用标准检查")&&!A0.nodeName?.includes("标准检查")&&!A0.nodeName?.includes("预算"));if(k){if(b=!1,(k.time??1/0){let Q0=A0.time??0;return Q0>=A-e0&&Q0(A0.time??0)>A+5000),u1=k1.some((A0)=>A0.rawAction==="freeflow.retract"||A0.action==="单据撤回"),b1=k1.some((A0)=>A0.rawAction==="freeflow.submit"||A0.action==="提交送审");if(w1&&b&&(u1||b1))b0=!0,i0="AI通过后单据发生撤回/修改重提,后续未经AI复审";if(p&&x)H0="无操作",F0="-";else{let A0=r.filter((v)=>(v.time??0)>=A-1000&&!v.isEbot&&v.rawAction!=="freeflow.submit"&&v.action!=="提交送审"&&!((v.rawAction==="freeflow.comment"||v.action==="发表评论")&&!v.comment)&&!((v.rawAction==="freeflow.print"||v.action==="打印提醒")&&!v.comment)&&!(v.rawAction==="freeflow.carbonCopy"||v.rawAction==="freeflow.cc"||v.action==="抄送通知")),Q0=A0.find((v)=>v.rawAction==="freeflow.retract"||v.action==="单据撤回"),B=A0.find((v)=>v.rawAction==="freeflow.reject"||v.action==="审批驳回");if(!b)if(B||!Y&&f0){H0="审批驳回",b0=!1,i0=void 0;let v=$p(B,void 0,O,Q,Y);F0=v.comment,n0=v.operator}else if(Q0||T0||!B&&a.includes("单据撤回")){H0="已撤回",n0=Q0?.operator;let v=Q0?A0.filter((s)=>(s.time??0)<=(Q0.time??1/0)):A0,u=eI(v);for(let s of v)if(!n0&&s.operator)n0=s.operator;if(Q0&&!u.some((s)=>s.includes("单据撤回")))u.push(`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`);F0=u.length>1?$K(u,[],"forward"):u.length===1?u[0]:Q0?`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`:"单据已撤回"}else{H0="已修改重提";let v=eI(A0);for(let u of A0)if(!n0&&u.operator)n0=u.operator;F0=v.length>1?$K(v,[],"forward"):v.length===1?v[0]:"-"}else if(B){H0="审批驳回",b0=!1,i0=void 0;let v=$p(B,void 0,O,Q,Y);F0=v.comment,n0=v.operator}else if(Z||!Y&&v0){let v=r.some((s)=>s.rawAction==="flow.modify"||s.isModification||s.action==="修改了单据");H0=H?v?"已支付 (中途修改)":"已支付":v?"审批通过 (中途修改)":"审批通过";let u=eI(A0);for(let s of A0)if(!n0&&s.operator)n0=s.operator;if(u.length>0)F0=$K(u,[],"forward");else{let s=[...r].reverse().find((X0)=>!X0.isEbot&&(X0.rawAction==="freeflow.agree"||X0.action==="审批同意"||X0.rawAction==="freeflow.pay"));if(F0=s?.comment?`1. ${s.comment}`:"-",!n0)n0=s?.operator}}else if(W){H0="⏳ 支付中";let v=eI(A0);for(let s of A0)if(!n0&&s.operator)n0=s.operator;let u=qA0(Y);F0=$K(v,u,"reverse")}else if(K||Q0&&!b1||T0){H0="已撤回",n0=Q0?.operator;let v=eI(A0);for(let u of A0)if(!n0&&u.operator)n0=u.operator;if(Q0&&!v.some((u)=>u.includes("单据撤回")))v.push(`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`);F0=v.length>1?$K(v,[],"forward"):v.length===1?v[0]:Q0?`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`:"单据已撤回"}else if(G||!Y&&f0){H0="审批驳回",b0=!1,i0=void 0;let v=$p(void 0,Y?.rejections?.[0],O,Q,Y);F0=v.comment,n0=v.operator}else{H0="⏳ 审批中";let v=eI(A0);for(let s of A0)if(!n0&&s.operator)n0=s.operator;let u=qA0(Y);F0=$K(v,u,"reverse")}}z.set(V.id,{recordId:V.id,sourceDocumentSN:V.sourceDocumentSN,taskMode:V.taskMode,aiDecision:ZA0(n),aiAction:Y0,eHumanAction:H0,eHumanComment:F0,auditDrift:b0,auditDriftReason:i0,operator:n0})}return z}var LA0=m(()=>{tc();ec();mc()});var Yp=m(()=>{tc();ec();mc();YA0();XA0();LA0()});import{existsSync as FA0,mkdirSync as OA0,statSync as lN1}from"node:fs";import{homedir as oN1}from"node:os";import{dirname as rN1,extname as sN1,resolve as fB}from"node:path";function b2($,Y=!1){if($===void 0||$===null||$==="")return;if(typeof $==="number")return String($);let z=String($).trim();if(!z)return;if(/^\d{10,13}$/.test(z))return z.length===10?`${z}000`:z;if(/^\d{4}-\d{2}-\d{2}$/.test(z)){let J=new Date(`${z}${Y?"T23:59:59.999+08:00":"T00:00:00.000+08:00"}`).getTime();if(!Number.isNaN(J))return String(J)}let U=new Date(z).getTime();if(!Number.isNaN(U))return String(U);return z}function Up($){if($===void 0||$===null||$==="")return;if($ instanceof Date)return Number.isNaN($.getTime())?void 0:$.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"});let Y=String($).trim();if(!Y)return;if(/^\d{4}-\d{2}-\d{2}/.test(Y))return Y.slice(0,10);if(/^\d{10}$/.test(Y)){let U=new Date(Number(Y)*1000);return Number.isNaN(U.getTime())?void 0:U.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}if(/^\d{13}$/.test(Y)||/^\d+$/.test(Y)){let U=new Date(Number(Y));return Number.isNaN(U.getTime())?void 0:U.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}let z=new Date(Y);return Number.isNaN(z.getTime())?void 0:z.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}function zp($=0,Y=new Date){return new Date(Y.getTime()+$*86400000).toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}function aN1($,Y=0){let z=new Date(`${$}T00:00:00+08:00`);return z.setDate(z.getDate()+Y),z.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}function Qp($={}){let Y=$.maxSpanDays??180,z=$.startDate!==void 0&&$.startDate!==null&&String($.startDate).trim()!=="",U=$.endDate!==void 0&&$.endDate!==null&&String($.endDate).trim()!=="",Q="",J="";if(z){let Z=Up($.startDate);if(!Z)throw Error(`无效的起始时间参数: "${String($.startDate)}"。请使用 YYYY-MM-DD 或有效时间戳。`);Q=Z}if(U){let Z=Up($.endDate);if(!Z)throw Error(`无效的结束时间参数: "${String($.endDate)}"。请使用 YYYY-MM-DD 或有效时间戳。`);J=Z}if(!z&&!U){if(Q=zp(-1),J=zp(0),!$.silent)console.error(`ℹ️ 未指定导出起止时间,已自动采用默认区间: ${Q}至${J}(昨天至今天)。`)}else if(z&&!U){if(J=zp(0),!$.silent)console.error(`ℹ️ 未指定导出结束时间,已自动补齐截至今天: ${Q}至${J}。`)}else if(!z&&U){if(Q=aN1(J,-30),!$.silent)console.error(`ℹ️ 未指定导出起始时间,已自动向前回溯 30 天: ${Q}至${J}。`)}let I=b2(Q,!1),K=b2(J,!0);if(Number(I)>Number(K))throw Error(`起始时间 (${Q}) 不能晚于结束时间 (${J})。`);let G=new Date(`${Q}T00:00:00+08:00`).getTime(),H=new Date(`${J}T00:00:00+08:00`).getTime(),W=Math.round((H-G)/86400000);if(W>Y){if(!$.force)throw Error(`时间跨度超过 ${Y} 天(当前为 ${W} 天),大范围导出耗时较长且占用系统资源。如确认需要导出,请添加 --force 参数强制执行。`);if(!$.silent)console.error(`⚠️ 时间跨度超过 ${Y} 天(当前为 ${W} 天),已按 --force 强制执行大范围导出。`)}let X=`${Q}至${J}`;return{startDateStr:Q,endDateStr:J,startDateTs:I,endDateTs:K,dateTag:X,spanDays:W}}function tN1($){if(!$)return;let Y=Array.isArray($)?$:[$],z=[];for(let U of Y){let Q=U.trim().toUpperCase();if(["APPROVED","已通过","已完成","已支付","已支付/审批完成"].includes(Q))z.push("APPROVED");else if(["TERMINATED","REJECTED","REJECT","驳回","被驳回","已驳回"].includes(Q))z.push("TERMINATED");else if(["PROCESSING","审批中","处理中"].includes(Q))z.push("PROCESSING");else if(["CANCELLED","CANCELED","已撤回","已撤销"].includes(Q))z.push("CANCELLED");else if(Q)z.push(Q)}return z.length>0?z:void 0}function eN1($,Y,z){if(!Y)return z?`${$} (${z})`:$;return(Y.split(/[。\n\r;;!!]/)[0]?.trim()||Y.trim()).replace(/[*#`_]/g,"").trim().slice(0,22)}function $D1($=new Date){let Y=new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Shanghai",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts($),z=(G)=>Y.find((H)=>H.type===G)?.value||"",U=z("year"),Q=z("month"),J=z("day"),I=z("hour"),K=z("minute");return`${U}${Q}${J}_${I}${K}`}function YD1($){if($.outputFile){let K=fB($.outputFile),G=sN1(K).toLowerCase();if(G&&G!==".xlsx")throw Error(`导出路径错误: 本命令仅支持导出 Excel 工作簿,文件扩展名必须为 .xlsx(当前指定为 "${G}")。请使用 .xlsx 后缀,例如: ${K.slice(0,-G.length)}.xlsx`);if(!G)K=`${K}.xlsx`;let H=rN1(K);if(!FA0(H))OA0(H,{recursive:!0});return K}let Y=$.corpName.replace(/[/\\?%*:|"<>]/g,"_").trim()||"审批记录",z=$.dateTag||new Date().toISOString().slice(0,10),U=$.recordCount>0?`${$.recordCount}条`:"空数据",Q=$D1($.exportTime||new Date),J=`${Y}_审核记录_${z}_${U}_${Q}.xlsx`,I;if($.toDownloads)I=fB(oN1(),"Downloads");else I=fB(process.cwd(),"exports");if(!FA0(I))OA0(I,{recursive:!0});return fB(I,J)}async function uB($,Y,z={}){let U=Y.name||Y.id,Q=z.pageSize??100,J=z.pageDelayMs??250,I=z.limit??1e5,K=Boolean(z.startDate||z.endDate),G=Array.isArray(z.sns)?z.sns.map((y)=>y.trim()).filter(Boolean):[],H=G.length>0,W=new Set(G),X=Qp({startDate:z.startDate,endDate:z.endDate,force:z.force,silent:!K&&H}),{startDateTs:Z,endDateTs:q}=X,V=X.dateTag,F=tN1(z.manualApprovalStatus);console.error(`正在加载企业「${U}」审核规则集...`);let w=new Map;try{(await X6($)).rules.forEach((p,Y0)=>{let g=`rule-${p.code??Y0}`,a=eN1(g,p.description,p.scope);w.set(g,{id:g,code:String(p.code??Y0),title:`[${g}] ${a}`,desc:p.description})})}catch(y){console.error(`⚠️ 加载规则字典失败: ${y.message},将仅导出基础信息列。`)}let O=Array.from(w.keys()).sort((y,p)=>{let Y0=parseInt(y.replace(/\D/g,""),10)||0,g=parseInt(p.replace(/\D/g,""),10)||0;return Y0-g});if(console.error(`已就绪 ${O.length} 个规则列。开始拉取单据...`),z.withFlow===!0&&Y.source.type==="hose")if(H)console.error(`\uD83C\uDFAF [单据筛选] 已指定定向筛选单号: [${G.join(", ")}] (共 ${G.length} 个)。`);else try{let y=await i4($,{limit:1,startDate:Z,endDate:q,status:z.status,sourceSystem:z.sourceSystem,taskMode:z.taskMode,manualApprovalStatus:F}),p=y.total??y.records?.length??0,Y0=Math.max(1,Math.min(z.flowConcurrency??3,5)),g=Math.max(1,Math.ceil(p/Y0*0.4));if(p>50)console.error(`⚠️ [审批流对齐提示] 目标区间内单据规模约为 ${p} 笔。系统已启用合思 Open API 保护限流(并发 ${Y0}),预计审批流拉取耗时约 ${g} 秒。`)}catch{}let N=[],M=0,D=0;if(H&&G.length<=50){console.error(`正在定向检索 ${G.length} 个指定单号...`);for(let y of G){try{let Y0=((await i4($,{search:y,limit:50,startDate:K?Z:void 0,endDate:K?q:void 0,status:z.status,sourceSystem:z.sourceSystem,taskMode:z.taskMode,manualApprovalStatus:F})).records||[]).filter((g)=>g.sourceDocumentSN===y);for(let g of Y0){if(!(z.taskMode==="simulation"||z.includeSimulation===!0||Y.environment==="test")&&g.taskMode==="simulation"){M++;continue}if(z.taskMode&&g.taskMode!==z.taskMode)continue;if(Y.source.type==="hose"&&g.sourceSystem&&!["hose","hosecloud"].includes(g.sourceSystem)){D++;continue}if(z.includeCompletedOnly&&g.status!=="completed")continue;if(g.status==="completed"&&(!g.result||!g.result.rulesResult))try{let $0=await H4($,g.id);N.push($0)}catch{N.push(g)}else N.push(g);if(N.length>=I)break}}catch(p){console.error(`⚠️ 定向检索单号 [${y}] 失败: ${p.message}`)}if(N.length>=I)break}console.error(`定向检索完成,成功匹配 ${N.length} 条记录。`)}else{let y=0,p=0;while(N.length0)try{Y0=await i4($,{limit:Q,offset:y,startDate:Z,endDate:q,status:z.status,sourceSystem:z.sourceSystem,taskMode:z.taskMode,manualApprovalStatus:F});break}catch($0){if(g--,console.error(`分页拉取失败 (offset=${y}): ${$0.message},剩余重试 ${g} 次...`),g===0)throw $0;await new Promise((N0)=>setTimeout(N0,1000))}if(!Y0||!Y0.records||Y0.records.length===0)break;p=Y0.total??p;for(let $0 of Y0.records){if(H&&(!$0.sourceDocumentSN||!W.has($0.sourceDocumentSN)))continue;if(!(z.taskMode==="simulation"||z.includeSimulation===!0||Y.environment==="test")&&$0.taskMode==="simulation"){M++;continue}if(z.taskMode&&$0.taskMode!==z.taskMode)continue;if(Y.source.type==="hose"&&$0.sourceSystem&&!["hose","hosecloud"].includes($0.sourceSystem)){D++;continue}if(z.includeCompletedOnly&&$0.status!=="completed")continue;if($0.status==="completed"&&(!$0.result||!$0.result.rulesResult))try{let T0=await H4($,$0.id);N.push(T0)}catch{N.push($0)}else N.push($0);if(N.length>=I)break}y+=Y0.records.length;let a=p>0?(y/p*100).toFixed(1):"-";if(y%500===0||y>=p||N.length>=I)console.error(`[进度] 已读取单据: ${y}/${p} (${a}%),有效加入: ${N.length} 条`);if(Y0.records.length=p)break;if(J>0)await new Promise(($0)=>setTimeout($0,J))}}if(M>0)console.error(`ℹ️ 已自动排除 ${M} 条模拟测试任务 (taskMode="simulation"),仅保留真实审批任务。`);if(D>0)console.error(`ℹ️ 已自动排除 ${D} 条非合思来源单据,仅保留合思业务单据。`);if(!K&&H&&N.length>0){let y=N.map((p)=>Up(p.createdAt||p.updatedAt)).filter(Boolean);if(y.length>0){y.sort();let p=y[0],Y0=y[y.length-1];V=p===Y0?p:`${p}至${Y0}`}}console.error(`成功拉取 ${N.length} 条单据数据,正在生成高保真 Excel...`);let P=new wA0.default.Workbook;P.creator="Seal AI (seal-use)",P.created=new Date;let j=P.addWorksheet("审核记录明细",{views:[{state:"frozen",ySplit:1,xSplit:2}]}),A=z.withFlow===!0&&Y.source.type==="hose",T=[{header:"单据编号",key:"sn",width:16},{header:"单据模板名称",key:"templateName",width:26},{header:"来源系统",key:"sourceSystem",width:12},{header:"任务模式",key:"taskMode",width:12},{header:"状态",key:"status",width:12},{header:"AI行为",key:"aiAction",width:14},{header:"AI决策",key:"aiDecision",width:14},{header:"思考深度",key:"thinkingDepth",width:12},{header:"人工审核",key:"manualStatus",width:16},{header:"人工驳回原因",key:"humanRejectReason",width:36},...A?[{header:"E人工行为",key:"eHumanAction",width:18},{header:"E人工意见",key:"eHumanComment",width:36}]:[],{header:"创建时间",key:"createdAt",width:20},{header:"任务耗时",key:"duration",width:12},{header:"关联规则数",key:"hitRuleCount",width:12},{header:"关联规则汇总",key:"hitRulesSummary",width:30},{header:"AI审核结论摘要",key:"aiSummary",width:45}],C=O.map((y)=>{return{header:w.get(y).title,key:`rule_${y}`,width:22}});j.columns=[...T,...C];let b=j.getRow(1);b.height=32,b.eachCell((y,p)=>{let Y0=p<=T.length;y.font={name:"Microsoft YaHei",bold:!0,color:{argb:"FFFFFFFF"},size:11},y.fill={type:"pattern",pattern:"solid",fgColor:{argb:Y0?"FF1E3A8A":"FF334155"}},y.alignment={vertical:"middle",horizontal:Y0&&p<=2?"left":"center",wrapText:!1}});let k={},S=0,i=new Map,n=new Set,U0=z.excludeDeleted??!0;if(z.withFlow===!0&&Y.source.type==="hose"){try{let y=new Map;for(let Y0 of N){let g=Y0.sourceDocumentId||Y0.sourceDocumentSN;if(g){let a=y.get(g)||[];a.push(Y0),y.set(g,a)}}let p=Array.from(y.keys());if(p.length>0){let Y0=Math.max(1,Math.min(z.flowConcurrency??3,5)),g=z.flowBatchDelayMs??150,a=Math.max(1,Math.ceil(p.length/Y0*(0.25+g/1000)));console.error(`正在拉取合思原生审批流以对齐人工行为与意见 (共 ${p.length} 个单据,并发限制: ${Y0},批次间隔: ${g}ms,预计耗时约 ${a}s)...`);let $0=await tI(Y),N0=new Map;for(let T0=0;T0{let f0=y.get(G0),e0=f0[0]?.sourceDocumentSN||G0;try{let r=await xB($0,G0,N0);if(!r){n.add(e0);let F0=XU(f0,void 0);for(let[b0,i0]of F0.entries())i0.eHumanAction="单据已删除",i0.eHumanComment="合思系统中未找到该单据流转记录(可能已在合思端删除或作废)",i.set(b0,i0);return}let H0=XU(f0,r);for(let[F0,b0]of H0.entries())i.set(F0,b0)}catch(r){console.error(`⚠️ 拉取单据 ${e0} 审批流失败: ${r.message},使用降级对齐。`);let H0=XU(f0,void 0);for(let[F0,b0]of H0.entries())i.set(F0,b0)}})),g>0&&T0+Y0setTimeout(G0,g));if((T0+Y0)%20=p.length){let G0=Math.min(T0+v0.length,p.length),f0=Math.round(G0/p.length*100);console.error(`[审批流进度] 已对齐: ${G0}/${p.length} (${f0}%)...`)}}}}catch(y){console.error(`⚠️ 对齐合思审批流失败: ${y.message},E人工行为与意见将使用默认值。`)}if(n.size>0)console.error(`ℹ️ 检测到 ${n.size} 个单据在合思端已删除或不存在(如: ${Array.from(n).slice(0,3).join(", ")}...)${U0?",已按要求自动排除。":",已在报表中标记为「单据已删除」。"}`)}let x=0,d=0;for(let y of N){let p=y.sourceDocumentSN||y.sourceDocumentId;if(U0&&p&&n.has(p)){d++;continue}x++;let Y0=y.result||{},g=y.document||{},a="未知模板";if(Array.isArray(g.fields)){let B=g.fields.find((v)=>v.label==="单据模板"||v.label==="流程名称"||v.key==="templateName"||v.key==="specificationId"||v.key==="formName");if(B?.value)a=String(B.value)}if(a==="未知模板"&&(g.name||g.title))a=g.name||g.title;let $0=y.taskMode||"-";if($0==="assisted")$0="辅助审核";else if($0==="simulation")$0="测试任务";else if($0==="automatic")$0="自动审批";let N0=y.status||"-";if(N0==="completed")N0="已完成";else if(N0==="processing")N0="处理中";else if(N0==="failed")N0="失败";let T0=Y0.decision||y.aiDecision||"-",v0=String(T0).toUpperCase(),G0=String(T0),f0="-";if(v0==="APPROVE"||v0==="通过")G0="通过",f0="添加评论";else if(v0==="EXEMPT_APPROVE"||v0==="免审通过"||v0==="备注通过")G0="备注通过",f0="添加评论";else if(v0==="REVIEW"||v0==="转交复核")G0="转交复核",f0="转交复核";else if(v0==="REJECT"||v0==="驳回")G0="驳回",f0="驳回";else if(v0==="ERROR"||v0==="错误")G0="错误",f0="-";let e0="-";if(y.createdAt&&y.updatedAt&&y.status==="completed"){let B=Math.round((Number(y.updatedAt)-Number(y.createdAt))/1000);if(B>=60)e0=`${Math.floor(B/60)}分${B%60}秒`;else if(B>0)e0=`${B}秒`}let r=y.manualApprovalRecord||{},H0=String(r.status?.sourceStatus||""),F0="-";if(r.status?.label)F0=String(r.status.label);else if(r.status?.type){let B=String(r.status.type);if(B==="APPROVED")F0="已通过";else if(B==="TERMINATED")F0="被驳回";else if(B==="PROCESSING")F0="处理中";else if(B==="CANCELLED")F0="已撤回";else F0=B}k[F0]=(k[F0]||0)+1;let b0=r.rejectComment?String(r.rejectComment).trim():"-";if(b0!=="-")S++;let i0=new Map,n0=[];if(Array.isArray(Y0.rulesResult)){for(let B of Y0.rulesResult)if(B.id)i0.set(B.id,B.checkResult||"PASS"),n0.push(B.id)}if(Array.isArray(Y0.hitRules)){for(let B of Y0.hitRules)if(B.id&&!i0.has(B.id))i0.set(B.id,"TRIGGERED"),n0.push(B.id)}let w1="-";if(y.createdAt)w1=new Date(Number(y.createdAt)).toLocaleString("zh-CN",{timeZone:"Asia/Shanghai",hour12:!1});let k1=i.get(y.id),u1=k1?k1.eHumanAction:"-",b1=k1?k1.eHumanComment:"-",A0={sn:y.sourceDocumentSN||y.sourceDocumentId||"-",templateName:a,sourceSystem:y.sourceSystem||"合思",taskMode:$0,status:N0,aiAction:f0,aiDecision:G0,thinkingDepth:"标准",manualStatus:F0,humanRejectReason:b0,...A?{eHumanAction:u1,eHumanComment:b1}:{},createdAt:w1,duration:e0,hitRuleCount:n0.length,hitRulesSummary:n0.join(", ")||"-",aiSummary:Y0.summary||"-"};for(let B of O){let v=i0.get(B);if(v)if(v==="PASS")A0[`rule_${B}`]="关联 (通过)";else if(v==="FAIL")A0[`rule_${B}`]="关联 (不通过)";else if(v==="UNKNOWN")A0[`rule_${B}`]="关联 (待复核)";else A0[`rule_${B}`]="已关联";else A0[`rule_${B}`]="未关联"}let Q0=j.addRow(A0);Q0.height=24,Q0.eachCell((B,v)=>{let u=String(B.value||"");if(B.font={name:"Microsoft YaHei",size:10},B.border={top:{style:"thin",color:{argb:"FFE2E8F0"}},bottom:{style:"thin",color:{argb:"FFE2E8F0"}},left:{style:"thin",color:{argb:"FFE2E8F0"}},right:{style:"thin",color:{argb:"FFE2E8F0"}}},v<=T.length){let X0=T[v-1]?.key||"",J0=["sn","templateName","humanRejectReason","eHumanComment","hitRulesSummary","aiSummary"].includes(X0),q0=["humanRejectReason","eHumanComment","hitRulesSummary","aiSummary"].includes(X0);if(B.alignment={vertical:"middle",horizontal:J0?"left":"center",wrapText:q0},X0==="aiDecision"){if(u==="通过"||u==="备注通过")B.font={color:{argb:"FF16A34A"},bold:!0};else if(u==="转交复核")B.font={color:{argb:"FFD97706"},bold:!0};else if(u==="驳回")B.font={color:{argb:"FFDC2626"},bold:!0};else if(u==="错误"||u==="ERROR")B.font={color:{argb:"FFDC2626"},bold:!0}}if(X0==="manualStatus"){if(u.includes("驳回"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FFDC2626"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEE2E2"}};else if(u.includes("通过")||u.includes("支付")||u.includes("完成"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF16A34A"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFDCFCE7"}};else if(u.includes("处理中")||u.includes("审批中"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF2563EB"}},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFEFF6FF"}};else if(u.includes("取消")||u.includes("撤回"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF64748B"}},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFF1F5F9"}}}if(X0==="humanRejectReason"&&u!=="-")B.font={name:"Microsoft YaHei",size:9,color:{argb:"FF991B1B"}};if(X0==="eHumanAction"){if(u.includes("⚠️")||u.includes("修改"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FFD97706"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEF3C7"}};else if(u.includes("驳回")||u.includes("退回"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FFDC2626"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEE2E2"}};else if(u.includes("通过")||u.includes("已支付")||u.includes("已完成"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF16A34A"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFDCFCE7"}};else if(u.includes("待处理")||u.includes("处理中")||u.includes("审核中")||u.includes("审批中")||u.includes("支付中"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF2563EB"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFEFF6FF"}};else if(u.includes("撤回")||u.includes("取消"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF64748B"}},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFF1F5F9"}};else if(u==="无操作")B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF94A3B8"}}}if(X0==="eHumanComment"&&u!=="-")B.font={name:"Microsoft YaHei",size:9,color:{argb:"FF334155"}}}else if(B.alignment={vertical:"middle",horizontal:"center"},u.includes("不通过"))B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEE2E2"}},B.font={color:{argb:"FF991B1B"},bold:!0};else if(u.includes("通过"))B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFDCFCE7"}},B.font={color:{argb:"FF166534"},bold:!0};else if(u.includes("待复核")||u.includes("已关联"))B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEF3C7"}},B.font={color:{argb:"FF92400E"}};else B.font={color:{argb:"FF94A3B8"}}})}let t=YD1({outputFile:z.outputFile,toDownloads:z.toDownloads,corpName:U,dateTag:V,recordCount:x,exportTime:z.exportTime});await P.xlsx.writeFile(t),console.error(`Excel 文件已成功落地: ${t}`);let e=lN1(t);return{filePath:t,corpId:Y.id,corpName:U,recordCount:x,ruleColumnCount:O.length,statusCounts:k,rejectReasonCount:S,fileSizeBytes:e.size,exportedAt:new Date().toISOString(),excludedDeletedCount:d,excludedSimulationCount:M}}var wA0;var bB=m(()=>{B6();Yp();wA0=J6(CZ(),1)});import MA0 from"node:fs";import NA0 from"node:path";function zD1($){try{let Y=new URL($);if(Y.search)return`${Y.origin}${Y.pathname}?[MASKED]`;return $}catch{return $.replace(/\?.*$/,"?[MASKED]")}}function Kp($){return $.replace(/[/\\?%*:|"<>]/g,"_").trim()||"attachment"}function DA0($){return Object.fromEntries(Object.entries($).filter(([,Y])=>Y!==void 0))}function UD1($){return $&&typeof $==="object"&&!Array.isArray($)?$:void 0}function Q4($){return typeof $==="string"&&$.trim()?$.trim():void 0}function Jp($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function QD1($){if(!$)return;if(typeof $==="string")try{let Y=JSON.parse($);if(Y&&typeof Y==="object")return Y}catch{return}if(typeof $==="object"&&!Array.isArray($))return $;return}function JD1($,Y,z){if(z?.fieldType?.toUpperCase()==="ATTACHMENT"){if(Boolean($.fileName||$.filename||$.name||$.originalName||$.fileId||$.ossPath||$.url||$.ossSignedUrl||$.signedUrl||$.token))return!0}if($.ossSignedUrl||$.signedUrl)return!0;let U=$.fileName??$.filename??$.name??$.originalName,Q=$.fileId??$.id??$.attachmentId,J=$.ossPath??$.ossKey,I=$.url??$.downloadUrl??$.previewUrl,K=$.mimeType??$.mimetype??$.contentType,G=$.ossFileSize??$.fileSize??$.size;if(U&&(I||J||Q||G))return!0;if(Q&&(K||G||J||I))return!0;let H=Object.keys($).map((Z)=>Z.toLowerCase());return(/(attachment|attachments|invoice|receipt|file|files|附件|发票)/i.test(Y)||Boolean(z?.fieldKey&&/(attachment|attachments|invoice|receipt|file|files|附件|发票)/i.test(z.fieldKey))||Boolean(z?.fieldLabel&&/(attachment|attachments|invoice|receipt|file|files|附件|发票)/i.test(z.fieldLabel)))&&["filename","filename","mimetype","contenttype","fileid","osspath","signedurl","downloadurl","previewurl","attachmentid","ossfilesize","osssignedurl"].some((Z)=>H.includes(Z))}function ID1($,Y,z){let U=`${$} ${z?.fieldLabel??""} ${z?.fieldKey??""} ${Q4(Y.type)??""} ${Q4(Y.category)??""}`.toLowerCase();if(U.includes("invoice")||U.includes("发票"))return"invoice";if(U.includes("receipt"))return"receipt";let Q=(Q4(Y.fileName)??Q4(Y.name)??"").toLowerCase();if(Q.includes("发票")||Q.includes("invoice"))return"invoice";return"attachment"}function Ip($,Y,z,U,Q){if(Array.isArray($)){$.forEach((H,W)=>Ip(H,`${Y}.${W}`,z,U,Q));return}let J=UD1($);if(!J)return;let I=J.type&&typeof J.type==="string"||"label"in J&&"value"in J||"key"in J&&"value"in J,K=Q;if(I)K={fieldLabel:Q4(J.label)??Q?.fieldLabel,fieldKey:Q4(J.key)??Q?.fieldKey,fieldType:Q4(J.type)??Q?.fieldType};if(!(Array.isArray(J.value)&&!J.url&&!J.ossSignedUrl&&!J.fileId)&&JD1(J,Y,Q)){let H=QD1(J.token),W=Q4(H?.key),X=Q4(H?.fileId),Z=DA0({path:Y,fieldPath:Y,kind:ID1(Y,J,Q),fileName:Q4(J.fileName)??Q4(J.filename)??Q4(J.name)??Q4(J.originalName),mimeType:Q4(J.mimeType)??Q4(J.mimetype)??Q4(J.contentType),fileId:Q4(J.fileId)??Q4(J.id)??Q4(J.attachmentId)??X,ossPath:Q4(J.ossPath)??Q4(J.ossKey)??W,url:Q4(J.url)??Q4(J.signedUrl)??Q4(J.downloadUrl)??Q4(J.previewUrl),ossSignedUrl:Q4(J.ossSignedUrl)??Q4(J.signedUrl),token:J.token,tokenKey:W,category:Q4(J.category),ossFileSize:Jp(J.ossFileSize)??Jp(J.fileSize)??Jp(J.size),invoiceId:Q4(J.invoiceId),sourceField:Q4(J.fieldName)??Q4(J.label)??Q?.fieldLabel??Q?.fieldKey}),q=JSON.stringify(Z);if(!U.has(q))U.add(q),z.push(Z)}for(let[H,W]of Object.entries(J))Ip(W,`${Y}.${H}`,z,U,K)}function i2($,Y={}){let z=[["document",$.document],["result",$.result],["pipelineData",$.pipelineData],["sourceExtendData",$.sourceExtendData]],U=[],Q=new Set;for(let[J,I]of z)Ip(I,J,U,Q);return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,count:U.length,attachments:Y.summary?U.map((J)=>DA0({path:J.path,kind:J.kind,fileName:J.fileName,mimeType:J.mimeType,fileId:J.fileId,sourceField:J.sourceField,ossFileSize:J.ossFileSize,hasSignedUrl:Boolean(J.ossSignedUrl)})):U}}async function iB($){let{record:Y,fetchFn:z=globalThis.fetch}=$,Q=i2(Y,{summary:!1}).attachments,J=NA0.resolve($.outDir??"./attachments");if(Q.length===0)return{recordId:Y.id,outDir:J,total:0,downloaded:0,failed:0,files:[]};let I=[];if($.name){let X=$.name.toLowerCase();if(I=Q.filter((Z)=>{let q=Z.fileName?.toLowerCase()??"",V=Z.fileId?.toLowerCase()??"",F=Z.tokenKey?.toLowerCase()??"";return q.includes(X)||V===X||F.includes(X)}),I.length===0){let Z=Q.map((q)=>q.fileName??q.fileId).filter(Boolean).join(", ");throw Error(`未找到匹配 "${$.name}" 的附件。可选附件: ${Z||"无"}`)}}else if(!$.all){if(Q.length>1){let X=Q.map((Z)=>Z.fileName??Z.fileId).filter(Boolean).join(", ");throw Error(`共发现 ${Q.length} 个附件。请使用 --all 下载全部附件,或使用 --name <名称|fileId> 指定下载项。可选附件: ${X}`)}I=Q}else I=Q;await MA0.promises.mkdir(J,{recursive:!0});let K=[],G=new Set;for(let X of I){let Z=X.fileName??X.fileId??"attachment",q=Kp(Z),V=q,F=q.lastIndexOf("."),w=F>0?q.slice(0,F):q,O=F>0?q.slice(F):"",N=1;while(G.has(V.toLowerCase()))V=`${w}_${N}${O}`,N++;G.add(V.toLowerCase());let M=X.ossSignedUrl??X.url;if(!M){console.error(`⚠️ [跳过] 附件 "${Z}": 记录中无下载直链 (ossSignedUrl/url)`),K.push({name:V,fileId:X.fileId,status:"failed",error:"缺少可用的下载直链 (ossSignedUrl/url)。",sourceField:X.sourceField,tokenKey:X.tokenKey});continue}let D=zD1(M);try{let P=await z(M,{signal:AbortSignal.timeout(60000)});if(!P.ok){let C=P.status===403?"HTTP 403 Forbidden: 签名直链可能已过期":`HTTP ${P.status} ${P.statusText}`;throw Error(C)}let j=await P.arrayBuffer(),A=Buffer.from(j);if(X.ossFileSize!==void 0&&A.length!==X.ossFileSize)console.error(`⚠️ [校验] 附件 "${V}" 实际大小 (${A.length} 字节) 与 ossFileSize (${X.ossFileSize} 字节) 不一致`);let T=NA0.join(J,V);await MA0.promises.writeFile(T,A),console.error(`✓ 已下载: ${V} (${A.length} 字节)`),K.push({name:V,fileId:X.fileId,path:T,size:A.length,expectedSize:X.ossFileSize,status:"success",sourceField:X.sourceField,tokenKey:X.tokenKey})}catch(P){let j=P.message??String(P);console.error(`⚠️ [失败] 附件 "${Z}" 下载失败: ${j} [${D}]`),K.push({name:V,fileId:X.fileId,status:"failed",error:j,sourceField:X.sourceField,tokenKey:X.tokenKey})}}let H=K.filter((X)=>X.status==="success").length,W=K.filter((X)=>X.status==="failed").length;return{recordId:Y.id,outDir:J,total:I.length,downloaded:H,failed:W,files:K}}var nB=()=>{};var KD1,GD1,HD1,WD1,AA0,Gp,Hp,XD1,ZD1,qD1,Wp,VD1,cB;var Xp=m(()=>{P$();KD1=L.object({type:L.literal("hose"),domain:L.string().url().default("https://app.ekuaibao.com"),appKey:L.string().optional(),appSecurity:L.string().optional(),key:L.string().optional(),password:L.string().optional(),staffId:L.string(),corpId:L.string(),sealUrl:L.string().url().optional()}).superRefine(($,Y)=>{if(!$.appKey&&!$.key)Y.addIssue({code:"custom",path:["appKey"],message:"Hose source requires appKey or key"});if(!$.appSecurity&&!$.password)Y.addIssue({code:"custom",path:["appSecurity"],message:"Hose source requires appSecurity or password"})}),GD1=L.object({type:L.literal("direct"),token:L.string(),sealUrl:L.string().url(),expiresIn:L.number().int().positive().default(3600),staffId:L.string().default("direct"),corpId:L.string().optional()}),HD1=L.object({type:L.literal("seal"),token:L.string(),sealUrl:L.string().url(),expiresIn:L.number().int().positive().default(3600),staffId:L.string().default("seal"),corpId:L.string().optional(),tenantId:L.string().optional(),tenantSlug:L.string().optional(),tenantName:L.string().optional(),providerUserId:L.string().optional(),provider:L.string().optional(),providerName:L.string().optional()}),WD1=L.discriminatedUnion("type",[KD1,GD1,HD1]),AA0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Gp=L.record(L.string().regex(AA0,"Invalid HTTP header name"),L.string()).superRefine(($,Y)=>{for(let z of Object.keys($))if(z.toLowerCase()==="authorization")Y.addIssue({code:"custom",path:[z],message:"seal.headers cannot set Authorization; the Seal session supplies the bearer token"})}).optional(),Hp=L.record(L.string().regex(AA0,"Invalid cookie name"),L.string().refine(($)=>!/[\u0000-\u001f\u007f;]/.test($),{message:"Cookie value cannot contain control characters or semicolons"})).optional(),XD1=L.object({url:L.string().url().optional(),tenantSlug:L.string().optional(),headers:Gp,cookies:Hp,endpoints:L.object({approvalStylePreferences:L.string().default("api/v1/agent/ai-approval/config")}).default({approvalStylePreferences:"api/v1/agent/ai-approval/config"})}).default({endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}}),ZD1=L.object({refreshTtl:L.number().int().positive().default(300)}).default({refreshTtl:300}),qD1=L.enum(["production","test"]).default("production"),Wp=L.object({id:L.string(),name:L.string(),seal:XD1,source:WD1,auth:ZD1,environment:qD1,testCorpId:L.string().optional(),prodCorpId:L.string().optional()}),VD1=L.object({enabled:L.boolean().default(!1),activeLinter:L.string().default("builtin"),minScore:L.number().min(0).max(100).default(0)}).default({enabled:!1,activeLinter:"builtin",minScore:0}),cB=L.object({stateful:L.boolean().default(!1),defaultCorpId:L.string().min(1).optional(),testEnterprisesDir:L.string().min(1).optional(),lint:VD1})});import{copyFileSync as BA0,existsSync as L$,mkdirSync as jA0,readFileSync as lB,readdirSync as dB,rmSync as LD1,statSync as _Z,writeFileSync as TA0}from"node:fs";import{homedir as oB}from"node:os";import{dirname as FD1,join as P9}from"node:path";function OD1($=YK,Y=mB){if(!L$(Y))return{copied:[],deletedLegacyDir:!1};jA0($,{recursive:!0,mode:448});let z=[],U=[];try{U=dB(Y).filter((X)=>X.endsWith(".json"))}catch{return{copied:[],deletedLegacyDir:!1}}for(let X of U){let Z=P9(Y,X),q=P9($,X);if(!L$(q))BA0(Z,q),z.push(X);else{let V=_Z(Z).mtimeMs,F=_Z(q).mtimeMs;if(V>F)BA0(Z,q),z.push(X)}}let Q=604800000,J=Date.now(),I=!1,K=!1;for(let X of dB(Y)){let Z=P9(Y,X),q=P9($,X),V=_Z(Z);if(J-V.mtimeMs_Z(q).mtimeMs)I=!0}}let G=_Z(Y),H=J-G.mtimeMsQ.endsWith(".json")).filter((Q)=>!Q.startsWith("example."))){let Q=lB(P9(z,U),"utf-8"),J=Wp.parse(JSON.parse(Q));Y.set(J.id,J)}return Array.from(Y.values())}function hA0(){let $=(process.env[Zp]??process.env[EA0])?.trim();if($)return L$($)?[$]:[];let Y=(process.env[CA0]??process.env[RA0])?.trim(),z;if(Y)z=L$(Y)?[Y]:[];else{try{OD1()}catch{}z=L$(YK)?[YK]:L$(mB)?[mB]:[YK]}let Q=v4().testEnterprisesDir?.trim(),J=Q?[Q,...z]:z,I=[];for(let K of J)if(L$(K)&&!I.includes(K))I.push(K);return I}function qp(){let $=(process.env[Zp]??process.env[EA0])?.trim();if($)return $;let Y=(process.env[CA0]??process.env[RA0])?.trim();if(Y)return Y;let z=v4().testEnterprisesDir?.trim();if(z&&L$(z))return z;return YK}function g3(){let $=v4().testEnterprisesDir?.trim();return[`${Zp}=`,...$?[`testEnterprisesDir: ${$}`]:[],YK,mB]}function ZU(){let $=(process.env[_A0]??process.env[vA0])?.trim();if($)return $;if(L$(pB))return pB;if(L$(PA0))return PA0;return pB}function v4(){let $=ZU();if(!L$($))return cB.parse({});return cB.parse(JSON.parse(lB($,"utf-8")))}function qU($){let Y=cB.parse($),U=(process.env[_A0]??process.env[vA0])?.trim()||pB;return jA0(FD1(U),{recursive:!0,mode:448}),TA0(U,`${JSON.stringify(Y,null,2)} +↳ ${V}`,operator:J}}function qA0($){if(!$)return[];let Y=$.pending||[],z=String($.rawState||"").toUpperCase(),U=String($.state||"").toUpperCase(),Q=[];if(Y.length>0)for(let J of Y){let I=J.approver?.name||J.approver?.id||"待定",K=(J.name||$.currentNode||"").trim(),G=K?`${K}(${I})`:I,W=J.type?.toUpperCase()==="PAYING"||K.includes("支付")||z==="PAYING"||U==="支付中"?"待支付":"待审批";Q.push(`${G}: ${W}`)}else if($.currentNode?.trim()){let I=$.currentNode.includes("支付")||z==="PAYING"||U==="支付中"?"待支付":"待审批";Q.push(`${$.currentNode.trim()}: ${I}`)}return Q}function XU($,Y){let z=new Map;if(!$||$.length===0)return z;if(!Y){for(let q of $){let F=(q.result||{}).decision||q.aiDecision||"-";z.set(q.id,{recordId:q.id,sourceDocumentSN:q.sourceDocumentSN,taskMode:q.taskMode,aiDecision:ZA0(typeof F==="string"?F:"-"),aiAction:"-",eHumanAction:"-",eHumanComment:"-",auditDrift:!1})}return z}let U=[...$].sort((q,V)=>(Number(q.createdAt)||0)-(Number(V.createdAt)||0)),Q=Y.history||[],J=String(Y.rawState||"").toUpperCase(),I=String(Y.state||"").toUpperCase(),K=J==="DRAFT"||J==="REVOKED"||J==="CANCELED"||J==="CANCELLED"||I==="草稿"||I==="已撤回"||I==="已取消",G=J==="REJECTED"||J==="TERMINATED"||I==="审批驳回"||I==="已驳回",H=!K&&!G&&(J==="PAID"||I==="已支付"||Q.some((q)=>!q.isEbot&&(q.rawAction==="freeflow.pay"||q.action==="支付成功"||q.action==="支付完成"))),W=!K&&!G&&!H&&(J==="PAYING"||I==="支付中"||(Y.pending||[]).some((q)=>q.isCurrent&&(q.type?.toUpperCase()==="PAYING"||q.name?.includes("支付")))||Y.currentNode?.includes("支付")===!0),Z=H||!K&&!G&&!W&&(J==="COMPLETED"||J==="APPROVED"||I==="已完成"||I==="审批通过");for(let q=0;qA0.nodeId&&(A0.nodeId===P||P.includes(A0.nodeId))):void 0,A=j?.time??F,T=U[q+1],C=T?Number(T.createdAt)||1/0:1/0,b=q===U.length-1,k=Q.find((A0)=>(A0.time??0)>A+5000&&A0.isEbot&&(A0.nodeName?.includes("智能")||A0.nodeName?.includes("AI")||A0.action?.includes("智能")||A0.comment?.includes("AI")||A0.comment?.includes("approval-result"))&&!A0.nodeName?.includes("费用标准检查")&&!A0.nodeName?.includes("标准检查")&&!A0.nodeName?.includes("预算"));if(k){if(b=!1,(k.time??1/0){let Q0=A0.time??0;return Q0>=A-e0&&Q0(A0.time??0)>A+5000),u1=k1.some((A0)=>A0.rawAction==="freeflow.retract"||A0.action==="单据撤回"),b1=k1.some((A0)=>A0.rawAction==="freeflow.submit"||A0.action==="提交送审");if(w1&&b&&(u1||b1))b0=!0,i0="AI通过后单据发生撤回/修改重提,后续未经AI复审";if(p&&x)H0="无操作",F0="-";else{let A0=s.filter((v)=>(v.time??0)>=A-1000&&!v.isEbot&&v.rawAction!=="freeflow.submit"&&v.action!=="提交送审"&&!((v.rawAction==="freeflow.comment"||v.action==="发表评论")&&!v.comment)&&!((v.rawAction==="freeflow.print"||v.action==="打印提醒")&&!v.comment)&&!(v.rawAction==="freeflow.carbonCopy"||v.rawAction==="freeflow.cc"||v.action==="抄送通知")),Q0=A0.find((v)=>v.rawAction==="freeflow.retract"||v.action==="单据撤回"),B=A0.find((v)=>v.rawAction==="freeflow.reject"||v.action==="审批驳回");if(!b)if(B||!Y&&f0){H0="审批驳回",b0=!1,i0=void 0;let v=$p(B,void 0,O,Q,Y);F0=v.comment,n0=v.operator}else if(Q0||T0||!B&&r.includes("单据撤回")){H0="已撤回",n0=Q0?.operator;let v=Q0?A0.filter((a)=>(a.time??0)<=(Q0.time??1/0)):A0,u=eI(v);for(let a of v)if(!n0&&a.operator)n0=a.operator;if(Q0&&!u.some((a)=>a.includes("单据撤回")))u.push(`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`);F0=u.length>1?$K(u,[],"forward"):u.length===1?u[0]:Q0?`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`:"单据已撤回"}else{H0="已修改重提";let v=eI(A0);for(let u of A0)if(!n0&&u.operator)n0=u.operator;F0=v.length>1?$K(v,[],"forward"):v.length===1?v[0]:"-"}else if(B){H0="审批驳回",b0=!1,i0=void 0;let v=$p(B,void 0,O,Q,Y);F0=v.comment,n0=v.operator}else if(Z||!Y&&_0){let v=s.some((a)=>a.rawAction==="flow.modify"||a.isModification||a.action==="修改了单据");H0=H?v?"已支付 (中途修改)":"已支付":v?"审批通过 (中途修改)":"审批通过";let u=eI(A0);for(let a of A0)if(!n0&&a.operator)n0=a.operator;if(u.length>0)F0=$K(u,[],"forward");else{let a=[...s].reverse().find((X0)=>!X0.isEbot&&(X0.rawAction==="freeflow.agree"||X0.action==="审批同意"||X0.rawAction==="freeflow.pay"));if(F0=a?.comment?`1. ${a.comment}`:"-",!n0)n0=a?.operator}}else if(W){H0="⏳ 支付中";let v=eI(A0);for(let a of A0)if(!n0&&a.operator)n0=a.operator;let u=qA0(Y);F0=$K(v,u,"reverse")}else if(K||Q0&&!b1||T0){H0="已撤回",n0=Q0?.operator;let v=eI(A0);for(let u of A0)if(!n0&&u.operator)n0=u.operator;if(Q0&&!v.some((u)=>u.includes("单据撤回")))v.push(`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`);F0=v.length>1?$K(v,[],"forward"):v.length===1?v[0]:Q0?`提交人(${Q0.operator?.name||"提交人"}) ↩️: 单据撤回`:"单据已撤回"}else if(G||!Y&&f0){H0="审批驳回",b0=!1,i0=void 0;let v=$p(void 0,Y?.rejections?.[0],O,Q,Y);F0=v.comment,n0=v.operator}else{H0="⏳ 审批中";let v=eI(A0);for(let a of A0)if(!n0&&a.operator)n0=a.operator;let u=qA0(Y);F0=$K(v,u,"reverse")}}z.set(V.id,{recordId:V.id,sourceDocumentSN:V.sourceDocumentSN,taskMode:V.taskMode,aiDecision:ZA0(n),aiAction:Y0,eHumanAction:H0,eHumanComment:F0,auditDrift:b0,auditDriftReason:i0,operator:n0})}return z}var LA0=m(()=>{tc();ec();mc()});var Yp=m(()=>{tc();ec();mc();YA0();XA0();LA0()});import{existsSync as FA0,mkdirSync as OA0,statSync as lN1}from"node:fs";import{homedir as oN1}from"node:os";import{dirname as rN1,extname as sN1,resolve as fB}from"node:path";function b2($,Y=!1){if($===void 0||$===null||$==="")return;if(typeof $==="number")return String($);let z=String($).trim();if(!z)return;if(/^\d{10,13}$/.test(z))return z.length===10?`${z}000`:z;if(/^\d{4}-\d{2}-\d{2}$/.test(z)){let J=new Date(`${z}${Y?"T23:59:59.999+08:00":"T00:00:00.000+08:00"}`).getTime();if(!Number.isNaN(J))return String(J)}let U=new Date(z).getTime();if(!Number.isNaN(U))return String(U);return z}function Up($){if($===void 0||$===null||$==="")return;if($ instanceof Date)return Number.isNaN($.getTime())?void 0:$.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"});let Y=String($).trim();if(!Y)return;if(/^\d{4}-\d{2}-\d{2}/.test(Y))return Y.slice(0,10);if(/^\d{10}$/.test(Y)){let U=new Date(Number(Y)*1000);return Number.isNaN(U.getTime())?void 0:U.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}if(/^\d{13}$/.test(Y)||/^\d+$/.test(Y)){let U=new Date(Number(Y));return Number.isNaN(U.getTime())?void 0:U.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}let z=new Date(Y);return Number.isNaN(z.getTime())?void 0:z.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}function zp($=0,Y=new Date){return new Date(Y.getTime()+$*86400000).toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}function aN1($,Y=0){let z=new Date(`${$}T00:00:00+08:00`);return z.setDate(z.getDate()+Y),z.toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"})}function Qp($={}){let Y=$.maxSpanDays??180,z=$.startDate!==void 0&&$.startDate!==null&&String($.startDate).trim()!=="",U=$.endDate!==void 0&&$.endDate!==null&&String($.endDate).trim()!=="",Q="",J="";if(z){let Z=Up($.startDate);if(!Z)throw Error(`无效的起始时间参数: "${String($.startDate)}"。请使用 YYYY-MM-DD 或有效时间戳。`);Q=Z}if(U){let Z=Up($.endDate);if(!Z)throw Error(`无效的结束时间参数: "${String($.endDate)}"。请使用 YYYY-MM-DD 或有效时间戳。`);J=Z}if(!z&&!U){if(Q=zp(-1),J=zp(0),!$.silent)console.error(`ℹ️ 未指定导出起止时间,已自动采用默认区间: ${Q}至${J}(昨天至今天)。`)}else if(z&&!U){if(J=zp(0),!$.silent)console.error(`ℹ️ 未指定导出结束时间,已自动补齐截至今天: ${Q}至${J}。`)}else if(!z&&U){if(Q=aN1(J,-30),!$.silent)console.error(`ℹ️ 未指定导出起始时间,已自动向前回溯 30 天: ${Q}至${J}。`)}let I=b2(Q,!1),K=b2(J,!0);if(Number(I)>Number(K))throw Error(`起始时间 (${Q}) 不能晚于结束时间 (${J})。`);let G=new Date(`${Q}T00:00:00+08:00`).getTime(),H=new Date(`${J}T00:00:00+08:00`).getTime(),W=Math.round((H-G)/86400000);if(W>Y){if(!$.force)throw Error(`时间跨度超过 ${Y} 天(当前为 ${W} 天),大范围导出耗时较长且占用系统资源。如确认需要导出,请添加 --force 参数强制执行。`);if(!$.silent)console.error(`⚠️ 时间跨度超过 ${Y} 天(当前为 ${W} 天),已按 --force 强制执行大范围导出。`)}let X=`${Q}至${J}`;return{startDateStr:Q,endDateStr:J,startDateTs:I,endDateTs:K,dateTag:X,spanDays:W}}function tN1($){if(!$)return;let Y=Array.isArray($)?$:[$],z=[];for(let U of Y){let Q=U.trim().toUpperCase();if(["APPROVED","已通过","已完成","已支付","已支付/审批完成"].includes(Q))z.push("APPROVED");else if(["TERMINATED","REJECTED","REJECT","驳回","被驳回","已驳回"].includes(Q))z.push("TERMINATED");else if(["PROCESSING","审批中","处理中"].includes(Q))z.push("PROCESSING");else if(["CANCELLED","CANCELED","已撤回","已撤销"].includes(Q))z.push("CANCELLED");else if(Q)z.push(Q)}return z.length>0?z:void 0}function eN1($,Y,z){if(!Y)return z?`${$} (${z})`:$;return(Y.split(/[。\n\r;;!!]/)[0]?.trim()||Y.trim()).replace(/[*#`_]/g,"").trim().slice(0,22)}function $D1($=new Date){let Y=new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Shanghai",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts($),z=(G)=>Y.find((H)=>H.type===G)?.value||"",U=z("year"),Q=z("month"),J=z("day"),I=z("hour"),K=z("minute");return`${U}${Q}${J}_${I}${K}`}function YD1($){if($.outputFile){let K=fB($.outputFile),G=sN1(K).toLowerCase();if(G&&G!==".xlsx")throw Error(`导出路径错误: 本命令仅支持导出 Excel 工作簿,文件扩展名必须为 .xlsx(当前指定为 "${G}")。请使用 .xlsx 后缀,例如: ${K.slice(0,-G.length)}.xlsx`);if(!G)K=`${K}.xlsx`;let H=rN1(K);if(!FA0(H))OA0(H,{recursive:!0});return K}let Y=$.corpName.replace(/[/\\?%*:|"<>]/g,"_").trim()||"审批记录",z=$.dateTag||new Date().toISOString().slice(0,10),U=$.recordCount>0?`${$.recordCount}条`:"空数据",Q=$D1($.exportTime||new Date),J=`${Y}_审核记录_${z}_${U}_${Q}.xlsx`,I;if($.toDownloads)I=fB(oN1(),"Downloads");else I=fB(process.cwd(),"exports");if(!FA0(I))OA0(I,{recursive:!0});return fB(I,J)}async function uB($,Y,z={}){let U=Y.name||Y.id,Q=z.pageSize??100,J=z.pageDelayMs??250,I=z.limit??1e5,K=Boolean(z.startDate||z.endDate),G=Array.isArray(z.sns)?z.sns.map((g)=>g.trim()).filter(Boolean):[],H=G.length>0,W=new Set(G),X=Qp({startDate:z.startDate,endDate:z.endDate,force:z.force,silent:!K&&H}),{startDateTs:Z,endDateTs:q}=X,V=X.dateTag,F=tN1(z.manualApprovalStatus);console.error(`正在加载企业「${U}」审核规则集...`);let w=new Map;try{(await X6($)).rules.forEach((p,Y0)=>{let y=`rule-${p.code??Y0}`,r=eN1(y,p.description,p.scope);w.set(y,{id:y,code:String(p.code??Y0),title:`[${y}] ${r}`,desc:p.description})})}catch(g){console.error(`⚠️ 加载规则字典失败: ${g.message},将仅导出基础信息列。`)}let O=Array.from(w.keys()).sort((g,p)=>{let Y0=parseInt(g.replace(/\D/g,""),10)||0,y=parseInt(p.replace(/\D/g,""),10)||0;return Y0-y});if(console.error(`已就绪 ${O.length} 个规则列。开始拉取单据...`),z.withFlow===!0&&Y.source.type==="hose")if(H)console.error(`\uD83C\uDFAF [单据筛选] 已指定定向筛选单号: [${G.join(", ")}] (共 ${G.length} 个)。`);else try{let g=await i4($,{limit:1,startDate:Z,endDate:q,status:z.status,sourceSystem:z.sourceSystem,taskMode:z.taskMode,manualApprovalStatus:F}),p=g.total??g.records?.length??0,Y0=Math.max(1,Math.min(z.flowConcurrency??3,5)),y=Math.max(1,Math.ceil(p/Y0*0.4));if(p>50)console.error(`⚠️ [审批流对齐提示] 目标区间内单据规模约为 ${p} 笔。系统已启用合思 Open API 保护限流(并发 ${Y0}),预计审批流拉取耗时约 ${y} 秒。`)}catch{}let N=[],M=0,D=0;if(H&&G.length<=50){console.error(`正在定向检索 ${G.length} 个指定单号...`);for(let g of G){try{let Y0=((await i4($,{search:g,limit:50,startDate:K?Z:void 0,endDate:K?q:void 0,status:z.status,sourceSystem:z.sourceSystem,taskMode:z.taskMode,manualApprovalStatus:F})).records||[]).filter((y)=>y.sourceDocumentSN===g);for(let y of Y0){if(!(z.taskMode==="simulation"||z.includeSimulation===!0||Y.environment==="test")&&y.taskMode==="simulation"){M++;continue}if(z.taskMode&&y.taskMode!==z.taskMode)continue;if(Y.source.type==="hose"&&y.sourceSystem&&!["hose","hosecloud"].includes(y.sourceSystem)){D++;continue}if(z.includeCompletedOnly&&y.status!=="completed")continue;if(y.status==="completed"&&(!y.result||!y.result.rulesResult))try{let $0=await H4($,y.id);N.push($0)}catch{N.push(y)}else N.push(y);if(N.length>=I)break}}catch(p){console.error(`⚠️ 定向检索单号 [${g}] 失败: ${p.message}`)}if(N.length>=I)break}console.error(`定向检索完成,成功匹配 ${N.length} 条记录。`)}else{let g=0,p=0;while(N.length0)try{Y0=await i4($,{limit:Q,offset:g,startDate:Z,endDate:q,status:z.status,sourceSystem:z.sourceSystem,taskMode:z.taskMode,manualApprovalStatus:F});break}catch($0){if(y--,console.error(`分页拉取失败 (offset=${g}): ${$0.message},剩余重试 ${y} 次...`),y===0)throw $0;await new Promise((N0)=>setTimeout(N0,1000))}if(!Y0||!Y0.records||Y0.records.length===0)break;p=Y0.total??p;for(let $0 of Y0.records){if(H&&(!$0.sourceDocumentSN||!W.has($0.sourceDocumentSN)))continue;if(!(z.taskMode==="simulation"||z.includeSimulation===!0||Y.environment==="test")&&$0.taskMode==="simulation"){M++;continue}if(z.taskMode&&$0.taskMode!==z.taskMode)continue;if(Y.source.type==="hose"&&$0.sourceSystem&&!["hose","hosecloud"].includes($0.sourceSystem)){D++;continue}if(z.includeCompletedOnly&&$0.status!=="completed")continue;if($0.status==="completed"&&(!$0.result||!$0.result.rulesResult))try{let T0=await H4($,$0.id);N.push(T0)}catch{N.push($0)}else N.push($0);if(N.length>=I)break}g+=Y0.records.length;let r=p>0?(g/p*100).toFixed(1):"-";if(g%500===0||g>=p||N.length>=I)console.error(`[进度] 已读取单据: ${g}/${p} (${r}%),有效加入: ${N.length} 条`);if(Y0.records.length=p)break;if(J>0)await new Promise(($0)=>setTimeout($0,J))}}if(M>0)console.error(`ℹ️ 已自动排除 ${M} 条模拟测试任务 (taskMode="simulation"),仅保留真实审批任务。`);if(D>0)console.error(`ℹ️ 已自动排除 ${D} 条非合思来源单据,仅保留合思业务单据。`);if(!K&&H&&N.length>0){let g=N.map((p)=>Up(p.createdAt||p.updatedAt)).filter(Boolean);if(g.length>0){g.sort();let p=g[0],Y0=g[g.length-1];V=p===Y0?p:`${p}至${Y0}`}}console.error(`成功拉取 ${N.length} 条单据数据,正在生成高保真 Excel...`);let P=new wA0.default.Workbook;P.creator="Seal AI (seal-use)",P.created=new Date;let j=P.addWorksheet("审核记录明细",{views:[{state:"frozen",ySplit:1,xSplit:2}]}),A=z.withFlow===!0&&Y.source.type==="hose",T=[{header:"单据编号",key:"sn",width:16},{header:"单据模板名称",key:"templateName",width:26},{header:"来源系统",key:"sourceSystem",width:12},{header:"任务模式",key:"taskMode",width:12},{header:"状态",key:"status",width:12},{header:"AI行为",key:"aiAction",width:14},{header:"AI决策",key:"aiDecision",width:14},{header:"思考深度",key:"thinkingDepth",width:12},{header:"人工审核",key:"manualStatus",width:16},{header:"人工驳回原因",key:"humanRejectReason",width:36},...A?[{header:"E人工行为",key:"eHumanAction",width:18},{header:"E人工意见",key:"eHumanComment",width:36}]:[],{header:"创建时间",key:"createdAt",width:20},{header:"任务耗时",key:"duration",width:12},{header:"关联规则数",key:"hitRuleCount",width:12},{header:"关联规则汇总",key:"hitRulesSummary",width:30},{header:"AI审核结论摘要",key:"aiSummary",width:45}],C=O.map((g)=>{return{header:w.get(g).title,key:`rule_${g}`,width:22}});j.columns=[...T,...C];let b=j.getRow(1);b.height=32,b.eachCell((g,p)=>{let Y0=p<=T.length;g.font={name:"Microsoft YaHei",bold:!0,color:{argb:"FFFFFFFF"},size:11},g.fill={type:"pattern",pattern:"solid",fgColor:{argb:Y0?"FF1E3A8A":"FF334155"}},g.alignment={vertical:"middle",horizontal:Y0&&p<=2?"left":"center",wrapText:!1}});let k={},S=0,i=new Map,n=new Set,U0=z.excludeDeleted??!0;if(z.withFlow===!0&&Y.source.type==="hose"){try{let g=new Map;for(let Y0 of N){let y=Y0.sourceDocumentId||Y0.sourceDocumentSN;if(y){let r=g.get(y)||[];r.push(Y0),g.set(y,r)}}let p=Array.from(g.keys());if(p.length>0){let Y0=Math.max(1,Math.min(z.flowConcurrency??3,5)),y=z.flowBatchDelayMs??150,r=Math.max(1,Math.ceil(p.length/Y0*(0.25+y/1000)));console.error(`正在拉取合思原生审批流以对齐人工行为与意见 (共 ${p.length} 个单据,并发限制: ${Y0},批次间隔: ${y}ms,预计耗时约 ${r}s)...`);let $0=await tI(Y),N0=new Map;for(let T0=0;T0{let f0=g.get(G0),e0=f0[0]?.sourceDocumentSN||G0;try{let s=await xB($0,G0,N0);if(!s){n.add(e0);let F0=XU(f0,void 0);for(let[b0,i0]of F0.entries())i0.eHumanAction="单据已删除",i0.eHumanComment="合思系统中未找到该单据流转记录(可能已在合思端删除或作废)",i.set(b0,i0);return}let H0=XU(f0,s);for(let[F0,b0]of H0.entries())i.set(F0,b0)}catch(s){console.error(`⚠️ 拉取单据 ${e0} 审批流失败: ${s.message},使用降级对齐。`);let H0=XU(f0,void 0);for(let[F0,b0]of H0.entries())i.set(F0,b0)}})),y>0&&T0+Y0setTimeout(G0,y));if((T0+Y0)%20=p.length){let G0=Math.min(T0+_0.length,p.length),f0=Math.round(G0/p.length*100);console.error(`[审批流进度] 已对齐: ${G0}/${p.length} (${f0}%)...`)}}}}catch(g){console.error(`⚠️ 对齐合思审批流失败: ${g.message},E人工行为与意见将使用默认值。`)}if(n.size>0)console.error(`ℹ️ 检测到 ${n.size} 个单据在合思端已删除或不存在(如: ${Array.from(n).slice(0,3).join(", ")}...)${U0?",已按要求自动排除。":",已在报表中标记为「单据已删除」。"}`)}let x=0,d=0;for(let g of N){let p=g.sourceDocumentSN||g.sourceDocumentId;if(U0&&p&&n.has(p)){d++;continue}x++;let Y0=g.result||{},y=g.document||{},r="未知模板";if(Array.isArray(y.fields)){let B=y.fields.find((v)=>v.label==="单据模板"||v.label==="流程名称"||v.key==="templateName"||v.key==="specificationId"||v.key==="formName");if(B?.value)r=String(B.value)}if(r==="未知模板"&&(y.name||y.title))r=y.name||y.title;let $0=g.taskMode||"-";if($0==="assisted")$0="辅助审核";else if($0==="simulation")$0="测试任务";else if($0==="automatic")$0="自动审批";let N0=g.status||"-";if(N0==="completed")N0="已完成";else if(N0==="processing")N0="处理中";else if(N0==="failed")N0="失败";let T0=Y0.decision||g.aiDecision||"-",_0=String(T0).toUpperCase(),G0=String(T0),f0="-";if(_0==="APPROVE"||_0==="通过")G0="通过",f0="添加评论";else if(_0==="EXEMPT_APPROVE"||_0==="免审通过"||_0==="备注通过")G0="备注通过",f0="添加评论";else if(_0==="REVIEW"||_0==="转交复核")G0="转交复核",f0="转交复核";else if(_0==="REJECT"||_0==="驳回")G0="驳回",f0="驳回";else if(_0==="ERROR"||_0==="错误")G0="错误",f0="-";let e0="-";if(g.createdAt&&g.updatedAt&&g.status==="completed"){let B=Math.round((Number(g.updatedAt)-Number(g.createdAt))/1000);if(B>=60)e0=`${Math.floor(B/60)}分${B%60}秒`;else if(B>0)e0=`${B}秒`}let s=g.manualApprovalRecord||{},H0=String(s.status?.sourceStatus||""),F0="-";if(s.status?.label)F0=String(s.status.label);else if(s.status?.type){let B=String(s.status.type);if(B==="APPROVED")F0="已通过";else if(B==="TERMINATED")F0="被驳回";else if(B==="PROCESSING")F0="处理中";else if(B==="CANCELLED")F0="已撤回";else F0=B}k[F0]=(k[F0]||0)+1;let b0=s.rejectComment?String(s.rejectComment).trim():"-";if(b0!=="-")S++;let i0=new Map,n0=[];if(Array.isArray(Y0.rulesResult)){for(let B of Y0.rulesResult)if(B.id)i0.set(B.id,B.checkResult||"PASS"),n0.push(B.id)}if(Array.isArray(Y0.hitRules)){for(let B of Y0.hitRules)if(B.id&&!i0.has(B.id))i0.set(B.id,"TRIGGERED"),n0.push(B.id)}let w1="-";if(g.createdAt)w1=new Date(Number(g.createdAt)).toLocaleString("zh-CN",{timeZone:"Asia/Shanghai",hour12:!1});let k1=i.get(g.id),u1=k1?k1.eHumanAction:"-",b1=k1?k1.eHumanComment:"-",A0={sn:g.sourceDocumentSN||g.sourceDocumentId||"-",templateName:r,sourceSystem:g.sourceSystem||"合思",taskMode:$0,status:N0,aiAction:f0,aiDecision:G0,thinkingDepth:"标准",manualStatus:F0,humanRejectReason:b0,...A?{eHumanAction:u1,eHumanComment:b1}:{},createdAt:w1,duration:e0,hitRuleCount:n0.length,hitRulesSummary:n0.join(", ")||"-",aiSummary:Y0.summary||"-"};for(let B of O){let v=i0.get(B);if(v)if(v==="PASS")A0[`rule_${B}`]="关联 (通过)";else if(v==="FAIL")A0[`rule_${B}`]="关联 (不通过)";else if(v==="UNKNOWN")A0[`rule_${B}`]="关联 (待复核)";else A0[`rule_${B}`]="已关联";else A0[`rule_${B}`]="未关联"}let Q0=j.addRow(A0);Q0.height=24,Q0.eachCell((B,v)=>{let u=String(B.value||"");if(B.font={name:"Microsoft YaHei",size:10},B.border={top:{style:"thin",color:{argb:"FFE2E8F0"}},bottom:{style:"thin",color:{argb:"FFE2E8F0"}},left:{style:"thin",color:{argb:"FFE2E8F0"}},right:{style:"thin",color:{argb:"FFE2E8F0"}}},v<=T.length){let X0=T[v-1]?.key||"",J0=["sn","templateName","humanRejectReason","eHumanComment","hitRulesSummary","aiSummary"].includes(X0),q0=["humanRejectReason","eHumanComment","hitRulesSummary","aiSummary"].includes(X0);if(B.alignment={vertical:"middle",horizontal:J0?"left":"center",wrapText:q0},X0==="aiDecision"){if(u==="通过"||u==="备注通过")B.font={color:{argb:"FF16A34A"},bold:!0};else if(u==="转交复核")B.font={color:{argb:"FFD97706"},bold:!0};else if(u==="驳回")B.font={color:{argb:"FFDC2626"},bold:!0};else if(u==="错误"||u==="ERROR")B.font={color:{argb:"FFDC2626"},bold:!0}}if(X0==="manualStatus"){if(u.includes("驳回"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FFDC2626"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEE2E2"}};else if(u.includes("通过")||u.includes("支付")||u.includes("完成"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF16A34A"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFDCFCE7"}};else if(u.includes("处理中")||u.includes("审批中"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF2563EB"}},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFEFF6FF"}};else if(u.includes("取消")||u.includes("撤回"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF64748B"}},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFF1F5F9"}}}if(X0==="humanRejectReason"&&u!=="-")B.font={name:"Microsoft YaHei",size:9,color:{argb:"FF991B1B"}};if(X0==="eHumanAction"){if(u.includes("⚠️")||u.includes("修改"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FFD97706"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEF3C7"}};else if(u.includes("驳回")||u.includes("退回"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FFDC2626"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEE2E2"}};else if(u.includes("通过")||u.includes("已支付")||u.includes("已完成"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF16A34A"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFDCFCE7"}};else if(u.includes("待处理")||u.includes("处理中")||u.includes("审核中")||u.includes("审批中")||u.includes("支付中"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF2563EB"},bold:!0},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFEFF6FF"}};else if(u.includes("撤回")||u.includes("取消"))B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF64748B"}},B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFF1F5F9"}};else if(u==="无操作")B.font={name:"Microsoft YaHei",size:10,color:{argb:"FF94A3B8"}}}if(X0==="eHumanComment"&&u!=="-")B.font={name:"Microsoft YaHei",size:9,color:{argb:"FF334155"}}}else if(B.alignment={vertical:"middle",horizontal:"center"},u.includes("不通过"))B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEE2E2"}},B.font={color:{argb:"FF991B1B"},bold:!0};else if(u.includes("通过"))B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFDCFCE7"}},B.font={color:{argb:"FF166534"},bold:!0};else if(u.includes("待复核")||u.includes("已关联"))B.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFFEF3C7"}},B.font={color:{argb:"FF92400E"}};else B.font={color:{argb:"FF94A3B8"}}})}let t=YD1({outputFile:z.outputFile,toDownloads:z.toDownloads,corpName:U,dateTag:V,recordCount:x,exportTime:z.exportTime});await P.xlsx.writeFile(t),console.error(`Excel 文件已成功落地: ${t}`);let e=lN1(t);return{filePath:t,corpId:Y.id,corpName:U,recordCount:x,ruleColumnCount:O.length,statusCounts:k,rejectReasonCount:S,fileSizeBytes:e.size,exportedAt:new Date().toISOString(),excludedDeletedCount:d,excludedSimulationCount:M}}var wA0;var bB=m(()=>{B6();Yp();wA0=J6(CZ(),1)});import MA0 from"node:fs";import NA0 from"node:path";function zD1($){try{let Y=new URL($);if(Y.search)return`${Y.origin}${Y.pathname}?[MASKED]`;return $}catch{return $.replace(/\?.*$/,"?[MASKED]")}}function Kp($){return $.replace(/[/\\?%*:|"<>]/g,"_").trim()||"attachment"}function DA0($){return Object.fromEntries(Object.entries($).filter(([,Y])=>Y!==void 0))}function UD1($){return $&&typeof $==="object"&&!Array.isArray($)?$:void 0}function Q4($){return typeof $==="string"&&$.trim()?$.trim():void 0}function Jp($){return typeof $==="number"&&Number.isFinite($)?$:void 0}function QD1($){if(!$)return;if(typeof $==="string")try{let Y=JSON.parse($);if(Y&&typeof Y==="object")return Y}catch{return}if(typeof $==="object"&&!Array.isArray($))return $;return}function JD1($,Y,z){if(z?.fieldType?.toUpperCase()==="ATTACHMENT"){if(Boolean($.fileName||$.filename||$.name||$.originalName||$.fileId||$.ossPath||$.url||$.ossSignedUrl||$.signedUrl||$.token))return!0}if($.ossSignedUrl||$.signedUrl)return!0;let U=$.fileName??$.filename??$.name??$.originalName,Q=$.fileId??$.id??$.attachmentId,J=$.ossPath??$.ossKey,I=$.url??$.downloadUrl??$.previewUrl,K=$.mimeType??$.mimetype??$.contentType,G=$.ossFileSize??$.fileSize??$.size;if(U&&(I||J||Q||G))return!0;if(Q&&(K||G||J||I))return!0;let H=Object.keys($).map((Z)=>Z.toLowerCase());return(/(attachment|attachments|invoice|receipt|file|files|附件|发票)/i.test(Y)||Boolean(z?.fieldKey&&/(attachment|attachments|invoice|receipt|file|files|附件|发票)/i.test(z.fieldKey))||Boolean(z?.fieldLabel&&/(attachment|attachments|invoice|receipt|file|files|附件|发票)/i.test(z.fieldLabel)))&&["filename","filename","mimetype","contenttype","fileid","osspath","signedurl","downloadurl","previewurl","attachmentid","ossfilesize","osssignedurl"].some((Z)=>H.includes(Z))}function ID1($,Y,z){let U=`${$} ${z?.fieldLabel??""} ${z?.fieldKey??""} ${Q4(Y.type)??""} ${Q4(Y.category)??""}`.toLowerCase();if(U.includes("invoice")||U.includes("发票"))return"invoice";if(U.includes("receipt"))return"receipt";let Q=(Q4(Y.fileName)??Q4(Y.name)??"").toLowerCase();if(Q.includes("发票")||Q.includes("invoice"))return"invoice";return"attachment"}function Ip($,Y,z,U,Q){if(Array.isArray($)){$.forEach((H,W)=>Ip(H,`${Y}.${W}`,z,U,Q));return}let J=UD1($);if(!J)return;let I=J.type&&typeof J.type==="string"||"label"in J&&"value"in J||"key"in J&&"value"in J,K=Q;if(I)K={fieldLabel:Q4(J.label)??Q?.fieldLabel,fieldKey:Q4(J.key)??Q?.fieldKey,fieldType:Q4(J.type)??Q?.fieldType};if(!(Array.isArray(J.value)&&!J.url&&!J.ossSignedUrl&&!J.fileId)&&JD1(J,Y,Q)){let H=QD1(J.token),W=Q4(H?.key),X=Q4(H?.fileId),Z=DA0({path:Y,fieldPath:Y,kind:ID1(Y,J,Q),fileName:Q4(J.fileName)??Q4(J.filename)??Q4(J.name)??Q4(J.originalName),mimeType:Q4(J.mimeType)??Q4(J.mimetype)??Q4(J.contentType),fileId:Q4(J.fileId)??Q4(J.id)??Q4(J.attachmentId)??X,ossPath:Q4(J.ossPath)??Q4(J.ossKey)??W,url:Q4(J.url)??Q4(J.signedUrl)??Q4(J.downloadUrl)??Q4(J.previewUrl),ossSignedUrl:Q4(J.ossSignedUrl)??Q4(J.signedUrl),token:J.token,tokenKey:W,category:Q4(J.category),ossFileSize:Jp(J.ossFileSize)??Jp(J.fileSize)??Jp(J.size),invoiceId:Q4(J.invoiceId),sourceField:Q4(J.fieldName)??Q4(J.label)??Q?.fieldLabel??Q?.fieldKey}),q=JSON.stringify(Z);if(!U.has(q))U.add(q),z.push(Z)}for(let[H,W]of Object.entries(J))Ip(W,`${Y}.${H}`,z,U,K)}function i2($,Y={}){let z=[["document",$.document],["result",$.result],["pipelineData",$.pipelineData],["sourceExtendData",$.sourceExtendData]],U=[],Q=new Set;for(let[J,I]of z)Ip(I,J,U,Q);return{recordId:$.id,sourceDocumentSN:$.sourceDocumentSN,sourceDocumentId:$.sourceDocumentId,count:U.length,attachments:Y.summary?U.map((J)=>DA0({path:J.path,kind:J.kind,fileName:J.fileName,mimeType:J.mimeType,fileId:J.fileId,sourceField:J.sourceField,ossFileSize:J.ossFileSize,hasSignedUrl:Boolean(J.ossSignedUrl)})):U}}async function iB($){let{record:Y,fetchFn:z=globalThis.fetch}=$,Q=i2(Y,{summary:!1}).attachments,J=NA0.resolve($.outDir??"./attachments");if(Q.length===0)return{recordId:Y.id,outDir:J,total:0,downloaded:0,failed:0,files:[]};let I=[];if($.name){let X=$.name.toLowerCase();if(I=Q.filter((Z)=>{let q=Z.fileName?.toLowerCase()??"",V=Z.fileId?.toLowerCase()??"",F=Z.tokenKey?.toLowerCase()??"";return q.includes(X)||V===X||F.includes(X)}),I.length===0){let Z=Q.map((q)=>q.fileName??q.fileId).filter(Boolean).join(", ");throw Error(`未找到匹配 "${$.name}" 的附件。可选附件: ${Z||"无"}`)}}else if(!$.all){if(Q.length>1){let X=Q.map((Z)=>Z.fileName??Z.fileId).filter(Boolean).join(", ");throw Error(`共发现 ${Q.length} 个附件。请使用 --all 下载全部附件,或使用 --name <名称|fileId> 指定下载项。可选附件: ${X}`)}I=Q}else I=Q;await MA0.promises.mkdir(J,{recursive:!0});let K=[],G=new Set;for(let X of I){let Z=X.fileName??X.fileId??"attachment",q=Kp(Z),V=q,F=q.lastIndexOf("."),w=F>0?q.slice(0,F):q,O=F>0?q.slice(F):"",N=1;while(G.has(V.toLowerCase()))V=`${w}_${N}${O}`,N++;G.add(V.toLowerCase());let M=X.ossSignedUrl??X.url;if(!M){console.error(`⚠️ [跳过] 附件 "${Z}": 记录中无下载直链 (ossSignedUrl/url)`),K.push({name:V,fileId:X.fileId,status:"failed",error:"缺少可用的下载直链 (ossSignedUrl/url)。",sourceField:X.sourceField,tokenKey:X.tokenKey});continue}let D=zD1(M);try{let P=await z(M,{signal:AbortSignal.timeout(60000)});if(!P.ok){let C=P.status===403?"HTTP 403 Forbidden: 签名直链可能已过期":`HTTP ${P.status} ${P.statusText}`;throw Error(C)}let j=await P.arrayBuffer(),A=Buffer.from(j);if(X.ossFileSize!==void 0&&A.length!==X.ossFileSize)console.error(`⚠️ [校验] 附件 "${V}" 实际大小 (${A.length} 字节) 与 ossFileSize (${X.ossFileSize} 字节) 不一致`);let T=NA0.join(J,V);await MA0.promises.writeFile(T,A),console.error(`✓ 已下载: ${V} (${A.length} 字节)`),K.push({name:V,fileId:X.fileId,path:T,size:A.length,expectedSize:X.ossFileSize,status:"success",sourceField:X.sourceField,tokenKey:X.tokenKey})}catch(P){let j=P.message??String(P);console.error(`⚠️ [失败] 附件 "${Z}" 下载失败: ${j} [${D}]`),K.push({name:V,fileId:X.fileId,status:"failed",error:j,sourceField:X.sourceField,tokenKey:X.tokenKey})}}let H=K.filter((X)=>X.status==="success").length,W=K.filter((X)=>X.status==="failed").length;return{recordId:Y.id,outDir:J,total:I.length,downloaded:H,failed:W,files:K}}var nB=()=>{};var KD1,GD1,HD1,WD1,AA0,Gp,Hp,XD1,ZD1,qD1,Wp,VD1,cB;var Xp=m(()=>{P$();KD1=L.object({type:L.literal("hose"),domain:L.string().url().default("https://app.ekuaibao.com"),appKey:L.string().optional(),appSecurity:L.string().optional(),key:L.string().optional(),password:L.string().optional(),staffId:L.string(),corpId:L.string(),sealUrl:L.string().url().optional()}).superRefine(($,Y)=>{if(!$.appKey&&!$.key)Y.addIssue({code:"custom",path:["appKey"],message:"Hose source requires appKey or key"});if(!$.appSecurity&&!$.password)Y.addIssue({code:"custom",path:["appSecurity"],message:"Hose source requires appSecurity or password"})}),GD1=L.object({type:L.literal("direct"),token:L.string(),sealUrl:L.string().url(),expiresIn:L.number().int().positive().default(3600),staffId:L.string().default("direct"),corpId:L.string().optional()}),HD1=L.object({type:L.literal("seal"),token:L.string(),sealUrl:L.string().url(),expiresIn:L.number().int().positive().default(3600),staffId:L.string().default("seal"),corpId:L.string().optional(),tenantId:L.string().optional(),tenantSlug:L.string().optional(),tenantName:L.string().optional(),providerUserId:L.string().optional(),provider:L.string().optional(),providerName:L.string().optional()}),WD1=L.discriminatedUnion("type",[KD1,GD1,HD1]),AA0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Gp=L.record(L.string().regex(AA0,"Invalid HTTP header name"),L.string()).superRefine(($,Y)=>{for(let z of Object.keys($))if(z.toLowerCase()==="authorization")Y.addIssue({code:"custom",path:[z],message:"seal.headers cannot set Authorization; the Seal session supplies the bearer token"})}).optional(),Hp=L.record(L.string().regex(AA0,"Invalid cookie name"),L.string().refine(($)=>!/[\u0000-\u001f\u007f;]/.test($),{message:"Cookie value cannot contain control characters or semicolons"})).optional(),XD1=L.object({url:L.string().url().optional(),tenantSlug:L.string().optional(),headers:Gp,cookies:Hp,endpoints:L.object({approvalStylePreferences:L.string().default("api/v1/agent/ai-approval/config")}).default({approvalStylePreferences:"api/v1/agent/ai-approval/config"})}).default({endpoints:{approvalStylePreferences:"api/v1/agent/ai-approval/config"}}),ZD1=L.object({refreshTtl:L.number().int().positive().default(300)}).default({refreshTtl:300}),qD1=L.enum(["production","test"]).default("production"),Wp=L.object({id:L.string(),name:L.string(),seal:XD1,source:WD1,auth:ZD1,environment:qD1,testCorpId:L.string().optional(),prodCorpId:L.string().optional()}),VD1=L.object({enabled:L.boolean().default(!1),activeLinter:L.string().default("builtin"),minScore:L.number().min(0).max(100).default(0)}).default({enabled:!1,activeLinter:"builtin",minScore:0}),cB=L.object({stateful:L.boolean().default(!1),defaultCorpId:L.string().min(1).optional(),testEnterprisesDir:L.string().min(1).optional(),lint:VD1})});import{copyFileSync as BA0,existsSync as L$,mkdirSync as jA0,readFileSync as lB,readdirSync as dB,rmSync as LD1,statSync as _Z,writeFileSync as TA0}from"node:fs";import{homedir as oB}from"node:os";import{dirname as FD1,join as P9}from"node:path";function OD1($=YK,Y=mB){if(!L$(Y))return{copied:[],deletedLegacyDir:!1};jA0($,{recursive:!0,mode:448});let z=[],U=[];try{U=dB(Y).filter((X)=>X.endsWith(".json"))}catch{return{copied:[],deletedLegacyDir:!1}}for(let X of U){let Z=P9(Y,X),q=P9($,X);if(!L$(q))BA0(Z,q),z.push(X);else{let V=_Z(Z).mtimeMs,F=_Z(q).mtimeMs;if(V>F)BA0(Z,q),z.push(X)}}let Q=604800000,J=Date.now(),I=!1,K=!1;for(let X of dB(Y)){let Z=P9(Y,X),q=P9($,X),V=_Z(Z);if(J-V.mtimeMs_Z(q).mtimeMs)I=!0}}let G=_Z(Y),H=J-G.mtimeMsQ.endsWith(".json")).filter((Q)=>!Q.startsWith("example."))){let Q=lB(P9(z,U),"utf-8"),J=Wp.parse(JSON.parse(Q));Y.set(J.id,J)}return Array.from(Y.values())}function hA0(){let $=(process.env[Zp]??process.env[EA0])?.trim();if($)return L$($)?[$]:[];let Y=(process.env[CA0]??process.env[RA0])?.trim(),z;if(Y)z=L$(Y)?[Y]:[];else{try{OD1()}catch{}z=L$(YK)?[YK]:L$(mB)?[mB]:[YK]}let Q=v4().testEnterprisesDir?.trim(),J=Q?[Q,...z]:z,I=[];for(let K of J)if(L$(K)&&!I.includes(K))I.push(K);return I}function qp(){let $=(process.env[Zp]??process.env[EA0])?.trim();if($)return $;let Y=(process.env[CA0]??process.env[RA0])?.trim();if(Y)return Y;let z=v4().testEnterprisesDir?.trim();if(z&&L$(z))return z;return YK}function g3(){let $=v4().testEnterprisesDir?.trim();return[`${Zp}=`,...$?[`testEnterprisesDir: ${$}`]:[],YK,mB]}function ZU(){let $=(process.env[_A0]??process.env[vA0])?.trim();if($)return $;if(L$(pB))return pB;if(L$(PA0))return PA0;return pB}function v4(){let $=ZU();if(!L$($))return cB.parse({});return cB.parse(JSON.parse(lB($,"utf-8")))}function qU($){let Y=cB.parse($),U=(process.env[_A0]??process.env[vA0])?.trim()||pB;return jA0(FD1(U),{recursive:!0,mode:448}),TA0(U,`${JSON.stringify(Y,null,2)} `,{mode:384}),Y}function Vp($){let Y=hA0();for(let z of Y){if(!L$(z))continue;for(let U of dB(z).filter((Q)=>Q.endsWith(".json")).filter((Q)=>!Q.startsWith("example."))){let Q=P9(z,U);try{let J=lB(Q,"utf-8"),I=JSON.parse(J);if(I&&typeof I==="object"&&I.id===$)return Q}catch{}}}return}function y3($,Y){let z=Vp($);if(!z)throw Error(`Enterprise config not found: ${$}`);let Q={...JSON.parse(lB(z,"utf-8")),...Y};for(let I of Object.keys(Y))if(Y[I]===void 0)delete Q[I];let J=Wp.parse(Q);return TA0(z,`${JSON.stringify(J,null,2)} `,"utf-8"),J}var Zp="SEAL_USE_ENTERPRISES_DIR",EA0="SEAL_HOME_ENTERPRISES_DIR",CA0="SEAL_USE_USER_ENTERPRISES_DIR",RA0="SEAL_HOME_USER_ENTERPRISES_DIR",_A0="SEAL_USE_CONFIG_FILE",vA0="SEAL_HOME_CONFIG_FILE",YK,mB,pB,PA0;var k3=m(()=>{Xp();YK=P9(oB(),".config","seal-use","enterprises"),mB=P9(oB(),".config","seal-home","enterprises"),pB=P9(oB(),".config","seal-use","config.json"),PA0=P9(oB(),".config","seal-home","config.json")});function n2($,Y,z=[]){let U=Y.corpId?.trim()||void 0,Q=Y.stateful?Y.defaultCorpId?.trim()||void 0:void 0,J=U??Q;if(J){let K=$.find((W)=>W.id===J);if(K)return K;let G=$.find((W)=>W.id.toLowerCase()===J.toLowerCase());if(G)return G;let H=$.find((W)=>W.name.toLowerCase()===J.toLowerCase());if(H)return H;throw Error(`No enterprise config found for ${J}`)}if(!Y.stateful)throw Error("Stateless mode is enabled. Every enterprise command requires --corp . Use `seal-use config mode stateful` to enable a default enterprise.");let I=$[0];if(I)return I;throw Error("No enterprise config found. Add a non-example JSON file under one of: "+(z.length?z.join(", "):"the configured enterprise directories"))}import{existsSync as Lp,mkdirSync as wD1,readFileSync as MD1,renameSync as ND1,unlinkSync as DD1,writeFileSync as AD1}from"node:fs";import{homedir as BD1}from"node:os";import{dirname as PD1,join as jD1}from"node:path";function vZ(){let $=process.env[TD1]?.trim();if($)return $;return ED1}function SA0($=new Date){return $.toISOString().slice(0,10)}function gA0($=Fp,Y=new Date){let z=Y.getTime()-Math.max(0,$-1)*86400000;return new Date(z).toISOString().slice(0,10)}function yA0($=vZ()){if(!Lp($))return{};try{let Y=MD1($,"utf-8"),z=JSON.parse(Y);if(z&&typeof z==="object"&&!Array.isArray(z))return z;return{}}catch{return{}}}function CD1($,Y){let z={};for(let[U,Q]of Object.entries($)){if(!Q||typeof Q!=="object")continue;let J={},I=!1;for(let[K,G]of Object.entries(Q))if(typeof G==="number"&&G>0&&K>=Y)J[K]=G,I=!0;if(I)z[U]=J}return z}function RD1($,Y=vZ()){let z=PD1(Y);if(!Lp(z))wD1(z,{recursive:!0,mode:448});let U=`${Y}.${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2,8)}.tmp`;try{AD1(U,JSON.stringify($,null,2),{encoding:"utf-8",mode:384}),ND1(U,Y)}catch(Q){try{if(Lp(U))DD1(U)}catch{}throw Q}}function kA0($,Y=new Date){if(!$||typeof $!=="string")return;try{let z=vZ(),U=yA0(z),Q=SA0(Y),J=gA0(Fp,Y),I=CD1(U,J);I[$]=I[$]||{},I[$][Q]=(I[$][Q]??0)+1,RD1(I,z)}catch{}}function _D1($,Y=Fp,z=new Date){let U=new Map;try{let Q=yA0(),J=gA0(Y,z),I=SA0(z),K=$??Object.keys(Q);for(let G of K){let H=Q[G];if(!H){U.set(G,0);continue}let W=0;for(let[X,Z]of Object.entries(H))if(X>=J&&X<=I&&typeof Z==="number")W+=Z;U.set(G,W)}}catch{if($)for(let Q of $)U.set(Q,0)}return U}function xA0($,Y,z){let U=z??_D1($.map((Q)=>Q.id));return[...$].sort((Q,J)=>{if(Y){if(Q.id===Y&&J.id!==Y)return-1;if(J.id===Y&&Q.id!==Y)return 1}let I=U.get(Q.id)??0,K=U.get(J.id)??0;if(I!==K)return K-I;let G=Q.name??Q.id,H=J.name??J.id,W=G.localeCompare(H,"zh-CN");if(W!==0)return W;return Q.id.localeCompare(J.id)})}var TD1="SEAL_USE_USAGE_FILE",ED1,Fp=7;var rB=m(()=>{ED1=jD1(BD1(),".config","seal-use","usage.json")});function vD1($,Y){return $.map((z)=>z.trim()).filter(Boolean).map((z)=>Y?z:z.toLowerCase())}function hD1($,Y){return Y?$:$.toLowerCase()}function SD1($,Y,z,U){let Q=hD1($,U),J=Y.filter((I)=>Q.includes(I));if(z==="all"&&J.length!==Y.length)return[];return J}function gD1($){if(typeof $==="string")return $.split(/\r?\n/);return JSON.stringify($,null,2).split(/\r?\n/)}function yD1($,Y){if(Y.fields&&!Y.fields.has($.field))return[];let z=gD1($.value),U=[];return z.forEach((Q,J)=>{let I=SD1(Q,Y.keywords,Y.matchMode,Y.caseSensitive);if(I.length===0)return;let K=Math.max(0,J-Y.contextLines),G=Math.min(z.length,J+Y.contextLines+1),H={area:$.area,entityType:$.entityType,entityId:$.entityId,title:$.title,field:$.field,lineNumber:J+1,matchedKeywords:I,matchedText:sB(Q,Y.maxChars),context:{before:Y.snippetOnly?[]:z.slice(K,J).map((W)=>sB(W,Y.maxChars)),line:sB(Q,Y.maxChars),after:Y.snippetOnly?[]:z.slice(J+1,G).map((W)=>sB(W,Y.maxChars))},metadata:$.metadata};if(Y.snippetOnly)H.context={before:[],line:H.context.line,after:[]};U.push(H)}),U}function sB($,Y){if(!Y||$.length<=Y)return $;return`${$.slice(0,Math.max(0,Y))}...`}function kD1($){return[{area:"rules",entityType:"rule",entityId:$.id,title:$.scope,field:"description",value:$.description,metadata:{scope:$.scope,strictness:$.strictness,status:$.status}},{area:"rules",entityType:"rule",entityId:$.id,title:$.scope,field:"scope",value:$.scope,metadata:{strictness:$.strictness,status:$.status}}]}function uA0($){return $.rules.flatMap((Y,z)=>{let U=`${$.id}:${Y.description.slice(0,32)}`,Q={versionId:$.id,versionNumber:$.versionNumber,versionName:$.versionName,publishedByName:$.publishedByName,publishedAt:$.publishedAt,scope:Y.scope,strictness:Y.strictness,code:"code"in Y?Y.code:void 0,index:z};return[{area:"rules",entityType:"rule",entityId:U,title:`${$.versionName} / ${Y.scope}`,field:"history.description",value:Y.description,metadata:Q},{area:"rules",entityType:"rule",entityId:U,title:`${$.versionName} / ${Y.scope}`,field:"history.scope",value:Y.scope,metadata:Q}]})}function xD1($){return[{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"title",value:$.title,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}},{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"purpose",value:$.purpose,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}},{area:"documents",entityType:"document",entityId:$.id,title:$.title,field:"content",value:$.content,metadata:{status:$.status,scenarios:$.scenarios,tags:$.tags}}]}function fD1($){let Y=[];if($.decisionPreferences)for(let[z,U]of Object.entries($.decisionPreferences))Y.push({area:"preferences",entityType:"preference",field:`decisionPreferences.${z}`,value:U,metadata:{integrationSystem:$.integrationSystem}});return $.integrations.forEach((z,U)=>{Y.push({area:"preferences",entityType:"integration",title:z.outboundName,field:`integrations[${U}]`,value:z,metadata:{type:z.type,outboundName:z.outboundName,mode:z.mode,corporationId:z.corporationId}})}),Y}async function uD1($,Y,z){let U=z.ruleVersionScope??"current",Q=[Y.id,`ruleVersionScope=${U}`,`ruleVersionId=${z.ruleVersionId??""}`,`ruleVersionNumber=${z.ruleVersionNumber??""}`,`latestRuleVersion=${z.latestRuleVersion??!1}`,`documentLimit=${z.documentLimit??100}`].join("|"),J=fA0.get(Q);if(!z.refresh&&J&&Date.now()Q.versionNumber===Y.versionNumber):z[0];if(!U)throw Error(Y.versionNumber?`Rule version not found: ${Y.versionNumber}`:"No rule versions found");return U}async function iA0($,Y,z){let U=z.matchMode??"any",Q=z.caseSensitive??!1,J=z.contextLines??3,I=new Set(z.areas??["rules","documents","preferences"]),K=z.maxResults??50,G=z.ruleVersionScope??"current",H=vD1(z.keywords,Q),W=z.fields?.length?new Set(z.fields):void 0;if(H.length===0)throw Error("keywords must contain at least one non-empty string");let X=await uD1($,Y,{documentLimit:z.documentLimit,refresh:z.refresh,ruleVersionScope:G,ruleVersionId:z.ruleVersionId,ruleVersionNumber:z.ruleVersionNumber,latestRuleVersion:z.latestRuleVersion}),Z=X.entries.filter((q)=>I.has(q.area)).flatMap((q)=>yD1(q,{keywords:H,matchMode:U,caseSensitive:Q,contextLines:J,snippetOnly:z.snippetOnly,maxChars:z.maxChars,fields:W}));return{query:{keywords:z.keywords,matchMode:U,areas:Array.from(I),caseSensitive:Q,contextLines:J,refresh:z.refresh??!1,ruleVersionScope:G,ruleVersionId:z.ruleVersionId,ruleVersionNumber:z.ruleVersionNumber,latestRuleVersion:z.latestRuleVersion??!1,snippetOnly:z.snippetOnly??!1,maxChars:z.maxChars,fields:z.fields},cache:{fetchedAt:new Date(X.fetchedAt).toISOString(),expiresAt:new Date(X.expiresAt).toISOString(),ttlMs:bA0},total:Z.length,returned:Math.min(Z.length,K),results:Z.slice(0,K)}}var bA0=300000,fA0;var nA0=m(()=>{B6();fA0=new Map});function hZ($){return $&&typeof $==="object"&&!Array.isArray($)?$:{}}function lA0($){let Y=hZ($);for(let z of mA0){let U=Y[z];if(typeof U==="string"&&U.trim())return U.trim();if(typeof U==="number"&&Number.isFinite(U))return String(U)}return}function SZ($){if($===void 0||$===null)return;let Y=String($).trim().toLowerCase().replace(/^rule[-_:]?/,"").replace(/^#/,"");if(!Y)return;return/^\d+$/.test(Y)?String(Number(Y)):Y}function Op($){if(Array.isArray($))return $.map(Op);if(!$||typeof $!=="object")return $;return Object.fromEntries(Object.entries($).sort(([Y],[z])=>Y.localeCompare(z)).map(([Y,z])=>[Y,Op(z)]))}function VU($,Y){let z=new Set(nD1);if(Y==="code")z.add("code"),z.add("ruleCode");return Op(Object.fromEntries(Object.entries(hZ($)).filter(([U])=>!z.has(U))))}function cA0($,Y){return $?JSON.stringify(VU($,Y),null,2).split(` `):[]}function cD1($,Y){let z=Array.from({length:$.length+1},()=>Array(Y.length+1).fill(0));for(let I=$.length-1;I>=0;I-=1)for(let K=Y.length-1;K>=0;K-=1)z[I][K]=$[I]===Y[K]?z[I+1][K+1]+1:Math.max(z[I+1][K],z[I][K+1]);let U=[],Q=0,J=0;while(Q<$.length&&J=z[Q][J+1])U.push(`-${$[Q++]}`);else U.push(`+${Y[J++]}`);while(Q<$.length)U.push(`-${$[Q++]}`);while(JH4($,O)));else{let O=z.limit??10;process.stderr.write(`\uD83D\uDD0D 检索企业「${Y.name}」(${Y.id}) 的线上审核记录 (限制 ${O} 条)... `);let M=(await i4($,{limit:O,status:z.status,startDate:z.startDate!==void 0?String(z.startDate):void 0,endDate:z.endDate!==void 0?String(z.endDate):void 0})).records??[];if(M.length===0)throw Error("未检索到符合条件的线上审核记录,无法导出 webhook 资源包。");process.stderr.write(`\uD83D\uDCE5 正在拉取 ${M.length} 条审核记录完整详情... `),U=await Promise.all(M.map((D)=>H4($,D.id)))}let Q=new Map,J=0;for(let O of U){let N=O.document,M=O.sourceDocumentId??(typeof N?.id==="string"?N.id:void 0)??(typeof N?.sourceDocumentId==="string"?N.sourceDocumentId:void 0)??O.documentId??O.id,D=`${z.docIdPrefix??""}${M}${z.docIdSuffix??""}`,P=[];if(z.includeAttachments!==!1){let A=i2(O,{summary:!1}).attachments,T=new Set;for(let C of A){let b=C.ossSignedUrl??C.url;if(!b)continue;let k=C.fileName??C.fileId??"attachment",S=Kp(k),i=S,n=S.lastIndexOf("."),U0=n>0?S.slice(0,n):S,x=n>0?S.slice(n):"",d=1;while(T.has(i.toLowerCase()))i=`${U0}_${d}${x}`,d++;T.add(i.toLowerCase());try{process.stderr.write(`⬇ 下载单据「${D}」附件: ${k}... -`);let t=await fetch(b);if(t.ok){let e=await t.arrayBuffer(),y=Buffer.from(e);P.push({fileName:i,zipPath:`${D}/${i}`,buffer:y,sourceField:C.sourceField??"附件"}),J++}}catch(t){process.stderr.write(`⚠️ [跳过附件] 下载失败 ${k}: ${t} +`);let t=await fetch(b);if(t.ok){let e=await t.arrayBuffer(),g=Buffer.from(e);P.push({fileName:i,zipPath:`${D}/${i}`,buffer:g,sourceField:C.sourceField??"附件"}),J++}}catch(t){process.stderr.write(`⚠️ [跳过附件] 下载失败 ${k}: ${t} `)}}}Q.set(D,P)}let I=new L_0.default.Workbook;I.creator="seal-use",I.created=new Date;let K=new Set;for(let O of Q.values())for(let N of O)K.add(N.sourceField);if(K.size===0)K.add("附件");let G=new Set;for(let O of U){let N=O.document,M=Array.isArray(N?.fields)?N.fields:[];for(let D of M)if(D&&typeof D==="object"){let P=D,j=typeof P.label==="string"?P.label.trim():typeof P.key==="string"?P.key.trim():"",A=typeof P.type==="string"?P.type.toUpperCase():"";if(j&&A!=="ATTACHMENT"&&A!=="LIST")G.add(j)}}let H=["会议编号","会议名称","状态","总金额","报销事由","申请日期"],W=Array.from(G).filter((O)=>!H.includes(O)&&O!=="单据编号"&&O!=="单号"),X=Array.from(K).map((O)=>`[附件]${O}`),Z=[...H,...W,...X],q=I.addWorksheet("主表");q.addRow(Z),q.getRow(1).font={bold:!0};for(let O of U){let N=O.document,M=O.sourceDocumentSN??(typeof N?.sn==="string"?N.sn:void 0)??(typeof N?.sourceDocumentSN==="string"?N.sourceDocumentSN:void 0)??O.id,D=O.sourceDocumentId??(typeof N?.id==="string"?N.id:void 0)??(typeof N?.sourceDocumentId==="string"?N.sourceDocumentId:void 0)??O.documentId??O.id,P=`${z.docIdPrefix??""}${D}${z.docIdSuffix??""}`,j=`${z.docIdPrefix??""}${M}${z.docIdSuffix??""}`,A=(typeof N?.title==="string"?N.title:void 0)??(typeof N?.name==="string"?N.name:void 0)??j,T="";if(typeof N?.sourceStartTime==="number")T=new Date(N.sourceStartTime*1000).toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"});else if(typeof O.createdAt==="number")T=new Date(O.createdAt).toLocaleDateString("en-CA",{timeZone:"Asia/Shanghai"});else if(typeof O.createdAt==="string")T=O.createdAt.slice(0,10);let C=new Map,b=Array.isArray(N?.fields)?N.fields:[];for(let U0 of b)if(U0&&typeof U0==="object"){let x=U0,d=typeof x.label==="string"?x.label.trim():typeof x.key==="string"?x.key.trim():"";if(d)C.set(d,x.value)}let k,S=C.get("总金额")??C.get("报销金额")??C.get("total_amount");if(typeof S==="number")k=S;else if(S&&typeof S==="object"&&"amount"in S&&typeof S.amount==="number")k=S.amount;let i=[];i.push(P),i.push(A),i.push(O.status??"已审批"),i.push(k??""),i.push(C.get("报销事由")??C.get("事由")??A),i.push(T);for(let U0 of W){let x=C.get(U0);if(x===void 0||x===null)i.push("");else if(typeof x==="object")if("amount"in x)i.push(x.amount);else i.push(JSON.stringify(x));else i.push(x)}let n=Q.get(P)??[];for(let U0 of K){let x=n.filter((d)=>d.sourceField===U0||K.size===1);if(x.length>0)i.push(x.map((d)=>d.zipPath).join(` `));else i.push("")}q.addRow(i)}let V=WS1(z,Y);JS1(GS1(V),{recursive:!0});let F=await I.xlsx.writeBuffer();process.stderr.write(`\uD83D\uDCE6 正在压缩生成 Webhook 资源包: ${V}... `),await new Promise((O,N)=>{let M=QS1(V),D=new Bl({zlib:{level:9}});M.on("close",()=>O()),D.on("error",(P)=>N(P)),D.pipe(M),D.append(Buffer.from(F),{name:"信息表.xlsx"});for(let P of Q.values())for(let j of P)D.append(j.buffer,{name:j.zipPath});D.finalize()});let w=IS1(V);return{filePath:V,corpId:Y.id,corpName:Y.name,recordCount:U.length,attachmentCount:J,fileSizeBytes:w.size,exportedAt:new Date().toISOString(),nextAction:`seal-use webhook resource-pack push ${V} --corp `}}var L_0;var Pl=m(()=>{q_0();B6();nB();L_0=J6(CZ(),1)});import{readFileSync as XS1}from"node:fs";function ZS1($){let Y=new URL($),z=Y.pathname.match(/\/webhook\/([^/]+)/);if(!z)throw Error("Webhook URL 必须包含 /webhook/{webhookId}/document");return{baseUrl:`${Y.protocol}//${Y.host}`,webhookId:z[1]}}function qS1($,Y){return Y.toLowerCase().endsWith(".zip")||$[0]===80&&$[1]===75&&!Y.toLowerCase().endsWith(".xlsx")}function VS1($,Y){if(!$.length)return;let z=new Set($.map((J)=>{let I=J.fileName.split("/")[0],K=I.indexOf("@");return K>=0?I.slice(0,K):I}).filter((J)=>J!=="信息表.xlsx")),U=[];for(let J of Y){let I=J.document.documentId;if((J.documentAttachments.length>0||Object.values(J.expenseAttachments).some((G)=>G.length>0)||Object.values(J.personAttachments).some((G)=>G.length>0))&&!z.has(I))U.push(`Excel 会议编号「${I}」声明了附件,但在 ZIP 中找不到对应的根目录「${I}/」或「${I}@.../」。`)}let Q=new Set(Y.map((J)=>J.document.documentId));for(let J of z)if(!Q.has(J))U.push(`ZIP 根目录对应的编号「${J}」在信息表中找不到对应的会议编号。`);if(U.length)throw new B5(U)}async function F_0($,Y,z){let U=[],Q=$;if(qS1($,Y)){U=await TP0($),CP0(U,z);let G=U.find((H)=>H.fileName==="信息表.xlsx");if(!G)throw Error("ZIP 根目录缺少信息表.xlsx");Q=await Pd($,G)}let J=await yP0(Q);VS1(U,J);let I=kP0(U,J),K=J.map((G)=>G.document);return{entries:U,parsed:J,plans:I,documents:K,fileBuffer:$}}async function kU($,Y,z){let U=await F_0($,Y,z),Q=U.parsed.map((J,I)=>_d(J.document,U.plans[I],new Map));return{warnings:[],documents:Q,attachmentPlan:U.plans}}async function Zj($,Y,z){let U=await F_0($,Y,z.materialPackFilePolicy),{baseUrl:Q,webhookId:J}=ZS1(z.webhookUrl),I=[];for(let K=0;Kj.fileName===F);if(!w)continue;process.stderr.write(`⬆ 上传附件: ${F} @@ -920,7 +920,7 @@ export default lintRule; `+`\uD83D\uDC49 查看全部请添加: seal-use corps list --all `+"\uD83D\uDC49 检索指定企业请使用: seal-use corps search ")}x0(O.map((N)=>({id:N.id,name:N.name,environment:N.environment??"production",sourceType:N.source.type,provider:N.source.provider??N.source.type,staffId:N.source.staffId,testCorpId:N.testCorpId,prodCorpId:N.prodCorpId,current:N.id===H})));return}if($==="get"||$==="show"){let U=Y??h(z.options.corp);if(!U)throw m4("Usage: seal-use corps get ");let Q=T1(U),J=Vp(Q.id),I=yg1(Q);x0({id:Q.id,name:Q.name,environment:Q.environment??"production",configFile:J,seal:{url:I,tenantSlug:Q.seal.tenantSlug??Q.source.tenantSlug,customHeaderNames:Q.seal.headers?Object.keys(Q.seal.headers):[],customCookieNames:Q.seal.cookies?Object.keys(Q.seal.cookies):[],endpoints:Q.seal.endpoints},source:kg1(Q.source),relations:{testCorpId:Q.testCorpId,prodCorpId:Q.prodCorpId},auth:{refreshTtl:Q.auth.refreshTtl}});return}if($==="current"){let U=T1(h(z.options.corp));x0({id:U.id,name:U.name,environment:U.environment??"production",sourceType:U.source.type,provider:U.source.provider??U.source.type,staffId:U.source.staffId,testCorpId:U.testCorpId,prodCorpId:U.prodCorpId});return}if($==="mark"||$==="mark-test"||$==="mark-prod"){let U=Y??h(z.options.corp);if(!U)throw m4("Usage: seal-use corps mark --env [--confirm]");let Q=T1(U),J=$==="mark-test"?"test":$==="mark-prod"?"production":h(z.options.env)??h(z.options.environment);if(J!=="production"&&J!=="test")throw m4("Usage: seal-use corps mark --env [--confirm]");if(!(Z0(z.options.confirm)===!0||Z0(z.options.yes)===!0))throw A5(`Refusing to change environment tag of enterprise '${Q.name}' (${Q.id}) to '${J}' without --confirm. Marking alters synchronization safety guards.`,`seal-use corps mark ${Q.id} --env ${J} --confirm`);let K=y3(Q.id,{environment:J});x0({id:K.id,name:K.name,environment:K.environment,testCorpId:K.testCorpId,prodCorpId:K.prodCorpId});return}if($==="rename"){let U=Y??h(z.options.corp)??h(z.options.id),Q=h(z.options.name)??h(z.options.to)??(z.command[3]&&!z.command[3].startsWith("-")?z.command[3]:void 0);if(!U||!Q)throw Error("Usage: seal-use corps rename --name ");let J=T1(U),I=y3(J.id,{name:Q});x0({success:!0,id:I.id,name:I.name,previousName:J.name});return}if($==="bind-test"){let U,Q;if(Y&&z.command[3])U=Y,Q=z.command[3];else if(Y){let X=h(z.options.corp),Z=h(z.options["test-corp"])??h(z.options.testCorp);if(X)U=X,Q=Y;else if(Z)U=Y,Q=Z}if(!U||!Q)throw m4(`Usage: seal-use corps bind-test [--confirm] [--force] or: seal-use corps bind-test --corp [--confirm] [--force]`);let J=T1(U),I=T1(Q);if(J.id===I.id)throw m4(`Cannot bind enterprise '${J.id}' to itself.`);if(J.prodCorpId&&J.prodCorpId!==I.id)throw m4(`Cannot use '${J.id}' as a production enterprise because it is already registered as a test enterprise for '${J.prodCorpId}'. Multi-tier chaining is not permitted.`);if(I.testCorpId&&I.testCorpId!==J.id)throw m4(`Cannot bind '${I.id}' as a test enterprise because it already has a bound test enterprise '${I.testCorpId}'. Multi-tier chaining is not permitted.`);let K=Z0(z.options.force)===!0;if(J.testCorpId&&J.testCorpId!==I.id||I.prodCorpId&&I.prodCorpId!==J.id){if(!K)throw A5(`Enterprise binding conflict: production enterprise '${J.id}' is bound to '${J.testCorpId??"none"}', and test enterprise '${I.id}' is bound to '${I.prodCorpId??"none"}'. Overwriting an existing binding requires --force and --confirm.`,`seal-use corps bind-test ${J.id} ${I.id} --confirm --force`)}if(!(Z0(z.options.confirm)===!0||Z0(z.options.yes)===!0)){let X=K?" --force":"";throw A5(`Refusing to bind test enterprise '${I.name}' (${I.id}) to production enterprise '${J.name}' (${J.id}) without --confirm. Enterprise binding establishes 1-to-1 sync pairing and marks '${I.id}' as a test environment.`,`seal-use corps bind-test ${J.id} ${I.id} --confirm${X}`)}if(J.testCorpId&&J.testCorpId!==I.id)try{y3(J.testCorpId,{prodCorpId:void 0})}catch{}if(I.prodCorpId&&I.prodCorpId!==J.id)try{y3(I.prodCorpId,{testCorpId:void 0})}catch{}let H=y3(J.id,{environment:"production",testCorpId:I.id}),W=y3(I.id,{environment:"test",prodCorpId:J.id});x0({success:!0,productionEnterprise:{id:H.id,name:H.name,environment:H.environment,testCorpId:H.testCorpId},testEnterprise:{id:W.id,name:W.name,environment:W.environment,prodCorpId:W.prodCorpId}});return}if($==="unbind-test"){let U=Y??h(z.options.corp),Q=T1(U);if(!Q.testCorpId&&!Q.prodCorpId){x0({unbound:!1,message:`Enterprise '${Q.name}' (${Q.id}) does not have an active test enterprise binding.`});return}let J=Q.testCorpId?Q.id:Q.prodCorpId,I=Q.testCorpId?Q.testCorpId:Q.id;if(!(Z0(z.options.confirm)===!0||Z0(z.options.yes)===!0))throw A5(`Refusing to unbind production enterprise '${J}' and test enterprise '${I}' without --confirm.`,`seal-use corps unbind-test ${Q.id} --confirm`);y3(J,{testCorpId:void 0});try{y3(I,{prodCorpId:void 0})}catch{}x0({success:!0,unboundProduction:J,unboundTest:I});return}if($==="sync-test"){let U=Y??h(z.options.corp),Q=T1(U);if(!Q.testCorpId)throw m4(`Production enterprise '${Q.name}' (${Q.id}) has no bound test enterprise. -Run 'seal-use corps bind-test ${Q.id} --confirm' first to establish a verified 1-to-1 association.`);let J=T1(Q.testCorpId);if(J.environment!=="test")throw Error(`Target enterprise '${J.name}' (${J.id}) is marked as '${J.environment}', NOT 'test'. Aborting sync to protect non-test environments.`);let I=await P1(Q),K=await P1(J),[G,H,W,X,Z,q,V,F]=await Promise.all([o1(I,Q.seal.endpoints.approvalStylePreferences),o1(K,J.seal.endpoints.approvalStylePreferences),X6(I),X6(K),c8(I),c8(K),Ch0(I),Ch0(K)]),w=(V.articles||[]).filter((G0)=>!G0.isDeleted),O=(F.articles||[]).filter((G0)=>!G0.isDeleted),N=new Map(O.map((G0)=>[G0.title.trim(),G0])),M=[],D=[],P=new Set(w.map((G0)=>G0.title.trim()));for(let G0 of w){let f0=G0.title.trim(),e0=N.get(f0);if(!e0)M.push(G0);else{let r=e0.content!==G0.content,H0=(e0.purpose??"")!==(G0.purpose??""),F0=e0.enabled!==G0.enabled,b0=e0.contentType!==G0.contentType,i0=(e0.status??"")!==(G0.status??""),n0=JSON.stringify([...e0.scenarios??[]].sort())!==JSON.stringify([...G0.scenarios??[]].sort()),w1=JSON.stringify([...e0.tags??[]].sort())!==JSON.stringify([...G0.tags??[]].sort());if(r||H0||F0||b0||i0||n0||w1)D.push({testId:e0.id,prodDoc:G0,reasons:[...r?["content"]:[],...H0?["purpose"]:[],...F0?["enabled"]:[],...b0?["contentType"]:[],...i0?["status"]:[],...n0?["scenarios"]:[],...w1?["tags"]:[]]})}}let j=O.filter((G0)=>!P.has(G0.title.trim())),T=[...Z].sort((G0,f0)=>f0.versionNumber-G0.versionNumber)[0],C=T?.versionNumber,k=([...q].sort((G0,f0)=>f0.versionNumber-G0.versionNumber)[0]?.versionNumber??0)+1,S=Th0(Q.name,C,q),n=h(z.options["version-name"])??h(z.options.versionName)??Eh0(Q.name,C,S,k),U0={...H,tone:G.tone,language:G.language,detailLevel:G.detailLevel,outputFormat:G.outputFormat,examples:G.examples??[],prohibitedPhrases:G.prohibitedPhrases??[],customInstructions:G.customInstructions,decisionPreferences:G.decisionPreferences,thinkingDepthPreference:G.thinkingDepthPreference};if(Z0(z.options["dry-run"])===!0||Z0(z.options.dryRun)===!0){x0({dryRun:!0,source:{id:Q.id,name:Q.name,environment:Q.environment,latestPublishedVersion:T?{versionNumber:T.versionNumber,versionName:T.versionName}:null,documentsCount:w.length},target:{id:J.id,name:J.name,environment:J.environment},versionMappingPlan:{sourceProdVersionNumber:C??null,sourceProdVersionName:T?.versionName??null,targetTestExpectedVersionNumber:k,targetTestPublishVersionName:n,iteration:S},preferencesDiff:{decisionPreferences:{before:H.decisionPreferences,after:G.decisionPreferences},thinkingDepthPreference:{before:H.thinkingDepthPreference,after:G.thinkingDepthPreference}},rulesPlan:{sourceDraftRuleCount:W.rules.length,targetExistingDraftRuleCount:X.rules.length,toDeleteCount:X.rules.length,toCreateCount:W.rules.length,rulesToSync:W.rules.map((G0,f0)=>({index:f0+1,sourceRuleId:G0.id,sourceRuleCode:G0.code??f0+1,expectedTargetCode:`rule-${f0+1}`,description:G0.description,scope:G0.scope,strictness:G0.strictness}))},documentsPlan:{sourceDocumentCount:w.length,targetExistingDocumentCount:O.length,toCreateCount:M.length,toCreate:M.map((G0)=>({title:G0.title,purpose:G0.purpose,contentType:G0.contentType,scenarios:G0.scenarios})),toUpdateCount:D.length,toUpdate:D.map((G0)=>({targetDocumentId:G0.testId,title:G0.prodDoc.title,reasons:G0.reasons})),toDeleteCount:j.length,toDelete:j.map((G0)=>({targetDocumentId:G0.id,title:G0.title}))},publishingPlan:{targetCorpId:J.id,publishVersionName:n,publishTarget:"test"},hosecloudSyncPlan:(()=>{if(Q.source.type!=="hose")return{sourceType:Q.source.type,skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let G0=(G.integrations??[]).filter((r)=>r.type==="hosecloud"),f0=new Set,e0=G0.filter((r)=>{let H0=r.corporationId??Q.id;if(f0.has(H0))return!1;return f0.add(H0),!0});return{sourceType:"hose",outboundName:yh0(Q.name),targetMode:"assisted",integrationsCount:e0.length,integrations:e0.map((r)=>({corporationId:r.corporationId,apiOrigin:r.apiOrigin,customApiUrl:r.customApiUrl}))}})(),productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if(!(Z0(z.options.yes)===!0||Z0(z.options.confirm)===!0))throw A5(`Refusing to overwrite test enterprise '${J.name}' (${J.id}) with preferences, ${W.rules.length} draft rules, and ${w.length} knowledge documents from production enterprise '${Q.name}' (${Q.id}) without --yes. This will replace test draft rules, synchronize knowledge documents, and publish a new version on the test enterprise.`,`seal-use corps sync-test ${Q.id} --yes`);await s5(K,U0,J.seal.endpoints.approvalStylePreferences);let t=[];for(let G0 of j)await Bw(K,G0.id),t.push({id:G0.id,title:G0.title});let e=[];for(let G0 of D)await Aw(K,G0.testId,{title:G0.prodDoc.title,purpose:G0.prodDoc.purpose,content:G0.prodDoc.content,contentType:G0.prodDoc.contentType,status:G0.prodDoc.status,enabled:G0.prodDoc.enabled,scenarios:G0.prodDoc.scenarios&&G0.prodDoc.scenarios.length>0?G0.prodDoc.scenarios:["audit"],tags:G0.prodDoc.tags}),e.push({id:G0.testId,title:G0.prodDoc.title,reasons:G0.reasons});let y=[];for(let G0 of M){let f0=await Dw(K,{title:G0.title,purpose:G0.purpose,content:G0.content,contentType:G0.contentType,status:G0.status,enabled:G0.enabled,scenarios:G0.scenarios&&G0.scenarios.length>0?G0.scenarios:["audit"],tags:G0.tags});y.push({id:f0.id,title:f0.title})}for(let G0 of X.rules)await tQ(K,G0.id);let p=[];for(let G0 of W.rules){let f0=await gH(K,{description:G0.description,scope:G0.scope,strictness:G0.strictness});p.push(f0)}let Y0=await Nw(K);if(!Y0.ok)throw Error(`Failed to recode test approval rules: HTTP ${Y0.status}`);let g=await yH(K,n);try{yZ(J.id,g.version,p)}catch{}let a=g.version.rules??[],$0=W.rules.map((G0,f0)=>{let e0=p[f0],r=a[f0];return{index:f0+1,sourceRuleId:G0.id,sourceRuleCode:G0.code??f0+1,targetRuleId:e0?.id??"",targetRuleCode:r?.code??`rule-${f0+1}`,description:G0.description,scope:G0.scope,strictness:G0.strictness}}),N0={sourceProdVersionNumber:C??null,sourceProdVersionName:T?.versionName??null,targetTestVersionNumber:g.version.versionNumber,targetTestVersionName:g.version.versionName??null},T0;try{T0=Bh0({syncedAt:new Date().toISOString(),source:{id:Q.id,name:Q.name,latestPublishedVersionNumber:C??null,latestPublishedVersionName:T?.versionName??null},target:{id:J.id,name:J.name,publishedVersionNumber:g.version.versionNumber,publishedVersionName:g.version.versionName,rulesCount:g.rulesCount},versionMapping:N0,ruleMapping:$0})}catch{}let v0=await xg1(Q,J,I,K);x0({success:!0,syncedAt:new Date().toISOString(),source:{id:Q.id,name:Q.name,environment:Q.environment,latestPublishedVersion:T?{versionNumber:T.versionNumber,versionName:T.versionName}:null,draftRulesCount:W.rules.length,documentsCount:w.length},target:{id:J.id,name:J.name,environment:J.environment,deletedDraftRulesCount:X.rules.length,createdDraftRulesCount:p.length,publishedVersion:{id:g.version.id,versionNumber:g.version.versionNumber,versionName:g.version.versionName,rulesCount:g.rulesCount}},documents:{sourceCount:w.length,targetExistingCount:O.length,createdCount:y.length,created:y,updatedCount:e.length,updated:e,deletedCount:t.length,deleted:t},versionMapping:N0,ruleMapping:$0,...T0?{mappingSavedTo:T0}:{},hosecloudSync:v0,productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if($==="replay-test"){let U=Y??h(z.options.corp)??h(z.options.prodCorp)??h(z.options["prod-corp"]),Q=T1(U),J=Z0(z.options.force)===!0,I=Z0(z.options.dryRun)??Z0(z.options["dry-run"]),K=Z0(z.options.yes)===!0||Z0(z.options.confirm)===!0,G;if(!Q.testCorpId){if(!J)throw m4(`Production enterprise '${Q.name}' (${Q.id}) has no bound test enterprise. +Run 'seal-use corps bind-test ${Q.id} --confirm' first to establish a verified 1-to-1 association.`);let J=T1(Q.testCorpId);if(J.environment!=="test")throw Error(`Target enterprise '${J.name}' (${J.id}) is marked as '${J.environment}', NOT 'test'. Aborting sync to protect non-test environments.`);let I=await P1(Q),K=await P1(J),[G,H,W,X,Z,q,V,F]=await Promise.all([o1(I,Q.seal.endpoints.approvalStylePreferences),o1(K,J.seal.endpoints.approvalStylePreferences),X6(I),X6(K),c8(I),c8(K),Ch0(I),Ch0(K)]),w=(V.articles||[]).filter((G0)=>!G0.isDeleted),O=(F.articles||[]).filter((G0)=>!G0.isDeleted),N=new Map(O.map((G0)=>[G0.title.trim(),G0])),M=[],D=[],P=new Set(w.map((G0)=>G0.title.trim()));for(let G0 of w){let f0=G0.title.trim(),e0=N.get(f0);if(!e0)M.push(G0);else{let s=e0.content!==G0.content,H0=(e0.purpose??"")!==(G0.purpose??""),F0=e0.enabled!==G0.enabled,b0=e0.contentType!==G0.contentType,i0=(e0.status??"")!==(G0.status??""),n0=JSON.stringify([...e0.scenarios??[]].sort())!==JSON.stringify([...G0.scenarios??[]].sort()),w1=JSON.stringify([...e0.tags??[]].sort())!==JSON.stringify([...G0.tags??[]].sort());if(s||H0||F0||b0||i0||n0||w1)D.push({testId:e0.id,prodDoc:G0,reasons:[...s?["content"]:[],...H0?["purpose"]:[],...F0?["enabled"]:[],...b0?["contentType"]:[],...i0?["status"]:[],...n0?["scenarios"]:[],...w1?["tags"]:[]]})}}let j=O.filter((G0)=>!P.has(G0.title.trim())),T=[...Z].sort((G0,f0)=>f0.versionNumber-G0.versionNumber)[0],C=T?.versionNumber,k=([...q].sort((G0,f0)=>f0.versionNumber-G0.versionNumber)[0]?.versionNumber??0)+1,S=Th0(Q.name,C,q),n=h(z.options["version-name"])??h(z.options.versionName)??Eh0(Q.name,C,S,k),U0={...H,tone:G.tone,language:G.language,detailLevel:G.detailLevel,outputFormat:G.outputFormat,examples:G.examples??[],prohibitedPhrases:G.prohibitedPhrases??[],customInstructions:G.customInstructions,decisionPreferences:G.decisionPreferences,thinkingDepthPreference:G.thinkingDepthPreference};if(Z0(z.options["dry-run"])===!0||Z0(z.options.dryRun)===!0){x0({dryRun:!0,source:{id:Q.id,name:Q.name,environment:Q.environment,latestPublishedVersion:T?{versionNumber:T.versionNumber,versionName:T.versionName}:null,documentsCount:w.length},target:{id:J.id,name:J.name,environment:J.environment},versionMappingPlan:{sourceProdVersionNumber:C??null,sourceProdVersionName:T?.versionName??null,targetTestExpectedVersionNumber:k,targetTestPublishVersionName:n,iteration:S},preferencesDiff:{decisionPreferences:{before:H.decisionPreferences,after:G.decisionPreferences},thinkingDepthPreference:{before:H.thinkingDepthPreference,after:G.thinkingDepthPreference}},rulesPlan:{sourceDraftRuleCount:W.rules.length,targetExistingDraftRuleCount:X.rules.length,toDeleteCount:X.rules.length,toCreateCount:W.rules.length,rulesToSync:W.rules.map((G0,f0)=>({index:f0+1,sourceRuleId:G0.id,sourceRuleCode:G0.code??f0+1,expectedTargetCode:`rule-${f0+1}`,description:G0.description,scope:G0.scope,strictness:G0.strictness}))},documentsPlan:{sourceDocumentCount:w.length,targetExistingDocumentCount:O.length,toCreateCount:M.length,toCreate:M.map((G0)=>({title:G0.title,purpose:G0.purpose,contentType:G0.contentType,scenarios:G0.scenarios})),toUpdateCount:D.length,toUpdate:D.map((G0)=>({targetDocumentId:G0.testId,title:G0.prodDoc.title,reasons:G0.reasons})),toDeleteCount:j.length,toDelete:j.map((G0)=>({targetDocumentId:G0.id,title:G0.title}))},publishingPlan:{targetCorpId:J.id,publishVersionName:n,publishTarget:"test"},hosecloudSyncPlan:(()=>{if(Q.source.type!=="hose")return{sourceType:Q.source.type,skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let G0=(G.integrations??[]).filter((s)=>s.type==="hosecloud"),f0=new Set,e0=G0.filter((s)=>{let H0=s.corporationId??Q.id;if(f0.has(H0))return!1;return f0.add(H0),!0});return{sourceType:"hose",outboundName:yh0(Q.name),targetMode:"assisted",integrationsCount:e0.length,integrations:e0.map((s)=>({corporationId:s.corporationId,apiOrigin:s.apiOrigin,customApiUrl:s.customApiUrl}))}})(),productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if(!(Z0(z.options.yes)===!0||Z0(z.options.confirm)===!0))throw A5(`Refusing to overwrite test enterprise '${J.name}' (${J.id}) with preferences, ${W.rules.length} draft rules, and ${w.length} knowledge documents from production enterprise '${Q.name}' (${Q.id}) without --yes. This will replace test draft rules, synchronize knowledge documents, and publish a new version on the test enterprise.`,`seal-use corps sync-test ${Q.id} --yes`);await s5(K,U0,J.seal.endpoints.approvalStylePreferences);let t=[];for(let G0 of j)await Bw(K,G0.id),t.push({id:G0.id,title:G0.title});let e=[];for(let G0 of D)await Aw(K,G0.testId,{title:G0.prodDoc.title,purpose:G0.prodDoc.purpose,content:G0.prodDoc.content,contentType:G0.prodDoc.contentType,status:G0.prodDoc.status,enabled:G0.prodDoc.enabled,scenarios:G0.prodDoc.scenarios&&G0.prodDoc.scenarios.length>0?G0.prodDoc.scenarios:["audit"],tags:G0.prodDoc.tags}),e.push({id:G0.testId,title:G0.prodDoc.title,reasons:G0.reasons});let g=[];for(let G0 of M){let f0=await Dw(K,{title:G0.title,purpose:G0.purpose,content:G0.content,contentType:G0.contentType,status:G0.status,enabled:G0.enabled,scenarios:G0.scenarios&&G0.scenarios.length>0?G0.scenarios:["audit"],tags:G0.tags});g.push({id:f0.id,title:f0.title})}for(let G0 of X.rules)await tQ(K,G0.id);let p=[];for(let G0 of W.rules){let f0=await gH(K,{description:G0.description,scope:G0.scope,strictness:G0.strictness});p.push(f0)}let Y0=await Nw(K);if(!Y0.ok)throw Error(`Failed to recode test approval rules: HTTP ${Y0.status}`);let y=await xg1(Q,J,I,K),r=await yH(K,n);try{yZ(J.id,r.version,p)}catch{}let $0=r.version.rules??[],N0=W.rules.map((G0,f0)=>{let e0=p[f0],s=$0[f0];return{index:f0+1,sourceRuleId:G0.id,sourceRuleCode:G0.code??f0+1,targetRuleId:e0?.id??"",targetRuleCode:s?.code??`rule-${f0+1}`,description:G0.description,scope:G0.scope,strictness:G0.strictness}}),T0={sourceProdVersionNumber:C??null,sourceProdVersionName:T?.versionName??null,targetTestVersionNumber:r.version.versionNumber,targetTestVersionName:r.version.versionName??null},_0;try{_0=Bh0({syncedAt:new Date().toISOString(),source:{id:Q.id,name:Q.name,latestPublishedVersionNumber:C??null,latestPublishedVersionName:T?.versionName??null},target:{id:J.id,name:J.name,publishedVersionNumber:r.version.versionNumber,publishedVersionName:r.version.versionName,rulesCount:r.rulesCount},versionMapping:T0,ruleMapping:N0})}catch{}x0({success:!0,syncedAt:new Date().toISOString(),source:{id:Q.id,name:Q.name,environment:Q.environment,latestPublishedVersion:T?{versionNumber:T.versionNumber,versionName:T.versionName}:null,draftRulesCount:W.rules.length,documentsCount:w.length},target:{id:J.id,name:J.name,environment:J.environment,deletedDraftRulesCount:X.rules.length,createdDraftRulesCount:p.length,publishedVersion:{id:r.version.id,versionNumber:r.version.versionNumber,versionName:r.version.versionName,rulesCount:r.rulesCount}},documents:{sourceCount:w.length,targetExistingCount:O.length,createdCount:g.length,created:g,updatedCount:e.length,updated:e,deletedCount:t.length,deleted:t},versionMapping:T0,ruleMapping:N0,..._0?{mappingSavedTo:_0}:{},hosecloudSync:y,productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if($==="replay-test"){let U=Y??h(z.options.corp)??h(z.options.prodCorp)??h(z.options["prod-corp"]),Q=T1(U),J=Z0(z.options.force)===!0,I=Z0(z.options.dryRun)??Z0(z.options["dry-run"]),K=Z0(z.options.yes)===!0||Z0(z.options.confirm)===!0,G;if(!Q.testCorpId){if(!J)throw m4(`Production enterprise '${Q.name}' (${Q.id}) has no bound test enterprise. Run 'seal-use corps bind-test ${Q.id} --confirm' first to establish a verified 1-to-1 association, or add '--force' (or use 'seal-use webhook replay --force') if you explicitly intend to replay directly within production.`);G=Q}else if(G=T1(Q.testCorpId),G.environment!=="test"&&!J)throw Error(`Target enterprise '${G.name}' (${G.id}) is marked as '${G.environment}', NOT 'test'. Aborting replay to protect non-test environments (use --force to override).`);if(!I&&!K)throw A5("Refusing to replay approval records without --confirm. Use --dry-run to preview the payload without sending it.",`seal-use corps replay-test ${U??""} --confirm`);let H=h(z.options.recordId)??h(z.options["record-id"])??h(z.options.id),W=h(z.options.recordIds)??h(z.options["record-ids"]),X=W?W.split(",").map((S)=>S.trim()).filter(Boolean):void 0,Z=h(z.options.sn)??h(z.options.documentSn)??h(z.options["document-sn"]),q=h(z.options.sns)??h(z.options["document-sns"]),V=q?q.split(",").map((S)=>S.trim()).filter(Boolean):void 0,F=s0(z.options.limit)??(!H&&!X&&!Z&&!V?1:void 0),w=h(z.options.status),O=h(z.options.startDate)??h(z.options["start-date"]),N=h(z.options.endDate)??h(z.options["end-date"]),M=await P1(Q),D=Q.id===G.id?M:await P1(G),P=h(z.options.webhook)??h(z.options.selector),j=h(z.options.snSuffix)??h(z.options["sn-suffix"]),A=h(z.options.snPrefix)??h(z.options["sn-prefix"]),T=h(z.options.docIdSuffix)??h(z.options["doc-id-suffix"]),C=h(z.options.docIdPrefix)??h(z.options["doc-id-prefix"]),b={recordId:H,recordIds:X,sn:Z,sns:V,limit:F,status:w,startDate:O,endDate:N};console.error(`[corps-replay-test] 正式企业「${Q.name}」(${Q.id}) -> 测试企业「${G.name}」(${G.id})`);let k=await zK({query:b,sourceClient:M,targetClient:D,sourceCorp:Q,targetCorp:G,webhookSelector:P,snPrefix:A,snSuffix:j,docIdPrefix:C,docIdSuffix:T,dryRun:I});if(I){console.error(`[corps-replay-test] 预览模式:已成功从 ${Q.name} 提取单据并转换为 Webhook Payload(未实际推送)。`),console.log(JSON.stringify(k,null,2));return}if(k.success)if(k.totalCount===1&&k.replayedDocument)console.error(`\uD83D\uDFE2 成功重放单据「${k.replayedDocument.documentSN}」至 ${G.name} (${k.targetWebhook?.name??"Webhook 通道"})`);else console.error(`\uD83D\uDFE2 成功重放 ${k.successCount} 条单据(来自「${Q.name}」)至「${G.name}」(${k.targetWebhook?.name??"Webhook 通道"})`);else console.error(`\uD83D\uDD34 单据重放部分或全部失败(成功 ${k.successCount} 条,失败 ${k.failureCount} 条)至「${G.name}」`);if(console.error(`\uD83D\uDC49 Next action: seal-use approval-runs list --corp ${G.id} --limit ${k.totalCount}`),console.log(JSON.stringify(k,null,2)),!k.success)throw new L4(`Approval record replay failed: ${k.failureCount} record(s) failed.`,1);return}if($==="switch"){let U=Y;if(!U)throw Error("Usage: seal-use corps switch ");let Q=v4();if(!Q.stateful)throw Error("Cannot switch the default enterprise while stateless mode is enabled. Use `seal-use config mode stateful` first.");let J=T1(U);qU({...Q,stateful:!0,defaultCorpId:J.id}),x0({current:!0,id:J.id,name:J.name});return}if($==="probe-hose"){await fg1(k8(z.json));return}if($==="hose-staffs"){await ug1(k8(z.json));return}if($==="add-hose"){let Q={...k8(z.json),...z.options.staffName?{staffName:h(z.options.staffName)}:{},...z.options["staff-name"]?{staffName:h(z.options["staff-name"])}:{},...z.options.staffPhone?{staffPhone:h(z.options.staffPhone)}:{},...z.options["staff-phone"]?{staffPhone:h(z.options["staff-phone"])}:{},...z.options.name?{name:h(z.options.name)}:{},...z.options.domain?{domain:h(z.options.domain)}:{},...z.options.corpId?{corpId:h(z.options.corpId)}:{},...z.options["corp-id"]?{corpId:h(z.options["corp-id"])}:{},...z.options.appKey?{appKey:h(z.options.appKey)}:{},...z.options["app-key"]?{appKey:h(z.options["app-key"])}:{},...z.options.appSecurity?{appSecurity:h(z.options.appSecurity)}:{},...z.options["app-security"]?{appSecurity:h(z.options["app-security"])}:{},...z.options.force!==void 0?{force:Z0(z.options.force)}:{},...z.options.overwrite!==void 0?{overwrite:Z0(z.options.overwrite)}:{}};await Go(Q);return}if($==="add-seal"){let Q={...k8(z.json),...z.options.name?{name:h(z.options.name)}:{},...z.options.token?{token:h(z.options.token)}:{},...z.options.sealUrl?{sealUrl:h(z.options.sealUrl)}:{},...z.options.url?{sealUrl:h(z.options.url)}:{},...z.options.force!==void 0?{force:Z0(z.options.force)}:{},...z.options.overwrite!==void 0?{overwrite:Z0(z.options.overwrite)}:{}};await bg1(Q);return}if($==="add-link"){let U=Y??h(z.options.link)??h(z.options.url);if(!U)throw Error("Usage: seal-use corps add-link [--name ] [--as-hose] [--overwrite]");let Q=Z0(z.options["dry-run"])===!0||Z0(z.options.dryRun)===!0;if(Z0(z.options["as-hose"])===!0||Z0(z.options.hose)===!0){if(ml(U)[0]?.kind==="seal-delegate")throw Error("Option --as-hose cannot be used with a Seal native delegate link. Seal delegate links directly authenticate to Seal.");await ng1(U,h(z.options.name),Z0(z.options.overwrite)===!0,Z0(z.options.force)===!0,Q,{appKey:h(z.options["app-key"])??h(z.options.appKey),keyId:h(z.options["key-id"])??h(z.options.keyId)});return}await ig1(U,h(z.options.name),Z0(z.options.overwrite)===!0,Q);return}if($==="extract-keys"||$==="extract-key"||$==="extract-hose-keys"||$==="hose-extract-keys"){let U=Y??h(z.options.link)??h(z.options.url);if(!U)throw Error("Usage: seal-use corps extract-keys [--reveal] [--save] [--app-key ] [--key-id ] [--name ] [--overwrite]");let Q=Z0(z.options.reveal)===!0||Z0(z.options.r)===!0||Z0(z.options.plain)===!0,J=Z0(z.options.save)===!0||Z0(z.options.add)===!0;await uj(U,{reveal:Q,save:J,name:h(z.options.name),overwrite:Z0(z.options.overwrite)===!0,force:Z0(z.options.force)===!0,appKey:h(z.options["app-key"])??h(z.options.appKey),keyId:h(z.options["key-id"])??h(z.options.keyId)});return}if($==="keys"||$==="hose-keys"){let U=Y??h(z.options.link)??h(z.options.url)??h(z.options.corp),Q=Z0(z.options.reveal)===!0||Z0(z.options.r)===!0||Z0(z.options.plain)===!0;if(U&&(U.startsWith("http://")||U.startsWith("https://"))){let J=Z0(z.options.save)===!0||Z0(z.options.add)===!0;await uj(U,{reveal:Q,save:J,name:h(z.options.name),overwrite:Z0(z.options.overwrite)===!0,force:Z0(z.options.force)===!0,appKey:h(z.options["app-key"])??h(z.options.appKey),keyId:h(z.options["key-id"])??h(z.options.keyId)});return}await Ho(U,{reveal:Q});return}throw Error(`Unknown corps command: ${$??""}. Run 'seal-use help' for available commands.`)}function gh0($){if(!$)return"未绑定手机";let Y=$.trim();if(Y.length===11)return`${Y.slice(0,3)}****${Y.slice(7)}`;if(Y.length>=7)return`${Y.slice(0,3)}****${Y.slice(-4)}`;if(Y.length>4)return`${Y.slice(0,2)}****${Y.slice(-2)}`;return Y}async function Ch0($){let z=[],U=0;while(!0){let Q=await mY($,{offset:U,limit:100});if(z.push(...Q.articles),U+=Q.articles.length,Q.articles.length===0||Q.articles.length<100)break;if(Q.total!==void 0&&U>=Q.total)break}return{articles:z,total:z.length}}function yh0($){return[...$].slice(0,6).join("")+"(Seal测)"}async function xg1($,Y,z,U){if($.source.type!=="hose")return{skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let Q=($.source.appKey??$.source.key)?.trim(),J=($.source.appSecurity??$.source.password)?.trim();if(!Q||!J)return{skipped:!0,reason:"prod hose source missing appKey/appSecurity (or key/password)"};let[I,K]=await Promise.all([o1(z,$.seal.endpoints.approvalStylePreferences),o1(U,Y.seal.endpoints.approvalStylePreferences)]),G=(I.integrations??[]).filter((N)=>N.type==="hosecloud");if(G.length===0)return{skipped:!0,reason:"prod Seal enterprise has no hosecloud integrations configured"};let H=new Set,W=[];for(let N of G){let M=N.corporationId??$.id;if(!H.has(M))H.add(M),W.push({...N,corporationId:M})}let X=K.integrations??[],Z=new Map(X.filter((N)=>N.type==="hosecloud").map((N)=>[N.corporationId,N])),q=yh0($.name),V=[],F=W.map((N)=>{let M=Z.get(N.corporationId),D=M?.signKey??gg1(6).toString("hex");return V.push({signKey:D,outboundName:q,corporationId:N.corporationId,action:M?"updated":"created"}),{type:"hosecloud",signKey:D,outboundName:q,mode:"assisted",apiKey:Q,apiSecret:J,apiOrigin:N.apiOrigin,...N.customApiUrl?{customApiUrl:N.customApiUrl}:{},corporationId:N.corporationId}}),w=X.filter((N)=>N.type!=="hosecloud"),O={...K,integrations:[...w,...F]};return await s5(U,O,Y.seal.endpoints.approvalStylePreferences),{skipped:!1,synced:V}}async function fg1($){let Y=l3($,"appKey"),z=l3($,"appSecurity"),U=X4($,"domain"),Q=await oQ(Y,z,U),J=await Hw(Q.domain,Q.openapiToken).catch(()=>[]),I=J.reduce((K,G)=>K+G.roleDefs.length,0);x0({domain:Q.domain,corpId:Q.corpId,name:Q.corpName??Q.corpId,roleCount:I,roleGroups:J.map((K)=>({id:K.id,name:K.name,roleDefs:K.roleDefs.map((G)=>({id:G.id,name:G.name,sourceType:G.sourceType}))}))})}async function ug1($){let Y=l3($,"appKey"),z=l3($,"appSecurity"),U=X4($,"domain"),Q=X4($,"role")??X4($,"roleDefId")??"admin",J=await oQ(Y,z,U),I=await Hw(J.domain,J.openapiToken),K,G;for(let X of I){for(let Z of X.roleDefs)if(Z.id===Q||Z.id===`${J.corpId}:${Q}`){K=Z.id,G=Z.name;break}if(K)break}if(!K&&(Q==="admin"||Q==="主管理员"))for(let X of I){for(let Z of X.roleDefs)if(Z.id.endsWith(":admin")||Z.name==="主管理员"){K=Z.id,G=Z.name;break}if(K)break}if(!K)for(let X of I){for(let Z of X.roleDefs)if(Z.name.toLowerCase().includes(Q.toLowerCase())){K=Z.id,G=Z.name;break}if(K)break}if(!K)throw Error(`Role not found matching query: '${Q}'. Run 'seal-use corps probe-hose' to view all available roles.`);let H=await dS(J.domain,J.openapiToken,K),W=await mS(J.domain,J.openapiToken,H.staffs);x0({domain:J.domain,corpId:J.corpId,corpName:J.corpName??J.corpId,roleId:K,roleName:G,count:W.length,staffs:W.map((X)=>({id:X.id,name:X.name,cellphone:gh0(X.cellphone),active:X.active,authState:X.authState,userId:X.userId,email:X.email}))})}async function Go($){let Y=X4($,"name"),z=l3($,"appKey"),U=l3($,"appSecurity"),Q=X4($,"domain"),J=X4($,"staffId")??X4($,"proxyStaffBizId"),I=X4($,"staffName"),K=X4($,"staffPhone"),G=X4($,"role")??"admin",H=$.force===!0,W=H||$.verify===!1?!1:!0,X=Q,Z=X4($,"corpId")??X4($,"corporationId"),q=Y,V;if(!X||!Z||!J){let j=await oQ(z,U,Q);X=j.domain,Z=Z??j.corpId,q=q??j.corpName,V=j.openapiToken}let F=J;if(!F&&V&&X){let j=await Hw(X,V).catch(()=>[]),A;for(let T of j){for(let C of T.roleDefs)if(C.id.endsWith(`:${G}`)||C.name===G||C.id===G){A=C.id;break}if(A)break}if(!A)A=j.find((T)=>T.roleDefs.some((C)=>C.id.endsWith(":admin")))?.roleDefs.find((T)=>T.id.endsWith(":admin"))?.id;if(A){let T=await dS(X,V,A).catch(()=>({staffs:[]})),C=await mS(X,V,T.staffs).catch(()=>[]);if(I||K){let b=C.filter((k)=>{if(I&&k.name!==I&&!k.name.includes(I))return!1;if(K&&(!k.cellphone||!k.cellphone.includes(K)))return!1;return!0});if(b.length===1&&b[0])F=b[0].id;else if(b.length>1)throw Error(`Multiple staff members matched '${I??K}': ${b.map((k)=>`${k.name}(${k.id})`).join(", ")}. Please specify exact staffId.`);else throw Error(`No staff member found matching '${I??K}' under role ${A}. Run 'seal-use corps hose-staffs' to view candidates.`)}else if(!H){let b=C.map((k,S)=>` [${S+1}] ${k.name} (${gh0(k.cellphone)})`).join(` `);throw Error(`Missing required parameter: staffId. 当前企业共配置了 ${C.length} 位管理员账号(手机号已脱敏): @@ -1005,18 +1005,18 @@ metadata: 2. **图文指导获取(必须贴图)**: - **路径一:合思开放平台(推荐·永久开发者凭据)** 1. 进入「应用中心」搜索“接口”,进入「开放接口(新)」: - ![进入开放接口](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-open-platform-app-center.png) + ![进入开放接口](assets/hose-open-platform-app-center.png) 2. 点击「商品配置」: - ![点击商品配置](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-open-platform-product-config.png) + ![点击商品配置](assets/hose-open-platform-product-config.png) 3. 复制「接入账号」(\`appKey\`) 与「接入密码」(\`appSecurity\`): - ![找到接入账号和密码](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-open-platform-credentials.png) + ![找到接入账号和密码](assets/hose-open-platform-credentials.png) - **路径二:从已登录网页复制 cURL(零门槛·会话快照或自动提权)** 1. 在企业网页右键选择「检查」打开开发者工具: - ![打开检查](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-curl-open-page-check.png) + ![打开检查](assets/hose-curl-open-page-check.png) 2. 切换到「网络」-「Fetch/XHR」,刷新或点击任一列表: - ![网络Fetch/XHR](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-curl-network-fetch-xhr.png) + ![网络Fetch/XHR](assets/hose-curl-network-fetch-xhr.png) 3. 找到任一正常业务请求,右键「复制」-「以 cURL 格式复制」: - ![以cURL格式复制](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-curl-copy-as-curl.png) + ![以cURL格式复制](assets/hose-curl-copy-as-curl.png) 3. **无感接入**:Agent 接收材料后自动执行 \`corps add-hose\`、\`corps add-link\` 或 \`corps extract-keys --save\`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 \`corpId\` 或 \`staffId\`。详阅 \`references/first-time-user.md\` 与 \`references/enterprise-onboarding.md\`。 --- @@ -1063,20 +1063,13 @@ metadata: ## 3. 生产规则变更安全闭环(Rule Remediation & Change Cycle) -生产环境规则修改必须遵守安全演进闭环: -\`生产改草稿 -> 同步测试企业 -> 靶场模拟/回归矩阵验证 -> 生产确认发布\` +生产环境规则修改遵循: +\`生产改草稿 -> 同步测试企业 -> 靶场模拟/回归矩阵验证 -> 用户确认 -> 生产发布\` -1. **草稿修改与规范 Diff 呈现**: - - 规则客诉修复与修改详阅 \`references/customer-feedback-rule-remediation.md\`; - - 必须向用户呈现清晰的修改前后对比和差异摘要,展示业务字段(适用场景、遵守程度、规则编号),隐藏内部 UUID; - - 生产修改时默认仅保存为**草稿态**,绝不直接线上生效。 -2. **一键同步测试环境**: - - 运行 \`seal-use corps sync-test \`,自动将草稿规则发布到绑定的测试靶场 \`[Prod vN · #M -> Test vM]\`,同时自动同步免配的合思测试通道。 -3. **测试靶场自动化验证**: - - 运行 \`seal-use test regression --corp --samples 10\` 执行自动化规则回归测试矩阵; - - 重放生产历史单据,检验决策一致率(Concordance Rate)与决策翻转(Flips),确保 \`safeToPublish: true\`。重放正式执行必须显式带 \`--confirm\`/\`--yes\`;\`--force\` 只用于明确覆盖测试绑定保护,不能替代确认。 -4. **用户授权确认与生产发布**: - - 严禁代替用户决策,只有在用户明确确认批准后,方可在生产环境正式发布。 +- 生产侧默认只改草稿,不直接生效;测试同步先用 \`corps sync-test --dry-run\`,正式执行必须显式确认。 +- 测试验证统一使用 \`seal-use test regression\` 或 \`simulation\`;重放正式执行必须带 \`--confirm\`/\`--yes\`。 +- 只有用户明确确认批准后,才允许在生产环境正式发布。 +- 完整命令、前置检查、Hose 隔离和失败恢复边界见 \`references/staging-simulation-workflow.md\`。 --- @@ -2407,7 +2400,12 @@ flowchart TD ### 第三阶段:一键安全同步测试环境 (Staging Auto-Sync) -通过 \`corps sync-test\` 命令,一键将生产企业的全部变更投影到测试环境: +通过 \`corps sync-test\` 命令,将生产企业的当前草稿、偏好和知识文档投影到绑定的测试环境。该操作是多个远端 API 调用组成的**多步同步,不是一个可回滚的远端事务**: + +- \`--dry-run\` 只做读取和差异计算;正式执行必须带 \`--yes\`。 +- 生产企业不会被发布或改写为新版本,但测试企业可能在中途失败时留下部分已写入内容。 +- 测试企业已发布的版本是追加历史,当前没有删除/撤销已发布版本的 API,因此不能承诺“恢复到原版本号”。失败后应重新执行 \`--dry-run\`,确认差异,再重新同步;若必须恢复历史版本,需要使用 Seal 管理后台或平台侧提供的版本恢复能力。 +- 不应把 \`sync-test\` 描述成原子事务或保证自动 rollback;它的安全保证是生产侧不发布、测试侧有预览和显式确认。 1. **预览差异 (\`--dry-run\`)**: \`\`\`bash @@ -2426,13 +2424,13 @@ flowchart TD - 更新审核风格与偏好设置; - 对账知识库文档(覆盖更新已有文档、创建新文档、删除测试环境多余文档); - 清空测试环境旧草稿规则,灌入生产企业当前草稿规则并重算 code; - - 在测试企业自动发布语义版本(格式形如 \`[Prod v22 · #1 -> Test v3]\`),并保存本地规则映射快照; - **自动同步合思集成**: - 从本地 source 读入 \`appKey\`/\`appSecurity\`(兼容 \`key\`/\`password\`); - 截取企业名前缀并附加 \`(Seal测)\`(严格受控于 13 字符限制,例如 \`钰泰半导体(Seal测)\`); - 强制将审批模式设为 \`assisted\`; - 自动去重:若生产有多个相同 \`corporationId\` 的集成(如全自动与辅助),在测试环境自动合并为单条辅助集成; - **不同步至合思**:仅保存在测试环境 Seal,保证合思生产费控零改动。 + - 在测试企业自动发布语义版本(格式形如 \`[Prod v22 · #1 -> Test v3]\`),并保存本地规则映射快照;Hose 配置同步安排在发布之前,但前面的规则、文档或偏好写入失败仍可能留下部分测试侧变更。 3. **速查规则映射**: \`\`\`bash @@ -2611,12 +2609,12 @@ do not control. `,{flag:"a",mode:384})}var bo=m(()=>{go()});import{homedir as oy1}from"node:os";import{join as ry1}from"node:path";async function no($,Y,z){let U=z?s0(z.options.port)??s0(z.options.p):void 0,Q=z?h(z.options.host)??h(z.options.h):void 0,J=z?s0(z.options.lines)??s0(z.options.n):void 0,I=await r3($,{appRoot:Y.appRoot,entryFile:Y.entryFile,stateDir:io,version:Z1,launcher:Y.launcher,port:U,host:Q},{maxLines:J});if(I!==void 0)x0(I)}var io;var co=m(()=>{$3();bo();K4();A4();io=ry1(oy1(),".config","seal-use")});import{existsSync as sy1,readFileSync as gg0}from"node:fs";async function yg0($,Y,z,U,Q){if($==="batch-records"||$==="records"){let J=Y??h(Q.options.batchId)??h(Q.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation batch-records ");await k0("seal_simulation_batch_records_get",z,U,{batchId:J,query:h(Q.options.query)},E0(Q.options));return}if($==="create"||$==="run"){let J=h(Q.options.mode)??h(Q.options.sourceSystem)??h(Q.options["source-system"])??"hosecloud",I=J==="material-pack"?"material_pack":J,K=h(Q.options.schemaConfig)??h(Q.options["schema-config"]),G=K?JSON.parse(gg0(K,"utf8")):void 0,H=h(Q.options.input),W=H?JSON.parse(gg0(H,"utf8")):k8(Q.json),X=h(Q.options.packageId)??h(Q.options["package-id"]),Z=i6(Q.options.packageIds)??i6(Q.options["package-ids"])??(X?[X]:void 0),q=i6(Q.options.flowIds)??i6(Q.options["flow-ids"])??i6(Q.options.documentSn)??i6(Q.options["document-sn"]),V=h(Q.options.signKey)??h(Q.options["sign-key"])??h(Q.options.integration),F=Z0(Q.options.wait)===!0,w=Z0(Q.options.noWait)??Z0(Q.options["no-wait"])??(F?!1:!0),O=await O$("seal_simulation_batch_create",z,U,{mode:I,sourceSystem:I,flowIds:q,documentSn:q,rejectNodeName:h(Q.options.rejectNode)??h(Q.options["reject-node"])??null,thinkingDepthOverride:h(Q.options.thinkingDepth)??h(Q.options["thinking-depth"]),skipInvoiceGeneration:Z0(Q.options.skipInvoiceGeneration)??Z0(Q.options["skip-invoice-generation"]),skipExpenseExtraction:Z0(Q.options.skipExpenseExtraction)??Z0(Q.options["skip-expense-extraction"]),disableAttachmentCache:Z0(Q.options.disableAttachmentCache)??Z0(Q.options["disable-attachment-cache"]),signKey:V,packageIds:Z,packageId:X,templateId:h(Q.options.templateId)??h(Q.options["template-id"]),schemaConfig:G,requestIds:i6(Q.options.requestIds)??i6(Q.options["request-ids"]),workflowTypeId:h(Q.options.workflowTypeId)??h(Q.options["workflow-type-id"]),flowStatusList:i6(Q.options.flowStatusList)?.map(Number)??i6(Q.options["flow-status-list"])?.map(Number),businessCodes:i6(Q.options.businessCodes)??i6(Q.options["business-codes"]),documentType:h(Q.options.documentType)??h(Q.options["document-type"]),startTime:s0(Q.options.startTime)??s0(Q.options["start-time"]),endTime:s0(Q.options.endTime)??s0(Q.options["end-time"]),status:i6(Q.options.status),limit:s0(Q.options.limit),noWait:w,rawParams:W});if(F&&O&&typeof O==="object"&&"batchId"in O&&typeof O.batchId==="string"){await k0("seal_simulation_batch_wait",z,U,{batchId:O.batchId,timeout:h(Q.options.timeout),pollInterval:h(Q.options.pollInterval)??h(Q.options["poll-interval"])},E0(Q.options));return}x0(O,E0(Q.options));return}if($==="wait"){let J=Y??h(Q.options.batchId)??h(Q.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation wait [--timeout 10m] [--poll-interval 2s]");await k0("seal_simulation_batch_wait",z,U,{batchId:J,timeout:h(Q.options.timeout),pollInterval:h(Q.options.pollInterval)??h(Q.options["poll-interval"])},E0(Q.options));return}if($==="status"){let J=Y??h(Q.options.batchId)??h(Q.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation status ");await k0("seal_simulation_batch_status",z,U,{batchId:J},E0(Q.options));return}if($==="clean"||$==="delete"){let J=Y??h(Q.options.batchId)??h(Q.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation clean ");await k0("seal_simulation_batch_clean",z,U,{batchId:J},E0(Q.options));return}if($==="specifications"){let J=Y??h(Q.options.integration)??h(Q.options.signKey)??h(Q.options["sign-key"]);await k0("seal_simulation_specifications_list",z,U,{signKey:J},E0(Q.options));return}if($==="approval-definitions"||$==="definitions"){await k0("seal_simulation_feishu_approval_definitions_list",z,U,{},E0(Q.options));return}if($==="list"){await k0("seal_simulation_batches_list",z,U,{limit:s0(Q.options.limit)},E0(Q.options));return}if($==="get"){let J=Y??h(Q.options.batchId)??h(Q.options["batch-id"]);if(!J)throw Error("Usage: seal-use simulation get ");await k0("seal_simulation_batch_get",z,U,{batchId:J},E0(Q.options));return}if($==="templates"){await k0("seal_simulation_templates_get",z,U,{},E0(Q.options));return}if($==="integrations"){await k0("seal_simulation_integrations_get",z,U,{},E0(Q.options));return}if($==="package-upload"){let J=Y??h(Q.options.file);if(!J)throw Error("Usage: seal-use simulation package-upload <材料包.zip>");if(!sy1(J))throw Error(`File not found: ${J}`);await k0("seal_simulation_material_package_upload",z,U,{filePath:J},E0(Q.options));return}throw Error(`Unknown simulation command: ${$??""}. Run 'seal-use help' for available commands.`)}var kg0=m(()=>{f4();A4();K4()});import{existsSync as xg0}from"node:fs";import{join as ej}from"node:path";function fg0($,Y,z){if($==="dump"||$==="cat"||$==="show"){process.stdout.write(`${To()} `);return}if($==="install"||$==="init"||$==="sync"){let U=Z0(z.options.local)||Z0(z.options.workspace),Q=h(z.options.dir)??h(z.options.target)??Y,J=Q?Q:U?ej(process.cwd(),".agents","skills","seal-use"):bU(),I=mS0(J),K=!U&&!Q,G=K?wo():void 0,H=K?Do():void 0;x0({installed:!0,targetDir:I.targetDir,fileCount:I.files.length,files:I.files,...G?{antigravity:G}:{},...H?{hosts:H}:{}});return}if($==="status"||$==="get"||!$){let U=bU(),Q=ej(process.cwd(),".agents","skills","seal-use"),J=Mo(),I=Ao();x0({global:{dir:U,installed:xg0(ej(U,"SKILL.md"))},local:{dir:Q,installed:xg0(ej(Q,"SKILL.md"))},antigravity:J,hosts:I});return}throw Error(`Unknown skill command: ${$}. Run 'seal-use help' for available commands.`)}var ug0=m(()=>{Po();yq();A4();K4()});async function bg0($,Y){if($==="config"){x0(await iK(Y));return}throw Error(`Unknown source command: ${$??""}. Run 'seal-use help' for available commands.`)}var ig0=m(()=>{fj();K4()});function po($){if(typeof $!=="string"||!$.trim())return"UNKNOWN";let Y=$.toUpperCase().trim();if(Y==="APPROVE"||Y==="PASS")return"APPROVE";if(Y==="REJECT"||Y==="DENIED")return"REJECT";if(Y==="MANUAL"||Y==="ASSISTED")return"MANUAL";if(Y==="ERROR"||Y==="FAILED")return"ERROR";return Y}async function ng0($){let{sourceCorp:Y,targetCorp:z,sourceClient:U,targetClient:Q,samples:J=10,dryRun:I=!1,pollIntervalMs:K=2000,timeoutMs:G=45000,snPrefix:H="REG_",fetchFn:W=fetch}=$;if(z.environment!=="test")throw new L4(`重放目标企业「${z.name}」(${z.id}) 的环境为「${z.environment}」,非测试环境! `+"硬性安全规定:自动化回归测试矩阵严禁在生产环境直接运行。必须绑定并指定测试环境(testCorp)。",2,`seal-use corps bind-test ${Y.id} `);let X=await lY(Q),q=(Array.isArray(X.features)?X.features:[]).find((d)=>d?.code==="ai-approval"),V=typeof q?.balance==="number"?q.balance:0,F=typeof q?.deductionAmount==="number"&&q.deductionAmount>0?q.deductionAmount:120,w=J*F;if(V{let e=t.sourceDocumentSN??t.id,y=t?.result?.decision??t.aiDecision??t?.decision,p=po(y),Y0=t?.result?.summary??t.aiSummary;return{sn:e,sourceRecordId:t.id,prodDecision:p,prodSummary:Y0,status:"DRY_RUN"}});return{ok:!0,verdict:"DRY_RUN",safeToPublish:!0,timestamp:new Date().toISOString(),sourceCorp:{id:Y.id,name:Y.name,environment:Y.environment??"production"},targetCorp:{id:z.id,name:z.name,environment:z.environment??"test"},quota:{featureCode:"ai-approval",balanceBefore:V,deductionAmount:F,estimatedRequired:w},metrics:{sampleCount:d.length,successCount:d.length,failureCount:0,matchCount:d.length,flipCount:0,concordanceRate:1},flips:[],records:d}}let M=await Bp(Q,z,$.webhookSelector),D=[];for(let d of N){let t=Date.now(),e=d.sourceDocumentSN??d.id,y=po(d?.result?.decision??d.aiDecision??d?.decision),p=d?.result?.summary??d.aiSummary;try{let Y0=await H4(U,d.id),g=`${H}${e}`,a=Dp(Y0,{snPrefix:H,docIdPrefix:H});await Ap(M.incomingDocumentWebhook.url,M.secret,a,W,A6(z.seal));let $0=null,N0=Date.now();while(Date.now()-N0setTimeout(H0,K));let r=await i4(Q,{sourceDocumentSN:g,limit:1});if(r.records&&r.records.length>0){let H0=r.records[0];if(H0.status==="completed"||H0.status==="failed"){$0=H0;break}}}if(!$0){D.push({sn:e,sourceRecordId:d.id,prodDecision:y,prodSummary:p,status:"FAILED",error:`测试租户单据审核超时 (${Math.round(G/1000)}s 未完成)`,durationMs:Date.now()-t});continue}let T0=po($0?.result?.decision??$0.aiDecision??$0?.decision??($0.status==="completed"?"APPROVE":"ERROR")),v0=$0?.result?.summary??$0.aiSummary,G0=y===T0,f0=G0?"MATCHED":"FLIPPED",e0={sn:e,sourceRecordId:d.id,prodDecision:y,prodSummary:p,testRecordId:$0.id,testDecision:T0,testSummary:v0,status:f0,durationMs:Date.now()-t};if(!G0)e0.diff={from:y,to:T0,reasonDiff:v0&&p&&v0!==p?`生产: ${p.slice(0,60)}... -> 测试: ${v0.slice(0,60)}...`:void 0};D.push(e0)}catch(Y0){D.push({sn:e,sourceRecordId:d.id,prodDecision:y,prodSummary:p,status:"FAILED",error:Y0 instanceof Error?Y0.message:String(Y0),durationMs:Date.now()-t})}}let P=D.filter((d)=>d.status==="MATCHED"||d.status==="FLIPPED"),j=D.filter((d)=>d.status==="MATCHED"),A=D.filter((d)=>d.status==="FLIPPED"),T=D.filter((d)=>d.status==="FAILED").length,C=j.length,b=A.length,k=C+b,S=k>0?C/k:0,i=b>0,n=i?"REGRESSIONS_DETECTED":"CLEAN",U0=!i&&T===0,x;try{let d=await lY(Q),e=(Array.isArray(d.features)?d.features:[]).find((y)=>y?.code==="ai-approval");if(typeof e?.balance==="number")x=e.balance}catch{}return{ok:!i&&T===0,verdict:n,safeToPublish:U0,timestamp:new Date().toISOString(),sourceCorp:{id:Y.id,name:Y.name,environment:Y.environment??"production"},targetCorp:{id:z.id,name:z.name,environment:z.environment??"test"},quota:{featureCode:"ai-approval",balanceBefore:V,deductionAmount:F,estimatedRequired:w,balanceAfter:x},metrics:{sampleCount:D.length,successCount:P.length,failureCount:T,matchCount:C,flipCount:b,concordanceRate:Number(S.toFixed(4))},flips:A,records:D}}function cg0($){let{sourceCorp:Y,targetCorp:z,verdict:U,safeToPublish:Q,metrics:J,quota:I,flips:K,records:G}=$,H=U==="CLEAN"?"\uD83D\uDFE2 决策完全一致 (CLEAN - 无回归)":U==="DRY_RUN"?"⚪ 预演模式 (DRY-RUN)":"\uD83D\uDD34 发现决策翻转 (REGRESSIONS_DETECTED)",W=["",`\uD83E\uDDEA [Seal Use Test] 规则回归测试矩阵: 生产「${Y.name}」-> 测试靶场「${z.name}」`,` 判定: ${H} · 准许发布: ${Q?"YES (可安全上线)":"NO (存在行为偏离/待复核)"}`," "+"─".repeat(65),` 样本总数: ${J.sampleCount} | 一致通过: ${J.matchCount} | 决策翻转: ${J.flipCount} | 异常失败: ${J.failureCount}`,` 一致率: ${(J.concordanceRate*100).toFixed(1)}% | 消耗预估: ${I.estimatedRequired} 点 (余量: ${I.balanceBefore}${I.balanceAfter!==void 0?` -> ${I.balanceAfter}`:""})`," "+"─".repeat(65)];if(K.length>0){W.push(` ⚠️ 决策翻转清单 (${K.length} 笔单据在新规则下结果改变):`);for(let X of K)if(W.push(` • 单据 [${X.sn}]: 原生产判定「${X.prodDecision}」 ➔ 测试新判定「${X.testDecision}」`),X.diff?.reasonDiff)W.push(` 理由差异: ${X.diff.reasonDiff}`);W.push(" "+"─".repeat(65)),W.push(" \uD83D\uDC49 建议: 请检查上述翻转单据是否符合预期修正。若为意外误杀,请调整测试环境规则后再次回归。")}else if(U==="CLEAN")W.push(" ✓ 全部样本在新规则下的审核决策与生产历史 100% 吻合,无任何意外误杀或漏判。"),W.push(" \uD83D\uDC49 下一步操作: seal-use deploy hosecloud sync 或发布正式版本");return W.push(""),W.join(` +`+"为防止测试环境额度耗尽中断业务,已硬性拦截并拒绝发起测试单据注入。",2,`请为测试企业「${z.id}」充值 AI 审批额度,或降低抽样笔数 (--samples ${Math.max(1,Math.floor(V/F))})`);let O=await i4(U,{limit:J,status:"completed"}),N=Array.isArray(O.records)?O.records:[];if(N.length===0){let d=await i4(U,{limit:J});N=Array.isArray(d.records)?d.records:[]}if(N.length===0)throw new L4(`在母企业「${Y.name}」(${Y.id}) 中未检索到任何历史审批单据,无法抽取回归样本。`,2);if(N=N.slice(0,J),I){let d=N.map((t)=>{let e=t.sourceDocumentSN??t.id,g=t?.result?.decision??t.aiDecision??t?.decision,p=po(g),Y0=t?.result?.summary??t.aiSummary;return{sn:e,sourceRecordId:t.id,prodDecision:p,prodSummary:Y0,status:"DRY_RUN"}});return{ok:!0,verdict:"DRY_RUN",safeToPublish:!0,timestamp:new Date().toISOString(),sourceCorp:{id:Y.id,name:Y.name,environment:Y.environment??"production"},targetCorp:{id:z.id,name:z.name,environment:z.environment??"test"},quota:{featureCode:"ai-approval",balanceBefore:V,deductionAmount:F,estimatedRequired:w},metrics:{sampleCount:d.length,successCount:d.length,failureCount:0,matchCount:d.length,flipCount:0,concordanceRate:1},flips:[],records:d}}let M=await Bp(Q,z,$.webhookSelector),D=[];for(let d of N){let t=Date.now(),e=d.sourceDocumentSN??d.id,g=po(d?.result?.decision??d.aiDecision??d?.decision),p=d?.result?.summary??d.aiSummary;try{let Y0=await H4(U,d.id),y=`${H}${e}`,r=Dp(Y0,{snPrefix:H,docIdPrefix:H});await Ap(M.incomingDocumentWebhook.url,M.secret,r,W,A6(z.seal));let $0=null,N0=Date.now();while(Date.now()-N0setTimeout(H0,K));let s=await i4(Q,{sourceDocumentSN:y,limit:1});if(s.records&&s.records.length>0){let H0=s.records[0];if(H0.status==="completed"||H0.status==="failed"){$0=H0;break}}}if(!$0){D.push({sn:e,sourceRecordId:d.id,prodDecision:g,prodSummary:p,status:"FAILED",error:`测试租户单据审核超时 (${Math.round(G/1000)}s 未完成)`,durationMs:Date.now()-t});continue}let T0=po($0?.result?.decision??$0.aiDecision??$0?.decision??($0.status==="completed"?"APPROVE":"ERROR")),_0=$0?.result?.summary??$0.aiSummary,G0=g===T0,f0=G0?"MATCHED":"FLIPPED",e0={sn:e,sourceRecordId:d.id,prodDecision:g,prodSummary:p,testRecordId:$0.id,testDecision:T0,testSummary:_0,status:f0,durationMs:Date.now()-t};if(!G0)e0.diff={from:g,to:T0,reasonDiff:_0&&p&&_0!==p?`生产: ${p.slice(0,60)}... -> 测试: ${_0.slice(0,60)}...`:void 0};D.push(e0)}catch(Y0){D.push({sn:e,sourceRecordId:d.id,prodDecision:g,prodSummary:p,status:"FAILED",error:Y0 instanceof Error?Y0.message:String(Y0),durationMs:Date.now()-t})}}let P=D.filter((d)=>d.status==="MATCHED"||d.status==="FLIPPED"),j=D.filter((d)=>d.status==="MATCHED"),A=D.filter((d)=>d.status==="FLIPPED"),T=D.filter((d)=>d.status==="FAILED").length,C=j.length,b=A.length,k=C+b,S=k>0?C/k:0,i=b>0,n=i?"REGRESSIONS_DETECTED":"CLEAN",U0=!i&&T===0,x;try{let d=await lY(Q),e=(Array.isArray(d.features)?d.features:[]).find((g)=>g?.code==="ai-approval");if(typeof e?.balance==="number")x=e.balance}catch{}return{ok:!i&&T===0,verdict:n,safeToPublish:U0,timestamp:new Date().toISOString(),sourceCorp:{id:Y.id,name:Y.name,environment:Y.environment??"production"},targetCorp:{id:z.id,name:z.name,environment:z.environment??"test"},quota:{featureCode:"ai-approval",balanceBefore:V,deductionAmount:F,estimatedRequired:w,balanceAfter:x},metrics:{sampleCount:D.length,successCount:P.length,failureCount:T,matchCount:C,flipCount:b,concordanceRate:Number(S.toFixed(4))},flips:A,records:D}}function cg0($){let{sourceCorp:Y,targetCorp:z,verdict:U,safeToPublish:Q,metrics:J,quota:I,flips:K,records:G}=$,H=U==="CLEAN"?"\uD83D\uDFE2 决策完全一致 (CLEAN - 无回归)":U==="DRY_RUN"?"⚪ 预演模式 (DRY-RUN)":"\uD83D\uDD34 发现决策翻转 (REGRESSIONS_DETECTED)",W=["",`\uD83E\uDDEA [Seal Use Test] 规则回归测试矩阵: 生产「${Y.name}」-> 测试靶场「${z.name}」`,` 判定: ${H} · 准许发布: ${Q?"YES (可安全上线)":"NO (存在行为偏离/待复核)"}`," "+"─".repeat(65),` 样本总数: ${J.sampleCount} | 一致通过: ${J.matchCount} | 决策翻转: ${J.flipCount} | 异常失败: ${J.failureCount}`,` 一致率: ${(J.concordanceRate*100).toFixed(1)}% | 消耗预估: ${I.estimatedRequired} 点 (余量: ${I.balanceBefore}${I.balanceAfter!==void 0?` -> ${I.balanceAfter}`:""})`," "+"─".repeat(65)];if(K.length>0){W.push(` ⚠️ 决策翻转清单 (${K.length} 笔单据在新规则下结果改变):`);for(let X of K)if(W.push(` • 单据 [${X.sn}]: 原生产判定「${X.prodDecision}」 ➔ 测试新判定「${X.testDecision}」`),X.diff?.reasonDiff)W.push(` 理由差异: ${X.diff.reasonDiff}`);W.push(" "+"─".repeat(65)),W.push(" \uD83D\uDC49 建议: 请检查上述翻转单据是否符合预期修正。若为意外误杀,请调整测试环境规则后再次回归。")}else if(U==="CLEAN")W.push(" ✓ 全部样本在新规则下的审核决策与生产历史 100% 吻合,无任何意外误杀或漏判。"),W.push(" \uD83D\uDC49 下一步操作: seal-use deploy hosecloud sync 或发布正式版本");return W.push(""),W.join(` `)}var pg0=m(()=>{F$();B6();fZ()});async function mo($,Y,z){let U=($??Y??"regression").toLowerCase();if(U==="regression"||U==="regress"||U==="matrix"){let Q=h(z.options.corp)??(Y&&Y!==U?Y:void 0),J=T1(Q),I=J,K=J;if(J.environment==="test"){K=J;let M=h(z.options["prod-corp"])??h(z.options.prod)??J.prodCorpId;if(!M)throw new L4(`测试企业「${J.name}」(${J.id}) 未绑定生产母企业,无法拉取历史样本。 `+"请建立绑定或通过 --prod-corp 参数指定生产企业来源。",2,`seal-use corps bind-test ${J.id}`);I=T1(M)}else{I=J;let M=h(z.options["test-corp"])??h(z.options.test)??J.testCorpId;if(!M)throw new L4(`生产企业「${J.name}」(${J.id}) 未绑定测试靶场企业。 `+"硬性规定:回归测试严禁在生产环境直接运行。必须绑定并指定测试环境(testCorp)。",2,`seal-use corps bind-test ${J.id} `);K=T1(M)}let G=await P1(I),H=await P1(K),W=s0(z.options.samples)??s0(z.options.limit)??s0(z.options.n)??10,X=Z0(z.options["dry-run"]),Z=Z0(z.options["fail-on-flips"]),q=s0(z.options["poll-interval"])??2000,V=s0(z.options.timeout)??45000,F=h(z.options["sn-prefix"])??"REG_",w=h(z.options.webhook)??h(z.options.selector),O=await ng0({sourceCorp:I,targetCorp:K,sourceClient:G,targetClient:H,samples:W,dryRun:X,pollIntervalMs:q,timeoutMs:V,snPrefix:F,failOnFlips:Z,webhookSelector:w});if(!(Z0(z.options.quiet)||Z0(z.options.silent)))console.error(cg0(O));if(x0(O),Z&&!O.ok)throw new L4(`回归测试发现 ${O.metrics.flipCount} 笔单据决策翻转,已按 --fail-on-flips 策略非零终止。`,1);return}throw new L4(`未知的 test 子命令: "${U}"。 可用子命令: seal-use test regression [--corp ] [--samples ] [--dry-run]`,2,"seal-use test regression --help")}var dg0=m(()=>{F$();f4();A4();K4();i8();pg0()});async function mg0($,Y,z,U){if(!$)throw Error("Usage: seal-use tool [--json '{...}']");await k0($,Y,z,k8(U.json),E0(U.options))}var lg0=m(()=>{f4();A4();K4()});function og0(){x0(Dq.map(($)=>({name:$.name,description:$.description})))}var rg0=m(()=>{Bq();K4()});function $T($=process.execPath,Y=import.meta.url){if(Y.includes("/$bunfs/")||Y.includes("\\$bunfs\\"))return!0;let z=$.toLowerCase().replace(/\\/g,"/");return!z.endsWith("/bun")&&!z.endsWith("/bun.exe")&&!z.endsWith("/node")&&!z.endsWith("/node.exe")}var sg0=m(()=>{yq()});import{existsSync as ay1,mkdirSync as ty1,readFileSync as ey1,renameSync as $k1,writeFileSync as Yk1}from"node:fs";import{homedir as zk1}from"node:os";import{dirname as Uk1,join as Qk1}from"node:path";import{spawn as Jk1}from"node:child_process";function ag0(){let $=process.env[Ik1]?.trim();if($)return $;return Gk1}function tg0($=ag0()){if(!ay1($))return null;try{let Y=ey1($,"utf-8"),z=JSON.parse(Y);if(z&&typeof z==="object"&&typeof z.latestVersion==="string"&&typeof z.checkedAt==="string")return z;return null}catch{return null}}function uq($,Y=ag0()){try{let z=Uk1(Y);ty1(z,{recursive:!0,mode:448});let U={checkedAt:$.checkedAt??new Date().toISOString(),latestVersion:$.latestVersion,publishedAt:$.publishedAt,releaseUrl:$.releaseUrl},Q=`${Y}.tmp.${Date.now()}.${Math.random().toString(36).slice(2,8)}`;Yk1(Q,JSON.stringify(U,null,2),{mode:384}),$k1(Q,Y)}catch{}}function eg0($,Y=Kk1){if(!$||!$.checkedAt)return!0;let z=new Date($.checkedAt).getTime();if(Number.isNaN(z))return!0;return Date.now()-z>Y}function $y0($){if(process.env.SEAL_DISABLE_BG_UPDATE==="1"||!1||process.env.CI)return!1;if(!$||!$.command)return!1;try{let Y=$.command,z=[...$.args??[],"update","check","--bg-save"];return Jk1(Y,z,{detached:!0,stdio:"ignore",env:{...process.env,SEAL_DISABLE_BG_UPDATE:"1"}}).unref(),!0}catch{return!1}}var Ik1="SEAL_USE_UPDATE_CACHE_FILE",Kk1=86400000,Gk1;var lo=m(()=>{Gk1=Qk1(zk1(),".config","seal-use","update-cache.json")});import{chmodSync as Hk1,mkdirSync as Wk1,readdirSync as Xk1,realpathSync as Yy0,renameSync as oo,rmSync as Zk1,unlinkSync as Jy0,writeFileSync as zy0}from"node:fs";import{basename as qk1,dirname as Vk1,isAbsolute as Lk1,join as UT,relative as Fk1}from"node:path";import{spawnSync as _5}from"node:child_process";async function Ky0($,Y={}){let z={appRoot:$.appRoot,entryFile:$.entryFile,stateDir:io,version:Z1,launcher:$.launcher},U=Y.repo||process.env[Ok1]?.trim()||process.env[wk1]?.trim()||Iy0,Q=Y.targetVersion?.trim(),J=Q&&Q.toLowerCase()!=="latest"?Q:void 0;if(J){let D=J.replace(/^v/,""),P=Xy0(D,Z1);if(P<0)if(!sS&&Y.force);else{x0({updated:!1,currentVersion:Z1,targetVersion:D,mode:$T()?"binary":"source",message:!sS?`Cannot downgrade seal-use from dev build v${Z1} to release v${D}. Use --force to overwrite.`:`Cannot downgrade seal-use from v${Z1} to older version v${D}. Updates must be forward-only.`});return}if(P===0&&!Y.force){x0({updated:!1,currentVersion:Z1,targetVersion:D,mode:$T()?"binary":"source",message:`seal-use is already at version v${Z1}. Use --force to reinstall.`});return}}if(Y.changelogOnly){let D=await zT(U,Y.limit??10);x0({currentVersion:Z1,totalQueried:D.length,releases:D.map((P)=>({version:P.version,tagName:P.tagName,publishedAt:P.publishedAt,author:P.author,releaseNotes:P.notes,releaseUrl:P.htmlUrl,isCurrent:P.version===Z1,isNewer:R5(P.version,Z1)}))});return}if(!$T()){if(Y.checkOnly){let P=await zT(U,30),j=P[0],A=j?.version??Z1,T=P.find((k)=>k.version===Z1),C=R5(A,Z1),b=P.filter((k)=>R5(k.version,Z1));if(j?.version)uq({latestVersion:j.version,publishedAt:j.publishedAt,releaseUrl:j.htmlUrl});if(Y.bgSave)return;x0({updated:!1,updateAvailable:C,currentVersion:Z1,currentVersionPublishedAt:T?.publishedAt,latestVersion:A,latestVersionPublishedAt:j?.publishedAt,behindCount:b.length,pendingReleases:b.map((k)=>({version:k.version,tagName:k.tagName,publishedAt:k.publishedAt,author:k.author,releaseNotes:k.notes,releaseUrl:k.htmlUrl})),releaseNotes:j?.notes??"",releaseUrl:j?.htmlUrl??"",mode:"source",message:"当前运行的是开发版。正式用户请安装正式版后使用 seal-use update。"});return}let D=iU(z).running;if(D)await r3("stop",z);try{Qy0("git",["-C",$.appRoot,"pull","--ff-only"])}catch(P){console.error(`⚠️ 开发版更新同步失败,继续刷新本地依赖: ${P instanceof Error?P.message:String(P)}`)}if(Qy0("bun",["install"],{cwd:$.appRoot}),D)await r3("start",z);x0({updated:!0,serviceRestarted:D,version:Z1,mode:"source"});return}if(Bk1())try{await Pk1($,Y,z,U,J);return}catch(D){console.error(`⚠️ Homebrew 自动更新失败,回退至原生二进制更新: ${D instanceof Error?D.message:String(D)}`)}let I=Nk1(),K=Dk1(),G=await zT(U,30),H=J?G.find((D)=>D.version===J||D.tagName===J||D.tagName===`v${J}`)??await QT(U,J):G[0]??await QT(U);if(!H){x0({updated:!1,currentVersion:Z1,mode:"binary",message:`Failed to query releases from repository '${U}'`});return}let W=H.version,X=G.find((D)=>D.version===Z1),Z=R5(W,Z1),q=Z||Boolean(Y.force),V=G.filter((D)=>R5(D.version,Z1));if(H?.version)uq({latestVersion:H.version,publishedAt:H.publishedAt,releaseUrl:H.htmlUrl});if(Y.bgSave)return;if(J&&!Y.checkOnly){x0({updated:!1,currentVersion:Z1,targetVersion:J,latestVersion:W,mode:"homebrew",message:"Homebrew-managed installations follow the formula version and do not support selecting a historical release. Use Homebrew directly for version pinning."});return}if(Y.checkOnly){x0({updated:!1,updateAvailable:Z,currentVersion:Z1,currentVersionPublishedAt:X?.publishedAt,latestVersion:W,latestVersionPublishedAt:H.publishedAt,behindCount:V.length,pendingReleases:V.map((D)=>({version:D.version,tagName:D.tagName,publishedAt:D.publishedAt,author:D.author,releaseNotes:D.notes,releaseUrl:D.htmlUrl})),releaseNotes:H.notes,releaseUrl:H.htmlUrl,mode:"binary"});return}if(!q){x0({updated:!1,currentVersion:Z1,currentVersionPublishedAt:X?.publishedAt,latestVersion:W,latestVersionPublishedAt:H.publishedAt,mode:"binary",message:`seal-use is already up to date (v${Z1})`});return}let F=Tk1(H.assets,I,K);if(!F)throw Error(`No compatible binary found for ${I}-${K} in release v${W}. Available assets: ${H.assets.map((D)=>D.name).join(", ")}`);let w=iU(z).running;if(w)await r3("stop",z);let O=process.execPath,N=Vk1(O),M=UT(N,`.tmp-update-${Date.now()}`);Wk1(M,{recursive:!0});try{let D=UT(M,F.name);await Ek1(F.downloadUrl,D,H.tagName,F.name);let P=D;if(F.name.endsWith(".tar.gz")||F.name.endsWith(".tgz"))P=Ck1(D,M,I);else if(F.name.endsWith(".zip"))P=Rk1(D,M,I);if(Hk1(P,493),process.platform==="darwin")try{_5("/usr/bin/codesign",["--remove-signature",P],{stdio:"ignore"}),_5("/usr/bin/codesign",["--force","--sign","-",P],{stdio:"ignore"})}catch{}if(process.platform==="win32"){let A=`${O}.old.${Date.now()}`;try{oo(O,A)}catch{}oo(P,O)}else oo(P,O);if(w)await r3("start",z);let j=Mk1(O,W);uq({latestVersion:W,publishedAt:H.publishedAt,releaseUrl:H.htmlUrl}),x0({updated:!0,fromVersion:Z1,toVersion:W,serviceRestarted:w,skillSynced:j.targetDir??!1,skillVersion:j.version??!1,mode:"binary"})}finally{try{Zk1(M,{recursive:!0,force:!0})}catch{}}}function Mk1($,Y){let z=_5($,["skill","install"],{encoding:"utf8"});if(z.status!==0)throw Error(`Binary updated to v${Y}, but refreshing the Agent Skill failed ('${$} skill install' exited with ${z.status}). Run 'seal-use skill install' to finish the update.`);let U;try{U=JSON.parse(z.stdout??"").targetDir}catch{}let Q=dS0(U?UT(U,"SKILL.md"):void 0);if(Q!==Y)throw Error(`Binary updated to v${Y}, but the Agent Skill on disk reports ${Q??"no version"}${U?` (${U})`:""}. Run 'seal-use skill install' to finish the update.`);return{targetDir:U,version:Q}}function Nk1(){if(process.platform==="darwin")return"darwin";if(process.platform==="win32")return"windows";return"linux"}function Dk1(){return process.arch==="arm64"?"arm64":"x64"}function Ak1(){try{let $=_5("brew",["--prefix","seal-use"],{stdio:["ignore","pipe","ignore"],encoding:"utf-8"});if($.status!==0||typeof $.stdout!=="string")return;return $.stdout.trim()||void 0}catch{return}}function Uy0(){try{let $=_5("brew",["list","--versions","seal-use"],{stdio:["ignore","pipe","ignore"],encoding:"utf-8"});if($.status!==0||typeof $.stdout!=="string")return;let Y=$.stdout.trim().split(/\s+/);return Y.length>=2?Y[Y.length-1]:void 0}catch{return}}function Bk1($=process.execPath,Y=Ak1()){if(!Y)return!1;try{let z=Yy0($),U=Yy0(Y),Q=Fk1(U,z),J=`..${process.platform==="win32"?"\\":"/"}`;return Boolean(Q&&Q!==".."&&!Q.startsWith(J)&&!Lk1(Q))}catch{return!1}}async function Pk1($,Y,z,U,Q){let J=await zT(U,30),I=Q?J.find((F)=>F.version===Q||F.tagName===Q||F.tagName===`v${Q}`)??await QT(U,Q):J[0]??await QT(U),K=I?.version??Z1,G=R5(K,Z1),H=G||Boolean(Y.force);if(I?.version)uq({latestVersion:I.version,publishedAt:I.publishedAt,releaseUrl:I.htmlUrl});if(Y.bgSave)return;if(Y.checkOnly){let F=J.find((O)=>O.version===Z1),w=J.filter((O)=>R5(O.version,Z1));x0({updated:!1,updateAvailable:G,currentVersion:Z1,currentVersionPublishedAt:F?.publishedAt,latestVersion:K,latestVersionPublishedAt:I?.publishedAt,behindCount:w.length,pendingReleases:w.map((O)=>({version:O.version,tagName:O.tagName,publishedAt:O.publishedAt,author:O.author,releaseNotes:O.notes,releaseUrl:O.htmlUrl})),releaseNotes:I?.notes??"",releaseUrl:I?.htmlUrl??"",mode:"homebrew"});return}if(!H){x0({updated:!1,currentVersion:Z1,latestVersion:K,mode:"homebrew",message:`seal-use is already up to date (v${Z1})`});return}console.error("ℹ️ 检测到当前 seal-use 由 Homebrew 管理。"),console.error("\uD83D\uDCE6 正在通过 Homebrew 极速更新: brew update && brew upgrade seal-use ...");let W=iU(z).running;if(W)await r3("stop",z);let X=Uy0(),Z=X?!R5(K,X):!1,q=Z,V;try{let F=_5("brew",["update"],{stdio:["ignore","pipe","pipe"],encoding:"utf-8",env:{...process.env,NONINTERACTIVE:"1"}});if(F.status!==0){let D=F.stderr?.trim()||F.stdout?.trim();throw Error(`brew update failed (exit ${F.status}): ${D||"unknown error"}`)}let w=_5("brew",["upgrade","seal-use"],{stdio:["ignore","pipe","pipe"],encoding:"utf-8",env:{...process.env,NONINTERACTIVE:"1"}}),O=`${w.stdout||""} ${w.stderr||""}`,N=O.includes("already installed")||O.includes("latest version already installed");if(w.status!==0&&!N)throw Error(`brew upgrade seal-use failed (exit ${w.status}): ${w.stderr?.trim()||w.stdout?.trim()}`);let M=Uy0();if(M&&R5(K,M))throw Error(`Homebrew still has seal-use v${M}; expected v${K}. Refresh the tap and run \`brew upgrade seal-use\` again.`);q=Z}catch(F){throw V=F,F}finally{if(W)try{await r3("start",z)}catch(F){if(V)console.error(`⚠️ 更新失败后服务恢复启动也失败: ${F instanceof Error?F.message:String(F)}`);else throw F}}try{_5("seal-use",["skill","install"],{stdio:"ignore"})}catch{}console.error(q?"ℹ️ seal-use 已是 Homebrew 中的最新版本。":"✅ seal-use 已通过 Homebrew 成功更新!"),x0({updated:!q,previousVersion:Z1,latestVersion:K,mode:"homebrew",serviceRestarted:W,message:q?`seal-use is already at the latest version v${K} in Homebrew`:`Successfully upgraded seal-use to v${K} via Homebrew`})}function ro(){let $=(process.env.SEAL_USE_MIRROR||process.env.SEAL_HOME_MIRROR)?.trim().toLowerCase();if($==="github"||$==="gitea")return $;if(process.env.CI)return"github";return"auto"}async function zT($,Y=20){let z=process.env.GITHUB_TOKEN||process.env.GH_TOKEN,U={"User-Agent":`seal-use/${Z1}`,Accept:"application/vnd.github.v3+json",...z?{Authorization:`Bearer ${z}`}:{}},Q=ro(),J=[];if(Q!=="github")J.push(`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases?per_page=${Y}`,`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases?per_page=${Y}`);if(Q!=="gitea"){if(J.push(`https://api.github.com/repos/${$}/releases?per_page=${Y}`),$!==bq)J.push(`https://api.github.com/repos/${bq}/releases?per_page=${Y}`)}for(let I of J)try{let K=await fetch(I,{headers:U,signal:AbortSignal.timeout(3000)});if(!K.ok)continue;let G=await K.json();if(!Array.isArray(G)||G.length===0)continue;let H=[];for(let W of G){let X=W.tag_name??"",Z=X.replace(/^v/,"");if(!Z)continue;let q=(W.assets??[]).map((V)=>({name:V.name,downloadUrl:V.browser_download_url,size:V.size??0}));H.push({version:Z,tagName:X,name:W.name??X,publishedAt:W.published_at,author:W.author?.login,notes:W.body??"",htmlUrl:W.html_url??"",assets:q})}if(H.length>0)return H}catch{}return[]}async function QT($,Y){let z=Y?Y.startsWith("v")?Y:`v${Y}`:void 0,U=process.env.GITHUB_TOKEN||process.env.GH_TOKEN,Q={"User-Agent":`seal-use/${Z1}`,Accept:"application/vnd.github.v3+json",...U?{Authorization:`Bearer ${U}`}:{}},J=ro(),I=[];if(J!=="github")I.push(z?`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases/tags/${z}`:"https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases/latest",z?`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/tags/${z}`:"https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/latest");if(J!=="gitea"){if(I.push(z?`https://api.github.com/repos/${$}/releases/tags/${z}`:`https://api.github.com/repos/${$}/releases/latest`),$!==bq)I.push(z?`https://api.github.com/repos/${bq}/releases/tags/${z}`:`https://api.github.com/repos/${bq}/releases/latest`)}let K;for(let G of I)try{let H=await fetch(G,{headers:Q,signal:AbortSignal.timeout(3000)});if(!H.ok)continue;let W=await H.json(),X=W.tag_name??"",Z=X.replace(/^v/,"");if(!Z)continue;let q=(W.assets??[]).map((F)=>({name:F.name,downloadUrl:F.browser_download_url,size:F.size??0})),V={version:Z,tagName:X,name:W.name??X,publishedAt:W.published_at,author:W.author?.login,notes:W.body??"",htmlUrl:W.html_url??"",assets:q};if(q.length>0)return V;if(!K)K=V}catch{}return K}function Gy0($){return $.endsWith(".tar.gz")||$.endsWith(".tgz")||$.endsWith(".zip")}function jk1($){return!Gy0($)&&!$.endsWith(".sha256")}function Tk1($,Y,z){let U={darwin:["darwin","macos","osx","apple"],linux:["linux"],windows:["windows","win32","win"]},Q={arm64:["arm64","aarch64"],x64:["x64","x86_64","amd64"]},J=U[Y]||[],I=Q[z]||[],G=$.filter((X)=>{let Z=X.name.toLowerCase(),q=J.some((F)=>Z.includes(F)),V=I.some((F)=>Z.includes(F));return q&&V}).filter((X)=>!X.name.endsWith(".sha256")),H=G.find((X)=>Gy0(X.name)),W=G.find((X)=>jk1(X.name));if(Y==="windows")return W??H??G[0];return H??W??G[0]}function YT($){try{process.stderr.write(`${$} -`)}catch{}}async function Ek1($,Y,z,U){let Q=ro(),J=[],I=z?z.startsWith("v")?z:`v${z}`:void 0,K=U||$.split("/").pop()||"";if(Q!=="github"){if(I&&K)J.push(`https://git.ying-qing.cn/gitea/seal-use/releases/download/${I}/${K}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${I}/${K}`);if($.startsWith("https://git.ying-qing.cn"))J.push($)}if(Q!=="gitea")if(I&&K){let F=`https://github.com/${Iy0}/releases/download/${I}/${K}`;if(!process.env.CI)J.push(`https://ghfast.top/${F}`,`https://gh.ddlc.top/${F}`);J.push(F)}else if($.includes("github.com")){if(!process.env.CI)J.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);J.push($)}else J.push($);let G=Array.from(new Set(J)),H,W=6000,X=6000,Z=307200,q=1e4,V=180000;for(let F=0;F{N=A;try{O.abort()}catch{}},D=setTimeout(()=>{M("Connection timed out (no response headers within 6s)")},W),P,j;try{YT(`==> [${F+1}/${G.length}] Downloading via: ${w}`);let A=await fetch(w,{signal:O.signal});if(D)clearTimeout(D),D=void 0;if(!A.ok)throw Error(`HTTP ${A.status} ${A.statusText}`);P=setTimeout(()=>{M("Overall download time exceeded 3 minutes")},V);let T=Number(A.headers.get("content-length"))||0,C=A.body?.getReader();if(!C){let n=Buffer.from(await A.arrayBuffer());if(n.length<1000)throw Error(`Downloaded content is suspiciously small (${n.length} bytes)`);zy0(Y,n),YT(`✓ Download succeeded (${(n.length/1024/1024).toFixed(1)} MB)`);return}let b=[],k=0,S=0;j=setTimeout(()=>{if(k{U0=setTimeout(()=>{p(Error("Data transfer stalled (no chunk received for 10s)"))},q)}),d;try{d=await Promise.race([n,x])}finally{if(U0)clearTimeout(U0)}let{done:t,value:e}=d;if(t)break;if(e){if(b.push(e),k+=e.length,j&&k>=Z)clearTimeout(j),j=void 0;let y=Date.now();if(y-S>200){S=y;let p=T?Math.round(k/T*100):0,Y0=(k/1048576).toFixed(1),g=T?(T/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${p}% (${Y0} / ${g} MB)...`)}catch{}}}}try{process.stderr.write(` +`)}catch{}}async function Ek1($,Y,z,U){let Q=ro(),J=[],I=z?z.startsWith("v")?z:`v${z}`:void 0,K=U||$.split("/").pop()||"";if(Q!=="github"){if(I&&K)J.push(`https://git.ying-qing.cn/gitea/seal-use/releases/download/${I}/${K}`,`https://git.ying-qing.cn/gitea/seal-home/releases/download/${I}/${K}`);if($.startsWith("https://git.ying-qing.cn"))J.push($)}if(Q!=="gitea")if(I&&K){let F=`https://github.com/${Iy0}/releases/download/${I}/${K}`;if(!process.env.CI)J.push(`https://ghfast.top/${F}`,`https://gh.ddlc.top/${F}`);J.push(F)}else if($.includes("github.com")){if(!process.env.CI)J.push(`https://ghfast.top/${$}`,`https://gh.ddlc.top/${$}`);J.push($)}else J.push($);let G=Array.from(new Set(J)),H,W=6000,X=6000,Z=307200,q=1e4,V=180000;for(let F=0;F{N=A;try{O.abort()}catch{}},D=setTimeout(()=>{M("Connection timed out (no response headers within 6s)")},W),P,j;try{YT(`==> [${F+1}/${G.length}] Downloading via: ${w}`);let A=await fetch(w,{signal:O.signal});if(D)clearTimeout(D),D=void 0;if(!A.ok)throw Error(`HTTP ${A.status} ${A.statusText}`);P=setTimeout(()=>{M("Overall download time exceeded 3 minutes")},V);let T=Number(A.headers.get("content-length"))||0,C=A.body?.getReader();if(!C){let n=Buffer.from(await A.arrayBuffer());if(n.length<1000)throw Error(`Downloaded content is suspiciously small (${n.length} bytes)`);zy0(Y,n),YT(`✓ Download succeeded (${(n.length/1024/1024).toFixed(1)} MB)`);return}let b=[],k=0,S=0;j=setTimeout(()=>{if(k{U0=setTimeout(()=>{p(Error("Data transfer stalled (no chunk received for 10s)"))},q)}),d;try{d=await Promise.race([n,x])}finally{if(U0)clearTimeout(U0)}let{done:t,value:e}=d;if(t)break;if(e){if(b.push(e),k+=e.length,j&&k>=Z)clearTimeout(j),j=void 0;let g=Date.now();if(g-S>200){S=g;let p=T?Math.round(k/T*100):0,Y0=(k/1048576).toFixed(1),y=T?(T/1048576).toFixed(1):"?";try{process.stderr.write(`\r ↳ Progress: ${p}% (${Y0} / ${y} MB)...`)}catch{}}}}try{process.stderr.write(` `)}catch{}let i=Buffer.concat(b);if(i.length<1000)throw Error(`Downloaded content is suspiciously small (${i.length} bytes)`);zy0(Y,i),YT(`✓ Download completed successfully (${(i.length/1024/1024).toFixed(1)} MB)`);return}catch(A){if(D)clearTimeout(D);if(j)clearTimeout(j);if(P)clearTimeout(P);let T=N||(A instanceof Error?A.message:String(A));H=Error(T),YT(` ↳ Mirror failed: ${H.message}`)}finally{if(D)clearTimeout(D);if(j)clearTimeout(j);if(P)clearTimeout(P)}}throw Error(`Failed to download asset from all mirrors: ${H?.message}`)}function Hy0($){let Y;try{Y=Xk1($,{withFileTypes:!0})}catch{return[]}let z=[];for(let U of Y){let Q=UT($,U.name);if(U.isDirectory())z.push(...Hy0(Q));else if(U.isFile())z.push(Q)}return z}function Wy0($,Y,z){let U=Y==="windows"?"seal-use.exe":"seal-use",Q=Hy0($);return Q.find((J)=>qk1(J)===U)??Q[0]??z}function Ck1($,Y,z){let U=_5("tar",["-xzf",$,"-C",Y],{stdio:"pipe"});if(U.status!==0)throw Error(`Failed to extract tar archive: ${U.stderr.toString()}`);return Jy0($),Wy0(Y,z,$)}function Rk1($,Y,z){let U=_5("unzip",["-q","-o",$,"-d",Y],{stdio:"pipe"});if(U.status!==0)throw Error(`Failed to extract zip archive: ${U.stderr.toString()}`);return Jy0($),Wy0(Y,z,$)}function Xy0($,Y){let z=$.replace(/^v/,"").split(".").map((Q)=>Number.parseInt(Q,10)||0),U=Y.replace(/^v/,"").split(".").map((Q)=>Number.parseInt(Q,10)||0);for(let Q=0;QI)return 1;if(J0}function Qy0($,Y,z={}){let U=_5($,Y,{cwd:z.cwd,encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(U.stdout)console.error(U.stdout.trimEnd());if(U.stderr)console.error(U.stderr.trimEnd());if(U.status!==0)throw Error(`${$} ${Y.join(" ")} failed with status ${U.status}`)}var Iy0="yunyingk/seal-use",bq="yunyingk/seal-home",Ok1="SEAL_USE_GITHUB_REPO",wk1="SEAL_HOME_GITHUB_REPO";var Zy0=m(()=>{sg0();yq();lo();$3();bo();K4();co()});async function qy0($,Y,z,U,Q){if($==="create"){let J=h(Q.options.name)??Y,I=h(Q.options.phone);if(!J||!I)throw Error("Usage: seal-use users create --name --phone [--dept ]");let K=h(Q.options.dept)??h(Q.options.departmentId);await k0("seal_user_create",z,U,{name:J,phone:I,departmentIds:K?[K]:void 0},E0(Q.options));return}if($==="reset-password"){let J=Y??h(Q.options.userId);if(!J)throw Error("Usage: seal-use users reset-password ");await k0("seal_user_reset_password",z,U,{userId:J},E0(Q.options));return}if($==="search"||$==="list"){let J=Y??h(Q.options.keyword)??h(Q.options.query)??"";await k0("seal_user_search",z,U,{keyword:J},E0(Q.options));return}if($==="get"){let J=Y??h(Q.options.userId);if(!J)throw Error("Usage: seal-use users get ");await k0("seal_user_get",z,U,{userId:J},E0(Q.options));return}if($==="delete"){let J=Y??h(Q.options.userId);if(!J)throw Error("Usage: seal-use users delete ");await k0("seal_user_delete",z,U,{userId:J},E0(Q.options));return}if($==="activate"){let J=Y??h(Q.options.userId);if(!J)throw Error("Usage: seal-use users activate ");await k0("seal_user_activate",z,U,{userId:J},E0(Q.options));return}if($==="delegation"||$==="impersonate"){let J=Y??h(Q.options.userId)??h(Q.options.phone);if(!J)throw Error("Usage: seal-use users delegation [--note ]");let I=h(Q.options.note);await k0("seal_user_delegation_create",z,U,{userIdOrPhone:J,note:I},E0(Q.options));return}throw Error(`Unknown users command: ${$??""}. Run 'seal-use help' for available commands.`)}var Vy0=m(()=>{f4();A4();K4()});import{dirname as so,join as _k1}from"node:path";import{fileURLToPath as vk1}from"node:url";function yk1($){if(!$.length)return!1;let Y=$[0]?.toLowerCase(),z=$[1]?.toLowerCase();if(Y&&gk1.has(Y))return!0;if((Y==="service"||Y==="daemon")&&z==="run")return!0;return!1}function xq($,Y={}){if(yk1($))return Oy0($,Y);let z=Fy0.then(()=>Oy0($,Y));return Fy0=z.then(()=>{return},()=>{return}),z}async function Oy0($,Y){let z=[],U=[],Q=console.log,J=console.error,I={appRoot:Y.appRoot??Ly0,entryFile:Y.entryFile??_k1(Y.appRoot??Ly0,"src","cli.ts"),launcher:Y.launcher};console.log=(...K)=>{z.push(cl(K))},console.error=(...K)=>{U.push(cl(K))};try{return await kk1($,I),{stdout:jq(z),stderr:jq(U),isError:!1,exitCode:0}}catch(K){let G=Tq(K instanceof Error?K.message:String(K)),H=xZ(K);if(U.push(G),H.nextAction&&!G.includes("Next action:"))U.push(`\uD83D\uDC49 Next action: ${H.nextAction}`);return{stdout:jq(z),stderr:jq(U),isError:!0,exitCode:H.exitCode}}finally{console.log=Q,console.error=J}}async function kk1($,Y){let z=Pq($),[U,Q,J]=z.command,I=U?.toLowerCase(),K=I?hk1.has(I):!1,G=K?"update":I;if(G==="version"||G==="v"||Boolean(z.options.version)||Boolean(z.options.v)||Boolean(z.options.V)){let Z=tg0(),q=Z?.latestVersion?R5(Z.latestVersion,dY.version):!1,V={...dY,...Z?.latestVersion?{latestVersion:Z.latestVersion,updateAvailable:q,lastCheckedAt:Z.checkedAt}:{}};if(q&&Z?.latestVersion)console.error(`\uD83D\uDCA1 发现新版本可用: v${dY.version} -> v${Z.latestVersion}`),console.error(`\uD83D\uDC49 Next action: seal-use update `);if(x0(V),eg0(Z))$y0(Y.launcher);return}let H=c_0(z);if(H.isHelp){l_0(H.target);return}if(!G||!Sk1.has(G))throw Error(`Unknown command: ${z.command.join(" ")}. Run 'seal-use help' for available commands.`);if(G==="webhook"&&(Q==="resource-pack"||Q==="pack"||Q==="material-pack")&&J==="preview"){let Z=z.command[3]??h(z.options.file)??h(z.options.input);if(!Z)throw Error("Usage: seal-use webhook resource-pack preview <资源包.zip>");await r_0(Z,fK(z.options));return}if(G==="openapi"){wg0(z);return}if(G==="mcp-config"){yo();return}if(G==="skill"){fg0(Q,J,z);return}if(G==="mcp"||G==="server"){await Vg0(Q,z);return}if(G==="probe"){await Eg0(Q,J,z);return}if(G==="doctor"){await Yg0(Q,J,z);return}if(G==="test"){await mo(Q,J,z);return}if(G==="config"){ch0(Q,J,z);return}if(G==="service"){await no(Q,Y,z);return}if(G==="stop"){await no("stop",Y,z);return}if(G==="http"||G==="serve"){await Wg0(z);return}if(K||G==="changelog"){if(K&&U!=="update")console.error(`⚠️ Notice: '${U}' is an alias for 'seal-use update'. Please use 'seal-use update' instead.`);let Z=Q?.toLowerCase(),q=G==="changelog"||Z==="changelog"||Z==="log"||Z==="history"||Z0(z.options.changelog)===!0,V=Z==="check"||Z0(z.options.check)===!0||Z0(z.options["check-only"])===!0,F=Z0(z.options["bg-save"])===!0||Z0(z.options["silent-save"])===!0,w=h(z.options.version)??h(z.options.tag)??(!q&&!V&&!F&&Q&&!Q.startsWith("-")?Q:void 0);await Ky0(Y,{checkOnly:V||F,changelogOnly:q,limit:s0(z.options.limit),force:Z0(z.options.force),targetVersion:w,repo:h(z.options.repo),bgSave:F});return}if(G==="tools"&&Q==="list"){og0();return}if(G==="corps"||G==="corp"){if(Q==="regression"||Q==="test-regression"){await mo("regression",J,z);return}await Sh0(Q,J,z);return}if(G==="rules"&&Q==="lint"&&(("file"in z.options)||("f"in z.options))){let Z;try{Z=T1(h(z.options.corp))}catch{Z={id:"local",name:"Local Workspace",source:{type:"native"}}}await ko(Q,J,null,Z,z);return}if(G==="auth"&&(Q==="extract-keys"||Q==="extract-key"||Q==="extract-hose-keys"||Q==="hose-extract-keys")){await qo(J,z);return}if(G==="auth"&&(Q==="link"||Q==="seal-link")&&(("from-link"in z.options)||J==="from-link")){await ij(Q,null,z);return}let W=T1(h(z.options.corp));if(G==="source"){await bg0(Q,W);return}if(G==="auth"){await ij(Q,W,z);return}let X=await P1(W);if(G==="users"){await qy0(Q,J,X,W,z);return}if(G==="contacts"){await dh0(Q,J,X,W,z);return}if(G==="data"){await lh0(Q,X,W,z);return}if(G==="llm"){await Zg0(Q,X,W,z);return}if(G==="permissions"){await Ng0(Q,X,W,z);return}if(G==="billing"){await ih0(Q,X,W,z);return}if(G==="webhook"||G==="webhooks"){await Cj(Q,J,X,W,z);return}if(G==="context"){await rh0(X,W,z);return}if(G==="rules"){await ko(Q,J,X,W,z);return}if(G==="approval-runs"){await s_0(Q,J,X,W,z);return}if(G==="analytics"){await t_0(Q,J,X,W,z);return}if(G==="simulation"){await yg0(Q,J,X,W,z);return}if(G==="deploy"){await ah0(Q,J,z.command[3],X,W,z);return}if(G==="preference"||G==="preferences"){await Bg0(Q,J,z.command[3],z.command[4],X,W,z);return}if(G==="tool"){await mg0(Q,X,W,z);return}throw Error(`Unknown command: ${z.command.join(" ")}. Run 'seal-use help' for available commands.`)}var Ly0,hk1,Sk1,gk1,Fy0;var So=m(()=>{i8();$3();a_0();e_0();Vo();nh0();ph0();mh0();oh0();sh0();Wo();th0();zg0();Xg0();qg0();Lg0();Mg0();Dg0();Pg0();Cg0();Rg0();co();kg0();ug0();ig0();dg0();lg0();rg0();Zy0();lo();Vy0();dl();F$();f4();A4();nl();K4();Ly0=so(so(so(vk1(import.meta.url)))),hk1=new Set(["update","upgrade","up","self-update","selfupdate"]),Sk1=new Set(["config","service","stop","http","serve","update","tools","corps","corp","tool","source","auth","users","contacts","data","llm","permissions","billing","webhook","webhooks","context","rules","approval-runs","analytics","simulation","deploy","preference","preferences","mcp","server","mcp-config","skill","openapi","probe","doctor","changelog","test"]),gk1=new Set(["http","server","web","mcp"]);Fy0=Promise.resolve()});function bk1($){let{command:Y}=Pq($),z=(Y[0]??"").toLowerCase();return{area:xk1[z]??z,actionTokens:Y.slice(1).map((U)=>U.toLowerCase())}}function wy0($){let Y,z;try{({area:Y,actionTokens:z}=bk1($))}catch{return!1}if(z.length===0&&uk1.has(Y))return!0;if(Y==="tool"){let Q=z[0];return Q!==void 0&&h_0(Q)}let U=fk1[Y];if(!U)return!1;return U.some((Q)=>{let J=Q.split(" ").filter(Boolean);if(J.length===0)return z.length===0;if(J.length>z.length)return!1;return J.every((I,K)=>I===z[K])})}var xk1,fk1,uk1;var My0=m(()=>{Bq();A4();xk1={corp:"corps",webhooks:"webhook",preferences:"preference"},fk1={corps:["list","search","get","current"],rules:["count","list","versions","version","diff","diff-one","get","search","lint","linters","pull","map"],webhook:["ready","status","list","get","resource-pack export","resource-pack preview"],"approval-runs":["summary","stats","count","export","flow","list","search","pick","bridge","get","cited-rules","document-summary","attachments","result","link","url"],simulation:["batch-records","status","wait","specifications","approval-definitions","list","get","templates","integrations"],deploy:["hosecloud requirements","hosecloud list","hosecloud get","hosecloud status"],preference:["get","thinking-depth policies list"],config:["paths","get","mode","lint"],auth:["check","diagnose","status","test","doctor","link list"],users:["search","get","delegation"],contacts:["departments","children","users","sync-time"],data:["expenses","invoices"],llm:["config","providers"],permissions:["available","configs"],billing:["status","plans","features"],analytics:["insight","risks","performance","export"],source:["config"],tools:["list"],skill:["dump","status"],service:["status","logs"],doctor:["","guide","paths","tenant","auth"],openapi:[""]},uk1=new Set(["version","v","help","changelog","mcp-config"])});var Fg0={};D8(Fg0,{tokenizeCommand:()=>kq,startServer:()=>Ey0,resolveMcpEnabled:()=>jy0,createServer:()=>Ty0,SEAL_MCP_ENABLED_ENV:()=>By0,SEAL_CLI_WRITE_TOOL_NAME:()=>cq,SEAL_CLI_TOOL_NAME:()=>JT,LEGACY_SEAL_MCP_ENABLED_ENV:()=>Py0});import{dirname as iq,resolve as Ny0}from"node:path";import{fileURLToPath as ik1}from"node:url";function jy0($=process.env[By0]??process.env[Py0]){if($===void 0)return!1;return["1","true","yes","on"].includes($.trim().toLowerCase())}function Ty0($={}){let Y=$.enableCli??!0,z=new MH({name:"seal-use",version:Z1},{capabilities:{tools:{}}});if(Y){let U=L.strictObject({command:L.string().describe("A seal-use CLI command, with or without the leading 'seal-use' or 'seal-home'.")});z.registerTool(JT,{title:"Run read-only seal-use CLI command",description:"Run a read-only seal-use CLI command and return its JSON stdout. Only commands that read tenant state without changing it are accepted here; anything that mutates tenant state, publishes configuration, mints credentials, self-updates or starts a server is "+`refused — use ${cq} for those after confirming with the user.`,inputSchema:U,annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},async({command:Q})=>Dy0(Q,{requireReadOnly:!0})),z.registerTool(cq,{title:"Run mutating seal-use CLI command",description:"Run a seal-use CLI command that changes tenant state, publishes configuration, or sends things outward (create/update/push/mark/bind/sync/deploy/delete/reset-password, rule publishing, simulation batches, self-update). Confirm the exact command with the user before calling this tool.",inputSchema:U,annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},async({command:Q})=>Dy0(Q,{requireReadOnly:!1}))}return z}async function Dy0($,Y){let z=Y.requireReadOnly?JT:cq;if(!$?.trim())return nq({stdout:"",stderr:`${z} requires a non-empty command string`,isError:!0,exitCode:2});let U;try{if(U=Jg0(kq($)),!U.length)throw Error(`${z} requires a non-empty command string`)}catch(Q){let J=xZ(Q);return nq({stdout:"",stderr:Q instanceof Error?Q.message:String(Q),isError:!0,exitCode:J.exitCode})}if(Y.requireReadOnly&&!wy0(U))return nq({stdout:"",stderr:`${JT} only runs read-only commands, and "${U.join(" ")}" is not one of them. Confirm the command with the user, then call ${cq}.`,isError:!0,exitCode:2});try{return nq(await xq(U,{appRoot:Ay0,entryFile:s3,launcher:{command:process.execPath,args:[s3,"--seal-use-cli"]}}))}catch(Q){let J=xZ(Q);return nq({stdout:"",stderr:Q instanceof Error?Q.message:String(Q),isError:!0,exitCode:J.exitCode})}}function Ey0(){let $=jy0(),Y=se(()=>Ty0({enableCli:$}));return console.error($?"seal-use MCP server running on stdio":"seal-use MCP server connected with seal_cli disabled by configuration"),Y}function nq($){return{content:[{type:"text",text:$.isError?$.stderr||$.stdout:$.stdout}],isError:$.isError}}async function nk1(){let $=await xq(process.argv.slice(3),{appRoot:Ay0,entryFile:s3,launcher:{command:process.execPath,args:[s3,"--seal-use-cli"]}});if($.stdout)process.stdout.write($.stdout);if($.stderr)process.stderr.write(`${$.stderr}${$.stderr.endsWith(` diff --git a/skills/seal-use/SKILL.md b/skills/seal-use/SKILL.md index 2c96082..3086793 100644 --- a/skills/seal-use/SKILL.md +++ b/skills/seal-use/SKILL.md @@ -46,18 +46,18 @@ metadata: 2. **图文指导获取(必须贴图)**: - **路径一:合思开放平台(推荐·永久开发者凭据)** 1. 进入「应用中心」搜索“接口”,进入「开放接口(新)」: - ![进入开放接口](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-open-platform-app-center.png) + ![进入开放接口](assets/hose-open-platform-app-center.png) 2. 点击「商品配置」: - ![点击商品配置](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-open-platform-product-config.png) + ![点击商品配置](assets/hose-open-platform-product-config.png) 3. 复制「接入账号」(`appKey`) 与「接入密码」(`appSecurity`): - ![找到接入账号和密码](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-open-platform-credentials.png) + ![找到接入账号和密码](assets/hose-open-platform-credentials.png) - **路径二:从已登录网页复制 cURL(零门槛·会话快照或自动提权)** 1. 在企业网页右键选择「检查」打开开发者工具: - ![打开检查](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-curl-open-page-check.png) + ![打开检查](assets/hose-curl-open-page-check.png) 2. 切换到「网络」-「Fetch/XHR」,刷新或点击任一列表: - ![网络Fetch/XHR](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-curl-network-fetch-xhr.png) + ![网络Fetch/XHR](assets/hose-curl-network-fetch-xhr.png) 3. 找到任一正常业务请求,右键「复制」-「以 cURL 格式复制」: - ![以cURL格式复制](file:///Users/yingqing/Code/seal-use/skills/seal-use/assets/hose-curl-copy-as-curl.png) + ![以cURL格式复制](assets/hose-curl-copy-as-curl.png) 3. **无感接入**:Agent 接收材料后自动执行 `corps add-hose`、`corps add-link` 或 `corps extract-keys --save`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 `corpId` 或 `staffId`。详阅 `references/first-time-user.md` 与 `references/enterprise-onboarding.md`。 --- @@ -104,20 +104,13 @@ metadata: ## 3. 生产规则变更安全闭环(Rule Remediation & Change Cycle) -生产环境规则修改必须遵守安全演进闭环: -`生产改草稿 -> 同步测试企业 -> 靶场模拟/回归矩阵验证 -> 生产确认发布` +生产环境规则修改遵循: +`生产改草稿 -> 同步测试企业 -> 靶场模拟/回归矩阵验证 -> 用户确认 -> 生产发布` -1. **草稿修改与规范 Diff 呈现**: - - 规则客诉修复与修改详阅 `references/customer-feedback-rule-remediation.md`; - - 必须向用户呈现清晰的修改前后对比和差异摘要,展示业务字段(适用场景、遵守程度、规则编号),隐藏内部 UUID; - - 生产修改时默认仅保存为**草稿态**,绝不直接线上生效。 -2. **一键同步测试环境**: - - 运行 `seal-use corps sync-test `,自动将草稿规则发布到绑定的测试靶场 `[Prod vN · #M -> Test vM]`,同时自动同步免配的合思测试通道。 -3. **测试靶场自动化验证**: - - 运行 `seal-use test regression --corp --samples 10` 执行自动化规则回归测试矩阵; - - 重放生产历史单据,检验决策一致率(Concordance Rate)与决策翻转(Flips),确保 `safeToPublish: true`。重放正式执行必须显式带 `--confirm`/`--yes`;`--force` 只用于明确覆盖测试绑定保护,不能替代确认。 -4. **用户授权确认与生产发布**: - - 严禁代替用户决策,只有在用户明确确认批准后,方可在生产环境正式发布。 +- 生产侧默认只改草稿,不直接生效;测试同步先用 `corps sync-test --dry-run`,正式执行必须显式确认。 +- 测试验证统一使用 `seal-use test regression` 或 `simulation`;重放正式执行必须带 `--confirm`/`--yes`。 +- 只有用户明确确认批准后,才允许在生产环境正式发布。 +- 完整命令、前置检查、Hose 隔离和失败恢复边界见 `references/staging-simulation-workflow.md`。 --- diff --git a/skills/seal-use/references/staging-simulation-workflow.md b/skills/seal-use/references/staging-simulation-workflow.md index 081432d..dc64c2a 100644 --- a/skills/seal-use/references/staging-simulation-workflow.md +++ b/skills/seal-use/references/staging-simulation-workflow.md @@ -100,7 +100,12 @@ flowchart TD ### 第三阶段:一键安全同步测试环境 (Staging Auto-Sync) -通过 `corps sync-test` 命令,一键将生产企业的全部变更投影到测试环境: +通过 `corps sync-test` 命令,将生产企业的当前草稿、偏好和知识文档投影到绑定的测试环境。该操作是多个远端 API 调用组成的**多步同步,不是一个可回滚的远端事务**: + +- `--dry-run` 只做读取和差异计算;正式执行必须带 `--yes`。 +- 生产企业不会被发布或改写为新版本,但测试企业可能在中途失败时留下部分已写入内容。 +- 测试企业已发布的版本是追加历史,当前没有删除/撤销已发布版本的 API,因此不能承诺“恢复到原版本号”。失败后应重新执行 `--dry-run`,确认差异,再重新同步;若必须恢复历史版本,需要使用 Seal 管理后台或平台侧提供的版本恢复能力。 +- 不应把 `sync-test` 描述成原子事务或保证自动 rollback;它的安全保证是生产侧不发布、测试侧有预览和显式确认。 1. **预览差异 (`--dry-run`)**: ```bash @@ -119,13 +124,13 @@ flowchart TD - 更新审核风格与偏好设置; - 对账知识库文档(覆盖更新已有文档、创建新文档、删除测试环境多余文档); - 清空测试环境旧草稿规则,灌入生产企业当前草稿规则并重算 code; - - 在测试企业自动发布语义版本(格式形如 `[Prod v22 · #1 -> Test v3]`),并保存本地规则映射快照; - **自动同步合思集成**: - 从本地 source 读入 `appKey`/`appSecurity`(兼容 `key`/`password`); - 截取企业名前缀并附加 `(Seal测)`(严格受控于 13 字符限制,例如 `钰泰半导体(Seal测)`); - 强制将审批模式设为 `assisted`; - 自动去重:若生产有多个相同 `corporationId` 的集成(如全自动与辅助),在测试环境自动合并为单条辅助集成; - **不同步至合思**:仅保存在测试环境 Seal,保证合思生产费控零改动。 + - 在测试企业自动发布语义版本(格式形如 `[Prod v22 · #1 -> Test v3]`),并保存本地规则映射快照;Hose 配置同步安排在发布之前,但前面的规则、文档或偏好写入失败仍可能留下部分测试侧变更。 3. **速查规则映射**: ```bash diff --git a/src/cli/commands/corps.ts b/src/cli/commands/corps.ts index 39c5d30..c2f45ff 100644 --- a/src/cli/commands/corps.ts +++ b/src/cli/commands/corps.ts @@ -739,7 +739,13 @@ export async function handleCorpsCommand(action: string | undefined, maybeName: throw new Error(`Failed to recode test approval rules: HTTP ${recodeResult.status}`); } - // 6. Publish new version in test enterprise + // 6. Sync HoseCloud integrations before publishing the test version. This + // keeps a Hose configuration failure from leaving a newly published + // version behind, although the overall multi-request operation remains + // non-transactional. + const hosecloudSync = await syncHosecloudIntegrationsToTest(prodCorp, testCorp, prodClient, testClient); + + // 7. Publish new version in test enterprise const published = await api.publishApprovalRuleVersion(testClient, versionName); try { savePublishedRuleVersionSnapshot(testCorp.id, published.version, createdRules); @@ -790,9 +796,6 @@ export async function handleCorpsCommand(action: string | undefined, maybeName: }); } catch {} - // 7. Sync hosecloud integrations from prod to test (hose-source corps only) - const hosecloudSync = await syncHosecloudIntegrationsToTest(prodCorp, testCorp, prodClient, testClient); - printJson({ success: true, syncedAt: new Date().toISOString(),