@tencent-ai/codebuddy-code 0.0.1-beta.2 → 0.0.1-beta.21

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.
@@ -0,0 +1 @@
1
+ "use strict";exports.id=422,exports.ids=[422],exports.modules={7422:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.r(t),n.d(t,{LoginView:()=>LoginView});var l=n(80932),a=n(14083),o=n(96540),c=n(66814),i=n(75101),s=n(82101),u=n(34209),m=n(53829),E=n(49034),d=n(47693),g=n(83175),b=n(42790),y=e([a,s,m,E,b]);[a,s,m,E,b]=y.then?(await y)():y;const LoginView=()=>{const e=(0,c.i7)(m.Gb,(e=>e.staticKey));return o.createElement(o.Fragment,null,o.createElement(a.jC,{key:`login-view-${e}`,items:[o.createElement(LogoBox,{key:"logo-box"}),o.createElement(NewVersionBox,{key:"new-version-box"})]},(e=>e)),o.createElement(LoginBox,null))},LogoBox=()=>{const e=`Welcome to ${u.KR}`,t=e.length+8;return o.createElement(o.Fragment,null,o.createElement(a.az,{marginBottom:1,paddingLeft:1,borderStyle:"round",borderColor:g.Q.brand,width:t},o.createElement(a.EY,{color:g.Q.brand},"✻ ",e)),o.createElement(b.H,null))},NewVersionBox=()=>{const e="cyan",t=i.CW.getCurrentPackageJson(),n=t.version.includes("beta"),r=t.version.includes("alpha"),l=n?"@beta":r?"@alpha":"";return o.createElement(a.az,{paddingX:1,flexDirection:"column",borderStyle:"round",borderColor:e},o.createElement(a.EY,{color:e},"New Version Updated v",t.version," Release! Please visit ",u.KR," website to read changelog."),o.createElement(a.EY,{color:e},"Run npm install -g ",u.JP,l))},LoginBox=()=>{const{authSession:e,navigate:t}=(0,c.i7)(m.aO,(e=>({authSession:e.authSession,navigate:e.navigate}))),[n,r]=(0,o.useState)("idle"),[i,u]=(0,o.useState)(""),[b,y]=(0,o.useState)(""),h=(0,o.useRef)(new AbortController);return(0,o.useEffect)((()=>{const e=(0,d.bi)().urlSubject.subscribe(u);return()=>e.unsubscribe()}),[]),(0,a.Ge)(((l,a)=>{if(E.Om.RETURN(a)&&"idle"===n)try{r("loading"),y(""),(0,d.Yf)().login(h.current)}catch(e){r("error"),y(e instanceof Error?e.message:"Unknown error occurred")}else E.Om.ESCAPE(a)&&("loading"===n?(h.current.abort(),r("idle")):e&&t("/chat"))})),o.createElement(a.az,{paddingX:1,flexDirection:"column",gap:1,borderStyle:"round",borderColor:"grey"},"idle"===n?o.createElement(o.Fragment,null,o.createElement(a.az,null,o.createElement(a.EY,null,"Select login method:")),o.createElement(a.az,null,o.createElement(a.EY,{color:"green"},l.Ay.bullet," Login with Tencent Cloud CodeBuddy")),o.createElement(a.az,{justifyContent:"space-between"},o.createElement(a.EY,{color:"grey"},"(Press Enter to login)"))):"loading"===n?o.createElement(a.az,{paddingY:1,gap:1,flexDirection:"column"},o.createElement(a.az,null,o.createElement(a.EY,{color:"grey"},"Browser didn't open? User the url below to sign in:")),i&&o.createElement(a.az,null,o.createElement(a.EY,{color:"grey"},i)),o.createElement(a.az,{marginTop:1,gap:1},o.createElement(a.EY,{color:g.Q.brand},o.createElement(s.y$,{type:"star"})),o.createElement(a.EY,null,"Waiting for auth... (Press ESC to cancel)"))):"error"===n?o.createElement(o.Fragment,null,o.createElement(a.EY,{color:"red"},"Failed to login."),b&&o.createElement(a.EY,{color:"red"},"Message: ",b)):void 0)};r()}catch(e){r(e)}}))},42790:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{H:()=>LogoText});var l=n(1597),a=n(14083),o=n(96540),c=n(83175),i=e([a]);a=(i.then?(await i)():i)[0];const LogoText=()=>{const e=(0,o.useRef)((0,l.Ay)(c.Q.GradientColors)),t=(0,o.useCallback)((t=>e.current.multiline(t)),[e]);return o.createElement(a.dL,{transform:t},o.createElement(a.EY,null,"\n ██████╗ ██████╗ ██████╗ ███████╗██████╗ ██╗ ██╗██████╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗\n██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗██║ ██║██╔══██╗██╔══██╗╚██╗ ██╔╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝\n██║ ██║ ██║██║ ██║█████╗ ██████╔╝██║ ██║██║ ██║██║ ██║ ╚████╔╝ ██║ ██║ ██║██║ ██║█████╗ \n██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗██║ ██║██║ ██║██║ ██║ ╚██╔╝ ██║ ██║ ██║██║ ██║██╔══╝ \n╚██████╗╚██████╔╝██████╔╝███████╗██████╔╝╚██████╔╝██████╔╝██████╔╝ ██║ ╚██████╗╚██████╔╝██████╔╝███████╗\n ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝\n \n\n . * . * . *\n /\\_/\\ \n ( o.o ) * . * \n > ^ < . \n"))};r()}catch(e){r(e)}}))}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=444,exports.ids=[444],exports.modules={84444:(e,t,r)=>{r.r(t),r.d(t,{Client:()=>Client});var s=r(76889);class Protocol{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(s.CancelledNotificationSchema,(e=>{const t=this._requestHandlerAbortControllers.get(e.params.requestId);null==t||t.abort(e.params.reason)})),this.setNotificationHandler(s.ProgressNotificationSchema,(e=>{this._onprogress(e)})),this.setRequestHandler(s.PingRequestSchema,(e=>({})))}_setupTimeout(e,t,r,s,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(s,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:s})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new s.McpError(s.ErrorCode.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var t,r,o;this._transport=e;const i=null===(t=this.transport)||void 0===t?void 0:t.onclose;this._transport.onclose=()=>{null==i||i(),this._onclose()};const n=null===(r=this.transport)||void 0===r?void 0:r.onerror;this._transport.onerror=e=>{null==n||n(e),this._onerror(e)};const a=null===(o=this._transport)||void 0===o?void 0:o.onmessage;this._transport.onmessage=(e,t)=>{null==a||a(e,t),(0,s.isJSONRPCResponse)(e)||(0,s.isJSONRPCError)(e)?this._onresponse(e):(0,s.isJSONRPCRequest)(e)?this._onrequest(e,t):(0,s.isJSONRPCNotification)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){var e;const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,null===(e=this.onclose)||void 0===e||e.call(this);const r=new s.McpError(s.ErrorCode.ConnectionClosed,"Connection closed");for(const e of t.values())e(r)}_onerror(e){var t;null===(t=this.onerror)||void 0===t||t.call(this,e)}_onnotification(e){var t;const r=null!==(t=this._notificationHandlers.get(e.method))&&void 0!==t?t:this.fallbackNotificationHandler;void 0!==r&&Promise.resolve().then((()=>r(e))).catch((e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`))))}_onrequest(e,t){var r,o,i,n;const a=null!==(r=this._requestHandlers.get(e.method))&&void 0!==r?r:this.fallbackRequestHandler;if(void 0===a)return void(null===(o=this._transport)||void 0===o||o.send({jsonrpc:"2.0",id:e.id,error:{code:s.ErrorCode.MethodNotFound,message:"Method not found"}}).catch((e=>this._onerror(new Error(`Failed to send an error response: ${e}`)))));const l=new AbortController;this._requestHandlerAbortControllers.set(e.id,l);const u={signal:l.signal,sessionId:null===(i=this._transport)||void 0===i?void 0:i.sessionId,_meta:null===(n=e.params)||void 0===n?void 0:n._meta,sendNotification:t=>this.notification(t,{relatedRequestId:e.id}),sendRequest:(t,r,s)=>this.request(t,r,{...s,relatedRequestId:e.id}),authInfo:null==t?void 0:t.authInfo,requestId:e.id,requestInfo:null==t?void 0:t.requestInfo};Promise.resolve().then((()=>a(e,u))).then((t=>{var r;if(!l.signal.aborted)return null===(r=this._transport)||void 0===r?void 0:r.send({result:t,jsonrpc:"2.0",id:e.id})}),(t=>{var r,o;if(!l.signal.aborted)return null===(r=this._transport)||void 0===r?void 0:r.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:s.ErrorCode.InternalError,message:null!==(o=t.message)&&void 0!==o?o:"Internal error"}})})).catch((e=>this._onerror(new Error(`Failed to send response: ${e}`)))).finally((()=>{this._requestHandlerAbortControllers.delete(e.id)}))}_onprogress(e){const{progressToken:t,...r}=e.params,s=Number(t),o=this._progressHandlers.get(s);if(!o)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const i=this._responseHandlers.get(s),n=this._timeoutInfo.get(s);if(n&&i&&n.resetTimeoutOnProgress)try{this._resetTimeout(s)}catch(e){return void i(e)}o(r)}_onresponse(e){const t=Number(e.id),r=this._responseHandlers.get(t);if(void 0!==r)if(this._responseHandlers.delete(t),this._progressHandlers.delete(t),this._cleanupTimeout(t),(0,s.isJSONRPCResponse)(e))r(e);else{r(new s.McpError(e.error.code,e.error.message,e.error.data))}else this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`))}get transport(){return this._transport}async close(){var e;await(null===(e=this._transport)||void 0===e?void 0:e.close())}request(e,t,r){const{relatedRequestId:o,resumptionToken:i,onresumptiontoken:n}=null!=r?r:{};return new Promise(((a,l)=>{var u,c,d,h,p,m;if(!this._transport)return void l(new Error("Not connected"));!0===(null===(u=this._options)||void 0===u?void 0:u.enforceStrictCapabilities)&&this.assertCapabilityForMethod(e.method),null===(c=null==r?void 0:r.signal)||void 0===c||c.throwIfAborted();const v=this._requestMessageId++,_={...e,jsonrpc:"2.0",id:v};(null==r?void 0:r.onprogress)&&(this._progressHandlers.set(v,r.onprogress),_.params={...e.params,_meta:{...(null===(d=e.params)||void 0===d?void 0:d._meta)||{},progressToken:v}});const cancel=e=>{var t;this._responseHandlers.delete(v),this._progressHandlers.delete(v),this._cleanupTimeout(v),null===(t=this._transport)||void 0===t||t.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:v,reason:String(e)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:n}).catch((e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)))),l(e)};this._responseHandlers.set(v,(e=>{var s;if(!(null===(s=null==r?void 0:r.signal)||void 0===s?void 0:s.aborted)){if(e instanceof Error)return l(e);try{const r=t.parse(e.result);a(r)}catch(e){l(e)}}})),null===(h=null==r?void 0:r.signal)||void 0===h||h.addEventListener("abort",(()=>{var e;cancel(null===(e=null==r?void 0:r.signal)||void 0===e?void 0:e.reason)}));const f=null!==(p=null==r?void 0:r.timeout)&&void 0!==p?p:6e4;this._setupTimeout(v,f,null==r?void 0:r.maxTotalTimeout,(()=>cancel(new s.McpError(s.ErrorCode.RequestTimeout,"Request timed out",{timeout:f}))),null!==(m=null==r?void 0:r.resetTimeoutOnProgress)&&void 0!==m&&m),this._transport.send(_,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:n}).catch((e=>{this._cleanupTimeout(v),l(e)}))}))}async notification(e,t){var r,s;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);if((null!==(s=null===(r=this._options)||void 0===r?void 0:r.debouncedNotificationMethods)&&void 0!==s?s:[]).includes(e.method)&&!e.params&&!(null==t?void 0:t.relatedRequestId)){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then((()=>{var r;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;const s={...e,jsonrpc:"2.0"};null===(r=this._transport)||void 0===r||r.send(s,t).catch((e=>this._onerror(e)))}))}const o={...e,jsonrpc:"2.0"};await this._transport.send(o,t)}setRequestHandler(e,t){const r=e.shape.method.value;this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,((r,s)=>Promise.resolve(t(e.parse(r),s))))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){this._notificationHandlers.set(e.shape.method.value,(r=>Promise.resolve(t(e.parse(r)))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}var o=r(82174);class Client extends Protocol{constructor(e,t){var r;super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=null!==(r=null==t?void 0:t.capabilities)&&void 0!==r?r:{},this._ajv=new o}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=function mergeCapabilities(e,t){return Object.entries(t).reduce(((e,[t,r])=>(e[t]=r&&"object"==typeof r&&e[t]?{...e[t],...r}:r,e)),{...e})}(this._capabilities,e)}assertCapability(e,t){var r;if(!(null===(r=this._serverCapabilities)||void 0===r?void 0:r[e]))throw new Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),void 0===e.sessionId)try{const r=await this.request({method:"initialize",params:{protocolVersion:s.LATEST_PROTOCOL_VERSION,capabilities:this._capabilities,clientInfo:this._clientInfo}},s.InitializeResultSchema,t);if(void 0===r)throw new Error(`Server sent invalid initialize result: ${r}`);if(!s.SUPPORTED_PROTOCOL_VERSIONS.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"})}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var t,r,s,o,i;switch(e){case"logging/setLevel":if(!(null===(t=this._serverCapabilities)||void 0===t?void 0:t.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(null===(r=this._serverCapabilities)||void 0===r?void 0:r.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(null===(s=this._serverCapabilities)||void 0===s?void 0:s.resources))throw new Error(`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(null===(o=this._serverCapabilities)||void 0===o?void 0:o.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(null===(i=this._serverCapabilities)||void 0===i?void 0:i.completions))throw new Error(`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){var t;if("notifications/roots/list_changed"===e)if(!(null===(t=this._capabilities.roots)||void 0===t?void 0:t.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},s.EmptyResultSchema,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},s.CompleteResultSchema,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},s.EmptyResultSchema,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},s.GetPromptResultSchema,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},s.ListPromptsResultSchema,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},s.ListResourcesResultSchema,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},s.ListResourceTemplatesResultSchema,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},s.ReadResourceResultSchema,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},s.EmptyResultSchema,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},s.EmptyResultSchema,t)}async callTool(e,t=s.CallToolResultSchema,r){const o=await this.request({method:"tools/call",params:e},t,r),i=this.getToolOutputValidator(e.name);if(i){if(!o.structuredContent&&!o.isError)throw new s.McpError(s.ErrorCode.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent)try{if(!i(o.structuredContent))throw new s.McpError(s.ErrorCode.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(i.errors)}`)}catch(e){if(e instanceof s.McpError)throw e;throw new s.McpError(s.ErrorCode.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(const t of e)if(t.outputSchema)try{const e=this._ajv.compile(t.outputSchema);this._cachedToolOutputValidators.set(t.name,e)}catch(e){}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){const r=await this.request({method:"tools/list",params:e},s.ListToolsResultSchema,t);return this.cacheToolOutputSchemas(r.tools),r}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=566,exports.ids=[566],exports.modules={19250:(e,t,a)=>{a.a(e,(async(e,n)=>{try{a.d(t,{NH:()=>r.NH,pF:()=>m.pF});var l=a(77146),s=a(89536),c=a(70790),m=a(62875),r=a(82388),i=e([l,s,c,m,r]);[l,s,c,m,r]=i.then?(await i)():i,n()}catch(e){n(e)}}))},90566:(e,t,a)=>{a.a(e,(async(e,n)=>{try{a.r(t),a.d(t,{ChatView:()=>ChatView});var l=a(14083),s=a(96540),c=a(66814),m=a(26730),r=a(53829),i=a(59505),u=a(19250),o=a(66530),p=a(92709),g=e([l,m,r,i,u,o,p]);[l,m,r,i,u,o,p]=g.then?(await g)():g;const h=2,E=2,d=s.memo((({availableHeight:e})=>{const t=(0,c.i7)(r.Gb,(e=>e.staticKey)),a=(0,c.i7)(r.rZ,(e=>e.messageGroups)),n=(0,p.A)(a),[m,i]=(0,s.useState)([]),[u,g]=(0,s.useState)([]);(0,s.useEffect)((()=>{const e=[],t=[];for(const n of a){if("function_call_group"===n.type){if(!n.messages.find((e=>"function_call"===e.type&&e.status&&["completed","incomplete"].includes(e.status)))){t.push(...n.messages);continue}}e.push(...n.messages)}i(e),g(t)}),[a]);const E=s.useMemo((()=>[s.createElement(o.f,{key:"chat-header-box"}),...m.map((e=>s.createElement(p.h,{key:`message-item-${e.type}-${e.id}`,msg:e,expanded:n(e.id)})))]),[m,n]);return s.createElement(s.Fragment,null,s.createElement(l.jC,{key:t,items:E},(e=>e)),u.length?s.createElement(l.az,{flexDirection:"column",height:h},...u.map((e=>s.createElement(p.h,{key:`message-item-${e.type}-${e.id}`,msg:e,expanded:n(e.id)})))):s.createElement(s.Fragment,null))})),ChatContainer=()=>{const e=(0,c.i7)(r.Gb,(e=>e.terminalHeight)),[t,a]=(0,s.useState)(0);return(0,s.useEffect)((()=>{a(e-E)}),[e]),(0,m.o)(),(0,i.f)(),s.createElement(s.Fragment,null,s.createElement(d,{availableHeight:t}),s.createElement(l.az,{flexDirection:"column"},s.createElement(u.NH,null,s.createElement(u.pF,{availableHeight:t}))))},ChatView=()=>s.createElement(r.Fn,null,s.createElement(r.N7,null,s.createElement(r.Y5,null,s.createElement(ChatContainer,null))));n()}catch(e){n(e)}}))}};
@@ -0,0 +1 @@
1
+ exports.id=597,exports.ids=[597],exports.modules={1597:(t,e,o)=>{"use strict";o.d(e,{Ay:()=>P});const wrapAnsi16=(t=0)=>e=>`[${e+t}m`,wrapAnsi256=(t=0)=>e=>`[${38+t};5;${e}m`,wrapAnsi16m=(t=0)=>(e,o,r)=>`[${38+t};2;${e};${o};${r}m`,r={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(r.modifier),Object.keys(r.color),Object.keys(r.bgColor);const n=function assembleStyles(){const t=new Map;for(const[e,o]of Object.entries(r)){for(const[e,n]of Object.entries(o))r[e]={open:`[${n[0]}m`,close:`[${n[1]}m`},o[e]=r[e],t.set(n[0],n[1]);Object.defineProperty(r,e,{value:o,enumerable:!1})}return Object.defineProperty(r,"codes",{value:t,enumerable:!1}),r.color.close="",r.bgColor.close="",r.color.ansi=wrapAnsi16(),r.color.ansi256=wrapAnsi256(),r.color.ansi16m=wrapAnsi16m(),r.bgColor.ansi=wrapAnsi16(10),r.bgColor.ansi256=wrapAnsi256(10),r.bgColor.ansi16m=wrapAnsi16m(10),Object.defineProperties(r,{rgbToAnsi256:{value:(t,e,o)=>t===e&&e===o?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(o/255*5),enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[o]=e;3===o.length&&(o=[...o].map((t=>t+t)).join(""));const r=Number.parseInt(o,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:t=>r.rgbToAnsi256(...r.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return t-8+90;let e,o,r;if(t>=232)e=(10*(t-232)+8)/255,o=e,r=e;else{const n=(t-=16)%36;e=Math.floor(t/36)/5,o=Math.floor(n/6)/5,r=n%6/5}const n=2*Math.max(e,o,r);if(0===n)return 30;let i=30+(Math.round(r)<<2|Math.round(o)<<1|Math.round(e));return 2===n&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,e,o)=>r.ansi256ToAnsi(r.rgbToAnsi256(t,e,o)),enumerable:!1},hexToAnsi:{value:t=>r.ansi256ToAnsi(r.hexToAnsi256(t)),enumerable:!1}}),r}();var i=o(1708),a=o(48161),s=o(7066);function hasFlag(t,e=(globalThis.Deno?globalThis.Deno.args:i.argv)){const o=t.startsWith("-")?"":1===t.length?"-":"--",r=e.indexOf(o+t),n=e.indexOf("--");return-1!==r&&(-1===n||r<n)}const{env:l}=i;let c;function _supportsColor(t,{streamIsTTY:e,sniffFlags:o=!0}={}){const r=function envForceColor(){if("FORCE_COLOR"in l)return"true"===l.FORCE_COLOR?1:"false"===l.FORCE_COLOR?0:0===l.FORCE_COLOR.length?1:Math.min(Number.parseInt(l.FORCE_COLOR,10),3)}();void 0!==r&&(c=r);const n=o?c:r;if(0===n)return 0;if(o){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2}if("TF_BUILD"in l&&"AGENT_NAME"in l)return 1;if(t&&!e&&void 0===n)return 0;const s=n||0;if("dumb"===l.TERM)return s;if("win32"===i.platform){const t=a.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in l)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((t=>t in l))?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((t=>t in l))||"codeship"===l.CI_NAME?1:s;if("TEAMCITY_VERSION"in l)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(l.TEAMCITY_VERSION)?1:0;if("truecolor"===l.COLORTERM)return 3;if("xterm-kitty"===l.TERM)return 3;if("TERM_PROGRAM"in l){const t=Number.parseInt((l.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(l.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(l.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(l.TERM)||"COLORTERM"in l?1:s}function createSupportsColor(t,e={}){return function translateLevel(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(_supportsColor(t,{streamIsTTY:t&&t.isTTY,...e}))}hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")?c=0:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(c=1);const h={stdout:createSupportsColor({isTTY:s.isatty(1)}),stderr:createSupportsColor({isTTY:s.isatty(2)})};function stringReplaceAll(t,e,o){let r=t.indexOf(e);if(-1===r)return t;const n=e.length;let i=0,a="";do{a+=t.slice(i,r)+e+o,i=r+n,r=t.indexOf(e,i)}while(-1!==r);return a+=t.slice(i),a}const{stdout:u,stderr:f}=h,g=Symbol("GENERATOR"),p=Symbol("STYLER"),d=Symbol("IS_EMPTY"),b=["ansi","ansi","ansi256","ansi16m"],m=Object.create(null);const chalkFactory=t=>{const chalk=(...t)=>t.join(" ");return((t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const o=u?u.level:0;t.level=void 0===e.level?o:e.level})(chalk,t),Object.setPrototypeOf(chalk,createChalk.prototype),chalk};function createChalk(t){return chalkFactory(t)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[t,e]of Object.entries(n))m[t]={get(){const o=createBuilder(this,createStyler(e.open,e.close,this[p]),this[d]);return Object.defineProperty(this,t,{value:o}),o}};m.visible={get(){const t=createBuilder(this,this[p],!0);return Object.defineProperty(this,"visible",{value:t}),t}};const getModelAnsi=(t,e,o,...r)=>"rgb"===t?"ansi16m"===e?n[o].ansi16m(...r):"ansi256"===e?n[o].ansi256(n.rgbToAnsi256(...r)):n[o].ansi(n.rgbToAnsi(...r)):"hex"===t?getModelAnsi("rgb",e,o,...n.hexToRgb(...r)):n[o][t](...r),y=["rgb","hex","ansi256"];for(const t of y){m[t]={get(){const{level:e}=this;return function(...o){const r=createStyler(getModelAnsi(t,b[e],"color",...o),n.color.close,this[p]);return createBuilder(this,r,this[d])}}};m["bg"+t[0].toUpperCase()+t.slice(1)]={get(){const{level:e}=this;return function(...o){const r=createStyler(getModelAnsi(t,b[e],"bgColor",...o),n.bgColor.close,this[p]);return createBuilder(this,r,this[d])}}}}const v=Object.defineProperties((()=>{}),{...m,level:{enumerable:!0,get(){return this[g].level},set(t){this[g].level=t}}}),createStyler=(t,e,o)=>{let r,n;return void 0===o?(r=t,n=e):(r=o.openAll+t,n=e+o.closeAll),{open:t,close:e,openAll:r,closeAll:n,parent:o}},createBuilder=(t,e,o)=>{const builder=(...t)=>applyStyle(builder,1===t.length?""+t[0]:t.join(" "));return Object.setPrototypeOf(builder,v),builder[g]=t,builder[p]=e,builder[d]=o,builder},applyStyle=(t,e)=>{if(t.level<=0||!e)return t[d]?"":e;let o=t[p];if(void 0===o)return e;const{openAll:r,closeAll:n}=o;if(e.includes(""))for(;void 0!==o;)e=stringReplaceAll(e,o.close,o.open),o=o.parent;const i=e.indexOf("\n");return-1!==i&&(e=function stringEncaseCRLFWithFirstIndex(t,e,o,r){let n=0,i="";do{const a="\r"===t[r-1];i+=t.slice(n,a?r-1:r)+e+(a?"\r\n":"\n")+o,n=r+1,r=t.indexOf("\n",n)}while(-1!==r);return i+=t.slice(n),i}(e,n,r,i)),r+e+n};Object.defineProperties(createChalk.prototype,m);const _=createChalk(),x=(createChalk({level:f?f.level:0}),_);var A=o(34192);const gradient=(...t)=>{let e,o;if(0===t.length)throw new Error("Missing gradient colors");if(Array.isArray(t[0]))e=A(t[0]),o=validateOptions(t[1]);else{if(1===t.length)throw new Error(`Expected an array of colors, received ${JSON.stringify(t[0])}`);e=A(...t)}const fn=(t,r)=>function applyGradient(t,e,o){const r=validateOptions(o),n=Math.max(t.replace(/\s/g,"").length,e.stops.length),i=getColors(e,r,n);let a="";for(const e of t)a+=e.match(/\s/g)?e:x.hex(i.shift()?.toHex()||"#000")(e);return a}(t?t.toString():"",e,r??o);return fn.multiline=(t,r)=>function multiline(t,e,o){const r=validateOptions(o),n=t.split("\n"),i=Math.max(...n.map((t=>t.length)),e.stops.length),a=getColors(e,r,i),s=[];for(const t of n){const e=a.slice(0);let o="";for(const r of t)o+=x.hex(e.shift()?.toHex()||"#000")(r);s.push(o)}return s.join("\n")}(t?t.toString():"",e,r??o),fn},getColors=(t,e,o)=>"hsv"===e.interpolation?.toLowerCase()?t.hsv(o,e.hsvSpin?.toLowerCase()||!1):t.rgb(o);function validateOptions(t){const e={interpolation:"rgb",hsvSpin:"short",...t};if(void 0!==t&&"object"!=typeof t)throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof t}\``);if("string"!=typeof e.interpolation)throw new TypeError(`Expected \`options.interpolation\` to be \`rgb\` or \`hsv\`, got \`${typeof e.interpolation}\``);if("hsv"===e.interpolation.toLowerCase()&&"string"!=typeof e.hsvSpin)throw new TypeError(`Expected \`options.hsvSpin\` to be a \`short\` or \`long\`, got \`${typeof e.hsvSpin}\``);return e}const M={colors:["#bdfff3","#4ac29a"],options:{}},T={colors:["#77a1d3","#79cbca","#e684ae"],options:{}},w={colors:["#473b7b","#3584a7","#30d2be"],options:{}},S={colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},R={colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},C={colors:["#f43b47","#453a94"],options:{}},H={colors:["#ff4e50","#f9d423"],options:{}},O={colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},k={colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},E={colors:["#fdbb2d","#22c1c3"],options:{}},F={colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},I={colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}};function gradientAlias(t){const result=e=>gradient(...t.colors)(e,t.options);return result.multiline=(e="")=>gradient(...t.colors).multiline(e,t.options),result}const P=gradient,N=gradientAlias({colors:["#feac5e","#c779d0","#4bc0c8"],options:{}}),j=gradientAlias(M),L=gradientAlias(T),B=gradientAlias(w),G=gradientAlias(S),$=gradientAlias(R),U=gradientAlias(C),V=gradientAlias(H),D=gradientAlias(O),Y=gradientAlias(k),z=gradientAlias(E),q=gradientAlias(F),W=gradientAlias(I);gradient.atlas=N,gradient.cristal=j,gradient.teen=L,gradient.mind=B,gradient.morning=G,gradient.vice=$,gradient.passion=U,gradient.fruit=V,gradient.instagram=D,gradient.retro=Y,gradient.summer=z,gradient.rainbow=q,gradient.pastel=W},34192:(t,e,o)=>{const r=o(45888),n={r:256,g:256,b:256,a:1},i={h:360,s:1,v:1,a:1};function stepize(t,e,o){let r={};for(let n in t)t.hasOwnProperty(n)&&(r[n]=0===o?0:(e[n]-t[n])/o);return r}function interpolate(t,e,o,r){let n={};for(let i in e)e.hasOwnProperty(i)&&(n[i]=t[i]*o+e[i],n[i]=n[i]<0?n[i]+r[i]:1!==r[i]?n[i]%r[i]:n[i]);return n}function interpolateRgb(t,e,o){const i=t.color.toRgb(),a=stepize(i,e.color.toRgb(),o);let s=[t.color];for(let t=1;t<o;t++){const e=interpolate(a,i,t,n);s.push(r(e))}return s}function interpolateHsv(t,e,o,n){const a=t.color.toHsv(),s=e.color.toHsv();if(0===a.s||0===s.s)return interpolateRgb(t,e,o);let l;if("boolean"==typeof n)l=n;else{const t=a.h<s.h&&s.h-a.h<180||a.h>s.h&&a.h-s.h>180;l="long"===n&&t||"short"===n&&!t}const c=stepize(a,s,o);let h,u=[t.color];h=a.h<=s.h&&!l||a.h>=s.h&&l?s.h-a.h:l?360-s.h+a.h:360-a.h+s.h,c.h=Math.pow(-1,l?1:0)*Math.abs(h)/o;for(let t=1;t<o;t++){const e=interpolate(c,a,t,i);u.push(r(e))}return u}function computeSubsteps(t,e){const o=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<o)throw new Error("Number of steps cannot be inferior to number of stops");let r=[];for(let n=1;n<o;n++){const o=(e-1)*(t[n].pos-t[n-1].pos);r.push(Math.max(1,Math.round(o)))}let n=1;for(let t=o-1;t--;)n+=r[t];for(;n!==e;)if(n<e){const t=Math.min.apply(null,r);r[r.indexOf(t)]++,n++}else{const t=Math.max.apply(null,r);r[r.indexOf(t)]--,n--}return r}function computeAt(t,e,o,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,a;for(let o=0,r=t.length;o<r-1;o++)if(e>=t[o].pos&&e<t[o+1].pos){i=t[o],a=t[o+1];break}i||(i=a=t[t.length-1]);const s=interpolate(stepize(i.color[o](),a.color[o](),100*(a.pos-i.pos)),i.color[o](),100*(e-i.pos),n);return r(s)}class TinyGradient{constructor(t){if(t.length<2)throw new Error("Invalid number of stops (< 2)");const e=void 0!==t[0].pos;let o=t.length,n=-1,i=!1;this.stops=t.map(((t,a)=>{const s=void 0!==t.pos;if(e^s)throw new Error("Cannot mix positionned and not posionned color stops");if(s){const e=void 0!==t.color;if(!e&&(i||0===a||a===o-1))throw new Error("Cannot define two consecutive position-only stops");if(i=!e,(t={color:e?r(t.color):null,colorLess:!e,pos:t.pos}).pos<0||t.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(t.pos<n)throw new Error("Color stops positions are not ordered");n=t.pos}else t={color:r(void 0!==t.color?t.color:t),pos:a/(o-1)};return t})),0!==this.stops[0].pos&&(this.stops.unshift({color:this.stops[0].color,pos:0}),o++),1!==this.stops[o-1].pos&&this.stops.push({color:this.stops[o-1].color,pos:1})}reverse(){let t=[];return this.stops.forEach((function(e){t.push({color:e.color,pos:1-e.pos})})),new TinyGradient(t.reverse())}loop(){let t=[],e=[];return this.stops.forEach((e=>{t.push({color:e.color,pos:e.pos/2})})),this.stops.slice(0,-1).forEach((t=>{e.push({color:t.color,pos:1-t.pos/2})})),new TinyGradient(t.concat(e.reverse()))}rgb(t){const e=computeSubsteps(this.stops,t);let o=[];this.stops.forEach(((t,e)=>{t.colorLess&&(t.color=interpolateRgb(this.stops[e-1],this.stops[e+1],2)[1])}));for(let t=0,r=this.stops.length;t<r-1;t++){const r=interpolateRgb(this.stops[t],this.stops[t+1],e[t]);o.splice(o.length,0,...r)}return o.push(this.stops[this.stops.length-1].color),o}hsv(t,e){const o=computeSubsteps(this.stops,t);let r=[];this.stops.forEach(((t,o)=>{t.colorLess&&(t.color=interpolateHsv(this.stops[o-1],this.stops[o+1],2,e)[1])}));for(let t=0,n=this.stops.length;t<n-1;t++){const n=interpolateHsv(this.stops[t],this.stops[t+1],o[t],e);r.splice(r.length,0,...n)}return r.push(this.stops[this.stops.length-1].color),r}css(t,e){let o=(t=t||"linear")+"-gradient("+(e=e||("linear"===t?"to right":"ellipse at center"));return this.stops.forEach((function(t){o+=", "+(t.colorLess?"":t.color.toRgbString()+" ")+100*t.pos+"%"})),o+=")",o}rgbAt(t){return computeAt(this.stops,t,"toRgb",n)}hsvAt(t){return computeAt(this.stops,t,"toHsv",i)}}t.exports=function(t){if(1===arguments.length){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');t=arguments[0]}else t=Array.prototype.slice.call(arguments);return new TinyGradient(t)}},45888:function(t){t.exports=function(){"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var t=/^\s+/,e=/\s+$/;function tinycolor(t,e){if(e=e||{},(t=t||"")instanceof tinycolor)return t;if(!(this instanceof tinycolor))return new tinycolor(t,e);var o=inputToRGB(t);this._originalInput=t,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||o.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function inputToRGB(t){var e={r:0,g:0,b:0},o=1,r=null,n=null,i=null,a=!1,s=!1;return"string"==typeof t&&(t=stringInputToObject(t)),"object"==_typeof(t)&&(isValidCSSUnit(t.r)&&isValidCSSUnit(t.g)&&isValidCSSUnit(t.b)?(e=rgbToRgb(t.r,t.g,t.b),a=!0,s="%"===String(t.r).substr(-1)?"prgb":"rgb"):isValidCSSUnit(t.h)&&isValidCSSUnit(t.s)&&isValidCSSUnit(t.v)?(r=convertToPercentage(t.s),n=convertToPercentage(t.v),e=hsvToRgb(t.h,r,n),a=!0,s="hsv"):isValidCSSUnit(t.h)&&isValidCSSUnit(t.s)&&isValidCSSUnit(t.l)&&(r=convertToPercentage(t.s),i=convertToPercentage(t.l),e=hslToRgb(t.h,r,i),a=!0,s="hsl"),t.hasOwnProperty("a")&&(o=t.a)),o=boundAlpha(o),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:o}}function rgbToRgb(t,e,o){return{r:255*bound01(t,255),g:255*bound01(e,255),b:255*bound01(o,255)}}function rgbToHsl(t,e,o){t=bound01(t,255),e=bound01(e,255),o=bound01(o,255);var r,n,i=Math.max(t,e,o),a=Math.min(t,e,o),s=(i+a)/2;if(i==a)r=n=0;else{var l=i-a;switch(n=s>.5?l/(2-i-a):l/(i+a),i){case t:r=(e-o)/l+(e<o?6:0);break;case e:r=(o-t)/l+2;break;case o:r=(t-e)/l+4}r/=6}return{h:r,s:n,l:s}}function hslToRgb(t,e,o){var r,n,i;function hue2rgb(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}if(t=bound01(t,360),e=bound01(e,100),o=bound01(o,100),0===e)r=n=i=o;else{var a=o<.5?o*(1+e):o+e-o*e,s=2*o-a;r=hue2rgb(s,a,t+1/3),n=hue2rgb(s,a,t),i=hue2rgb(s,a,t-1/3)}return{r:255*r,g:255*n,b:255*i}}function rgbToHsv(t,e,o){t=bound01(t,255),e=bound01(e,255),o=bound01(o,255);var r,n,i=Math.max(t,e,o),a=Math.min(t,e,o),s=i,l=i-a;if(n=0===i?0:l/i,i==a)r=0;else{switch(i){case t:r=(e-o)/l+(e<o?6:0);break;case e:r=(o-t)/l+2;break;case o:r=(t-e)/l+4}r/=6}return{h:r,s:n,v:s}}function hsvToRgb(t,e,o){t=6*bound01(t,360),e=bound01(e,100),o=bound01(o,100);var r=Math.floor(t),n=t-r,i=o*(1-e),a=o*(1-n*e),s=o*(1-(1-n)*e),l=r%6;return{r:255*[o,a,i,i,s,o][l],g:255*[s,o,o,a,i,i][l],b:255*[i,i,s,o,o,a][l]}}function rgbToHex(t,e,o,r){var n=[pad2(Math.round(t).toString(16)),pad2(Math.round(e).toString(16)),pad2(Math.round(o).toString(16))];return r&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function rgbaToHex(t,e,o,r,n){var i=[pad2(Math.round(t).toString(16)),pad2(Math.round(e).toString(16)),pad2(Math.round(o).toString(16)),pad2(convertDecimalToHex(r))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function rgbaToArgbHex(t,e,o,r){return[pad2(convertDecimalToHex(r)),pad2(Math.round(t).toString(16)),pad2(Math.round(e).toString(16)),pad2(Math.round(o).toString(16))].join("")}function _desaturate(t,e){e=0===e?0:e||10;var o=tinycolor(t).toHsl();return o.s-=e/100,o.s=clamp01(o.s),tinycolor(o)}function _saturate(t,e){e=0===e?0:e||10;var o=tinycolor(t).toHsl();return o.s+=e/100,o.s=clamp01(o.s),tinycolor(o)}function _greyscale(t){return tinycolor(t).desaturate(100)}function _lighten(t,e){e=0===e?0:e||10;var o=tinycolor(t).toHsl();return o.l+=e/100,o.l=clamp01(o.l),tinycolor(o)}function _brighten(t,e){e=0===e?0:e||10;var o=tinycolor(t).toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(-e/100*255))),o.g=Math.max(0,Math.min(255,o.g-Math.round(-e/100*255))),o.b=Math.max(0,Math.min(255,o.b-Math.round(-e/100*255))),tinycolor(o)}function _darken(t,e){e=0===e?0:e||10;var o=tinycolor(t).toHsl();return o.l-=e/100,o.l=clamp01(o.l),tinycolor(o)}function _spin(t,e){var o=tinycolor(t).toHsl(),r=(o.h+e)%360;return o.h=r<0?360+r:r,tinycolor(o)}function _complement(t){var e=tinycolor(t).toHsl();return e.h=(e.h+180)%360,tinycolor(e)}function polyad(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var o=tinycolor(t).toHsl(),r=[tinycolor(t)],n=360/e,i=1;i<e;i++)r.push(tinycolor({h:(o.h+i*n)%360,s:o.s,l:o.l}));return r}function _splitcomplement(t){var e=tinycolor(t).toHsl(),o=e.h;return[tinycolor(t),tinycolor({h:(o+72)%360,s:e.s,l:e.l}),tinycolor({h:(o+216)%360,s:e.s,l:e.l})]}function _analogous(t,e,o){e=e||6,o=o||30;var r=tinycolor(t).toHsl(),n=360/o,i=[tinycolor(t)];for(r.h=(r.h-(n*e>>1)+720)%360;--e;)r.h=(r.h+n)%360,i.push(tinycolor(r));return i}function _monochromatic(t,e){e=e||6;for(var o=tinycolor(t).toHsv(),r=o.h,n=o.s,i=o.v,a=[],s=1/e;e--;)a.push(tinycolor({h:r,s:n,v:i})),i=(i+s)%1;return a}tinycolor.prototype={isDark:function isDark(){return this.getBrightness()<128},isLight:function isLight(){return!this.isDark()},isValid:function isValid(){return this._ok},getOriginalInput:function getOriginalInput(){return this._originalInput},getFormat:function getFormat(){return this._format},getAlpha:function getAlpha(){return this._a},getBrightness:function getBrightness(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function getLuminance(){var t,e,o,r=this.toRgb();return t=r.r/255,e=r.g/255,o=r.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))},setAlpha:function setAlpha(t){return this._a=boundAlpha(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function toHsv(){var t=rgbToHsv(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function toHsvString(){var t=rgbToHsv(this._r,this._g,this._b),e=Math.round(360*t.h),o=Math.round(100*t.s),r=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+o+"%, "+r+"%)":"hsva("+e+", "+o+"%, "+r+"%, "+this._roundA+")"},toHsl:function toHsl(){var t=rgbToHsl(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function toHslString(){var t=rgbToHsl(this._r,this._g,this._b),e=Math.round(360*t.h),o=Math.round(100*t.s),r=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+o+"%, "+r+"%)":"hsla("+e+", "+o+"%, "+r+"%, "+this._roundA+")"},toHex:function toHex(t){return rgbToHex(this._r,this._g,this._b,t)},toHexString:function toHexString(t){return"#"+this.toHex(t)},toHex8:function toHex8(t){return rgbaToHex(this._r,this._g,this._b,this._a,t)},toHex8String:function toHex8String(t){return"#"+this.toHex8(t)},toRgb:function toRgb(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function toRgbString(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function toPercentageRgb(){return{r:Math.round(100*bound01(this._r,255))+"%",g:Math.round(100*bound01(this._g,255))+"%",b:Math.round(100*bound01(this._b,255))+"%",a:this._a}},toPercentageRgbString:function toPercentageRgbString(){return 1==this._a?"rgb("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%)":"rgba("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%, "+this._roundA+")"},toName:function toName(){return 0===this._a?"transparent":!(this._a<1)&&(r[rgbToHex(this._r,this._g,this._b,!0)]||!1)},toFilter:function toFilter(t){var e="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),o=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var n=tinycolor(t);o="#"+rgbaToArgbHex(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+o+")"},toString:function toString(t){var e=!!t;t=t||this._format;var o=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(o=this.toRgbString()),"prgb"===t&&(o=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(o=this.toHexString()),"hex3"===t&&(o=this.toHexString(!0)),"hex4"===t&&(o=this.toHex8String(!0)),"hex8"===t&&(o=this.toHex8String()),"name"===t&&(o=this.toName()),"hsl"===t&&(o=this.toHslString()),"hsv"===t&&(o=this.toHsvString()),o||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function clone(){return tinycolor(this.toString())},_applyModification:function _applyModification(t,e){var o=t.apply(null,[this].concat([].slice.call(e)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function lighten(){return this._applyModification(_lighten,arguments)},brighten:function brighten(){return this._applyModification(_brighten,arguments)},darken:function darken(){return this._applyModification(_darken,arguments)},desaturate:function desaturate(){return this._applyModification(_desaturate,arguments)},saturate:function saturate(){return this._applyModification(_saturate,arguments)},greyscale:function greyscale(){return this._applyModification(_greyscale,arguments)},spin:function spin(){return this._applyModification(_spin,arguments)},_applyCombination:function _applyCombination(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function analogous(){return this._applyCombination(_analogous,arguments)},complement:function complement(){return this._applyCombination(_complement,arguments)},monochromatic:function monochromatic(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function splitcomplement(){return this._applyCombination(_splitcomplement,arguments)},triad:function triad(){return this._applyCombination(polyad,[3])},tetrad:function tetrad(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(t,e){if("object"==_typeof(t)){var o={};for(var r in t)t.hasOwnProperty(r)&&(o[r]="a"===r?t[r]:convertToPercentage(t[r]));t=o}return tinycolor(t,e)},tinycolor.equals=function(t,e){return!(!t||!e)&&tinycolor(t).toRgbString()==tinycolor(e).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tinycolor.mix=function(t,e,o){o=0===o?0:o||50;var r=tinycolor(t).toRgb(),n=tinycolor(e).toRgb(),i=o/100;return tinycolor({r:(n.r-r.r)*i+r.r,g:(n.g-r.g)*i+r.g,b:(n.b-r.b)*i+r.b,a:(n.a-r.a)*i+r.a})},tinycolor.readability=function(t,e){var o=tinycolor(t),r=tinycolor(e);return(Math.max(o.getLuminance(),r.getLuminance())+.05)/(Math.min(o.getLuminance(),r.getLuminance())+.05)},tinycolor.isReadable=function(t,e,o){var r,n,i=tinycolor.readability(t,e);switch(n=!1,(r=validateWCAG2Parms(o)).level+r.size){case"AAsmall":case"AAAlarge":n=i>=4.5;break;case"AAlarge":n=i>=3;break;case"AAAsmall":n=i>=7}return n},tinycolor.mostReadable=function(t,e,o){var r,n,i,a,s=null,l=0;n=(o=o||{}).includeFallbackColors,i=o.level,a=o.size;for(var c=0;c<e.length;c++)(r=tinycolor.readability(t,e[c]))>l&&(l=r,s=tinycolor(e[c]));return tinycolor.isReadable(t,s,{level:i,size:a})||!n?s:(o.includeFallbackColors=!1,tinycolor.mostReadable(t,["#fff","#000"],o))};var o=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},r=tinycolor.hexNames=flip(o);function flip(t){var e={};for(var o in t)t.hasOwnProperty(o)&&(e[t[o]]=o);return e}function boundAlpha(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function bound01(t,e){isOnePointZero(t)&&(t="100%");var o=isPercentage(t);return t=Math.min(e,Math.max(0,parseFloat(t))),o&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function clamp01(t){return Math.min(1,Math.max(0,t))}function parseIntFromHex(t){return parseInt(t,16)}function isOnePointZero(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function isPercentage(t){return"string"==typeof t&&-1!=t.indexOf("%")}function pad2(t){return 1==t.length?"0"+t:""+t}function convertToPercentage(t){return t<=1&&(t=100*t+"%"),t}function convertDecimalToHex(t){return Math.round(255*parseFloat(t)).toString(16)}function convertHexToDecimal(t){return parseIntFromHex(t)/255}var n,i,a,s=(i="[\\s|\\(]+("+(n="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function isValidCSSUnit(t){return!!s.CSS_UNIT.exec(t)}function stringInputToObject(r){r=r.replace(t,"").replace(e,"").toLowerCase();var n,i=!1;if(o[r])r=o[r],i=!0;else if("transparent"==r)return{r:0,g:0,b:0,a:0,format:"name"};return(n=s.rgb.exec(r))?{r:n[1],g:n[2],b:n[3]}:(n=s.rgba.exec(r))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=s.hsl.exec(r))?{h:n[1],s:n[2],l:n[3]}:(n=s.hsla.exec(r))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=s.hsv.exec(r))?{h:n[1],s:n[2],v:n[3]}:(n=s.hsva.exec(r))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=s.hex8.exec(r))?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),a:convertHexToDecimal(n[4]),format:i?"name":"hex8"}:(n=s.hex6.exec(r))?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),format:i?"name":"hex"}:(n=s.hex4.exec(r))?{r:parseIntFromHex(n[1]+""+n[1]),g:parseIntFromHex(n[2]+""+n[2]),b:parseIntFromHex(n[3]+""+n[3]),a:convertHexToDecimal(n[4]+""+n[4]),format:i?"name":"hex8"}:!!(n=s.hex3.exec(r))&&{r:parseIntFromHex(n[1]+""+n[1]),g:parseIntFromHex(n[2]+""+n[2]),b:parseIntFromHex(n[3]+""+n[3]),format:i?"name":"hex"}}function validateWCAG2Parms(t){var e,o;return"AA"!==(e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==e&&(e="AA"),"small"!==(o=(t.size||"small").toLowerCase())&&"large"!==o&&(o="small"),{level:e,size:o}}return tinycolor}()}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=632,exports.ids=[632],exports.modules={11632:(e,r,t)=>{t.a(e,(async(e,c)=>{try{t.r(r),t.d(r,{McpView:()=>McpView});var l=t(14083),a=t(96540),o=t(66814),n=t(32368),s=t(82101),i=t(34209),u=t(53829),m=t(49034),d=e([l,s,u,m]);[l,s,u,m]=d.then?(await d)():d;const McpView=()=>a.createElement(MultipleServersConfirm,{servers:[{value:"echo-server4",label:"echo-server4",checked:!0},{value:"echo-server5",label:"echo-server5",checked:!1},{value:"Github-MCP-Server6",label:"Github-MCP-Server6",checked:!0}]}),MultipleServersConfirm=({servers:e})=>{const r=(0,o.i7)(u.aO,(e=>e.navigate)),[t,c]=(0,a.useState)(e),d=(0,a.useRef)(void 0),h=(0,a.useCallback)((e=>{d.current=e}),[]);(0,l.Ge)(((e,t)=>{if(m.Om.ESCAPE(t)&&r("/chat")," "===e&&d.current){const e=d.current;c((r=>r.map((r=>r.value===e.value?{...r,checked:!r.checked}:r))))}}));const v=t.length;return a.createElement(a.Fragment,null,a.createElement(l.az,{padding:1,gap:1,flexDirection:"column",borderColor:"yellowBright",borderStyle:"round"},a.createElement(l.EY,{color:"yellowBright"},v," new MCP servers found in ",n.DZ),a.createElement(l.EY,null,"Select any you wish to enable."),a.createElement(l.EY,null,"MCP servers may execute code or access system resources. All tool calls require approval. Learn more in the MCP documentation ( ",i.Je," )."),a.createElement(s.pp,{items:t,limit:5,itemComponent:ServerItemComponent,onHighlight:h})),a.createElement(l.az,{paddingX:2},a.createElement(l.EY,{color:"grey"},"Space to select · Enter to confirm · Esc to reject all")))},ServerItemComponent=({value:e,checked:r})=>a.createElement(l.EY,{color:r?"green":void 0},e," ",r?"✓":"");c()}catch(e){c(e)}}))}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=814,exports.ids=[814],exports.modules={47814:(r,s,e)=>{e.r(s),e.d(s,{DEFAULT_INHERITED_ENV_VARS:()=>a,StdioClientTransport:()=>StdioClientTransport,getDefaultEnvironment:()=>getDefaultEnvironment});var t=e(91092),i=e(1708),o=e(57075),n=e(76889);class ReadBuffer{append(r){this._buffer=this._buffer?Buffer.concat([this._buffer,r]):r}readMessage(){if(!this._buffer)return null;const r=this._buffer.indexOf("\n");if(-1===r)return null;const s=this._buffer.toString("utf8",0,r).replace(/\r$/,"");return this._buffer=this._buffer.subarray(r+1),function deserializeMessage(r){return n.JSONRPCMessageSchema.parse(JSON.parse(r))}(s)}clear(){this._buffer=void 0}}const a="win32"===i.platform?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function getDefaultEnvironment(){const r={};for(const s of a){const e=i.env[s];void 0!==e&&(e.startsWith("()")||(r[s]=e))}return r}class StdioClientTransport{constructor(r){this._abortController=new AbortController,this._readBuffer=new ReadBuffer,this._stderrStream=null,this._serverParams=r,"pipe"!==r.stderr&&"overlapped"!==r.stderr||(this._stderrStream=new o.PassThrough)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise(((r,s)=>{var e,o,n,a,l;this._process=t(this._serverParams.command,null!==(e=this._serverParams.args)&&void 0!==e?e:[],{env:{...getDefaultEnvironment(),...this._serverParams.env},stdio:["pipe","pipe",null!==(o=this._serverParams.stderr)&&void 0!==o?o:"inherit"],shell:!1,signal:this._abortController.signal,windowsHide:"win32"===i.platform&&"type"in i,cwd:this._serverParams.cwd}),this._process.on("error",(r=>{var e,t;"AbortError"!==r.name?(s(r),null===(t=this.onerror)||void 0===t||t.call(this,r)):null===(e=this.onclose)||void 0===e||e.call(this)})),this._process.on("spawn",(()=>{r()})),this._process.on("close",(r=>{var s;this._process=void 0,null===(s=this.onclose)||void 0===s||s.call(this)})),null===(n=this._process.stdin)||void 0===n||n.on("error",(r=>{var s;null===(s=this.onerror)||void 0===s||s.call(this,r)})),null===(a=this._process.stdout)||void 0===a||a.on("data",(r=>{this._readBuffer.append(r),this.processReadBuffer()})),null===(l=this._process.stdout)||void 0===l||l.on("error",(r=>{var s;null===(s=this.onerror)||void 0===s||s.call(this,r)})),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)}))}get stderr(){var r,s;return this._stderrStream?this._stderrStream:null!==(s=null===(r=this._process)||void 0===r?void 0:r.stderr)&&void 0!==s?s:null}get pid(){var r,s;return null!==(s=null===(r=this._process)||void 0===r?void 0:r.pid)&&void 0!==s?s:null}processReadBuffer(){for(var r,s;;)try{const s=this._readBuffer.readMessage();if(null===s)break;null===(r=this.onmessage)||void 0===r||r.call(this,s)}catch(r){null===(s=this.onerror)||void 0===s||s.call(this,r)}}async close(){this._abortController.abort(),this._process=void 0,this._readBuffer.clear()}send(r){return new Promise((s=>{var e;if(!(null===(e=this._process)||void 0===e?void 0:e.stdin))throw new Error("Not connected");const t=function serializeMessage(r){return JSON.stringify(r)+"\n"}(r);this._process.stdin.write(t)?s():this._process.stdin.once("drain",s)}))}}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=889,exports.ids=[889],exports.modules={76889:(e,t,o)=>{o.r(t),o.d(t,{AudioContentSchema:()=>se,BaseMetadataSchema:()=>y,BlobResourceContentsSchema:()=>A,BooleanSchemaSchema:()=>Ne,CallToolRequestSchema:()=>be,CallToolResultSchema:()=>de,CancelledNotificationSchema:()=>f,ClientCapabilitiesSchema:()=>q,ClientNotificationSchema:()=>Fe,ClientRequestSchema:()=>De,ClientResultSchema:()=>Ge,CompatibilityCallToolResultSchema:()=>Se,CompleteRequestSchema:()=>we,CompleteResultSchema:()=>Ae,ContentBlockSchema:()=>ze,CreateMessageRequestSchema:()=>Te,CreateMessageResultSchema:()=>qe,CursorSchema:()=>l,DEFAULT_NEGOTIATED_PROTOCOL_VERSION:()=>s,ElicitRequestSchema:()=>ve,ElicitResultSchema:()=>Ie,EmbeddedResourceSchema:()=>ie,EmptyResultSchema:()=>P,EnumSchemaSchema:()=>Oe,ErrorCode:()=>x,GetPromptRequestSchema:()=>oe,GetPromptResultSchema:()=>ce,ImageContentSchema:()=>ne,ImplementationSchema:()=>T,InitializeRequestSchema:()=>N,InitializeResultSchema:()=>L,InitializedNotificationSchema:()=>O,JSONRPCErrorSchema:()=>j,JSONRPCMessageSchema:()=>C,JSONRPCNotificationSchema:()=>b,JSONRPCRequestSchema:()=>S,JSONRPCResponseSchema:()=>R,JSONRPC_VERSION:()=>r,LATEST_PROTOCOL_VERSION:()=>n,ListPromptsRequestSchema:()=>ee,ListPromptsResultSchema:()=>te,ListResourceTemplatesRequestSchema:()=>D,ListResourceTemplatesResultSchema:()=>F,ListResourcesRequestSchema:()=>U,ListResourcesResultSchema:()=>B,ListRootsRequestSchema:()=>He,ListRootsResultSchema:()=>Ue,ListToolsRequestSchema:()=>ue,ListToolsResultSchema:()=>ge,LoggingLevelSchema:()=>xe,LoggingMessageNotificationSchema:()=>Ce,McpError:()=>McpError,ModelHintSchema:()=>Pe,ModelPreferencesSchema:()=>fe,NotificationSchema:()=>u,NumberSchemaSchema:()=>Le,PaginatedRequestSchema:()=>M,PaginatedResultSchema:()=>k,PingRequestSchema:()=>_,PrimitiveSchemaDefinitionSchema:()=>_e,ProgressNotificationSchema:()=>I,ProgressSchema:()=>v,ProgressTokenSchema:()=>z,PromptArgumentSchema:()=>Y,PromptListChangedNotificationSchema:()=>me,PromptMessageSchema:()=>le,PromptReferenceSchema:()=>Je,PromptSchema:()=>Z,ReadResourceRequestSchema:()=>G,ReadResourceResultSchema:()=>W,RequestIdSchema:()=>d,RequestSchema:()=>p,ResourceContentsSchema:()=>J,ResourceLinkSchema:()=>re,ResourceListChangedNotificationSchema:()=>$,ResourceReferenceSchema:()=>ke,ResourceSchema:()=>V,ResourceTemplateReferenceSchema:()=>Me,ResourceTemplateSchema:()=>H,ResourceUpdatedNotificationSchema:()=>X,ResultSchema:()=>g,RootSchema:()=>Ve,RootsListChangedNotificationSchema:()=>Be,SUPPORTED_PROTOCOL_VERSIONS:()=>i,SamplingMessageSchema:()=>ye,ServerCapabilitiesSchema:()=>E,ServerNotificationSchema:()=>$e,ServerRequestSchema:()=>We,ServerResultSchema:()=>Ke,SetLevelRequestSchema:()=>je,StringSchemaSchema:()=>Ee,SubscribeRequestSchema:()=>K,TextContentSchema:()=>ae,TextResourceContentsSchema:()=>w,ToolAnnotationsSchema:()=>pe,ToolListChangedNotificationSchema:()=>Re,ToolSchema:()=>he,UnsubscribeRequestSchema:()=>Q,isInitializeRequest:()=>isInitializeRequest,isInitializedNotification:()=>isInitializedNotification,isJSONRPCError:()=>isJSONRPCError,isJSONRPCNotification:()=>isJSONRPCNotification,isJSONRPCRequest:()=>isJSONRPCRequest,isJSONRPCResponse:()=>isJSONRPCResponse});var a=o(7578);const n="2025-06-18",s="2025-03-26",i=[n,"2025-03-26","2024-11-05","2024-10-07"],r="2.0",z=a.z.union([a.z.string(),a.z.number().int()]),l=a.z.string(),c=a.z.object({progressToken:a.z.optional(z)}).passthrough(),m=a.z.object({_meta:a.z.optional(c)}).passthrough(),p=a.z.object({method:a.z.string(),params:a.z.optional(m)}),h=a.z.object({_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),u=a.z.object({method:a.z.string(),params:a.z.optional(h)}),g=a.z.object({_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),d=a.z.union([a.z.string(),a.z.number().int()]),S=a.z.object({jsonrpc:a.z.literal(r),id:d}).merge(p).strict(),isJSONRPCRequest=e=>S.safeParse(e).success,b=a.z.object({jsonrpc:a.z.literal(r)}).merge(u).strict(),isJSONRPCNotification=e=>b.safeParse(e).success,R=a.z.object({jsonrpc:a.z.literal(r),id:d,result:g}).strict(),isJSONRPCResponse=e=>R.safeParse(e).success;var x;!function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"}(x||(x={}));const j=a.z.object({jsonrpc:a.z.literal(r),id:d,error:a.z.object({code:a.z.number().int(),message:a.z.string(),data:a.z.optional(a.z.unknown())})}).strict(),isJSONRPCError=e=>j.safeParse(e).success,C=a.z.union([S,b,R,j]),P=g.strict(),f=u.extend({method:a.z.literal("notifications/cancelled"),params:h.extend({requestId:d,reason:a.z.string().optional()})}),y=a.z.object({name:a.z.string(),title:a.z.optional(a.z.string())}).passthrough(),T=y.extend({version:a.z.string()}),q=a.z.object({experimental:a.z.optional(a.z.object({}).passthrough()),sampling:a.z.optional(a.z.object({}).passthrough()),elicitation:a.z.optional(a.z.object({}).passthrough()),roots:a.z.optional(a.z.object({listChanged:a.z.optional(a.z.boolean())}).passthrough())}).passthrough(),N=p.extend({method:a.z.literal("initialize"),params:m.extend({protocolVersion:a.z.string(),capabilities:q,clientInfo:T})}),isInitializeRequest=e=>N.safeParse(e).success,E=a.z.object({experimental:a.z.optional(a.z.object({}).passthrough()),logging:a.z.optional(a.z.object({}).passthrough()),completions:a.z.optional(a.z.object({}).passthrough()),prompts:a.z.optional(a.z.object({listChanged:a.z.optional(a.z.boolean())}).passthrough()),resources:a.z.optional(a.z.object({subscribe:a.z.optional(a.z.boolean()),listChanged:a.z.optional(a.z.boolean())}).passthrough()),tools:a.z.optional(a.z.object({listChanged:a.z.optional(a.z.boolean())}).passthrough())}).passthrough(),L=g.extend({protocolVersion:a.z.string(),capabilities:E,serverInfo:T,instructions:a.z.optional(a.z.string())}),O=u.extend({method:a.z.literal("notifications/initialized")}),isInitializedNotification=e=>O.safeParse(e).success,_=p.extend({method:a.z.literal("ping")}),v=a.z.object({progress:a.z.number(),total:a.z.optional(a.z.number()),message:a.z.optional(a.z.string())}).passthrough(),I=u.extend({method:a.z.literal("notifications/progress"),params:h.merge(v).extend({progressToken:z})}),M=p.extend({params:m.extend({cursor:a.z.optional(l)}).optional()}),k=g.extend({nextCursor:a.z.optional(l)}),J=a.z.object({uri:a.z.string(),mimeType:a.z.optional(a.z.string()),_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),w=J.extend({text:a.z.string()}),A=J.extend({blob:a.z.string().base64()}),V=y.extend({uri:a.z.string(),description:a.z.optional(a.z.string()),mimeType:a.z.optional(a.z.string()),_meta:a.z.optional(a.z.object({}).passthrough())}),H=y.extend({uriTemplate:a.z.string(),description:a.z.optional(a.z.string()),mimeType:a.z.optional(a.z.string()),_meta:a.z.optional(a.z.object({}).passthrough())}),U=M.extend({method:a.z.literal("resources/list")}),B=k.extend({resources:a.z.array(V)}),D=M.extend({method:a.z.literal("resources/templates/list")}),F=k.extend({resourceTemplates:a.z.array(H)}),G=p.extend({method:a.z.literal("resources/read"),params:m.extend({uri:a.z.string()})}),W=g.extend({contents:a.z.array(a.z.union([w,A]))}),$=u.extend({method:a.z.literal("notifications/resources/list_changed")}),K=p.extend({method:a.z.literal("resources/subscribe"),params:m.extend({uri:a.z.string()})}),Q=p.extend({method:a.z.literal("resources/unsubscribe"),params:m.extend({uri:a.z.string()})}),X=u.extend({method:a.z.literal("notifications/resources/updated"),params:h.extend({uri:a.z.string()})}),Y=a.z.object({name:a.z.string(),description:a.z.optional(a.z.string()),required:a.z.optional(a.z.boolean())}).passthrough(),Z=y.extend({description:a.z.optional(a.z.string()),arguments:a.z.optional(a.z.array(Y)),_meta:a.z.optional(a.z.object({}).passthrough())}),ee=M.extend({method:a.z.literal("prompts/list")}),te=k.extend({prompts:a.z.array(Z)}),oe=p.extend({method:a.z.literal("prompts/get"),params:m.extend({name:a.z.string(),arguments:a.z.optional(a.z.record(a.z.string()))})}),ae=a.z.object({type:a.z.literal("text"),text:a.z.string(),_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),ne=a.z.object({type:a.z.literal("image"),data:a.z.string().base64(),mimeType:a.z.string(),_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),se=a.z.object({type:a.z.literal("audio"),data:a.z.string().base64(),mimeType:a.z.string(),_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),ie=a.z.object({type:a.z.literal("resource"),resource:a.z.union([w,A]),_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),re=V.extend({type:a.z.literal("resource_link")}),ze=a.z.union([ae,ne,se,re,ie]),le=a.z.object({role:a.z.enum(["user","assistant"]),content:ze}).passthrough(),ce=g.extend({description:a.z.optional(a.z.string()),messages:a.z.array(le)}),me=u.extend({method:a.z.literal("notifications/prompts/list_changed")}),pe=a.z.object({title:a.z.optional(a.z.string()),readOnlyHint:a.z.optional(a.z.boolean()),destructiveHint:a.z.optional(a.z.boolean()),idempotentHint:a.z.optional(a.z.boolean()),openWorldHint:a.z.optional(a.z.boolean())}).passthrough(),he=y.extend({description:a.z.optional(a.z.string()),inputSchema:a.z.object({type:a.z.literal("object"),properties:a.z.optional(a.z.object({}).passthrough()),required:a.z.optional(a.z.array(a.z.string()))}).passthrough(),outputSchema:a.z.optional(a.z.object({type:a.z.literal("object"),properties:a.z.optional(a.z.object({}).passthrough()),required:a.z.optional(a.z.array(a.z.string()))}).passthrough()),annotations:a.z.optional(pe),_meta:a.z.optional(a.z.object({}).passthrough())}),ue=M.extend({method:a.z.literal("tools/list")}),ge=k.extend({tools:a.z.array(he)}),de=g.extend({content:a.z.array(ze).default([]),structuredContent:a.z.object({}).passthrough().optional(),isError:a.z.optional(a.z.boolean())}),Se=de.or(g.extend({toolResult:a.z.unknown()})),be=p.extend({method:a.z.literal("tools/call"),params:m.extend({name:a.z.string(),arguments:a.z.optional(a.z.record(a.z.unknown()))})}),Re=u.extend({method:a.z.literal("notifications/tools/list_changed")}),xe=a.z.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),je=p.extend({method:a.z.literal("logging/setLevel"),params:m.extend({level:xe})}),Ce=u.extend({method:a.z.literal("notifications/message"),params:h.extend({level:xe,logger:a.z.optional(a.z.string()),data:a.z.unknown()})}),Pe=a.z.object({name:a.z.string().optional()}).passthrough(),fe=a.z.object({hints:a.z.optional(a.z.array(Pe)),costPriority:a.z.optional(a.z.number().min(0).max(1)),speedPriority:a.z.optional(a.z.number().min(0).max(1)),intelligencePriority:a.z.optional(a.z.number().min(0).max(1))}).passthrough(),ye=a.z.object({role:a.z.enum(["user","assistant"]),content:a.z.union([ae,ne,se])}).passthrough(),Te=p.extend({method:a.z.literal("sampling/createMessage"),params:m.extend({messages:a.z.array(ye),systemPrompt:a.z.optional(a.z.string()),includeContext:a.z.optional(a.z.enum(["none","thisServer","allServers"])),temperature:a.z.optional(a.z.number()),maxTokens:a.z.number().int(),stopSequences:a.z.optional(a.z.array(a.z.string())),metadata:a.z.optional(a.z.object({}).passthrough()),modelPreferences:a.z.optional(fe)})}),qe=g.extend({model:a.z.string(),stopReason:a.z.optional(a.z.enum(["endTurn","stopSequence","maxTokens"]).or(a.z.string())),role:a.z.enum(["user","assistant"]),content:a.z.discriminatedUnion("type",[ae,ne,se])}),Ne=a.z.object({type:a.z.literal("boolean"),title:a.z.optional(a.z.string()),description:a.z.optional(a.z.string()),default:a.z.optional(a.z.boolean())}).passthrough(),Ee=a.z.object({type:a.z.literal("string"),title:a.z.optional(a.z.string()),description:a.z.optional(a.z.string()),minLength:a.z.optional(a.z.number()),maxLength:a.z.optional(a.z.number()),format:a.z.optional(a.z.enum(["email","uri","date","date-time"]))}).passthrough(),Le=a.z.object({type:a.z.enum(["number","integer"]),title:a.z.optional(a.z.string()),description:a.z.optional(a.z.string()),minimum:a.z.optional(a.z.number()),maximum:a.z.optional(a.z.number())}).passthrough(),Oe=a.z.object({type:a.z.literal("string"),title:a.z.optional(a.z.string()),description:a.z.optional(a.z.string()),enum:a.z.array(a.z.string()),enumNames:a.z.optional(a.z.array(a.z.string()))}).passthrough(),_e=a.z.union([Ne,Ee,Le,Oe]),ve=p.extend({method:a.z.literal("elicitation/create"),params:m.extend({message:a.z.string(),requestedSchema:a.z.object({type:a.z.literal("object"),properties:a.z.record(a.z.string(),_e),required:a.z.optional(a.z.array(a.z.string()))}).passthrough()})}),Ie=g.extend({action:a.z.enum(["accept","decline","cancel"]),content:a.z.optional(a.z.record(a.z.string(),a.z.unknown()))}),Me=a.z.object({type:a.z.literal("ref/resource"),uri:a.z.string()}).passthrough(),ke=Me,Je=a.z.object({type:a.z.literal("ref/prompt"),name:a.z.string()}).passthrough(),we=p.extend({method:a.z.literal("completion/complete"),params:m.extend({ref:a.z.union([Je,Me]),argument:a.z.object({name:a.z.string(),value:a.z.string()}).passthrough(),context:a.z.optional(a.z.object({arguments:a.z.optional(a.z.record(a.z.string(),a.z.string()))}))})}),Ae=g.extend({completion:a.z.object({values:a.z.array(a.z.string()).max(100),total:a.z.optional(a.z.number().int()),hasMore:a.z.optional(a.z.boolean())}).passthrough()}),Ve=a.z.object({uri:a.z.string().startsWith("file://"),name:a.z.optional(a.z.string()),_meta:a.z.optional(a.z.object({}).passthrough())}).passthrough(),He=p.extend({method:a.z.literal("roots/list")}),Ue=g.extend({roots:a.z.array(Ve)}),Be=u.extend({method:a.z.literal("notifications/roots/list_changed")}),De=a.z.union([_,N,we,je,oe,ee,U,D,G,K,Q,be,ue]),Fe=a.z.union([f,I,O,Be]),Ge=a.z.union([P,qe,Ie,Ue]),We=a.z.union([_,Te,ve,He]),$e=a.z.union([f,I,Ce,X,$,Re,me]),Ke=a.z.union([P,L,Ae,ce,te,B,F,W,de,ge]);class McpError extends Error{constructor(e,t,o){super(`MCP error ${e}: ${t}`),this.code=e,this.data=o,this.name="McpError"}}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=952,exports.ids=[952],exports.modules={26952:(e,t,n)=>{n.d(t,{toFormData:()=>toFormData});var a=n(48695),r=n(79814);let i=0;const o={START_BOUNDARY:i++,HEADER_FIELD_START:i++,HEADER_FIELD:i++,HEADER_VALUE_START:i++,HEADER_VALUE:i++,HEADER_VALUE_ALMOST_DONE:i++,HEADERS_ALMOST_DONE:i++,PART_DATA_START:i++,PART_DATA:i++,END:i++};let s=1;const d=s,E=s*=2,lower=e=>32|e,noop=()=>{};class MultipartParser{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=noop,this.onHeaderField=noop,this.onHeadersEnd=noop,this.onHeaderValue=noop,this.onPartBegin=noop,this.onPartData=noop,this.onPartEnd=noop,this.boundaryChars={},e="\r\n--"+e;const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n),this.boundaryChars[t[n]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=o.START_BOUNDARY}write(e){let t=0;const n=e.length;let a=this.index,{lookbehind:r,boundary:i,boundaryChars:s,index:A,state:h,flags:l}=this;const D=this.boundary.length,c=D-1,f=e.length;let T,_;const mark=e=>{this[e+"Mark"]=t},clear=e=>{delete this[e+"Mark"]},callback=(e,t,n,a)=>{void 0!==t&&t===n||this[e](a&&a.subarray(t,n))},dataCallback=(n,a)=>{const r=n+"Mark";r in this&&(a?(callback(n,this[r],t,e),delete this[r]):(callback(n,this[r],e.length,e),this[r]=0))};for(t=0;t<n;t++)switch(T=e[t],h){case o.START_BOUNDARY:if(A===i.length-2){if(45===T)l|=E;else if(13!==T)return;A++;break}if(A-1==i.length-2){if(l&E&&45===T)h=o.END,l=0;else{if(l&E||10!==T)return;A=0,callback("onPartBegin"),h=o.HEADER_FIELD_START}break}T!==i[A+2]&&(A=-2),T===i[A+2]&&A++;break;case o.HEADER_FIELD_START:h=o.HEADER_FIELD,mark("onHeaderField"),A=0;case o.HEADER_FIELD:if(13===T){clear("onHeaderField"),h=o.HEADERS_ALMOST_DONE;break}if(A++,45===T)break;if(58===T){if(1===A)return;dataCallback("onHeaderField",!0),h=o.HEADER_VALUE_START;break}if(_=lower(T),_<97||_>122)return;break;case o.HEADER_VALUE_START:if(32===T)break;mark("onHeaderValue"),h=o.HEADER_VALUE;case o.HEADER_VALUE:13===T&&(dataCallback("onHeaderValue",!0),callback("onHeaderEnd"),h=o.HEADER_VALUE_ALMOST_DONE);break;case o.HEADER_VALUE_ALMOST_DONE:if(10!==T)return;h=o.HEADER_FIELD_START;break;case o.HEADERS_ALMOST_DONE:if(10!==T)return;callback("onHeadersEnd"),h=o.PART_DATA_START;break;case o.PART_DATA_START:h=o.PART_DATA,mark("onPartData");case o.PART_DATA:if(a=A,0===A){for(t+=c;t<f&&!(e[t]in s);)t+=D;t-=c,T=e[t]}if(A<i.length)i[A]===T?(0===A&&dataCallback("onPartData",!0),A++):A=0;else if(A===i.length)A++,13===T?l|=d:45===T?l|=E:A=0;else if(A-1===i.length)if(l&d){if(A=0,10===T){l&=~d,callback("onPartEnd"),callback("onPartBegin"),h=o.HEADER_FIELD_START;break}}else l&E&&45===T?(callback("onPartEnd"),h=o.END,l=0):A=0;if(A>0)r[A-1]=T;else if(a>0){const e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);callback("onPartData",0,a,e),a=0,mark("onPartData"),t--}break;case o.END:break;default:throw new Error(`Unexpected state entered: ${h}`)}dataCallback("onHeaderField"),dataCallback("onHeaderValue"),dataCallback("onPartData"),this.index=A,this.state=h,this.flags=l}end(){if(this.state===o.HEADER_FIELD_START&&0===this.index||this.state===o.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==o.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}async function toFormData(e,t){if(!/multipart/i.test(t))throw new TypeError("Failed to fetch");const n=t.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");const i=new MultipartParser(n[1]||n[2]);let o,s,d,E,A,h;const l=[],D=new r.fS,onPartData=e=>{d+=c.decode(e,{stream:!0})},appendToFile=e=>{l.push(e)},appendFileToFormData=()=>{const e=new a.ZH(l,h,{type:A});D.append(E,e)},appendEntryToFormData=()=>{D.append(E,d)},c=new TextDecoder("utf-8");c.decode(),i.onPartBegin=function(){i.onPartData=onPartData,i.onPartEnd=appendEntryToFormData,o="",s="",d="",E="",A="",h=null,l.length=0},i.onHeaderField=function(e){o+=c.decode(e,{stream:!0})},i.onHeaderValue=function(e){s+=c.decode(e,{stream:!0})},i.onHeaderEnd=function(){if(s+=c.decode(),o=o.toLowerCase(),"content-disposition"===o){const e=s.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(E=e[2]||e[3]||""),h=function _fileName(e){const t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;const n=t[2]||t[3]||"";let a=n.slice(n.lastIndexOf("\\")+1);return a=a.replace(/%22/g,'"'),a=a.replace(/&#(\d{4});/g,((e,t)=>String.fromCharCode(t))),a}(s),h&&(i.onPartData=appendToFile,i.onPartEnd=appendFileToFormData)}else"content-type"===o&&(A=s);s="",o=""};for await(const t of e)i.write(t);return i.end(),D}}};