Clarify sync-test safety and portable skill assets

This commit is contained in:
gitea committed 2026-09-22 11:50:38 +08:00
1 parent b9533b1b66
commit e0f1724929
4 files changed
+83 -84

No files matched your search

+57 -59
View File
@@ -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;J<I;J++)if(K=Q[J],!ty0.call($,K)&&K!==z)rq($,K,{get:((G)=>Y[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<W.length;X++){let Z=W[X];if(!(Z in K))K[Z]=H[Z].bind(K)}}let Q=z?.Parent??Object;class J extends Q{}Object.defineProperty(J,"name",{value:$});function I(K){var G;let H=z?.Parent?new J:this;U(H,K),(G=H._zod).deferred??(G.deferred=[]);for(let W of H._zod.deferred)W();return H}return Object.defineProperty(I,"init",{value:U}),Object.defineProperty(I,Symbol.hasInstance,{value:(K)=>{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:()=>FrLine truncated
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;J<I;J++)if(K=Q[J],!ty0.call($,K)&&K!==z)rq($,K,{get:((G)=>Y[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<W.length;X++){let Z=W[X];if(!(Z in K))K[Z]=H[Z].bind(K)}}let Q=z?.Parent??Object;class J extends Q{}Object.defineProperty(J,"name",{value:$});function I(K){var G;let H=z?.Parent?new J:this;U(H,K),(G=H._zod).deferred??(G.deferred=[]);for(let W of H._zod.deferred)W();return H}return Object.defineProperty(I,"init",{value:U}),Object.defineProperty(I,Symbol.hasInstance,{value:(K)=>{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:()=>FrLine truncated
`)}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)?(\dLine truncated
`).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<z.length;J++){let I=$[J],K=J<U.length;if(I.issues.length){if(!K&&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,fa Line truncated
@@ -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.length<K)return U.issues.push({code:"too_small",minimum:K,inclusive:!0,input:J,inst:$,origin:"array"}),U;if(J.length>z.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<z.length;W++){let X=z[W]._zod.run({value:J[W],issues:[]},Q);if(X instanceof Promise)I.push(X.then((Z)=>{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:"unrec Line truncated
`)}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.length<K)return U.issues.push({code:"too_small",minimum:K,inclusive:!0,input:J,inst:$,origin:"array"}),U;if(J.length>z.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<z.length;W++){let X=z[W]._zod.run({value:J[W],issues:[]},Q);if(X instanceof Promise)I.push(X.then((Z)=>{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:"unrec Line truncated
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.exclusiveMinimuLine truncated
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.exclusiveMinimuLine truncated
`}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;l Line truncated
* 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<N.length)K(M,N[D]),M.push(O[++D]);return new U(M)}$._=Q;let J=new U("+");function I(O,...N){let M=[q(O[0])],D=0;while(D<N.length)M.push(J),K(M,N[D]),M.push(J,q(O[++D]));return G(M),new U(M)}$.str=I;function K(O,N){if(N instanceof U)O.push(...N._items);else if(N instanceof z)O.push(N);else O.push(X(N))}$.addCodeArg=K;function G(O){let N=1;while(N<O.length-1){if(O[N]===J){let M=H(O[N-1],O[N+1]);if(M!==void 0){O.splice(N-1,3,M);continue}O[N++]="+"}N++}}function H(O,N){if(N==='""')return O;if(O==='""')return N;if(typeof O=="string"){if(N instanceof z||O[O.length-1]!=='"')return;if(typeof N!="string")return`${O.slice(0,-1)}${N}"`;if(N[0]==='"')return O.slice(0,-1)+N.slice(1);return}if(typeof N=="string"&&N[0]==='"'&&!(O instanceof z))return`"${O}${N.slice(1)}`}function W(O,N){return N.emptyStr()?O:O.emptyStr()?N:I`${O}${N}`}$.strConcat=W;function X(O){return typeof O=="number"||typeof O=="boolean"||O===null?O:q(Array.isArray(O)?O.join(","):O)}function Z(O){return new U(q(O))}$.stringify=Z;function q(O){return JSON.stringify(O).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}$.safeStringify=q;function V(O){return typeof O=="string"&&$.IDENTIFIER.test(O)?new U(`.${O}`):Q`[${O}]`}$.getProperty=V;function F(O){if(typeof O=="string"&&$.IDENTIFIER.test(O))return new U(`${O}`);throw Error(`CodeGen: invalid export name: ${O}, use explicit $id name mapping`)}$.getEsmExportName=F;function w(O){return new U(O.toStringLine truncated
`:""},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 Line truncated
*/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<N.length)K(M,N[D]),M.push(O[++D]);return new U(M)}$._=Q;let J=new U("+");function I(O,...N){let M=[q(O[0])],D=0;while(D<N.length)M.push(J),K(M,N[D]),M.push(J,q(O[++D]));return G(M),new U(M)}$.str=I;function K(O,N){if(N instanceof U)O.push(...N._items);else if(N instanceof z)O.push(N);else O.push(X(N))}$.addCodeArg=K;function G(O){let N=1;while(N<O.length-1){if(O[N]===J){let M=H(O[N-1],O[N+1]);if(M!==void 0){O.splice(N-1,3,M);continue}O[N++]="+"}N++}}function H(O,N){if(N==='""')return O;if(O==='""')return N;if(typeof O=="string"){if(N instanceof z||O[O.length-1]!=='"')return;if(typeof N!="string")return`${O.slice(0,-1)}${N}"`;if(N[0]==='"')return O.slice(0,-1)+N.slice(1);return}if(typeof N=="string"&&N[0]==='"'&&!(O instanceof z))return`"${O}${N.slice(1)}`}function W(O,N){return N.emptyStr()?O:O.emptyStr()?N:I`${O}${N}`}$.strConcat=W;function X(O){return typeof O=="number"||typeof O=="boolean"||O===null?O:q(Array.isArray(O)?O.join(","):O)}function Z(O){return new U(q(O))}$.stringify=Z;function q(O){return JSON.stringify(O).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}$.safeStringify=q;function V(O){return typeof O=="string"&&$.IDENTIFIER.test(O)?new U(`.${O}`):Q`[${O}]`}$.getProperty=V;function F(O){if(typeof O=="string"&&$.IDENTIFIER.test(O))return new U(`${O}`);throw Error(`CodeGen: invalid export name: ${O}, use explicit $id name mapping`)}$.getEsmExportName=F;function w(O){return new U(O.toStringLine truncated
`:""},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 Line truncated
|| (${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) Line truncated
|| ${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) Line truncated
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) Line truncated
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) Line truncated
\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<this.dirRecords.length;Y++)this.push({data:this.dirRecords[Y],meta:{percent:100}});var z=this.bytesWritten-$,U=dr0(this.dirRecords.length,z,$,this.zipComment,this.encodeFileName);this.push({data:U,meta:{percent:100}})};Z5.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};Z5.prototype.registerPrevious=function($){this._sources.push($);var Y=this;return $.on("data",function(z){Y.processChunk(z)}),$.on("end",function(){if(Y.closedSource(Y.previous.streamInfo),Y._sources.length)Y.prepareNextSource();else Y.end()}),$.on("error",function(z){Y.error(z)}),this};Z5.prototype.resume=function(){if(!DJ.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};Z5.prototype.error=function($){var Y=this._sources;if(!DJ.prototype.error.call(this,$))return!1;for(var z=0;z<Y.length;z++)try{Y[z].error($)}catch(U){}return!0};Z5.prototype.lock=function(){DJ.prototype.lock.call(this);var $=this._sources;for(var Y=0;Y<$.length;Y++)$[Y].lock()};$90.exports=Z5});var z90=E((sr0)=>{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.dosPermission Line truncated
`)}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("</"),Y.push($),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<U){var I=$[z];if(Y(I,z,$))J[Q++]=I}return J}function N91($,Y){var z=-1,U=Y.length,Q=$.length;while(++z<U)$[Q+z]=Y[z];return $}function D91($,Y){var z=-1,U=$==null?0:$.length;while(++z<U)if(Y($[z],z,$))return!0;return!1}function A91($,Y){var z=-1,U=Array($);while(++z<$)U[z]=Y(z);return U}function B91($){return function(Y){return $(Y)}}function P91($,Y){return $.has(Y)}function j91($,Y){return $==null?void 0:$[Y]}function T91($){var Y=-1,z=Array($.size);return $.forEach(function(U,Q){z[++Y]=[Q,U]}),z}function E91($,Y){return function(z){return $(Y(z))}}function C91($){var Y=-1,z=Array($.size);return $.forEach(function(U){z[++Y]=U}),z}var R91=Array.prototype,_91=Function.prototype,mN=Object.prototype,Vf=V3["__core-js_shared__"],$K0=_91.toString,X9=mN.hasOwnProperty,gI0=function(){var $=/[^.]+$/.exec(Vf&&Vf.keys&&Vf.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),YK0=mN.toString,v91=RegExp("^"+$K0.call(X9).replace(L91,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yI0=eI0?V3.Buffer:void 0,nN=V3.Symbol,kI0=V3.Uint8Array,zK0=mN.propertyIsEnumerable,h91=R91.splice,Az=nN?nN.toStringTag:void 0,xI0=Object.getOwnPropertySymbols,S91=yI0?yI0.isBuffer:void 0,g91=E91(Object.keys,Object),wf=dJ(V3,"DataView"),nW=dJ(V3,"Map"),Mf=dJ(V3,"Promise"),Nf=dJ(V3,"Set"),Df=dJ(V3,"WeakMap"),cW=dJ(Object,"create"),y91=jz(wf),k91=jz(nW),x91=jz(Mf),f91=jz(Nf),u91=jz(Df),fI0=nN?nN.prototype:void 0,Lf=fI0?fI0.valueOf:void 0;function Bz($){var Y=-1,z=$==null?0:$.length;this.clear();while(++Y<z){var U=$[Y];this.set(U[0],U[1])}}function b91(){this.__data__=cW?cW(null):{},this.size=0}function i91($){var Y=this.has($)&&delete this.__data__[$];return this.size-=Y?1:0,Y}function n91($){var Y=this.__data Line truncated
]`;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){O Line truncated
`||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(){re Line truncated
%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<i;x++)n=n.replace(/\)[+*?]?/,"");b=n;let U0=b===""&&Y!==Mu?"(?:$|\\/)":"";U=T+C+b+U0+k}if(U!==""&&Q)U="(?=.)"+U;if(D)U=O()+U;if(Y===Mu)return[U,Q];if(z.nocase&&!Q)Q=$.toUpperCase()!==$.toLowerCase();if(!Q)return LU1($);let P=z.nocase?"i":"";try{return Object.assign(new RegExp("^"+U+"$",P),{_glob:$,_src:U})}catch(j){return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let $=this.set;if(!$.length)return this.regexp=!1,this.regexp;let Y=this.options,z=Y.noglobstar?wu:Y.dot?XU1:ZU1,U=Y.nocase?"i":"",Q=$.map((J)=>{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<U.length;J++){let I=U[J],K=$;if(z.matchBase&&I.length===1)K=[Q];if(this.matchOne(K,I,Y)){if(z.flipNegate)return!0;return!this.negate}}if(z.flipNegate)return!1;return this.negate}static defaults($){return W$.defaults($).Minimatch}}W$.Minimatch=aW});var sH0=E((As1,rH0)=>{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 Line truncated
`,o);o=O0===-1?f.length:O0}else if(K0!==-1&&f[o]==="/"&&f[o+1]==="*"){let O0=f.indexOf("*/",o);if(O0!==-1)o=O0+2,K0=f.indexOf("*/",o);else c+=f[o],o++}else c+=f[o],o++;return c}function n0(f){let c=i0(f.toString()),o=c.match(r);if(!o)o=c.match(H0);if(!o)throw Error(`could not parse args in autoInject
`}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(){re Line truncated
%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<i;x++)n=n.replace(/\)[+*?]?/,"");b=n;let U0=b===""&&Y!==Mu?"(?:$|\\/)":"";U=T+C+b+U0+k}if(U!==""&&Q)U="(?=.)"+U;if(D)U=O()+U;if(Y===Mu)return[U,Q];if(z.nocase&&!Q)Q=$.toUpperCase()!==$.toLowerCase();if(!Q)return LU1($);let P=z.nocase?"i":"";try{return Object.assign(new RegExp("^"+U+"$",P),{_glob:$,_src:U})}catch(j){return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let $=this.set;if(!$.length)return this.regexp=!1,this.regexp;let Y=this.options,z=Y.noglobstar?wu:Y.dot?XU1:ZU1,U=Y.nocase?"i":"",Q=$.map((J)=>{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<U.length;J++){let I=U[J],K=$;if(z.matchBase&&I.length===1)K=[Q];if(this.matchOne(K,I,Y)){if(z.flipNegate)return!0;return!this.negate}}if(z.flipNegate)return!1;return this.negate}static defaults($){return W$.defaults($).Minimatch}}W$.Minimatch=aW});var sH0=E((As1,rH0)=>{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 Line truncated
`,o);o=O0===-1?f.length:O0}else if(K0!==-1&&f[o]==="/"&&f[o+1]==="*"){let O0=f.indexOf("*/",o);if(O0!==-1)o=O0+2,K0=f.indexOf("*/",o);else c+=f[o],o++}else c+=f[o],o++;return c}function n0(f){let c=i0(f.toString()),o=c.match(s);if(!o)o=c.match(H0);if(!o)throw Error(`could not parse args in autoInject
Source:
`+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;n1<g4;n1++){var h6=G1[n1],D$=D0.indexOf(h6);if(D$===0)D0.shift();else if(D$>0)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<l1.concurrency&&l1._tasks.length){var G1=[],$1=[],H1=l1._tasks.length;if(l1.payload)H1=Math.min(H1,l1.payload);for(var n1=0;n1<H1;n1++){var g4=l1._tasks.shift();G1.push(g4),D0.push(g4),$1.push(g4.data)}if(O0+=1,l1._tasks.length===0)x1("empty");if(O0===l1.concurrency)x1("saturated");var h6=S(N$(G1));K0($1,h6)}oK=!1},length(){return l1._tasks.length},running(){return O0},workersList(){return D0},idle(){return l1._tasks.length+O0===0},pause(){l1.paused=!0},resume(){if(l1.paused===!1)return;l1.paused=!1,H(l1.process)}};return Object.defineProperties(l1,{saturated:{writable:!1,value:BY("saturated")},unsaturated:{writable:!1,value:BY("unsaturated")},empty:{writable:!1,value:BY("empty")},drain:{writable:!1,value:BY("drain")},error:{writable:!1,value:BY("error")}}),l1}function A0(f,c){return b1(f,1,c)}function Q0(f,c,o){return b1(f,c,o)}function B(f,c,o,K0){K0=j(K0);var O0=w(o);return $0(f,(D0,P0,j0)=>{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 J Line truncated
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;Y<d4[a6].length;++Y)if(d4[a6][Y].length>2)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,t Line truncated
`+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;n1<g4;n1++){var h6=G1[n1],D$=D0.indexOf(h6);if(D$===0)D0.shift();else if(D$>0)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<l1.concurrency&&l1._tasks.length){var G1=[],$1=[],H1=l1._tasks.length;if(l1.payload)H1=Math.min(H1,l1.payload);for(var n1=0;n1<H1;n1++){var g4=l1._tasks.shift();G1.push(g4),D0.push(g4),$1.push(g4.data)}if(O0+=1,l1._tasks.length===0)x1("empty");if(O0===l1.concurrency)x1("saturated");var h6=S(N$(G1));K0($1,h6)}oK=!1},length(){return l1._tasks.length},running(){return O0},workersList(){return D0},idle(){return l1._tasks.length+O0===0},pause(){l1.paused=!0},resume(){if(l1.paused===!1)return;l1.paused=!1,H(l1.process)}};return Object.defineProperties(l1,{saturated:{writable:!1,value:BY("saturated")},unsaturated:{writable:!1,value:BY("unsaturated")},empty:{writable:!1,value:BY("empty")},drain:{writable:!1,value:BY("drain")},error:{writable:!1,value:BY("error")}}),l1}function A0(f,c){return b1(f,1,c)}function Q0(f,c,o){return b1(f,c,o)}function B(f,c,o,K0){K0=j(K0);var O0=w(o);return $0(f,(D0,P0,j0)=>{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 J Line truncated
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;Y<d4[a6].length;++Y)if(d4[a6][Y].length>2)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,t Line truncated
* normalize-path <https://github.com/jonschlinkert/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(++U<Q)J[U]=z[Y+U];U=-1;var I=Array(Y+1);while(++U<Y)I[U]=z[U];return I[Y]=J,aW0($,this,I)}}function aQ1($,Y,z,U){z||(z={});var Q=-1,J=Y.length;while(++Q<J){var I=Y[Q],K=U?U(z[I],$[I],I,z,$):void 0;rQ1(z,I,K===void 0?$[I]:K)}return z}function tQ1($){return eW0(function(Y,z){var U=-1,Q=z.length,J=Q>1?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<Q){var K=z[U];if(K)$(Y,K,U,J)}return Y})}function $X0($,Y){return Y=Y==null?sW0:Y,!!Y&&(typeof $=="number"||pQ1.test($))&&($>-1&&$%1==0&&$<Y)}function eQ1($,Y,z){if(!ru(z))return!1;var U=typeof Y;if(U=="number"?ou(z)&&$X0(Y,z.length):U=="string"&&(Y in z))return lu(z[Y],$);return!1}function $J1($){var Y=$&&$.constructor,z=typeof Y=="function"&&Y.prototype||KX;return $===z}function YJ1($){var Y=[];if($!=null)for(var z in Object($))Y.push(z);return Y}function lu($,Y){return $===Y||$!==$&&Y!==Y}function zJ1($){return QJ1($)&&GX.call($,"callee")&&(!mQ1.call($,"callee")||tW0.call($)==iQ1)}var UJ1=Array.isArray;function ou($){return $!=null&&IJ1($.length)&&!JJ1($)}function QJ1($){return KJ1($)&&ou($)}function JJ1($){var Y=ru($)?tW0.call($):"";return Y==nQ1||Y==cQ1}function IJ1($){return typeof $=="number"&&$>-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._readabl Line truncated
%s`,P,P,N,U);var j=N.type==="*"?kb:N.type==="?"?yb:"\\"+N.type;Q=!0,U=U.slice(0,N.reStart)+j+"\\("+P}if(V(),J)U+="\\\\";var A=!1;switch(U.charAt(0)){case"[":case".":case"(":A=!0}for(var T=K.length-1;T>-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<n;F++)U0=U0.replace(/\)[+*?]?/,"");i=U0;var x="";if(i===""&&Y!==QA)x="$";var d=b+k+i+x+S;U=d}if(U!==""&&Q)U="(?=.)"+U;if(A)U=Z+U;if(Y===QA)return[U,Q];if(!Q)return SH1($);var t=z.nocase?"i":"";try{var e=new RegExp("^"+U+"$",t)}catch(y){return new RegExp("$.")}return e._glob=$,e._src=U,e}X$.makeRe=function($,Y){return new L6($,Y||{}).makeRe()};L6.prototype.makeRe=hH1;function hH1(){if(this.regexp||this.regexp===!1)return this.regexp;var $=this.set;if(!$.length)return this.regexp=!1,this.regexp;var Y=this.options,z=Y.noglobstar?kb:Y.dot?PH1:jH1,U=Y.nocase?"i":"",Q=$.map(function(J){return J.map(function(I){return I===uz?z:typeof I==="string"?gH1(I):I._src}).join("\\/")}).join("|");if(Q="^(?:"+Q+")$",this.negate)Q="^(?!"+Q+").*$";try{this.regexp=new RegExp(Q,U)}catch(J){this.regexp=!1}return this.regexp}X$.match=function($,Y,z){z=z||{};var U=new L6(Y,z);if($=$.filter(function(Q){return U.match(Q)}),U.options.nonull&&!$.length)$.push(Y);return $};L6.prototype.match=function(Y,z){if(typeof z>"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<Q.length;I++){var K=Q[I],G=Y;if(U.matchBase&&K.length===1)G=[J];var H=this.matchOne(G,K,z);if(H){if(U.flipNegate)return!0;return!this.negate}}if(U.flipNegate)return!1;return this.negate};L6.prototype.matchOne=function($,Y,z){if(Y.indexOf(uz)!==-1)return this._matchGlobstar($,Y,z,0,0);return this._matchOne($,Y,z,0,0)};L6.prototype._matchGlobstar=function($,Y,z,U,Q){var J,I=-1;for(J=Q;J<Y.length;J++)if(Y[J]===uz){I=J;break}var K=-1;for(J=Y.length-1;J>=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<H.length;D++){var P=H[D];if(P===uz)M.push(N),O=[[],0],w.push(O);else O[0].push(P),N++}var j=w.length-1,A=$.length-Z;for(var T=0;T<w.length;T++)w[T][1]=A-(M[j--]+w[T][0].length);return!!this._matchGlobStarBodySections($,w,U,0,z,0,!!Z)};L6.prototype._matchGlobStarBodySections=function($,Y,z,U,Q,J,I){var K=Y[U];if(!K){for(var G=z;G<$.length;G++){I=!0;var H=$[G];if(H==="."||H===".."||!this.options.dot&&H.charAt(0)===".")return!1}return I}var W=K[0],X=K[1];while(z<=X){var Z=this._matchOne($.slice(0,z+W.length),W,Q,z,0);if(Z&&J<this.maxGlobstarRecursion){var q=this._matchGlobStarBodySections($,Y,z+W.length,U+1,Q,J+1,I);if(q!==!1)return q}var H=$[z];if(H==="."||H===".."||!this.options.dot&&H.charAt(0)===".")return!1;z++}return Q||null};L6.prototype._matchOne=function($,Y,z,U,Q){var J,I,K,G;for(J=U,I=Q,K=$.length,G=Y.length;J<K&&I<G;J++,I++){this.debug("matchOne loop");var H=Y[I],W=$[J];if(this.debug(Y,H,W),H===!1||H===uz)return!1;var X;if(typeof H==="string")X=W===H,this.debug("string match",H,W,X);else X=W.match(H),this.debug("pattern match",H,W,X);if(!X)return!1}if(J===K&&I===G)return!0;else if(J===K)return z;else if(I===G)return J===K-1&&$[J]==="";throw Error("wtf?")};function SH1($){return $.replace(/\\(.)/g,"$1")}function gH1($){return $.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var GA=E((Ka1,KA)=>{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{matche Line truncated
*/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(++U<Q)J[U]=z[Y+U];U=-1;var I=Array(Y+1);while(++U<Y)I[U]=z[U];return I[Y]=J,aW0($,this,I)}}function aQ1($,Y,z,U){z||(z={});var Q=-1,J=Y.length;while(++Q<J){var I=Y[Q],K=U?U(z[I],$[I],I,z,$):void 0;rQ1(z,I,K===void 0?$[I]:K)}return z}function tQ1($){return eW0(function(Y,z){var U=-1,Q=z.length,J=Q>1?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<Q){var K=z[U];if(K)$(Y,K,U,J)}return Y})}function $X0($,Y){return Y=Y==null?sW0:Y,!!Y&&(typeof $=="number"||pQ1.test($))&&($>-1&&$%1==0&&$<Y)}function eQ1($,Y,z){if(!ru(z))return!1;var U=typeof Y;if(U=="number"?ou(z)&&$X0(Y,z.length):U=="string"&&(Y in z))return lu(z[Y],$);return!1}function $J1($){var Y=$&&$.constructor,z=typeof Y=="function"&&Y.prototype||KX;return $===z}function YJ1($){var Y=[];if($!=null)for(var z in Object($))Y.push(z);return Y}function lu($,Y){return $===Y||$!==$&&Y!==Y}function zJ1($){return QJ1($)&&GX.call($,"callee")&&(!mQ1.call($,"callee")||tW0.call($)==iQ1)}var UJ1=Array.isArray;function ou($){return $!=null&&IJ1($.length)&&!JJ1($)}function QJ1($){return KJ1($)&&ou($)}function JJ1($){var Y=ru($)?tW0.call($):"";return Y==nQ1||Y==cQ1}function IJ1($){return typeof $=="number"&&$>-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._readabl Line truncated
%s`,P,P,N,U);var j=N.type==="*"?kb:N.type==="?"?yb:"\\"+N.type;Q=!0,U=U.slice(0,N.reStart)+j+"\\("+P}if(V(),J)U+="\\\\";var A=!1;switch(U.charAt(0)){case"[":case".":case"(":A=!0}for(var T=K.length-1;T>-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<n;F++)U0=U0.replace(/\)[+*?]?/,"");i=U0;var x="";if(i===""&&Y!==QA)x="$";var d=b+k+i+x+S;U=d}if(U!==""&&Q)U="(?=.)"+U;if(A)U=Z+U;if(Y===QA)return[U,Q];if(!Q)return SH1($);var t=z.nocase?"i":"";try{var e=new RegExp("^"+U+"$",t)}catch(g){return new RegExp("$.")}return e._glob=$,e._src=U,e}X$.makeRe=function($,Y){return new L6($,Y||{}).makeRe()};L6.prototype.makeRe=hH1;function hH1(){if(this.regexp||this.regexp===!1)return this.regexp;var $=this.set;if(!$.length)return this.regexp=!1,this.regexp;var Y=this.options,z=Y.noglobstar?kb:Y.dot?PH1:jH1,U=Y.nocase?"i":"",Q=$.map(function(J){return J.map(function(I){return I===uz?z:typeof I==="string"?gH1(I):I._src}).join("\\/")}).join("|");if(Q="^(?:"+Q+")$",this.negate)Q="^(?!"+Q+").*$";try{this.regexp=new RegExp(Q,U)}catch(J){this.regexp=!1}return this.regexp}X$.match=function($,Y,z){z=z||{};var U=new L6(Y,z);if($=$.filter(function(Q){return U.match(Q)}),U.options.nonull&&!$.length)$.push(Y);return $};L6.prototype.match=function(Y,z){if(typeof z>"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<Q.length;I++){var K=Q[I],G=Y;if(U.matchBase&&K.length===1)G=[J];var H=this.matchOne(G,K,z);if(H){if(U.flipNegate)return!0;return!this.negate}}if(U.flipNegate)return!1;return this.negate};L6.prototype.matchOne=function($,Y,z){if(Y.indexOf(uz)!==-1)return this._matchGlobstar($,Y,z,0,0);return this._matchOne($,Y,z,0,0)};L6.prototype._matchGlobstar=function($,Y,z,U,Q){var J,I=-1;for(J=Q;J<Y.length;J++)if(Y[J]===uz){I=J;break}var K=-1;for(J=Y.length-1;J>=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<H.length;D++){var P=H[D];if(P===uz)M.push(N),O=[[],0],w.push(O);else O[0].push(P),N++}var j=w.length-1,A=$.length-Z;for(var T=0;T<w.length;T++)w[T][1]=A-(M[j--]+w[T][0].length);return!!this._matchGlobStarBodySections($,w,U,0,z,0,!!Z)};L6.prototype._matchGlobStarBodySections=function($,Y,z,U,Q,J,I){var K=Y[U];if(!K){for(var G=z;G<$.length;G++){I=!0;var H=$[G];if(H==="."||H===".."||!this.options.dot&&H.charAt(0)===".")return!1}return I}var W=K[0],X=K[1];while(z<=X){var Z=this._matchOne($.slice(0,z+W.length),W,Q,z,0);if(Z&&J<this.maxGlobstarRecursion){var q=this._matchGlobStarBodySections($,Y,z+W.length,U+1,Q,J+1,I);if(q!==!1)return q}var H=$[z];if(H==="."||H===".."||!this.options.dot&&H.charAt(0)===".")return!1;z++}return Q||null};L6.prototype._matchOne=function($,Y,z,U,Q){var J,I,K,G;for(J=U,I=Q,K=$.length,G=Y.length;J<K&&I<G;J++,I++){this.debug("matchOne loop");var H=Y[I],W=$[J];if(this.debug(Y,H,W),H===!1||H===uz)return!1;var X;if(typeof H==="string")X=W===H,this.debug("string match",H,W,X);else X=W.match(H),this.debug("pattern match",H,W,X);if(!X)return!1}if(J===K&&I===G)return!0;else if(J===K)return z;else if(I===G)return J===K-1&&$[J]==="";throw Error("wtf?")};function SH1($){return $.replace(/\\(.)/g,"$1")}function gH1($){return $.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var GA=E((Ka1,KA)=>{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{matche Line truncated
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;U<z;U++)this._process(this.minimatch.set[U],U,!1);this._finish()}T6.prototype._finish=function(){if(mZ0.ok(this instanceof T6),this.realpath){var $=this;this.matches.forEach(function(Y,z){var U=$.matches[z]=Object.create(null);for(var Q in Y)try{Q=$._makeAbs(Q);var J=tH1.realpathSync(Q,$.realpathCache);U[J]=!0}catch(I){if(I.syscall==="stat")U[$._makeAbs(Q)]=!0;else throw I}})}bz.finish(this)};T6.prototype._process=function($,Y,z){mZ0.ok(this instanceof T6);var U=0;while(typeof $[U]==="string")U++;var Q;switch(U){case $.length:this._processSimple($.join("/"),Y);return;case 0:Q=null;break;default:Q=$.slice(0,U).join("/");break}var J=$.slice(U),I;if(Q===null)I=".";else if(HA(Q)||HA($.map(function(H){return typeof H==="string"?H:"[*]"}).join("/"))){if(!Q||!HA(Q))Q="/"+Q;I=Q}else I=Q;var K=this._makeAbs(I);if($W1(this,I))return;var G=J[0]===dZ0.GLOBSTAR;if(G)this._processGlobStar(Q,I,K,J,Y,z);else this._processReaddir(Q,I,K,J,Y,z)};T6.prototype._processReaddir=function($,Y,z,U,Q,J){var I=this._readdir(z,J);if(!I)return;var K=U[0],G=!!this.minimatch.negate,H=K._glob,W=this.dot||H.charAt(0)===".",X=[];for(var Z=0;Z<I.length;Z++){var q=I[Z];if(q.charAt(0)!=="."||W){var V;if(G&&!$)V=!q.match(K);else V=q.match(K);if(V)X.push(q)}}var F=X.length;if(F===0)return;if(U.length===1&&!this.mark&&!this.stat){if(!this.matches[Q])this.matches[Q]=Object.create(null);for(var Z=0;Z<F;Z++){var q=X[Z];if($)if($.slice(-1)!=="/")q=$+"/"+q;else q=$+q;if(q.charAt(0)==="/"&&!this.nomount)q=ub.join(this.root,q);this._emitMatch(Q,q)}return}U.shift();for(var Z=0;Z<F;Z++){var q=X[Z],w;if($)w=[$,q];else w=[q];this._process(w.concat(U),Q,J)}};T6.prototype._emitMatch=function($,Y){if(YW1(this,Y))return;var z=this._makeAbs(Y);if(this.mark)Y=this._mark(Y);if(this.absolute)Y=z;if(this.matches[$][Y])return;if(this.nodir){var U=this.cache[z];if(U==="DIR"||Array.isArray(U))return}if(this.matches[$][Y]=!0,this.stat)this._stat(Y)};T6.prototype._readdirInGlobStar=function($){if(this.follow)return this._readdir($,!1);var Y,z,U;try{z=this.fs.lstatSync($)}catch(J){if(J.code==="ENOENT")return null}var Q=z&&z.isSymbolicLink();if(this.symlinks[$]=Q,!Q&&z&&!z.isDirectory())this.cache[$]="FILE";else Y=this._readdir($,!1);return Y};T6.prototype._readdir=function($,Y){var z;if(Y&&!bb(this.symlinks,$))return this._readdirInGlobStar($);if(bb(this.cache,$)){var U=this.cache[$];if(!U||U==="FILE")return null;if(Array.isArray(U))return U}try{return this._readdirEntries($,this.fs.readdirSync($))}catch(Q){return this._readdirError($,Q),null}};T6.prototype._readdirEntries=function($,Y){if(!this.mark&&!this.stat)for(var z=0;z<Y.length;z++){var U=Y[z];if($==="/")U=$+U;else U=$+"/"+U;this.cache[U]=!0}return this.cache[$]=Y,Y};T6.prototype._readdirError=function($,Y){switch(Y.code){case"ENOTSUP":case"ENOTDIR":var z=this._makeAbs($);if(this.cache[z]="FILE",z===this.cwdAbs){var U=Error(Y.code+" invalid cwd "+this.cwd);throw U.path=this.cwd,U.code=Y.code,U}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs($)]=!1;break;default:if(this.cache[this._makeAbs($)]=!1,this.strict)throw Y;if(!this.silent)console.error("glob error",Y);break}};T6.prototype._processGlobStar=function($,Y,z,U,Q,J){var I=this._readdir(z,J);if(!I)return;var K=U.slice(1),G=$?[$]:[],H=G.concat(K);this._process(H,Q,!1);var W=I.length,X=this.symlinks[z];if(X&&J)return;for(var Z=0;Z<W;Z++){var q=I[Z];if(q.charAt(0)==="."&&!this.dot)continue;var V=G.concat(I[Z],K);this._process(V,Q,!0);var F=G.concat(I[Z],U);this._process(F,Q,!0)}};T6.prototype._processSimple=function($,Y){var z=this._stat($);if(!this.matches[Y])this.matches[Y]=Object.create(null);if(!z)return;if($&&HA($)&&!this.nomount){var U=/[\/\\]$/.test($);if($.charAt(0)==="/")$=ub.join(this.root,$);else if($=ub.resolve(this.root,$),U)$+="/"}if(process.platform==="win32")$=$.replace(/\\/g,"/");this._emitMatch(Y,$)};T6.prototype._stat=function($){var Y=this._makeAbs($),z=$.slice(-1)==="/";if($.length>this.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;f Line truncated
`);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<this.length;++z){var U=this[z]===this?"[Circular AggregateError]":this[z]+"",Q=U.split(`
`);for(var J=0;J<Q.length;++J)Q[J]=$+Q[J];U=Q.join(`
`),Y+=U+`
`}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<W;++V){var F=z(H[V],X);if(F instanceof $)F=F._target(),q=F._bitField;else q=null;if(Z){if(q!==null)F.suppressUnhandledRejections()}else if(q!==null)if((q&50397184)===0)F._proxy(this,V),this._values[V]=F;else if((q&33554432)!==0)Z=this._promiseFulfilled(F._value(),V);else if((q&16777216)!==0)Z=this._promiseRejected(F._reason(),V);else Z=this._promiseCancelled(V);else Z=this._promiseFulfilled(F,V)}if(!Z)X._setAsyncGuaranteed()},G.prototype._isResolved=function(){return this._values===null},G.prototype._resolve=function(H){this._values=null,this._promise._fulfill(H)},G.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},G.prototype._reject=function(H){this._values=null,this._promise._rejectCallback(H,!1)},G.prototype._promiseFulfilled=function(H,W){this._values[W]=H;var X=++this._totalResolved;if(X>=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<H.length;++W)if(H[W]instanceof $)H[W].cancel()},G.prototype.shouldCopyValues=function(){return!0},G.prototype.getActualLength=function(H){return H},G}});var UO0=E((yt1,zO0)=>{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.deactivateLong Line truncated
`}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<W;++V){var F=z(H[V],X);if(F instanceof $)F=F._target(),q=F._bitField;else q=null;if(Z){if(q!==null)F.suppressUnhandledRejections()}else if(q!==null)if((q&50397184)===0)F._proxy(this,V),this._values[V]=F;else if((q&33554432)!==0)Z=this._promiseFulfilled(F._value(),V);else if((q&16777216)!==0)Z=this._promiseRejected(F._reason(),V);else Z=this._promiseCancelled(V);else Z=this._promiseFulfilled(F,V)}if(!Z)X._setAsyncGuaranteed()},G.prototype._isResolved=function(){return this._values===null},G.prototype._resolve=function(H){this._values=null,this._promise._fulfill(H)},G.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},G.prototype._reject=function(H){this._values=null,this._promise._rejectCallback(H,!1)},G.prototype._promiseFulfilled=function(H,W){this._values[W]=H;var X=++this._totalResolved;if(X>=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<H.length;++W)if(H[W]instanceof $)H[W].cancel()},G.prototype.shouldCopyValues=function(){return!0},G.prototype.getActualLength=function(H){return H},G}});var UO0=E((yt1,zO0)=>{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.deactivateLong Line truncated
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;B0<q0.length;++B0)if(q0[B0]===U1){if(B0>0)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;B0<q0.length;++B0)if(q0[B0]===U1){if(B0>0)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<B.length-1;++v)B[v].push("From previous event:"),B[v]=B[v].join(`
`);if(v<B.length)B[v]=B[v].join(`
`);return Q0+`
`+B.join(`
`)}function N0(Q0){for(var B=0;B<Q0.length;++B)if(Q0[B].length===0||B+1<Q0.length&&Q0[B][0]===Q0[B+1][0])Q0.splice(B,1),B--}function T0(Q0){var B=Q0[0];for(var v=1;v<Q0.length;++v){var u=Q0[v],s=B.length-1,X0=B[s],J0=-1;for(var q0=u.length-1;q0>=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;v<Q0.length;++v){var u=Q0[v],s=u===" (No stack trace)"||Z.test(u),X0=s&&i0(u);if(s&&!X0){if(V&&u.charAt(0)!==" ")u=" "+u;B.push(u)}}return B}function G0(Q0){var B=Q0.stack.replace(/\s+$/g,"").split(`
`);for(var v=0;v<B.length;++v){var u=B[v];if(u===" (No stack trace)"||Z.test(u))break}if(v>0&&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<B)return Q0;return Q0.substr(0,B-3)+"..."}function b0(){return typeof b1==="function"}var i0=function(){return!1},n0=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function w1(Q0){var B=Q0.match(n0);if(B)return{fileName:B[1],line:parseInt(B[2],10)}}function k1(Q0,B){if(!b0())return;var v=Q0.stack.split(`
`)}function N0(Q0){for(var B=0;B<Q0.length;++B)if(Q0[B].length===0||B+1<Q0.length&&Q0[B][0]===Q0[B+1][0])Q0.splice(B,1),B--}function T0(Q0){var B=Q0[0];for(var v=1;v<Q0.length;++v){var u=Q0[v],a=B.length-1,X0=B[a],J0=-1;for(var q0=u.length-1;q0>=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;v<Q0.length;++v){var u=Q0[v],a=u===" (No stack trace)"||Z.test(u),X0=a&&i0(u);if(a&&!X0){if(V&&u.charAt(0)!==" ")u=" "+u;B.push(u)}}return B}function G0(Q0){var B=Q0.stack.replace(/\s+$/g,"").split(`
`);for(var v=0;v<B.length;++v){var u=B[v];if(u===" (No stack trace)"||Z.test(u))break}if(v>0&&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<B)return Q0;return Q0.substr(0,B-3)+"..."}function b0(){return typeof b1==="function"}var i0=function(){return!1},n0=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function w1(Q0){var B=Q0.match(n0);if(B)return{fileName:B[1],line:parseInt(B[2],10)}}function k1(Q0,B){if(!b0())return;var v=Q0.stack.split(`
`),u=B.stack.split(`
`),s=-1,X0=-1,J0,q0;for(var w0=0;w0<v.length;++w0){var B0=w1(v[w0]);if(B0){J0=B0.fileName,s=B0.line;break}}for(var w0=0;w0<u.length;++w0){var B0=w1(u[w0]);if(B0){q0=B0.fileName,X0=B0.line;break}}if(s<0||X0<0||!J0||!q0||J0!==q0||s>=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;u<Q0;++u){var J0=B[u].stack,q0=v[J0];if(q0!==void 0&&q0!==u){if(q0>0)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<Q0-1)w0._parent=B[q0+1],w0._parent.uncycle(),w0._length=w0._parent._length+1;else w0._parent=void 0,w0._length=1;var B0=w0._length+1;for(var r0=u-2;r0>=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<I.length;++X){var Z=I[X];if(Z===Error||Z!=null&&Z.prototype instanceof Error){if(H instanceof Z)return U(K).call(W,H)}else if(typeof Z==="function"){var q=U(Z).call(W,H);if(q===Q)return q;else if(q)return U(K).call(W,H)}else if(Y.isObject(H)){var V=z(Z);for(var F=0;F<V.length;++F){var w=V[F];if(Z[w]!=H[w])continue $}return U(K).call(W,H)}}return $}}return J}});var Mn=E((ut1,ZO0)=>{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<z.length;++U){var Q=z[U];if(!XL1.test(Q))Y[Q]=$[Q]}return Y}return WO0.markAsOriginatingFromRejection($),$}function qL1($,Y){return function(z,U){if($===null)return;if(z){var Q=ZL1(KL1(z));$._attachExtraTrace(Q),$._reject(Q)}else if(!Y)$._fulfill(U);else{var J=arguments.length,I=Array(Math.max(J-1,0));for(var K=1;K<J;++K)I[K-1]=arguments[K];$._fulfill(I)}$=null}}ZO0.exports=qL1});var VO0=E((bt1,qO0)=>{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,voi Line truncated
`),a=-1,X0=-1,J0,q0;for(var w0=0;w0<v.length;++w0){var B0=w1(v[w0]);if(B0){J0=B0.fileName,a=B0.line;break}}for(var w0=0;w0<u.length;++w0){var B0=w1(u[w0]);if(B0){q0=B0.fileName,X0=B0.line;break}}if(a<0||X0<0||!J0||!q0||J0!==q0||a>=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;u<Q0;++u){var J0=B[u].stack,q0=v[J0];if(q0!==void 0&&q0!==u){if(q0>0)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<Q0-1)w0._parent=B[q0+1],w0._parent.uncycle(),w0._length=w0._parent._length+1;else w0._parent=void 0,w0._length=1;var B0=w0._length+1;for(var r0=u-2;r0>=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<I.length;++X){var Z=I[X];if(Z===Error||Z!=null&&Z.prototype instanceof Error){if(H instanceof Z)return U(K).call(W,H)}else if(typeof Z==="function"){var q=U(Z).call(W,H);if(q===Q)return q;else if(q)return U(K).call(W,H)}else if(Y.isObject(H)){var V=z(Z);for(var F=0;F<V.length;++F){var w=V[F];if(Z[w]!=H[w])continue $}return U(K).call(W,H)}}return $}}return J}});var Mn=E((ut1,ZO0)=>{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<z.length;++U){var Q=z[U];if(!XL1.test(Q))Y[Q]=$[Q]}return Y}return WO0.markAsOriginatingFromRejection($),$}function qL1($,Y){return function(z,U){if($===null)return;if(z){var Q=ZL1(KL1(z));$._attachExtraTrace(Q),$._reject(Q)}else if(!Y)$._fulfill(U);else{var J=arguments.length,I=Array(Math.max(J-1,0));for(var K=1;K<J;++K)I[K-1]=arguments[K];$._fulfill(I)}$=null}}ZO0.exports=qL1});var VO0=E((bt1,qO0)=>{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,voi Line truncated
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<i.length;x+=2){var d=i[x];if(U0.test(d)){var t=d.replace(U0,"");for(var e=0;e<i.length;e+=2)if(i[e]===t)throw new G(`Cannot promisify an API that has normal methods with '%s'-suffix
See http://goo.gl/MqrFmX
`.replace("%s",n))}}}function N(i,n,U0,x){var d=U.inheritedDataKeys(i),t=[];for(var e=0;e<d.length;++e){var y=d[e],p=i[y],Y0=x===q?!0:q(y,p,i);if(typeof p==="function"&&!F(p)&&!w(i,y,n)&&x(y,p,i,Y0))t.push(y,p)}return O(t,n,U0),t}var M=function(i){return i.replace(/([$])/,"\\$")},D,P=function(i){var n=[i],U0=Math.max(0,i-1-3);for(var x=i-1;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<d.length;++e){var g=d[e],p=i[g],Y0=x===q?!0:q(g,p,i);if(typeof p==="function"&&!F(p)&&!w(i,g,n)&&x(g,p,i,Y0))t.push(g,p)}return O(t,n,U0),t}var M=function(i){return i.replace(/([$])/,"\\$")},D,P=function(i){var n=[i],U0=Math.max(0,i-1-3);for(var x=i-1;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),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<y.length;++T0)N0+="case "+y[T0]+":"+Y0(y[T0]);return N0+=`
`;return G0.replace("{{args}}",T0).replace(", ",_0)}function y(){var N0="";for(var T0=0;T0<g.length;++T0)N0+="case "+g[T0]+":"+Y0(g[T0]);return N0+=`
default:
var args = new Array(len + 1);
var i = 0;
@@ -247,7 +247,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof T6))r
break;
`.replace("[CodeForCall]",p?`ret = callback.apply(this, args);
`:`ret = callback.apply(receiver, args);
`),N0}var a=typeof i==="string"?"this != null ? this['"+i+"'] : fn":"fn",$0=`'use strict';
`),N0}var r=typeof i==="string"?"this != null ? this['"+i+"'] : fn":"fn",$0=`'use strict';
var ret = function (Parameters) {
'use strict';
var len = arguments.length;
@@ -267,13 +267,13 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof T6))r
};
notEnumerableProp(ret, '__isPromisified__', true);
return ret;
`.replace("[CodeForSwitchCase]",g()).replace("[GetFunctionCode]",a);return $0=$0.replace("Parameters",A(e)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",$0)($,x,n,J,I,Q,U.tryCatch,U.errorObj,U.notEnumerableProp,Y)};function C(i,n,U0,x,d,t){var e=function(){return this}(),y=i;if(typeof y==="string")i=x;function p(){var Y0=n;if(n===z)Y0=this;var g=new $(Y);g._captureStackTrace();var a=typeof y==="string"&&this!==e?this[y]:i,$0=Q(g,t);try{a.apply(Y0,J(arguments,$0))}catch(N0){g._rejectCallback(I(N0),!0,!0)}if(!g._isFateSealed())g._setAsyncGuaranteed();return g}return U.notEnumerableProp(p,"__isPromisified__",!0),p}var b=K?D:C;function k(i,n,U0,x,d){var t=new RegExp(M(n)+"$"),e=N(i,n,t,U0);for(var y=0,p=e.length;y<p;y+=2){var Y0=e[y],g=e[y+1],a=Y0+n;if(x===b)i[a]=b(Y0,z,Y0,g,n,d);else{var $0=x(g,function(){return b(Y0,z,Y0,g,n,d)});U.notEnumerableProp($0,"__isPromisified__",!0),i[a]=$0}}return U.toFastProperties(i),i}function S(i,n,U0){return b(i,n,void 0,i,null,U0)}$.promisify=function(i,n){if(typeof i!=="function")throw new G("expecting a function but got "+U.classString(i));if(F(i))return i;n=Object(n);var U0=n.context===void 0?z:n.context,x=!!n.multiArgs,d=S(i,U0,x);return U.copyDescriptors(i,d,V),d},$.promisifyAll=function(i,n){if(typeof i!=="function"&&typeof i!=="object")throw new G(`the target of promisifyAll must be an object or a function
`.replace("[CodeForSwitchCase]",y()).replace("[GetFunctionCode]",r);return $0=$0.replace("Parameters",A(e)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",$0)($,x,n,J,I,Q,U.tryCatch,U.errorObj,U.notEnumerableProp,Y)};function C(i,n,U0,x,d,t){var e=function(){return this}(),g=i;if(typeof g==="string")i=x;function p(){var Y0=n;if(n===z)Y0=this;var y=new $(Y);y._captureStackTrace();var r=typeof g==="string"&&this!==e?this[g]:i,$0=Q(y,t);try{r.apply(Y0,J(arguments,$0))}catch(N0){y._rejectCallback(I(N0),!0,!0)}if(!y._isFateSealed())y._setAsyncGuaranteed();return y}return U.notEnumerableProp(p,"__isPromisified__",!0),p}var b=K?D:C;function k(i,n,U0,x,d){var t=new RegExp(M(n)+"$"),e=N(i,n,t,U0);for(var g=0,p=e.length;g<p;g+=2){var Y0=e[g],y=e[g+1],r=Y0+n;if(x===b)i[r]=b(Y0,z,Y0,y,n,d);else{var $0=x(y,function(){return b(Y0,z,Y0,y,n,d)});U.notEnumerableProp($0,"__isPromisified__",!0),i[r]=$0}}return U.toFastProperties(i),i}function S(i,n,U0){return b(i,n,void 0,i,null,U0)}$.promisify=function(i,n){if(typeof i!=="function")throw new G("expecting a function but got "+U.classString(i));if(F(i))return i;n=Object(n);var U0=n.context===void 0?z:n.context,x=!!n.multiArgs,d=S(i,U0,x);return U.copyDescriptors(i,d,V),d},$.promisifyAll=function(i,n){if(typeof i!=="function"&&typeof i!=="object")throw new G(`the target of promisifyAll must be an object or a function
See http://goo.gl/MqrFmX
`);n=Object(n);var U0=!!n.multiArgs,x=n.suffix;if(typeof x!=="string")x=H;var d=n.filter;if(typeof d!=="function")d=q;var t=n.promisifier;if(typeof t!=="function")t=b;if(!U.isIdentifier(x))throw RangeError(`suffix must be a valid identifier
See http://goo.gl/MqrFmX
`);var e=U.inheritedDataKeys(i);for(var y=0;y<e.length;++y){var p=i[e[y]];if(e[y]!=="constructor"&&U.isClass(p))k(p.prototype,x,d,t,U0),k(p,x,d,t,U0)}return k(i,x,d,t,U0)}}});var bO0=E((et1,uO0)=>{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<V;++F){var w=Z[V+F],O=Z[F];q.set(w,O)}return q};function W(Z){var q=!1,V;if(K!==void 0&&Z instanceof K)V=G(Z),q=!0;else{var F=I.keys(Z),w=F.length;V=Array(w*2);for(var O=0;O<w;++O){var N=F[O];V[O]=Z[N],V[O+w]=N}}this.constructor$(V),this._isMap=q,this._init$(void 0,-3)}Q.inherits(W,Y),W.prototype._init=function(){},W.prototype._promiseFulfilled=function(Z,q){this._values[q]=Z;var V=++this._totalResolved;if(V>=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<N;++O)F[this._values[O+w]]=this._values[O]}return this._resolve(F),!0}return!1},W.prototype.shouldCopyValues=function(){return!1},W.prototype.getActualLength=function(Z){return Z>>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<e.length;++g){var p=i[e[g]];if(e[g]!=="constructor"&&U.isClass(p))k(p.prototype,x,d,t,U0),k(p,x,d,t,U0)}return k(i,x,d,t,U0)}}});var bO0=E((et1,uO0)=>{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<V;++F){var w=Z[V+F],O=Z[F];q.set(w,O)}return q};function W(Z){var q=!1,V;if(K!==void 0&&Z instanceof K)V=G(Z),q=!0;else{var F=I.keys(Z),w=F.length;V=Array(w*2);for(var O=0;O<w;++O){var N=F[O];V[O]=Z[N],V[O+w]=N}}this.constructor$(V),this._isMap=q,this._init$(void 0,-3)}Q.inherits(W,Y),W.prototype._init=function(){},W.prototype._promiseFulfilled=function(Z,q){this._values[q]=Z;var V=++this._totalResolved;if(V>=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<N;++O)F[this._values[O+w]]=this._values[O]}return this._resolve(F),!0}return!1},W.prototype.shouldCopyValues=function(){return!1},W.prototype.getActualLength=function(Z){return Z>>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<V;++q){var F=K[q];if(F===void 0&&!(q in K))continue;$.cast(F)._then(X,Z,void 0,W,null)}return W}$.race=function(K){return I(K,void 0)},$.prototype.race=function(){return I(this,void 0)}}});var pO0=E((Ye1,cO0)=>{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<O;++w){var N={accum:null,value:V[w],index:w,length:O,array:this};F=F._then(Z,void 0,void 0,N,void 0)}if(this._eachValues!==void 0)F=F._then(this._eachComplete,void 0,void 0,this,void 0);F._then(W,W,void 0,F,this)},$.prototype.reduce=function(V,F){return X(this,V,F,null)},$.reduce=function(V,F,w,O){return X(V,F,w,O)};function W(V,F){if(this.isFulfilled())F._resolve(V);else F._reject(V)}function X(V,F,w,O){if(typeof F!=="function")return z("expecting a function but got "+K.classString(F));var N=new H(V,F,w,O);return N.promise()}function Z(V){this.accum=V,this.array._gotAccum(V);var F=U(this.value,this.array._promise);if(F instanceof $)return this.array._currentCancellable=F,F._then(q,void 0,void 0,this,void 0);else return q.call(this,F)}function q(V){var F=this.array,w=F._promise,O=G(F._fn);w._pushContext();var N;if(F._eachValues!==void 0)N=O.call(w._boundValue(),V,this.index,this.length);else N=O.call(w._boundValue(),this.accum,V,this.index,this.length);if(N instanceof $)F._currentCancellable=N;var M=w._popContext();return J.checkForgottenReturns(N,M,F._eachValues!==void 0?"Promise.each":"Promise.reduce",w),N}}});var mO0=E((ze1,dO0)=>{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()= Line truncated
@@ -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;y<d-1;++y){var p=arguments[y];if(J.isObject(p))t[e++]=p;else return z("expecting an object but got A catch statement predicate "+J.classString(p))}return t.length=e,x=arguments[y],this.then(void 0,A(t,x,this))}return this.then(void 0,x)},S.prototype.reflect=function(){return this._then(Y,Y,void 0,this,void 0)},S.prototype.then=function(x,d){if(D.warnings()&&arguments.length>0&&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,_ Line truncated
`)}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;g<d-1;++g){var p=arguments[g];if(J.isObject(p))t[e++]=p;else return z("expecting an object but got A catch statement predicate "+J.classString(p))}return t.length=e,x=arguments[g],this.then(void 0,A(t,x,this))}return this.then(void 0,x)},S.prototype.reflect=function(){return this._then(Y,Y,void 0,this,void 0)},S.prototype.then=function(x,d){if(D.warnings()&&arguments.length>0&&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,_ Line truncated
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<U;z++){var Q=Y[z];if(Q===nM0)$.emit("end");else if(Q===cM0)$.emit("close");else $.emit("data",Q);if($._paused){$._buffer=Y.slice(z);return}}$._buffer.length=0}};KU.prototype.pause=function($){var Y=this;if(Y._paused)return;if($=$||Y,Y._paused=!0,Y._stream)Y._stream.pause();Y.emit("pause",$)};KU.prototype.resume=function($){var Y=this;if(!Y._paused)return;if($=$||Y,Y.emit("resume",$),Y._paused=!1,Y._stream)Y._stream.resume();Y._read()}});var lM0=E((ie1,mM0)=>{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.toLowerCase()?-1:$>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)=> Line truncated
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){ Line truncated
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){ Line truncated
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* 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))thrLine truncated
*/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))thrLine truncated
`)}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;q<U.length;q++){let V=U[q];if(!V)continue;let F=Number(V.createdAt)||0,w=V.document||{},O=V.manualApprovalRecord||V.result?.manualApprovalRecord||w.manualApprovalRecord||{},N=typeof V.sourceExtendData?.nodeId==="string"?String(V.sourceExtendData.nodeId):void 0,M=typeof O.nodeId==="string"?String(O.nodeId):void 0,D=M?decodeURIComponent(M).replace(/^hcnode_/,"").replace(/_r\d+$/,""):void 0,P=N||D,j=P?Q.find((A0)=>A0.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)<C)C=k.time}let S=V.result||{},i=S.decision||V.aiDecision||"-",n=typeof i==="string"?i:"-",U0=n.toUpperCase(),x=U0==="REJECT"||U0==="驳回",d=U0==="APPROVE"||U0==="通过",t=U0==="EXEMPT_APPROVE"||U0==="免审通过"||U0==="备注通过",e=V.taskMode||V.finalExecutionMode||"",p=String(e).toLowerCase().includes("auto")||V.finalExecutionMode==="automatic"||e==="automatic"||e==="fully_automatic",Y0="-";if(d||t)Y0="添加评论";else if(x)Y0=p?"驳回":"添加评论";else if(U0==="REVIEW"||U0==="转交复核")Y0="转交复核";let g=typeof O.status==="object"&&O.status!==null?String(O.status.type||O.status.label||"").toUpperCase():"",a=typeof O.status==="object"&&O.status!==null?String(O.status.sourceStatus||""):"",$0=w.manualApprovalStatus||S.manualApprovalStatus||V.manualApprovalStatus,N0=typeof $0==="string"?$0.toUpperCase():"",T0=N0==="CANCELLED"||N0==="CANCELED"||N0==="已取消"||N0==="已撤回"||N0==="REVOKED"||g==="CANCELLED"||g==="CANCELED"||a.includes("撤回")||a.includes("取消"),v0=N0==="APPROVED"||N0==="已支付/审批完成"||N0==="已通过"||N0==="已完成"||N0==="已支付"||g==="APPROVED",f0=!(a.includes("补偿")||a.includes("已支付"))&&(N0==="TERMINATED"||N0==="REJECTED"||N0==="REJECT"||N0==="已驳回"||N0==="被驳回"||g==="TERMINATED"||g==="REJECTED"||g==="已驳回"||g==="被驳回"),e0=j?1000:60000,r=Q.filter((A0)=>{let Q0=A0.time??0;return Q0>=A-e0&&Q0<C}),H0="-",F0="-",b0=!1,i0,n0,w1=d||t,k1=Q.filter((A0)=>(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.commen Line truncated
↳ ${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;q<U.length;q++){let V=U[q];if(!V)continue;let F=Number(V.createdAt)||0,w=V.document||{},O=V.manualApprovalRecord||V.result?.manualApprovalRecord||w.manualApprovalRecord||{},N=typeof V.sourceExtendData?.nodeId==="string"?String(V.sourceExtendData.nodeId):void 0,M=typeof O.nodeId==="string"?String(O.nodeId):void 0,D=M?decodeURIComponent(M).replace(/^hcnode_/,"").replace(/_r\d+$/,""):void 0,P=N||D,j=P?Q.find((A0)=>A0.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)<C)C=k.time}let S=V.result||{},i=S.decision||V.aiDecision||"-",n=typeof i==="string"?i:"-",U0=n.toUpperCase(),x=U0==="REJECT"||U0==="驳回",d=U0==="APPROVE"||U0==="通过",t=U0==="EXEMPT_APPROVE"||U0==="免审通过"||U0==="备注通过",e=V.taskMode||V.finalExecutionMode||"",p=String(e).toLowerCase().includes("auto")||V.finalExecutionMode==="automatic"||e==="automatic"||e==="fully_automatic",Y0="-";if(d||t)Y0="添加评论";else if(x)Y0=p?"驳回":"添加评论";else if(U0==="REVIEW"||U0==="转交复核")Y0="转交复核";let y=typeof O.status==="object"&&O.status!==null?String(O.status.type||O.status.label||"").toUpperCase():"",r=typeof O.status==="object"&&O.status!==null?String(O.status.sourceStatus||""):"",$0=w.manualApprovalStatus||S.manualApprovalStatus||V.manualApprovalStatus,N0=typeof $0==="string"?$0.toUpperCase():"",T0=N0==="CANCELLED"||N0==="CANCELED"||N0==="已取消"||N0==="已撤回"||N0==="REVOKED"||y==="CANCELLED"||y==="CANCELED"||r.includes("撤回")||r.includes("取消"),_0=N0==="APPROVED"||N0==="已支付/审批完成"||N0==="已通过"||N0==="已完成"||N0==="已支付"||y==="APPROVED",f0=!(r.includes("补偿")||r.includes("已支付"))&&(N0==="TERMINATED"||N0==="REJECTED"||N0==="REJECT"||N0==="已驳回"||N0==="被驳回"||y==="TERMINATED"||y==="REJECTED"||y==="已驳回"||y==="被驳回"),e0=j?1000:60000,s=Q.filter((A0)=>{let Q0=A0.time??0;return Q0>=A-e0&&Q0<C}),H0="-",F0="-",b0=!1,i0,n0,w1=d||t,k1=Q.filter((A0)=>(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.commen Line truncated
`,{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 <corpId>. 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:"hi Line truncated
`):[]}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<Y.length)if($[Q]===Y[J])U.push(` ${$[Q]}`),Q+=1,J+=1;else if(z[Q+1][J]>=z[Q][J+1])U.push(`-${$[Q++]}`);else U.push(`+${Y[J++]}`);while(Q<$.length)U.push(`-${$[Q++]}`);while(J<Y.length)U.push(`+${Y[J++]}`);return U}function pD1($,Y,z,U,Q,J){let I=cA0(U,J),K=cA0(Q,J),G=U?`a/rules/${$}`:"/dev/null",H=Q?`b/rules/${$}`:"/dev/null";return[`diff --git a/rules/${$} b/rules/${$}`,`--- ${G} v${Y.versionNumber}`,`+++ ${H} v${z.versionNumber}`,`@@ -${I.length?1:0},${I.length} +${K.length?1:0},${K.length} @@`,...cD1(I,K)].join(`
@@ -897,7 +897,7 @@ export default lintRule;
`),U=await Promise.all(z.recordIds.map((O)=>H4($,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 <targetCorpId>`}}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;K<U.parsed.length;K+=1){let G=U.parsed[K],H=U.plans[K],W=new Map,X=[...H.categoryFields,...Object.values(H.personAttachments).flat(),...Object.values(H.expenseAttachments).flat()];for(let V of X)for(let F of V.paths){if(W.has(F))continue;let w=U.entries.find((j)=>j.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 <keyword>")}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 <corpId>");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 <corpId> --env <production|test> [--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 <corpId> --env <production|test> [--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 <corpId> --name <newName>");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 <prodCorpId> <testCorpId> [--confirm] [--force]
or: seal-use corps bind-test <testCorpId> --corp <prodCorpId> [--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} <testCorpId> --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 Line truncated
Run 'seal-use corps bind-test ${Q.id} <testCorpId> --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 Line truncated
Run 'seal-use corps bind-test ${Q.id} <testCorpId> --confirm' first to establish a verified 1-to-1 association,
or add '--force' (or use 'seal-use webhook replay <recordId> --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??"<prodCorpId>"} --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 <corpId>");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 <url> [--name <customName>] [--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 Line truncated
`);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 <prodCorpId>\`,自动将草稿规则发布到绑定的测试靶场 \`[Prod vN · #M -> Test vM]\`,同时自动同步免配的合思测试通道。
3. **测试靶场自动化验证**:
- 运行 \`seal-use test regression --corp <testCorpId> --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 <batchId>");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 <batchId> [--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 <batchId>");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 <batchId>");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 <batchId>");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.o Line truncated
`);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} <testCorpId>`);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<w)throw new L4(`测试企业「${z.name}」AI 审批额度不足:当前剩余 ${V} 点,本次回归抽样 ${J} 笔需要约 ${w} 点。
`+"为防止测试环境额度耗尽中断业务,已硬性拦截并拒绝发起测试单据注入。",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,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()-N0<G){await new Promise((H0)=>setTimeout(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% Line truncated
`+"为防止测试环境额度耗尽中断业务,已硬性拦截并拒绝发起测试单据注入。",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()-N0<G){await new Promise((H0)=>setTimeout(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% Line truncated
`)}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 <prodCorpId> ${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} <testCorpId>`);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 <id>] [--samples <N>] [--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 <toolName> [--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, Line truncated
`)}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<G.length;F++){let w=G[F],O=new AbortController,N="",M=(A)=>{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<Z){let n=(k/1024).toFixed(1);M(`Initial transfer too slow (${n} KB < 300 KB in 6s), switching mirror...`)}},X);while(!0){let n=C.read(),U0,x=new Promise((y,p)=>{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<G.length;F++){let w=G[F],O=new AbortController,N="",M=(A)=>{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<Z){let n=(k/1024).toFixed(1);M(`Initial transfer too slow (${n} KB < 300 KB in 6s), switching mirror...`)}},X);while(!0){let n=C.read(),U0,x=new Promise((g,p)=>{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;Q<Math.max(z.length,U.length);Q++){let J=z[Q]??0,I=U[Q]??0;if(J>I)return 1;if(J<I)return-1}return 0}function R5($,Y){return Xy0($,Y)>0}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 <name> --phone <phone> [--dept <deptId>]");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 <userId>");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 <userId>");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 <userId>");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 <userId>");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 <userIdOrPhone> [--note <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-d Line truncated
+12 -19
View File
@@ -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 <prodCorpId>`,自动将草稿规则发布到绑定的测试靶场 `[Prod vN · #M -> Test vM]`,同时自动同步免配的合思测试通道。
3. **测试靶场自动化验证**:
- 运行 `seal-use test regression --corp <testCorpId> --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`。
---
@@ -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
+7 -4
View File
@@ -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(),