edgeone 1.6.7 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -565,7 +565,7 @@ ${A.join(`
565
565
  `;y.forEach(A=>{v+=A}),e.fail(v)}};let p={};s.conflicts=function(g,y){ii("<string|object> [array|string]",[g,y],arguments.length),typeof g=="object"?Object.keys(g).forEach(v=>{s.conflicts(v,g[v])}):(t.global(g),p[g]||(p[g]=[]),Array.isArray(y)?y.forEach(v=>s.conflicts(g,v)):p[g].push(y))},s.getConflicting=()=>p,s.conflicting=function(g){Object.keys(g).forEach(y=>{p[y]&&p[y].forEach(v=>{v&&g[y]!==void 0&&g[v]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",y,v))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(p).forEach(y=>{p[y].forEach(v=>{v&&g[r.Parser.camelCase(y)]!==void 0&&g[r.Parser.camelCase(v)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",y,v))})})},s.recommendCommands=function(g,y){y=y.sort((E,k)=>k.length-E.length);let A=null,S=1/0;for(let E=0,k;(k=y[E])!==void 0;E++){let P=h3e(g,k);P<=3&&P<S&&(S=P,A=k)}A&&e.fail(n("Did you mean %s?",A))},s.reset=function(g){return c=HI(c,y=>!g[y]),p=HI(p,y=>!g[y]),s};let f=[];return s.freeze=function(){f.push({implied:c,conflicting:p})},s.unfreeze=function(){let g=f.pop();ng(g,void 0,r),{implied:c,conflicting:p}=g},s}var ai=function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Ve=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Op,oD,k8,wv,YA,zV,GI,aD,HV,_v,VV,Sv,Lw,JA,Cv,GV,lF,dd,Ti,WV,YV,KA,cD,pF,uD,WI,JV,vs,lD,pD,fD,Os,KV,jw,ap;function F3e(t){return(e=[],r=t.process.cwd(),n)=>{let o=new Bue(e,r,n,t);return Object.defineProperty(o,"argv",{get:()=>o.parse(),enumerable:!0}),o.help(),o.version(),o}}var A3e=Symbol("copyDoubleDash"),y3e=Symbol("copyDoubleDash"),xue=Symbol("deleteFromParserHintObject"),v3e=Symbol("emitWarning"),x3e=Symbol("freeze"),b3e=Symbol("getDollarZero"),dD=Symbol("getParserConfiguration"),E3e=Symbol("getUsageConfiguration"),bue=Symbol("guessLocale"),w3e=Symbol("guessVersion"),_3e=Symbol("parsePositionalNumbers"),Eue=Symbol("pkgUp"),YI=Symbol("populateParserHintArray"),fF=Symbol("populateParserHintSingleValueDictionary"),wue=Symbol("populateParserHintArrayDictionary"),_ue=Symbol("populateParserHintDictionary"),Sue=Symbol("sanitizeKey"),Cue=Symbol("setKey"),Iue=Symbol("unfreeze"),S3e=Symbol("validateAsync"),C3e=Symbol("getCommandInstance"),I3e=Symbol("getContext"),k3e=Symbol("getHasOutput"),T3e=Symbol("getLoggerInstance"),B3e=Symbol("getParseContext"),D3e=Symbol("getUsageInstance"),P3e=Symbol("getValidationInstance"),XV=Symbol("hasParseCallback"),R3e=Symbol("isGlobalContext"),hD=Symbol("postProcess"),N3e=Symbol("rebase"),kue=Symbol("reset"),T8=Symbol("runYargsParserAndExecuteCommands"),Tue=Symbol("runValidation"),O3e=Symbol("setHasOutput"),mD=Symbol("kTrackManuallySetKeys"),Bue=class{constructor(e=[],r,n,o){this.customScriptName=!1,this.parsed=!1,Op.set(this,void 0),oD.set(this,void 0),k8.set(this,{commands:[],fullCommands:[]}),wv.set(this,null),YA.set(this,null),zV.set(this,"show-hidden"),GI.set(this,null),aD.set(this,!0),HV.set(this,{}),_v.set(this,!0),VV.set(this,[]),Sv.set(this,void 0),Lw.set(this,{}),JA.set(this,!1),Cv.set(this,null),GV.set(this,!0),lF.set(this,void 0),dd.set(this,""),Ti.set(this,void 0),WV.set(this,void 0),YV.set(this,{}),KA.set(this,null),cD.set(this,null),pF.set(this,{}),uD.set(this,{}),WI.set(this,void 0),JV.set(this,!1),vs.set(this,void 0),lD.set(this,!1),pD.set(this,!1),fD.set(this,!1),Os.set(this,void 0),KV.set(this,{}),jw.set(this,null),ap.set(this,void 0),ai(this,vs,o,"f"),ai(this,WI,e,"f"),ai(this,oD,r,"f"),ai(this,WV,n,"f"),ai(this,Sv,new qV(this),"f"),this.$0=this[b3e](),this[kue](),ai(this,Op,Ve(this,Op,"f"),"f"),ai(this,Os,Ve(this,Os,"f"),"f"),ai(this,ap,Ve(this,ap,"f"),"f"),ai(this,Ti,Ve(this,Ti,"f"),"f"),Ve(this,Ti,"f").showHiddenOpt=Ve(this,zV,"f"),ai(this,lF,this[y3e](),"f")}addHelpOpt(e,r){let n="help";return ii("[string|boolean] [string]",[e,r],arguments.length),Ve(this,Cv,"f")&&(this[xue](Ve(this,Cv,"f")),ai(this,Cv,null,"f")),e===!1&&r===void 0?this:(ai(this,Cv,typeof e=="string"?e:n,"f"),this.boolean(Ve(this,Cv,"f")),this.describe(Ve(this,Cv,"f"),r||Ve(this,Os,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(ii("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:Ve(this,zV,"f");return this.boolean(n),this.describe(n,r||Ve(this,Os,"f").deferY18nLookup("Show hidden options")),Ve(this,Ti,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return ii("<object|string|array> [string|array]",[e,r],arguments.length),this[wue](this.alias.bind(this),"alias",e,r),this}array(e){return ii("<array|string>",[e],arguments.length),this[YI]("array",e),this[mD](e),this}boolean(e){return ii("<array|string>",[e],arguments.length),this[YI]("boolean",e),this[mD](e),this}check(e,r){return ii("<function> [boolean]",[e,r],arguments.length),this.middleware((n,o)=>sD(()=>e(n,o.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&Ve(this,Os,"f").fail(s.toString(),s):Ve(this,Os,"f").fail(Ve(this,vs,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(Ve(this,Os,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(e,r){return ii("<object|string|array> [string|array]",[e,r],arguments.length),this[wue](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(ii("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new Nu("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new Nu("coerce callback must be provided");return Ve(this,Ti,"f").key[e]=!0,Ve(this,Sv,"f").addCoerceMiddleware((n,o)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?sD(()=>(s=o.getAliases(),r(n[e])),u=>{n[e]=u;let p=o.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&p!==!0)for(let f of s[e])n[f]=u;return n},u=>{throw new Nu(u.message)}):n},e),this}conflicts(e,r){return ii("<string|object> [string|array]",[e,r],arguments.length),Ve(this,ap,"f").conflicts(e,r),this}config(e="config",r,n){return ii("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=S8(e,Ve(this,oD,"f"),this[dD]()["deep-merge-config"]||!1,Ve(this,vs,"f")),Ve(this,Ti,"f").configObjects=(Ve(this,Ti,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||Ve(this,Os,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(o=>{Ve(this,Ti,"f").config[o]=n||!0}),this)}completion(e,r,n){return ii("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),ai(this,YA,e||Ve(this,YA,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(Ve(this,YA,"f"),r),n&&Ve(this,wv,"f").registerFunction(n),this}command(e,r,n,o,s,c){return ii("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,o,s,c],arguments.length),Ve(this,Op,"f").addHandler(e,r,n,o,s,c),this}commands(e,r,n,o,s,c){return this.command(e,r,n,o,s,c)}commandDir(e,r){ii("<string> [object]",[e,r],arguments.length);let n=Ve(this,WV,"f")||Ve(this,vs,"f").require;return Ve(this,Op,"f").addDirectory(e,n,Ve(this,vs,"f").getCallerFile(),r),this}count(e){return ii("<array|string>",[e],arguments.length),this[YI]("count",e),this[mD](e),this}default(e,r,n){return ii("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(mue(e,Ve(this,vs,"f")),Ve(this,Ti,"f").defaultDescription[e]=n),typeof r=="function"&&(mue(e,Ve(this,vs,"f")),Ve(this,Ti,"f").defaultDescription[e]||(Ve(this,Ti,"f").defaultDescription[e]=Ve(this,Os,"f").functionDescription(r)),r=r.call()),this[fF](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,o){return ii("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,o],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),Ve(this,Ti,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:o},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(o=>{ng(n,!0,Ve(this,vs,"f")),this.demandOption(o,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(ng(n,!0,Ve(this,vs,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(o=>{ng(n,!0,Ve(this,vs,"f")),this.demandOption(o,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return ii("<object|string|array> [string]",[e,r],arguments.length),this[fF](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return ii("<string> [string|boolean]",[e,r],arguments.length),Ve(this,Ti,"f").deprecatedOptions[e]=r,this}describe(e,r){return ii("<object|string|array> [string]",[e,r],arguments.length),this[Cue](e,!0),Ve(this,Os,"f").describe(e,r),this}detectLocale(e){return ii("<boolean>",[e],arguments.length),ai(this,aD,e,"f"),this}env(e){return ii("[string|boolean]",[e],arguments.length),e===!1?delete Ve(this,Ti,"f").envPrefix:Ve(this,Ti,"f").envPrefix=e||"",this}epilogue(e){return ii("<string>",[e],arguments.length),Ve(this,Os,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return ii("<string|array> [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):Ve(this,Os,"f").example(e,r),this}exit(e,r){ai(this,JA,!0,"f"),ai(this,GI,r,"f"),Ve(this,_v,"f")&&Ve(this,vs,"f").process.exit(e)}exitProcess(e=!0){return ii("[boolean]",[e],arguments.length),ai(this,_v,e,"f"),this}fail(e){if(ii("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Nu("Invalid first argument. Expected function or boolean 'false'");return Ve(this,Os,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return ii("<array> [function]",[e,r],arguments.length),r?Ve(this,wv,"f").getCompletion(e,r):new Promise((n,o)=>{Ve(this,wv,"f").getCompletion(e,(s,c)=>{s?o(s):n(c)})})}getDemandedOptions(){return ii([],0),Ve(this,Ti,"f").demandedOptions}getDemandedCommands(){return ii([],0),Ve(this,Ti,"f").demandedCommands}getDeprecatedOptions(){return ii([],0),Ve(this,Ti,"f").deprecatedOptions}getDetectLocale(){return Ve(this,aD,"f")}getExitProcess(){return Ve(this,_v,"f")}getGroups(){return Object.assign({},Ve(this,Lw,"f"),Ve(this,uD,"f"))}getHelp(){if(ai(this,JA,!0,"f"),!Ve(this,Os,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[T8](Ve(this,WI,"f"),void 0,void 0,0,!0);if(Ou(r))return r.then(()=>Ve(this,Os,"f").help())}let e=Ve(this,Op,"f").runDefaultBuilderOn(this);if(Ou(e))return e.then(()=>Ve(this,Os,"f").help())}return Promise.resolve(Ve(this,Os,"f").help())}getOptions(){return Ve(this,Ti,"f")}getStrict(){return Ve(this,lD,"f")}getStrictCommands(){return Ve(this,pD,"f")}getStrictOptions(){return Ve(this,fD,"f")}global(e,r){return ii("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?Ve(this,Ti,"f").local=Ve(this,Ti,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{Ve(this,Ti,"f").local.includes(n)||Ve(this,Ti,"f").local.push(n)}),this}group(e,r){ii("<string|array> <string>",[e,r],arguments.length);let n=Ve(this,uD,"f")[r]||Ve(this,Lw,"f")[r];Ve(this,uD,"f")[r]&&delete Ve(this,uD,"f")[r];let o={};return Ve(this,Lw,"f")[r]=(n||[]).concat(e).filter(s=>o[s]?!1:o[s]=!0),this}hide(e){return ii("<string>",[e],arguments.length),Ve(this,Ti,"f").hiddenOptions.push(e),this}implies(e,r){return ii("<string|object> [number|string|array]",[e,r],arguments.length),Ve(this,ap,"f").implies(e,r),this}locale(e){return ii("[string]",[e],arguments.length),e===void 0?(this[bue](),Ve(this,vs,"f").y18n.getLocale()):(ai(this,aD,!1,"f"),Ve(this,vs,"f").y18n.setLocale(e),this)}middleware(e,r,n){return Ve(this,Sv,"f").addMiddleware(e,!!r,n)}nargs(e,r){return ii("<string|object|array> [number]",[e,r],arguments.length),this[fF](this.nargs.bind(this),"narg",e,r),this}normalize(e){return ii("<array|string>",[e],arguments.length),this[YI]("normalize",e),this}number(e){return ii("<array|string>",[e],arguments.length),this[YI]("number",e),this[mD](e),this}option(e,r){if(ii("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[mD](e),Ve(this,jw,"f")&&(e==="version"||(r==null?void 0:r.alias)==="version")&&this[v3e](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
566
566
  `),void 0,"versionWarning"),Ve(this,Ti,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);let o=r.demand||r.required||r.require;o&&this.demand(e,o),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(Ve(this,Ti,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);let s=r.describe||r.description||r.desc,c=Ve(this,Os,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(c,e)||typeof s=="string")&&this.describe(e,s),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){ii("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[x3e](),typeof e>"u"&&(e=Ve(this,WI,"f")),typeof r=="object"&&(ai(this,cD,r,"f"),r=n),typeof r=="function"&&(ai(this,KA,r,"f"),r=!1),r||ai(this,WI,e,"f"),Ve(this,KA,"f")&&ai(this,_v,!1,"f");let o=this[T8](e,!!r),s=this.parsed;return Ve(this,wv,"f").setParsed(this.parsed),Ou(o)?o.then(c=>(Ve(this,KA,"f")&&Ve(this,KA,"f").call(this,Ve(this,GI,"f"),c,Ve(this,dd,"f")),c)).catch(c=>{throw Ve(this,KA,"f")&&Ve(this,KA,"f")(c,this.parsed.argv,Ve(this,dd,"f")),c}).finally(()=>{this[Iue](),this.parsed=s}):(Ve(this,KA,"f")&&Ve(this,KA,"f").call(this,Ve(this,GI,"f"),o,Ve(this,dd,"f")),this[Iue](),this.parsed=s,o)}parseAsync(e,r,n){let o=this.parse(e,r,n);return Ou(o)?o:Promise.resolve(o)}parseSync(e,r,n){let o=this.parse(e,r,n);if(Ou(o))throw new Nu(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return o}parserConfiguration(e){return ii("<object>",[e],arguments.length),ai(this,YV,e,"f"),this}pkgConf(e,r){ii("<string> [string]",[e,r],arguments.length);let n=null,o=this[Eue](r||Ve(this,oD,"f"));return o[e]&&typeof o[e]=="object"&&(n=S8(o[e],r||Ve(this,oD,"f"),this[dD]()["deep-merge-config"]||!1,Ve(this,vs,"f")),Ve(this,Ti,"f").configObjects=(Ve(this,Ti,"f").configObjects||[]).concat(n)),this}positional(e,r){ii("<string> <object>",[e,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=HI(r,(c,u)=>c==="type"&&!["string","number","boolean"].includes(u)?!1:n.includes(c));let o=Ve(this,k8,"f").fullCommands[Ve(this,k8,"f").fullCommands.length-1],s=o?Ve(this,Op,"f").cmdToParseOptions(o):{array:[],alias:{},default:{},demand:{}};return cF(s).forEach(c=>{let u=s[c];Array.isArray(u)?u.indexOf(e)!==-1&&(r[c]=!0):u[e]&&!(c in r)&&(r[c]=u[e])}),this.group(e,Ve(this,Os,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return ii("[boolean]",[e],arguments.length),ai(this,JV,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return ii("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&Ve(this,Ti,"f").narg[e]?this:(this[fF](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return ii("[string] [string]",[e,r],arguments.length),e=e||this.$0,Ve(this,lF,"f").log(Ve(this,wv,"f").generateCompletionScript(e,r||Ve(this,YA,"f")||"completion")),this}showHelp(e){if(ii("[string|function]",[e],arguments.length),ai(this,JA,!0,"f"),!Ve(this,Os,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[T8](Ve(this,WI,"f"),void 0,void 0,0,!0);if(Ou(n))return n.then(()=>{Ve(this,Os,"f").showHelp(e)}),this}let r=Ve(this,Op,"f").runDefaultBuilderOn(this);if(Ou(r))return r.then(()=>{Ve(this,Os,"f").showHelp(e)}),this}return Ve(this,Os,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return ii("[boolean|string] [string]",[e,r],arguments.length),Ve(this,Os,"f").showHelpOnFail(e,r),this}showVersion(e){return ii("[string|function]",[e],arguments.length),Ve(this,Os,"f").showVersion(e),this}skipValidation(e){return ii("<array|string>",[e],arguments.length),this[YI]("skipValidation",e),this}strict(e){return ii("[boolean]",[e],arguments.length),ai(this,lD,e!==!1,"f"),this}strictCommands(e){return ii("[boolean]",[e],arguments.length),ai(this,pD,e!==!1,"f"),this}strictOptions(e){return ii("[boolean]",[e],arguments.length),ai(this,fD,e!==!1,"f"),this}string(e){return ii("<array|string>",[e],arguments.length),this[YI]("string",e),this[mD](e),this}terminalWidth(){return ii([],0),Ve(this,vs,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return ii("<object>",[e],arguments.length),ai(this,aD,!1,"f"),Ve(this,vs,"f").y18n.updateLocale(e),this}usage(e,r,n,o){if(ii("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,o],arguments.length),r!==void 0){if(ng(e,null,Ve(this,vs,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,o);throw new Nu(".usage() description must start with $0 if being used as alias for .command()")}else return Ve(this,Os,"f").usage(e),this}usageConfiguration(e){return ii("<object>",[e],arguments.length),ai(this,KV,e,"f"),this}version(e,r,n){let o="version";if(ii("[boolean|string] [string] [string]",[e,r,n],arguments.length),Ve(this,jw,"f")&&(this[xue](Ve(this,jw,"f")),Ve(this,Os,"f").version(void 0),ai(this,jw,null,"f")),arguments.length===0)n=this[w3e](),e=o;else if(arguments.length===1){if(e===!1)return this;n=e,e=o}else arguments.length===2&&(n=r,r=void 0);return ai(this,jw,typeof e=="string"?e:o,"f"),r=r||Ve(this,Os,"f").deferY18nLookup("Show version number"),Ve(this,Os,"f").version(n||void 0),this.boolean(Ve(this,jw,"f")),this.describe(Ve(this,jw,"f"),r),this}wrap(e){return ii("<number|null|undefined>",[e],arguments.length),Ve(this,Os,"f").wrap(e),this}[(Op=new WeakMap,oD=new WeakMap,k8=new WeakMap,wv=new WeakMap,YA=new WeakMap,zV=new WeakMap,GI=new WeakMap,aD=new WeakMap,HV=new WeakMap,_v=new WeakMap,VV=new WeakMap,Sv=new WeakMap,Lw=new WeakMap,JA=new WeakMap,Cv=new WeakMap,GV=new WeakMap,lF=new WeakMap,dd=new WeakMap,Ti=new WeakMap,WV=new WeakMap,YV=new WeakMap,KA=new WeakMap,cD=new WeakMap,pF=new WeakMap,uD=new WeakMap,WI=new WeakMap,JV=new WeakMap,vs=new WeakMap,lD=new WeakMap,pD=new WeakMap,fD=new WeakMap,Os=new WeakMap,KV=new WeakMap,jw=new WeakMap,ap=new WeakMap,A3e)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[y3e](){return{log:(...e)=>{this[XV]()||console.log(...e),ai(this,JA,!0,"f"),Ve(this,dd,"f").length&&ai(this,dd,Ve(this,dd,"f")+`
567
567
  `,"f"),ai(this,dd,Ve(this,dd,"f")+e.join(" "),"f")},error:(...e)=>{this[XV]()||console.error(...e),ai(this,JA,!0,"f"),Ve(this,dd,"f").length&&ai(this,dd,Ve(this,dd,"f")+`
568
- `,"f"),ai(this,dd,Ve(this,dd,"f")+e.join(" "),"f")}}}[xue](e){cF(Ve(this,Ti,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=Ve(this,Ti,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete Ve(this,Os,"f").getDescriptions()[e]}[v3e](e,r,n){Ve(this,HV,"f")[n]||(Ve(this,vs,"f").process.emitWarning(e,r),Ve(this,HV,"f")[n]=!0)}[x3e](){Ve(this,VV,"f").push({options:Ve(this,Ti,"f"),configObjects:Ve(this,Ti,"f").configObjects.slice(0),exitProcess:Ve(this,_v,"f"),groups:Ve(this,Lw,"f"),strict:Ve(this,lD,"f"),strictCommands:Ve(this,pD,"f"),strictOptions:Ve(this,fD,"f"),completionCommand:Ve(this,YA,"f"),output:Ve(this,dd,"f"),exitError:Ve(this,GI,"f"),hasOutput:Ve(this,JA,"f"),parsed:this.parsed,parseFn:Ve(this,KA,"f"),parseContext:Ve(this,cD,"f")}),Ve(this,Os,"f").freeze(),Ve(this,ap,"f").freeze(),Ve(this,Op,"f").freeze(),Ve(this,Sv,"f").freeze()}[b3e](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(Ve(this,vs,"f").process.argv()[0])?r=Ve(this,vs,"f").process.argv().slice(1,2):r=Ve(this,vs,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[N3e](Ve(this,oD,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length<n.length?o:n}).join(" ").trim(),Ve(this,vs,"f").getEnv("_")&&Ve(this,vs,"f").getProcessArgvBin()===Ve(this,vs,"f").getEnv("_")&&(e=Ve(this,vs,"f").getEnv("_").replace(`${Ve(this,vs,"f").path.dirname(Ve(this,vs,"f").process.execPath())}/`,"")),e}[dD](){return Ve(this,YV,"f")}[E3e](){return Ve(this,KV,"f")}[bue](){if(!Ve(this,aD,"f"))return;let e=Ve(this,vs,"f").getEnv("LC_ALL")||Ve(this,vs,"f").getEnv("LC_MESSAGES")||Ve(this,vs,"f").getEnv("LANG")||Ve(this,vs,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[w3e](){return this[Eue]().version||"unknown"}[_3e](e){let r=e["--"]?e["--"]:e._;for(let n=0,o;(o=r[n])!==void 0;n++)Ve(this,vs,"f").Parser.looksLikeNumber(o)&&Number.isSafeInteger(Math.floor(parseFloat(`${o}`)))&&(r[n]=Number(o));return e}[Eue](e){let r=e||"*";if(Ve(this,pF,"f")[r])return Ve(this,pF,"f")[r];let n={};try{let o=e||Ve(this,vs,"f").mainFilename;!e&&Ve(this,vs,"f").path.extname(o)&&(o=Ve(this,vs,"f").path.dirname(o));let s=Ve(this,vs,"f").findUp(o,(c,u)=>{if(u.includes("package.json"))return"package.json"});ng(s,void 0,Ve(this,vs,"f")),n=JSON.parse(Ve(this,vs,"f").readFileSync(s,"utf8"))}catch{}return Ve(this,pF,"f")[r]=n||{},Ve(this,pF,"f")[r]}[YI](e,r){r=[].concat(r),r.forEach(n=>{n=this[Sue](n),Ve(this,Ti,"f")[e].push(n)})}[fF](e,r,n,o){this[_ue](e,r,n,o,(s,c,u)=>{Ve(this,Ti,"f")[s][c]=u})}[wue](e,r,n,o){this[_ue](e,r,n,o,(s,c,u)=>{Ve(this,Ti,"f")[s][c]=(Ve(this,Ti,"f")[s][c]||[]).concat(u)})}[_ue](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of cF(n))e(c,n[c]);else s(r,this[Sue](n),o)}[Sue](e){return e==="__proto__"?"___proto___":e}[Cue](e,r){return this[fF](this[Cue].bind(this),"key",e,r),this}[Iue](){var e,r,n,o,s,c,u,p,f,h,g,y;let v=Ve(this,VV,"f").pop();ng(v,void 0,Ve(this,vs,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,u=this,p=this,f=this,h=this,g=this,y=this,{options:{set value(S){ai(e,Ti,S,"f")}}.value,configObjects:A,exitProcess:{set value(S){ai(r,_v,S,"f")}}.value,groups:{set value(S){ai(n,Lw,S,"f")}}.value,output:{set value(S){ai(o,dd,S,"f")}}.value,exitError:{set value(S){ai(s,GI,S,"f")}}.value,hasOutput:{set value(S){ai(c,JA,S,"f")}}.value,parsed:this.parsed,strict:{set value(S){ai(u,lD,S,"f")}}.value,strictCommands:{set value(S){ai(p,pD,S,"f")}}.value,strictOptions:{set value(S){ai(f,fD,S,"f")}}.value,completionCommand:{set value(S){ai(h,YA,S,"f")}}.value,parseFn:{set value(S){ai(g,KA,S,"f")}}.value,parseContext:{set value(S){ai(y,cD,S,"f")}}.value}=v,Ve(this,Ti,"f").configObjects=A,Ve(this,Os,"f").unfreeze(),Ve(this,ap,"f").unfreeze(),Ve(this,Op,"f").unfreeze(),Ve(this,Sv,"f").unfreeze()}[S3e](e,r){return sD(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[C3e].bind(this),getContext:this[I3e].bind(this),getHasOutput:this[k3e].bind(this),getLoggerInstance:this[T3e].bind(this),getParseContext:this[B3e].bind(this),getParserConfiguration:this[dD].bind(this),getUsageConfiguration:this[E3e].bind(this),getUsageInstance:this[D3e].bind(this),getValidationInstance:this[P3e].bind(this),hasParseCallback:this[XV].bind(this),isGlobalContext:this[R3e].bind(this),postProcess:this[hD].bind(this),reset:this[kue].bind(this),runValidation:this[Tue].bind(this),runYargsParserAndExecuteCommands:this[T8].bind(this),setHasOutput:this[O3e].bind(this)}}[C3e](){return Ve(this,Op,"f")}[I3e](){return Ve(this,k8,"f")}[k3e](){return Ve(this,JA,"f")}[T3e](){return Ve(this,lF,"f")}[B3e](){return Ve(this,cD,"f")||{}}[D3e](){return Ve(this,Os,"f")}[P3e](){return Ve(this,ap,"f")}[XV](){return!!Ve(this,KA,"f")}[R3e](){return Ve(this,GV,"f")}[hD](e,r,n,o){return n||Ou(e)||(r||(e=this[A3e](e)),(this[dD]()["parse-positional-numbers"]||this[dD]()["parse-positional-numbers"]===void 0)&&(e=this[_3e](e)),o&&(e=iD(e,this,Ve(this,Sv,"f").getMiddleware(),!1))),e}[kue](e={}){ai(this,Ti,Ve(this,Ti,"f")||{},"f");let r={};r.local=Ve(this,Ti,"f").local||[],r.configObjects=Ve(this,Ti,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(u=>{n[u]=!0})}),Object.assign(Ve(this,uD,"f"),Object.keys(Ve(this,Lw,"f")).reduce((c,u)=>{let p=Ve(this,Lw,"f")[u].filter(f=>!(f in n));return p.length>0&&(c[u]=p),c},{})),ai(this,Lw,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(Ve(this,Ti,"f")[c]||[]).filter(u=>!n[u])}),s.forEach(c=>{r[c]=HI(Ve(this,Ti,"f")[c],u=>!n[u])}),r.envPrefix=Ve(this,Ti,"f").envPrefix,ai(this,Ti,r,"f"),ai(this,Os,Ve(this,Os,"f")?Ve(this,Os,"f").reset(n):l3e(this,Ve(this,vs,"f")),"f"),ai(this,ap,Ve(this,ap,"f")?Ve(this,ap,"f").reset(n):g3e(this,Ve(this,Os,"f"),Ve(this,vs,"f")),"f"),ai(this,Op,Ve(this,Op,"f")?Ve(this,Op,"f").reset():a3e(Ve(this,Os,"f"),Ve(this,ap,"f"),Ve(this,Sv,"f"),Ve(this,vs,"f")),"f"),Ve(this,wv,"f")||ai(this,wv,d3e(this,Ve(this,Os,"f"),Ve(this,Op,"f"),Ve(this,vs,"f")),"f"),Ve(this,Sv,"f").reset(),ai(this,YA,null,"f"),ai(this,dd,"","f"),ai(this,GI,null,"f"),ai(this,JA,!1,"f"),this.parsed=!1,this}[N3e](e,r){return Ve(this,vs,"f").path.relative(e,r)}[T8](e,r,n,o=0,s=!1){let c=!!n||s;e=e||Ve(this,WI,"f"),Ve(this,Ti,"f").__=Ve(this,vs,"f").y18n.__,Ve(this,Ti,"f").configuration=this[dD]();let u=!!Ve(this,Ti,"f").configuration["populate--"],p=Object.assign({},Ve(this,Ti,"f").configuration,{"populate--":!0}),f=Ve(this,vs,"f").Parser.detailed(e,Object.assign({},Ve(this,Ti,"f"),{configuration:{"parse-positional-numbers":!1,...p}})),h=Object.assign(f.argv,Ve(this,cD,"f")),g,y=f.aliases,v=!1,A=!1;Object.keys(h).forEach(S=>{S===Ve(this,Cv,"f")&&h[S]?v=!0:S===Ve(this,jw,"f")&&h[S]&&(A=!0)}),h.$0=this.$0,this.parsed=f,o===0&&Ve(this,Os,"f").clearCachedHelpMessage();try{if(this[bue](),r)return this[hD](h,u,!!n,!1);Ve(this,Cv,"f")&&[Ve(this,Cv,"f")].concat(y[Ve(this,Cv,"f")]||[]).filter(j=>j.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),v=!0),ai(this,GV,!1,"f");let S=Ve(this,Op,"f").getCommands(),E=Ve(this,wv,"f").completionKey in h,k=v||E||s;if(h._.length){if(S.length){let P;for(let j=o||0,L;h._[j]!==void 0;j++)if(L=String(h._[j]),S.includes(L)&&L!==Ve(this,YA,"f")){let $=Ve(this,Op,"f").runCommand(L,this,f,j+1,s,v||A||s);return this[hD]($,u,!!n,!1)}else if(!P&&L!==Ve(this,YA,"f")){P=L;break}!Ve(this,Op,"f").hasDefaultCommand()&&Ve(this,JV,"f")&&P&&!k&&Ve(this,ap,"f").recommendCommands(P,S)}Ve(this,YA,"f")&&h._.includes(Ve(this,YA,"f"))&&!E&&(Ve(this,_v,"f")&&VI(!0),this.showCompletionScript(),this.exit(0))}if(Ve(this,Op,"f").hasDefaultCommand()&&!k){let P=Ve(this,Op,"f").runCommand(null,this,f,0,s,v||A||s);return this[hD](P,u,!!n,!1)}if(E){Ve(this,_v,"f")&&VI(!0),e=[].concat(e);let P=e.slice(e.indexOf(`--${Ve(this,wv,"f").completionKey}`)+1);return Ve(this,wv,"f").getCompletion(P,(j,L)=>{if(j)throw new Nu(j.message);(L||[]).forEach($=>{Ve(this,lF,"f").log($)}),this.exit(0)}),this[hD](h,!u,!!n,!1)}if(Ve(this,JA,"f")||(v?(Ve(this,_v,"f")&&VI(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(Ve(this,_v,"f")&&VI(!0),c=!0,Ve(this,Os,"f").showVersion("log"),this.exit(0))),!c&&Ve(this,Ti,"f").skipValidation.length>0&&(c=Object.keys(h).some(P=>Ve(this,Ti,"f").skipValidation.indexOf(P)>=0&&h[P]===!0)),!c){if(f.error)throw new Nu(f.error.message);if(!E){let P=this[Tue](y,{},f.error);n||(g=iD(h,this,Ve(this,Sv,"f").getMiddleware(),!0)),g=this[S3e](P,g!=null?g:h),Ou(g)&&!n&&(g=g.then(()=>iD(h,this,Ve(this,Sv,"f").getMiddleware(),!1)))}}}catch(S){if(S instanceof Nu)Ve(this,Os,"f").fail(S.message,S);else throw S}return this[hD](g!=null?g:h,u,!!n,!0)}[Tue](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new Nu(n.message);Ve(this,ap,"f").nonOptionCount(c),Ve(this,ap,"f").requiredArguments(c,s);let u=!1;Ve(this,pD,"f")&&(u=Ve(this,ap,"f").unknownCommands(c)),Ve(this,lD,"f")&&!u?Ve(this,ap,"f").unknownArguments(c,e,r,!!o):Ve(this,fD,"f")&&Ve(this,ap,"f").unknownArguments(c,e,{},!1,!1),Ve(this,ap,"f").limitedChoices(c),Ve(this,ap,"f").implications(c),Ve(this,ap,"f").conflicting(c)}}[O3e](){ai(this,JA,!0,"f")}[mD](e){if(typeof e=="string")Ve(this,Ti,"f").key[e]=!0;else for(let r of e)Ve(this,Ti,"f").key[r]=!0}};function c3e(t){return!!t&&typeof t.getInternalMethods=="function"}var Itr=F3e(hue),L3e=Itr;var Ab={name:"edgeone",version:"1.6.7",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/nuxt-pages":"1.1.0","@edgeone/opennextjs-pages":"0.2.5","@edgeone/pages-agent-toolkit":"^0.1.34","@edgeone/pages-blob":"^0.0.13",archiver:"^7.0.1",chokidar:"^4.0.1","common-path-prefix":"^1.0.0","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6",crypto:"^1.0.1","detect-port":"^2.1.0",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","esbuild-plugin-vue":"^0.2.4","fast-glob":"^3.3.0","fs-extra":"^11.3.1",giget:"^2.0.0","ink-table":"^3.1.0",inquirer:"^8.2.4",install:"^0.13.0",lodash:"^4.17.21","mime-types":"^3.0.1",minimatch:"^9.0.5","node-persist":"^4.0.3",npm:"^10.9.1",open:"^8.4.2","p-map":"^5.5.0","parse-gitignore":"^2.0.0",portfinder:"^1.0.32",undici:"^5.29.0",vitest:"^4.0.17"},devDependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",axios:"^1.7.9",chalk:"^5.3.0",cookie:"^1.0.2",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0",ip:"^2.0.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21",moment:"^2.30.1","node-fetch":"^3.3.2",prettier:"^3.1.1",prompts:"^2.4.2",protobufjs:"^8.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3","update-check":"^1.5.4",uuid:"^9.0.0",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}};var CVe=Rt(Wc()),IVe=Rt(TF()),kVe=Rt(Rpe());function Iq(t,e){return function(){return t.apply(e,arguments)}}var{toString:kor}=Object.prototype,{getPrototypeOf:$G}=Object,{iterator:zG,toStringTag:w6e}=Symbol,HG=(t=>e=>{let r=kor.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Cb=t=>(t=t.toLowerCase(),e=>HG(e)===t),VG=t=>e=>typeof e===t,{isArray:kD}=Array,PF=VG("undefined");function RF(t){return t!==null&&!PF(t)&&t.constructor!==null&&!PF(t.constructor)&&N0(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var _6e=Cb("ArrayBuffer");function Tor(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&_6e(t.buffer),e}var Bor=VG("string"),N0=VG("function"),S6e=VG("number"),kq=t=>t!==null&&typeof t=="object",Dor=t=>t===!0||t===!1,UG=t=>{if(HG(t)!=="object")return!1;let e=$G(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(w6e in t)&&!(zG in t)},Por=t=>{if(!kq(t)||RF(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Ror=Cb("Date"),Nor=Cb("File"),Oor=t=>!!(t&&typeof t.uri<"u"),For=t=>t&&typeof t.getParts<"u",Lor=Cb("Blob"),jor=Cb("FileList"),Mor=t=>kq(t)&&N0(t.pipe);function Qor(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var b6e=Qor(),E6e=typeof b6e.FormData<"u"?b6e.FormData:void 0,qor=t=>{if(!t)return!1;if(E6e&&t instanceof E6e)return!0;let e=$G(t);if(!e||e===Object.prototype||!N0(t.append))return!1;let r=HG(t);return r==="formdata"||r==="object"&&N0(t.toString)&&t.toString()==="[object FormData]"},Uor=Cb("URLSearchParams"),[$or,zor,Hor,Vor]=["ReadableStream","Request","Response","Headers"].map(Cb),Gor=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tq(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),kD(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(RF(t))return;let s=r?Object.getOwnPropertyNames(t):Object.keys(t),c=s.length,u;for(n=0;n<c;n++)u=s[n],e.call(null,t[u],u,t)}}function C6e(t,e){if(RF(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var ID=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,I6e=t=>!PF(t)&&t!==ID;function Npe(...t){let{caseless:e,skipUndefined:r}=I6e(this)&&this||{},n={},o=(s,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;let u=e&&typeof c=="string"&&C6e(n,c)||c,p=Ope(n,u)?n[u]:void 0;UG(p)&&UG(s)?n[u]=Npe(p,s):UG(s)?n[u]=Npe({},s):kD(s)?n[u]=s.slice():(!r||!PF(s))&&(n[u]=s)};for(let s=0,c=t.length;s<c;s++){let u=t[s];if(!u||RF(u)||(Tq(u,o),typeof u!="object"||kD(u)))continue;let p=Object.getOwnPropertySymbols(u);for(let f=0;f<p.length;f++){let h=p[f];sar.call(u,h)&&o(u[h],h)}}return n}var Wor=(t,e,r,{allOwnKeys:n}={})=>(Tq(e,(o,s)=>{r&&N0(o)?Object.defineProperty(t,s,{__proto__:null,value:Iq(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Yor=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Jor=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},Kor=(t,e,r,n)=>{let o,s,c,u={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)c=o[s],(!n||n(c,t,e))&&!u[c]&&(e[c]=t[c],u[c]=!0);t=r!==!1&&$G(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Xor=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},Zor=t=>{if(!t)return null;if(kD(t))return t;let e=t.length;if(!S6e(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},ear=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&$G(Uint8Array)),tar=(t,e)=>{let n=(t&&t[zG]).call(t),o;for(;(o=n.next())&&!o.done;){let s=o.value;e.call(t,s[0],s[1])}},rar=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},nar=Cb("HTMLFormElement"),iar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Ope=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),{propertyIsEnumerable:sar}=Object.prototype,oar=Cb("RegExp"),k6e=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};Tq(r,(o,s)=>{let c;(c=e(o,s,t))!==!1&&(n[s]=c||o)}),Object.defineProperties(t,n)},aar=t=>{k6e(t,(e,r)=>{if(N0(t)&&["arguments","caller","callee"].includes(r))return!1;let n=t[r];if(N0(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},car=(t,e)=>{let r={},n=o=>{o.forEach(s=>{r[s]=!0})};return kD(t)?n(t):n(String(t).split(e)),r},uar=()=>{},lar=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function par(t){return!!(t&&N0(t.append)&&t[w6e]==="FormData"&&t[zG])}var far=t=>{let e=new WeakSet,r=n=>{if(kq(n)){if(e.has(n))return;if(RF(n))return n;if(!("toJSON"in n)){e.add(n);let o=kD(n)?[]:{};return Tq(n,(s,c)=>{let u=r(s);!PF(u)&&(o[c]=u)}),e.delete(n),o}}return n};return r(t)},dar=Cb("AsyncFunction"),har=t=>t&&(kq(t)||N0(t))&&N0(t.then)&&N0(t.catch),T6e=((t,e)=>t?setImmediate:e?((r,n)=>(ID.addEventListener("message",({source:o,data:s})=>{o===ID&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),ID.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N0(ID.postMessage)),mar=typeof queueMicrotask<"u"?queueMicrotask.bind(ID):typeof process<"u"&&process.nextTick||T6e,gar=t=>t!=null&&N0(t[zG]),pt={isArray:kD,isArrayBuffer:_6e,isBuffer:RF,isFormData:qor,isArrayBufferView:Tor,isString:Bor,isNumber:S6e,isBoolean:Dor,isObject:kq,isPlainObject:UG,isEmptyObject:Por,isReadableStream:$or,isRequest:zor,isResponse:Hor,isHeaders:Vor,isUndefined:PF,isDate:Ror,isFile:Nor,isReactNativeBlob:Oor,isReactNative:For,isBlob:Lor,isRegExp:oar,isFunction:N0,isStream:Mor,isURLSearchParams:Uor,isTypedArray:ear,isFileList:jor,forEach:Tq,merge:Npe,extend:Wor,trim:Gor,stripBOM:Yor,inherits:Jor,toFlatObject:Kor,kindOf:HG,kindOfTest:Cb,endsWith:Xor,toArray:Zor,forEachEntry:tar,matchAll:rar,isHTMLForm:nar,hasOwnProperty:Ope,hasOwnProp:Ope,reduceDescriptors:k6e,freezeMethods:aar,toObjectSet:car,toCamelCase:iar,noop:uar,toFiniteNumber:lar,findKey:C6e,global:ID,isContextDefined:I6e,isSpecCompliantForm:par,toJSONObject:far,isAsyncFn:dar,isThenable:har,setImmediate:T6e,asap:mar,isIterable:gar};var Aar=pt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),B6e=t=>{let e={},r,n,o;return t&&t.split(`
568
+ `,"f"),ai(this,dd,Ve(this,dd,"f")+e.join(" "),"f")}}}[xue](e){cF(Ve(this,Ti,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=Ve(this,Ti,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete Ve(this,Os,"f").getDescriptions()[e]}[v3e](e,r,n){Ve(this,HV,"f")[n]||(Ve(this,vs,"f").process.emitWarning(e,r),Ve(this,HV,"f")[n]=!0)}[x3e](){Ve(this,VV,"f").push({options:Ve(this,Ti,"f"),configObjects:Ve(this,Ti,"f").configObjects.slice(0),exitProcess:Ve(this,_v,"f"),groups:Ve(this,Lw,"f"),strict:Ve(this,lD,"f"),strictCommands:Ve(this,pD,"f"),strictOptions:Ve(this,fD,"f"),completionCommand:Ve(this,YA,"f"),output:Ve(this,dd,"f"),exitError:Ve(this,GI,"f"),hasOutput:Ve(this,JA,"f"),parsed:this.parsed,parseFn:Ve(this,KA,"f"),parseContext:Ve(this,cD,"f")}),Ve(this,Os,"f").freeze(),Ve(this,ap,"f").freeze(),Ve(this,Op,"f").freeze(),Ve(this,Sv,"f").freeze()}[b3e](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(Ve(this,vs,"f").process.argv()[0])?r=Ve(this,vs,"f").process.argv().slice(1,2):r=Ve(this,vs,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[N3e](Ve(this,oD,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length<n.length?o:n}).join(" ").trim(),Ve(this,vs,"f").getEnv("_")&&Ve(this,vs,"f").getProcessArgvBin()===Ve(this,vs,"f").getEnv("_")&&(e=Ve(this,vs,"f").getEnv("_").replace(`${Ve(this,vs,"f").path.dirname(Ve(this,vs,"f").process.execPath())}/`,"")),e}[dD](){return Ve(this,YV,"f")}[E3e](){return Ve(this,KV,"f")}[bue](){if(!Ve(this,aD,"f"))return;let e=Ve(this,vs,"f").getEnv("LC_ALL")||Ve(this,vs,"f").getEnv("LC_MESSAGES")||Ve(this,vs,"f").getEnv("LANG")||Ve(this,vs,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[w3e](){return this[Eue]().version||"unknown"}[_3e](e){let r=e["--"]?e["--"]:e._;for(let n=0,o;(o=r[n])!==void 0;n++)Ve(this,vs,"f").Parser.looksLikeNumber(o)&&Number.isSafeInteger(Math.floor(parseFloat(`${o}`)))&&(r[n]=Number(o));return e}[Eue](e){let r=e||"*";if(Ve(this,pF,"f")[r])return Ve(this,pF,"f")[r];let n={};try{let o=e||Ve(this,vs,"f").mainFilename;!e&&Ve(this,vs,"f").path.extname(o)&&(o=Ve(this,vs,"f").path.dirname(o));let s=Ve(this,vs,"f").findUp(o,(c,u)=>{if(u.includes("package.json"))return"package.json"});ng(s,void 0,Ve(this,vs,"f")),n=JSON.parse(Ve(this,vs,"f").readFileSync(s,"utf8"))}catch{}return Ve(this,pF,"f")[r]=n||{},Ve(this,pF,"f")[r]}[YI](e,r){r=[].concat(r),r.forEach(n=>{n=this[Sue](n),Ve(this,Ti,"f")[e].push(n)})}[fF](e,r,n,o){this[_ue](e,r,n,o,(s,c,u)=>{Ve(this,Ti,"f")[s][c]=u})}[wue](e,r,n,o){this[_ue](e,r,n,o,(s,c,u)=>{Ve(this,Ti,"f")[s][c]=(Ve(this,Ti,"f")[s][c]||[]).concat(u)})}[_ue](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of cF(n))e(c,n[c]);else s(r,this[Sue](n),o)}[Sue](e){return e==="__proto__"?"___proto___":e}[Cue](e,r){return this[fF](this[Cue].bind(this),"key",e,r),this}[Iue](){var e,r,n,o,s,c,u,p,f,h,g,y;let v=Ve(this,VV,"f").pop();ng(v,void 0,Ve(this,vs,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,u=this,p=this,f=this,h=this,g=this,y=this,{options:{set value(S){ai(e,Ti,S,"f")}}.value,configObjects:A,exitProcess:{set value(S){ai(r,_v,S,"f")}}.value,groups:{set value(S){ai(n,Lw,S,"f")}}.value,output:{set value(S){ai(o,dd,S,"f")}}.value,exitError:{set value(S){ai(s,GI,S,"f")}}.value,hasOutput:{set value(S){ai(c,JA,S,"f")}}.value,parsed:this.parsed,strict:{set value(S){ai(u,lD,S,"f")}}.value,strictCommands:{set value(S){ai(p,pD,S,"f")}}.value,strictOptions:{set value(S){ai(f,fD,S,"f")}}.value,completionCommand:{set value(S){ai(h,YA,S,"f")}}.value,parseFn:{set value(S){ai(g,KA,S,"f")}}.value,parseContext:{set value(S){ai(y,cD,S,"f")}}.value}=v,Ve(this,Ti,"f").configObjects=A,Ve(this,Os,"f").unfreeze(),Ve(this,ap,"f").unfreeze(),Ve(this,Op,"f").unfreeze(),Ve(this,Sv,"f").unfreeze()}[S3e](e,r){return sD(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[C3e].bind(this),getContext:this[I3e].bind(this),getHasOutput:this[k3e].bind(this),getLoggerInstance:this[T3e].bind(this),getParseContext:this[B3e].bind(this),getParserConfiguration:this[dD].bind(this),getUsageConfiguration:this[E3e].bind(this),getUsageInstance:this[D3e].bind(this),getValidationInstance:this[P3e].bind(this),hasParseCallback:this[XV].bind(this),isGlobalContext:this[R3e].bind(this),postProcess:this[hD].bind(this),reset:this[kue].bind(this),runValidation:this[Tue].bind(this),runYargsParserAndExecuteCommands:this[T8].bind(this),setHasOutput:this[O3e].bind(this)}}[C3e](){return Ve(this,Op,"f")}[I3e](){return Ve(this,k8,"f")}[k3e](){return Ve(this,JA,"f")}[T3e](){return Ve(this,lF,"f")}[B3e](){return Ve(this,cD,"f")||{}}[D3e](){return Ve(this,Os,"f")}[P3e](){return Ve(this,ap,"f")}[XV](){return!!Ve(this,KA,"f")}[R3e](){return Ve(this,GV,"f")}[hD](e,r,n,o){return n||Ou(e)||(r||(e=this[A3e](e)),(this[dD]()["parse-positional-numbers"]||this[dD]()["parse-positional-numbers"]===void 0)&&(e=this[_3e](e)),o&&(e=iD(e,this,Ve(this,Sv,"f").getMiddleware(),!1))),e}[kue](e={}){ai(this,Ti,Ve(this,Ti,"f")||{},"f");let r={};r.local=Ve(this,Ti,"f").local||[],r.configObjects=Ve(this,Ti,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(u=>{n[u]=!0})}),Object.assign(Ve(this,uD,"f"),Object.keys(Ve(this,Lw,"f")).reduce((c,u)=>{let p=Ve(this,Lw,"f")[u].filter(f=>!(f in n));return p.length>0&&(c[u]=p),c},{})),ai(this,Lw,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(Ve(this,Ti,"f")[c]||[]).filter(u=>!n[u])}),s.forEach(c=>{r[c]=HI(Ve(this,Ti,"f")[c],u=>!n[u])}),r.envPrefix=Ve(this,Ti,"f").envPrefix,ai(this,Ti,r,"f"),ai(this,Os,Ve(this,Os,"f")?Ve(this,Os,"f").reset(n):l3e(this,Ve(this,vs,"f")),"f"),ai(this,ap,Ve(this,ap,"f")?Ve(this,ap,"f").reset(n):g3e(this,Ve(this,Os,"f"),Ve(this,vs,"f")),"f"),ai(this,Op,Ve(this,Op,"f")?Ve(this,Op,"f").reset():a3e(Ve(this,Os,"f"),Ve(this,ap,"f"),Ve(this,Sv,"f"),Ve(this,vs,"f")),"f"),Ve(this,wv,"f")||ai(this,wv,d3e(this,Ve(this,Os,"f"),Ve(this,Op,"f"),Ve(this,vs,"f")),"f"),Ve(this,Sv,"f").reset(),ai(this,YA,null,"f"),ai(this,dd,"","f"),ai(this,GI,null,"f"),ai(this,JA,!1,"f"),this.parsed=!1,this}[N3e](e,r){return Ve(this,vs,"f").path.relative(e,r)}[T8](e,r,n,o=0,s=!1){let c=!!n||s;e=e||Ve(this,WI,"f"),Ve(this,Ti,"f").__=Ve(this,vs,"f").y18n.__,Ve(this,Ti,"f").configuration=this[dD]();let u=!!Ve(this,Ti,"f").configuration["populate--"],p=Object.assign({},Ve(this,Ti,"f").configuration,{"populate--":!0}),f=Ve(this,vs,"f").Parser.detailed(e,Object.assign({},Ve(this,Ti,"f"),{configuration:{"parse-positional-numbers":!1,...p}})),h=Object.assign(f.argv,Ve(this,cD,"f")),g,y=f.aliases,v=!1,A=!1;Object.keys(h).forEach(S=>{S===Ve(this,Cv,"f")&&h[S]?v=!0:S===Ve(this,jw,"f")&&h[S]&&(A=!0)}),h.$0=this.$0,this.parsed=f,o===0&&Ve(this,Os,"f").clearCachedHelpMessage();try{if(this[bue](),r)return this[hD](h,u,!!n,!1);Ve(this,Cv,"f")&&[Ve(this,Cv,"f")].concat(y[Ve(this,Cv,"f")]||[]).filter(j=>j.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),v=!0),ai(this,GV,!1,"f");let S=Ve(this,Op,"f").getCommands(),E=Ve(this,wv,"f").completionKey in h,k=v||E||s;if(h._.length){if(S.length){let P;for(let j=o||0,L;h._[j]!==void 0;j++)if(L=String(h._[j]),S.includes(L)&&L!==Ve(this,YA,"f")){let $=Ve(this,Op,"f").runCommand(L,this,f,j+1,s,v||A||s);return this[hD]($,u,!!n,!1)}else if(!P&&L!==Ve(this,YA,"f")){P=L;break}!Ve(this,Op,"f").hasDefaultCommand()&&Ve(this,JV,"f")&&P&&!k&&Ve(this,ap,"f").recommendCommands(P,S)}Ve(this,YA,"f")&&h._.includes(Ve(this,YA,"f"))&&!E&&(Ve(this,_v,"f")&&VI(!0),this.showCompletionScript(),this.exit(0))}if(Ve(this,Op,"f").hasDefaultCommand()&&!k){let P=Ve(this,Op,"f").runCommand(null,this,f,0,s,v||A||s);return this[hD](P,u,!!n,!1)}if(E){Ve(this,_v,"f")&&VI(!0),e=[].concat(e);let P=e.slice(e.indexOf(`--${Ve(this,wv,"f").completionKey}`)+1);return Ve(this,wv,"f").getCompletion(P,(j,L)=>{if(j)throw new Nu(j.message);(L||[]).forEach($=>{Ve(this,lF,"f").log($)}),this.exit(0)}),this[hD](h,!u,!!n,!1)}if(Ve(this,JA,"f")||(v?(Ve(this,_v,"f")&&VI(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(Ve(this,_v,"f")&&VI(!0),c=!0,Ve(this,Os,"f").showVersion("log"),this.exit(0))),!c&&Ve(this,Ti,"f").skipValidation.length>0&&(c=Object.keys(h).some(P=>Ve(this,Ti,"f").skipValidation.indexOf(P)>=0&&h[P]===!0)),!c){if(f.error)throw new Nu(f.error.message);if(!E){let P=this[Tue](y,{},f.error);n||(g=iD(h,this,Ve(this,Sv,"f").getMiddleware(),!0)),g=this[S3e](P,g!=null?g:h),Ou(g)&&!n&&(g=g.then(()=>iD(h,this,Ve(this,Sv,"f").getMiddleware(),!1)))}}}catch(S){if(S instanceof Nu)Ve(this,Os,"f").fail(S.message,S);else throw S}return this[hD](g!=null?g:h,u,!!n,!0)}[Tue](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new Nu(n.message);Ve(this,ap,"f").nonOptionCount(c),Ve(this,ap,"f").requiredArguments(c,s);let u=!1;Ve(this,pD,"f")&&(u=Ve(this,ap,"f").unknownCommands(c)),Ve(this,lD,"f")&&!u?Ve(this,ap,"f").unknownArguments(c,e,r,!!o):Ve(this,fD,"f")&&Ve(this,ap,"f").unknownArguments(c,e,{},!1,!1),Ve(this,ap,"f").limitedChoices(c),Ve(this,ap,"f").implications(c),Ve(this,ap,"f").conflicting(c)}}[O3e](){ai(this,JA,!0,"f")}[mD](e){if(typeof e=="string")Ve(this,Ti,"f").key[e]=!0;else for(let r of e)Ve(this,Ti,"f").key[r]=!0}};function c3e(t){return!!t&&typeof t.getInternalMethods=="function"}var Itr=F3e(hue),L3e=Itr;var Ab={name:"edgeone",version:"1.6.8",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/nuxt-pages":"1.1.0","@edgeone/opennextjs-pages":"0.2.5","@edgeone/pages-agent-toolkit":"^0.1.34","@edgeone/pages-blob":"^0.0.13",archiver:"^7.0.1",chokidar:"^4.0.1","common-path-prefix":"^1.0.0","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6",crypto:"^1.0.1","detect-port":"^2.1.0",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","esbuild-plugin-vue":"^0.2.4","fast-glob":"^3.3.0","fs-extra":"^11.3.1",giget:"^2.0.0","ink-table":"^3.1.0",inquirer:"^8.2.4",install:"^0.13.0",lodash:"^4.17.21","mime-types":"^3.0.1",minimatch:"^9.0.5","node-persist":"^4.0.3",npm:"^10.9.1",open:"^8.4.2","p-map":"^5.5.0","parse-gitignore":"^2.0.0",portfinder:"^1.0.32",undici:"^5.29.0",vitest:"^4.0.17"},devDependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",axios:"^1.7.9",chalk:"^5.3.0",cookie:"^1.0.2",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0",ip:"^2.0.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21",moment:"^2.30.1","node-fetch":"^3.3.2",prettier:"^3.1.1",prompts:"^2.4.2",protobufjs:"^8.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3","update-check":"^1.5.4",uuid:"^9.0.0",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}};var CVe=Rt(Wc()),IVe=Rt(TF()),kVe=Rt(Rpe());function Iq(t,e){return function(){return t.apply(e,arguments)}}var{toString:kor}=Object.prototype,{getPrototypeOf:$G}=Object,{iterator:zG,toStringTag:w6e}=Symbol,HG=(t=>e=>{let r=kor.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Cb=t=>(t=t.toLowerCase(),e=>HG(e)===t),VG=t=>e=>typeof e===t,{isArray:kD}=Array,PF=VG("undefined");function RF(t){return t!==null&&!PF(t)&&t.constructor!==null&&!PF(t.constructor)&&N0(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var _6e=Cb("ArrayBuffer");function Tor(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&_6e(t.buffer),e}var Bor=VG("string"),N0=VG("function"),S6e=VG("number"),kq=t=>t!==null&&typeof t=="object",Dor=t=>t===!0||t===!1,UG=t=>{if(HG(t)!=="object")return!1;let e=$G(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(w6e in t)&&!(zG in t)},Por=t=>{if(!kq(t)||RF(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Ror=Cb("Date"),Nor=Cb("File"),Oor=t=>!!(t&&typeof t.uri<"u"),For=t=>t&&typeof t.getParts<"u",Lor=Cb("Blob"),jor=Cb("FileList"),Mor=t=>kq(t)&&N0(t.pipe);function Qor(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var b6e=Qor(),E6e=typeof b6e.FormData<"u"?b6e.FormData:void 0,qor=t=>{if(!t)return!1;if(E6e&&t instanceof E6e)return!0;let e=$G(t);if(!e||e===Object.prototype||!N0(t.append))return!1;let r=HG(t);return r==="formdata"||r==="object"&&N0(t.toString)&&t.toString()==="[object FormData]"},Uor=Cb("URLSearchParams"),[$or,zor,Hor,Vor]=["ReadableStream","Request","Response","Headers"].map(Cb),Gor=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tq(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),kD(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(RF(t))return;let s=r?Object.getOwnPropertyNames(t):Object.keys(t),c=s.length,u;for(n=0;n<c;n++)u=s[n],e.call(null,t[u],u,t)}}function C6e(t,e){if(RF(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var ID=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,I6e=t=>!PF(t)&&t!==ID;function Npe(...t){let{caseless:e,skipUndefined:r}=I6e(this)&&this||{},n={},o=(s,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;let u=e&&typeof c=="string"&&C6e(n,c)||c,p=Ope(n,u)?n[u]:void 0;UG(p)&&UG(s)?n[u]=Npe(p,s):UG(s)?n[u]=Npe({},s):kD(s)?n[u]=s.slice():(!r||!PF(s))&&(n[u]=s)};for(let s=0,c=t.length;s<c;s++){let u=t[s];if(!u||RF(u)||(Tq(u,o),typeof u!="object"||kD(u)))continue;let p=Object.getOwnPropertySymbols(u);for(let f=0;f<p.length;f++){let h=p[f];sar.call(u,h)&&o(u[h],h)}}return n}var Wor=(t,e,r,{allOwnKeys:n}={})=>(Tq(e,(o,s)=>{r&&N0(o)?Object.defineProperty(t,s,{__proto__:null,value:Iq(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Yor=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Jor=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},Kor=(t,e,r,n)=>{let o,s,c,u={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)c=o[s],(!n||n(c,t,e))&&!u[c]&&(e[c]=t[c],u[c]=!0);t=r!==!1&&$G(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Xor=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},Zor=t=>{if(!t)return null;if(kD(t))return t;let e=t.length;if(!S6e(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},ear=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&$G(Uint8Array)),tar=(t,e)=>{let n=(t&&t[zG]).call(t),o;for(;(o=n.next())&&!o.done;){let s=o.value;e.call(t,s[0],s[1])}},rar=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},nar=Cb("HTMLFormElement"),iar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Ope=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),{propertyIsEnumerable:sar}=Object.prototype,oar=Cb("RegExp"),k6e=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};Tq(r,(o,s)=>{let c;(c=e(o,s,t))!==!1&&(n[s]=c||o)}),Object.defineProperties(t,n)},aar=t=>{k6e(t,(e,r)=>{if(N0(t)&&["arguments","caller","callee"].includes(r))return!1;let n=t[r];if(N0(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},car=(t,e)=>{let r={},n=o=>{o.forEach(s=>{r[s]=!0})};return kD(t)?n(t):n(String(t).split(e)),r},uar=()=>{},lar=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function par(t){return!!(t&&N0(t.append)&&t[w6e]==="FormData"&&t[zG])}var far=t=>{let e=new WeakSet,r=n=>{if(kq(n)){if(e.has(n))return;if(RF(n))return n;if(!("toJSON"in n)){e.add(n);let o=kD(n)?[]:{};return Tq(n,(s,c)=>{let u=r(s);!PF(u)&&(o[c]=u)}),e.delete(n),o}}return n};return r(t)},dar=Cb("AsyncFunction"),har=t=>t&&(kq(t)||N0(t))&&N0(t.then)&&N0(t.catch),T6e=((t,e)=>t?setImmediate:e?((r,n)=>(ID.addEventListener("message",({source:o,data:s})=>{o===ID&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),ID.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N0(ID.postMessage)),mar=typeof queueMicrotask<"u"?queueMicrotask.bind(ID):typeof process<"u"&&process.nextTick||T6e,gar=t=>t!=null&&N0(t[zG]),pt={isArray:kD,isArrayBuffer:_6e,isBuffer:RF,isFormData:qor,isArrayBufferView:Tor,isString:Bor,isNumber:S6e,isBoolean:Dor,isObject:kq,isPlainObject:UG,isEmptyObject:Por,isReadableStream:$or,isRequest:zor,isResponse:Hor,isHeaders:Vor,isUndefined:PF,isDate:Ror,isFile:Nor,isReactNativeBlob:Oor,isReactNative:For,isBlob:Lor,isRegExp:oar,isFunction:N0,isStream:Mor,isURLSearchParams:Uor,isTypedArray:ear,isFileList:jor,forEach:Tq,merge:Npe,extend:Wor,trim:Gor,stripBOM:Yor,inherits:Jor,toFlatObject:Kor,kindOf:HG,kindOfTest:Cb,endsWith:Xor,toArray:Zor,forEachEntry:tar,matchAll:rar,isHTMLForm:nar,hasOwnProperty:Ope,hasOwnProp:Ope,reduceDescriptors:k6e,freezeMethods:aar,toObjectSet:car,toCamelCase:iar,noop:uar,toFiniteNumber:lar,findKey:C6e,global:ID,isContextDefined:I6e,isSpecCompliantForm:par,toJSONObject:far,isAsyncFn:dar,isThenable:har,setImmediate:T6e,asap:mar,isIterable:gar};var Aar=pt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),B6e=t=>{let e={},r,n,o;return t&&t.split(`
569
569
  `).forEach(function(c){o=c.indexOf(":"),r=c.substring(0,o).trim().toLowerCase(),n=c.substring(o+1).trim(),!(!r||e[r]&&Aar[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};function yar(t){let e=0,r=t.length;for(;e<r;){let n=t.charCodeAt(e);if(n!==9&&n!==32)break;e+=1}for(;r>e;){let n=t.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}var xar=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),bar=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Fpe(t,e){return pt.isArray(t)?t.map(r=>Fpe(r,e)):yar(String(t).replace(e,""))}var D6e=t=>Fpe(t,xar),Ear=t=>Fpe(t,bar);function NF(t){let e=Object.create(null);return pt.forEach(t.toJSON(),(r,n)=>{e[n]=Ear(r)}),e}var P6e=Symbol("internals");function Bq(t){return t&&String(t).trim().toLowerCase()}function GG(t){return t===!1||t==null?t:pt.isArray(t)?t.map(GG):D6e(String(t))}function war(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var _ar=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Lpe(t,e,r,n,o){if(pt.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!pt.isString(e)){if(pt.isString(n))return e.indexOf(n)!==-1;if(pt.isRegExp(n))return n.test(e)}}function Sar(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Car(t,e){let r=pt.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{__proto__:null,value:function(o,s,c){return this[n].call(this,e,o,s,c)},configurable:!0})})}var OF=class{constructor(e){e&&this.set(e)}set(e,r,n){let o=this;function s(u,p,f){let h=Bq(p);if(!h)return;let g=pt.findKey(o,h);(!g||o[g]===void 0||f===!0||f===void 0&&o[g]!==!1)&&(o[g||p]=GG(u))}let c=(u,p)=>pt.forEach(u,(f,h)=>s(f,h,p));if(pt.isPlainObject(e)||e instanceof this.constructor)c(e,r);else if(pt.isString(e)&&(e=e.trim())&&!_ar(e))c(B6e(e),r);else if(pt.isObject(e)&&pt.isIterable(e)){let u={},p,f;for(let h of e){if(!pt.isArray(h))throw new TypeError("Object iterator must return a key-value pair");u[f=h[0]]=(p=u[f])?pt.isArray(p)?[...p,h[1]]:[p,h[1]]:h[1]}c(u,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Bq(e),e){let n=pt.findKey(this,e);if(n){let o=this[n];if(!r)return o;if(r===!0)return war(o);if(pt.isFunction(r))return r.call(this,o,n);if(pt.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Bq(e),e){let n=pt.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Lpe(this,this[n],n,r)))}return!1}delete(e,r){let n=this,o=!1;function s(c){if(c=Bq(c),c){let u=pt.findKey(n,c);u&&(!r||Lpe(n,n[u],u,r))&&(delete n[u],o=!0)}}return pt.isArray(e)?e.forEach(s):s(e),o}clear(e){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let s=r[n];(!e||Lpe(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){let r=this,n={};return pt.forEach(this,(o,s)=>{let c=pt.findKey(n,s);if(c){r[c]=GG(o),delete r[s];return}let u=e?Sar(s):String(s).trim();u!==s&&delete r[s],r[u]=GG(o),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return pt.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&pt.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
570
570
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){let n=(this[P6e]=this[P6e]={accessors:{}}).accessors,o=this.prototype;function s(c){let u=Bq(c);n[u]||(Car(o,c),n[u]=!0)}return pt.isArray(e)?e.forEach(s):s(e),this}};OF.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);pt.reduceDescriptors(OF.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});pt.freezeMethods(OF);var Lu=OF;var Iar="[REDACTED ****]";function kar(t){if(pt.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(pt.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function Tar(t,e){let r=new Set(e.map(s=>String(s).toLowerCase())),n=[],o=s=>{if(s===null||typeof s!="object"||pt.isBuffer(s))return s;if(n.indexOf(s)!==-1)return;s instanceof Lu&&(s=s.toJSON()),n.push(s);let c;if(pt.isArray(s))c=[],s.forEach((u,p)=>{let f=o(u);pt.isUndefined(f)||(c[p]=f)});else{if(!pt.isPlainObject(s)&&kar(s))return n.pop(),s;c=Object.create(null);for(let[u,p]of Object.entries(s)){let f=r.has(u.toLowerCase())?Iar:o(p);pt.isUndefined(f)||(c[u]=f)}}return n.pop(),c};return o(t)}var lh=class t extends Error{static from(e,r,n,o,s,c){let u=new t(e.message,r||e.code,n,o,s);return u.cause=e,u.name=e.name,e.status!=null&&u.status==null&&(u.status=e.status),c&&Object.assign(u,c),u}constructor(e,r,n,o,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){let e=this.config,r=e&&pt.hasOwnProp(e,"redact")?e.redact:void 0,n=pt.isArray(r)&&r.length>0?Tar(e,r):pt.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};lh.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";lh.ERR_BAD_OPTION="ERR_BAD_OPTION";lh.ECONNABORTED="ECONNABORTED";lh.ETIMEDOUT="ETIMEDOUT";lh.ECONNREFUSED="ECONNREFUSED";lh.ERR_NETWORK="ERR_NETWORK";lh.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";lh.ERR_DEPRECATED="ERR_DEPRECATED";lh.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";lh.ERR_BAD_REQUEST="ERR_BAD_REQUEST";lh.ERR_CANCELED="ERR_CANCELED";lh.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";lh.ERR_INVALID_URL="ERR_INVALID_URL";lh.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Jr=lh;var N5e=Rt(R5e(),1),sW=N5e.default;function sfe(t){return pt.isPlainObject(t)||pt.isArray(t)}function O5e(t){return pt.endsWith(t,"[]")?t.slice(0,-2):t}function ife(t,e,r){return t?t.concat(e).map(function(o,s){return o=O5e(o),!r&&s?"["+o+"]":o}).join(r?".":""):e}function hur(t){return pt.isArray(t)&&!t.some(sfe)}var mur=pt.toFlatObject(pt,{},null,function(e){return/^is[A-Z]/.test(e)});function gur(t,e,r){if(!pt.isObject(t))throw new TypeError("target must be an object");e=e||new(sW||FormData),r=pt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,k){return!pt.isUndefined(k[E])});let n=r.metaTokens,o=r.visitor||g,s=r.dots,c=r.indexes,u=r.Blob||typeof Blob<"u"&&Blob,p=r.maxDepth===void 0?100:r.maxDepth,f=u&&pt.isSpecCompliantForm(e);if(!pt.isFunction(o))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(pt.isDate(S))return S.toISOString();if(pt.isBoolean(S))return S.toString();if(!f&&pt.isBlob(S))throw new Jr("Blob is not supported. Use a Buffer instead.");return pt.isArrayBuffer(S)||pt.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,E,k){let P=S;if(pt.isReactNative(e)&&pt.isReactNativeBlob(S))return e.append(ife(k,E,s),h(S)),!1;if(S&&!k&&typeof S=="object"){if(pt.endsWith(E,"{}"))E=n?E:E.slice(0,-2),S=JSON.stringify(S);else if(pt.isArray(S)&&hur(S)||(pt.isFileList(S)||pt.endsWith(E,"[]"))&&(P=pt.toArray(S)))return E=O5e(E),P.forEach(function(L,$){!(pt.isUndefined(L)||L===null)&&e.append(c===!0?ife([E],$,s):c===null?E:E+"[]",h(L))}),!1}return sfe(S)?!0:(e.append(ife(k,E,s),h(S)),!1)}let y=[],v=Object.assign(mur,{defaultVisitor:g,convertValue:h,isVisitable:sfe});function A(S,E,k=0){if(!pt.isUndefined(S)){if(k>p)throw new Jr("Object is too deeply nested ("+k+" levels). Max depth: "+p,Jr.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(S)!==-1)throw new Error("Circular reference detected in "+E.join("."));y.push(S),pt.forEach(S,function(j,L){(!(pt.isUndefined(j)||j===null)&&o.call(e,j,pt.isString(L)?L.trim():L,E,v))===!0&&A(j,E?E.concat(L):[L],k+1)}),y.pop()}}if(!pt.isObject(t))throw new TypeError("data must be an object");return A(t),e}var rk=gur;function F5e(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(n){return e[n]})}function L5e(t,e){this._pairs=[],t&&rk(t,this,e)}var j5e=L5e.prototype;j5e.append=function(e,r){this._pairs.push([e,r])};j5e.toString=function(e){let r=e?function(n){return e.call(this,n,F5e)}:F5e;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var M5e=L5e;function Aur(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function BD(t,e,r){if(!e)return t;let n=r&&r.encode||Aur,o=pt.isFunction(r)?{serialize:r}:r,s=o&&o.serialize,c;if(s?c=s(e,o):c=pt.isURLSearchParams(e)?e.toString():new M5e(e,o).toString(n),c){let u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}var ofe=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){pt.forEach(this.handlers,function(n){n!==null&&e(n)})}},afe=ofe;var nk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1};var $5e=Rt(require("crypto"),1);var Q5e=Rt(require("url"),1),q5e=Q5e.default.URLSearchParams;var cfe="abcdefghijklmnopqrstuvwxyz",U5e="0123456789",z5e={DIGIT:U5e,ALPHA:cfe,ALPHA_DIGIT:cfe+cfe.toUpperCase()+U5e},yur=(t=16,e=z5e.ALPHA_DIGIT)=>{let r="",{length:n}=e,o=new Uint32Array(t);$5e.default.randomFillSync(o);for(let s=0;s<t;s++)r+=e[o[s]%n];return r},H5e={isNode:!0,classes:{URLSearchParams:q5e,FormData:sW,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:z5e,generateString:yur,protocols:["http","https","file","data"]};var pfe={};tue(pfe,{hasBrowserEnv:()=>lfe,hasStandardBrowserEnv:()=>vur,hasStandardBrowserWebWorkerEnv:()=>xur,navigator:()=>ufe,origin:()=>bur});var lfe=typeof window<"u"&&typeof document<"u",ufe=typeof navigator=="object"&&navigator||void 0,vur=lfe&&(!ufe||["ReactNative","NativeScript","NS"].indexOf(ufe.product)<0),xur=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bur=lfe&&window.location.href||"http://localhost";var Ha={...pfe,...H5e};function ffe(t,e){return rk(t,new Ha.classes.URLSearchParams,{visitor:function(r,n,o,s){return Ha.isNode&&pt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function Eur(t){return pt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function wur(t){let e={},r=Object.keys(t),n,o=r.length,s;for(n=0;n<o;n++)s=r[n],e[s]=t[s];return e}function _ur(t){function e(r,n,o,s){let c=r[s++];if(c==="__proto__")return!0;let u=Number.isFinite(+c),p=s>=r.length;return c=!c&&pt.isArray(o)?o.length:c,p?(pt.hasOwnProp(o,c)?o[c]=pt.isArray(o[c])?o[c].concat(n):[o[c],n]:o[c]=n,!u):((!pt.hasOwnProp(o,c)||!pt.isObject(o[c]))&&(o[c]=[]),e(r,n,o[c],s)&&pt.isArray(o[c])&&(o[c]=wur(o[c])),!u)}if(pt.isFormData(t)&&pt.isFunction(t.entries)){let r={};return pt.forEachEntry(t,(n,o)=>{e(Eur(n),o,r,0)}),r}return null}var oW=_ur;var QF=(t,e)=>t!=null&&pt.hasOwnProp(t,e)?t[e]:void 0;function Sur(t,e,r){if(pt.isString(t))try{return(e||JSON.parse)(t),pt.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var dfe={transitional:nk,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=pt.isObject(e);if(s&&pt.isHTMLForm(e)&&(e=new FormData(e)),pt.isFormData(e))return o?JSON.stringify(oW(e)):e;if(pt.isArrayBuffer(e)||pt.isBuffer(e)||pt.isStream(e)||pt.isFile(e)||pt.isBlob(e)||pt.isReadableStream(e))return e;if(pt.isArrayBufferView(e))return e.buffer;if(pt.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(s){let p=QF(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return ffe(e,p).toString();if((u=pt.isFileList(e))||n.indexOf("multipart/form-data")>-1){let f=QF(this,"env"),h=f&&f.FormData;return rk(u?{"files[]":e}:e,h&&new h,p)}}return s||o?(r.setContentType("application/json",!1),Sur(e)):e}],transformResponse:[function(e){let r=QF(this,"transitional")||dfe.transitional,n=r&&r.forcedJSONParsing,o=QF(this,"responseType"),s=o==="json";if(pt.isResponse(e)||pt.isReadableStream(e))return e;if(e&&pt.isString(e)&&(n&&!o||s)){let u=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,QF(this,"parseReviver"))}catch(p){if(u)throw p.name==="SyntaxError"?Jr.from(p,Jr.ERR_BAD_RESPONSE,this,null,QF(this,"response")):p}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ha.classes.FormData,Blob:Ha.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pt.forEach(["delete","get","head","post","put","patch","query"],t=>{dfe.headers[t]={}});var qF=dfe;function Oq(t,e){let r=this||qF,n=e||r,o=Lu.from(n.headers),s=n.data;return pt.forEach(t,function(u){s=u.call(r,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function Fq(t){return!!(t&&t.__CANCEL__)}var hfe=class extends Jr{constructor(e,r,n){super(e==null?"canceled":e,Jr.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},ey=hfe;function $w(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Jr("Request failed with status code "+r.status,r.status>=400&&r.status<500?Jr.ERR_BAD_REQUEST:Jr.ERR_BAD_RESPONSE,r.config,r.request,r))}function mfe(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function gfe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function DD(t,e,r){let n=!mfe(e);return t&&(n||r===!1)?gfe(t,e):e}var Cur={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Iur(t){try{return new URL(t)}catch{return null}}function V5e(t){var e=(typeof t=="string"?Iur(t):t)||{},r=e.protocol,n=e.host,o=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),o=parseInt(o)||Cur[r]||0,!kur(n,o)))return"";var s=Afe(r+"_proxy")||Afe("all_proxy");return s&&s.indexOf("://")===-1&&(s=r+"://"+s),s}function kur(t,e){var r=Afe("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var o=n.match(/^(.+):(\d+)$/),s=o?o[1]:n,c=o?parseInt(o[2]):0;return c&&c!==e?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!t.endsWith(s)):t!==s}):!0}function Afe(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var Yfe=Rt(c9e(),1),j9e=Rt(require("http"),1),M9e=Rt(require("https"),1),Q9e=Rt(require("http2"),1),q9e=Rt(require("util"),1),Wfe=require("path"),U9e=Rt(Mfe(),1),ty=Rt(require("zlib"),1);var XS="1.17.0";function Hq(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var klr=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function Qfe(t,e,r){let n=r&&r.Blob||Ha.classes.Blob,o=Hq(t);if(e===void 0&&n&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let s=klr.exec(t);if(!s)throw new Jr("Invalid URL",Jr.ERR_INVALID_URL);let c=s[1],u=s[2],p=s[3]?"base64":"utf8",f=s[4],h;c?h=u?c+u:c:u&&(h="text/plain"+u);let g=Buffer.from(decodeURIComponent(f),p);if(e){if(!n)throw new Jr("Blob is not supported",Jr.ERR_NOT_SUPPORT);return new n([g],{type:h})}return g}throw new Jr("Unsupported protocol "+o,Jr.ERR_NOT_SUPPORT)}var Dv=Rt(require("stream"),1);var m9e=Rt(require("stream"),1);var qfe=Symbol("internals"),Ufe=class extends m9e.default.Transform{constructor(e){e=pt.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,o)=>!pt.isUndefined(o[n])),super({readableHighWaterMark:e.chunkSize});let r=this[qfe]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(e){let r=this[qfe];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let o=this[qfe],s=o.maxRate,c=this.readableHighWaterMark,u=o.timeWindow,p=1e3/u,f=s/p,h=o.minChunkSize!==!1?Math.max(o.minChunkSize,f*.01):0,g=(v,A)=>{let S=Buffer.byteLength(v);o.bytesSeen+=S,o.bytes+=S,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(v)?process.nextTick(A):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(A)}},y=(v,A)=>{let S=Buffer.byteLength(v),E=null,k=c,P,j=0;if(s){let L=Date.now();(!o.ts||(j=L-o.ts)>=u)&&(o.ts=L,P=f-o.bytes,o.bytes=P<0?-P:0,j=0),P=f-o.bytes}if(s){if(P<=0)return setTimeout(()=>{A(null,v)},u-j);P<k&&(k=P)}k&&S>k&&S-k>h&&(E=v.subarray(k),v=v.subarray(0,k)),g(v,E?()=>{process.nextTick(A,null,E)}:A)};y(e,function v(A,S){if(A)return n(A);S?y(S,v):n(null)})}},$fe=Ufe;var $9e=require("events");var A9e=Rt(require("util"),1),y9e=require("stream");var{asyncIterator:g9e}=Symbol,Tlr=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[g9e]?yield*t[g9e]():yield t},fW=Tlr;var Blr=Ha.ALPHABET.ALPHA_DIGIT+"-_",Vq=typeof TextEncoder=="function"?new TextEncoder:new A9e.default.TextEncoder,LD=`\r
571
571
  `,Dlr=Vq.encode(LD),Plr=2,zfe=class{constructor(e,r){let{escapeName:n}=this.constructor,o=pt.isString(r),s=`Content-Disposition: form-data; name="${n(e)}"${!o&&r.name?`; filename="${n(r.name)}"`:""}${LD}`;if(o)r=Vq.encode(String(r).replace(/\r?\n|\r\n?/g,LD));else{let c=String(r.type||"application/octet-stream").replace(/[\r\n]/g,"");s+=`Content-Type: ${c}${LD}`}this.headers=Vq.encode(s+LD),this.contentLength=o?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+Plr,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;pt.isTypedArray(e)?yield e:yield*fW(e),yield Dlr}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},Rlr=(t,e,r)=>{let{tag:n="form-data-boundary",size:o=25,boundary:s=n+"-"+Ha.generateString(o,Blr)}=r||{};if(!pt.isFormData(t))throw new TypeError("FormData instance required");if(s.length<1||s.length>70)throw new Error("boundary must be 1-70 characters long");let c=Vq.encode("--"+s+LD),u=Vq.encode("--"+s+"--"+LD),p=u.byteLength,f=Array.from(t.entries()).map(([g,y])=>{let v=new zfe(g,y);return p+=v.size,v});p+=c.byteLength*f.length,p=pt.toFiniteNumber(p);let h={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(p)&&(h["Content-Length"]=p),e&&e(h),y9e.Readable.from(async function*(){for(let g of f)yield c,yield*g.encode();yield u}())},v9e=Rlr;var x9e=Rt(require("stream"),1),Hfe=class extends x9e.default.Transform{__transform(e,r,n){this.push(e),n()}_transform(e,r,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,r)}this.__transform(e,r,n)}},b9e=Hfe;var E9e=Rt(require("http2"),1),w9e=Rt(require("util"),1),Vfe=class{constructor(){this.sessions=Object.create(null)}getSession(e,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[e];if(n){let g=n.length;for(let y=0;y<g;y++){let[v,A]=n[y];if(!v.destroyed&&!v.closed&&w9e.default.isDeepStrictEqual(A,r))return v}}let o=E9e.default.connect(e,r),s,c,u=()=>{if(s)return;s=!0,c&&(clearTimeout(c),c=null);let g=n,y=g.length,v=y;for(;v--;)if(g[v][0]===o){y===1?delete this.sessions[e]:g.splice(v,1),o.closed||o.close();return}},p=o.request,{sessionTimeout:f}=r;if(f!=null){let g=0;o.request=function(){let y=p.apply(this,arguments);return g++,c&&(clearTimeout(c),c=null),y.once("close",()=>{--g||(c=setTimeout(()=>{c=null,u()},f))}),y}}o.once("close",u);let h=[o,r];return n?n.push(h):n=this.sessions[e]=[h],o}},_9e=Vfe;var Nlr=(t,e)=>pt.isAsyncFn(t)?function(...r){let n=r.pop();t.apply(this,r).then(o=>{try{e?n(null,...e(o)):n(null,o)}catch(s){n(s)}},n)}:t,S9e=Nlr;var Olr=new Set(["localhost"]),k9e=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(r=>/^\d+$/.test(r)&&Number(r)>=0&&Number(r)<=255)},Flr=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return k9e(e[1]);let r=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(r){let o=parseInt(r[1],16);return o>=32512&&o<=32767}let n=t.split(":");if(n.length===8){for(let o=0;o<7;o++)if(!/^0+$/.test(n[o]))return!1;return/^0*1$/.test(n[7])}return!1},C9e=t=>t?Olr.has(t)||k9e(t)?!0:Flr(t):!1,Llr={http:80,https:443,ws:80,wss:443,ftp:21},jlr=t=>{let e=t,r=0;if(e.charAt(0)==="["){let s=e.indexOf("]");if(s!==-1){let c=e.slice(1,s),u=e.slice(s+1);return u.charAt(0)===":"&&/^\d+$/.test(u.slice(1))&&(r=Number.parseInt(u.slice(1),10)),[c,r]}}let n=e.indexOf(":"),o=e.lastIndexOf(":");return n!==-1&&n===o&&/^\d+$/.test(e.slice(o+1))&&(r=Number.parseInt(e.slice(o+1),10),e=e.slice(0,o)),[e,r]},Mlr=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,Qlr=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,qlr=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(Mlr);if(e)return e[1];let r=t.match(Qlr);if(r){let n=parseInt(r[1],16),o=parseInt(r[2],16);return`${n>>8}.${n&255}.${o>>8}.${o&255}`}return t},I9e=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),qlr(t.replace(/\.+$/,"")));function Gfe(t){let e;try{e=new URL(t)}catch{return!1}let r=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!r)return!1;if(r==="*")return!0;let n=Number.parseInt(e.port,10)||Llr[e.protocol.split(":",1)[0]]||0,o=I9e(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(s=>{if(!s)return!1;let[c,u]=jlr(s);return c=I9e(c),!c||u&&u!==n?!1:(c.charAt(0)==="*"&&(c=c.slice(1)),c.charAt(0)==="."?o.endsWith(c):o===c||C9e(o)&&C9e(c))})}function Ulr(t,e){t=t||10;let r=new Array(t),n=new Array(t),o=0,s=0,c;return e=e!==void 0?e:1e3,function(p){let f=Date.now(),h=n[s];c||(c=f),r[o]=p,n[o]=f;let g=s,y=0;for(;g!==o;)y+=r[g++],g=g%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),f-c<e)return;let v=h&&f-h;return v?Math.round(y*1e3/v):void 0}}var T9e=Ulr;function $lr(t,e){let r=0,n=1e3/e,o,s,c=(f,h=Date.now())=>{r=h,o=null,s&&(clearTimeout(s),s=null),t(...f)};return[(...f)=>{let h=Date.now(),g=h-r;g>=n?c(f,h):(o=f,s||(s=setTimeout(()=>{s=null,c(o)},n-g)))},()=>o&&c(o)]}var B9e=$lr;var ZS=(t,e,r=3)=>{let n=0,o=T9e(50,250);return B9e(s=>{if(!s||typeof s.loaded!="number")return;let c=s.loaded,u=s.lengthComputable?s.total:void 0,p=u!=null?Math.min(c,u):c,f=Math.max(0,p-n),h=o(f);n=Math.max(n,p);let g={loaded:p,total:u,progress:u?p/u:void 0,bytes:f,rate:h||void 0,estimated:h&&u?(u-p)/h:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(g)},r)},VF=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},GF=t=>(...e)=>pt.asap(()=>t(...e));function Gq(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let r=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(r)){let c=n.length,u=n.length;for(let v=0;v<u;v++)if(n.charCodeAt(v)===37&&v+2<u){let A=n.charCodeAt(v+1),S=n.charCodeAt(v+2);(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(c-=2,v+=2)}let p=0,f=u-1,h=v=>v>=2&&n.charCodeAt(v-2)===37&&n.charCodeAt(v-1)===51&&(n.charCodeAt(v)===68||n.charCodeAt(v)===100);f>=0&&(n.charCodeAt(f)===61?(p++,f--):h(f)&&(p++,f-=3)),p===1&&f>=0&&(n.charCodeAt(f)===61||h(f))&&p++;let y=Math.floor(c/4)*3-(p||0);return y>0?y:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let s=0;for(let c=0,u=n.length;c<u;c++){let p=n.charCodeAt(c);if(p<128)s+=1;else if(p<2048)s+=2;else if(p>=55296&&p<=56319&&c+1<u){let f=n.charCodeAt(c+1);f>=56320&&f<=57343?(s+=4,c++):s+=3}else s+=3}return s}var D9e={flush:ty.default.constants.Z_SYNC_FLUSH,finishFlush:ty.default.constants.Z_SYNC_FLUSH},zlr={flush:ty.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ty.default.constants.BROTLI_OPERATION_FLUSH},Hlr={flush:ty.default.constants.ZSTD_e_flush,finishFlush:ty.default.constants.ZSTD_e_flush},z9e=pt.isFunction(ty.default.createBrotliDecompress),H9e=pt.isFunction(ty.default.createZstdDecompress),V9e="gzip, compress, deflate"+(z9e?", br":""),Vlr=V9e+(H9e?", zstd":""),{http:Glr,https:Wlr}=U9e.default,G9e=/https:?/,Ylr=["content-type","content-length"];function Jlr(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([n,o])=>{Ylr.includes(n.toLowerCase())&&t.set(n,o)})}var P9e=Symbol("axios.http.socketListener"),dW=Symbol("axios.http.currentReq"),W9e=Symbol("axios.http.installedTunnel"),Klr=new Map,R9e=new WeakMap;function Xlr(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),n=e?R9e.get(e)||R9e.set(e,new Map).get(e):Klr,o=n.get(r);if(o)return o;let s=e&&e.options?{...e.options,...t}:t;if(o=new Yfe.default(s),e&&e.options){let c={...e.options},u=o.callback;o.callback=function(f,h){return u.call(this,f,{...c,...h})}}return o[W9e]=!0,n.set(r,o),o}var N9e=Ha.protocols.map(t=>t+":"),O9e=t=>{if(!pt.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},F9e=(t,[e,r])=>(t.on("end",r).on("error",r),e),Zlr=new _9e;function epr(t,e,r){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,r)}function Y9e(t,e,r,n,o){let s=e;if(!s&&s!==!1){let c=V5e(r);c&&(Gfe(r)||(s=new URL(c)))}if(n&&t.headers)for(let c of Object.keys(t.headers))c.toLowerCase()==="proxy-authorization"&&delete t.headers[c];if(n&&t.agent&&t.agent[W9e]&&(t.agent=void 0),s){let c=s instanceof URL,u=y=>c||pt.hasOwnProp(s,y)?s[y]:void 0,p=u("username"),f=u("password"),h=pt.hasOwnProp(s,"auth")?s.auth:void 0;if(p&&(h=(p||"")+":"+(f||"")),h){let y=typeof h=="object",v=y&&pt.hasOwnProp(h,"username")?h.username:void 0,A=y&&pt.hasOwnProp(h,"password")?h.password:void 0;if(!!(v||A))h=(v||"")+":"+(A||"");else if(y)throw new Jr("Invalid proxy authorization",Jr.ERR_BAD_OPTION,{proxy:s})}if(G9e.test(t.protocol)){if(!(o instanceof Yfe.default)){let y=u("hostname")||u("host"),v=u("port"),A=u("protocol"),S=A?A.includes(":")?A:`${A}:`:"http:",E=y&&y.includes(":")&&!y.startsWith("[")?`[${y}]`:y,k=new URL(`${S}//${E}${v?":"+v:""}`),P={protocol:k.protocol,hostname:k.hostname.replace(/^\[|\]$/g,""),port:k.port,auth:h&&typeof h=="string"?h:void 0};k.protocol==="https:"&&(P.ALPNProtocols=["http/1.1"]);let j=Xlr(P,o);t.agent=j,t.agents&&(t.agents.https=j)}}else{if(h){let S=Buffer.from(h,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+S}let y=!1;for(let S of Object.keys(t.headers))if(S.toLowerCase()==="host"){y=!0;break}y||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let v=u("hostname")||u("host");t.hostname=v,t.host=v,t.port=u("port"),t.path=r;let A=u("protocol");A&&(t.protocol=A.includes(":")?A:`${A}:`)}}t.beforeRedirects.proxy=function(u){Y9e(u,e,u.href,!0,o)}}var tpr=typeof process<"u"&&pt.kindOf(process)==="process",rpr=t=>new Promise((e,r)=>{let n,o,s=(p,f)=>{o||(o=!0,n&&n(p,f))},c=p=>{s(p),e(p)},u=p=>{s(p,!0),r(p)};t(c,u,p=>n=p).catch(u)}),npr=({address:t,family:e})=>{if(!pt.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},L9e=(t,e)=>npr(pt.isObject(t)?t:{address:t,family:e}),ipr={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:o}=t,s=Zlr.getSession(r,n),{HTTP2_HEADER_SCHEME:c,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:p,HTTP2_HEADER_STATUS:f}=Q9e.default.constants,h={[c]:t.protocol.replace(":",""),[u]:t.method,[p]:t.path};pt.forEach(o,(y,v)=>{v.charAt(0)!==":"&&(h[v]=y)});let g=s.request(h);return g.once("response",y=>{let v=g;y=Object.assign({},y);let A=y[f];delete y[f],v.headers=y,v.statusCode=+A,e(v)}),g}},J9e=tpr&&function(e){return rpr(async function(n,o,s){let c=St=>pt.hasOwnProp(e,St)?e[St]:void 0,u=c("transitional")||nk,p=c("data"),f=c("lookup"),h=c("family"),g=c("httpVersion");g===void 0&&(g=1);let y=c("http2Options"),v=c("responseType"),A=c("responseEncoding"),S=e.method.toUpperCase(),E,k=!1,P,j;if(g=+g,Number.isNaN(g))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(g!==1&&g!==2)throw TypeError(`Unsupported protocol version '${g}'`);let L=g===2;if(f){let St=S9e(f,Et=>pt.isArray(Et)?Et:[Et]);f=(Et,mt,B)=>{St(Et,mt,(Ye,ut,Ce)=>{if(Ye)return B(Ye);let _e=pt.isArray(ut)?ut.map(We=>L9e(We)):[L9e(ut,Ce)];mt.all?B(Ye,_e):B(Ye,_e[0].address,_e[0].family)})}}let $=new $9e.EventEmitter;function re(St){try{$.emit("abort",!St||St.type?new ey(null,e,P):St)}catch{}}function Y(){j&&(clearTimeout(j),j=null)}function me(){let St=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";return e.timeoutErrorMessage&&(St=e.timeoutErrorMessage),new Jr(St,u.clarifyTimeoutError?Jr.ETIMEDOUT:Jr.ECONNABORTED,e,P)}$.once("abort",o);let ne=()=>{Y(),e.cancelToken&&e.cancelToken.unsubscribe(re),e.signal&&e.signal.removeEventListener("abort",re),$.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(re),e.signal&&(e.signal.aborted?re():e.signal.addEventListener("abort",re))),s((St,Et)=>{if(E=!0,Y(),Et){k=!0,ne();return}let{data:mt}=St;if(mt instanceof Dv.default.Readable||mt instanceof Dv.default.Duplex){let B=Dv.default.finished(mt,()=>{B(),ne()})}else ne()});let ce=DD(e.baseURL,e.url,e.allowAbsoluteUrls),ee=new URL(ce,Ha.hasBrowserEnv?Ha.origin:void 0),ge=ee.protocol||N9e[0];if(ge==="data:"){if(e.maxContentLength>-1){let Et=String(e.url||ce||"");if(Gq(Et)>e.maxContentLength)return o(new Jr("maxContentLength size of "+e.maxContentLength+" exceeded",Jr.ERR_BAD_RESPONSE,e))}let St;if(S!=="GET")return $w(n,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{St=Qfe(e.url,v==="blob",{Blob:e.env&&e.env.Blob})}catch(Et){throw Jr.from(Et,Jr.ERR_BAD_REQUEST,e)}return v==="text"?(St=St.toString(A),(!A||A==="utf8")&&(St=pt.stripBOM(St))):v==="stream"&&(St=Dv.default.Readable.from(St)),$w(n,o,{data:St,status:200,statusText:"OK",headers:new Lu,config:e})}if(N9e.indexOf(ge)===-1)return o(new Jr("Unsupported protocol "+ge,Jr.ERR_BAD_REQUEST,e));let J=Lu.from(e.headers).normalize();J.set("User-Agent","axios/"+XS,!1);let{onUploadProgress:U,onDownloadProgress:de}=e,Fe=e.maxRate,ye,be;if(pt.isSpecCompliantForm(p)){let St=J.getContentType(/boundary=([-_\w\d]{10,70})/i);p=v9e(p,Et=>{J.set(Et)},{tag:`axios-${XS}-boundary`,boundary:St&&St[1]||void 0})}else if(pt.isFormData(p)&&pt.isFunction(p.getHeaders)&&p.getHeaders!==Object.prototype.getHeaders){if(Jlr(J,p.getHeaders(),c("formDataHeaderPolicy")),!J.hasContentLength())try{let St=await q9e.default.promisify(p.getLength).call(p);Number.isFinite(St)&&St>=0&&J.setContentLength(St)}catch{}}else if(pt.isBlob(p)||pt.isFile(p))p.size&&J.setContentType(p.type||"application/octet-stream"),J.setContentLength(p.size||0),p=Dv.default.Readable.from(fW(p));else if(p&&!pt.isStream(p)){if(!Buffer.isBuffer(p))if(pt.isArrayBuffer(p))p=Buffer.from(new Uint8Array(p));else if(pt.isString(p))p=Buffer.from(p,"utf-8");else return o(new Jr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Jr.ERR_BAD_REQUEST,e));if(J.setContentLength(p.length,!1),e.maxBodyLength>-1&&p.length>e.maxBodyLength)return o(new Jr("Request body larger than maxBodyLength limit",Jr.ERR_BAD_REQUEST,e))}let Ne=pt.toFiniteNumber(J.getContentLength());pt.isArray(Fe)?(ye=Fe[0],be=Fe[1]):ye=be=Fe,p&&(U||ye)&&(pt.isStream(p)||(p=Dv.default.Readable.from(p,{objectMode:!1})),p=Dv.default.pipeline([p,new $fe({maxRate:pt.toFiniteNumber(ye)})],pt.noop),U&&p.on("progress",F9e(p,VF(Ne,ZS(GF(U),!1,3)))));let He,_t=c("auth");if(_t){let St=_t.username||"",Et=_t.password||"";He=St+":"+Et}if(!He&&(ee.username||ee.password)){let St=O9e(ee.username),Et=O9e(ee.password);He=St+":"+Et}He&&J.delete("authorization");let It;try{It=BD(ee.pathname+ee.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(St){let Et=new Error(St.message);return Et.config=e,Et.url=e.url,Et.exists=!0,o(Et)}J.set("Accept-Encoding",pt.hasOwnProp(u,"advertiseZstdAcceptEncoding")&&u.advertiseZstdAcceptEncoding===!0?Vlr:V9e,!1);let Ze=Object.assign(Object.create(null),{path:It,method:S,headers:NF(J),agents:{http:e.httpAgent,https:e.httpsAgent},auth:He,protocol:ge,family:h,beforeRedirect:epr,beforeRedirects:Object.create(null),http2Options:y});!pt.isUndefined(f)&&(Ze.lookup=f);let Ke=c("socketPath");if(Ke){if(typeof Ke!="string")return o(new Jr("socketPath must be a string",Jr.ERR_BAD_OPTION_VALUE,e));let St=c("allowedSocketPaths");if(St!=null){let Et=Array.isArray(St)?St:[St],mt=(0,Wfe.resolve)(Ke);if(!Et.some(Ye=>typeof Ye=="string"&&(0,Wfe.resolve)(Ye)===mt))return o(new Jr(`socketPath "${Ke}" is not permitted by allowedSocketPaths`,Jr.ERR_BAD_OPTION_VALUE,e))}Ze.socketPath=Ke}else Ze.hostname=ee.hostname.startsWith("[")?ee.hostname.slice(1,-1):ee.hostname,Ze.port=ee.port,Y9e(Ze,e.proxy,ge+"//"+ee.hostname+(ee.port?":"+ee.port:"")+Ze.path,!1,e.httpsAgent);let Me,et=!1,at=G9e.test(Ze.protocol);if(Ze.agent==null&&(Ze.agent=at?e.httpsAgent:e.httpAgent),L)Me=ipr;else{let St=c("transport");if(St)Me=St;else if(e.maxRedirects===0)Me=at?M9e.default:j9e.default,et=!0;else{e.maxRedirects&&(Ze.maxRedirects=e.maxRedirects);let Et=c("beforeRedirect");if(Et&&(Ze.beforeRedirects.config=Et),He){let mt=ee.origin,B=He;Ze.beforeRedirects.auth=function(ut){try{new URL(ut.href).origin===mt&&(ut.auth=B)}catch{}}}Me=at?Wlr:Glr}}e.maxBodyLength>-1?Ze.maxBodyLength=e.maxBodyLength:Ze.maxBodyLength=1/0,Ze.insecureHTTPParser=!!c("insecureHTTPParser"),P=Me.request(Ze,function(Et){if(Y(),P.destroyed)return;let mt=[Et],B=pt.toFiniteNumber(Et.headers["content-length"]);if(de||be){let _e=new $fe({maxRate:pt.toFiniteNumber(be)});de&&_e.on("progress",F9e(_e,VF(B,ZS(GF(de),!0,3)))),mt.push(_e)}let Ye=Et,ut=Et.req||P;if(e.decompress!==!1&&Et.headers["content-encoding"])switch((S==="HEAD"||Et.statusCode===204)&&delete Et.headers["content-encoding"],(Et.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":mt.push(ty.default.createUnzip(D9e)),delete Et.headers["content-encoding"];break;case"deflate":mt.push(new b9e),mt.push(ty.default.createUnzip(D9e)),delete Et.headers["content-encoding"];break;case"br":z9e&&(mt.push(ty.default.createBrotliDecompress(zlr)),delete Et.headers["content-encoding"]);break;case"zstd":H9e&&(mt.push(ty.default.createZstdDecompress(Hlr)),delete Et.headers["content-encoding"]);break}Ye=mt.length>1?Dv.default.pipeline(mt,pt.noop):mt[0];let Ce={status:Et.statusCode,statusText:Et.statusMessage,headers:new Lu(Et.headers),config:e,request:ut};if(v==="stream"){if(e.maxContentLength>-1){let _e=e.maxContentLength,We=Ye;async function*rt(){let pe=0;for await(let Je of We){if(pe+=Je.length,pe>_e)throw new Jr("maxContentLength size of "+_e+" exceeded",Jr.ERR_BAD_RESPONSE,e,ut);yield Je}}Ye=Dv.default.Readable.from(rt(),{objectMode:!1})}Ce.data=Ye,$w(n,o,Ce)}else{let _e=[],We=0;Ye.on("data",function(pe){_e.push(pe),We+=pe.length,e.maxContentLength>-1&&We>e.maxContentLength&&(k=!0,Ye.destroy(),re(new Jr("maxContentLength size of "+e.maxContentLength+" exceeded",Jr.ERR_BAD_RESPONSE,e,ut)))}),Ye.on("aborted",function(){if(k)return;let pe=new Jr("stream has been aborted",Jr.ERR_BAD_RESPONSE,e,ut,Ce);Ye.destroy(pe),o(pe)}),Ye.on("error",function(pe){k||o(Jr.from(pe,null,e,ut,Ce))}),Ye.on("end",function(){try{let pe=_e.length===1?_e[0]:Buffer.concat(_e);v!=="arraybuffer"&&(pe=pe.toString(A),(!A||A==="utf8")&&(pe=pt.stripBOM(pe))),Ce.data=pe}catch(pe){return o(Jr.from(pe,null,e,Ce.request,Ce))}$w(n,o,Ce)})}$.once("abort",_e=>{Ye.destroyed||(Ye.emit("error",_e),Ye.destroy())})}),$.once("abort",St=>{P.close?P.close():P.destroy(St)}),P.on("error",function(Et){o(Jr.from(Et,null,e,P))});let Mt=new Set;if(P.on("socket",function(Et){Et.setKeepAlive(!0,1e3*60),Et[P9e]||(Et.on("error",function(B){let Ye=Et[dW];Ye&&!Ye.destroyed&&Ye.destroy(B)}),Et[P9e]=!0),Et[dW]=P,Mt.add(Et)}),P.once("close",function(){Y();for(let Et of Mt)Et[dW]===P&&(Et[dW]=null);Mt.clear()}),e.timeout){let St=parseInt(e.timeout,10);if(Number.isNaN(St)){re(new Jr("error trying to parse `config.timeout` to int",Jr.ERR_BAD_OPTION_VALUE,e,P));return}let Et=function(){E||re(me())};et&&St>0&&(j=setTimeout(Et,St)),P.setTimeout(St,Et)}else P.setTimeout(0);if(pt.isStream(p)){let St=!1,Et=!1;p.on("end",()=>{St=!0}),p.once("error",B=>{Et=!0,P.destroy(B)}),p.on("close",()=>{!St&&!Et&&re(new ey("Request stream has been aborted",e,P))});let mt=p;if(e.maxBodyLength>-1&&e.maxRedirects===0){let B=e.maxBodyLength,Ye=0;mt=Dv.default.pipeline([p,new Dv.default.Transform({transform(ut,Ce,_e){if(Ye+=ut.length,Ye>B)return _e(new Jr("Request body larger than maxBodyLength limit",Jr.ERR_BAD_REQUEST,e,P));_e(null,ut)}})],pt.noop),mt.on("error",ut=>{P.destroyed||P.destroy(ut)})}mt.pipe(P)}else p&&P.write(p),P.end()})};var K9e=Ha.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Ha.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Ha.origin),Ha.navigator&&/(msie|trident)/i.test(Ha.navigator.userAgent)):()=>!0;var X9e=Ha.hasStandardBrowserEnv?{write(t,e,r,n,o,s,c){if(typeof document>"u")return;let u=[`${t}=${encodeURIComponent(e)}`];pt.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),pt.isString(n)&&u.push(`path=${n}`),pt.isString(o)&&u.push(`domain=${o}`),s===!0&&u.push("secure"),pt.isString(c)&&u.push(`SameSite=${c}`),document.cookie=u.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let r=0;r<e.length;r++){let n=e[r].replace(/^\s+/,""),o=n.indexOf("=");if(o!==-1&&n.slice(0,o)===t)return decodeURIComponent(n.slice(o+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var Z9e=t=>t instanceof Lu?{...t}:t;function kb(t,e){e=e||{};let r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(f,h,g,y){return pt.isPlainObject(f)&&pt.isPlainObject(h)?pt.merge.call({caseless:y},f,h):pt.isPlainObject(h)?pt.merge({},h):pt.isArray(h)?h.slice():h}function o(f,h,g,y){if(pt.isUndefined(h)){if(!pt.isUndefined(f))return n(void 0,f,g,y)}else return n(f,h,g,y)}function s(f,h){if(!pt.isUndefined(h))return n(void 0,h)}function c(f,h){if(pt.isUndefined(h)){if(!pt.isUndefined(f))return n(void 0,f)}else return n(void 0,h)}function u(f,h,g){if(pt.hasOwnProp(e,g))return n(f,h);if(pt.hasOwnProp(t,g))return n(void 0,f)}let p={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,allowedSocketPaths:c,responseEncoding:c,validateStatus:u,headers:(f,h,g)=>o(Z9e(f),Z9e(h),g,!0)};return pt.forEach(Object.keys({...t,...e}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;let g=pt.hasOwnProp(p,h)?p[h]:o,y=pt.hasOwnProp(t,h)?t[h]:void 0,v=pt.hasOwnProp(e,h)?e[h]:void 0,A=g(y,v,h);pt.isUndefined(A)&&g!==u||(r[h]=A)}),r}var spr=["content-type","content-length"];function opr(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([n,o])=>{spr.includes(n.toLowerCase())&&t.set(n,o)})}var apr=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16)));function cpr(t){let e=kb({},t),r=y=>pt.hasOwnProp(e,y)?e[y]:void 0,n=r("data"),o=r("withXSRFToken"),s=r("xsrfHeaderName"),c=r("xsrfCookieName"),u=r("headers"),p=r("auth"),f=r("baseURL"),h=r("allowAbsoluteUrls"),g=r("url");if(e.headers=u=Lu.from(u),e.url=BD(DD(f,g,h),r("params"),r("paramsSerializer")),p&&u.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?apr(p.password):""))),pt.isFormData(n)&&(Ha.hasStandardBrowserEnv||Ha.hasStandardBrowserWebWorkerEnv||pt.isReactNative(n)?u.setContentType(void 0):pt.isFunction(n.getHeaders)&&opr(u,n.getHeaders(),r("formDataHeaderPolicy"))),Ha.hasStandardBrowserEnv&&(pt.isFunction(o)&&(o=o(e)),o===!0||o==null&&K9e(e.url))){let v=s&&c&&X9e.read(c);v&&u.set(s,v)}return e}var hW=cpr;var upr=typeof XMLHttpRequest<"u",e7e=upr&&function(t){return new Promise(function(r,n){let o=hW(t),s=o.data,c=Lu.from(o.headers).normalize(),{responseType:u,onUploadProgress:p,onDownloadProgress:f}=o,h,g,y,v,A;function S(){v&&v(),A&&A(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let E=new XMLHttpRequest;E.open(o.method.toUpperCase(),o.url,!0),E.timeout=o.timeout;function k(){if(!E)return;let j=Lu.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),$={data:!u||u==="text"||u==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:j,config:t,request:E};$w(function(Y){r(Y),S()},function(Y){n(Y),S()},$),E=null}"onloadend"in E?E.onloadend=k:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(k)},E.onabort=function(){E&&(n(new Jr("Request aborted",Jr.ECONNABORTED,t,E)),S(),E=null)},E.onerror=function(L){let $=L&&L.message?L.message:"Network Error",re=new Jr($,Jr.ERR_NETWORK,t,E);re.event=L||null,n(re),S(),E=null},E.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",$=o.transitional||nk;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),n(new Jr(L,$.clarifyTimeoutError?Jr.ETIMEDOUT:Jr.ECONNABORTED,t,E)),S(),E=null},s===void 0&&c.setContentType(null),"setRequestHeader"in E&&pt.forEach(NF(c),function(L,$){E.setRequestHeader($,L)}),pt.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),u&&u!=="json"&&(E.responseType=o.responseType),f&&([y,A]=ZS(f,!0),E.addEventListener("progress",y)),p&&E.upload&&([g,v]=ZS(p),E.upload.addEventListener("progress",g),E.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(h=j=>{E&&(n(!j||j.type?new ey(null,t,E):j),E.abort(),S(),E=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));let P=Hq(o.url);if(P&&!Ha.protocols.includes(P)){n(new Jr("Unsupported protocol "+P+":",Jr.ERR_BAD_REQUEST,t));return}E.send(s||null)})};var lpr=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let r=new AbortController,n=!1,o=function(p){if(!n){n=!0,c();let f=p instanceof Error?p:this.reason;r.abort(f instanceof Jr?f:new ey(f instanceof Error?f.message:f))}},s=e&&setTimeout(()=>{s=null,o(new Jr(`timeout of ${e}ms exceeded`,Jr.ETIMEDOUT))},e),c=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(p=>{p.unsubscribe?p.unsubscribe(o):p.removeEventListener("abort",o)}),t=null)};t.forEach(p=>p.addEventListener("abort",o));let{signal:u}=r;return u.unsubscribe=()=>pt.asap(c),u},t7e=lpr;var ppr=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},fpr=async function*(t,e){for await(let r of dpr(t))yield*ppr(r,e)},dpr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Jfe=(t,e,r,n)=>{let o=fpr(t,e),s=0,c,u=p=>{c||(c=!0,n&&n(p))};return new ReadableStream({async pull(p){try{let{done:f,value:h}=await o.next();if(f){u(),p.close();return}let g=h.byteLength;if(r){let y=s+=g;r(y)}p.enqueue(new Uint8Array(h))}catch(f){throw u(f),f}},cancel(p){return u(p),o.return()}},{highWaterMark:2})};var r7e=64*1024,{isFunction:mW}=pt,hpr=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),n7e=t=>{if(!pt.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},i7e=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mpr=t=>{let e=t.indexOf("://"),r=t;return e!==-1&&(r=r.slice(e+3)),r.includes("@")||r.includes(":")},gpr=t=>{let e=pt.global!==void 0&&pt.global!==null?pt.global:globalThis,{ReadableStream:r,TextEncoder:n}=e;t=pt.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:o,Request:s,Response:c}=t,u=o?mW(o):typeof fetch=="function",p=mW(s),f=mW(c);if(!u)return!1;let h=u&&mW(r),g=u&&(typeof n=="function"?(k=>P=>k.encode(P))(new n):async k=>new Uint8Array(await new s(k).arrayBuffer())),y=p&&h&&i7e(()=>{let k=!1,P=new s(Ha.origin,{body:new r,method:"POST",get duplex(){return k=!0,"half"}}),j=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),k&&!j}),v=f&&h&&i7e(()=>pt.isReadableStream(new c("").body)),A={stream:v&&(k=>k.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!A[k]&&(A[k]=(P,j)=>{let L=P&&P[k];if(L)return L.call(P);throw new Jr(`Response type '${k}' is not supported`,Jr.ERR_NOT_SUPPORT,j)})});let S=async k=>{if(k==null)return 0;if(pt.isBlob(k))return k.size;if(pt.isSpecCompliantForm(k))return(await new s(Ha.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(pt.isArrayBufferView(k)||pt.isArrayBuffer(k))return k.byteLength;if(pt.isURLSearchParams(k)&&(k=k+""),pt.isString(k))return(await g(k)).byteLength},E=async(k,P)=>{let j=pt.toFiniteNumber(k.getContentLength());return j==null?S(P):j};return async k=>{let{url:P,method:j,data:L,signal:$,cancelToken:re,timeout:Y,onDownloadProgress:me,onUploadProgress:ne,responseType:ce,headers:ee,withCredentials:ge="same-origin",fetchOptions:J,maxContentLength:U,maxBodyLength:de}=hW(k),Fe=pt.isNumber(U)&&U>-1,ye=pt.isNumber(de)&&de>-1,be=Ke=>pt.hasOwnProp(k,Ke)?k[Ke]:void 0,Ne=o||fetch;ce=ce?(ce+"").toLowerCase():"text";let He=t7e([$,re&&re.toAbortSignal()],Y),_t=null,It=He&&He.unsubscribe&&(()=>{He.unsubscribe()}),Ze;try{let Ke,Me=be("auth");if(Me){let mt=Me.username||"",B=Me.password||"";Ke={username:mt,password:B}}if(mpr(P)){let mt=new URL(P,Ha.origin);if(!Ke&&(mt.username||mt.password)){let B=n7e(mt.username),Ye=n7e(mt.password);Ke={username:B,password:Ye}}(mt.username||mt.password)&&(mt.username="",mt.password="",P=mt.href)}if(Ke&&(ee.delete("authorization"),ee.set("Authorization","Basic "+btoa(hpr((Ke.username||"")+":"+(Ke.password||""))))),Fe&&typeof P=="string"&&P.startsWith("data:")&&Gq(P)>U)throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,_t);if(ye&&j!=="get"&&j!=="head"){let mt=await E(ee,L);if(typeof mt=="number"&&isFinite(mt)&&mt>de)throw new Jr("Request body larger than maxBodyLength limit",Jr.ERR_BAD_REQUEST,k,_t)}if(ne&&y&&j!=="get"&&j!=="head"&&(Ze=await E(ee,L))!==0){let mt=new s(P,{method:"POST",body:L,duplex:"half"}),B;if(pt.isFormData(L)&&(B=mt.headers.get("content-type"))&&ee.setContentType(B),mt.body){let[Ye,ut]=VF(Ze,ZS(GF(ne)));L=Jfe(mt.body,r7e,Ye,ut)}}pt.isString(ge)||(ge=ge?"include":"omit");let et=p&&"credentials"in s.prototype;if(pt.isFormData(L)){let mt=ee.getContentType();mt&&/^multipart\/form-data/i.test(mt)&&!/boundary=/i.test(mt)&&ee.delete("content-type")}ee.set("User-Agent","axios/"+XS,!1);let at={...J,signal:He,method:j.toUpperCase(),headers:NF(ee.normalize()),body:L,duplex:"half",credentials:et?ge:void 0};_t=p&&new s(P,at);let Mt=await(p?Ne(_t,J):Ne(P,at));if(Fe){let mt=pt.toFiniteNumber(Mt.headers.get("content-length"));if(mt!=null&&mt>U)throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,_t)}let St=v&&(ce==="stream"||ce==="response");if(v&&Mt.body&&(me||Fe||St&&It)){let mt={};["status","statusText","headers"].forEach(We=>{mt[We]=Mt[We]});let B=pt.toFiniteNumber(Mt.headers.get("content-length")),[Ye,ut]=me&&VF(B,ZS(GF(me),!0))||[],Ce=0,_e=We=>{if(Fe&&(Ce=We,Ce>U))throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,_t);Ye&&Ye(We)};Mt=new c(Jfe(Mt.body,r7e,_e,()=>{ut&&ut(),It&&It()}),mt)}ce=ce||"text";let Et=await A[pt.findKey(A,ce)||"text"](Mt,k);if(Fe&&!v&&!St){let mt;if(Et!=null&&(typeof Et.byteLength=="number"?mt=Et.byteLength:typeof Et.size=="number"?mt=Et.size:typeof Et=="string"&&(mt=typeof n=="function"?new n().encode(Et).byteLength:Et.length)),typeof mt=="number"&&mt>U)throw new Jr("maxContentLength size of "+U+" exceeded",Jr.ERR_BAD_RESPONSE,k,_t)}return!St&&It&&It(),await new Promise((mt,B)=>{$w(mt,B,{data:Et,headers:Lu.from(Mt.headers),status:Mt.status,statusText:Mt.statusText,config:k,request:_t})})}catch(Ke){if(It&&It(),He&&He.aborted&&He.reason instanceof Jr){let Me=He.reason;throw Me.config=k,_t&&(Me.request=_t),Ke!==Me&&(Me.cause=Ke),Me}throw Ke&&Ke.name==="TypeError"&&/Load failed|fetch/i.test(Ke.message)?Object.assign(new Jr("Network Error",Jr.ERR_NETWORK,k,_t,Ke&&Ke.response),{cause:Ke.cause||Ke}):Jr.from(Ke,Ke&&Ke.code,k,_t,Ke&&Ke.response)}}},Apr=new Map,Kfe=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:o}=e,s=[n,o,r],c=s.length,u=c,p,f,h=Apr;for(;u--;)p=s[u],f=h.get(p),f===void 0&&h.set(p,f=u?new Map:gpr(e)),h=f;return f},Phi=Kfe();var Xfe={http:J9e,xhr:e7e,fetch:{get:Kfe}};pt.forEach(Xfe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var s7e=t=>`- ${t}`,vpr=t=>pt.isFunction(t)||t===null||t===!1;function xpr(t,e){t=pt.isArray(t)?t:[t];let{length:r}=t,n,o,s={};for(let c=0;c<r;c++){n=t[c];let u;if(o=n,!vpr(n)&&(o=Xfe[(u=String(n)).toLowerCase()],o===void 0))throw new Jr(`Unknown adapter '${u}'`);if(o&&(pt.isFunction(o)||(o=o.get(e))))break;s[u||"#"+c]=o}if(!o){let c=Object.entries(s).map(([p,f])=>`adapter ${p} `+(f===!1?"is not supported by the environment":"is not available in the build")),u=r?c.length>1?`since :
@@ -2318,6 +2318,14 @@ var VALID_ROLES = /* @__PURE__ */ new Set([
2318
2318
  "tool"
2319
2319
  ]);
2320
2320
  var VALID_ORDERS = /* @__PURE__ */ new Set(["asc", "desc"]);
2321
+ var ITEM_TYPE_TO_SDK = {
2322
+ function_call_output: "function_call_result",
2323
+ computer_call_output: "computer_call_result"
2324
+ };
2325
+ var SDK_TYPE_TO_STORAGE = {
2326
+ function_call_result: "function_call_output",
2327
+ computer_call_result: "computer_call_output"
2328
+ };
2321
2329
  var MemoryValidationError = class extends Error {
2322
2330
  code = "MemoryValidationError";
2323
2331
  constructor(message) {
@@ -2793,10 +2801,10 @@ function applyCursor(items, cursorValue, options) {
2793
2801
  return items.slice(start, end).slice(0, options.limit);
2794
2802
  }
2795
2803
  function normalizeSessionItem(item) {
2804
+ let normalized;
2796
2805
  if (isPlainObject(item)) {
2797
- return item;
2798
- }
2799
- if (item && typeof item === "object") {
2806
+ normalized = item;
2807
+ } else if (item && typeof item === "object") {
2800
2808
  const candidate = item;
2801
2809
  for (const method of ["toJSON", "model_dump", "dict"]) {
2802
2810
  const serialize = candidate[method];
@@ -2806,23 +2814,32 @@ function normalizeSessionItem(item) {
2806
2814
  try {
2807
2815
  const parsed = serialize.call(item);
2808
2816
  if (isPlainObject(parsed)) {
2809
- return parsed;
2817
+ normalized = parsed;
2818
+ break;
2810
2819
  }
2811
2820
  } catch {
2812
2821
  }
2813
2822
  }
2814
- try {
2815
- const serialized = JSON.stringify(item);
2816
- if (serialized) {
2817
- const parsed = JSON.parse(serialized);
2818
- if (isPlainObject(parsed)) {
2819
- return parsed;
2823
+ if (!normalized) {
2824
+ try {
2825
+ const serialized = JSON.stringify(item);
2826
+ if (serialized) {
2827
+ const parsed = JSON.parse(serialized);
2828
+ if (isPlainObject(parsed)) {
2829
+ normalized = parsed;
2830
+ }
2820
2831
  }
2832
+ } catch {
2821
2833
  }
2822
- } catch {
2823
2834
  }
2824
2835
  }
2825
- return { role: "tool", content: String(item) };
2836
+ if (!normalized) {
2837
+ normalized = { role: "tool", content: String(item) };
2838
+ }
2839
+ if (typeof normalized.type === "string" && SDK_TYPE_TO_STORAGE[normalized.type]) {
2840
+ normalized = { ...normalized, type: SDK_TYPE_TO_STORAGE[normalized.type] };
2841
+ }
2842
+ return normalized;
2826
2843
  }
2827
2844
  function sessionRoleForItem(item) {
2828
2845
  const role = item.role;
@@ -2834,7 +2851,7 @@ function sessionRoleForItem(item) {
2834
2851
  const messageRole = item.role;
2835
2852
  return typeof messageRole === "string" && VALID_ROLES.has(messageRole) ? messageRole : "assistant";
2836
2853
  }
2837
- if (itemType === "function_call_output" || itemType === "computer_call_output") {
2854
+ if (itemType === "function_call_output" || itemType === "function_call_result" || itemType === "computer_call_output" || itemType === "computer_call_result") {
2838
2855
  return "tool";
2839
2856
  }
2840
2857
  if (itemType === "function_call" || itemType === "computer_call" || itemType === "reasoning") {
@@ -2845,7 +2862,11 @@ function sessionRoleForItem(item) {
2845
2862
  function memoryMessageToSessionItem(message) {
2846
2863
  const metadata = message.metadata || {};
2847
2864
  if (metadata.agent_sdk_session === true && isPlainObject(message.content)) {
2848
- return message.content;
2865
+ const item = message.content;
2866
+ if (typeof item.type === "string" && ITEM_TYPE_TO_SDK[item.type]) {
2867
+ return { ...item, type: ITEM_TYPE_TO_SDK[item.type] };
2868
+ }
2869
+ return item;
2849
2870
  }
2850
2871
  if (VALID_ROLES.has(message.role) && message.content !== void 0) {
2851
2872
  return {
@@ -2911,7 +2932,7 @@ function createOpenAISession(memory, sessionId, maxItems, appendSessionMessages)
2911
2932
  });
2912
2933
  return item;
2913
2934
  }
2914
- return null;
2935
+ return void 0;
2915
2936
  },
2916
2937
  async clearSession() {
2917
2938
  await memory.clearMessages({ conversationId: sessionId });
@@ -4795,6 +4816,14 @@ var VALID_ROLES = /* @__PURE__ */ new Set([
4795
4816
  "tool"
4796
4817
  ]);
4797
4818
  var VALID_ORDERS = /* @__PURE__ */ new Set(["asc", "desc"]);
4819
+ var ITEM_TYPE_TO_SDK = {
4820
+ function_call_output: "function_call_result",
4821
+ computer_call_output: "computer_call_result"
4822
+ };
4823
+ var SDK_TYPE_TO_STORAGE = {
4824
+ function_call_result: "function_call_output",
4825
+ computer_call_result: "computer_call_output"
4826
+ };
4798
4827
  var MemoryValidationError = class extends Error {
4799
4828
  code = "MemoryValidationError";
4800
4829
  constructor(message) {
@@ -5270,10 +5299,10 @@ function applyCursor(items, cursorValue, options) {
5270
5299
  return items.slice(start, end).slice(0, options.limit);
5271
5300
  }
5272
5301
  function normalizeSessionItem(item) {
5302
+ let normalized;
5273
5303
  if (isPlainObject(item)) {
5274
- return item;
5275
- }
5276
- if (item && typeof item === "object") {
5304
+ normalized = item;
5305
+ } else if (item && typeof item === "object") {
5277
5306
  const candidate = item;
5278
5307
  for (const method of ["toJSON", "model_dump", "dict"]) {
5279
5308
  const serialize = candidate[method];
@@ -5283,23 +5312,32 @@ function normalizeSessionItem(item) {
5283
5312
  try {
5284
5313
  const parsed = serialize.call(item);
5285
5314
  if (isPlainObject(parsed)) {
5286
- return parsed;
5315
+ normalized = parsed;
5316
+ break;
5287
5317
  }
5288
5318
  } catch {
5289
5319
  }
5290
5320
  }
5291
- try {
5292
- const serialized = JSON.stringify(item);
5293
- if (serialized) {
5294
- const parsed = JSON.parse(serialized);
5295
- if (isPlainObject(parsed)) {
5296
- return parsed;
5321
+ if (!normalized) {
5322
+ try {
5323
+ const serialized = JSON.stringify(item);
5324
+ if (serialized) {
5325
+ const parsed = JSON.parse(serialized);
5326
+ if (isPlainObject(parsed)) {
5327
+ normalized = parsed;
5328
+ }
5297
5329
  }
5330
+ } catch {
5298
5331
  }
5299
- } catch {
5300
5332
  }
5301
5333
  }
5302
- return { role: "tool", content: String(item) };
5334
+ if (!normalized) {
5335
+ normalized = { role: "tool", content: String(item) };
5336
+ }
5337
+ if (typeof normalized.type === "string" && SDK_TYPE_TO_STORAGE[normalized.type]) {
5338
+ normalized = { ...normalized, type: SDK_TYPE_TO_STORAGE[normalized.type] };
5339
+ }
5340
+ return normalized;
5303
5341
  }
5304
5342
  function sessionRoleForItem(item) {
5305
5343
  const role = item.role;
@@ -5311,7 +5349,7 @@ function sessionRoleForItem(item) {
5311
5349
  const messageRole = item.role;
5312
5350
  return typeof messageRole === "string" && VALID_ROLES.has(messageRole) ? messageRole : "assistant";
5313
5351
  }
5314
- if (itemType === "function_call_output" || itemType === "computer_call_output") {
5352
+ if (itemType === "function_call_output" || itemType === "function_call_result" || itemType === "computer_call_output" || itemType === "computer_call_result") {
5315
5353
  return "tool";
5316
5354
  }
5317
5355
  if (itemType === "function_call" || itemType === "computer_call" || itemType === "reasoning") {
@@ -5322,7 +5360,11 @@ function sessionRoleForItem(item) {
5322
5360
  function memoryMessageToSessionItem(message) {
5323
5361
  const metadata = message.metadata || {};
5324
5362
  if (metadata.agent_sdk_session === true && isPlainObject(message.content)) {
5325
- return message.content;
5363
+ const item = message.content;
5364
+ if (typeof item.type === "string" && ITEM_TYPE_TO_SDK[item.type]) {
5365
+ return { ...item, type: ITEM_TYPE_TO_SDK[item.type] };
5366
+ }
5367
+ return item;
5326
5368
  }
5327
5369
  if (VALID_ROLES.has(message.role) && message.content !== void 0) {
5328
5370
  return {
@@ -5388,7 +5430,7 @@ function createOpenAISession(memory, sessionId, maxItems, appendSessionMessages)
5388
5430
  });
5389
5431
  return item;
5390
5432
  }
5391
- return null;
5433
+ return void 0;
5392
5434
  },
5393
5435
  async clearSession() {
5394
5436
  await memory.clearMessages({ conversationId: sessionId });
@@ -9119,6 +9161,14 @@ var VALID_ROLES = /* @__PURE__ */ new Set([
9119
9161
  "tool"
9120
9162
  ]);
9121
9163
  var VALID_ORDERS = /* @__PURE__ */ new Set(["asc", "desc"]);
9164
+ var ITEM_TYPE_TO_SDK = {
9165
+ function_call_output: "function_call_result",
9166
+ computer_call_output: "computer_call_result"
9167
+ };
9168
+ var SDK_TYPE_TO_STORAGE = {
9169
+ function_call_result: "function_call_output",
9170
+ computer_call_result: "computer_call_output"
9171
+ };
9122
9172
  var MemoryValidationError = class extends Error {
9123
9173
  code = "MemoryValidationError";
9124
9174
  constructor(message) {
@@ -9594,10 +9644,10 @@ function applyCursor(items, cursorValue, options) {
9594
9644
  return items.slice(start, end).slice(0, options.limit);
9595
9645
  }
9596
9646
  function normalizeSessionItem(item) {
9647
+ let normalized;
9597
9648
  if (isPlainObject(item)) {
9598
- return item;
9599
- }
9600
- if (item && typeof item === "object") {
9649
+ normalized = item;
9650
+ } else if (item && typeof item === "object") {
9601
9651
  const candidate = item;
9602
9652
  for (const method of ["toJSON", "model_dump", "dict"]) {
9603
9653
  const serialize = candidate[method];
@@ -9607,23 +9657,32 @@ function normalizeSessionItem(item) {
9607
9657
  try {
9608
9658
  const parsed = serialize.call(item);
9609
9659
  if (isPlainObject(parsed)) {
9610
- return parsed;
9660
+ normalized = parsed;
9661
+ break;
9611
9662
  }
9612
9663
  } catch {
9613
9664
  }
9614
9665
  }
9615
- try {
9616
- const serialized = JSON.stringify(item);
9617
- if (serialized) {
9618
- const parsed = JSON.parse(serialized);
9619
- if (isPlainObject(parsed)) {
9620
- return parsed;
9666
+ if (!normalized) {
9667
+ try {
9668
+ const serialized = JSON.stringify(item);
9669
+ if (serialized) {
9670
+ const parsed = JSON.parse(serialized);
9671
+ if (isPlainObject(parsed)) {
9672
+ normalized = parsed;
9673
+ }
9621
9674
  }
9675
+ } catch {
9622
9676
  }
9623
- } catch {
9624
9677
  }
9625
9678
  }
9626
- return { role: "tool", content: String(item) };
9679
+ if (!normalized) {
9680
+ normalized = { role: "tool", content: String(item) };
9681
+ }
9682
+ if (typeof normalized.type === "string" && SDK_TYPE_TO_STORAGE[normalized.type]) {
9683
+ normalized = { ...normalized, type: SDK_TYPE_TO_STORAGE[normalized.type] };
9684
+ }
9685
+ return normalized;
9627
9686
  }
9628
9687
  function sessionRoleForItem(item) {
9629
9688
  const role = item.role;
@@ -9635,7 +9694,7 @@ function sessionRoleForItem(item) {
9635
9694
  const messageRole = item.role;
9636
9695
  return typeof messageRole === "string" && VALID_ROLES.has(messageRole) ? messageRole : "assistant";
9637
9696
  }
9638
- if (itemType === "function_call_output" || itemType === "computer_call_output") {
9697
+ if (itemType === "function_call_output" || itemType === "function_call_result" || itemType === "computer_call_output" || itemType === "computer_call_result") {
9639
9698
  return "tool";
9640
9699
  }
9641
9700
  if (itemType === "function_call" || itemType === "computer_call" || itemType === "reasoning") {
@@ -9646,7 +9705,11 @@ function sessionRoleForItem(item) {
9646
9705
  function memoryMessageToSessionItem(message) {
9647
9706
  const metadata = message.metadata || {};
9648
9707
  if (metadata.agent_sdk_session === true && isPlainObject(message.content)) {
9649
- return message.content;
9708
+ const item = message.content;
9709
+ if (typeof item.type === "string" && ITEM_TYPE_TO_SDK[item.type]) {
9710
+ return { ...item, type: ITEM_TYPE_TO_SDK[item.type] };
9711
+ }
9712
+ return item;
9650
9713
  }
9651
9714
  if (VALID_ROLES.has(message.role) && message.content !== void 0) {
9652
9715
  return {
@@ -9712,7 +9775,7 @@ function createOpenAISession(memory, sessionId, maxItems, appendSessionMessages)
9712
9775
  });
9713
9776
  return item;
9714
9777
  }
9715
- return null;
9778
+ return void 0;
9716
9779
  },
9717
9780
  async clearSession() {
9718
9781
  await memory.clearMessages({ conversationId: sessionId });
@@ -23911,6 +23974,14 @@ var VALID_ROLES = /* @__PURE__ */ new Set([
23911
23974
  "tool"
23912
23975
  ]);
23913
23976
  var VALID_ORDERS = /* @__PURE__ */ new Set(["asc", "desc"]);
23977
+ var ITEM_TYPE_TO_SDK = {
23978
+ function_call_output: "function_call_result",
23979
+ computer_call_output: "computer_call_result"
23980
+ };
23981
+ var SDK_TYPE_TO_STORAGE = {
23982
+ function_call_result: "function_call_output",
23983
+ computer_call_result: "computer_call_output"
23984
+ };
23914
23985
  var MemoryValidationError = class extends Error {
23915
23986
  code = "MemoryValidationError";
23916
23987
  constructor(message) {
@@ -24386,10 +24457,10 @@ function applyCursor(items, cursorValue, options) {
24386
24457
  return items.slice(start, end).slice(0, options.limit);
24387
24458
  }
24388
24459
  function normalizeSessionItem(item) {
24460
+ let normalized;
24389
24461
  if (isPlainObject(item)) {
24390
- return item;
24391
- }
24392
- if (item && typeof item === "object") {
24462
+ normalized = item;
24463
+ } else if (item && typeof item === "object") {
24393
24464
  const candidate = item;
24394
24465
  for (const method of ["toJSON", "model_dump", "dict"]) {
24395
24466
  const serialize = candidate[method];
@@ -24399,23 +24470,32 @@ function normalizeSessionItem(item) {
24399
24470
  try {
24400
24471
  const parsed = serialize.call(item);
24401
24472
  if (isPlainObject(parsed)) {
24402
- return parsed;
24473
+ normalized = parsed;
24474
+ break;
24403
24475
  }
24404
24476
  } catch {
24405
24477
  }
24406
24478
  }
24407
- try {
24408
- const serialized = JSON.stringify(item);
24409
- if (serialized) {
24410
- const parsed = JSON.parse(serialized);
24411
- if (isPlainObject(parsed)) {
24412
- return parsed;
24479
+ if (!normalized) {
24480
+ try {
24481
+ const serialized = JSON.stringify(item);
24482
+ if (serialized) {
24483
+ const parsed = JSON.parse(serialized);
24484
+ if (isPlainObject(parsed)) {
24485
+ normalized = parsed;
24486
+ }
24413
24487
  }
24488
+ } catch {
24414
24489
  }
24415
- } catch {
24416
24490
  }
24417
24491
  }
24418
- return { role: "tool", content: String(item) };
24492
+ if (!normalized) {
24493
+ normalized = { role: "tool", content: String(item) };
24494
+ }
24495
+ if (typeof normalized.type === "string" && SDK_TYPE_TO_STORAGE[normalized.type]) {
24496
+ normalized = { ...normalized, type: SDK_TYPE_TO_STORAGE[normalized.type] };
24497
+ }
24498
+ return normalized;
24419
24499
  }
24420
24500
  function sessionRoleForItem(item) {
24421
24501
  const role = item.role;
@@ -24427,7 +24507,7 @@ function sessionRoleForItem(item) {
24427
24507
  const messageRole = item.role;
24428
24508
  return typeof messageRole === "string" && VALID_ROLES.has(messageRole) ? messageRole : "assistant";
24429
24509
  }
24430
- if (itemType === "function_call_output" || itemType === "computer_call_output") {
24510
+ if (itemType === "function_call_output" || itemType === "function_call_result" || itemType === "computer_call_output" || itemType === "computer_call_result") {
24431
24511
  return "tool";
24432
24512
  }
24433
24513
  if (itemType === "function_call" || itemType === "computer_call" || itemType === "reasoning") {
@@ -24438,7 +24518,11 @@ function sessionRoleForItem(item) {
24438
24518
  function memoryMessageToSessionItem(message) {
24439
24519
  const metadata = message.metadata || {};
24440
24520
  if (metadata.agent_sdk_session === true && isPlainObject(message.content)) {
24441
- return message.content;
24521
+ const item = message.content;
24522
+ if (typeof item.type === "string" && ITEM_TYPE_TO_SDK[item.type]) {
24523
+ return { ...item, type: ITEM_TYPE_TO_SDK[item.type] };
24524
+ }
24525
+ return item;
24442
24526
  }
24443
24527
  if (VALID_ROLES.has(message.role) && message.content !== void 0) {
24444
24528
  return {
@@ -24504,7 +24588,7 @@ function createOpenAISession(memory, sessionId, maxItems, appendSessionMessages)
24504
24588
  });
24505
24589
  return item;
24506
24590
  }
24507
- return null;
24591
+ return void 0;
24508
24592
  },
24509
24593
  async clearSession() {
24510
24594
  await memory.clearMessages({ conversationId: sessionId });
@@ -48722,6 +48806,14 @@ var VALID_ROLES = /* @__PURE__ */ new Set([
48722
48806
  "tool"
48723
48807
  ]);
48724
48808
  var VALID_ORDERS = /* @__PURE__ */ new Set(["asc", "desc"]);
48809
+ var ITEM_TYPE_TO_SDK = {
48810
+ function_call_output: "function_call_result",
48811
+ computer_call_output: "computer_call_result"
48812
+ };
48813
+ var SDK_TYPE_TO_STORAGE = {
48814
+ function_call_result: "function_call_output",
48815
+ computer_call_result: "computer_call_output"
48816
+ };
48725
48817
  var MemoryValidationError = class extends Error {
48726
48818
  code = "MemoryValidationError";
48727
48819
  constructor(message) {
@@ -49197,10 +49289,10 @@ function applyCursor(items, cursorValue, options) {
49197
49289
  return items.slice(start, end).slice(0, options.limit);
49198
49290
  }
49199
49291
  function normalizeSessionItem(item) {
49292
+ let normalized;
49200
49293
  if (isPlainObject(item)) {
49201
- return item;
49202
- }
49203
- if (item && typeof item === "object") {
49294
+ normalized = item;
49295
+ } else if (item && typeof item === "object") {
49204
49296
  const candidate = item;
49205
49297
  for (const method of ["toJSON", "model_dump", "dict"]) {
49206
49298
  const serialize = candidate[method];
@@ -49210,23 +49302,32 @@ function normalizeSessionItem(item) {
49210
49302
  try {
49211
49303
  const parsed = serialize.call(item);
49212
49304
  if (isPlainObject(parsed)) {
49213
- return parsed;
49305
+ normalized = parsed;
49306
+ break;
49214
49307
  }
49215
49308
  } catch {
49216
49309
  }
49217
49310
  }
49218
- try {
49219
- const serialized = JSON.stringify(item);
49220
- if (serialized) {
49221
- const parsed = JSON.parse(serialized);
49222
- if (isPlainObject(parsed)) {
49223
- return parsed;
49311
+ if (!normalized) {
49312
+ try {
49313
+ const serialized = JSON.stringify(item);
49314
+ if (serialized) {
49315
+ const parsed = JSON.parse(serialized);
49316
+ if (isPlainObject(parsed)) {
49317
+ normalized = parsed;
49318
+ }
49224
49319
  }
49320
+ } catch {
49225
49321
  }
49226
- } catch {
49227
49322
  }
49228
49323
  }
49229
- return { role: "tool", content: String(item) };
49324
+ if (!normalized) {
49325
+ normalized = { role: "tool", content: String(item) };
49326
+ }
49327
+ if (typeof normalized.type === "string" && SDK_TYPE_TO_STORAGE[normalized.type]) {
49328
+ normalized = { ...normalized, type: SDK_TYPE_TO_STORAGE[normalized.type] };
49329
+ }
49330
+ return normalized;
49230
49331
  }
49231
49332
  function sessionRoleForItem(item) {
49232
49333
  const role = item.role;
@@ -49238,7 +49339,7 @@ function sessionRoleForItem(item) {
49238
49339
  const messageRole = item.role;
49239
49340
  return typeof messageRole === "string" && VALID_ROLES.has(messageRole) ? messageRole : "assistant";
49240
49341
  }
49241
- if (itemType === "function_call_output" || itemType === "computer_call_output") {
49342
+ if (itemType === "function_call_output" || itemType === "function_call_result" || itemType === "computer_call_output" || itemType === "computer_call_result") {
49242
49343
  return "tool";
49243
49344
  }
49244
49345
  if (itemType === "function_call" || itemType === "computer_call" || itemType === "reasoning") {
@@ -49249,7 +49350,11 @@ function sessionRoleForItem(item) {
49249
49350
  function memoryMessageToSessionItem(message) {
49250
49351
  const metadata = message.metadata || {};
49251
49352
  if (metadata.agent_sdk_session === true && isPlainObject(message.content)) {
49252
- return message.content;
49353
+ const item = message.content;
49354
+ if (typeof item.type === "string" && ITEM_TYPE_TO_SDK[item.type]) {
49355
+ return { ...item, type: ITEM_TYPE_TO_SDK[item.type] };
49356
+ }
49357
+ return item;
49253
49358
  }
49254
49359
  if (VALID_ROLES.has(message.role) && message.content !== void 0) {
49255
49360
  return {
@@ -49315,7 +49420,7 @@ function createOpenAISession(memory, sessionId, maxItems, appendSessionMessages)
49315
49420
  });
49316
49421
  return item;
49317
49422
  }
49318
- return null;
49423
+ return void 0;
49319
49424
  },
49320
49425
  async clearSession() {
49321
49426
  await memory.clearMessages({ conversationId: sessionId });
@@ -64157,6 +64262,14 @@ var VALID_ROLES = /* @__PURE__ */ new Set([
64157
64262
  "tool"
64158
64263
  ]);
64159
64264
  var VALID_ORDERS = /* @__PURE__ */ new Set(["asc", "desc"]);
64265
+ var ITEM_TYPE_TO_SDK = {
64266
+ function_call_output: "function_call_result",
64267
+ computer_call_output: "computer_call_result"
64268
+ };
64269
+ var SDK_TYPE_TO_STORAGE = {
64270
+ function_call_result: "function_call_output",
64271
+ computer_call_result: "computer_call_output"
64272
+ };
64160
64273
  var MemoryValidationError = class extends Error {
64161
64274
  code = "MemoryValidationError";
64162
64275
  constructor(message) {
@@ -64632,10 +64745,10 @@ function applyCursor(items, cursorValue, options) {
64632
64745
  return items.slice(start, end).slice(0, options.limit);
64633
64746
  }
64634
64747
  function normalizeSessionItem(item) {
64748
+ let normalized;
64635
64749
  if (isPlainObject(item)) {
64636
- return item;
64637
- }
64638
- if (item && typeof item === "object") {
64750
+ normalized = item;
64751
+ } else if (item && typeof item === "object") {
64639
64752
  const candidate = item;
64640
64753
  for (const method of ["toJSON", "model_dump", "dict"]) {
64641
64754
  const serialize = candidate[method];
@@ -64645,23 +64758,32 @@ function normalizeSessionItem(item) {
64645
64758
  try {
64646
64759
  const parsed = serialize.call(item);
64647
64760
  if (isPlainObject(parsed)) {
64648
- return parsed;
64761
+ normalized = parsed;
64762
+ break;
64649
64763
  }
64650
64764
  } catch {
64651
64765
  }
64652
64766
  }
64653
- try {
64654
- const serialized = JSON.stringify(item);
64655
- if (serialized) {
64656
- const parsed = JSON.parse(serialized);
64657
- if (isPlainObject(parsed)) {
64658
- return parsed;
64767
+ if (!normalized) {
64768
+ try {
64769
+ const serialized = JSON.stringify(item);
64770
+ if (serialized) {
64771
+ const parsed = JSON.parse(serialized);
64772
+ if (isPlainObject(parsed)) {
64773
+ normalized = parsed;
64774
+ }
64659
64775
  }
64776
+ } catch {
64660
64777
  }
64661
- } catch {
64662
64778
  }
64663
64779
  }
64664
- return { role: "tool", content: String(item) };
64780
+ if (!normalized) {
64781
+ normalized = { role: "tool", content: String(item) };
64782
+ }
64783
+ if (typeof normalized.type === "string" && SDK_TYPE_TO_STORAGE[normalized.type]) {
64784
+ normalized = { ...normalized, type: SDK_TYPE_TO_STORAGE[normalized.type] };
64785
+ }
64786
+ return normalized;
64665
64787
  }
64666
64788
  function sessionRoleForItem(item) {
64667
64789
  const role = item.role;
@@ -64673,7 +64795,7 @@ function sessionRoleForItem(item) {
64673
64795
  const messageRole = item.role;
64674
64796
  return typeof messageRole === "string" && VALID_ROLES.has(messageRole) ? messageRole : "assistant";
64675
64797
  }
64676
- if (itemType === "function_call_output" || itemType === "computer_call_output") {
64798
+ if (itemType === "function_call_output" || itemType === "function_call_result" || itemType === "computer_call_output" || itemType === "computer_call_result") {
64677
64799
  return "tool";
64678
64800
  }
64679
64801
  if (itemType === "function_call" || itemType === "computer_call" || itemType === "reasoning") {
@@ -64684,7 +64806,11 @@ function sessionRoleForItem(item) {
64684
64806
  function memoryMessageToSessionItem(message) {
64685
64807
  const metadata = message.metadata || {};
64686
64808
  if (metadata.agent_sdk_session === true && isPlainObject(message.content)) {
64687
- return message.content;
64809
+ const item = message.content;
64810
+ if (typeof item.type === "string" && ITEM_TYPE_TO_SDK[item.type]) {
64811
+ return { ...item, type: ITEM_TYPE_TO_SDK[item.type] };
64812
+ }
64813
+ return item;
64688
64814
  }
64689
64815
  if (VALID_ROLES.has(message.role) && message.content !== void 0) {
64690
64816
  return {
@@ -64750,7 +64876,7 @@ function createOpenAISession(memory, sessionId, maxItems, appendSessionMessages)
64750
64876
  });
64751
64877
  return item;
64752
64878
  }
64753
- return null;
64879
+ return void 0;
64754
64880
  },
64755
64881
  async clearSession() {
64756
64882
  await memory.clearMessages({ conversationId: sessionId });