@whoz-oss/coday-server 0.63.2 → 0.64.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whoz-oss/coday-server",
3
- "version": "0.63.2",
3
+ "version": "0.64.0",
4
4
  "repository": "https://github.com/whoz-oss/coday",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
package/server.js CHANGED
@@ -1183,7 +1183,7 @@ Should be used selectively for significant knowledge that:
1183
1183
  2) will be valuable in multiple future interactions
1184
1184
  3) is not redundant with existing memories (in that case, update the existing one)
1185
1185
 
1186
- Do not memorize partial knowledge, single-use information, or minor implementation details.`,parameters:{type:"object",properties:{title:{type:"string",description:"Title of the memory: should be precise, unique, and reflect the full scope of the content. Avoid generic titles unless the content is really generic."},content:{type:"string",description:"Content of the memory: must be complete, validated knowledge with clear structure (sections, examples when relevant). Should include enough context to be self-contained but avoid redundancy with other memories. Length: preferably between a paragraph (for focused topics) and 3 pages (for complex patterns)."}}},parse:JSON.parse,function:async({title:p,content:m})=>{try{return this.memoryService.upsertMemory({title:p,content:m,level:"USER",agentName:n}),`USER memory added/updated with title: ${p}`}catch(h){let g=`Failed to memorize at USER level: ${h instanceof Error?h.message:"Unknown error"}`;return this.interactor.error(g),g}}}};i.push(l);let d={type:"function",function:{name:"deleteMemory",description:"Delete a memory entry by its title. Works for both PROJECT and USER level memories.",parameters:{type:"object",properties:{title:{type:"string",description:"Title of the memory to delete."}}},parse:JSON.parse,function:async({title:p})=>{try{return this.memoryService.deleteMemory(p),`Memory deleted: ${p}`}catch(m){let h=`Failed to delete memory: ${m instanceof Error?m.message:"Unknown error"}`;return this.interactor.error(h),h}}}};return i.push(d),i}};var V1e="PARAMETERS",KE=class extends Ar{name="PROJECT_SCRIPTS";constructor(e){super(e)}async buildTools(e,t){let n=[],i=e.project.scripts,a=i?Object.entries(i).map(o=>{let s=async u=>{let l;return o[1].command.includes(V1e)?l=o[1].command.replace(V1e,u?.stringParameters??""):l=`${o[1].command} ${u?.stringParameters??""}`,await ih({command:l,root:e.project.root,interactor:this.interactor,requireConfirmation:o[1].requireConfirmation})};return{type:"function",function:{name:o[0],description:o[1].description,parameters:o[1].parametersDescription?{type:"object",properties:{stringParameters:{type:"string",description:o[1].parametersDescription}}}:{type:"object",properties:{}},parse:JSON.parse,function:s}}}):[];return n.push(...a),n}};var z0t=["push","push -f","push --force","push --tags","reset","&&"],Z1e=async({params:r,root:e,interactor:t})=>{let n=`git ${r}`,i=z0t.some(a=>r.includes(a));return await ih({command:n,root:e,interactor:t,requireConfirmation:i})};var YE=class extends Ar{constructor(t,n){super(t);this.integrationService=n}name="GIT";async buildTools(t,n){let i=[];if(!this.integrationService.hasIntegration("GIT"))return i;let o={type:"function",function:{name:"git",description:"Run git command and parameters.",parameters:{type:"object",properties:{params:{type:"string",description:"Additional command (like add, log, diff, status) and parameters for git, will be composed as `git [params]`."}}},parse:JSON.parse,function:async({params:s})=>await Z1e({params:s,root:t.project.root,interactor:this.interactor})}};return i.push(o),i}};function Qg(r,e){return function(){return r.apply(e,arguments)}}var{toString:U0t}=Object.prototype,{getPrototypeOf:xB}=Object,{iterator:QE,toStringTag:J1e}=Symbol,eA=(r=>e=>{let t=U0t.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Fs=r=>(r=r.toLowerCase(),e=>eA(e)===r),tA=r=>e=>typeof e===r,{isArray:em}=Array,Q1=tA("undefined");function e8(r){return r!==null&&!Q1(r)&&r.constructor!==null&&!Q1(r.constructor)&&Wa(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}var K1e=Fs("ArrayBuffer");function B0t(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&K1e(r.buffer),e}var H0t=tA("string"),Wa=tA("function"),Y1e=tA("number"),t8=r=>r!==null&&typeof r=="object",W0t=r=>r===!0||r===!1,XE=r=>{if(eA(r)!=="object")return!1;let e=xB(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(J1e in r)&&!(QE in r)},V0t=r=>{if(!t8(r)||e8(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Z0t=Fs("Date"),G0t=Fs("File"),J0t=Fs("Blob"),K0t=Fs("FileList"),Y0t=r=>t8(r)&&Wa(r.pipe),X0t=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Wa(r.append)&&((e=eA(r))==="formdata"||e==="object"&&Wa(r.toString)&&r.toString()==="[object FormData]"))},Q0t=Fs("URLSearchParams"),[eht,tht,rht,nht]=["ReadableStream","Request","Response","Headers"].map(Fs),iht=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function r8(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),em(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{if(e8(r))return;let a=t?Object.getOwnPropertyNames(r):Object.keys(r),o=a.length,s;for(n=0;n<o;n++)s=a[n],e.call(null,r[s],s,r)}}function X1e(r,e){if(e8(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}var td=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Q1e=r=>!Q1(r)&&r!==td;function yB(){let{caseless:r,skipUndefined:e}=Q1e(this)&&this||{},t={},n=(i,a)=>{let o=r&&X1e(t,a)||a;XE(t[o])&&XE(i)?t[o]=yB(t[o],i):XE(i)?t[o]=yB({},i):em(i)?t[o]=i.slice():(!e||!Q1(i))&&(t[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&r8(arguments[i],n);return t}var aht=(r,e,t,{allOwnKeys:n}={})=>(r8(e,(i,a)=>{t&&Wa(i)?r[a]=Qg(i,t):r[a]=i},{allOwnKeys:n}),r),oht=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),sht=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},cht=(r,e,t,n)=>{let i,a,o,s={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),a=i.length;a-- >0;)o=i[a],(!n||n(o,r,e))&&!s[o]&&(e[o]=r[o],s[o]=!0);r=t!==!1&&xB(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},uht=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},lht=r=>{if(!r)return null;if(em(r))return r;let e=r.length;if(!Y1e(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},fht=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&xB(Uint8Array)),pht=(r,e)=>{let n=(r&&r[QE]).call(r),i;for(;(i=n.next())&&!i.done;){let a=i.value;e.call(r,a[0],a[1])}},dht=(r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},hht=Fs("HTMLFormElement"),mht=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),G1e=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),ght=Fs("RegExp"),eme=(r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};r8(t,(i,a)=>{let o;(o=e(i,a,r))!==!1&&(n[a]=o||i)}),Object.defineProperties(r,n)},vht=r=>{eme(r,(e,t)=>{if(Wa(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(Wa(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},bht=(r,e)=>{let t={},n=i=>{i.forEach(a=>{t[a]=!0})};return em(r)?n(r):n(String(r).split(e)),t},yht=()=>{},xht=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function wht(r){return!!(r&&Wa(r.append)&&r[J1e]==="FormData"&&r[QE])}var _ht=r=>{let e=new Array(10),t=(n,i)=>{if(t8(n)){if(e.indexOf(n)>=0)return;if(e8(n))return n;if(!("toJSON"in n)){e[i]=n;let a=em(n)?[]:{};return r8(n,(o,s)=>{let c=t(o,i+1);!Q1(c)&&(a[s]=c)}),e[i]=void 0,a}}return n};return t(r,0)},Sht=Fs("AsyncFunction"),kht=r=>r&&(t8(r)||Wa(r))&&Wa(r.then)&&Wa(r.catch),tme=((r,e)=>r?setImmediate:e?((t,n)=>(td.addEventListener("message",({source:i,data:a})=>{i===td&&a===t&&n.length&&n.shift()()},!1),i=>{n.push(i),td.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Wa(td.postMessage)),Eht=typeof queueMicrotask<"u"?queueMicrotask.bind(td):typeof process<"u"&&process.nextTick||tme,Aht=r=>r!=null&&Wa(r[QE]),ee={isArray:em,isArrayBuffer:K1e,isBuffer:e8,isFormData:X0t,isArrayBufferView:B0t,isString:H0t,isNumber:Y1e,isBoolean:W0t,isObject:t8,isPlainObject:XE,isEmptyObject:V0t,isReadableStream:eht,isRequest:tht,isResponse:rht,isHeaders:nht,isUndefined:Q1,isDate:Z0t,isFile:G0t,isBlob:J0t,isRegExp:ght,isFunction:Wa,isStream:Y0t,isURLSearchParams:Q0t,isTypedArray:fht,isFileList:K0t,forEach:r8,merge:yB,extend:aht,trim:iht,stripBOM:oht,inherits:sht,toFlatObject:cht,kindOf:eA,kindOfTest:Fs,endsWith:uht,toArray:lht,forEachEntry:pht,matchAll:dht,isHTMLForm:hht,hasOwnProperty:G1e,hasOwnProp:G1e,reduceDescriptors:eme,freezeMethods:vht,toObjectSet:bht,toCamelCase:mht,noop:yht,toFiniteNumber:xht,findKey:X1e,global:td,isContextDefined:Q1e,isSpecCompliantForm:wht,toJSONObject:_ht,isAsyncFn:Sht,isThenable:kht,setImmediate:tme,asap:Eht,isIterable:Aht};function tm(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ee.inherits(tm,Error,{toJSON:function(){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:ee.toJSONObject(this.config),code:this.code,status:this.status}}});var rme=tm.prototype,nme={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{nme[r]={value:r}});Object.defineProperties(tm,nme);Object.defineProperty(rme,"isAxiosError",{value:!0});tm.from=(r,e,t,n,i,a)=>{let o=Object.create(rme);ee.toFlatObject(r,o,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let s=r&&r.message?r.message:"Error",c=e==null&&r?r.code:e;return tm.call(o,s,c,t,n,i),r&&o.cause==null&&Object.defineProperty(o,"cause",{value:r,configurable:!0}),o.name=r&&r.name||"Error",a&&Object.assign(o,a),o};var je=tm;var Bme=Rr(Ume(),1),aA=Bme.default;function OB(r){return ee.isPlainObject(r)||ee.isArray(r)}function Wme(r){return ee.endsWith(r,"[]")?r.slice(0,-2):r}function Hme(r,e,t){return r?r.concat(e).map(function(i,a){return i=Wme(i),!t&&a?"["+i+"]":i}).join(t?".":""):e}function v1t(r){return ee.isArray(r)&&!r.some(OB)}var b1t=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)});function y1t(r,e,t){if(!ee.isObject(r))throw new TypeError("target must be an object");e=e||new(aA||FormData),t=ee.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!ee.isUndefined(g[h])});let n=t.metaTokens,i=t.visitor||l,a=t.dots,o=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(ee.isDate(m))return m.toISOString();if(ee.isBoolean(m))return m.toString();if(!c&&ee.isBlob(m))throw new je("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(m)||ee.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,h,g){let v=m;if(m&&!g&&typeof m=="object"){if(ee.endsWith(h,"{}"))h=n?h:h.slice(0,-2),m=JSON.stringify(m);else if(ee.isArray(m)&&v1t(m)||(ee.isFileList(m)||ee.endsWith(h,"[]"))&&(v=ee.toArray(m)))return h=Wme(h),v.forEach(function(x,A){!(ee.isUndefined(x)||x===null)&&e.append(o===!0?Hme([h],A,a):o===null?h:h+"[]",u(x))}),!1}return OB(m)?!0:(e.append(Hme(g,h,a),u(m)),!1)}let f=[],d=Object.assign(b1t,{defaultVisitor:l,convertValue:u,isVisitable:OB});function p(m,h){if(!ee.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),ee.forEach(m,function(v,b){(!(ee.isUndefined(v)||v===null)&&i.call(e,v,ee.isString(b)?b.trim():b,h,d))===!0&&p(v,h?h.concat(b):[b])}),f.pop()}}if(!ee.isObject(r))throw new TypeError("data must be an object");return p(r),e}var V2=y1t;function Vme(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Zme(r,e){this._pairs=[],r&&V2(r,this,e)}var Gme=Zme.prototype;Gme.append=function(e,t){this._pairs.push([e,t])};Gme.toString=function(e){let t=e?function(n){return e.call(this,n,Vme)}:Vme;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};var Jme=Zme;function x1t(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rd(r,e,t){if(!e)return r;let n=t&&t.encode||x1t;ee.isFunction(t)&&(t={serialize:t});let i=t&&t.serialize,a;if(i?a=i(e,t):a=ee.isURLSearchParams(e)?e.toString():new Jme(e,t).toString(n),a){let o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}var IB=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,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){ee.forEach(this.handlers,function(n){n!==null&&e(n)})}},$B=IB;var rm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import _1t from"crypto";import w1t from"url";var Kme=w1t.URLSearchParams;var RB="abcdefghijklmnopqrstuvwxyz",Yme="0123456789",Xme={DIGIT:Yme,ALPHA:RB,ALPHA_DIGIT:RB+RB.toUpperCase()+Yme},S1t=(r=16,e=Xme.ALPHA_DIGIT)=>{let t="",{length:n}=e,i=new Uint32Array(r);_1t.randomFillSync(i);for(let a=0;a<r;a++)t+=e[i[a]%n];return t},Qme={isNode:!0,classes:{URLSearchParams:Kme,FormData:aA,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Xme,generateString:S1t,protocols:["http","https","file","data"]};var NB={};ff(NB,{hasBrowserEnv:()=>FB,hasStandardBrowserEnv:()=>k1t,hasStandardBrowserWebWorkerEnv:()=>E1t,navigator:()=>jB,origin:()=>A1t});var FB=typeof window<"u"&&typeof document<"u",jB=typeof navigator=="object"&&navigator||void 0,k1t=FB&&(!jB||["ReactNative","NativeScript","NS"].indexOf(jB.product)<0),E1t=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",A1t=FB&&window.location.href||"http://localhost";var xr={...NB,...Qme};function MB(r,e){return V2(r,new xr.classes.URLSearchParams,{visitor:function(t,n,i,a){return xr.isNode&&ee.isBuffer(t)?(this.append(n,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function C1t(r){return ee.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function T1t(r){let e={},t=Object.keys(r),n,i=t.length,a;for(n=0;n<i;n++)a=t[n],e[a]=r[a];return e}function D1t(r){function e(t,n,i,a){let o=t[a++];if(o==="__proto__")return!0;let s=Number.isFinite(+o),c=a>=t.length;return o=!o&&ee.isArray(i)?i.length:o,c?(ee.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!ee.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],a)&&ee.isArray(i[o])&&(i[o]=T1t(i[o])),!s)}if(ee.isFormData(r)&&ee.isFunction(r.entries)){let t={};return ee.forEachEntry(r,(n,i)=>{e(C1t(n),i,t,0)}),t}return null}var oA=D1t;function P1t(r,e,t){if(ee.isString(r))try{return(e||JSON.parse)(r),ee.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}var LB={transitional:rm,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=ee.isObject(e);if(a&&ee.isHTMLForm(e)&&(e=new FormData(e)),ee.isFormData(e))return i?JSON.stringify(oA(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return MB(e,this.formSerializer).toString();if((s=ee.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return V2(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),P1t(e)):e}],transformResponse:[function(e){let t=this.transitional||LB.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(n&&!this.responseType||i)){let o=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?je.from(s,je.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],r=>{LB.headers[r]={}});var nm=LB;var O1t=ee.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"]),e4e=r=>{let e={},t,n,i;return r&&r.split(`
1186
+ Do not memorize partial knowledge, single-use information, or minor implementation details.`,parameters:{type:"object",properties:{title:{type:"string",description:"Title of the memory: should be precise, unique, and reflect the full scope of the content. Avoid generic titles unless the content is really generic."},content:{type:"string",description:"Content of the memory: must be complete, validated knowledge with clear structure (sections, examples when relevant). Should include enough context to be self-contained but avoid redundancy with other memories. Length: preferably between a paragraph (for focused topics) and 3 pages (for complex patterns)."}}},parse:JSON.parse,function:async({title:p,content:m})=>{try{return this.memoryService.upsertMemory({title:p,content:m,level:"USER",agentName:n}),`USER memory added/updated with title: ${p}`}catch(h){let g=`Failed to memorize at USER level: ${h instanceof Error?h.message:"Unknown error"}`;return this.interactor.error(g),g}}}};i.push(l);let d={type:"function",function:{name:"deleteMemory",description:"Delete a memory entry by its title. Works for both PROJECT and USER level memories.",parameters:{type:"object",properties:{title:{type:"string",description:"Title of the memory to delete."}}},parse:JSON.parse,function:async({title:p})=>{try{return this.memoryService.deleteMemory(p),`Memory deleted: ${p}`}catch(m){let h=`Failed to delete memory: ${m instanceof Error?m.message:"Unknown error"}`;return this.interactor.error(h),h}}}};return i.push(d),i}};var V1e="PARAMETERS",KE=class extends Ar{name="PROJECT_SCRIPTS";constructor(e){super(e)}async buildTools(e,t){let n=[],i=e.project.scripts,a=i?Object.entries(i).map(o=>{let s=async u=>{let l;return o[1].command.includes(V1e)?l=o[1].command.replace(V1e,u?.stringParameters??""):l=`${o[1].command} ${u?.stringParameters??""}`,await ih({command:l,root:e.project.root,interactor:this.interactor,requireConfirmation:o[1].requireConfirmation})};return{type:"function",function:{name:o[0],description:o[1].description,parameters:o[1].parametersDescription?{type:"object",properties:{stringParameters:{type:"string",description:o[1].parametersDescription}}}:{type:"object",properties:{}},parse:JSON.parse,function:s}}}):[];return n.push(...a),n}};var z0t=["push","push -f","push --force","push --tags","reset","&&","clean"],Z1e=async({params:r,root:e,interactor:t})=>{let n=`git ${r}`,i=z0t.some(a=>r.includes(a));return await ih({command:n,root:e,interactor:t,requireConfirmation:i})};var YE=class extends Ar{constructor(t,n){super(t);this.integrationService=n}name="GIT";async buildTools(t,n){let i=[];if(!this.integrationService.hasIntegration("GIT"))return i;let o={type:"function",function:{name:"git",description:"Run git command and parameters.",parameters:{type:"object",properties:{params:{type:"string",description:"Additional command (like add, log, diff, status) and parameters for git, will be composed as `git [params]`."}}},parse:JSON.parse,function:async({params:s})=>await Z1e({params:s,root:t.project.root,interactor:this.interactor})}};return i.push(o),i}};function Qg(r,e){return function(){return r.apply(e,arguments)}}var{toString:U0t}=Object.prototype,{getPrototypeOf:xB}=Object,{iterator:QE,toStringTag:J1e}=Symbol,eA=(r=>e=>{let t=U0t.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Fs=r=>(r=r.toLowerCase(),e=>eA(e)===r),tA=r=>e=>typeof e===r,{isArray:em}=Array,Q1=tA("undefined");function e8(r){return r!==null&&!Q1(r)&&r.constructor!==null&&!Q1(r.constructor)&&Wa(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}var K1e=Fs("ArrayBuffer");function B0t(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&K1e(r.buffer),e}var H0t=tA("string"),Wa=tA("function"),Y1e=tA("number"),t8=r=>r!==null&&typeof r=="object",W0t=r=>r===!0||r===!1,XE=r=>{if(eA(r)!=="object")return!1;let e=xB(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(J1e in r)&&!(QE in r)},V0t=r=>{if(!t8(r)||e8(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Z0t=Fs("Date"),G0t=Fs("File"),J0t=Fs("Blob"),K0t=Fs("FileList"),Y0t=r=>t8(r)&&Wa(r.pipe),X0t=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Wa(r.append)&&((e=eA(r))==="formdata"||e==="object"&&Wa(r.toString)&&r.toString()==="[object FormData]"))},Q0t=Fs("URLSearchParams"),[eht,tht,rht,nht]=["ReadableStream","Request","Response","Headers"].map(Fs),iht=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function r8(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),em(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{if(e8(r))return;let a=t?Object.getOwnPropertyNames(r):Object.keys(r),o=a.length,s;for(n=0;n<o;n++)s=a[n],e.call(null,r[s],s,r)}}function X1e(r,e){if(e8(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}var td=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Q1e=r=>!Q1(r)&&r!==td;function yB(){let{caseless:r,skipUndefined:e}=Q1e(this)&&this||{},t={},n=(i,a)=>{let o=r&&X1e(t,a)||a;XE(t[o])&&XE(i)?t[o]=yB(t[o],i):XE(i)?t[o]=yB({},i):em(i)?t[o]=i.slice():(!e||!Q1(i))&&(t[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&r8(arguments[i],n);return t}var aht=(r,e,t,{allOwnKeys:n}={})=>(r8(e,(i,a)=>{t&&Wa(i)?r[a]=Qg(i,t):r[a]=i},{allOwnKeys:n}),r),oht=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),sht=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},cht=(r,e,t,n)=>{let i,a,o,s={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),a=i.length;a-- >0;)o=i[a],(!n||n(o,r,e))&&!s[o]&&(e[o]=r[o],s[o]=!0);r=t!==!1&&xB(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},uht=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},lht=r=>{if(!r)return null;if(em(r))return r;let e=r.length;if(!Y1e(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},fht=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&xB(Uint8Array)),pht=(r,e)=>{let n=(r&&r[QE]).call(r),i;for(;(i=n.next())&&!i.done;){let a=i.value;e.call(r,a[0],a[1])}},dht=(r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},hht=Fs("HTMLFormElement"),mht=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),G1e=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),ght=Fs("RegExp"),eme=(r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};r8(t,(i,a)=>{let o;(o=e(i,a,r))!==!1&&(n[a]=o||i)}),Object.defineProperties(r,n)},vht=r=>{eme(r,(e,t)=>{if(Wa(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(Wa(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},bht=(r,e)=>{let t={},n=i=>{i.forEach(a=>{t[a]=!0})};return em(r)?n(r):n(String(r).split(e)),t},yht=()=>{},xht=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function wht(r){return!!(r&&Wa(r.append)&&r[J1e]==="FormData"&&r[QE])}var _ht=r=>{let e=new Array(10),t=(n,i)=>{if(t8(n)){if(e.indexOf(n)>=0)return;if(e8(n))return n;if(!("toJSON"in n)){e[i]=n;let a=em(n)?[]:{};return r8(n,(o,s)=>{let c=t(o,i+1);!Q1(c)&&(a[s]=c)}),e[i]=void 0,a}}return n};return t(r,0)},Sht=Fs("AsyncFunction"),kht=r=>r&&(t8(r)||Wa(r))&&Wa(r.then)&&Wa(r.catch),tme=((r,e)=>r?setImmediate:e?((t,n)=>(td.addEventListener("message",({source:i,data:a})=>{i===td&&a===t&&n.length&&n.shift()()},!1),i=>{n.push(i),td.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Wa(td.postMessage)),Eht=typeof queueMicrotask<"u"?queueMicrotask.bind(td):typeof process<"u"&&process.nextTick||tme,Aht=r=>r!=null&&Wa(r[QE]),ee={isArray:em,isArrayBuffer:K1e,isBuffer:e8,isFormData:X0t,isArrayBufferView:B0t,isString:H0t,isNumber:Y1e,isBoolean:W0t,isObject:t8,isPlainObject:XE,isEmptyObject:V0t,isReadableStream:eht,isRequest:tht,isResponse:rht,isHeaders:nht,isUndefined:Q1,isDate:Z0t,isFile:G0t,isBlob:J0t,isRegExp:ght,isFunction:Wa,isStream:Y0t,isURLSearchParams:Q0t,isTypedArray:fht,isFileList:K0t,forEach:r8,merge:yB,extend:aht,trim:iht,stripBOM:oht,inherits:sht,toFlatObject:cht,kindOf:eA,kindOfTest:Fs,endsWith:uht,toArray:lht,forEachEntry:pht,matchAll:dht,isHTMLForm:hht,hasOwnProperty:G1e,hasOwnProp:G1e,reduceDescriptors:eme,freezeMethods:vht,toObjectSet:bht,toCamelCase:mht,noop:yht,toFiniteNumber:xht,findKey:X1e,global:td,isContextDefined:Q1e,isSpecCompliantForm:wht,toJSONObject:_ht,isAsyncFn:Sht,isThenable:kht,setImmediate:tme,asap:Eht,isIterable:Aht};function tm(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ee.inherits(tm,Error,{toJSON:function(){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:ee.toJSONObject(this.config),code:this.code,status:this.status}}});var rme=tm.prototype,nme={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{nme[r]={value:r}});Object.defineProperties(tm,nme);Object.defineProperty(rme,"isAxiosError",{value:!0});tm.from=(r,e,t,n,i,a)=>{let o=Object.create(rme);ee.toFlatObject(r,o,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let s=r&&r.message?r.message:"Error",c=e==null&&r?r.code:e;return tm.call(o,s,c,t,n,i),r&&o.cause==null&&Object.defineProperty(o,"cause",{value:r,configurable:!0}),o.name=r&&r.name||"Error",a&&Object.assign(o,a),o};var je=tm;var Bme=Rr(Ume(),1),aA=Bme.default;function OB(r){return ee.isPlainObject(r)||ee.isArray(r)}function Wme(r){return ee.endsWith(r,"[]")?r.slice(0,-2):r}function Hme(r,e,t){return r?r.concat(e).map(function(i,a){return i=Wme(i),!t&&a?"["+i+"]":i}).join(t?".":""):e}function v1t(r){return ee.isArray(r)&&!r.some(OB)}var b1t=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)});function y1t(r,e,t){if(!ee.isObject(r))throw new TypeError("target must be an object");e=e||new(aA||FormData),t=ee.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!ee.isUndefined(g[h])});let n=t.metaTokens,i=t.visitor||l,a=t.dots,o=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(ee.isDate(m))return m.toISOString();if(ee.isBoolean(m))return m.toString();if(!c&&ee.isBlob(m))throw new je("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(m)||ee.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,h,g){let v=m;if(m&&!g&&typeof m=="object"){if(ee.endsWith(h,"{}"))h=n?h:h.slice(0,-2),m=JSON.stringify(m);else if(ee.isArray(m)&&v1t(m)||(ee.isFileList(m)||ee.endsWith(h,"[]"))&&(v=ee.toArray(m)))return h=Wme(h),v.forEach(function(x,A){!(ee.isUndefined(x)||x===null)&&e.append(o===!0?Hme([h],A,a):o===null?h:h+"[]",u(x))}),!1}return OB(m)?!0:(e.append(Hme(g,h,a),u(m)),!1)}let f=[],d=Object.assign(b1t,{defaultVisitor:l,convertValue:u,isVisitable:OB});function p(m,h){if(!ee.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),ee.forEach(m,function(v,b){(!(ee.isUndefined(v)||v===null)&&i.call(e,v,ee.isString(b)?b.trim():b,h,d))===!0&&p(v,h?h.concat(b):[b])}),f.pop()}}if(!ee.isObject(r))throw new TypeError("data must be an object");return p(r),e}var V2=y1t;function Vme(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Zme(r,e){this._pairs=[],r&&V2(r,this,e)}var Gme=Zme.prototype;Gme.append=function(e,t){this._pairs.push([e,t])};Gme.toString=function(e){let t=e?function(n){return e.call(this,n,Vme)}:Vme;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};var Jme=Zme;function x1t(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rd(r,e,t){if(!e)return r;let n=t&&t.encode||x1t;ee.isFunction(t)&&(t={serialize:t});let i=t&&t.serialize,a;if(i?a=i(e,t):a=ee.isURLSearchParams(e)?e.toString():new Jme(e,t).toString(n),a){let o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}var IB=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,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){ee.forEach(this.handlers,function(n){n!==null&&e(n)})}},$B=IB;var rm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import _1t from"crypto";import w1t from"url";var Kme=w1t.URLSearchParams;var RB="abcdefghijklmnopqrstuvwxyz",Yme="0123456789",Xme={DIGIT:Yme,ALPHA:RB,ALPHA_DIGIT:RB+RB.toUpperCase()+Yme},S1t=(r=16,e=Xme.ALPHA_DIGIT)=>{let t="",{length:n}=e,i=new Uint32Array(r);_1t.randomFillSync(i);for(let a=0;a<r;a++)t+=e[i[a]%n];return t},Qme={isNode:!0,classes:{URLSearchParams:Kme,FormData:aA,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Xme,generateString:S1t,protocols:["http","https","file","data"]};var NB={};ff(NB,{hasBrowserEnv:()=>FB,hasStandardBrowserEnv:()=>k1t,hasStandardBrowserWebWorkerEnv:()=>E1t,navigator:()=>jB,origin:()=>A1t});var FB=typeof window<"u"&&typeof document<"u",jB=typeof navigator=="object"&&navigator||void 0,k1t=FB&&(!jB||["ReactNative","NativeScript","NS"].indexOf(jB.product)<0),E1t=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",A1t=FB&&window.location.href||"http://localhost";var xr={...NB,...Qme};function MB(r,e){return V2(r,new xr.classes.URLSearchParams,{visitor:function(t,n,i,a){return xr.isNode&&ee.isBuffer(t)?(this.append(n,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function C1t(r){return ee.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function T1t(r){let e={},t=Object.keys(r),n,i=t.length,a;for(n=0;n<i;n++)a=t[n],e[a]=r[a];return e}function D1t(r){function e(t,n,i,a){let o=t[a++];if(o==="__proto__")return!0;let s=Number.isFinite(+o),c=a>=t.length;return o=!o&&ee.isArray(i)?i.length:o,c?(ee.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!ee.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],a)&&ee.isArray(i[o])&&(i[o]=T1t(i[o])),!s)}if(ee.isFormData(r)&&ee.isFunction(r.entries)){let t={};return ee.forEachEntry(r,(n,i)=>{e(C1t(n),i,t,0)}),t}return null}var oA=D1t;function P1t(r,e,t){if(ee.isString(r))try{return(e||JSON.parse)(r),ee.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}var LB={transitional:rm,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=ee.isObject(e);if(a&&ee.isHTMLForm(e)&&(e=new FormData(e)),ee.isFormData(e))return i?JSON.stringify(oA(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return MB(e,this.formSerializer).toString();if((s=ee.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return V2(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),P1t(e)):e}],transformResponse:[function(e){let t=this.transitional||LB.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(n&&!this.responseType||i)){let o=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?je.from(s,je.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],r=>{LB.headers[r]={}});var nm=LB;var O1t=ee.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"]),e4e=r=>{let e={},t,n,i;return r&&r.split(`
1187
1187
  `).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!t||e[t]&&O1t[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e};var t4e=Symbol("internals");function n8(r){return r&&String(r).trim().toLowerCase()}function sA(r){return r===!1||r==null?r:ee.isArray(r)?r.map(sA):String(r)}function I1t(r){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}var $1t=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function qB(r,e,t,n,i){if(ee.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!ee.isString(e)){if(ee.isString(n))return e.indexOf(n)!==-1;if(ee.isRegExp(n))return n.test(e)}}function R1t(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function j1t(r,e){let t=ee.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,a,o){return this[n].call(this,e,i,a,o)},configurable:!0})})}var im=class{constructor(e){e&&this.set(e)}set(e,t,n){let i=this;function a(s,c,u){let l=n8(c);if(!l)throw new Error("header name must be a non-empty string");let f=ee.findKey(i,l);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=sA(s))}let o=(s,c)=>ee.forEach(s,(u,l)=>a(u,l,c));if(ee.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ee.isString(e)&&(e=e.trim())&&!$1t(e))o(e4e(e),t);else if(ee.isObject(e)&&ee.isIterable(e)){let s={},c,u;for(let l of e){if(!ee.isArray(l))throw TypeError("Object iterator must return a key-value pair");s[u=l[0]]=(c=s[u])?ee.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}o(s,t)}else e!=null&&a(t,e,n);return this}get(e,t){if(e=n8(e),e){let n=ee.findKey(this,e);if(n){let i=this[n];if(!t)return i;if(t===!0)return I1t(i);if(ee.isFunction(t))return t.call(this,i,n);if(ee.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=n8(e),e){let n=ee.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||qB(this,this[n],n,t)))}return!1}delete(e,t){let n=this,i=!1;function a(o){if(o=n8(o),o){let s=ee.findKey(n,o);s&&(!t||qB(n,n[s],s,t))&&(delete n[s],i=!0)}}return ee.isArray(e)?e.forEach(a):a(e),i}clear(e){let t=Object.keys(this),n=t.length,i=!1;for(;n--;){let a=t[n];(!e||qB(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){let t=this,n={};return ee.forEach(this,(i,a)=>{let o=ee.findKey(n,a);if(o){t[o]=sA(i),delete t[a];return}let s=e?R1t(a):String(a).trim();s!==a&&delete t[a],t[s]=sA(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ee.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&ee.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
1188
1188
  `)}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,...t){let n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[t4e]=this[t4e]={accessors:{}}).accessors,i=this.prototype;function a(o){let s=n8(o);n[s]||(j1t(i,o),n[s]=!0)}return ee.isArray(e)?e.forEach(a):a(e),this}};im.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ee.reduceDescriptors(im.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}});ee.freezeMethods(im);var mn=im;function i8(r,e){let t=this||nm,n=e||t,i=mn.from(n.headers),a=n.data;return ee.forEach(r,function(s){a=s.call(t,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function a8(r){return!!(r&&r.__CANCEL__)}function r4e(r,e,t){je.call(this,r??"canceled",je.ERR_CANCELED,e,t),this.name="CanceledError"}ee.inherits(r4e,je,{__CANCEL__:!0});var xo=r4e;function Fc(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new je("Request failed with status code "+t.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function zB(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function UB(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function nd(r,e,t){let n=!zB(e);return r&&(n||t==!1)?UB(r,e):e}var _4e=Rr(i4e(),1),S4e=Rr(tH(),1);import fmt from"http";import pmt from"https";import dmt from"util";import Z2 from"zlib";var od="1.12.2";function l8(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}var X1t=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function rH(r,e,t){let n=t&&t.Blob||xr.classes.Blob,i=l8(r);if(e===void 0&&n&&(e=!0),i==="data"){r=i.length?r.slice(i.length+1):r;let a=X1t.exec(r);if(!a)throw new je("Invalid URL",je.ERR_INVALID_URL);let o=a[1],s=a[2],c=a[3],u=Buffer.from(decodeURIComponent(c),s?"base64":"utf8");if(e){if(!n)throw new je("Blob is not supported",je.ERR_NOT_SUPPORT);return new n([u],{type:o})}return u}throw new je("Unsupported protocol "+i,je.ERR_NOT_SUPPORT)}import cm from"stream";import Q1t from"stream";var nH=Symbol("internals"),iH=class extends Q1t.Transform{constructor(e){e=ee.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,i)=>!ee.isUndefined(i[n])),super({readableHighWaterMark:e.chunkSize});let t=this[nH]={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"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[nH];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let i=this[nH],a=i.maxRate,o=this.readableHighWaterMark,s=i.timeWindow,c=1e3/s,u=a/c,l=i.minChunkSize!==!1?Math.max(i.minChunkSize,u*.01):0,f=(p,m)=>{let h=Buffer.byteLength(p);i.bytesSeen+=h,i.bytes+=h,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(p)?process.nextTick(m):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(m)}},d=(p,m)=>{let h=Buffer.byteLength(p),g=null,v=o,b,x=0;if(a){let A=Date.now();(!i.ts||(x=A-i.ts)>=s)&&(i.ts=A,b=u-i.bytes,i.bytes=b<0?-b:0,x=0),b=u-i.bytes}if(a){if(b<=0)return setTimeout(()=>{m(null,p)},s-x);b<v&&(v=b)}v&&h>v&&h-v>l&&(g=p.subarray(v),p=p.subarray(0,v)),f(p,g?()=>{process.nextTick(m,null,g)}:m)};d(e,function p(m,h){if(m)return n(m);h?d(h,p):n(null)})}},aH=iH;import{EventEmitter as hmt}from"events";import tmt from"util";import{Readable as rmt}from"stream";var{asyncIterator:f4e}=Symbol,emt=async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[f4e]?yield*r[f4e]():yield r},cA=emt;var nmt=xr.ALPHABET.ALPHA_DIGIT+"-_",f8=typeof TextEncoder=="function"?new TextEncoder:new tmt.TextEncoder,sd=`\r
1189
1189
  `,imt=f8.encode(sd),amt=2,oH=class{constructor(e,t){let{escapeName:n}=this.constructor,i=ee.isString(t),a=`Content-Disposition: form-data; name="${n(e)}"${!i&&t.name?`; filename="${n(t.name)}"`:""}${sd}`;i?t=f8.encode(String(t).replace(/\r?\n|\r\n?/g,sd)):a+=`Content-Type: ${t.type||"application/octet-stream"}${sd}`,this.headers=f8.encode(a+sd),this.contentLength=i?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+amt,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;ee.isTypedArray(e)?yield e:yield*cA(e),yield imt}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},omt=(r,e,t)=>{let{tag:n="form-data-boundary",size:i=25,boundary:a=n+"-"+xr.generateString(i,nmt)}=t||{};if(!ee.isFormData(r))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let o=f8.encode("--"+a+sd),s=f8.encode("--"+a+"--"+sd),c=s.byteLength,u=Array.from(r.entries()).map(([f,d])=>{let p=new oH(f,d);return c+=p.size,p});c+=o.byteLength*u.length,c=ee.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(c)&&(l["Content-Length"]=c),e&&e(l),rmt.from((async function*(){for(let f of u)yield o,yield*f.encode();yield s})())},p4e=omt;import smt from"stream";var sH=class extends smt.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,t)}this.__transform(e,t,n)}},d4e=sH;var cmt=(r,e)=>ee.isAsyncFn(r)?function(...t){let n=t.pop();r.apply(this,t).then(i=>{try{e?n(null,...e(i)):n(null,i)}catch(a){n(a)}},n)}:r,h4e=cmt;function umt(r,e){r=r||10;let t=new Array(r),n=new Array(r),i=0,a=0,o;return e=e!==void 0?e:1e3,function(c){let u=Date.now(),l=n[a];o||(o=u),t[i]=c,n[i]=u;let f=a,d=0;for(;f!==i;)d+=t[f++],f=f%r;if(i=(i+1)%r,i===a&&(a=(a+1)%r),u-o<e)return;let p=l&&u-l;return p?Math.round(d*1e3/p):void 0}}var m4e=umt;function lmt(r,e){let t=0,n=1e3/e,i,a,o=(u,l=Date.now())=>{t=l,i=null,a&&(clearTimeout(a),a=null),r(...u)};return[(...u)=>{let l=Date.now(),f=l-t;f>=n?o(u,l):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-f)))},()=>i&&o(i)]}var g4e=lmt;var Vu=(r,e,t=3)=>{let n=0,i=m4e(50,250);return g4e(a=>{let o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-n,u=i(c),l=o<=s;n=o;let f={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&l?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[e?"download":"upload"]:!0};r(f)},t)},om=(r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},sm=r=>(...e)=>ee.asap(()=>r(...e));function cH(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;let e=r.indexOf(",");if(e<0)return 0;let t=r.slice(5,e),n=r.slice(e+1);if(/;base64/i.test(t)){let a=n.length,o=n.length;for(let d=0;d<o;d++)if(n.charCodeAt(d)===37&&d+2<o){let p=n.charCodeAt(d+1),m=n.charCodeAt(d+2);(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(a-=2,d+=2)}let s=0,c=o-1,u=d=>d>=2&&n.charCodeAt(d-2)===37&&n.charCodeAt(d-1)===51&&(n.charCodeAt(d)===68||n.charCodeAt(d)===100);c>=0&&(n.charCodeAt(c)===61?(s++,c--):u(c)&&(s++,c-=3)),s===1&&c>=0&&(n.charCodeAt(c)===61||u(c))&&s++;let f=Math.floor(a/4)*3-(s||0);return f>0?f:0}return Buffer.byteLength(n,"utf8")}var v4e={flush:Z2.constants.Z_SYNC_FLUSH,finishFlush:Z2.constants.Z_SYNC_FLUSH},mmt={flush:Z2.constants.BROTLI_OPERATION_FLUSH,finishFlush:Z2.constants.BROTLI_OPERATION_FLUSH},b4e=ee.isFunction(Z2.createBrotliDecompress),{http:gmt,https:vmt}=S4e.default,bmt=/https:?/,y4e=xr.protocols.map(r=>r+":"),x4e=(r,[e,t])=>(r.on("end",t).on("error",t),e);function ymt(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}function k4e(r,e,t){let n=e;if(!n&&n!==!1){let i=_4e.default.getProxyForUrl(t);i&&(n=new URL(i))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let a=Buffer.from(n.auth,"utf8").toString("base64");r.headers["Proxy-Authorization"]="Basic "+a}r.headers.host=r.hostname+(r.port?":"+r.port:"");let i=n.hostname||n.host;r.hostname=i,r.host=i,r.port=n.port,r.path=t,n.protocol&&(r.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}r.beforeRedirects.proxy=function(a){k4e(a,e,a.href)}}var xmt=typeof process<"u"&&ee.kindOf(process)==="process",wmt=r=>new Promise((e,t)=>{let n,i,a=(c,u)=>{i||(i=!0,n&&n(c,u))},o=c=>{a(c),e(c)},s=c=>{a(c,!0),t(c)};r(o,s,c=>n=c).catch(s)}),_mt=({address:r,family:e})=>{if(!ee.isString(r))throw TypeError("address must be a string");return{address:r,family:e||(r.indexOf(".")<0?6:4)}},w4e=(r,e)=>_mt(ee.isObject(r)?r:{address:r,family:e}),E4e=xmt&&function(e){return wmt(async function(n,i,a){let{data:o,lookup:s,family:c}=e,{responseType:u,responseEncoding:l}=e,f=e.method.toUpperCase(),d,p=!1,m;if(s){let N=h4e(s,F=>ee.isArray(F)?F:[F]);s=(F,H,M)=>{N(F,H,(Z,V,re)=>{if(Z)return M(Z);let q=ee.isArray(V)?V.map(te=>w4e(te)):[w4e(V,re)];H.all?M(Z,q):M(Z,q[0].address,q[0].family)})}}let h=new hmt,g=()=>{e.cancelToken&&e.cancelToken.unsubscribe(v),e.signal&&e.signal.removeEventListener("abort",v),h.removeAllListeners()};a((N,F)=>{d=!0,F&&(p=!0,g())});function v(N){h.emit("abort",!N||N.type?new xo(null,e,m):N)}h.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(v),e.signal&&(e.signal.aborted?v():e.signal.addEventListener("abort",v)));let b=nd(e.baseURL,e.url,e.allowAbsoluteUrls),x=new URL(b,xr.hasBrowserEnv?xr.origin:void 0),A=x.protocol||y4e[0];if(A==="data:"){if(e.maxContentLength>-1){let F=String(e.url||b||"");if(cH(F)>e.maxContentLength)return i(new je("maxContentLength size of "+e.maxContentLength+" exceeded",je.ERR_BAD_RESPONSE,e))}let N;if(f!=="GET")return Fc(n,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{N=rH(e.url,u==="blob",{Blob:e.env&&e.env.Blob})}catch(F){throw je.from(F,je.ERR_BAD_REQUEST,e)}return u==="text"?(N=N.toString(l),(!l||l==="utf8")&&(N=ee.stripBOM(N))):u==="stream"&&(N=cm.Readable.from(N)),Fc(n,i,{data:N,status:200,statusText:"OK",headers:new mn,config:e})}if(y4e.indexOf(A)===-1)return i(new je("Unsupported protocol "+A,je.ERR_BAD_REQUEST,e));let k=mn.from(e.headers).normalize();k.set("User-Agent","axios/"+od,!1);let{onUploadProgress:E,onDownloadProgress:R}=e,I=e.maxRate,w,_;if(ee.isSpecCompliantForm(o)){let N=k.getContentType(/boundary=([-_\w\d]{10,70})/i);o=p4e(o,F=>{k.set(F)},{tag:`axios-${od}-boundary`,boundary:N&&N[1]||void 0})}else if(ee.isFormData(o)&&ee.isFunction(o.getHeaders)){if(k.set(o.getHeaders()),!k.hasContentLength())try{let N=await dmt.promisify(o.getLength).call(o);Number.isFinite(N)&&N>=0&&k.setContentLength(N)}catch{}}else if(ee.isBlob(o)||ee.isFile(o))o.size&&k.setContentType(o.type||"application/octet-stream"),k.setContentLength(o.size||0),o=cm.Readable.from(cA(o));else if(o&&!ee.isStream(o)){if(!Buffer.isBuffer(o))if(ee.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(ee.isString(o))o=Buffer.from(o,"utf-8");else return i(new je("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",je.ERR_BAD_REQUEST,e));if(k.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return i(new je("Request body larger than maxBodyLength limit",je.ERR_BAD_REQUEST,e))}let y=ee.toFiniteNumber(k.getContentLength());ee.isArray(I)?(w=I[0],_=I[1]):w=_=I,o&&(E||w)&&(ee.isStream(o)||(o=cm.Readable.from(o,{objectMode:!1})),o=cm.pipeline([o,new aH({maxRate:ee.toFiniteNumber(w)})],ee.noop),E&&o.on("progress",x4e(o,om(y,Vu(sm(E),!1,3)))));let T;if(e.auth){let N=e.auth.username||"",F=e.auth.password||"";T=N+":"+F}if(!T&&x.username){let N=x.username,F=x.password;T=N+":"+F}T&&k.delete("authorization");let P;try{P=rd(x.pathname+x.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(N){let F=new Error(N.message);return F.config=e,F.url=e.url,F.exists=!0,i(F)}k.set("Accept-Encoding","gzip, compress, deflate"+(b4e?", br":""),!1);let C={path:P,method:f,headers:k.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:T,protocol:A,family:c,beforeRedirect:ymt,beforeRedirects:{}};!ee.isUndefined(s)&&(C.lookup=s),e.socketPath?C.socketPath=e.socketPath:(C.hostname=x.hostname.startsWith("[")?x.hostname.slice(1,-1):x.hostname,C.port=x.port,k4e(C,e.proxy,A+"//"+x.hostname+(x.port?":"+x.port:"")+C.path));let D,j=bmt.test(C.protocol);if(C.agent=j?e.httpsAgent:e.httpAgent,e.transport?D=e.transport:e.maxRedirects===0?D=j?pmt:fmt:(e.maxRedirects&&(C.maxRedirects=e.maxRedirects),e.beforeRedirect&&(C.beforeRedirects.config=e.beforeRedirect),D=j?vmt:gmt),e.maxBodyLength>-1?C.maxBodyLength=e.maxBodyLength:C.maxBodyLength=1/0,e.insecureHTTPParser&&(C.insecureHTTPParser=e.insecureHTTPParser),m=D.request(C,function(F){if(m.destroyed)return;let H=[F],M=+F.headers["content-length"];if(R||_){let te=new aH({maxRate:ee.toFiniteNumber(_)});R&&te.on("progress",x4e(te,om(M,Vu(sm(R),!0,3)))),H.push(te)}let Z=F,V=F.req||m;if(e.decompress!==!1&&F.headers["content-encoding"])switch((f==="HEAD"||F.statusCode===204)&&delete F.headers["content-encoding"],(F.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":H.push(Z2.createUnzip(v4e)),delete F.headers["content-encoding"];break;case"deflate":H.push(new d4e),H.push(Z2.createUnzip(v4e)),delete F.headers["content-encoding"];break;case"br":b4e&&(H.push(Z2.createBrotliDecompress(mmt)),delete F.headers["content-encoding"])}Z=H.length>1?cm.pipeline(H,ee.noop):H[0];let re=cm.finished(Z,()=>{re(),g()}),q={status:F.statusCode,statusText:F.statusMessage,headers:new mn(F.headers),config:e,request:V};if(u==="stream")q.data=Z,Fc(n,i,q);else{let te=[],X=0;Z.on("data",function(G){te.push(G),X+=G.length,e.maxContentLength>-1&&X>e.maxContentLength&&(p=!0,Z.destroy(),i(new je("maxContentLength size of "+e.maxContentLength+" exceeded",je.ERR_BAD_RESPONSE,e,V)))}),Z.on("aborted",function(){if(p)return;let G=new je("stream has been aborted",je.ERR_BAD_RESPONSE,e,V);Z.destroy(G),i(G)}),Z.on("error",function(G){m.destroyed||i(je.from(G,null,e,V))}),Z.on("end",function(){try{let G=te.length===1?te[0]:Buffer.concat(te);u!=="arraybuffer"&&(G=G.toString(l),(!l||l==="utf8")&&(G=ee.stripBOM(G))),q.data=G}catch(G){return i(je.from(G,null,e,q.request,q))}Fc(n,i,q)})}h.once("abort",te=>{Z.destroyed||(Z.emit("error",te),Z.destroy())})}),h.once("abort",N=>{i(N),m.destroy(N)}),m.on("error",function(F){i(je.from(F,null,e,m))}),m.on("socket",function(F){F.setKeepAlive(!0,1e3*60)}),e.timeout){let N=parseInt(e.timeout,10);if(Number.isNaN(N)){i(new je("error trying to parse `config.timeout` to int",je.ERR_BAD_OPTION_VALUE,e,m));return}m.setTimeout(N,function(){if(d)return;let H=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",M=e.transitional||rm;e.timeoutErrorMessage&&(H=e.timeoutErrorMessage),i(new je(H,M.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,e,m)),v()})}if(ee.isStream(o)){let N=!1,F=!1;o.on("end",()=>{N=!0}),o.once("error",H=>{F=!0,m.destroy(H)}),o.on("close",()=>{!N&&!F&&v(new xo("Request stream has been aborted",e,m))}),o.pipe(m)}else m.end(o)})};var A4e=xr.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,xr.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(xr.origin),xr.navigator&&/(msie|trident)/i.test(xr.navigator.userAgent)):()=>!0;var C4e=xr.hasStandardBrowserEnv?{write(r,e,t,n,i,a){let o=[r+"="+encodeURIComponent(e)];ee.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),ee.isString(n)&&o.push("path="+n),ee.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(r){let e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var T4e=r=>r instanceof mn?{...r}:r;function Ms(r,e){e=e||{};let t={};function n(u,l,f,d){return ee.isPlainObject(u)&&ee.isPlainObject(l)?ee.merge.call({caseless:d},u,l):ee.isPlainObject(l)?ee.merge({},l):ee.isArray(l)?l.slice():l}function i(u,l,f,d){if(ee.isUndefined(l)){if(!ee.isUndefined(u))return n(void 0,u,f,d)}else return n(u,l,f,d)}function a(u,l){if(!ee.isUndefined(l))return n(void 0,l)}function o(u,l){if(ee.isUndefined(l)){if(!ee.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function s(u,l,f){if(f in e)return n(u,l);if(f in r)return n(void 0,u)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,l,f)=>i(T4e(u),T4e(l),f,!0)};return ee.forEach(Object.keys({...r,...e}),function(l){let f=c[l]||i,d=f(r[l],e[l],l);ee.isUndefined(d)&&f!==s||(t[l]=d)}),t}var uA=r=>{let e=Ms({},r),{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=e;if(e.headers=o=mn.from(o),e.url=rd(nd(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),ee.isFormData(t)){if(xr.hasStandardBrowserEnv||xr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ee.isFunction(t.getHeaders)){let c=t.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,f])=>{u.includes(l.toLowerCase())&&o.set(l,f)})}}if(xr.hasStandardBrowserEnv&&(n&&ee.isFunction(n)&&(n=n(e)),n||n!==!1&&A4e(e.url))){let c=i&&a&&C4e.read(a);c&&o.set(i,c)}return e};var Smt=typeof XMLHttpRequest<"u",D4e=Smt&&function(r){return new Promise(function(t,n){let i=uA(r),a=i.data,o=mn.from(i.headers).normalize(),{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,l,f,d,p,m;function h(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function v(){if(!g)return;let x=mn.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),k={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:r,request:g};Fc(function(R){t(R),h()},function(R){n(R),h()},k),g=null}"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(v)},g.onabort=function(){g&&(n(new je("Request aborted",je.ECONNABORTED,r,g)),g=null)},g.onerror=function(A){let k=A&&A.message?A.message:"Network Error",E=new je(k,je.ERR_NETWORK,r,g);E.event=A||null,n(E),g=null},g.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",k=i.transitional||rm;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),n(new je(A,k.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,r,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&ee.forEach(o.toJSON(),function(A,k){g.setRequestHeader(k,A)}),ee.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([d,m]=Vu(u,!0),g.addEventListener("progress",d)),c&&g.upload&&([f,p]=Vu(c),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(l=x=>{g&&(n(!x||x.type?new xo(null,r,g):x),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));let b=l8(i.url);if(b&&xr.protocols.indexOf(b)===-1){n(new je("Unsupported protocol "+b+":",je.ERR_BAD_REQUEST,r));return}g.send(a||null)})};var kmt=(r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,i,a=function(u){if(!i){i=!0,s();let l=u instanceof Error?u:this.reason;n.abort(l instanceof je?l:new xo(l instanceof Error?l.message:l))}},o=e&&setTimeout(()=>{o=null,a(new je(`timeout ${e} of ms exceeded`,je.ETIMEDOUT))},e),s=()=>{r&&(o&&clearTimeout(o),o=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),r=null)};r.forEach(u=>u.addEventListener("abort",a));let{signal:c}=n;return c.unsubscribe=()=>ee.asap(s),c}},P4e=kmt;var Emt=function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let n=0,i;for(;n<t;)i=n+e,yield r.slice(n,i),n=i},Amt=async function*(r,e){for await(let t of Cmt(r))yield*Emt(t,e)},Cmt=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},uH=(r,e,t,n)=>{let i=Amt(r,e),a=0,o,s=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:u,value:l}=await i.next();if(u){s(),c.close();return}let f=l.byteLength;if(t){let d=a+=f;t(d)}c.enqueue(new Uint8Array(l))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})};var O4e=64*1024,{isFunction:lA}=ee,Tmt=(({Request:r,Response:e})=>({Request:r,Response:e}))(ee.global),{ReadableStream:I4e,TextEncoder:$4e}=ee.global,R4e=(r,...e)=>{try{return!!r(...e)}catch{return!1}},Dmt=r=>{r=ee.merge.call({skipUndefined:!0},Tmt,r);let{fetch:e,Request:t,Response:n}=r,i=e?lA(e):typeof fetch=="function",a=lA(t),o=lA(n);if(!i)return!1;let s=i&&lA(I4e),c=i&&(typeof $4e=="function"?(m=>h=>m.encode(h))(new $4e):async m=>new Uint8Array(await new t(m).arrayBuffer())),u=a&&s&&R4e(()=>{let m=!1,h=new t(xr.origin,{body:new I4e,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!h}),l=o&&s&&R4e(()=>ee.isReadableStream(new n("").body)),f={stream:l&&(m=>m.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(h,g)=>{let v=h&&h[m];if(v)return v.call(h);throw new je(`Response type '${m}' is not supported`,je.ERR_NOT_SUPPORT,g)})});let d=async m=>{if(m==null)return 0;if(ee.isBlob(m))return m.size;if(ee.isSpecCompliantForm(m))return(await new t(xr.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(m)||ee.isArrayBuffer(m))return m.byteLength;if(ee.isURLSearchParams(m)&&(m=m+""),ee.isString(m))return(await c(m)).byteLength},p=async(m,h)=>{let g=ee.toFiniteNumber(m.getContentLength());return g??d(h)};return async m=>{let{url:h,method:g,data:v,signal:b,cancelToken:x,timeout:A,onDownloadProgress:k,onUploadProgress:E,responseType:R,headers:I,withCredentials:w="same-origin",fetchOptions:_}=uA(m),y=e||fetch;R=R?(R+"").toLowerCase():"text";let T=P4e([b,x&&x.toAbortSignal()],A),P=null,C=T&&T.unsubscribe&&(()=>{T.unsubscribe()}),D;try{if(E&&u&&g!=="get"&&g!=="head"&&(D=await p(I,v))!==0){let Z=new t(h,{method:"POST",body:v,duplex:"half"}),V;if(ee.isFormData(v)&&(V=Z.headers.get("content-type"))&&I.setContentType(V),Z.body){let[re,q]=om(D,Vu(sm(E)));v=uH(Z.body,O4e,re,q)}}ee.isString(w)||(w=w?"include":"omit");let j=a&&"credentials"in t.prototype,N={..._,signal:T,method:g.toUpperCase(),headers:I.normalize().toJSON(),body:v,duplex:"half",credentials:j?w:void 0};P=a&&new t(h,N);let F=await(a?y(P,_):y(h,N)),H=l&&(R==="stream"||R==="response");if(l&&(k||H&&C)){let Z={};["status","statusText","headers"].forEach(te=>{Z[te]=F[te]});let V=ee.toFiniteNumber(F.headers.get("content-length")),[re,q]=k&&om(V,Vu(sm(k),!0))||[];F=new n(uH(F.body,O4e,re,()=>{q&&q(),C&&C()}),Z)}R=R||"text";let M=await f[ee.findKey(f,R)||"text"](F,m);return!H&&C&&C(),await new Promise((Z,V)=>{Fc(Z,V,{data:M,headers:mn.from(F.headers),status:F.status,statusText:F.statusText,config:m,request:P})})}catch(j){throw C&&C(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,m,P),{cause:j.cause||j}):je.from(j,j&&j.code,m,P)}}},Pmt=new Map,lH=r=>{let e=r?r.env:{},{fetch:t,Request:n,Response:i}=e,a=[n,i,t],o=a.length,s=o,c,u,l=Pmt;for(;s--;)c=a[s],u=l.get(c),u===void 0&&l.set(c,u=s?new Map:Dmt(e)),l=u;return u},xur=lH();var fH={http:E4e,xhr:D4e,fetch:{get:lH}};ee.forEach(fH,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var j4e=r=>`- ${r}`,Imt=r=>ee.isFunction(r)||r===null||r===!1,fA={getAdapter:(r,e)=>{r=ee.isArray(r)?r:[r];let{length:t}=r,n,i,a={};for(let o=0;o<t;o++){n=r[o];let s;if(i=n,!Imt(n)&&(i=fH[(s=String(n)).toLowerCase()],i===void 0))throw new je(`Unknown adapter '${s}'`);if(i&&(ee.isFunction(i)||(i=i.get(e))))break;a[s||"#"+o]=i}if(!i){let o=Object.entries(a).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),s=t?o.length>1?`since :