dirac-cli 0.3.22 → 0.3.23

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.
package/dist/cli.mjs CHANGED
@@ -28,7 +28,7 @@ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
28
28
  `),this.outputHelp({error:!0}));let i=r||{},a=i.exitCode||1,o=i.code||"commander.error";this._exit(a,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in F0.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,F0.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new iiu(this.options),r=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&r(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(a=>!r(a)).forEach(a=>{this.setOptionValueWithSource(a,i.implied[a],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let i=n=>{let s=n.attributeName(),u=this.getOptionValue(s),f=this.options.find(h=>h.negate&&s===h.attributeName()),d=this.options.find(h=>!h.negate&&s===h.attributeName());return f&&(f.presetArg===void 0&&u===!1||f.presetArg!==void 0&&u===f.presetArg)?f:d||n},a=n=>{let s=i(n),u=s.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},o=`error: ${a(e)} cannot be used with ${a(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let a=[],o=this;do{let n=o.createHelp().visibleOptions(o).filter(s=>s.long).map(s=>s.long);a=a.concat(n),o=o.parent}while(o&&!o._enablePositionalOptions);r=HNn(e,a)}let i=`error: unknown option '${e}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,i=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${i} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let a=[];this.createHelp().visibleCommands(this).forEach(o=>{a.push(o.name()),o.alias()&&a.push(o.alias())}),r=HNn(e,a)}let i=`error: unknown command '${e}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(e,r,i){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",i=i||"output the version number";let a=this.createOption(r,i);return this._versionOptionName=a.attributeName(),this._registerOption(a),this.on("option:"+a.name(),()=>{this._outputConfiguration.writeOut(`${e}
29
29
  `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let a=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${a}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>riu(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=o7.basename(e,o7.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},i;return r.error?i=a=>this._outputConfiguration.writeErr(a):i=a=>this._outputConfiguration.writeOut(a),r.write=e.write||i,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let a=this.helpInformation(i);if(r&&(a=r(a),typeof a!="string"&&!Buffer.isBuffer(a)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(a),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let r=F0.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
30
30
  Expecting one of '${i.join("', '")}'`);let a=`${e}Help`;return this.on(a,o=>{let n;typeof r=="function"?n=r({error:o.error,command:o.command}):n=r,n&&o.write(`${n}
31
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(a=>r.is(a))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function VNn(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,i="127.0.0.1",a="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?a=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],a=o[4]),r&&a!=="0"?`${r}=${i}:${parseInt(a)+1}`:e})}WNn.Command=Ltr});var jNn=re(u3=>{"use strict";var{Argument:zNn}=ket(),{Command:Qtr}=KNn(),{CommanderError:aiu,InvalidArgumentError:YNn}=e4e(),{Help:oiu}=Rtr(),{Option:JNn}=Ptr();u3.program=new Qtr;u3.createCommand=t=>new Qtr(t);u3.createOption=(t,e)=>new JNn(t,e);u3.createArgument=(t,e)=>new zNn(t,e);u3.Command=Qtr;u3.Option=JNn;u3.Argument=zNn;u3.Help=oiu;u3.CommanderError=aiu;u3.InvalidArgumentError=YNn;u3.InvalidOptionArgumentError=YNn});var c3,t4e=$(()=>{c3="0.3.22"});var Gtr={};Gn(Gtr,{originalConsoleDebug:()=>t7n,originalConsoleError:()=>Met,originalConsoleInfo:()=>e7n,originalConsoleLog:()=>s7,originalConsoleWarn:()=>ZNn,restoreConsole:()=>uiu,suppressConsoleUnlessVerbose:()=>Utr});function Utr(t=process.argv){t.includes("-v")||t.includes("--verbose")||(console.log=()=>{},console.warn=()=>{},console.error=()=>{},console.debug=()=>{},console.info=()=>{})}function uiu(){console.log=s7,console.error=Met,console.warn=ZNn,console.info=e7n,console.debug=t7n}var s7,Met,ZNn,e7n,t7n,xhe=$(()=>{"use strict";s7=console.log.bind(console),Met=console.error.bind(console),ZNn=console.warn.bind(console),e7n=console.info.bind(console),t7n=console.debug.bind(console)});var sS={};Gn(sS,{Spinner:()=>Htr,centerText:()=>fee,clearLine:()=>Aiu,colorize:()=>zC,cursorUp:()=>giu,formatMessage:()=>n7n,formatState:()=>piu,formatTimestamp:()=>r7n,print:()=>Ihe,printError:()=>r4e,printInfo:()=>al,printSuccess:()=>miu,printWarning:()=>oS,promptConfirmation:()=>Eiu,promptUser:()=>a7n,separator:()=>qtr,setTerminalTitle:()=>Pet,style:()=>Us,taskHeader:()=>i7n});function fee(t,e){let r=e||process.stdout.columns||80,i=Math.max(0,Math.floor((r-t.length)/2));return" ".repeat(i)+t}function zC(t,...e){return e.join("")+t+Fg.reset}function r7n(t){return new Date(t).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function ciu(t){if(t.type==="ask")switch(t.ask){case"followup":return"\u2753";case"command":return"\u2699\uFE0F ";case"tool":case"plan_mode_respond":case"act_mode_respond":case"use_subagents":return"\u{1F527}";case"completion_result":return"\u2705";case"api_req_failed":return"\u274C";case"resume_task":case"resume_completed_task":return"\u25B6\uFE0F ";case"browser_action_launch":return"\u{1F310}";default:return"\u2754"}switch(t.say){case"task":return"\u{1F4CB}";case"error":return"\u274C";case"text":return"\u{1F4AC}";case"reasoning":return"\u{1F9E0}";case"completion_result":return"\u2705";case"user_feedback":case"user_feedback_diff":return"\u{1F464}";case"command":case"command_output":return"\u2699\uFE0F ";case"tool":return"\u{1F527}";case"browser_action":case"browser_action_launch":case"browser_action_result":return"\u{1F310}";case"api_req_started":case"api_req_finished":case"api_req_retried":return"\u{1F504}";case"checkpoint_created":return"\u{1F4BE}";case"info":return"\u2139\uFE0F ";default:return" "}}function n7n(t,e=!1){let r=r7n(t.ts),i=[];t.reasoning&&t.say!=="reasoning"&&i.push(`${Us.dim(r)} \u{1F9E0} ${Us.dim("Thinking:")} ${Us.italic(t.reasoning)}`);let a=ciu(t),o=`${Us.dim(r)} ${a}`,n=fiu(t);if(n){let s="Tool Call";t.type==="ask"&&(s="Use tool?"),i.push(`${o} ${Us.tool(s)} ${Us.bold(n)}: ${t.text||""}`)}else if(t.type==="ask"){let s=liu(t,o,e);s&&i.push(s)}else{let s=diu(t,o,e);s&&i.push(s)}return i.filter(Boolean).join(`
31
+ `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(a=>r.is(a))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function VNn(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,i="127.0.0.1",a="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?a=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],a=o[4]),r&&a!=="0"?`${r}=${i}:${parseInt(a)+1}`:e})}WNn.Command=Ltr});var jNn=re(u3=>{"use strict";var{Argument:zNn}=ket(),{Command:Qtr}=KNn(),{CommanderError:aiu,InvalidArgumentError:YNn}=e4e(),{Help:oiu}=Rtr(),{Option:JNn}=Ptr();u3.program=new Qtr;u3.createCommand=t=>new Qtr(t);u3.createOption=(t,e)=>new JNn(t,e);u3.createArgument=(t,e)=>new zNn(t,e);u3.Command=Qtr;u3.Option=JNn;u3.Argument=zNn;u3.Help=oiu;u3.CommanderError=aiu;u3.InvalidArgumentError=YNn;u3.InvalidOptionArgumentError=YNn});var c3,t4e=$(()=>{c3="0.3.23"});var Gtr={};Gn(Gtr,{originalConsoleDebug:()=>t7n,originalConsoleError:()=>Met,originalConsoleInfo:()=>e7n,originalConsoleLog:()=>s7,originalConsoleWarn:()=>ZNn,restoreConsole:()=>uiu,suppressConsoleUnlessVerbose:()=>Utr});function Utr(t=process.argv){t.includes("-v")||t.includes("--verbose")||(console.log=()=>{},console.warn=()=>{},console.error=()=>{},console.debug=()=>{},console.info=()=>{})}function uiu(){console.log=s7,console.error=Met,console.warn=ZNn,console.info=e7n,console.debug=t7n}var s7,Met,ZNn,e7n,t7n,xhe=$(()=>{"use strict";s7=console.log.bind(console),Met=console.error.bind(console),ZNn=console.warn.bind(console),e7n=console.info.bind(console),t7n=console.debug.bind(console)});var sS={};Gn(sS,{Spinner:()=>Htr,centerText:()=>fee,clearLine:()=>Aiu,colorize:()=>zC,cursorUp:()=>giu,formatMessage:()=>n7n,formatState:()=>piu,formatTimestamp:()=>r7n,print:()=>Ihe,printError:()=>r4e,printInfo:()=>al,printSuccess:()=>miu,printWarning:()=>oS,promptConfirmation:()=>Eiu,promptUser:()=>a7n,separator:()=>qtr,setTerminalTitle:()=>Pet,style:()=>Us,taskHeader:()=>i7n});function fee(t,e){let r=e||process.stdout.columns||80,i=Math.max(0,Math.floor((r-t.length)/2));return" ".repeat(i)+t}function zC(t,...e){return e.join("")+t+Fg.reset}function r7n(t){return new Date(t).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function ciu(t){if(t.type==="ask")switch(t.ask){case"followup":return"\u2753";case"command":return"\u2699\uFE0F ";case"tool":case"plan_mode_respond":case"act_mode_respond":case"use_subagents":return"\u{1F527}";case"completion_result":return"\u2705";case"api_req_failed":return"\u274C";case"resume_task":case"resume_completed_task":return"\u25B6\uFE0F ";case"browser_action_launch":return"\u{1F310}";default:return"\u2754"}switch(t.say){case"task":return"\u{1F4CB}";case"error":return"\u274C";case"text":return"\u{1F4AC}";case"reasoning":return"\u{1F9E0}";case"completion_result":return"\u2705";case"user_feedback":case"user_feedback_diff":return"\u{1F464}";case"command":case"command_output":return"\u2699\uFE0F ";case"tool":return"\u{1F527}";case"browser_action":case"browser_action_launch":case"browser_action_result":return"\u{1F310}";case"api_req_started":case"api_req_finished":case"api_req_retried":return"\u{1F504}";case"checkpoint_created":return"\u{1F4BE}";case"info":return"\u2139\uFE0F ";default:return" "}}function n7n(t,e=!1){let r=r7n(t.ts),i=[];t.reasoning&&t.say!=="reasoning"&&i.push(`${Us.dim(r)} \u{1F9E0} ${Us.dim("Thinking:")} ${Us.italic(t.reasoning)}`);let a=ciu(t),o=`${Us.dim(r)} ${a}`,n=fiu(t);if(n){let s="Tool Call";t.type==="ask"&&(s="Use tool?"),i.push(`${o} ${Us.tool(s)} ${Us.bold(n)}: ${t.text||""}`)}else if(t.type==="ask"){let s=liu(t,o,e);s&&i.push(s)}else{let s=diu(t,o,e);s&&i.push(s)}return i.filter(Boolean).join(`
32
32
  `)}function liu(t,e,r){let i=t.ask;switch(i){case"followup":{let a=t.text||"";try{a=JSON.parse(t.text||"{}").question||a}catch{}return`${e} ${Us.info("Question:")} ${a}`}case"completion_result":return`${e} ${Us.success("Task completed")} ${t.text?`- ${t.text}`:""}`;case"api_req_failed":return`${e} ${Us.error("API request failed")} ${t.text||""}`;case"resume_task":case"resume_completed_task":return`${e} ${Us.info("Resume task?")} ${t.text||""}`;default:return r?`${e} [ASK:${i}] ${t.text||""}`:""}}function diu(t,e,r){let i=t.say;switch(i){case"task":return`${e} ${Us.task("Task:")} ${t.text||""}`;case"text":return`${e} ${Us.assistant(t.text||"")}`;case"reasoning":return`${e} ${Us.dim("Thinking:")} ${Us.italic(t.text||"")}`;case"error":return`${e} ${Us.error("Error:")} ${t.text||""}`;case"completion_result":return`${e} ${Us.success("\u2713 Completed:")} ${t.text||""}`;case"user_feedback":case"user_feedback_diff":return`${e} ${Us.user("User:")} ${t.text||""}`;case"command":return`${e} ${Us.command("Command:")} ${Us.code(t.text||"")}`;case"command_output":{let a=t.text||"",o=a.length>500?a.substring(0,500)+"...":a;return`${e} ${Us.dim("Output:")} ${o}`}case"browser_action_result":return`${e} ${Us.dim("Browser result")} ${t.text?`- ${t.text.substring(0,100)}...`:""}`;case"api_req_started":case"api_req_finished":return hiu(t,e,r);case"checkpoint_created":return`${e} ${Us.success("Checkpoint created")} ${t.text||""}`;case"info":return`${e} ${Us.info(t.text||"")}`;case"hook_status":return`${e} ${Us.dim("Hook:")} ${t.text||""}`;default:return r?`${e} [SAY:${i}] ${t.text||""}`:""}}function fiu(t){if(t.type==="say"&&t.say==="tool")return"tool";if(t.type==="ask"){let e=["tool","command","browser_action_launch","plan_mode_respond","act_mode_respond","use_subagents"];if(t.ask&&e.includes(t.ask))return t.ask}return null}function hiu(t,e,r){if(t.say==="api_req_started")return r?`${e} ${Us.api("API request started")}`:"";try{let i=JSON.parse(t.text||"{}");if(i.cost!==void 0||i.tokensIn!==void 0){let a=i.cost!==void 0?`Cost: $${i.cost.toFixed(4)}`:"",o=i.tokensIn!==void 0?`Tokens: ${i.tokensIn.toLocaleString()} in, ${i.tokensOut.toLocaleString()} out${i.reasoningTokens?` (+${i.reasoningTokens.toLocaleString()} thinking)`:""}`:"",n=i.cacheReads!==void 0||i.cacheWrites!==void 0?` (Cache: ${(i.cacheReads||0).toLocaleString()} read, ${(i.cacheWrites||0).toLocaleString()} write)`:"",s=i.contextWindow!==void 0?` | Context: ${i.contextUsagePercentage}% of ${(i.contextWindow/1e3).toFixed(0)}K`:"";return`${e} ${Us.api("API request finished")} ${Us.dim(`[${o}${n}${s} | ${a}]`)}`}}catch{}return r?`${e} ${Us.api("API request finished")}`:""}function qtr(t="\u2500",e=60){return Us.dim(t.repeat(e))}function i7n(t,e){return[qtr("\u2550"),Us.bold(` Task: ${t}`),e?` ${Us.dim(e.substring(0,80))}${e.length>80?"...":""}`:"",qtr("\u2550")].filter(Boolean).join(`
33
33
  `)}function piu(t,e=!1){let r=[];if(t.currentTaskItem&&r.push(i7n(t.currentTaskItem.id,t.currentTaskItem.task)),t.diracMessages&&t.diracMessages.length>0){let i=e?t.diracMessages:t.diracMessages.filter(a=>!0);for(let a of i){let o=n7n(a,e);o&&r.push(o)}}return r.join(`
34
34
  `)}function Aiu(){process.stdout.write("\r\x1B[K")}function giu(t=1){process.stdout.write(`\x1B[${t}A`)}function Ihe(t){s7(t)}function r4e(t){Met(Us.error(t))}function miu(t){s7(Us.success(t))}function al(t){s7(Us.info(t))}function oS(t){s7(Us.warning(t))}async function a7n(t){let r=(await import("readline")).createInterface({input:process.stdin,output:process.stdout});return new Promise(i=>{r.question(Us.info(t)+" ",a=>{r.close(),i(a.trim())})})}async function Eiu(t){let e=await a7n(`${t} ${Us.dim("(y/n)")}`);return e.toLowerCase()==="y"||e.toLowerCase()==="yes"}function Pet(t){if(process.stdout.isTTY){let r=t.length>80?t.slice(0,80)+"...":t;process.stdout.write(`\x1B]0;${r}\x07`)}}var Fg,Us,Htr,DA=$(()=>{"use strict";xhe();Fg={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",brightBlack:"\x1B[90m",brightRed:"\x1B[91m",brightGreen:"\x1B[92m",brightYellow:"\x1B[93m",brightBlue:"\x1B[94m",brightMagenta:"\x1B[95m",brightCyan:"\x1B[96m",brightWhite:"\x1B[97m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m"};Us={bold:t=>zC(t,Fg.bold),dim:t=>zC(t,Fg.dim),italic:t=>zC(t,Fg.italic),error:t=>zC(t,Fg.red,Fg.bold),warning:t=>zC(t,Fg.yellow),success:t=>zC(t,Fg.green),info:t=>zC(t,Fg.cyan),task:t=>zC(t,Fg.brightWhite,Fg.bold),tool:t=>zC(t,Fg.blue),command:t=>zC(t,Fg.magenta),api:t=>zC(t,Fg.brightBlack),user:t=>zC(t,Fg.green),assistant:t=>zC(t,Fg.cyan),path:t=>zC(t,Fg.underline,Fg.blue),code:t=>zC(t,Fg.bgBlack,Fg.brightWhite)};Htr=class{frames=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];frameIndex=0;interval=null;message="";start(e){this.message=e,this.interval=setInterval(()=>{let r=this.frames[this.frameIndex];process.stdout.write(`\r${Us.info(r)} ${this.message}`),this.frameIndex=(this.frameIndex+1)%this.frames.length},80)}update(e){this.message=e}stop(e){this.interval&&(clearInterval(this.interval),this.interval=null),e?process.stdout.write(`\r${Us.success("\u2713")} ${e}
@@ -39,7 +39,7 @@ ${s.stack}`:""}`;try{return typeof s=="object"?JSON.stringify(s):String(s)}catch
39
39
  ${i.stack}`:""}`:"";t.output(`${e} ${o}${n}`.trimEnd())}catch{}}}});import{AwsClient as d7n}from"aws4fetch";function f7n(t,e,r){let i=`${e}/${r}`;return{async read(a){let o=await t.fetch(`${i}/${a}`);if(o.status!==404){if(!o.ok)throw new Error(`Failed to read ${a}: ${o.status}`);return o.text()}},async write(a,o){let n=await t.fetch(`${i}/${a}`,{method:"PUT",body:o,headers:{"Content-Type":"text/plain"}});if(!n.ok)throw new Error(`Failed to write ${a}: ${n.status}`)},async remove(a){let o=await t.fetch(`${i}/${a}`,{method:"DELETE"});if(!o.ok&&o.status!==204)throw new Error(`Failed to remove ${a}: ${o.status}`)}}}function xiu(t){let{bucket:e,accessKeyId:r,secretAccessKey:i}=t;if(!e||!r||!i){Qe.error("[StorageAdapter] Missing required S3 settings");return}let a=t.region||"us-east-1",o=t.endpoint||`https://s3.${a}.amazonaws.com`;try{let n=new d7n({region:a,accessKeyId:r,secretAccessKey:i});return f7n(n,o,e)}catch(n){Qe.error("[StorageAdapter] Failed to create S3 adapter:",n);return}}function Iiu(t){let{accountId:e,endpoint:r,bucket:i,accessKeyId:a,secretAccessKey:o}=t;if(!r&&!e||!i||!a||!o){Qe.error("[StorageAdapter] Missing required R2 settings");return}try{let n=new d7n({accessKeyId:a,secretAccessKey:o}),s=t.endpoint??`https://${e}.r2.cloudflarestorage.com`;return f7n(n,s,i)}catch(n){Qe.error("[StorageAdapter] Failed to create R2 adapter:",n);return}}function h7n(t){try{let e=t.adapterType;if(e==="r2")return Iiu(t);if(e==="s3")return xiu(t);Qe.error(`[StorageAdapter] Invalid adapterType: ${e}. Must be "s3" or "r2".`);return}catch(e){Qe.error("[StorageAdapter] Unexpected error creating adapter:",e);return}}var p7n=$(()=>{"use strict";br()});var The,n4e,Ktr,Oet=$(()=>{"use strict";br();The=class{name="DiracStorage";subscribers=[];onDidChange(e){return this.subscribers.push(e),()=>{let r=this.subscribers.indexOf(e);r>=0&&this.subscribers.splice(r,1)}}async get(e){try{return await this._get(e)}catch{return}}async _dangerousStore(e,r){await this._store(e,r)}async store(e,r){try{await this._dangerousStore(e,r)}catch(i){Qe.error(`[${this.name}] failed to store '${e}':`,i)}}async delete(e){try{await this._delete(e)}catch{}}},n4e=class{changeSubscribers=[];onDidChange(e){return this.changeSubscribers.push(e),()=>{let r=this.changeSubscribers.indexOf(e);r>=0&&this.changeSubscribers.splice(r,1)}}fireChange(e){for(let r of this.changeSubscribers)try{r({key:e})}catch(i){Qe.error(`[${this.name}] change subscriber error for '${e}':`,i)}}get(e,r){try{let i=this._get(e);return i!==void 0?i:r}catch(i){return Qe.error(`[${this.name}] failed to get '${e}':`,i),r}}update(e,r){return this.set(e,r),Promise.resolve()}set(e,r){try{this._set(e,r),this.fireChange(e)}catch(i){Qe.error(`[${this.name}] failed to set '${e}':`,i)}}delete(e){try{this._delete(e),this.fireChange(e)}catch(r){Qe.error(`[${this.name}] failed to delete '${e}':`,r)}}keys(){try{return this._keys()}catch(e){return Qe.error(`[${this.name}] failed to get keys:`,e),[]}}},Ktr=class extends The{_cache=new Map;async _get(e){return this._cache.get(e)}async _store(e,r){this._cache.set(e,r)}async _delete(e){this._cache.delete(e)}}});var Fet,u7,i4e=$(()=>{"use strict";br();p7n();Oet();Fet=class t extends The{name="DiracBlobStorage";static store=null;static get instance(){return t.store||(t.store=new t),t.store}adapter;settings;initialized=!1;init(e){if(!e)return;let r=!this.settings||this.settings.adapterType!==e.adapterType||this.settings.bucket!==e.bucket||this.settings.accessKeyId!==e.accessKeyId||this.settings.endpoint!==e.endpoint||this.settings.accountId!==e.accountId;if(!(this.initialized&&!r))try{if(!t.isConfigured(e))return;let i=h7n(e);i&&(this.adapter=i,this.settings=e,this.initialized=!0,Qe.log(`[DiracBlobStorage] Adapter created for ${e.adapterType}`))}catch(i){Qe.error("[DiracBlobStorage] initialization failed:",i)}}isReady(){return this.initialized&&this.adapter!==void 0}static isConfigured(e){let r=e.adapterType;if(r!=="s3"&&r!=="r2")return!1;let i=!!e.bucket&&!!e.accessKeyId&&!!e.secretAccessKey;return r==="r2"?i&&!!(e.accountId||e.endpoint):i}async _get(e){if(this.isReady())try{return await this.adapter.read(e)}catch{return}}async _store(e,r){if(this.isReady())try{await this.adapter.write(e,r)}catch(i){throw i}}async _delete(e){if(this.isReady())try{await this.adapter.remove(e)}catch(r){throw r}}},u7=Fet.instance});import*as l3 from"node:fs";import*as A7n from"node:path";function _iu(t,e,r){let i=`${t}.tmp.${Date.now()}.${Math.random().toString(36).substring(7)}.json`;try{l3.writeFileSync(i,e,{flag:"wx",encoding:"utf-8",mode:r}),l3.renameSync(i,t)}catch(a){try{l3.unlinkSync(i)}catch{}throw a}}var Uq,ztr=$(()=>{"use strict";br();Oet();Uq=class extends n4e{name;data;fsPath;fileMode;constructor(e,r="DiracFileStorage",i){super(),this.fsPath=e,this.name=r,this.fileMode=i?.fileMode,this.data=this.readFromDisk()}_get(e){return this.data[e]}_set(e,r){this.setBatch({[e]:r})}_delete(e){this.setBatch({[e]:void 0})}setBatch(e){let r=[];for(let[i,a]of Object.entries(e))a===void 0?i in this.data&&(delete this.data[i],r.push(i)):(this.data[i]=a,r.push(i));if(r.length>0){this.writeToDisk();for(let i of r)this.fireChange(i)}return Promise.resolve()}_keys(){return Object.keys(this.data)}readFromDisk(){try{if(l3.existsSync(this.fsPath))return JSON.parse(l3.readFileSync(this.fsPath,"utf-8"))}catch(e){Qe.error(`[${this.name}] failed to read from ${this.fsPath}:`,e)}return{}}writeToDisk(){try{let e=A7n.dirname(this.fsPath);l3.mkdirSync(e,{recursive:!0}),_iu(this.fsPath,JSON.stringify(this.data,null,2),this.fileMode)}catch(e){Qe.error(`[${this.name}] failed to write to ${this.fsPath}:`,e)}}}});function m7n(){let t=0,e=0;for(let i=0;i<28;i+=7){let a=this.buf[this.pos++];if(t|=(a&127)<<i,(a&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let i=3;i<=31;i+=7){let a=this.buf[this.pos++];if(e|=(a&127)<<i,(a&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}function Let(t,e,r){for(let o=0;o<28;o=o+7){let n=t>>>o,s=!(!(n>>>7)&&e==0),u=(s?n|128:n)&255;if(r.push(u),!s)return}let i=t>>>28&15|(e&7)<<4,a=e>>3!=0;if(r.push((a?i|128:i)&255),!!a){for(let o=3;o<31;o=o+7){let n=e>>>o,s=!!(n>>>7),u=(s?n|128:n)&255;if(r.push(u),!s)return}r.push(e>>>31&1)}}function Ytr(t){let e=t[0]==="-";e&&(t=t.slice(1));let r=1e6,i=0,a=0;function o(n,s){let u=Number(t.slice(n,s));a*=r,i=i*r+u,i>=Net&&(a=a+(i/Net|0),i=i%Net)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),e?y7n(i,a):jtr(i,a)}function E7n(t,e){let r=jtr(t,e),i=r.hi&2147483648;i&&(r=y7n(r.lo,r.hi));let a=Jtr(r.lo,r.hi);return i?"-"+a:a}function Jtr(t,e){if({lo:t,hi:e}=Tiu(t,e),e<=2097151)return String(Net*e+t);let r=t&16777215,i=(t>>>24|e<<8)&16777215,a=e>>16&65535,o=r+i*6777216+a*6710656,n=i+a*8147497,s=a*2,u=1e7;return o>=u&&(n+=Math.floor(o/u),o%=u),n>=u&&(s+=Math.floor(n/u),n%=u),s.toString()+g7n(n)+g7n(o)}function Tiu(t,e){return{lo:t>>>0,hi:e>>>0}}function jtr(t,e){return{lo:t|0,hi:e|0}}function y7n(t,e){return e=~e,t?t=~t+1:e+=1,jtr(t,e)}function $tr(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}function C7n(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}var Net,g7n,Xtr=$(()=>{"use strict";Net=4294967296;g7n=t=>{let e=String(t);return"0000000".slice(e.length)+e}});function wiu(){let t=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){let r=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),a=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(n){let s=typeof n=="bigint"?n:BigInt(n);if(s>i||s<r)throw new Error(`invalid int64: ${n}`);return s},uParse(n){let s=typeof n=="bigint"?n:BigInt(n);if(s>o||s<a)throw new Error(`invalid uint64: ${n}`);return s},enc(n){return t.setBigInt64(0,this.parse(n),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(n){return t.setBigInt64(0,this.uParse(n),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(n,s){return t.setInt32(0,n,!0),t.setInt32(4,s,!0),t.getBigInt64(0,!0)},uDec(n,s){return t.setInt32(0,n,!0),t.setInt32(4,s,!0),t.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(r){return typeof r!="string"&&(r=r.toString()),v7n(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),b7n(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),v7n(r),Ytr(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),b7n(r),Ytr(r)},dec(r,i){return E7n(r,i)},uDec(r,i){return Jtr(r,i)}}}function v7n(t){if(!/^-?[0-9]+$/.test(t))throw new Error("invalid int64: "+t)}function b7n(t){if(!/^[0-9]+$/.test(t))throw new Error("invalid uint64: "+t)}var u4,S7n=$(()=>{"use strict";Xtr();u4=wiu()});function err(){if(globalThis[Ztr]==null){let t=new globalThis.TextEncoder,e=new globalThis.TextDecoder;globalThis[Ztr]={encodeUtf8(r){return t.encode(r)},decodeUtf8(r){return e.decode(r)},checkUtf8(r){try{return encodeURIComponent(r),!0}catch{return!1}}}}return globalThis[Ztr]}var Ztr,trr=$(()=>{"use strict";Ztr=Symbol.for("@bufbuild/protobuf/text-encoding")});function rrr(t){if(typeof t=="string")t=Number(t);else if(typeof t!="number")throw new Error("invalid int32: "+typeof t);if(!Number.isInteger(t)||t>kiu||t<Miu)throw new Error("invalid int32: "+t)}function x7n(t){if(typeof t=="string")t=Number(t);else if(typeof t!="number")throw new Error("invalid uint32: "+typeof t);if(!Number.isInteger(t)||t>Diu||t<0)throw new Error("invalid uint32: "+t)}function Piu(t){if(typeof t=="string"){let e=t;if(t=Number(t),Number.isNaN(t)&&e!=="NaN")throw new Error("invalid float32: "+e)}else if(typeof t!="number")throw new Error("invalid float32: "+typeof t);if(Number.isFinite(t)&&(t>Biu||t<Riu))throw new Error("invalid float32: "+t)}var Gq,Biu,Riu,Diu,kiu,Miu,dr,yt,I7n=$(()=>{"use strict";Xtr();S7n();trr();(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(Gq||(Gq={}));Biu=34028234663852886e22,Riu=-34028234663852886e22,Diu=4294967295,kiu=2147483647,Miu=-2147483648,dr=class{constructor(e=err().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let a=0;a<this.chunks.length;a++)e+=this.chunks[a].length;let r=new Uint8Array(e),i=0;for(let a=0;a<this.chunks.length;a++)r.set(this.chunks[a],i),i+=this.chunks[a].length;return this.chunks=[],r}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),r=this.stack.pop();if(!r)throw new Error("invalid state, fork stack empty");return this.chunks=r.chunks,this.buf=r.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,r){return this.uint32((e<<3|r)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(x7n(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return rrr(e),$tr(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let r=this.encodeUtf8(e);return this.uint32(r.byteLength),this.raw(r)}float(e){Piu(e);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,e,!0),this.raw(r)}double(e){let r=new Uint8Array(8);return new DataView(r.buffer).setFloat64(0,e,!0),this.raw(r)}fixed32(e){x7n(e);let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e,!0),this.raw(r)}sfixed32(e){rrr(e);let r=new Uint8Array(4);return new DataView(r.buffer).setInt32(0,e,!0),this.raw(r)}sint32(e){return rrr(e),e=(e<<1^e>>31)>>>0,$tr(e,this.buf),this}sfixed64(e){let r=new Uint8Array(8),i=new DataView(r.buffer),a=u4.enc(e);return i.setInt32(0,a.lo,!0),i.setInt32(4,a.hi,!0),this.raw(r)}fixed64(e){let r=new Uint8Array(8),i=new DataView(r.buffer),a=u4.uEnc(e);return i.setInt32(0,a.lo,!0),i.setInt32(4,a.hi,!0),this.raw(r)}int64(e){let r=u4.enc(e);return Let(r.lo,r.hi,this.buf),this}sint64(e){let r=u4.enc(e),i=r.hi>>31,a=r.lo<<1^i,o=(r.hi<<1|r.lo>>>31)^i;return Let(a,o,this.buf),this}uint64(e){let r=u4.uEnc(e);return Let(r.lo,r.hi,this.buf),this}},yt=class{constructor(e,r=err().decodeUtf8){this.decodeUtf8=r,this.varint64=m7n,this.uint32=C7n,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.uint32(),r=e>>>3,i=e&7;if(r<=0||i<0||i>5)throw new Error("illegal tag: field no "+r+" wire type "+i);return[r,i]}skip(e,r){let i=this.pos;switch(e){case Gq.Varint:for(;this.buf[this.pos++]&128;);break;case Gq.Bit64:this.pos+=4;case Gq.Bit32:this.pos+=4;break;case Gq.LengthDelimited:let a=this.uint32();this.pos+=a;break;case Gq.StartGroup:for(;;){let[o,n]=this.tag();if(n===Gq.EndGroup){if(r!==void 0&&o!==r)throw new Error("invalid end group tag");break}this.skip(n,o)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(i,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return u4.dec(...this.varint64())}uint64(){return u4.uDec(...this.varint64())}sint64(){let[e,r]=this.varint64(),i=-(e&1);return e=(e>>>1|(r&1)<<31)^i,r=r>>>1^i,u4.dec(e,r)}bool(){let[e,r]=this.varint64();return e!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return u4.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return u4.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),r=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(r,r+e)}string(){return this.decodeUtf8(this.bytes())}}});var _7n=$(()=>{"use strict"});var T7n=$(()=>{"use strict"});var w7n=$(()=>{"use strict"});var kA=$(()=>{"use strict";I7n();_7n();trr();T7n();w7n()});function nrr(){return{paths:[]}}var d3,irr=$(()=>{"use strict";kA();d3={encode(t,e=new dr){for(let r of t.paths)e.uint32(10).string(r);return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=nrr();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.paths.push(r.string());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{paths:typeof t=="string"?t.split(",").filter(globalThis.Boolean):globalThis.Array.isArray(t?.paths)?t.paths.map(globalThis.String):[]}},toJSON(t){return t.paths.join(",")},create(t){return d3.fromPartial(t??{})},fromPartial(t){let e=nrr();return e.paths=t.paths?.map(r=>r)||[],e},wrap(t){let e=nrr();return e.paths=t,e},unwrap(t){return t.paths}}});function J7n(t){switch(t){case 0:case"DIAGNOSTIC_ERROR":return 0;case 1:case"DIAGNOSTIC_WARNING":return 1;case 2:case"DIAGNOSTIC_INFORMATION":return 2;case 3:case"DIAGNOSTIC_HINT":return 3;case-1:case"UNRECOGNIZED":default:return-1}}function j7n(t){switch(t){case 0:return"DIAGNOSTIC_ERROR";case 1:return"DIAGNOSTIC_WARNING";case 2:return"DIAGNOSTIC_INFORMATION";case 3:return"DIAGNOSTIC_HINT";case-1:default:return"UNRECOGNIZED"}}function B7n(){return{}}function R7n(){return{}}function D7n(){return{}}function k7n(){return{value:""}}function M7n(){return{value:[]}}function P7n(){return{value:""}}function O7n(){return{value:0}}function F7n(){return{value:0}}function N7n(){return{value:new Uint8Array(0)}}function L7n(){return{value:new Uint8Array(0)}}function Q7n(){return{value:!1}}function U7n(){return{value:!1}}function G7n(){return{value:!1}}function q7n(){return{values:[]}}function H7n(){return{values1:[],values2:[]}}function V7n(){return{key:"",value:""}}function W7n(){return{filePath:"",diagnostics:[]}}function K7n(){return{message:"",range:void 0,severity:0,source:void 0}}function z7n(){return{start:void 0,end:void 0}}function Y7n(){return{line:0,character:0}}function Z7n(t){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(t,"base64"));{let e=globalThis.atob(t),r=new Uint8Array(e.length);for(let i=0;i<e.length;++i)r[i]=e.charCodeAt(i);return r}}function eLn(t){if(globalThis.Buffer)return globalThis.Buffer.from(t).toString("base64");{let e=[];return t.forEach(r=>{e.push(globalThis.String.fromCharCode(r))}),globalThis.btoa(e.join(""))}}function tLn(t){let e=globalThis.Number(t.toString());if(e>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(e<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return e}function MA(t){return t!=null}var Aee,Rr,ua,zn,bs,whe,jx,lP,Qet,$7n,X7n,c7,h3,a4e,gee,o4e,mee,l7,f_,pee,f3,zi=$(()=>{"use strict";kA();Aee=(o=>(o[o.DIAGNOSTIC_ERROR=0]="DIAGNOSTIC_ERROR",o[o.DIAGNOSTIC_WARNING=1]="DIAGNOSTIC_WARNING",o[o.DIAGNOSTIC_INFORMATION=2]="DIAGNOSTIC_INFORMATION",o[o.DIAGNOSTIC_HINT=3]="DIAGNOSTIC_HINT",o[o.UNRECOGNIZED=-1]="UNRECOGNIZED",o))(Aee||{});Rr={encode(t,e=new dr){return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=B7n();for(;r.pos<i;){let o=r.uint32();if(o>>>3,(o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{}},toJSON(t){return{}},create(t){return Rr.fromPartial(t??{})},fromPartial(t){return B7n()}};ua={encode(t,e=new dr){return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=R7n();for(;r.pos<i;){let o=r.uint32();if(o>>>3,(o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{}},toJSON(t){return{}},create(t){return ua.fromPartial(t??{})},fromPartial(t){return R7n()}};zn={encode(t,e=new dr){return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=D7n();for(;r.pos<i;){let o=r.uint32();if(o>>>3,(o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{}},toJSON(t){return{}},create(t){return zn.fromPartial(t??{})},fromPartial(t){return D7n()}};bs={encode(t,e=new dr){return t.value!==""&&e.uint32(18).string(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=k7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 2:{if(o!==18)break;a.value=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?globalThis.String(t.value):""}},toJSON(t){let e={};return t.value!==""&&(e.value=t.value),e},create(t){return bs.fromPartial(t??{})},fromPartial(t){let e=k7n();return e.value=t.value??"",e}};whe={encode(t,e=new dr){for(let r of t.value)e.uint32(18).string(r);return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=M7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 2:{if(o!==18)break;a.value.push(r.string());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:globalThis.Array.isArray(t?.value)?t.value.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.value?.length&&(e.value=t.value),e},create(t){return whe.fromPartial(t??{})},fromPartial(t){let e=M7n();return e.value=t.value?.map(r=>r)||[],e}};jx={encode(t,e=new dr){return t.value!==""&&e.uint32(10).string(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=P7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.value=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?globalThis.String(t.value):""}},toJSON(t){let e={};return t.value!==""&&(e.value=t.value),e},create(t){return jx.fromPartial(t??{})},fromPartial(t){let e=P7n();return e.value=t.value??"",e}};lP={encode(t,e=new dr){return t.value!==0&&e.uint32(16).int64(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=O7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 2:{if(o!==16)break;a.value=tLn(r.int64());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?globalThis.Number(t.value):0}},toJSON(t){let e={};return t.value!==0&&(e.value=Math.round(t.value)),e},create(t){return lP.fromPartial(t??{})},fromPartial(t){let e=O7n();return e.value=t.value??0,e}};Qet={encode(t,e=new dr){return t.value!==0&&e.uint32(8).int64(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=F7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.value=tLn(r.int64());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?globalThis.Number(t.value):0}},toJSON(t){let e={};return t.value!==0&&(e.value=Math.round(t.value)),e},create(t){return Qet.fromPartial(t??{})},fromPartial(t){let e=F7n();return e.value=t.value??0,e}};$7n={encode(t,e=new dr){return t.value.length!==0&&e.uint32(18).bytes(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=N7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 2:{if(o!==18)break;a.value=r.bytes();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?Z7n(t.value):new Uint8Array(0)}},toJSON(t){let e={};return t.value.length!==0&&(e.value=eLn(t.value)),e},create(t){return $7n.fromPartial(t??{})},fromPartial(t){let e=N7n();return e.value=t.value??new Uint8Array(0),e}};X7n={encode(t,e=new dr){return t.value.length!==0&&e.uint32(10).bytes(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=L7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.value=r.bytes();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?Z7n(t.value):new Uint8Array(0)}},toJSON(t){let e={};return t.value.length!==0&&(e.value=eLn(t.value)),e},create(t){return X7n.fromPartial(t??{})},fromPartial(t){let e=L7n();return e.value=t.value??new Uint8Array(0),e}};c7={encode(t,e=new dr){return t.value!==!1&&e.uint32(16).bool(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=Q7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 2:{if(o!==16)break;a.value=r.bool();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?globalThis.Boolean(t.value):!1}},toJSON(t){let e={};return t.value!==!1&&(e.value=t.value),e},create(t){return c7.fromPartial(t??{})},fromPartial(t){let e=Q7n();return e.value=t.value??!1,e}};h3={encode(t,e=new dr){return t.value!==!1&&e.uint32(8).bool(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=U7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.value=r.bool();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?globalThis.Boolean(t.value):!1}},toJSON(t){let e={};return t.value!==!1&&(e.value=t.value),e},create(t){return h3.fromPartial(t??{})},fromPartial(t){let e=U7n();return e.value=t.value??!1,e}};a4e={encode(t,e=new dr){return t.value!==!1&&e.uint32(8).bool(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=G7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.value=r.bool();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{value:MA(t.value)?globalThis.Boolean(t.value):!1}},toJSON(t){let e={};return t.value!==!1&&(e.value=t.value),e},create(t){return a4e.fromPartial(t??{})},fromPartial(t){let e=G7n();return e.value=t.value??!1,e}};gee={encode(t,e=new dr){for(let r of t.values)e.uint32(10).string(r);return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=q7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.values.push(r.string());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{values:globalThis.Array.isArray(t?.values)?t.values.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.values?.length&&(e.values=t.values),e},create(t){return gee.fromPartial(t??{})},fromPartial(t){let e=q7n();return e.values=t.values?.map(r=>r)||[],e}};o4e={encode(t,e=new dr){for(let r of t.values1)e.uint32(10).string(r);for(let r of t.values2)e.uint32(18).string(r);return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=H7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.values1.push(r.string());continue}case 2:{if(o!==18)break;a.values2.push(r.string());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{values1:globalThis.Array.isArray(t?.values1)?t.values1.map(e=>globalThis.String(e)):[],values2:globalThis.Array.isArray(t?.values2)?t.values2.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.values1?.length&&(e.values1=t.values1),t.values2?.length&&(e.values2=t.values2),e},create(t){return o4e.fromPartial(t??{})},fromPartial(t){let e=H7n();return e.values1=t.values1?.map(r=>r)||[],e.values2=t.values2?.map(r=>r)||[],e}};mee={encode(t,e=new dr){return t.key!==""&&e.uint32(10).string(t.key),t.value!==""&&e.uint32(18).string(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=V7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.key=r.string();continue}case 2:{if(o!==18)break;a.value=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{key:MA(t.key)?globalThis.String(t.key):"",value:MA(t.value)?globalThis.String(t.value):""}},toJSON(t){let e={};return t.key!==""&&(e.key=t.key),t.value!==""&&(e.value=t.value),e},create(t){return mee.fromPartial(t??{})},fromPartial(t){let e=V7n();return e.key=t.key??"",e.value=t.value??"",e}};l7={encode(t,e=new dr){t.filePath!==""&&e.uint32(10).string(t.filePath);for(let r of t.diagnostics)f_.encode(r,e.uint32(18).fork()).join();return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=W7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.filePath=r.string();continue}case 2:{if(o!==18)break;a.diagnostics.push(f_.decode(r,r.uint32()));continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{filePath:MA(t.filePath)?globalThis.String(t.filePath):MA(t.file_path)?globalThis.String(t.file_path):"",diagnostics:globalThis.Array.isArray(t?.diagnostics)?t.diagnostics.map(e=>f_.fromJSON(e)):[]}},toJSON(t){let e={};return t.filePath!==""&&(e.filePath=t.filePath),t.diagnostics?.length&&(e.diagnostics=t.diagnostics.map(r=>f_.toJSON(r))),e},create(t){return l7.fromPartial(t??{})},fromPartial(t){let e=W7n();return e.filePath=t.filePath??"",e.diagnostics=t.diagnostics?.map(r=>f_.fromPartial(r))||[],e}};f_={encode(t,e=new dr){return t.message!==""&&e.uint32(10).string(t.message),t.range!==void 0&&pee.encode(t.range,e.uint32(18).fork()).join(),t.severity!==0&&e.uint32(24).int32(t.severity),t.source!==void 0&&e.uint32(34).string(t.source),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=K7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.message=r.string();continue}case 2:{if(o!==18)break;a.range=pee.decode(r,r.uint32());continue}case 3:{if(o!==24)break;a.severity=r.int32();continue}case 4:{if(o!==34)break;a.source=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{message:MA(t.message)?globalThis.String(t.message):"",range:MA(t.range)?pee.fromJSON(t.range):void 0,severity:MA(t.severity)?J7n(t.severity):0,source:MA(t.source)?globalThis.String(t.source):void 0}},toJSON(t){let e={};return t.message!==""&&(e.message=t.message),t.range!==void 0&&(e.range=pee.toJSON(t.range)),t.severity!==0&&(e.severity=j7n(t.severity)),t.source!==void 0&&(e.source=t.source),e},create(t){return f_.fromPartial(t??{})},fromPartial(t){let e=K7n();return e.message=t.message??"",e.range=t.range!==void 0&&t.range!==null?pee.fromPartial(t.range):void 0,e.severity=t.severity??0,e.source=t.source??void 0,e}};pee={encode(t,e=new dr){return t.start!==void 0&&f3.encode(t.start,e.uint32(10).fork()).join(),t.end!==void 0&&f3.encode(t.end,e.uint32(18).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=z7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.start=f3.decode(r,r.uint32());continue}case 2:{if(o!==18)break;a.end=f3.decode(r,r.uint32());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{start:MA(t.start)?f3.fromJSON(t.start):void 0,end:MA(t.end)?f3.fromJSON(t.end):void 0}},toJSON(t){let e={};return t.start!==void 0&&(e.start=f3.toJSON(t.start)),t.end!==void 0&&(e.end=f3.toJSON(t.end)),e},create(t){return pee.fromPartial(t??{})},fromPartial(t){let e=z7n();return e.start=t.start!==void 0&&t.start!==null?f3.fromPartial(t.start):void 0,e.end=t.end!==void 0&&t.end!==null?f3.fromPartial(t.end):void 0,e}};f3={encode(t,e=new dr){return t.line!==0&&e.uint32(8).int32(t.line),t.character!==0&&e.uint32(16).int32(t.character),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=Y7n();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.line=r.int32();continue}case 2:{if(o!==16)break;a.character=r.int32();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{line:MA(t.line)?globalThis.Number(t.line):0,character:MA(t.character)?globalThis.Number(t.character):0}},toJSON(t){let e={};return t.line!==0&&(e.line=Math.round(t.line)),t.character!==0&&(e.character=Math.round(t.character)),e},create(t){return f3.fromPartial(t??{})},fromPartial(t){let e=Y7n();return e.line=t.line??0,e.character=t.character??0,e}}});function $x(t){switch(t){case 0:case"ANTHROPIC":return 0;case 1:case"OPENROUTER":return 1;case 2:case"BEDROCK":return 2;case 3:case"VERTEX":return 3;case 4:case"OPENAI":return 4;case 6:case"LMSTUDIO":return 6;case 7:case"GEMINI":return 7;case 8:case"OPENAI_NATIVE":return 8;case 9:case"REQUESTY":return 9;case 10:case"TOGETHER":return 10;case 11:case"DEEPSEEK":return 11;case 12:case"QWEN":return 12;case 13:case"DOUBAO":return 13;case 14:case"MISTRAL":return 14;case 15:case"VSCODE_LM":return 15;case 16:case"DIRAC":return 16;case 17:case"LITELLM":return 17;case 18:case"NEBIUS":return 18;case 19:case"FIREWORKS":return 19;case 21:case"XAI":return 21;case 22:case"SAMBANOVA":return 22;case 23:case"CEREBRAS":return 23;case 24:case"GROQ":return 24;case 26:case"CLAUDE_CODE":return 26;case 27:case"MOONSHOT":return 27;case 28:case"HUGGINGFACE":return 28;case 29:case"HUAWEI_CLOUD_MAAS":return 29;case 30:case"BASETEN":return 30;case 31:case"ZAI":return 31;case 32:case"VERCEL_AI_GATEWAY":return 32;case 33:case"QWEN_CODE":return 33;case 34:case"DIFY":return 34;case 36:case"MINIMAX":return 36;case 38:case"AIHUBMIX":return 38;case 39:case"NOUSRESEARCH":return 39;case 40:case"OPENAI_CODEX":return 40;case 41:case"WANDB":return 41;case-1:case"UNRECOGNIZED":default:return-1}}function Hq(t){switch(t){case 0:return"ANTHROPIC";case 1:return"OPENROUTER";case 2:return"BEDROCK";case 3:return"VERTEX";case 4:return"OPENAI";case 6:return"LMSTUDIO";case 7:return"GEMINI";case 8:return"OPENAI_NATIVE";case 9:return"REQUESTY";case 10:return"TOGETHER";case 11:return"DEEPSEEK";case 12:return"QWEN";case 13:return"DOUBAO";case 14:return"MISTRAL";case 15:return"VSCODE_LM";case 16:return"DIRAC";case 17:return"LITELLM";case 18:return"NEBIUS";case 19:return"FIREWORKS";case 21:return"XAI";case 22:return"SAMBANOVA";case 23:return"CEREBRAS";case 24:return"GROQ";case 26:return"CLAUDE_CODE";case 27:return"MOONSHOT";case 28:return"HUGGINGFACE";case 29:return"HUAWEI_CLOUD_MAAS";case 30:return"BASETEN";case 31:return"ZAI";case 32:return"VERCEL_AI_GATEWAY";case 33:return"QWEN_CODE";case 34:return"DIFY";case 36:return"MINIMAX";case 38:return"AIHUBMIX";case 39:return"NOUSRESEARCH";case 40:return"OPENAI_CODEX";case 41:return"WANDB";case-1:default:return"UNRECOGNIZED"}}function d7(t){switch(t){case 0:case"ANTHROPIC_CHAT":return 0;case 1:case"GEMINI_CHAT":return 1;case 2:case"OPENAI_CHAT":return 2;case 3:case"R1_CHAT":return 3;case 4:case"OPENAI_RESPONSES":return 4;case 5:case"OPENAI_RESPONSES_WEBSOCKET_MODE":return 5;case-1:case"UNRECOGNIZED":default:return-1}}function vee(t){switch(t){case 0:return"ANTHROPIC_CHAT";case 1:return"GEMINI_CHAT";case 2:return"OPENAI_CHAT";case 3:return"R1_CHAT";case 4:return"OPENAI_RESPONSES";case 5:return"OPENAI_RESPONSES_WEBSOCKET_MODE";case-1:default:return"UNRECOGNIZED"}}function rLn(){return{models:[]}}function nLn(){return{vendor:void 0,family:void 0,version:void 0,id:void 0}}function iLn(){return{tokenLimit:0,price:0}}function aLn(){return{maxBudget:void 0,outputPrice:void 0,outputPriceTiers:[]}}function oLn(){return{contextWindow:0,inputPrice:void 0,outputPrice:void 0,cacheWritesPrice:void 0,cacheReadsPrice:void 0}}function sLn(){return{maxTokens:void 0,contextWindow:void 0,supportsImages:void 0,supportsPromptCache:!1,inputPrice:void 0,outputPrice:void 0,cacheWritesPrice:void 0,cacheReadsPrice:void 0,description:void 0,thinkingConfig:void 0,supportsGlobalEndpoint:void 0,tiers:[],name:void 0,temperature:void 0,supportsReasoning:void 0,apiFormat:void 0,supportsTools:void 0,supportsAdaptiveThinking:void 0}}function uLn(){return{models:{}}}function cLn(){return{key:"",value:void 0}}function lLn(){return{metadata:void 0,baseUrl:"",apiKey:""}}function dLn(){return{apiKey:void 0,diracApiKey:void 0,liteLlmApiKey:void 0,openRouterApiKey:void 0,awsAccessKey:void 0,awsSecretKey:void 0,awsSessionToken:void 0,awsBedrockApiKey:void 0,openAiApiKey:void 0,geminiApiKey:void 0,openAiNativeApiKey:void 0,deepSeekApiKey:void 0,requestyApiKey:void 0,togetherApiKey:void 0,fireworksApiKey:void 0,qwenApiKey:void 0,doubaoApiKey:void 0,mistralApiKey:void 0,nebiusApiKey:void 0,xaiApiKey:void 0,sambanovaApiKey:void 0,cerebrasApiKey:void 0,moonshotApiKey:void 0,diracAccountId:void 0,groqApiKey:void 0,huggingFaceApiKey:void 0,huaweiCloudMaasApiKey:void 0,basetenApiKey:void 0,zaiApiKey:void 0,vercelAiGatewayApiKey:void 0,difyApiKey:void 0,minimaxApiKey:void 0,aihubmixApiKey:void 0}}function fLn(){return{ulid:void 0,liteLlmBaseUrl:void 0,liteLlmUsePromptCache:void 0,openAiHeaders:{},anthropicBaseUrl:void 0,openRouterProviderSorting:void 0,awsRegion:void 0,awsUseCrossRegionInference:void 0,awsBedrockUsePromptCache:void 0,awsUseProfile:void 0,awsProfile:void 0,awsBedrockEndpoint:void 0,claudeCodePath:void 0,vertexProjectId:void 0,vertexRegion:void 0,openAiBaseUrl:void 0,lmStudioBaseUrl:void 0,geminiBaseUrl:void 0,requestyBaseUrl:void 0,fireworksModelMaxCompletionTokens:void 0,fireworksModelMaxTokens:void 0,azureApiVersion:void 0,qwenApiLine:void 0,requestTimeoutMs:void 0,moonshotApiLine:void 0,awsAuthentication:void 0,zaiApiLine:void 0,lmStudioMaxTokens:void 0,qwenCodeOauthPath:void 0,difyBaseUrl:void 0,awsUseGlobalInference:void 0,minimaxApiLine:void 0,aihubmixBaseUrl:void 0,aihubmixAppCode:void 0,azureIdentity:void 0,planModeApiProvider:void 0,planModeApiModelId:void 0,planModeThinkingBudgetTokens:void 0,planModeReasoningEffort:void 0,planModeVsCodeLmModelSelector:void 0,planModeAwsBedrockCustomSelected:void 0,planModeAwsBedrockCustomModelBaseId:void 0,planModeOpenRouterModelId:void 0,planModeOpenRouterModelInfo:void 0,planModeOpenAiModelId:void 0,planModeOpenAiModelInfo:void 0,planModeLmStudioModelId:void 0,planModeLiteLlmModelId:void 0,planModeLiteLlmModelInfo:void 0,planModeRequestyModelId:void 0,planModeRequestyModelInfo:void 0,planModeTogetherModelId:void 0,planModeFireworksModelId:void 0,planModeGroqModelId:void 0,planModeGroqModelInfo:void 0,planModeHuggingFaceModelId:void 0,planModeHuggingFaceModelInfo:void 0,planModeHuaweiCloudMaasModelId:void 0,planModeHuaweiCloudMaasModelInfo:void 0,planModeBasetenModelId:void 0,planModeBasetenModelInfo:void 0,planModeVercelAiGatewayModelId:void 0,planModeVercelAiGatewayModelInfo:void 0,planModeAihubmixModelId:void 0,planModeAihubmixModelInfo:void 0,planModeDiracModelId:void 0,planModeDiracModelInfo:void 0,actModeApiProvider:void 0,actModeApiModelId:void 0,actModeThinkingBudgetTokens:void 0,actModeReasoningEffort:void 0,actModeVsCodeLmModelSelector:void 0,actModeAwsBedrockCustomSelected:void 0,actModeAwsBedrockCustomModelBaseId:void 0,actModeOpenRouterModelId:void 0,actModeOpenRouterModelInfo:void 0,actModeOpenAiModelId:void 0,actModeOpenAiModelInfo:void 0,actModeLmStudioModelId:void 0,actModeLiteLlmModelId:void 0,actModeLiteLlmModelInfo:void 0,actModeRequestyModelId:void 0,actModeRequestyModelInfo:void 0,actModeTogetherModelId:void 0,actModeFireworksModelId:void 0,actModeGroqModelId:void 0,actModeGroqModelInfo:void 0,actModeHuggingFaceModelId:void 0,actModeHuggingFaceModelInfo:void 0,actModeHuaweiCloudMaasModelId:void 0,actModeHuaweiCloudMaasModelInfo:void 0,actModeBasetenModelId:void 0,actModeBasetenModelInfo:void 0,actModeVercelAiGatewayModelId:void 0,actModeVercelAiGatewayModelInfo:void 0,actModeAihubmixModelId:void 0,actModeAihubmixModelInfo:void 0,actModeDiracModelId:void 0,actModeDiracModelInfo:void 0}}function hLn(){return{key:"",value:""}}function pLn(){return{metadata:void 0,apiConfiguration:void 0}}function ALn(){return{options:void 0,secrets:void 0}}function gLn(){return{metadata:void 0,updates:void 0,updateMask:[]}}function mLn(){return{metadata:void 0,apiConfiguration:void 0,updateMask:void 0}}function ELn(){return{maxTokens:void 0,contextWindow:void 0,supportsImages:void 0,supportsPromptCache:!1,inputPrice:void 0,outputPrice:void 0,thinkingConfig:void 0,cacheWritesPrice:void 0,cacheReadsPrice:void 0,description:void 0,temperature:void 0,surveyContent:void 0,surveyId:void 0,banner:void 0,modelName:"",apiFormat:void 0,supportsReasoning:void 0,reasoningEffortOptions:[],supportsTools:void 0,supportsAdaptiveThinking:void 0}}function yLn(){return{models:{},error:void 0}}function CLn(){return{key:"",value:void 0}}function vLn(){return{maxTokens:void 0,contextWindow:void 0,supportsImages:void 0,supportsPromptCache:!1,inputPrice:void 0,outputPrice:void 0,thinkingConfig:void 0,supportsGlobalEndpoint:void 0,cacheWritesPrice:void 0,cacheReadsPrice:void 0,description:void 0,tiers:[],temperature:void 0,isR1FormatRequired:void 0,apiFormat:void 0,supportsTools:void 0,supportsAdaptiveThinking:void 0}}function bLn(){return{maxTokens:void 0,contextWindow:void 0,supportsImages:void 0,supportsPromptCache:!1,inputPrice:void 0,outputPrice:void 0,thinkingConfig:void 0,supportsGlobalEndpoint:void 0,cacheWritesPrice:void 0,cacheReadsPrice:void 0,description:void 0,tiers:[],temperature:void 0,apiFormat:void 0,supportsReasoning:void 0,supportsAdaptiveThinking:void 0}}function SLn(){return{apiKey:void 0,diracApiKey:void 0,ulid:void 0,liteLlmBaseUrl:void 0,liteLlmApiKey:void 0,liteLlmUsePromptCache:void 0,openAiHeaders:{},anthropicBaseUrl:void 0,openRouterApiKey:void 0,openRouterProviderSorting:void 0,awsAccessKey:void 0,awsSecretKey:void 0,awsSessionToken:void 0,awsRegion:void 0,awsUseCrossRegionInference:void 0,awsBedrockUsePromptCache:void 0,awsUseProfile:void 0,awsProfile:void 0,awsBedrockEndpoint:void 0,claudeCodePath:void 0,vertexProjectId:void 0,vertexRegion:void 0,openAiBaseUrl:void 0,openAiApiKey:void 0,lmStudioBaseUrl:void 0,geminiApiKey:void 0,geminiBaseUrl:void 0,openAiNativeApiKey:void 0,deepSeekApiKey:void 0,requestyApiKey:void 0,requestyBaseUrl:void 0,togetherApiKey:void 0,fireworksApiKey:void 0,fireworksModelMaxCompletionTokens:void 0,fireworksModelMaxTokens:void 0,qwenApiKey:void 0,doubaoApiKey:void 0,mistralApiKey:void 0,azureApiVersion:void 0,qwenApiLine:void 0,nebiusApiKey:void 0,xaiApiKey:void 0,sambanovaApiKey:void 0,cerebrasApiKey:void 0,requestTimeoutMs:void 0,moonshotApiKey:void 0,moonshotApiLine:void 0,awsAuthentication:void 0,awsBedrockApiKey:void 0,groqApiKey:void 0,huggingFaceApiKey:void 0,huaweiCloudMaasApiKey:void 0,basetenApiKey:void 0,zaiApiKey:void 0,zaiApiLine:void 0,lmStudioMaxTokens:void 0,vercelAiGatewayApiKey:void 0,qwenCodeOauthPath:void 0,difyApiKey:void 0,difyBaseUrl:void 0,awsUseGlobalInference:void 0,minimaxApiKey:void 0,minimaxApiLine:void 0,aihubmixApiKey:void 0,aihubmixBaseUrl:void 0,aihubmixAppCode:void 0,nousResearchApiKey:void 0,azureIdentity:void 0,wandbApiKey:void 0,planModeApiProvider:void 0,planModeApiModelId:void 0,planModeThinkingBudgetTokens:void 0,planModeReasoningEffort:void 0,planModeVsCodeLmModelSelector:void 0,planModeAwsBedrockCustomSelected:void 0,planModeAwsBedrockCustomModelBaseId:void 0,planModeOpenRouterModelId:void 0,planModeOpenRouterModelInfo:void 0,planModeOpenAiModelId:void 0,planModeOpenAiModelInfo:void 0,planModeLmStudioModelId:void 0,planModeLiteLlmModelId:void 0,planModeLiteLlmModelInfo:void 0,planModeRequestyModelId:void 0,planModeRequestyModelInfo:void 0,planModeTogetherModelId:void 0,planModeFireworksModelId:void 0,planModeGroqModelId:void 0,planModeGroqModelInfo:void 0,planModeHuggingFaceModelId:void 0,planModeHuggingFaceModelInfo:void 0,planModeHuaweiCloudMaasModelId:void 0,planModeHuaweiCloudMaasModelInfo:void 0,planModeBasetenModelId:void 0,planModeBasetenModelInfo:void 0,planModeVercelAiGatewayModelId:void 0,planModeVercelAiGatewayModelInfo:void 0,planModeAihubmixModelId:void 0,planModeAihubmixModelInfo:void 0,planModeNousResearchModelId:void 0,geminiPlanModeThinkingLevel:void 0,planModeDiracModelId:void 0,planModeDiracModelInfo:void 0,actModeApiProvider:void 0,actModeApiModelId:void 0,actModeThinkingBudgetTokens:void 0,actModeReasoningEffort:void 0,actModeVsCodeLmModelSelector:void 0,actModeAwsBedrockCustomSelected:void 0,actModeAwsBedrockCustomModelBaseId:void 0,actModeOpenRouterModelId:void 0,actModeOpenRouterModelInfo:void 0,actModeOpenAiModelId:void 0,actModeOpenAiModelInfo:void 0,actModeLmStudioModelId:void 0,actModeLiteLlmModelId:void 0,actModeLiteLlmModelInfo:void 0,actModeRequestyModelId:void 0,actModeRequestyModelInfo:void 0,actModeTogetherModelId:void 0,actModeFireworksModelId:void 0,actModeGroqModelId:void 0,actModeGroqModelInfo:void 0,actModeHuggingFaceModelId:void 0,actModeHuggingFaceModelInfo:void 0,actModeHuaweiCloudMaasModelId:void 0,actModeHuaweiCloudMaasModelInfo:void 0,actModeBasetenModelId:void 0,actModeBasetenModelInfo:void 0,actModeVercelAiGatewayModelId:void 0,actModeVercelAiGatewayModelInfo:void 0,actModeAihubmixModelId:void 0,actModeAihubmixModelInfo:void 0,actModeNousResearchModelId:void 0,geminiActModeThinkingLevel:void 0,actModeDiracModelId:void 0,actModeDiracModelInfo:void 0}}function xLn(){return{key:"",value:""}}function OA(t){let e=globalThis.Number(t.toString());if(e>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(e<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return e}function Bhe(t){return typeof t=="object"&&t!==null}function rt(t){return t!=null}var arr,s4e,Vet,js,qq,If,Ay,Zt,lp,Uet,orr,Eee,yee,Get,srr,Cee,urr,crr,dP,ILn,qet,pa,Nu,PA,Het,Oiu,FA=$(()=>{"use strict";kA();irr();zi();arr=(D=>(D[D.ANTHROPIC=0]="ANTHROPIC",D[D.OPENROUTER=1]="OPENROUTER",D[D.BEDROCK=2]="BEDROCK",D[D.VERTEX=3]="VERTEX",D[D.OPENAI=4]="OPENAI",D[D.LMSTUDIO=6]="LMSTUDIO",D[D.GEMINI=7]="GEMINI",D[D.OPENAI_NATIVE=8]="OPENAI_NATIVE",D[D.REQUESTY=9]="REQUESTY",D[D.TOGETHER=10]="TOGETHER",D[D.DEEPSEEK=11]="DEEPSEEK",D[D.QWEN=12]="QWEN",D[D.DOUBAO=13]="DOUBAO",D[D.MISTRAL=14]="MISTRAL",D[D.VSCODE_LM=15]="VSCODE_LM",D[D.DIRAC=16]="DIRAC",D[D.LITELLM=17]="LITELLM",D[D.NEBIUS=18]="NEBIUS",D[D.FIREWORKS=19]="FIREWORKS",D[D.XAI=21]="XAI",D[D.SAMBANOVA=22]="SAMBANOVA",D[D.CEREBRAS=23]="CEREBRAS",D[D.GROQ=24]="GROQ",D[D.CLAUDE_CODE=26]="CLAUDE_CODE",D[D.MOONSHOT=27]="MOONSHOT",D[D.HUGGINGFACE=28]="HUGGINGFACE",D[D.HUAWEI_CLOUD_MAAS=29]="HUAWEI_CLOUD_MAAS",D[D.BASETEN=30]="BASETEN",D[D.ZAI=31]="ZAI",D[D.VERCEL_AI_GATEWAY=32]="VERCEL_AI_GATEWAY",D[D.QWEN_CODE=33]="QWEN_CODE",D[D.DIFY=34]="DIFY",D[D.MINIMAX=36]="MINIMAX",D[D.AIHUBMIX=38]="AIHUBMIX",D[D.NOUSRESEARCH=39]="NOUSRESEARCH",D[D.OPENAI_CODEX=40]="OPENAI_CODEX",D[D.WANDB=41]="WANDB",D[D.UNRECOGNIZED=-1]="UNRECOGNIZED",D))(arr||{});s4e=(s=>(s[s.ANTHROPIC_CHAT=0]="ANTHROPIC_CHAT",s[s.GEMINI_CHAT=1]="GEMINI_CHAT",s[s.OPENAI_CHAT=2]="OPENAI_CHAT",s[s.R1_CHAT=3]="R1_CHAT",s[s.OPENAI_RESPONSES=4]="OPENAI_RESPONSES",s[s.OPENAI_RESPONSES_WEBSOCKET_MODE=5]="OPENAI_RESPONSES_WEBSOCKET_MODE",s[s.UNRECOGNIZED=-1]="UNRECOGNIZED",s))(s4e||{});Vet={encode(t,e=new dr){for(let r of t.models)js.encode(r,e.uint32(10).fork()).join();return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=rLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.models.push(js.decode(r,r.uint32()));continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{models:globalThis.Array.isArray(t?.models)?t.models.map(e=>js.fromJSON(e)):[]}},toJSON(t){let e={};return t.models?.length&&(e.models=t.models.map(r=>js.toJSON(r))),e},create(t){return Vet.fromPartial(t??{})},fromPartial(t){let e=rLn();return e.models=t.models?.map(r=>js.fromPartial(r))||[],e}};js={encode(t,e=new dr){return t.vendor!==void 0&&e.uint32(10).string(t.vendor),t.family!==void 0&&e.uint32(18).string(t.family),t.version!==void 0&&e.uint32(26).string(t.version),t.id!==void 0&&e.uint32(34).string(t.id),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=nLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.vendor=r.string();continue}case 2:{if(o!==18)break;a.family=r.string();continue}case 3:{if(o!==26)break;a.version=r.string();continue}case 4:{if(o!==34)break;a.id=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{vendor:rt(t.vendor)?globalThis.String(t.vendor):void 0,family:rt(t.family)?globalThis.String(t.family):void 0,version:rt(t.version)?globalThis.String(t.version):void 0,id:rt(t.id)?globalThis.String(t.id):void 0}},toJSON(t){let e={};return t.vendor!==void 0&&(e.vendor=t.vendor),t.family!==void 0&&(e.family=t.family),t.version!==void 0&&(e.version=t.version),t.id!==void 0&&(e.id=t.id),e},create(t){return js.fromPartial(t??{})},fromPartial(t){let e=nLn();return e.vendor=t.vendor??void 0,e.family=t.family??void 0,e.version=t.version??void 0,e.id=t.id??void 0,e}};qq={encode(t,e=new dr){return t.tokenLimit!==0&&e.uint32(8).int64(t.tokenLimit),t.price!==0&&e.uint32(17).double(t.price),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=iLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.tokenLimit=OA(r.int64());continue}case 2:{if(o!==17)break;a.price=r.double();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{tokenLimit:rt(t.tokenLimit)?globalThis.Number(t.tokenLimit):rt(t.token_limit)?globalThis.Number(t.token_limit):0,price:rt(t.price)?globalThis.Number(t.price):0}},toJSON(t){let e={};return t.tokenLimit!==0&&(e.tokenLimit=Math.round(t.tokenLimit)),t.price!==0&&(e.price=t.price),e},create(t){return qq.fromPartial(t??{})},fromPartial(t){let e=iLn();return e.tokenLimit=t.tokenLimit??0,e.price=t.price??0,e}};If={encode(t,e=new dr){t.maxBudget!==void 0&&e.uint32(8).int64(t.maxBudget),t.outputPrice!==void 0&&e.uint32(17).double(t.outputPrice);for(let r of t.outputPriceTiers)qq.encode(r,e.uint32(26).fork()).join();return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=aLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.maxBudget=OA(r.int64());continue}case 2:{if(o!==17)break;a.outputPrice=r.double();continue}case 3:{if(o!==26)break;a.outputPriceTiers.push(qq.decode(r,r.uint32()));continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{maxBudget:rt(t.maxBudget)?globalThis.Number(t.maxBudget):rt(t.max_budget)?globalThis.Number(t.max_budget):void 0,outputPrice:rt(t.outputPrice)?globalThis.Number(t.outputPrice):rt(t.output_price)?globalThis.Number(t.output_price):void 0,outputPriceTiers:globalThis.Array.isArray(t?.outputPriceTiers)?t.outputPriceTiers.map(e=>qq.fromJSON(e)):globalThis.Array.isArray(t?.output_price_tiers)?t.output_price_tiers.map(e=>qq.fromJSON(e)):[]}},toJSON(t){let e={};return t.maxBudget!==void 0&&(e.maxBudget=Math.round(t.maxBudget)),t.outputPrice!==void 0&&(e.outputPrice=t.outputPrice),t.outputPriceTiers?.length&&(e.outputPriceTiers=t.outputPriceTiers.map(r=>qq.toJSON(r))),e},create(t){return If.fromPartial(t??{})},fromPartial(t){let e=aLn();return e.maxBudget=t.maxBudget??void 0,e.outputPrice=t.outputPrice??void 0,e.outputPriceTiers=t.outputPriceTiers?.map(r=>qq.fromPartial(r))||[],e}};Ay={encode(t,e=new dr){return t.contextWindow!==0&&e.uint32(8).int64(t.contextWindow),t.inputPrice!==void 0&&e.uint32(17).double(t.inputPrice),t.outputPrice!==void 0&&e.uint32(25).double(t.outputPrice),t.cacheWritesPrice!==void 0&&e.uint32(33).double(t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&e.uint32(41).double(t.cacheReadsPrice),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=oLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.contextWindow=OA(r.int64());continue}case 2:{if(o!==17)break;a.inputPrice=r.double();continue}case 3:{if(o!==25)break;a.outputPrice=r.double();continue}case 4:{if(o!==33)break;a.cacheWritesPrice=r.double();continue}case 5:{if(o!==41)break;a.cacheReadsPrice=r.double();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{contextWindow:rt(t.contextWindow)?globalThis.Number(t.contextWindow):rt(t.context_window)?globalThis.Number(t.context_window):0,inputPrice:rt(t.inputPrice)?globalThis.Number(t.inputPrice):rt(t.input_price)?globalThis.Number(t.input_price):void 0,outputPrice:rt(t.outputPrice)?globalThis.Number(t.outputPrice):rt(t.output_price)?globalThis.Number(t.output_price):void 0,cacheWritesPrice:rt(t.cacheWritesPrice)?globalThis.Number(t.cacheWritesPrice):rt(t.cache_writes_price)?globalThis.Number(t.cache_writes_price):void 0,cacheReadsPrice:rt(t.cacheReadsPrice)?globalThis.Number(t.cacheReadsPrice):rt(t.cache_reads_price)?globalThis.Number(t.cache_reads_price):void 0}},toJSON(t){let e={};return t.contextWindow!==0&&(e.contextWindow=Math.round(t.contextWindow)),t.inputPrice!==void 0&&(e.inputPrice=t.inputPrice),t.outputPrice!==void 0&&(e.outputPrice=t.outputPrice),t.cacheWritesPrice!==void 0&&(e.cacheWritesPrice=t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&(e.cacheReadsPrice=t.cacheReadsPrice),e},create(t){return Ay.fromPartial(t??{})},fromPartial(t){let e=oLn();return e.contextWindow=t.contextWindow??0,e.inputPrice=t.inputPrice??void 0,e.outputPrice=t.outputPrice??void 0,e.cacheWritesPrice=t.cacheWritesPrice??void 0,e.cacheReadsPrice=t.cacheReadsPrice??void 0,e}};Zt={encode(t,e=new dr){t.maxTokens!==void 0&&e.uint32(8).int64(t.maxTokens),t.contextWindow!==void 0&&e.uint32(16).int64(t.contextWindow),t.supportsImages!==void 0&&e.uint32(24).bool(t.supportsImages),t.supportsPromptCache!==!1&&e.uint32(32).bool(t.supportsPromptCache),t.inputPrice!==void 0&&e.uint32(41).double(t.inputPrice),t.outputPrice!==void 0&&e.uint32(49).double(t.outputPrice),t.cacheWritesPrice!==void 0&&e.uint32(57).double(t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&e.uint32(65).double(t.cacheReadsPrice),t.description!==void 0&&e.uint32(74).string(t.description),t.thinkingConfig!==void 0&&If.encode(t.thinkingConfig,e.uint32(82).fork()).join(),t.supportsGlobalEndpoint!==void 0&&e.uint32(88).bool(t.supportsGlobalEndpoint);for(let r of t.tiers)Ay.encode(r,e.uint32(98).fork()).join();return t.name!==void 0&&e.uint32(106).string(t.name),t.temperature!==void 0&&e.uint32(113).double(t.temperature),t.supportsReasoning!==void 0&&e.uint32(120).bool(t.supportsReasoning),t.apiFormat!==void 0&&e.uint32(128).int32(t.apiFormat),t.supportsTools!==void 0&&e.uint32(136).bool(t.supportsTools),t.supportsAdaptiveThinking!==void 0&&e.uint32(144).bool(t.supportsAdaptiveThinking),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=sLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.maxTokens=OA(r.int64());continue}case 2:{if(o!==16)break;a.contextWindow=OA(r.int64());continue}case 3:{if(o!==24)break;a.supportsImages=r.bool();continue}case 4:{if(o!==32)break;a.supportsPromptCache=r.bool();continue}case 5:{if(o!==41)break;a.inputPrice=r.double();continue}case 6:{if(o!==49)break;a.outputPrice=r.double();continue}case 7:{if(o!==57)break;a.cacheWritesPrice=r.double();continue}case 8:{if(o!==65)break;a.cacheReadsPrice=r.double();continue}case 9:{if(o!==74)break;a.description=r.string();continue}case 10:{if(o!==82)break;a.thinkingConfig=If.decode(r,r.uint32());continue}case 11:{if(o!==88)break;a.supportsGlobalEndpoint=r.bool();continue}case 12:{if(o!==98)break;a.tiers.push(Ay.decode(r,r.uint32()));continue}case 13:{if(o!==106)break;a.name=r.string();continue}case 14:{if(o!==113)break;a.temperature=r.double();continue}case 15:{if(o!==120)break;a.supportsReasoning=r.bool();continue}case 16:{if(o!==128)break;a.apiFormat=r.int32();continue}case 17:{if(o!==136)break;a.supportsTools=r.bool();continue}case 18:{if(o!==144)break;a.supportsAdaptiveThinking=r.bool();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{maxTokens:rt(t.maxTokens)?globalThis.Number(t.maxTokens):rt(t.max_tokens)?globalThis.Number(t.max_tokens):void 0,contextWindow:rt(t.contextWindow)?globalThis.Number(t.contextWindow):rt(t.context_window)?globalThis.Number(t.context_window):void 0,supportsImages:rt(t.supportsImages)?globalThis.Boolean(t.supportsImages):rt(t.supports_images)?globalThis.Boolean(t.supports_images):void 0,supportsPromptCache:rt(t.supportsPromptCache)?globalThis.Boolean(t.supportsPromptCache):rt(t.supports_prompt_cache)?globalThis.Boolean(t.supports_prompt_cache):!1,inputPrice:rt(t.inputPrice)?globalThis.Number(t.inputPrice):rt(t.input_price)?globalThis.Number(t.input_price):void 0,outputPrice:rt(t.outputPrice)?globalThis.Number(t.outputPrice):rt(t.output_price)?globalThis.Number(t.output_price):void 0,cacheWritesPrice:rt(t.cacheWritesPrice)?globalThis.Number(t.cacheWritesPrice):rt(t.cache_writes_price)?globalThis.Number(t.cache_writes_price):void 0,cacheReadsPrice:rt(t.cacheReadsPrice)?globalThis.Number(t.cacheReadsPrice):rt(t.cache_reads_price)?globalThis.Number(t.cache_reads_price):void 0,description:rt(t.description)?globalThis.String(t.description):void 0,thinkingConfig:rt(t.thinkingConfig)?If.fromJSON(t.thinkingConfig):rt(t.thinking_config)?If.fromJSON(t.thinking_config):void 0,supportsGlobalEndpoint:rt(t.supportsGlobalEndpoint)?globalThis.Boolean(t.supportsGlobalEndpoint):rt(t.supports_global_endpoint)?globalThis.Boolean(t.supports_global_endpoint):void 0,tiers:globalThis.Array.isArray(t?.tiers)?t.tiers.map(e=>Ay.fromJSON(e)):[],name:rt(t.name)?globalThis.String(t.name):void 0,temperature:rt(t.temperature)?globalThis.Number(t.temperature):void 0,supportsReasoning:rt(t.supportsReasoning)?globalThis.Boolean(t.supportsReasoning):rt(t.supports_reasoning)?globalThis.Boolean(t.supports_reasoning):void 0,apiFormat:rt(t.apiFormat)?d7(t.apiFormat):rt(t.api_format)?d7(t.api_format):void 0,supportsTools:rt(t.supportsTools)?globalThis.Boolean(t.supportsTools):rt(t.supports_tools)?globalThis.Boolean(t.supports_tools):void 0,supportsAdaptiveThinking:rt(t.supportsAdaptiveThinking)?globalThis.Boolean(t.supportsAdaptiveThinking):rt(t.supports_adaptive_thinking)?globalThis.Boolean(t.supports_adaptive_thinking):void 0}},toJSON(t){let e={};return t.maxTokens!==void 0&&(e.maxTokens=Math.round(t.maxTokens)),t.contextWindow!==void 0&&(e.contextWindow=Math.round(t.contextWindow)),t.supportsImages!==void 0&&(e.supportsImages=t.supportsImages),t.supportsPromptCache!==!1&&(e.supportsPromptCache=t.supportsPromptCache),t.inputPrice!==void 0&&(e.inputPrice=t.inputPrice),t.outputPrice!==void 0&&(e.outputPrice=t.outputPrice),t.cacheWritesPrice!==void 0&&(e.cacheWritesPrice=t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&(e.cacheReadsPrice=t.cacheReadsPrice),t.description!==void 0&&(e.description=t.description),t.thinkingConfig!==void 0&&(e.thinkingConfig=If.toJSON(t.thinkingConfig)),t.supportsGlobalEndpoint!==void 0&&(e.supportsGlobalEndpoint=t.supportsGlobalEndpoint),t.tiers?.length&&(e.tiers=t.tiers.map(r=>Ay.toJSON(r))),t.name!==void 0&&(e.name=t.name),t.temperature!==void 0&&(e.temperature=t.temperature),t.supportsReasoning!==void 0&&(e.supportsReasoning=t.supportsReasoning),t.apiFormat!==void 0&&(e.apiFormat=vee(t.apiFormat)),t.supportsTools!==void 0&&(e.supportsTools=t.supportsTools),t.supportsAdaptiveThinking!==void 0&&(e.supportsAdaptiveThinking=t.supportsAdaptiveThinking),e},create(t){return Zt.fromPartial(t??{})},fromPartial(t){let e=sLn();return e.maxTokens=t.maxTokens??void 0,e.contextWindow=t.contextWindow??void 0,e.supportsImages=t.supportsImages??void 0,e.supportsPromptCache=t.supportsPromptCache??!1,e.inputPrice=t.inputPrice??void 0,e.outputPrice=t.outputPrice??void 0,e.cacheWritesPrice=t.cacheWritesPrice??void 0,e.cacheReadsPrice=t.cacheReadsPrice??void 0,e.description=t.description??void 0,e.thinkingConfig=t.thinkingConfig!==void 0&&t.thinkingConfig!==null?If.fromPartial(t.thinkingConfig):void 0,e.supportsGlobalEndpoint=t.supportsGlobalEndpoint??void 0,e.tiers=t.tiers?.map(r=>Ay.fromPartial(r))||[],e.name=t.name??void 0,e.temperature=t.temperature??void 0,e.supportsReasoning=t.supportsReasoning??void 0,e.apiFormat=t.apiFormat??void 0,e.supportsTools=t.supportsTools??void 0,e.supportsAdaptiveThinking=t.supportsAdaptiveThinking??void 0,e}};lp={encode(t,e=new dr){return globalThis.Object.entries(t.models).forEach(([r,i])=>{Uet.encode({key:r,value:i},e.uint32(10).fork()).join()}),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=uLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;let n=Uet.decode(r,r.uint32());n.value!==void 0&&(a.models[n.key]=n.value);continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{models:Bhe(t.models)?globalThis.Object.entries(t.models).reduce((e,[r,i])=>(e[r]=Zt.fromJSON(i),e),{}):{}}},toJSON(t){let e={};if(t.models){let r=globalThis.Object.entries(t.models);r.length>0&&(e.models={},r.forEach(([i,a])=>{e.models[i]=Zt.toJSON(a)}))}return e},create(t){return lp.fromPartial(t??{})},fromPartial(t){let e=uLn();return e.models=globalThis.Object.entries(t.models??{}).reduce((r,[i,a])=>(a!==void 0&&(r[i]=Zt.fromPartial(a)),r),{}),e}};Uet={encode(t,e=new dr){return t.key!==""&&e.uint32(10).string(t.key),t.value!==void 0&&Zt.encode(t.value,e.uint32(18).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=cLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.key=r.string();continue}case 2:{if(o!==18)break;a.value=Zt.decode(r,r.uint32());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{key:rt(t.key)?globalThis.String(t.key):"",value:rt(t.value)?Zt.fromJSON(t.value):void 0}},toJSON(t){let e={};return t.key!==""&&(e.key=t.key),t.value!==void 0&&(e.value=Zt.toJSON(t.value)),e},create(t){return Uet.fromPartial(t??{})},fromPartial(t){let e=cLn();return e.key=t.key??"",e.value=t.value!==void 0&&t.value!==null?Zt.fromPartial(t.value):void 0,e}};orr={encode(t,e=new dr){return t.metadata!==void 0&&Rr.encode(t.metadata,e.uint32(10).fork()).join(),t.baseUrl!==""&&e.uint32(18).string(t.baseUrl),t.apiKey!==""&&e.uint32(26).string(t.apiKey),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=lLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.metadata=Rr.decode(r,r.uint32());continue}case 2:{if(o!==18)break;a.baseUrl=r.string();continue}case 3:{if(o!==26)break;a.apiKey=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{metadata:rt(t.metadata)?Rr.fromJSON(t.metadata):void 0,baseUrl:rt(t.baseUrl)?globalThis.String(t.baseUrl):rt(t.base_url)?globalThis.String(t.base_url):"",apiKey:rt(t.apiKey)?globalThis.String(t.apiKey):rt(t.api_key)?globalThis.String(t.api_key):""}},toJSON(t){let e={};return t.metadata!==void 0&&(e.metadata=Rr.toJSON(t.metadata)),t.baseUrl!==""&&(e.baseUrl=t.baseUrl),t.apiKey!==""&&(e.apiKey=t.apiKey),e},create(t){return orr.fromPartial(t??{})},fromPartial(t){let e=lLn();return e.metadata=t.metadata!==void 0&&t.metadata!==null?Rr.fromPartial(t.metadata):void 0,e.baseUrl=t.baseUrl??"",e.apiKey=t.apiKey??"",e}};Eee={encode(t,e=new dr){return t.apiKey!==void 0&&e.uint32(10).string(t.apiKey),t.diracApiKey!==void 0&&e.uint32(18).string(t.diracApiKey),t.liteLlmApiKey!==void 0&&e.uint32(26).string(t.liteLlmApiKey),t.openRouterApiKey!==void 0&&e.uint32(34).string(t.openRouterApiKey),t.awsAccessKey!==void 0&&e.uint32(42).string(t.awsAccessKey),t.awsSecretKey!==void 0&&e.uint32(50).string(t.awsSecretKey),t.awsSessionToken!==void 0&&e.uint32(58).string(t.awsSessionToken),t.awsBedrockApiKey!==void 0&&e.uint32(66).string(t.awsBedrockApiKey),t.openAiApiKey!==void 0&&e.uint32(74).string(t.openAiApiKey),t.geminiApiKey!==void 0&&e.uint32(90).string(t.geminiApiKey),t.openAiNativeApiKey!==void 0&&e.uint32(98).string(t.openAiNativeApiKey),t.deepSeekApiKey!==void 0&&e.uint32(106).string(t.deepSeekApiKey),t.requestyApiKey!==void 0&&e.uint32(114).string(t.requestyApiKey),t.togetherApiKey!==void 0&&e.uint32(122).string(t.togetherApiKey),t.fireworksApiKey!==void 0&&e.uint32(130).string(t.fireworksApiKey),t.qwenApiKey!==void 0&&e.uint32(138).string(t.qwenApiKey),t.doubaoApiKey!==void 0&&e.uint32(146).string(t.doubaoApiKey),t.mistralApiKey!==void 0&&e.uint32(154).string(t.mistralApiKey),t.nebiusApiKey!==void 0&&e.uint32(162).string(t.nebiusApiKey),t.xaiApiKey!==void 0&&e.uint32(178).string(t.xaiApiKey),t.sambanovaApiKey!==void 0&&e.uint32(186).string(t.sambanovaApiKey),t.cerebrasApiKey!==void 0&&e.uint32(194).string(t.cerebrasApiKey),t.moonshotApiKey!==void 0&&e.uint32(218).string(t.moonshotApiKey),t.diracAccountId!==void 0&&e.uint32(226).string(t.diracAccountId),t.groqApiKey!==void 0&&e.uint32(234).string(t.groqApiKey),t.huggingFaceApiKey!==void 0&&e.uint32(242).string(t.huggingFaceApiKey),t.huaweiCloudMaasApiKey!==void 0&&e.uint32(250).string(t.huaweiCloudMaasApiKey),t.basetenApiKey!==void 0&&e.uint32(258).string(t.basetenApiKey),t.zaiApiKey!==void 0&&e.uint32(266).string(t.zaiApiKey),t.vercelAiGatewayApiKey!==void 0&&e.uint32(274).string(t.vercelAiGatewayApiKey),t.difyApiKey!==void 0&&e.uint32(282).string(t.difyApiKey),t.minimaxApiKey!==void 0&&e.uint32(306).string(t.minimaxApiKey),t.aihubmixApiKey!==void 0&&e.uint32(314).string(t.aihubmixApiKey),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=dLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.apiKey=r.string();continue}case 2:{if(o!==18)break;a.diracApiKey=r.string();continue}case 3:{if(o!==26)break;a.liteLlmApiKey=r.string();continue}case 4:{if(o!==34)break;a.openRouterApiKey=r.string();continue}case 5:{if(o!==42)break;a.awsAccessKey=r.string();continue}case 6:{if(o!==50)break;a.awsSecretKey=r.string();continue}case 7:{if(o!==58)break;a.awsSessionToken=r.string();continue}case 8:{if(o!==66)break;a.awsBedrockApiKey=r.string();continue}case 9:{if(o!==74)break;a.openAiApiKey=r.string();continue}case 11:{if(o!==90)break;a.geminiApiKey=r.string();continue}case 12:{if(o!==98)break;a.openAiNativeApiKey=r.string();continue}case 13:{if(o!==106)break;a.deepSeekApiKey=r.string();continue}case 14:{if(o!==114)break;a.requestyApiKey=r.string();continue}case 15:{if(o!==122)break;a.togetherApiKey=r.string();continue}case 16:{if(o!==130)break;a.fireworksApiKey=r.string();continue}case 17:{if(o!==138)break;a.qwenApiKey=r.string();continue}case 18:{if(o!==146)break;a.doubaoApiKey=r.string();continue}case 19:{if(o!==154)break;a.mistralApiKey=r.string();continue}case 20:{if(o!==162)break;a.nebiusApiKey=r.string();continue}case 22:{if(o!==178)break;a.xaiApiKey=r.string();continue}case 23:{if(o!==186)break;a.sambanovaApiKey=r.string();continue}case 24:{if(o!==194)break;a.cerebrasApiKey=r.string();continue}case 27:{if(o!==218)break;a.moonshotApiKey=r.string();continue}case 28:{if(o!==226)break;a.diracAccountId=r.string();continue}case 29:{if(o!==234)break;a.groqApiKey=r.string();continue}case 30:{if(o!==242)break;a.huggingFaceApiKey=r.string();continue}case 31:{if(o!==250)break;a.huaweiCloudMaasApiKey=r.string();continue}case 32:{if(o!==258)break;a.basetenApiKey=r.string();continue}case 33:{if(o!==266)break;a.zaiApiKey=r.string();continue}case 34:{if(o!==274)break;a.vercelAiGatewayApiKey=r.string();continue}case 35:{if(o!==282)break;a.difyApiKey=r.string();continue}case 38:{if(o!==306)break;a.minimaxApiKey=r.string();continue}case 39:{if(o!==314)break;a.aihubmixApiKey=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{apiKey:rt(t.apiKey)?globalThis.String(t.apiKey):rt(t.api_key)?globalThis.String(t.api_key):void 0,diracApiKey:rt(t.diracApiKey)?globalThis.String(t.diracApiKey):rt(t.dirac_api_key)?globalThis.String(t.dirac_api_key):void 0,liteLlmApiKey:rt(t.liteLlmApiKey)?globalThis.String(t.liteLlmApiKey):rt(t.lite_llm_api_key)?globalThis.String(t.lite_llm_api_key):void 0,openRouterApiKey:rt(t.openRouterApiKey)?globalThis.String(t.openRouterApiKey):rt(t.open_router_api_key)?globalThis.String(t.open_router_api_key):void 0,awsAccessKey:rt(t.awsAccessKey)?globalThis.String(t.awsAccessKey):rt(t.aws_access_key)?globalThis.String(t.aws_access_key):void 0,awsSecretKey:rt(t.awsSecretKey)?globalThis.String(t.awsSecretKey):rt(t.aws_secret_key)?globalThis.String(t.aws_secret_key):void 0,awsSessionToken:rt(t.awsSessionToken)?globalThis.String(t.awsSessionToken):rt(t.aws_session_token)?globalThis.String(t.aws_session_token):void 0,awsBedrockApiKey:rt(t.awsBedrockApiKey)?globalThis.String(t.awsBedrockApiKey):rt(t.aws_bedrock_api_key)?globalThis.String(t.aws_bedrock_api_key):void 0,openAiApiKey:rt(t.openAiApiKey)?globalThis.String(t.openAiApiKey):rt(t.open_ai_api_key)?globalThis.String(t.open_ai_api_key):void 0,geminiApiKey:rt(t.geminiApiKey)?globalThis.String(t.geminiApiKey):rt(t.gemini_api_key)?globalThis.String(t.gemini_api_key):void 0,openAiNativeApiKey:rt(t.openAiNativeApiKey)?globalThis.String(t.openAiNativeApiKey):rt(t.open_ai_native_api_key)?globalThis.String(t.open_ai_native_api_key):void 0,deepSeekApiKey:rt(t.deepSeekApiKey)?globalThis.String(t.deepSeekApiKey):rt(t.deep_seek_api_key)?globalThis.String(t.deep_seek_api_key):void 0,requestyApiKey:rt(t.requestyApiKey)?globalThis.String(t.requestyApiKey):rt(t.requesty_api_key)?globalThis.String(t.requesty_api_key):void 0,togetherApiKey:rt(t.togetherApiKey)?globalThis.String(t.togetherApiKey):rt(t.together_api_key)?globalThis.String(t.together_api_key):void 0,fireworksApiKey:rt(t.fireworksApiKey)?globalThis.String(t.fireworksApiKey):rt(t.fireworks_api_key)?globalThis.String(t.fireworks_api_key):void 0,qwenApiKey:rt(t.qwenApiKey)?globalThis.String(t.qwenApiKey):rt(t.qwen_api_key)?globalThis.String(t.qwen_api_key):void 0,doubaoApiKey:rt(t.doubaoApiKey)?globalThis.String(t.doubaoApiKey):rt(t.doubao_api_key)?globalThis.String(t.doubao_api_key):void 0,mistralApiKey:rt(t.mistralApiKey)?globalThis.String(t.mistralApiKey):rt(t.mistral_api_key)?globalThis.String(t.mistral_api_key):void 0,nebiusApiKey:rt(t.nebiusApiKey)?globalThis.String(t.nebiusApiKey):rt(t.nebius_api_key)?globalThis.String(t.nebius_api_key):void 0,xaiApiKey:rt(t.xaiApiKey)?globalThis.String(t.xaiApiKey):rt(t.xai_api_key)?globalThis.String(t.xai_api_key):void 0,sambanovaApiKey:rt(t.sambanovaApiKey)?globalThis.String(t.sambanovaApiKey):rt(t.sambanova_api_key)?globalThis.String(t.sambanova_api_key):void 0,cerebrasApiKey:rt(t.cerebrasApiKey)?globalThis.String(t.cerebrasApiKey):rt(t.cerebras_api_key)?globalThis.String(t.cerebras_api_key):void 0,moonshotApiKey:rt(t.moonshotApiKey)?globalThis.String(t.moonshotApiKey):rt(t.moonshot_api_key)?globalThis.String(t.moonshot_api_key):void 0,diracAccountId:rt(t.diracAccountId)?globalThis.String(t.diracAccountId):rt(t.dirac_account_id)?globalThis.String(t.dirac_account_id):void 0,groqApiKey:rt(t.groqApiKey)?globalThis.String(t.groqApiKey):rt(t.groq_api_key)?globalThis.String(t.groq_api_key):void 0,huggingFaceApiKey:rt(t.huggingFaceApiKey)?globalThis.String(t.huggingFaceApiKey):rt(t.hugging_face_api_key)?globalThis.String(t.hugging_face_api_key):void 0,huaweiCloudMaasApiKey:rt(t.huaweiCloudMaasApiKey)?globalThis.String(t.huaweiCloudMaasApiKey):rt(t.huawei_cloud_maas_api_key)?globalThis.String(t.huawei_cloud_maas_api_key):void 0,basetenApiKey:rt(t.basetenApiKey)?globalThis.String(t.basetenApiKey):rt(t.baseten_api_key)?globalThis.String(t.baseten_api_key):void 0,zaiApiKey:rt(t.zaiApiKey)?globalThis.String(t.zaiApiKey):rt(t.zai_api_key)?globalThis.String(t.zai_api_key):void 0,vercelAiGatewayApiKey:rt(t.vercelAiGatewayApiKey)?globalThis.String(t.vercelAiGatewayApiKey):rt(t.vercel_ai_gateway_api_key)?globalThis.String(t.vercel_ai_gateway_api_key):void 0,difyApiKey:rt(t.difyApiKey)?globalThis.String(t.difyApiKey):rt(t.dify_api_key)?globalThis.String(t.dify_api_key):void 0,minimaxApiKey:rt(t.minimaxApiKey)?globalThis.String(t.minimaxApiKey):rt(t.minimax_api_key)?globalThis.String(t.minimax_api_key):void 0,aihubmixApiKey:rt(t.aihubmixApiKey)?globalThis.String(t.aihubmixApiKey):rt(t.aihubmix_api_key)?globalThis.String(t.aihubmix_api_key):void 0}},toJSON(t){let e={};return t.apiKey!==void 0&&(e.apiKey=t.apiKey),t.diracApiKey!==void 0&&(e.diracApiKey=t.diracApiKey),t.liteLlmApiKey!==void 0&&(e.liteLlmApiKey=t.liteLlmApiKey),t.openRouterApiKey!==void 0&&(e.openRouterApiKey=t.openRouterApiKey),t.awsAccessKey!==void 0&&(e.awsAccessKey=t.awsAccessKey),t.awsSecretKey!==void 0&&(e.awsSecretKey=t.awsSecretKey),t.awsSessionToken!==void 0&&(e.awsSessionToken=t.awsSessionToken),t.awsBedrockApiKey!==void 0&&(e.awsBedrockApiKey=t.awsBedrockApiKey),t.openAiApiKey!==void 0&&(e.openAiApiKey=t.openAiApiKey),t.geminiApiKey!==void 0&&(e.geminiApiKey=t.geminiApiKey),t.openAiNativeApiKey!==void 0&&(e.openAiNativeApiKey=t.openAiNativeApiKey),t.deepSeekApiKey!==void 0&&(e.deepSeekApiKey=t.deepSeekApiKey),t.requestyApiKey!==void 0&&(e.requestyApiKey=t.requestyApiKey),t.togetherApiKey!==void 0&&(e.togetherApiKey=t.togetherApiKey),t.fireworksApiKey!==void 0&&(e.fireworksApiKey=t.fireworksApiKey),t.qwenApiKey!==void 0&&(e.qwenApiKey=t.qwenApiKey),t.doubaoApiKey!==void 0&&(e.doubaoApiKey=t.doubaoApiKey),t.mistralApiKey!==void 0&&(e.mistralApiKey=t.mistralApiKey),t.nebiusApiKey!==void 0&&(e.nebiusApiKey=t.nebiusApiKey),t.xaiApiKey!==void 0&&(e.xaiApiKey=t.xaiApiKey),t.sambanovaApiKey!==void 0&&(e.sambanovaApiKey=t.sambanovaApiKey),t.cerebrasApiKey!==void 0&&(e.cerebrasApiKey=t.cerebrasApiKey),t.moonshotApiKey!==void 0&&(e.moonshotApiKey=t.moonshotApiKey),t.diracAccountId!==void 0&&(e.diracAccountId=t.diracAccountId),t.groqApiKey!==void 0&&(e.groqApiKey=t.groqApiKey),t.huggingFaceApiKey!==void 0&&(e.huggingFaceApiKey=t.huggingFaceApiKey),t.huaweiCloudMaasApiKey!==void 0&&(e.huaweiCloudMaasApiKey=t.huaweiCloudMaasApiKey),t.basetenApiKey!==void 0&&(e.basetenApiKey=t.basetenApiKey),t.zaiApiKey!==void 0&&(e.zaiApiKey=t.zaiApiKey),t.vercelAiGatewayApiKey!==void 0&&(e.vercelAiGatewayApiKey=t.vercelAiGatewayApiKey),t.difyApiKey!==void 0&&(e.difyApiKey=t.difyApiKey),t.minimaxApiKey!==void 0&&(e.minimaxApiKey=t.minimaxApiKey),t.aihubmixApiKey!==void 0&&(e.aihubmixApiKey=t.aihubmixApiKey),e},create(t){return Eee.fromPartial(t??{})},fromPartial(t){let e=dLn();return e.apiKey=t.apiKey??void 0,e.diracApiKey=t.diracApiKey??void 0,e.liteLlmApiKey=t.liteLlmApiKey??void 0,e.openRouterApiKey=t.openRouterApiKey??void 0,e.awsAccessKey=t.awsAccessKey??void 0,e.awsSecretKey=t.awsSecretKey??void 0,e.awsSessionToken=t.awsSessionToken??void 0,e.awsBedrockApiKey=t.awsBedrockApiKey??void 0,e.openAiApiKey=t.openAiApiKey??void 0,e.geminiApiKey=t.geminiApiKey??void 0,e.openAiNativeApiKey=t.openAiNativeApiKey??void 0,e.deepSeekApiKey=t.deepSeekApiKey??void 0,e.requestyApiKey=t.requestyApiKey??void 0,e.togetherApiKey=t.togetherApiKey??void 0,e.fireworksApiKey=t.fireworksApiKey??void 0,e.qwenApiKey=t.qwenApiKey??void 0,e.doubaoApiKey=t.doubaoApiKey??void 0,e.mistralApiKey=t.mistralApiKey??void 0,e.nebiusApiKey=t.nebiusApiKey??void 0,e.xaiApiKey=t.xaiApiKey??void 0,e.sambanovaApiKey=t.sambanovaApiKey??void 0,e.cerebrasApiKey=t.cerebrasApiKey??void 0,e.moonshotApiKey=t.moonshotApiKey??void 0,e.diracAccountId=t.diracAccountId??void 0,e.groqApiKey=t.groqApiKey??void 0,e.huggingFaceApiKey=t.huggingFaceApiKey??void 0,e.huaweiCloudMaasApiKey=t.huaweiCloudMaasApiKey??void 0,e.basetenApiKey=t.basetenApiKey??void 0,e.zaiApiKey=t.zaiApiKey??void 0,e.vercelAiGatewayApiKey=t.vercelAiGatewayApiKey??void 0,e.difyApiKey=t.difyApiKey??void 0,e.minimaxApiKey=t.minimaxApiKey??void 0,e.aihubmixApiKey=t.aihubmixApiKey??void 0,e}};yee={encode(t,e=new dr){return t.ulid!==void 0&&e.uint32(10).string(t.ulid),t.liteLlmBaseUrl!==void 0&&e.uint32(18).string(t.liteLlmBaseUrl),t.liteLlmUsePromptCache!==void 0&&e.uint32(24).bool(t.liteLlmUsePromptCache),globalThis.Object.entries(t.openAiHeaders).forEach(([r,i])=>{Get.encode({key:r,value:i},e.uint32(34).fork()).join()}),t.anthropicBaseUrl!==void 0&&e.uint32(42).string(t.anthropicBaseUrl),t.openRouterProviderSorting!==void 0&&e.uint32(50).string(t.openRouterProviderSorting),t.awsRegion!==void 0&&e.uint32(58).string(t.awsRegion),t.awsUseCrossRegionInference!==void 0&&e.uint32(64).bool(t.awsUseCrossRegionInference),t.awsBedrockUsePromptCache!==void 0&&e.uint32(72).bool(t.awsBedrockUsePromptCache),t.awsUseProfile!==void 0&&e.uint32(80).bool(t.awsUseProfile),t.awsProfile!==void 0&&e.uint32(90).string(t.awsProfile),t.awsBedrockEndpoint!==void 0&&e.uint32(98).string(t.awsBedrockEndpoint),t.claudeCodePath!==void 0&&e.uint32(106).string(t.claudeCodePath),t.vertexProjectId!==void 0&&e.uint32(114).string(t.vertexProjectId),t.vertexRegion!==void 0&&e.uint32(122).string(t.vertexRegion),t.openAiBaseUrl!==void 0&&e.uint32(130).string(t.openAiBaseUrl),t.lmStudioBaseUrl!==void 0&&e.uint32(154).string(t.lmStudioBaseUrl),t.geminiBaseUrl!==void 0&&e.uint32(162).string(t.geminiBaseUrl),t.requestyBaseUrl!==void 0&&e.uint32(170).string(t.requestyBaseUrl),t.fireworksModelMaxCompletionTokens!==void 0&&e.uint32(176).int64(t.fireworksModelMaxCompletionTokens),t.fireworksModelMaxTokens!==void 0&&e.uint32(184).int64(t.fireworksModelMaxTokens),t.azureApiVersion!==void 0&&e.uint32(194).string(t.azureApiVersion),t.qwenApiLine!==void 0&&e.uint32(202).string(t.qwenApiLine),t.requestTimeoutMs!==void 0&&e.uint32(216).int64(t.requestTimeoutMs),t.moonshotApiLine!==void 0&&e.uint32(258).string(t.moonshotApiLine),t.awsAuthentication!==void 0&&e.uint32(266).string(t.awsAuthentication),t.zaiApiLine!==void 0&&e.uint32(274).string(t.zaiApiLine),t.lmStudioMaxTokens!==void 0&&e.uint32(282).string(t.lmStudioMaxTokens),t.qwenCodeOauthPath!==void 0&&e.uint32(290).string(t.qwenCodeOauthPath),t.difyBaseUrl!==void 0&&e.uint32(298).string(t.difyBaseUrl),t.awsUseGlobalInference!==void 0&&e.uint32(320).bool(t.awsUseGlobalInference),t.minimaxApiLine!==void 0&&e.uint32(330).string(t.minimaxApiLine),t.aihubmixBaseUrl!==void 0&&e.uint32(338).string(t.aihubmixBaseUrl),t.aihubmixAppCode!==void 0&&e.uint32(346).string(t.aihubmixAppCode),t.azureIdentity!==void 0&&e.uint32(352).bool(t.azureIdentity),t.planModeApiProvider!==void 0&&e.uint32(800).int32(t.planModeApiProvider),t.planModeApiModelId!==void 0&&e.uint32(810).string(t.planModeApiModelId),t.planModeThinkingBudgetTokens!==void 0&&e.uint32(816).int64(t.planModeThinkingBudgetTokens),t.planModeReasoningEffort!==void 0&&e.uint32(826).string(t.planModeReasoningEffort),t.planModeVsCodeLmModelSelector!==void 0&&js.encode(t.planModeVsCodeLmModelSelector,e.uint32(834).fork()).join(),t.planModeAwsBedrockCustomSelected!==void 0&&e.uint32(840).bool(t.planModeAwsBedrockCustomSelected),t.planModeAwsBedrockCustomModelBaseId!==void 0&&e.uint32(850).string(t.planModeAwsBedrockCustomModelBaseId),t.planModeOpenRouterModelId!==void 0&&e.uint32(858).string(t.planModeOpenRouterModelId),t.planModeOpenRouterModelInfo!==void 0&&Zt.encode(t.planModeOpenRouterModelInfo,e.uint32(866).fork()).join(),t.planModeOpenAiModelId!==void 0&&e.uint32(874).string(t.planModeOpenAiModelId),t.planModeOpenAiModelInfo!==void 0&&pa.encode(t.planModeOpenAiModelInfo,e.uint32(882).fork()).join(),t.planModeLmStudioModelId!==void 0&&e.uint32(898).string(t.planModeLmStudioModelId),t.planModeLiteLlmModelId!==void 0&&e.uint32(906).string(t.planModeLiteLlmModelId),t.planModeLiteLlmModelInfo!==void 0&&Nu.encode(t.planModeLiteLlmModelInfo,e.uint32(914).fork()).join(),t.planModeRequestyModelId!==void 0&&e.uint32(922).string(t.planModeRequestyModelId),t.planModeRequestyModelInfo!==void 0&&Zt.encode(t.planModeRequestyModelInfo,e.uint32(930).fork()).join(),t.planModeTogetherModelId!==void 0&&e.uint32(938).string(t.planModeTogetherModelId),t.planModeFireworksModelId!==void 0&&e.uint32(946).string(t.planModeFireworksModelId),t.planModeGroqModelId!==void 0&&e.uint32(970).string(t.planModeGroqModelId),t.planModeGroqModelInfo!==void 0&&Zt.encode(t.planModeGroqModelInfo,e.uint32(978).fork()).join(),t.planModeHuggingFaceModelId!==void 0&&e.uint32(986).string(t.planModeHuggingFaceModelId),t.planModeHuggingFaceModelInfo!==void 0&&Zt.encode(t.planModeHuggingFaceModelInfo,e.uint32(994).fork()).join(),t.planModeHuaweiCloudMaasModelId!==void 0&&e.uint32(1002).string(t.planModeHuaweiCloudMaasModelId),t.planModeHuaweiCloudMaasModelInfo!==void 0&&Zt.encode(t.planModeHuaweiCloudMaasModelInfo,e.uint32(1010).fork()).join(),t.planModeBasetenModelId!==void 0&&e.uint32(1018).string(t.planModeBasetenModelId),t.planModeBasetenModelInfo!==void 0&&Zt.encode(t.planModeBasetenModelInfo,e.uint32(1026).fork()).join(),t.planModeVercelAiGatewayModelId!==void 0&&e.uint32(1034).string(t.planModeVercelAiGatewayModelId),t.planModeVercelAiGatewayModelInfo!==void 0&&Zt.encode(t.planModeVercelAiGatewayModelInfo,e.uint32(1042).fork()).join(),t.planModeAihubmixModelId!==void 0&&e.uint32(1066).string(t.planModeAihubmixModelId),t.planModeAihubmixModelInfo!==void 0&&pa.encode(t.planModeAihubmixModelInfo,e.uint32(1074).fork()).join(),t.planModeDiracModelId!==void 0&&e.uint32(1082).string(t.planModeDiracModelId),t.planModeDiracModelInfo!==void 0&&Zt.encode(t.planModeDiracModelInfo,e.uint32(1090).fork()).join(),t.actModeApiProvider!==void 0&&e.uint32(1600).int32(t.actModeApiProvider),t.actModeApiModelId!==void 0&&e.uint32(1610).string(t.actModeApiModelId),t.actModeThinkingBudgetTokens!==void 0&&e.uint32(1616).int64(t.actModeThinkingBudgetTokens),t.actModeReasoningEffort!==void 0&&e.uint32(1626).string(t.actModeReasoningEffort),t.actModeVsCodeLmModelSelector!==void 0&&js.encode(t.actModeVsCodeLmModelSelector,e.uint32(1634).fork()).join(),t.actModeAwsBedrockCustomSelected!==void 0&&e.uint32(1640).bool(t.actModeAwsBedrockCustomSelected),t.actModeAwsBedrockCustomModelBaseId!==void 0&&e.uint32(1650).string(t.actModeAwsBedrockCustomModelBaseId),t.actModeOpenRouterModelId!==void 0&&e.uint32(1658).string(t.actModeOpenRouterModelId),t.actModeOpenRouterModelInfo!==void 0&&Zt.encode(t.actModeOpenRouterModelInfo,e.uint32(1666).fork()).join(),t.actModeOpenAiModelId!==void 0&&e.uint32(1674).string(t.actModeOpenAiModelId),t.actModeOpenAiModelInfo!==void 0&&pa.encode(t.actModeOpenAiModelInfo,e.uint32(1682).fork()).join(),t.actModeLmStudioModelId!==void 0&&e.uint32(1698).string(t.actModeLmStudioModelId),t.actModeLiteLlmModelId!==void 0&&e.uint32(1706).string(t.actModeLiteLlmModelId),t.actModeLiteLlmModelInfo!==void 0&&Nu.encode(t.actModeLiteLlmModelInfo,e.uint32(1714).fork()).join(),t.actModeRequestyModelId!==void 0&&e.uint32(1722).string(t.actModeRequestyModelId),t.actModeRequestyModelInfo!==void 0&&Zt.encode(t.actModeRequestyModelInfo,e.uint32(1730).fork()).join(),t.actModeTogetherModelId!==void 0&&e.uint32(1738).string(t.actModeTogetherModelId),t.actModeFireworksModelId!==void 0&&e.uint32(1746).string(t.actModeFireworksModelId),t.actModeGroqModelId!==void 0&&e.uint32(1770).string(t.actModeGroqModelId),t.actModeGroqModelInfo!==void 0&&Zt.encode(t.actModeGroqModelInfo,e.uint32(1778).fork()).join(),t.actModeHuggingFaceModelId!==void 0&&e.uint32(1786).string(t.actModeHuggingFaceModelId),t.actModeHuggingFaceModelInfo!==void 0&&Zt.encode(t.actModeHuggingFaceModelInfo,e.uint32(1794).fork()).join(),t.actModeHuaweiCloudMaasModelId!==void 0&&e.uint32(1802).string(t.actModeHuaweiCloudMaasModelId),t.actModeHuaweiCloudMaasModelInfo!==void 0&&Zt.encode(t.actModeHuaweiCloudMaasModelInfo,e.uint32(1810).fork()).join(),t.actModeBasetenModelId!==void 0&&e.uint32(1818).string(t.actModeBasetenModelId),t.actModeBasetenModelInfo!==void 0&&Zt.encode(t.actModeBasetenModelInfo,e.uint32(1826).fork()).join(),t.actModeVercelAiGatewayModelId!==void 0&&e.uint32(1834).string(t.actModeVercelAiGatewayModelId),t.actModeVercelAiGatewayModelInfo!==void 0&&Zt.encode(t.actModeVercelAiGatewayModelInfo,e.uint32(1842).fork()).join(),t.actModeAihubmixModelId!==void 0&&e.uint32(1866).string(t.actModeAihubmixModelId),t.actModeAihubmixModelInfo!==void 0&&pa.encode(t.actModeAihubmixModelInfo,e.uint32(1874).fork()).join(),t.actModeDiracModelId!==void 0&&e.uint32(1882).string(t.actModeDiracModelId),t.actModeDiracModelInfo!==void 0&&Zt.encode(t.actModeDiracModelInfo,e.uint32(1890).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=fLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.ulid=r.string();continue}case 2:{if(o!==18)break;a.liteLlmBaseUrl=r.string();continue}case 3:{if(o!==24)break;a.liteLlmUsePromptCache=r.bool();continue}case 4:{if(o!==34)break;let n=Get.decode(r,r.uint32());n.value!==void 0&&(a.openAiHeaders[n.key]=n.value);continue}case 5:{if(o!==42)break;a.anthropicBaseUrl=r.string();continue}case 6:{if(o!==50)break;a.openRouterProviderSorting=r.string();continue}case 7:{if(o!==58)break;a.awsRegion=r.string();continue}case 8:{if(o!==64)break;a.awsUseCrossRegionInference=r.bool();continue}case 9:{if(o!==72)break;a.awsBedrockUsePromptCache=r.bool();continue}case 10:{if(o!==80)break;a.awsUseProfile=r.bool();continue}case 11:{if(o!==90)break;a.awsProfile=r.string();continue}case 12:{if(o!==98)break;a.awsBedrockEndpoint=r.string();continue}case 13:{if(o!==106)break;a.claudeCodePath=r.string();continue}case 14:{if(o!==114)break;a.vertexProjectId=r.string();continue}case 15:{if(o!==122)break;a.vertexRegion=r.string();continue}case 16:{if(o!==130)break;a.openAiBaseUrl=r.string();continue}case 19:{if(o!==154)break;a.lmStudioBaseUrl=r.string();continue}case 20:{if(o!==162)break;a.geminiBaseUrl=r.string();continue}case 21:{if(o!==170)break;a.requestyBaseUrl=r.string();continue}case 22:{if(o!==176)break;a.fireworksModelMaxCompletionTokens=OA(r.int64());continue}case 23:{if(o!==184)break;a.fireworksModelMaxTokens=OA(r.int64());continue}case 24:{if(o!==194)break;a.azureApiVersion=r.string();continue}case 25:{if(o!==202)break;a.qwenApiLine=r.string();continue}case 27:{if(o!==216)break;a.requestTimeoutMs=OA(r.int64());continue}case 32:{if(o!==258)break;a.moonshotApiLine=r.string();continue}case 33:{if(o!==266)break;a.awsAuthentication=r.string();continue}case 34:{if(o!==274)break;a.zaiApiLine=r.string();continue}case 35:{if(o!==282)break;a.lmStudioMaxTokens=r.string();continue}case 36:{if(o!==290)break;a.qwenCodeOauthPath=r.string();continue}case 37:{if(o!==298)break;a.difyBaseUrl=r.string();continue}case 40:{if(o!==320)break;a.awsUseGlobalInference=r.bool();continue}case 41:{if(o!==330)break;a.minimaxApiLine=r.string();continue}case 42:{if(o!==338)break;a.aihubmixBaseUrl=r.string();continue}case 43:{if(o!==346)break;a.aihubmixAppCode=r.string();continue}case 44:{if(o!==352)break;a.azureIdentity=r.bool();continue}case 100:{if(o!==800)break;a.planModeApiProvider=r.int32();continue}case 101:{if(o!==810)break;a.planModeApiModelId=r.string();continue}case 102:{if(o!==816)break;a.planModeThinkingBudgetTokens=OA(r.int64());continue}case 103:{if(o!==826)break;a.planModeReasoningEffort=r.string();continue}case 104:{if(o!==834)break;a.planModeVsCodeLmModelSelector=js.decode(r,r.uint32());continue}case 105:{if(o!==840)break;a.planModeAwsBedrockCustomSelected=r.bool();continue}case 106:{if(o!==850)break;a.planModeAwsBedrockCustomModelBaseId=r.string();continue}case 107:{if(o!==858)break;a.planModeOpenRouterModelId=r.string();continue}case 108:{if(o!==866)break;a.planModeOpenRouterModelInfo=Zt.decode(r,r.uint32());continue}case 109:{if(o!==874)break;a.planModeOpenAiModelId=r.string();continue}case 110:{if(o!==882)break;a.planModeOpenAiModelInfo=pa.decode(r,r.uint32());continue}case 112:{if(o!==898)break;a.planModeLmStudioModelId=r.string();continue}case 113:{if(o!==906)break;a.planModeLiteLlmModelId=r.string();continue}case 114:{if(o!==914)break;a.planModeLiteLlmModelInfo=Nu.decode(r,r.uint32());continue}case 115:{if(o!==922)break;a.planModeRequestyModelId=r.string();continue}case 116:{if(o!==930)break;a.planModeRequestyModelInfo=Zt.decode(r,r.uint32());continue}case 117:{if(o!==938)break;a.planModeTogetherModelId=r.string();continue}case 118:{if(o!==946)break;a.planModeFireworksModelId=r.string();continue}case 121:{if(o!==970)break;a.planModeGroqModelId=r.string();continue}case 122:{if(o!==978)break;a.planModeGroqModelInfo=Zt.decode(r,r.uint32());continue}case 123:{if(o!==986)break;a.planModeHuggingFaceModelId=r.string();continue}case 124:{if(o!==994)break;a.planModeHuggingFaceModelInfo=Zt.decode(r,r.uint32());continue}case 125:{if(o!==1002)break;a.planModeHuaweiCloudMaasModelId=r.string();continue}case 126:{if(o!==1010)break;a.planModeHuaweiCloudMaasModelInfo=Zt.decode(r,r.uint32());continue}case 127:{if(o!==1018)break;a.planModeBasetenModelId=r.string();continue}case 128:{if(o!==1026)break;a.planModeBasetenModelInfo=Zt.decode(r,r.uint32());continue}case 129:{if(o!==1034)break;a.planModeVercelAiGatewayModelId=r.string();continue}case 130:{if(o!==1042)break;a.planModeVercelAiGatewayModelInfo=Zt.decode(r,r.uint32());continue}case 133:{if(o!==1066)break;a.planModeAihubmixModelId=r.string();continue}case 134:{if(o!==1074)break;a.planModeAihubmixModelInfo=pa.decode(r,r.uint32());continue}case 135:{if(o!==1082)break;a.planModeDiracModelId=r.string();continue}case 136:{if(o!==1090)break;a.planModeDiracModelInfo=Zt.decode(r,r.uint32());continue}case 200:{if(o!==1600)break;a.actModeApiProvider=r.int32();continue}case 201:{if(o!==1610)break;a.actModeApiModelId=r.string();continue}case 202:{if(o!==1616)break;a.actModeThinkingBudgetTokens=OA(r.int64());continue}case 203:{if(o!==1626)break;a.actModeReasoningEffort=r.string();continue}case 204:{if(o!==1634)break;a.actModeVsCodeLmModelSelector=js.decode(r,r.uint32());continue}case 205:{if(o!==1640)break;a.actModeAwsBedrockCustomSelected=r.bool();continue}case 206:{if(o!==1650)break;a.actModeAwsBedrockCustomModelBaseId=r.string();continue}case 207:{if(o!==1658)break;a.actModeOpenRouterModelId=r.string();continue}case 208:{if(o!==1666)break;a.actModeOpenRouterModelInfo=Zt.decode(r,r.uint32());continue}case 209:{if(o!==1674)break;a.actModeOpenAiModelId=r.string();continue}case 210:{if(o!==1682)break;a.actModeOpenAiModelInfo=pa.decode(r,r.uint32());continue}case 212:{if(o!==1698)break;a.actModeLmStudioModelId=r.string();continue}case 213:{if(o!==1706)break;a.actModeLiteLlmModelId=r.string();continue}case 214:{if(o!==1714)break;a.actModeLiteLlmModelInfo=Nu.decode(r,r.uint32());continue}case 215:{if(o!==1722)break;a.actModeRequestyModelId=r.string();continue}case 216:{if(o!==1730)break;a.actModeRequestyModelInfo=Zt.decode(r,r.uint32());continue}case 217:{if(o!==1738)break;a.actModeTogetherModelId=r.string();continue}case 218:{if(o!==1746)break;a.actModeFireworksModelId=r.string();continue}case 221:{if(o!==1770)break;a.actModeGroqModelId=r.string();continue}case 222:{if(o!==1778)break;a.actModeGroqModelInfo=Zt.decode(r,r.uint32());continue}case 223:{if(o!==1786)break;a.actModeHuggingFaceModelId=r.string();continue}case 224:{if(o!==1794)break;a.actModeHuggingFaceModelInfo=Zt.decode(r,r.uint32());continue}case 225:{if(o!==1802)break;a.actModeHuaweiCloudMaasModelId=r.string();continue}case 226:{if(o!==1810)break;a.actModeHuaweiCloudMaasModelInfo=Zt.decode(r,r.uint32());continue}case 227:{if(o!==1818)break;a.actModeBasetenModelId=r.string();continue}case 228:{if(o!==1826)break;a.actModeBasetenModelInfo=Zt.decode(r,r.uint32());continue}case 229:{if(o!==1834)break;a.actModeVercelAiGatewayModelId=r.string();continue}case 230:{if(o!==1842)break;a.actModeVercelAiGatewayModelInfo=Zt.decode(r,r.uint32());continue}case 233:{if(o!==1866)break;a.actModeAihubmixModelId=r.string();continue}case 234:{if(o!==1874)break;a.actModeAihubmixModelInfo=pa.decode(r,r.uint32());continue}case 235:{if(o!==1882)break;a.actModeDiracModelId=r.string();continue}case 236:{if(o!==1890)break;a.actModeDiracModelInfo=Zt.decode(r,r.uint32());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{ulid:rt(t.ulid)?globalThis.String(t.ulid):void 0,liteLlmBaseUrl:rt(t.liteLlmBaseUrl)?globalThis.String(t.liteLlmBaseUrl):rt(t.lite_llm_base_url)?globalThis.String(t.lite_llm_base_url):void 0,liteLlmUsePromptCache:rt(t.liteLlmUsePromptCache)?globalThis.Boolean(t.liteLlmUsePromptCache):rt(t.lite_llm_use_prompt_cache)?globalThis.Boolean(t.lite_llm_use_prompt_cache):void 0,openAiHeaders:Bhe(t.openAiHeaders)?globalThis.Object.entries(t.openAiHeaders).reduce((e,[r,i])=>(e[r]=globalThis.String(i),e),{}):Bhe(t.open_ai_headers)?globalThis.Object.entries(t.open_ai_headers).reduce((e,[r,i])=>(e[r]=globalThis.String(i),e),{}):{},anthropicBaseUrl:rt(t.anthropicBaseUrl)?globalThis.String(t.anthropicBaseUrl):rt(t.anthropic_base_url)?globalThis.String(t.anthropic_base_url):void 0,openRouterProviderSorting:rt(t.openRouterProviderSorting)?globalThis.String(t.openRouterProviderSorting):rt(t.open_router_provider_sorting)?globalThis.String(t.open_router_provider_sorting):void 0,awsRegion:rt(t.awsRegion)?globalThis.String(t.awsRegion):rt(t.aws_region)?globalThis.String(t.aws_region):void 0,awsUseCrossRegionInference:rt(t.awsUseCrossRegionInference)?globalThis.Boolean(t.awsUseCrossRegionInference):rt(t.aws_use_cross_region_inference)?globalThis.Boolean(t.aws_use_cross_region_inference):void 0,awsBedrockUsePromptCache:rt(t.awsBedrockUsePromptCache)?globalThis.Boolean(t.awsBedrockUsePromptCache):rt(t.aws_bedrock_use_prompt_cache)?globalThis.Boolean(t.aws_bedrock_use_prompt_cache):void 0,awsUseProfile:rt(t.awsUseProfile)?globalThis.Boolean(t.awsUseProfile):rt(t.aws_use_profile)?globalThis.Boolean(t.aws_use_profile):void 0,awsProfile:rt(t.awsProfile)?globalThis.String(t.awsProfile):rt(t.aws_profile)?globalThis.String(t.aws_profile):void 0,awsBedrockEndpoint:rt(t.awsBedrockEndpoint)?globalThis.String(t.awsBedrockEndpoint):rt(t.aws_bedrock_endpoint)?globalThis.String(t.aws_bedrock_endpoint):void 0,claudeCodePath:rt(t.claudeCodePath)?globalThis.String(t.claudeCodePath):rt(t.claude_code_path)?globalThis.String(t.claude_code_path):void 0,vertexProjectId:rt(t.vertexProjectId)?globalThis.String(t.vertexProjectId):rt(t.vertex_project_id)?globalThis.String(t.vertex_project_id):void 0,vertexRegion:rt(t.vertexRegion)?globalThis.String(t.vertexRegion):rt(t.vertex_region)?globalThis.String(t.vertex_region):void 0,openAiBaseUrl:rt(t.openAiBaseUrl)?globalThis.String(t.openAiBaseUrl):rt(t.open_ai_base_url)?globalThis.String(t.open_ai_base_url):void 0,lmStudioBaseUrl:rt(t.lmStudioBaseUrl)?globalThis.String(t.lmStudioBaseUrl):rt(t.lm_studio_base_url)?globalThis.String(t.lm_studio_base_url):void 0,geminiBaseUrl:rt(t.geminiBaseUrl)?globalThis.String(t.geminiBaseUrl):rt(t.gemini_base_url)?globalThis.String(t.gemini_base_url):void 0,requestyBaseUrl:rt(t.requestyBaseUrl)?globalThis.String(t.requestyBaseUrl):rt(t.requesty_base_url)?globalThis.String(t.requesty_base_url):void 0,fireworksModelMaxCompletionTokens:rt(t.fireworksModelMaxCompletionTokens)?globalThis.Number(t.fireworksModelMaxCompletionTokens):rt(t.fireworks_model_max_completion_tokens)?globalThis.Number(t.fireworks_model_max_completion_tokens):void 0,fireworksModelMaxTokens:rt(t.fireworksModelMaxTokens)?globalThis.Number(t.fireworksModelMaxTokens):rt(t.fireworks_model_max_tokens)?globalThis.Number(t.fireworks_model_max_tokens):void 0,azureApiVersion:rt(t.azureApiVersion)?globalThis.String(t.azureApiVersion):rt(t.azure_api_version)?globalThis.String(t.azure_api_version):void 0,qwenApiLine:rt(t.qwenApiLine)?globalThis.String(t.qwenApiLine):rt(t.qwen_api_line)?globalThis.String(t.qwen_api_line):void 0,requestTimeoutMs:rt(t.requestTimeoutMs)?globalThis.Number(t.requestTimeoutMs):rt(t.request_timeout_ms)?globalThis.Number(t.request_timeout_ms):void 0,moonshotApiLine:rt(t.moonshotApiLine)?globalThis.String(t.moonshotApiLine):rt(t.moonshot_api_line)?globalThis.String(t.moonshot_api_line):void 0,awsAuthentication:rt(t.awsAuthentication)?globalThis.String(t.awsAuthentication):rt(t.aws_authentication)?globalThis.String(t.aws_authentication):void 0,zaiApiLine:rt(t.zaiApiLine)?globalThis.String(t.zaiApiLine):rt(t.zai_api_line)?globalThis.String(t.zai_api_line):void 0,lmStudioMaxTokens:rt(t.lmStudioMaxTokens)?globalThis.String(t.lmStudioMaxTokens):rt(t.lm_studio_max_tokens)?globalThis.String(t.lm_studio_max_tokens):void 0,qwenCodeOauthPath:rt(t.qwenCodeOauthPath)?globalThis.String(t.qwenCodeOauthPath):rt(t.qwen_code_oauth_path)?globalThis.String(t.qwen_code_oauth_path):void 0,difyBaseUrl:rt(t.difyBaseUrl)?globalThis.String(t.difyBaseUrl):rt(t.dify_base_url)?globalThis.String(t.dify_base_url):void 0,awsUseGlobalInference:rt(t.awsUseGlobalInference)?globalThis.Boolean(t.awsUseGlobalInference):rt(t.aws_use_global_inference)?globalThis.Boolean(t.aws_use_global_inference):void 0,minimaxApiLine:rt(t.minimaxApiLine)?globalThis.String(t.minimaxApiLine):rt(t.minimax_api_line)?globalThis.String(t.minimax_api_line):void 0,aihubmixBaseUrl:rt(t.aihubmixBaseUrl)?globalThis.String(t.aihubmixBaseUrl):rt(t.aihubmix_base_url)?globalThis.String(t.aihubmix_base_url):void 0,aihubmixAppCode:rt(t.aihubmixAppCode)?globalThis.String(t.aihubmixAppCode):rt(t.aihubmix_app_code)?globalThis.String(t.aihubmix_app_code):void 0,azureIdentity:rt(t.azureIdentity)?globalThis.Boolean(t.azureIdentity):rt(t.azure_identity)?globalThis.Boolean(t.azure_identity):void 0,planModeApiProvider:rt(t.planModeApiProvider)?$x(t.planModeApiProvider):rt(t.plan_mode_api_provider)?$x(t.plan_mode_api_provider):void 0,planModeApiModelId:rt(t.planModeApiModelId)?globalThis.String(t.planModeApiModelId):rt(t.plan_mode_api_model_id)?globalThis.String(t.plan_mode_api_model_id):void 0,planModeThinkingBudgetTokens:rt(t.planModeThinkingBudgetTokens)?globalThis.Number(t.planModeThinkingBudgetTokens):rt(t.plan_mode_thinking_budget_tokens)?globalThis.Number(t.plan_mode_thinking_budget_tokens):void 0,planModeReasoningEffort:rt(t.planModeReasoningEffort)?globalThis.String(t.planModeReasoningEffort):rt(t.plan_mode_reasoning_effort)?globalThis.String(t.plan_mode_reasoning_effort):void 0,planModeVsCodeLmModelSelector:rt(t.planModeVsCodeLmModelSelector)?js.fromJSON(t.planModeVsCodeLmModelSelector):rt(t.plan_mode_vs_code_lm_model_selector)?js.fromJSON(t.plan_mode_vs_code_lm_model_selector):void 0,planModeAwsBedrockCustomSelected:rt(t.planModeAwsBedrockCustomSelected)?globalThis.Boolean(t.planModeAwsBedrockCustomSelected):rt(t.plan_mode_aws_bedrock_custom_selected)?globalThis.Boolean(t.plan_mode_aws_bedrock_custom_selected):void 0,planModeAwsBedrockCustomModelBaseId:rt(t.planModeAwsBedrockCustomModelBaseId)?globalThis.String(t.planModeAwsBedrockCustomModelBaseId):rt(t.plan_mode_aws_bedrock_custom_model_base_id)?globalThis.String(t.plan_mode_aws_bedrock_custom_model_base_id):void 0,planModeOpenRouterModelId:rt(t.planModeOpenRouterModelId)?globalThis.String(t.planModeOpenRouterModelId):rt(t.plan_mode_open_router_model_id)?globalThis.String(t.plan_mode_open_router_model_id):void 0,planModeOpenRouterModelInfo:rt(t.planModeOpenRouterModelInfo)?Zt.fromJSON(t.planModeOpenRouterModelInfo):rt(t.plan_mode_open_router_model_info)?Zt.fromJSON(t.plan_mode_open_router_model_info):void 0,planModeOpenAiModelId:rt(t.planModeOpenAiModelId)?globalThis.String(t.planModeOpenAiModelId):rt(t.plan_mode_open_ai_model_id)?globalThis.String(t.plan_mode_open_ai_model_id):void 0,planModeOpenAiModelInfo:rt(t.planModeOpenAiModelInfo)?pa.fromJSON(t.planModeOpenAiModelInfo):rt(t.plan_mode_open_ai_model_info)?pa.fromJSON(t.plan_mode_open_ai_model_info):void 0,planModeLmStudioModelId:rt(t.planModeLmStudioModelId)?globalThis.String(t.planModeLmStudioModelId):rt(t.plan_mode_lm_studio_model_id)?globalThis.String(t.plan_mode_lm_studio_model_id):void 0,planModeLiteLlmModelId:rt(t.planModeLiteLlmModelId)?globalThis.String(t.planModeLiteLlmModelId):rt(t.plan_mode_lite_llm_model_id)?globalThis.String(t.plan_mode_lite_llm_model_id):void 0,planModeLiteLlmModelInfo:rt(t.planModeLiteLlmModelInfo)?Nu.fromJSON(t.planModeLiteLlmModelInfo):rt(t.plan_mode_lite_llm_model_info)?Nu.fromJSON(t.plan_mode_lite_llm_model_info):void 0,planModeRequestyModelId:rt(t.planModeRequestyModelId)?globalThis.String(t.planModeRequestyModelId):rt(t.plan_mode_requesty_model_id)?globalThis.String(t.plan_mode_requesty_model_id):void 0,planModeRequestyModelInfo:rt(t.planModeRequestyModelInfo)?Zt.fromJSON(t.planModeRequestyModelInfo):rt(t.plan_mode_requesty_model_info)?Zt.fromJSON(t.plan_mode_requesty_model_info):void 0,planModeTogetherModelId:rt(t.planModeTogetherModelId)?globalThis.String(t.planModeTogetherModelId):rt(t.plan_mode_together_model_id)?globalThis.String(t.plan_mode_together_model_id):void 0,planModeFireworksModelId:rt(t.planModeFireworksModelId)?globalThis.String(t.planModeFireworksModelId):rt(t.plan_mode_fireworks_model_id)?globalThis.String(t.plan_mode_fireworks_model_id):void 0,planModeGroqModelId:rt(t.planModeGroqModelId)?globalThis.String(t.planModeGroqModelId):rt(t.plan_mode_groq_model_id)?globalThis.String(t.plan_mode_groq_model_id):void 0,planModeGroqModelInfo:rt(t.planModeGroqModelInfo)?Zt.fromJSON(t.planModeGroqModelInfo):rt(t.plan_mode_groq_model_info)?Zt.fromJSON(t.plan_mode_groq_model_info):void 0,planModeHuggingFaceModelId:rt(t.planModeHuggingFaceModelId)?globalThis.String(t.planModeHuggingFaceModelId):rt(t.plan_mode_hugging_face_model_id)?globalThis.String(t.plan_mode_hugging_face_model_id):void 0,planModeHuggingFaceModelInfo:rt(t.planModeHuggingFaceModelInfo)?Zt.fromJSON(t.planModeHuggingFaceModelInfo):rt(t.plan_mode_hugging_face_model_info)?Zt.fromJSON(t.plan_mode_hugging_face_model_info):void 0,planModeHuaweiCloudMaasModelId:rt(t.planModeHuaweiCloudMaasModelId)?globalThis.String(t.planModeHuaweiCloudMaasModelId):rt(t.plan_mode_huawei_cloud_maas_model_id)?globalThis.String(t.plan_mode_huawei_cloud_maas_model_id):void 0,planModeHuaweiCloudMaasModelInfo:rt(t.planModeHuaweiCloudMaasModelInfo)?Zt.fromJSON(t.planModeHuaweiCloudMaasModelInfo):rt(t.plan_mode_huawei_cloud_maas_model_info)?Zt.fromJSON(t.plan_mode_huawei_cloud_maas_model_info):void 0,planModeBasetenModelId:rt(t.planModeBasetenModelId)?globalThis.String(t.planModeBasetenModelId):rt(t.plan_mode_baseten_model_id)?globalThis.String(t.plan_mode_baseten_model_id):void 0,planModeBasetenModelInfo:rt(t.planModeBasetenModelInfo)?Zt.fromJSON(t.planModeBasetenModelInfo):rt(t.plan_mode_baseten_model_info)?Zt.fromJSON(t.plan_mode_baseten_model_info):void 0,planModeVercelAiGatewayModelId:rt(t.planModeVercelAiGatewayModelId)?globalThis.String(t.planModeVercelAiGatewayModelId):rt(t.plan_mode_vercel_ai_gateway_model_id)?globalThis.String(t.plan_mode_vercel_ai_gateway_model_id):void 0,planModeVercelAiGatewayModelInfo:rt(t.planModeVercelAiGatewayModelInfo)?Zt.fromJSON(t.planModeVercelAiGatewayModelInfo):rt(t.plan_mode_vercel_ai_gateway_model_info)?Zt.fromJSON(t.plan_mode_vercel_ai_gateway_model_info):void 0,planModeAihubmixModelId:rt(t.planModeAihubmixModelId)?globalThis.String(t.planModeAihubmixModelId):rt(t.plan_mode_aihubmix_model_id)?globalThis.String(t.plan_mode_aihubmix_model_id):void 0,planModeAihubmixModelInfo:rt(t.planModeAihubmixModelInfo)?pa.fromJSON(t.planModeAihubmixModelInfo):rt(t.plan_mode_aihubmix_model_info)?pa.fromJSON(t.plan_mode_aihubmix_model_info):void 0,planModeDiracModelId:rt(t.planModeDiracModelId)?globalThis.String(t.planModeDiracModelId):rt(t.plan_mode_dirac_model_id)?globalThis.String(t.plan_mode_dirac_model_id):void 0,planModeDiracModelInfo:rt(t.planModeDiracModelInfo)?Zt.fromJSON(t.planModeDiracModelInfo):rt(t.plan_mode_dirac_model_info)?Zt.fromJSON(t.plan_mode_dirac_model_info):void 0,actModeApiProvider:rt(t.actModeApiProvider)?$x(t.actModeApiProvider):rt(t.act_mode_api_provider)?$x(t.act_mode_api_provider):void 0,actModeApiModelId:rt(t.actModeApiModelId)?globalThis.String(t.actModeApiModelId):rt(t.act_mode_api_model_id)?globalThis.String(t.act_mode_api_model_id):void 0,actModeThinkingBudgetTokens:rt(t.actModeThinkingBudgetTokens)?globalThis.Number(t.actModeThinkingBudgetTokens):rt(t.act_mode_thinking_budget_tokens)?globalThis.Number(t.act_mode_thinking_budget_tokens):void 0,actModeReasoningEffort:rt(t.actModeReasoningEffort)?globalThis.String(t.actModeReasoningEffort):rt(t.act_mode_reasoning_effort)?globalThis.String(t.act_mode_reasoning_effort):void 0,actModeVsCodeLmModelSelector:rt(t.actModeVsCodeLmModelSelector)?js.fromJSON(t.actModeVsCodeLmModelSelector):rt(t.act_mode_vs_code_lm_model_selector)?js.fromJSON(t.act_mode_vs_code_lm_model_selector):void 0,actModeAwsBedrockCustomSelected:rt(t.actModeAwsBedrockCustomSelected)?globalThis.Boolean(t.actModeAwsBedrockCustomSelected):rt(t.act_mode_aws_bedrock_custom_selected)?globalThis.Boolean(t.act_mode_aws_bedrock_custom_selected):void 0,actModeAwsBedrockCustomModelBaseId:rt(t.actModeAwsBedrockCustomModelBaseId)?globalThis.String(t.actModeAwsBedrockCustomModelBaseId):rt(t.act_mode_aws_bedrock_custom_model_base_id)?globalThis.String(t.act_mode_aws_bedrock_custom_model_base_id):void 0,actModeOpenRouterModelId:rt(t.actModeOpenRouterModelId)?globalThis.String(t.actModeOpenRouterModelId):rt(t.act_mode_open_router_model_id)?globalThis.String(t.act_mode_open_router_model_id):void 0,actModeOpenRouterModelInfo:rt(t.actModeOpenRouterModelInfo)?Zt.fromJSON(t.actModeOpenRouterModelInfo):rt(t.act_mode_open_router_model_info)?Zt.fromJSON(t.act_mode_open_router_model_info):void 0,actModeOpenAiModelId:rt(t.actModeOpenAiModelId)?globalThis.String(t.actModeOpenAiModelId):rt(t.act_mode_open_ai_model_id)?globalThis.String(t.act_mode_open_ai_model_id):void 0,actModeOpenAiModelInfo:rt(t.actModeOpenAiModelInfo)?pa.fromJSON(t.actModeOpenAiModelInfo):rt(t.act_mode_open_ai_model_info)?pa.fromJSON(t.act_mode_open_ai_model_info):void 0,actModeLmStudioModelId:rt(t.actModeLmStudioModelId)?globalThis.String(t.actModeLmStudioModelId):rt(t.act_mode_lm_studio_model_id)?globalThis.String(t.act_mode_lm_studio_model_id):void 0,actModeLiteLlmModelId:rt(t.actModeLiteLlmModelId)?globalThis.String(t.actModeLiteLlmModelId):rt(t.act_mode_lite_llm_model_id)?globalThis.String(t.act_mode_lite_llm_model_id):void 0,actModeLiteLlmModelInfo:rt(t.actModeLiteLlmModelInfo)?Nu.fromJSON(t.actModeLiteLlmModelInfo):rt(t.act_mode_lite_llm_model_info)?Nu.fromJSON(t.act_mode_lite_llm_model_info):void 0,actModeRequestyModelId:rt(t.actModeRequestyModelId)?globalThis.String(t.actModeRequestyModelId):rt(t.act_mode_requesty_model_id)?globalThis.String(t.act_mode_requesty_model_id):void 0,actModeRequestyModelInfo:rt(t.actModeRequestyModelInfo)?Zt.fromJSON(t.actModeRequestyModelInfo):rt(t.act_mode_requesty_model_info)?Zt.fromJSON(t.act_mode_requesty_model_info):void 0,actModeTogetherModelId:rt(t.actModeTogetherModelId)?globalThis.String(t.actModeTogetherModelId):rt(t.act_mode_together_model_id)?globalThis.String(t.act_mode_together_model_id):void 0,actModeFireworksModelId:rt(t.actModeFireworksModelId)?globalThis.String(t.actModeFireworksModelId):rt(t.act_mode_fireworks_model_id)?globalThis.String(t.act_mode_fireworks_model_id):void 0,actModeGroqModelId:rt(t.actModeGroqModelId)?globalThis.String(t.actModeGroqModelId):rt(t.act_mode_groq_model_id)?globalThis.String(t.act_mode_groq_model_id):void 0,actModeGroqModelInfo:rt(t.actModeGroqModelInfo)?Zt.fromJSON(t.actModeGroqModelInfo):rt(t.act_mode_groq_model_info)?Zt.fromJSON(t.act_mode_groq_model_info):void 0,actModeHuggingFaceModelId:rt(t.actModeHuggingFaceModelId)?globalThis.String(t.actModeHuggingFaceModelId):rt(t.act_mode_hugging_face_model_id)?globalThis.String(t.act_mode_hugging_face_model_id):void 0,actModeHuggingFaceModelInfo:rt(t.actModeHuggingFaceModelInfo)?Zt.fromJSON(t.actModeHuggingFaceModelInfo):rt(t.act_mode_hugging_face_model_info)?Zt.fromJSON(t.act_mode_hugging_face_model_info):void 0,actModeHuaweiCloudMaasModelId:rt(t.actModeHuaweiCloudMaasModelId)?globalThis.String(t.actModeHuaweiCloudMaasModelId):rt(t.act_mode_huawei_cloud_maas_model_id)?globalThis.String(t.act_mode_huawei_cloud_maas_model_id):void 0,actModeHuaweiCloudMaasModelInfo:rt(t.actModeHuaweiCloudMaasModelInfo)?Zt.fromJSON(t.actModeHuaweiCloudMaasModelInfo):rt(t.act_mode_huawei_cloud_maas_model_info)?Zt.fromJSON(t.act_mode_huawei_cloud_maas_model_info):void 0,actModeBasetenModelId:rt(t.actModeBasetenModelId)?globalThis.String(t.actModeBasetenModelId):rt(t.act_mode_baseten_model_id)?globalThis.String(t.act_mode_baseten_model_id):void 0,actModeBasetenModelInfo:rt(t.actModeBasetenModelInfo)?Zt.fromJSON(t.actModeBasetenModelInfo):rt(t.act_mode_baseten_model_info)?Zt.fromJSON(t.act_mode_baseten_model_info):void 0,actModeVercelAiGatewayModelId:rt(t.actModeVercelAiGatewayModelId)?globalThis.String(t.actModeVercelAiGatewayModelId):rt(t.act_mode_vercel_ai_gateway_model_id)?globalThis.String(t.act_mode_vercel_ai_gateway_model_id):void 0,actModeVercelAiGatewayModelInfo:rt(t.actModeVercelAiGatewayModelInfo)?Zt.fromJSON(t.actModeVercelAiGatewayModelInfo):rt(t.act_mode_vercel_ai_gateway_model_info)?Zt.fromJSON(t.act_mode_vercel_ai_gateway_model_info):void 0,actModeAihubmixModelId:rt(t.actModeAihubmixModelId)?globalThis.String(t.actModeAihubmixModelId):rt(t.act_mode_aihubmix_model_id)?globalThis.String(t.act_mode_aihubmix_model_id):void 0,actModeAihubmixModelInfo:rt(t.actModeAihubmixModelInfo)?pa.fromJSON(t.actModeAihubmixModelInfo):rt(t.act_mode_aihubmix_model_info)?pa.fromJSON(t.act_mode_aihubmix_model_info):void 0,actModeDiracModelId:rt(t.actModeDiracModelId)?globalThis.String(t.actModeDiracModelId):rt(t.act_mode_dirac_model_id)?globalThis.String(t.act_mode_dirac_model_id):void 0,actModeDiracModelInfo:rt(t.actModeDiracModelInfo)?Zt.fromJSON(t.actModeDiracModelInfo):rt(t.act_mode_dirac_model_info)?Zt.fromJSON(t.act_mode_dirac_model_info):void 0}},toJSON(t){let e={};if(t.ulid!==void 0&&(e.ulid=t.ulid),t.liteLlmBaseUrl!==void 0&&(e.liteLlmBaseUrl=t.liteLlmBaseUrl),t.liteLlmUsePromptCache!==void 0&&(e.liteLlmUsePromptCache=t.liteLlmUsePromptCache),t.openAiHeaders){let r=globalThis.Object.entries(t.openAiHeaders);r.length>0&&(e.openAiHeaders={},r.forEach(([i,a])=>{e.openAiHeaders[i]=a}))}return t.anthropicBaseUrl!==void 0&&(e.anthropicBaseUrl=t.anthropicBaseUrl),t.openRouterProviderSorting!==void 0&&(e.openRouterProviderSorting=t.openRouterProviderSorting),t.awsRegion!==void 0&&(e.awsRegion=t.awsRegion),t.awsUseCrossRegionInference!==void 0&&(e.awsUseCrossRegionInference=t.awsUseCrossRegionInference),t.awsBedrockUsePromptCache!==void 0&&(e.awsBedrockUsePromptCache=t.awsBedrockUsePromptCache),t.awsUseProfile!==void 0&&(e.awsUseProfile=t.awsUseProfile),t.awsProfile!==void 0&&(e.awsProfile=t.awsProfile),t.awsBedrockEndpoint!==void 0&&(e.awsBedrockEndpoint=t.awsBedrockEndpoint),t.claudeCodePath!==void 0&&(e.claudeCodePath=t.claudeCodePath),t.vertexProjectId!==void 0&&(e.vertexProjectId=t.vertexProjectId),t.vertexRegion!==void 0&&(e.vertexRegion=t.vertexRegion),t.openAiBaseUrl!==void 0&&(e.openAiBaseUrl=t.openAiBaseUrl),t.lmStudioBaseUrl!==void 0&&(e.lmStudioBaseUrl=t.lmStudioBaseUrl),t.geminiBaseUrl!==void 0&&(e.geminiBaseUrl=t.geminiBaseUrl),t.requestyBaseUrl!==void 0&&(e.requestyBaseUrl=t.requestyBaseUrl),t.fireworksModelMaxCompletionTokens!==void 0&&(e.fireworksModelMaxCompletionTokens=Math.round(t.fireworksModelMaxCompletionTokens)),t.fireworksModelMaxTokens!==void 0&&(e.fireworksModelMaxTokens=Math.round(t.fireworksModelMaxTokens)),t.azureApiVersion!==void 0&&(e.azureApiVersion=t.azureApiVersion),t.qwenApiLine!==void 0&&(e.qwenApiLine=t.qwenApiLine),t.requestTimeoutMs!==void 0&&(e.requestTimeoutMs=Math.round(t.requestTimeoutMs)),t.moonshotApiLine!==void 0&&(e.moonshotApiLine=t.moonshotApiLine),t.awsAuthentication!==void 0&&(e.awsAuthentication=t.awsAuthentication),t.zaiApiLine!==void 0&&(e.zaiApiLine=t.zaiApiLine),t.lmStudioMaxTokens!==void 0&&(e.lmStudioMaxTokens=t.lmStudioMaxTokens),t.qwenCodeOauthPath!==void 0&&(e.qwenCodeOauthPath=t.qwenCodeOauthPath),t.difyBaseUrl!==void 0&&(e.difyBaseUrl=t.difyBaseUrl),t.awsUseGlobalInference!==void 0&&(e.awsUseGlobalInference=t.awsUseGlobalInference),t.minimaxApiLine!==void 0&&(e.minimaxApiLine=t.minimaxApiLine),t.aihubmixBaseUrl!==void 0&&(e.aihubmixBaseUrl=t.aihubmixBaseUrl),t.aihubmixAppCode!==void 0&&(e.aihubmixAppCode=t.aihubmixAppCode),t.azureIdentity!==void 0&&(e.azureIdentity=t.azureIdentity),t.planModeApiProvider!==void 0&&(e.planModeApiProvider=Hq(t.planModeApiProvider)),t.planModeApiModelId!==void 0&&(e.planModeApiModelId=t.planModeApiModelId),t.planModeThinkingBudgetTokens!==void 0&&(e.planModeThinkingBudgetTokens=Math.round(t.planModeThinkingBudgetTokens)),t.planModeReasoningEffort!==void 0&&(e.planModeReasoningEffort=t.planModeReasoningEffort),t.planModeVsCodeLmModelSelector!==void 0&&(e.planModeVsCodeLmModelSelector=js.toJSON(t.planModeVsCodeLmModelSelector)),t.planModeAwsBedrockCustomSelected!==void 0&&(e.planModeAwsBedrockCustomSelected=t.planModeAwsBedrockCustomSelected),t.planModeAwsBedrockCustomModelBaseId!==void 0&&(e.planModeAwsBedrockCustomModelBaseId=t.planModeAwsBedrockCustomModelBaseId),t.planModeOpenRouterModelId!==void 0&&(e.planModeOpenRouterModelId=t.planModeOpenRouterModelId),t.planModeOpenRouterModelInfo!==void 0&&(e.planModeOpenRouterModelInfo=Zt.toJSON(t.planModeOpenRouterModelInfo)),t.planModeOpenAiModelId!==void 0&&(e.planModeOpenAiModelId=t.planModeOpenAiModelId),t.planModeOpenAiModelInfo!==void 0&&(e.planModeOpenAiModelInfo=pa.toJSON(t.planModeOpenAiModelInfo)),t.planModeLmStudioModelId!==void 0&&(e.planModeLmStudioModelId=t.planModeLmStudioModelId),t.planModeLiteLlmModelId!==void 0&&(e.planModeLiteLlmModelId=t.planModeLiteLlmModelId),t.planModeLiteLlmModelInfo!==void 0&&(e.planModeLiteLlmModelInfo=Nu.toJSON(t.planModeLiteLlmModelInfo)),t.planModeRequestyModelId!==void 0&&(e.planModeRequestyModelId=t.planModeRequestyModelId),t.planModeRequestyModelInfo!==void 0&&(e.planModeRequestyModelInfo=Zt.toJSON(t.planModeRequestyModelInfo)),t.planModeTogetherModelId!==void 0&&(e.planModeTogetherModelId=t.planModeTogetherModelId),t.planModeFireworksModelId!==void 0&&(e.planModeFireworksModelId=t.planModeFireworksModelId),t.planModeGroqModelId!==void 0&&(e.planModeGroqModelId=t.planModeGroqModelId),t.planModeGroqModelInfo!==void 0&&(e.planModeGroqModelInfo=Zt.toJSON(t.planModeGroqModelInfo)),t.planModeHuggingFaceModelId!==void 0&&(e.planModeHuggingFaceModelId=t.planModeHuggingFaceModelId),t.planModeHuggingFaceModelInfo!==void 0&&(e.planModeHuggingFaceModelInfo=Zt.toJSON(t.planModeHuggingFaceModelInfo)),t.planModeHuaweiCloudMaasModelId!==void 0&&(e.planModeHuaweiCloudMaasModelId=t.planModeHuaweiCloudMaasModelId),t.planModeHuaweiCloudMaasModelInfo!==void 0&&(e.planModeHuaweiCloudMaasModelInfo=Zt.toJSON(t.planModeHuaweiCloudMaasModelInfo)),t.planModeBasetenModelId!==void 0&&(e.planModeBasetenModelId=t.planModeBasetenModelId),t.planModeBasetenModelInfo!==void 0&&(e.planModeBasetenModelInfo=Zt.toJSON(t.planModeBasetenModelInfo)),t.planModeVercelAiGatewayModelId!==void 0&&(e.planModeVercelAiGatewayModelId=t.planModeVercelAiGatewayModelId),t.planModeVercelAiGatewayModelInfo!==void 0&&(e.planModeVercelAiGatewayModelInfo=Zt.toJSON(t.planModeVercelAiGatewayModelInfo)),t.planModeAihubmixModelId!==void 0&&(e.planModeAihubmixModelId=t.planModeAihubmixModelId),t.planModeAihubmixModelInfo!==void 0&&(e.planModeAihubmixModelInfo=pa.toJSON(t.planModeAihubmixModelInfo)),t.planModeDiracModelId!==void 0&&(e.planModeDiracModelId=t.planModeDiracModelId),t.planModeDiracModelInfo!==void 0&&(e.planModeDiracModelInfo=Zt.toJSON(t.planModeDiracModelInfo)),t.actModeApiProvider!==void 0&&(e.actModeApiProvider=Hq(t.actModeApiProvider)),t.actModeApiModelId!==void 0&&(e.actModeApiModelId=t.actModeApiModelId),t.actModeThinkingBudgetTokens!==void 0&&(e.actModeThinkingBudgetTokens=Math.round(t.actModeThinkingBudgetTokens)),t.actModeReasoningEffort!==void 0&&(e.actModeReasoningEffort=t.actModeReasoningEffort),t.actModeVsCodeLmModelSelector!==void 0&&(e.actModeVsCodeLmModelSelector=js.toJSON(t.actModeVsCodeLmModelSelector)),t.actModeAwsBedrockCustomSelected!==void 0&&(e.actModeAwsBedrockCustomSelected=t.actModeAwsBedrockCustomSelected),t.actModeAwsBedrockCustomModelBaseId!==void 0&&(e.actModeAwsBedrockCustomModelBaseId=t.actModeAwsBedrockCustomModelBaseId),t.actModeOpenRouterModelId!==void 0&&(e.actModeOpenRouterModelId=t.actModeOpenRouterModelId),t.actModeOpenRouterModelInfo!==void 0&&(e.actModeOpenRouterModelInfo=Zt.toJSON(t.actModeOpenRouterModelInfo)),t.actModeOpenAiModelId!==void 0&&(e.actModeOpenAiModelId=t.actModeOpenAiModelId),t.actModeOpenAiModelInfo!==void 0&&(e.actModeOpenAiModelInfo=pa.toJSON(t.actModeOpenAiModelInfo)),t.actModeLmStudioModelId!==void 0&&(e.actModeLmStudioModelId=t.actModeLmStudioModelId),t.actModeLiteLlmModelId!==void 0&&(e.actModeLiteLlmModelId=t.actModeLiteLlmModelId),t.actModeLiteLlmModelInfo!==void 0&&(e.actModeLiteLlmModelInfo=Nu.toJSON(t.actModeLiteLlmModelInfo)),t.actModeRequestyModelId!==void 0&&(e.actModeRequestyModelId=t.actModeRequestyModelId),t.actModeRequestyModelInfo!==void 0&&(e.actModeRequestyModelInfo=Zt.toJSON(t.actModeRequestyModelInfo)),t.actModeTogetherModelId!==void 0&&(e.actModeTogetherModelId=t.actModeTogetherModelId),t.actModeFireworksModelId!==void 0&&(e.actModeFireworksModelId=t.actModeFireworksModelId),t.actModeGroqModelId!==void 0&&(e.actModeGroqModelId=t.actModeGroqModelId),t.actModeGroqModelInfo!==void 0&&(e.actModeGroqModelInfo=Zt.toJSON(t.actModeGroqModelInfo)),t.actModeHuggingFaceModelId!==void 0&&(e.actModeHuggingFaceModelId=t.actModeHuggingFaceModelId),t.actModeHuggingFaceModelInfo!==void 0&&(e.actModeHuggingFaceModelInfo=Zt.toJSON(t.actModeHuggingFaceModelInfo)),t.actModeHuaweiCloudMaasModelId!==void 0&&(e.actModeHuaweiCloudMaasModelId=t.actModeHuaweiCloudMaasModelId),t.actModeHuaweiCloudMaasModelInfo!==void 0&&(e.actModeHuaweiCloudMaasModelInfo=Zt.toJSON(t.actModeHuaweiCloudMaasModelInfo)),t.actModeBasetenModelId!==void 0&&(e.actModeBasetenModelId=t.actModeBasetenModelId),t.actModeBasetenModelInfo!==void 0&&(e.actModeBasetenModelInfo=Zt.toJSON(t.actModeBasetenModelInfo)),t.actModeVercelAiGatewayModelId!==void 0&&(e.actModeVercelAiGatewayModelId=t.actModeVercelAiGatewayModelId),t.actModeVercelAiGatewayModelInfo!==void 0&&(e.actModeVercelAiGatewayModelInfo=Zt.toJSON(t.actModeVercelAiGatewayModelInfo)),t.actModeAihubmixModelId!==void 0&&(e.actModeAihubmixModelId=t.actModeAihubmixModelId),t.actModeAihubmixModelInfo!==void 0&&(e.actModeAihubmixModelInfo=pa.toJSON(t.actModeAihubmixModelInfo)),t.actModeDiracModelId!==void 0&&(e.actModeDiracModelId=t.actModeDiracModelId),t.actModeDiracModelInfo!==void 0&&(e.actModeDiracModelInfo=Zt.toJSON(t.actModeDiracModelInfo)),e},create(t){return yee.fromPartial(t??{})},fromPartial(t){let e=fLn();return e.ulid=t.ulid??void 0,e.liteLlmBaseUrl=t.liteLlmBaseUrl??void 0,e.liteLlmUsePromptCache=t.liteLlmUsePromptCache??void 0,e.openAiHeaders=globalThis.Object.entries(t.openAiHeaders??{}).reduce((r,[i,a])=>(a!==void 0&&(r[i]=globalThis.String(a)),r),{}),e.anthropicBaseUrl=t.anthropicBaseUrl??void 0,e.openRouterProviderSorting=t.openRouterProviderSorting??void 0,e.awsRegion=t.awsRegion??void 0,e.awsUseCrossRegionInference=t.awsUseCrossRegionInference??void 0,e.awsBedrockUsePromptCache=t.awsBedrockUsePromptCache??void 0,e.awsUseProfile=t.awsUseProfile??void 0,e.awsProfile=t.awsProfile??void 0,e.awsBedrockEndpoint=t.awsBedrockEndpoint??void 0,e.claudeCodePath=t.claudeCodePath??void 0,e.vertexProjectId=t.vertexProjectId??void 0,e.vertexRegion=t.vertexRegion??void 0,e.openAiBaseUrl=t.openAiBaseUrl??void 0,e.lmStudioBaseUrl=t.lmStudioBaseUrl??void 0,e.geminiBaseUrl=t.geminiBaseUrl??void 0,e.requestyBaseUrl=t.requestyBaseUrl??void 0,e.fireworksModelMaxCompletionTokens=t.fireworksModelMaxCompletionTokens??void 0,e.fireworksModelMaxTokens=t.fireworksModelMaxTokens??void 0,e.azureApiVersion=t.azureApiVersion??void 0,e.qwenApiLine=t.qwenApiLine??void 0,e.requestTimeoutMs=t.requestTimeoutMs??void 0,e.moonshotApiLine=t.moonshotApiLine??void 0,e.awsAuthentication=t.awsAuthentication??void 0,e.zaiApiLine=t.zaiApiLine??void 0,e.lmStudioMaxTokens=t.lmStudioMaxTokens??void 0,e.qwenCodeOauthPath=t.qwenCodeOauthPath??void 0,e.difyBaseUrl=t.difyBaseUrl??void 0,e.awsUseGlobalInference=t.awsUseGlobalInference??void 0,e.minimaxApiLine=t.minimaxApiLine??void 0,e.aihubmixBaseUrl=t.aihubmixBaseUrl??void 0,e.aihubmixAppCode=t.aihubmixAppCode??void 0,e.azureIdentity=t.azureIdentity??void 0,e.planModeApiProvider=t.planModeApiProvider??void 0,e.planModeApiModelId=t.planModeApiModelId??void 0,e.planModeThinkingBudgetTokens=t.planModeThinkingBudgetTokens??void 0,e.planModeReasoningEffort=t.planModeReasoningEffort??void 0,e.planModeVsCodeLmModelSelector=t.planModeVsCodeLmModelSelector!==void 0&&t.planModeVsCodeLmModelSelector!==null?js.fromPartial(t.planModeVsCodeLmModelSelector):void 0,e.planModeAwsBedrockCustomSelected=t.planModeAwsBedrockCustomSelected??void 0,e.planModeAwsBedrockCustomModelBaseId=t.planModeAwsBedrockCustomModelBaseId??void 0,e.planModeOpenRouterModelId=t.planModeOpenRouterModelId??void 0,e.planModeOpenRouterModelInfo=t.planModeOpenRouterModelInfo!==void 0&&t.planModeOpenRouterModelInfo!==null?Zt.fromPartial(t.planModeOpenRouterModelInfo):void 0,e.planModeOpenAiModelId=t.planModeOpenAiModelId??void 0,e.planModeOpenAiModelInfo=t.planModeOpenAiModelInfo!==void 0&&t.planModeOpenAiModelInfo!==null?pa.fromPartial(t.planModeOpenAiModelInfo):void 0,e.planModeLmStudioModelId=t.planModeLmStudioModelId??void 0,e.planModeLiteLlmModelId=t.planModeLiteLlmModelId??void 0,e.planModeLiteLlmModelInfo=t.planModeLiteLlmModelInfo!==void 0&&t.planModeLiteLlmModelInfo!==null?Nu.fromPartial(t.planModeLiteLlmModelInfo):void 0,e.planModeRequestyModelId=t.planModeRequestyModelId??void 0,e.planModeRequestyModelInfo=t.planModeRequestyModelInfo!==void 0&&t.planModeRequestyModelInfo!==null?Zt.fromPartial(t.planModeRequestyModelInfo):void 0,e.planModeTogetherModelId=t.planModeTogetherModelId??void 0,e.planModeFireworksModelId=t.planModeFireworksModelId??void 0,e.planModeGroqModelId=t.planModeGroqModelId??void 0,e.planModeGroqModelInfo=t.planModeGroqModelInfo!==void 0&&t.planModeGroqModelInfo!==null?Zt.fromPartial(t.planModeGroqModelInfo):void 0,e.planModeHuggingFaceModelId=t.planModeHuggingFaceModelId??void 0,e.planModeHuggingFaceModelInfo=t.planModeHuggingFaceModelInfo!==void 0&&t.planModeHuggingFaceModelInfo!==null?Zt.fromPartial(t.planModeHuggingFaceModelInfo):void 0,e.planModeHuaweiCloudMaasModelId=t.planModeHuaweiCloudMaasModelId??void 0,e.planModeHuaweiCloudMaasModelInfo=t.planModeHuaweiCloudMaasModelInfo!==void 0&&t.planModeHuaweiCloudMaasModelInfo!==null?Zt.fromPartial(t.planModeHuaweiCloudMaasModelInfo):void 0,e.planModeBasetenModelId=t.planModeBasetenModelId??void 0,e.planModeBasetenModelInfo=t.planModeBasetenModelInfo!==void 0&&t.planModeBasetenModelInfo!==null?Zt.fromPartial(t.planModeBasetenModelInfo):void 0,e.planModeVercelAiGatewayModelId=t.planModeVercelAiGatewayModelId??void 0,e.planModeVercelAiGatewayModelInfo=t.planModeVercelAiGatewayModelInfo!==void 0&&t.planModeVercelAiGatewayModelInfo!==null?Zt.fromPartial(t.planModeVercelAiGatewayModelInfo):void 0,e.planModeAihubmixModelId=t.planModeAihubmixModelId??void 0,e.planModeAihubmixModelInfo=t.planModeAihubmixModelInfo!==void 0&&t.planModeAihubmixModelInfo!==null?pa.fromPartial(t.planModeAihubmixModelInfo):void 0,e.planModeDiracModelId=t.planModeDiracModelId??void 0,e.planModeDiracModelInfo=t.planModeDiracModelInfo!==void 0&&t.planModeDiracModelInfo!==null?Zt.fromPartial(t.planModeDiracModelInfo):void 0,e.actModeApiProvider=t.actModeApiProvider??void 0,e.actModeApiModelId=t.actModeApiModelId??void 0,e.actModeThinkingBudgetTokens=t.actModeThinkingBudgetTokens??void 0,e.actModeReasoningEffort=t.actModeReasoningEffort??void 0,e.actModeVsCodeLmModelSelector=t.actModeVsCodeLmModelSelector!==void 0&&t.actModeVsCodeLmModelSelector!==null?js.fromPartial(t.actModeVsCodeLmModelSelector):void 0,e.actModeAwsBedrockCustomSelected=t.actModeAwsBedrockCustomSelected??void 0,e.actModeAwsBedrockCustomModelBaseId=t.actModeAwsBedrockCustomModelBaseId??void 0,e.actModeOpenRouterModelId=t.actModeOpenRouterModelId??void 0,e.actModeOpenRouterModelInfo=t.actModeOpenRouterModelInfo!==void 0&&t.actModeOpenRouterModelInfo!==null?Zt.fromPartial(t.actModeOpenRouterModelInfo):void 0,e.actModeOpenAiModelId=t.actModeOpenAiModelId??void 0,e.actModeOpenAiModelInfo=t.actModeOpenAiModelInfo!==void 0&&t.actModeOpenAiModelInfo!==null?pa.fromPartial(t.actModeOpenAiModelInfo):void 0,e.actModeLmStudioModelId=t.actModeLmStudioModelId??void 0,e.actModeLiteLlmModelId=t.actModeLiteLlmModelId??void 0,e.actModeLiteLlmModelInfo=t.actModeLiteLlmModelInfo!==void 0&&t.actModeLiteLlmModelInfo!==null?Nu.fromPartial(t.actModeLiteLlmModelInfo):void 0,e.actModeRequestyModelId=t.actModeRequestyModelId??void 0,e.actModeRequestyModelInfo=t.actModeRequestyModelInfo!==void 0&&t.actModeRequestyModelInfo!==null?Zt.fromPartial(t.actModeRequestyModelInfo):void 0,e.actModeTogetherModelId=t.actModeTogetherModelId??void 0,e.actModeFireworksModelId=t.actModeFireworksModelId??void 0,e.actModeGroqModelId=t.actModeGroqModelId??void 0,e.actModeGroqModelInfo=t.actModeGroqModelInfo!==void 0&&t.actModeGroqModelInfo!==null?Zt.fromPartial(t.actModeGroqModelInfo):void 0,e.actModeHuggingFaceModelId=t.actModeHuggingFaceModelId??void 0,e.actModeHuggingFaceModelInfo=t.actModeHuggingFaceModelInfo!==void 0&&t.actModeHuggingFaceModelInfo!==null?Zt.fromPartial(t.actModeHuggingFaceModelInfo):void 0,e.actModeHuaweiCloudMaasModelId=t.actModeHuaweiCloudMaasModelId??void 0,e.actModeHuaweiCloudMaasModelInfo=t.actModeHuaweiCloudMaasModelInfo!==void 0&&t.actModeHuaweiCloudMaasModelInfo!==null?Zt.fromPartial(t.actModeHuaweiCloudMaasModelInfo):void 0,e.actModeBasetenModelId=t.actModeBasetenModelId??void 0,e.actModeBasetenModelInfo=t.actModeBasetenModelInfo!==void 0&&t.actModeBasetenModelInfo!==null?Zt.fromPartial(t.actModeBasetenModelInfo):void 0,e.actModeVercelAiGatewayModelId=t.actModeVercelAiGatewayModelId??void 0,e.actModeVercelAiGatewayModelInfo=t.actModeVercelAiGatewayModelInfo!==void 0&&t.actModeVercelAiGatewayModelInfo!==null?Zt.fromPartial(t.actModeVercelAiGatewayModelInfo):void 0,e.actModeAihubmixModelId=t.actModeAihubmixModelId??void 0,e.actModeAihubmixModelInfo=t.actModeAihubmixModelInfo!==void 0&&t.actModeAihubmixModelInfo!==null?pa.fromPartial(t.actModeAihubmixModelInfo):void 0,e.actModeDiracModelId=t.actModeDiracModelId??void 0,e.actModeDiracModelInfo=t.actModeDiracModelInfo!==void 0&&t.actModeDiracModelInfo!==null?Zt.fromPartial(t.actModeDiracModelInfo):void 0,e}};Get={encode(t,e=new dr){return t.key!==""&&e.uint32(10).string(t.key),t.value!==""&&e.uint32(18).string(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=hLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.key=r.string();continue}case 2:{if(o!==18)break;a.value=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{key:rt(t.key)?globalThis.String(t.key):"",value:rt(t.value)?globalThis.String(t.value):""}},toJSON(t){let e={};return t.key!==""&&(e.key=t.key),t.value!==""&&(e.value=t.value),e},create(t){return Get.fromPartial(t??{})},fromPartial(t){let e=hLn();return e.key=t.key??"",e.value=t.value??"",e}};srr={encode(t,e=new dr){return t.metadata!==void 0&&Rr.encode(t.metadata,e.uint32(10).fork()).join(),t.apiConfiguration!==void 0&&PA.encode(t.apiConfiguration,e.uint32(18).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=pLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.metadata=Rr.decode(r,r.uint32());continue}case 2:{if(o!==18)break;a.apiConfiguration=PA.decode(r,r.uint32());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{metadata:rt(t.metadata)?Rr.fromJSON(t.metadata):void 0,apiConfiguration:rt(t.apiConfiguration)?PA.fromJSON(t.apiConfiguration):rt(t.api_configuration)?PA.fromJSON(t.api_configuration):void 0}},toJSON(t){let e={};return t.metadata!==void 0&&(e.metadata=Rr.toJSON(t.metadata)),t.apiConfiguration!==void 0&&(e.apiConfiguration=PA.toJSON(t.apiConfiguration)),e},create(t){return srr.fromPartial(t??{})},fromPartial(t){let e=pLn();return e.metadata=t.metadata!==void 0&&t.metadata!==null?Rr.fromPartial(t.metadata):void 0,e.apiConfiguration=t.apiConfiguration!==void 0&&t.apiConfiguration!==null?PA.fromPartial(t.apiConfiguration):void 0,e}};Cee={encode(t,e=new dr){return t.options!==void 0&&yee.encode(t.options,e.uint32(10).fork()).join(),t.secrets!==void 0&&Eee.encode(t.secrets,e.uint32(18).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=ALn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.options=yee.decode(r,r.uint32());continue}case 2:{if(o!==18)break;a.secrets=Eee.decode(r,r.uint32());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{options:rt(t.options)?yee.fromJSON(t.options):void 0,secrets:rt(t.secrets)?Eee.fromJSON(t.secrets):void 0}},toJSON(t){let e={};return t.options!==void 0&&(e.options=yee.toJSON(t.options)),t.secrets!==void 0&&(e.secrets=Eee.toJSON(t.secrets)),e},create(t){return Cee.fromPartial(t??{})},fromPartial(t){let e=ALn();return e.options=t.options!==void 0&&t.options!==null?yee.fromPartial(t.options):void 0,e.secrets=t.secrets!==void 0&&t.secrets!==null?Eee.fromPartial(t.secrets):void 0,e}};urr={encode(t,e=new dr){t.metadata!==void 0&&Rr.encode(t.metadata,e.uint32(10).fork()).join(),t.updates!==void 0&&Cee.encode(t.updates,e.uint32(18).fork()).join();for(let r of t.updateMask)e.uint32(26).string(r);return e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=gLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.metadata=Rr.decode(r,r.uint32());continue}case 2:{if(o!==18)break;a.updates=Cee.decode(r,r.uint32());continue}case 3:{if(o!==26)break;a.updateMask.push(r.string());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{metadata:rt(t.metadata)?Rr.fromJSON(t.metadata):void 0,updates:rt(t.updates)?Cee.fromJSON(t.updates):void 0,updateMask:globalThis.Array.isArray(t?.updateMask)?t.updateMask.map(e=>globalThis.String(e)):globalThis.Array.isArray(t?.update_mask)?t.update_mask.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.metadata!==void 0&&(e.metadata=Rr.toJSON(t.metadata)),t.updates!==void 0&&(e.updates=Cee.toJSON(t.updates)),t.updateMask?.length&&(e.updateMask=t.updateMask),e},create(t){return urr.fromPartial(t??{})},fromPartial(t){let e=gLn();return e.metadata=t.metadata!==void 0&&t.metadata!==null?Rr.fromPartial(t.metadata):void 0,e.updates=t.updates!==void 0&&t.updates!==null?Cee.fromPartial(t.updates):void 0,e.updateMask=t.updateMask?.map(r=>r)||[],e}};crr={encode(t,e=new dr){return t.metadata!==void 0&&Rr.encode(t.metadata,e.uint32(10).fork()).join(),t.apiConfiguration!==void 0&&PA.encode(t.apiConfiguration,e.uint32(18).fork()).join(),t.updateMask!==void 0&&d3.encode(d3.wrap(t.updateMask),e.uint32(26).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=mLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.metadata=Rr.decode(r,r.uint32());continue}case 2:{if(o!==18)break;a.apiConfiguration=PA.decode(r,r.uint32());continue}case 3:{if(o!==26)break;a.updateMask=d3.unwrap(d3.decode(r,r.uint32()));continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{metadata:rt(t.metadata)?Rr.fromJSON(t.metadata):void 0,apiConfiguration:rt(t.apiConfiguration)?PA.fromJSON(t.apiConfiguration):rt(t.api_configuration)?PA.fromJSON(t.api_configuration):void 0,updateMask:rt(t.updateMask)?d3.unwrap(d3.fromJSON(t.updateMask)):rt(t.update_mask)?d3.unwrap(d3.fromJSON(t.update_mask)):void 0}},toJSON(t){let e={};return t.metadata!==void 0&&(e.metadata=Rr.toJSON(t.metadata)),t.apiConfiguration!==void 0&&(e.apiConfiguration=PA.toJSON(t.apiConfiguration)),t.updateMask!==void 0&&(e.updateMask=d3.toJSON(d3.wrap(t.updateMask))),e},create(t){return crr.fromPartial(t??{})},fromPartial(t){let e=mLn();return e.metadata=t.metadata!==void 0&&t.metadata!==null?Rr.fromPartial(t.metadata):void 0,e.apiConfiguration=t.apiConfiguration!==void 0&&t.apiConfiguration!==null?PA.fromPartial(t.apiConfiguration):void 0,e.updateMask=t.updateMask??void 0,e}};dP={encode(t,e=new dr){t.maxTokens!==void 0&&e.uint32(8).int64(t.maxTokens),t.contextWindow!==void 0&&e.uint32(16).int64(t.contextWindow),t.supportsImages!==void 0&&e.uint32(24).bool(t.supportsImages),t.supportsPromptCache!==!1&&e.uint32(32).bool(t.supportsPromptCache),t.inputPrice!==void 0&&e.uint32(41).double(t.inputPrice),t.outputPrice!==void 0&&e.uint32(49).double(t.outputPrice),t.thinkingConfig!==void 0&&If.encode(t.thinkingConfig,e.uint32(58).fork()).join(),t.cacheWritesPrice!==void 0&&e.uint32(73).double(t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&e.uint32(81).double(t.cacheReadsPrice),t.description!==void 0&&e.uint32(90).string(t.description),t.temperature!==void 0&&e.uint32(105).double(t.temperature),t.surveyContent!==void 0&&e.uint32(114).string(t.surveyContent),t.surveyId!==void 0&&e.uint32(122).string(t.surveyId),t.banner!==void 0&&e.uint32(130).string(t.banner),t.modelName!==""&&e.uint32(138).string(t.modelName),t.apiFormat!==void 0&&e.uint32(144).int32(t.apiFormat),t.supportsReasoning!==void 0&&e.uint32(152).bool(t.supportsReasoning);for(let r of t.reasoningEffortOptions)e.uint32(162).string(r);return t.supportsTools!==void 0&&e.uint32(168).bool(t.supportsTools),t.supportsAdaptiveThinking!==void 0&&e.uint32(176).bool(t.supportsAdaptiveThinking),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=ELn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.maxTokens=OA(r.int64());continue}case 2:{if(o!==16)break;a.contextWindow=OA(r.int64());continue}case 3:{if(o!==24)break;a.supportsImages=r.bool();continue}case 4:{if(o!==32)break;a.supportsPromptCache=r.bool();continue}case 5:{if(o!==41)break;a.inputPrice=r.double();continue}case 6:{if(o!==49)break;a.outputPrice=r.double();continue}case 7:{if(o!==58)break;a.thinkingConfig=If.decode(r,r.uint32());continue}case 9:{if(o!==73)break;a.cacheWritesPrice=r.double();continue}case 10:{if(o!==81)break;a.cacheReadsPrice=r.double();continue}case 11:{if(o!==90)break;a.description=r.string();continue}case 13:{if(o!==105)break;a.temperature=r.double();continue}case 14:{if(o!==114)break;a.surveyContent=r.string();continue}case 15:{if(o!==122)break;a.surveyId=r.string();continue}case 16:{if(o!==130)break;a.banner=r.string();continue}case 17:{if(o!==138)break;a.modelName=r.string();continue}case 18:{if(o!==144)break;a.apiFormat=r.int32();continue}case 19:{if(o!==152)break;a.supportsReasoning=r.bool();continue}case 20:{if(o!==162)break;a.reasoningEffortOptions.push(r.string());continue}case 21:{if(o!==168)break;a.supportsTools=r.bool();continue}case 22:{if(o!==176)break;a.supportsAdaptiveThinking=r.bool();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{maxTokens:rt(t.maxTokens)?globalThis.Number(t.maxTokens):rt(t.max_tokens)?globalThis.Number(t.max_tokens):void 0,contextWindow:rt(t.contextWindow)?globalThis.Number(t.contextWindow):rt(t.context_window)?globalThis.Number(t.context_window):void 0,supportsImages:rt(t.supportsImages)?globalThis.Boolean(t.supportsImages):rt(t.supports_images)?globalThis.Boolean(t.supports_images):void 0,supportsPromptCache:rt(t.supportsPromptCache)?globalThis.Boolean(t.supportsPromptCache):rt(t.supports_prompt_cache)?globalThis.Boolean(t.supports_prompt_cache):!1,inputPrice:rt(t.inputPrice)?globalThis.Number(t.inputPrice):rt(t.input_price)?globalThis.Number(t.input_price):void 0,outputPrice:rt(t.outputPrice)?globalThis.Number(t.outputPrice):rt(t.output_price)?globalThis.Number(t.output_price):void 0,thinkingConfig:rt(t.thinkingConfig)?If.fromJSON(t.thinkingConfig):rt(t.thinking_config)?If.fromJSON(t.thinking_config):void 0,cacheWritesPrice:rt(t.cacheWritesPrice)?globalThis.Number(t.cacheWritesPrice):rt(t.cache_writes_price)?globalThis.Number(t.cache_writes_price):void 0,cacheReadsPrice:rt(t.cacheReadsPrice)?globalThis.Number(t.cacheReadsPrice):rt(t.cache_reads_price)?globalThis.Number(t.cache_reads_price):void 0,description:rt(t.description)?globalThis.String(t.description):void 0,temperature:rt(t.temperature)?globalThis.Number(t.temperature):void 0,surveyContent:rt(t.surveyContent)?globalThis.String(t.surveyContent):rt(t.survey_content)?globalThis.String(t.survey_content):void 0,surveyId:rt(t.surveyId)?globalThis.String(t.surveyId):rt(t.survey_id)?globalThis.String(t.survey_id):void 0,banner:rt(t.banner)?globalThis.String(t.banner):void 0,modelName:rt(t.modelName)?globalThis.String(t.modelName):rt(t.model_name)?globalThis.String(t.model_name):"",apiFormat:rt(t.apiFormat)?d7(t.apiFormat):rt(t.api_format)?d7(t.api_format):void 0,supportsReasoning:rt(t.supportsReasoning)?globalThis.Boolean(t.supportsReasoning):rt(t.supports_reasoning)?globalThis.Boolean(t.supports_reasoning):void 0,reasoningEffortOptions:globalThis.Array.isArray(t?.reasoningEffortOptions)?t.reasoningEffortOptions.map(e=>globalThis.String(e)):globalThis.Array.isArray(t?.reasoning_effort_options)?t.reasoning_effort_options.map(e=>globalThis.String(e)):[],supportsTools:rt(t.supportsTools)?globalThis.Boolean(t.supportsTools):rt(t.supports_tools)?globalThis.Boolean(t.supports_tools):void 0,supportsAdaptiveThinking:rt(t.supportsAdaptiveThinking)?globalThis.Boolean(t.supportsAdaptiveThinking):rt(t.supports_adaptive_thinking)?globalThis.Boolean(t.supports_adaptive_thinking):void 0}},toJSON(t){let e={};return t.maxTokens!==void 0&&(e.maxTokens=Math.round(t.maxTokens)),t.contextWindow!==void 0&&(e.contextWindow=Math.round(t.contextWindow)),t.supportsImages!==void 0&&(e.supportsImages=t.supportsImages),t.supportsPromptCache!==!1&&(e.supportsPromptCache=t.supportsPromptCache),t.inputPrice!==void 0&&(e.inputPrice=t.inputPrice),t.outputPrice!==void 0&&(e.outputPrice=t.outputPrice),t.thinkingConfig!==void 0&&(e.thinkingConfig=If.toJSON(t.thinkingConfig)),t.cacheWritesPrice!==void 0&&(e.cacheWritesPrice=t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&(e.cacheReadsPrice=t.cacheReadsPrice),t.description!==void 0&&(e.description=t.description),t.temperature!==void 0&&(e.temperature=t.temperature),t.surveyContent!==void 0&&(e.surveyContent=t.surveyContent),t.surveyId!==void 0&&(e.surveyId=t.surveyId),t.banner!==void 0&&(e.banner=t.banner),t.modelName!==""&&(e.modelName=t.modelName),t.apiFormat!==void 0&&(e.apiFormat=vee(t.apiFormat)),t.supportsReasoning!==void 0&&(e.supportsReasoning=t.supportsReasoning),t.reasoningEffortOptions?.length&&(e.reasoningEffortOptions=t.reasoningEffortOptions),t.supportsTools!==void 0&&(e.supportsTools=t.supportsTools),t.supportsAdaptiveThinking!==void 0&&(e.supportsAdaptiveThinking=t.supportsAdaptiveThinking),e},create(t){return dP.fromPartial(t??{})},fromPartial(t){let e=ELn();return e.maxTokens=t.maxTokens??void 0,e.contextWindow=t.contextWindow??void 0,e.supportsImages=t.supportsImages??void 0,e.supportsPromptCache=t.supportsPromptCache??!1,e.inputPrice=t.inputPrice??void 0,e.outputPrice=t.outputPrice??void 0,e.thinkingConfig=t.thinkingConfig!==void 0&&t.thinkingConfig!==null?If.fromPartial(t.thinkingConfig):void 0,e.cacheWritesPrice=t.cacheWritesPrice??void 0,e.cacheReadsPrice=t.cacheReadsPrice??void 0,e.description=t.description??void 0,e.temperature=t.temperature??void 0,e.surveyContent=t.surveyContent??void 0,e.surveyId=t.surveyId??void 0,e.banner=t.banner??void 0,e.modelName=t.modelName??"",e.apiFormat=t.apiFormat??void 0,e.supportsReasoning=t.supportsReasoning??void 0,e.reasoningEffortOptions=t.reasoningEffortOptions?.map(r=>r)||[],e.supportsTools=t.supportsTools??void 0,e.supportsAdaptiveThinking=t.supportsAdaptiveThinking??void 0,e}};ILn={encode(t,e=new dr){return globalThis.Object.entries(t.models).forEach(([r,i])=>{qet.encode({key:r,value:i},e.uint32(10).fork()).join()}),t.error!==void 0&&e.uint32(18).string(t.error),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=yLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;let n=qet.decode(r,r.uint32());n.value!==void 0&&(a.models[n.key]=n.value);continue}case 2:{if(o!==18)break;a.error=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{models:Bhe(t.models)?globalThis.Object.entries(t.models).reduce((e,[r,i])=>(e[r]=dP.fromJSON(i),e),{}):{},error:rt(t.error)?globalThis.String(t.error):void 0}},toJSON(t){let e={};if(t.models){let r=globalThis.Object.entries(t.models);r.length>0&&(e.models={},r.forEach(([i,a])=>{e.models[i]=dP.toJSON(a)}))}return t.error!==void 0&&(e.error=t.error),e},create(t){return ILn.fromPartial(t??{})},fromPartial(t){let e=yLn();return e.models=globalThis.Object.entries(t.models??{}).reduce((r,[i,a])=>(a!==void 0&&(r[i]=dP.fromPartial(a)),r),{}),e.error=t.error??void 0,e}};qet={encode(t,e=new dr){return t.key!==""&&e.uint32(10).string(t.key),t.value!==void 0&&dP.encode(t.value,e.uint32(18).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=CLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.key=r.string();continue}case 2:{if(o!==18)break;a.value=dP.decode(r,r.uint32());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{key:rt(t.key)?globalThis.String(t.key):"",value:rt(t.value)?dP.fromJSON(t.value):void 0}},toJSON(t){let e={};return t.key!==""&&(e.key=t.key),t.value!==void 0&&(e.value=dP.toJSON(t.value)),e},create(t){return qet.fromPartial(t??{})},fromPartial(t){let e=CLn();return e.key=t.key??"",e.value=t.value!==void 0&&t.value!==null?dP.fromPartial(t.value):void 0,e}};pa={encode(t,e=new dr){t.maxTokens!==void 0&&e.uint32(8).int64(t.maxTokens),t.contextWindow!==void 0&&e.uint32(16).int64(t.contextWindow),t.supportsImages!==void 0&&e.uint32(24).bool(t.supportsImages),t.supportsPromptCache!==!1&&e.uint32(32).bool(t.supportsPromptCache),t.inputPrice!==void 0&&e.uint32(41).double(t.inputPrice),t.outputPrice!==void 0&&e.uint32(49).double(t.outputPrice),t.thinkingConfig!==void 0&&If.encode(t.thinkingConfig,e.uint32(58).fork()).join(),t.supportsGlobalEndpoint!==void 0&&e.uint32(64).bool(t.supportsGlobalEndpoint),t.cacheWritesPrice!==void 0&&e.uint32(73).double(t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&e.uint32(81).double(t.cacheReadsPrice),t.description!==void 0&&e.uint32(90).string(t.description);for(let r of t.tiers)Ay.encode(r,e.uint32(98).fork()).join();return t.temperature!==void 0&&e.uint32(105).double(t.temperature),t.isR1FormatRequired!==void 0&&e.uint32(112).bool(t.isR1FormatRequired),t.apiFormat!==void 0&&e.uint32(120).int32(t.apiFormat),t.supportsTools!==void 0&&e.uint32(128).bool(t.supportsTools),t.supportsAdaptiveThinking!==void 0&&e.uint32(136).bool(t.supportsAdaptiveThinking),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=vLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.maxTokens=OA(r.int64());continue}case 2:{if(o!==16)break;a.contextWindow=OA(r.int64());continue}case 3:{if(o!==24)break;a.supportsImages=r.bool();continue}case 4:{if(o!==32)break;a.supportsPromptCache=r.bool();continue}case 5:{if(o!==41)break;a.inputPrice=r.double();continue}case 6:{if(o!==49)break;a.outputPrice=r.double();continue}case 7:{if(o!==58)break;a.thinkingConfig=If.decode(r,r.uint32());continue}case 8:{if(o!==64)break;a.supportsGlobalEndpoint=r.bool();continue}case 9:{if(o!==73)break;a.cacheWritesPrice=r.double();continue}case 10:{if(o!==81)break;a.cacheReadsPrice=r.double();continue}case 11:{if(o!==90)break;a.description=r.string();continue}case 12:{if(o!==98)break;a.tiers.push(Ay.decode(r,r.uint32()));continue}case 13:{if(o!==105)break;a.temperature=r.double();continue}case 14:{if(o!==112)break;a.isR1FormatRequired=r.bool();continue}case 15:{if(o!==120)break;a.apiFormat=r.int32();continue}case 16:{if(o!==128)break;a.supportsTools=r.bool();continue}case 17:{if(o!==136)break;a.supportsAdaptiveThinking=r.bool();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{maxTokens:rt(t.maxTokens)?globalThis.Number(t.maxTokens):rt(t.max_tokens)?globalThis.Number(t.max_tokens):void 0,contextWindow:rt(t.contextWindow)?globalThis.Number(t.contextWindow):rt(t.context_window)?globalThis.Number(t.context_window):void 0,supportsImages:rt(t.supportsImages)?globalThis.Boolean(t.supportsImages):rt(t.supports_images)?globalThis.Boolean(t.supports_images):void 0,supportsPromptCache:rt(t.supportsPromptCache)?globalThis.Boolean(t.supportsPromptCache):rt(t.supports_prompt_cache)?globalThis.Boolean(t.supports_prompt_cache):!1,inputPrice:rt(t.inputPrice)?globalThis.Number(t.inputPrice):rt(t.input_price)?globalThis.Number(t.input_price):void 0,outputPrice:rt(t.outputPrice)?globalThis.Number(t.outputPrice):rt(t.output_price)?globalThis.Number(t.output_price):void 0,thinkingConfig:rt(t.thinkingConfig)?If.fromJSON(t.thinkingConfig):rt(t.thinking_config)?If.fromJSON(t.thinking_config):void 0,supportsGlobalEndpoint:rt(t.supportsGlobalEndpoint)?globalThis.Boolean(t.supportsGlobalEndpoint):rt(t.supports_global_endpoint)?globalThis.Boolean(t.supports_global_endpoint):void 0,cacheWritesPrice:rt(t.cacheWritesPrice)?globalThis.Number(t.cacheWritesPrice):rt(t.cache_writes_price)?globalThis.Number(t.cache_writes_price):void 0,cacheReadsPrice:rt(t.cacheReadsPrice)?globalThis.Number(t.cacheReadsPrice):rt(t.cache_reads_price)?globalThis.Number(t.cache_reads_price):void 0,description:rt(t.description)?globalThis.String(t.description):void 0,tiers:globalThis.Array.isArray(t?.tiers)?t.tiers.map(e=>Ay.fromJSON(e)):[],temperature:rt(t.temperature)?globalThis.Number(t.temperature):void 0,isR1FormatRequired:rt(t.isR1FormatRequired)?globalThis.Boolean(t.isR1FormatRequired):rt(t.is_r1_format_required)?globalThis.Boolean(t.is_r1_format_required):void 0,apiFormat:rt(t.apiFormat)?d7(t.apiFormat):rt(t.api_format)?d7(t.api_format):void 0,supportsTools:rt(t.supportsTools)?globalThis.Boolean(t.supportsTools):rt(t.supports_tools)?globalThis.Boolean(t.supports_tools):void 0,supportsAdaptiveThinking:rt(t.supportsAdaptiveThinking)?globalThis.Boolean(t.supportsAdaptiveThinking):rt(t.supports_adaptive_thinking)?globalThis.Boolean(t.supports_adaptive_thinking):void 0}},toJSON(t){let e={};return t.maxTokens!==void 0&&(e.maxTokens=Math.round(t.maxTokens)),t.contextWindow!==void 0&&(e.contextWindow=Math.round(t.contextWindow)),t.supportsImages!==void 0&&(e.supportsImages=t.supportsImages),t.supportsPromptCache!==!1&&(e.supportsPromptCache=t.supportsPromptCache),t.inputPrice!==void 0&&(e.inputPrice=t.inputPrice),t.outputPrice!==void 0&&(e.outputPrice=t.outputPrice),t.thinkingConfig!==void 0&&(e.thinkingConfig=If.toJSON(t.thinkingConfig)),t.supportsGlobalEndpoint!==void 0&&(e.supportsGlobalEndpoint=t.supportsGlobalEndpoint),t.cacheWritesPrice!==void 0&&(e.cacheWritesPrice=t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&(e.cacheReadsPrice=t.cacheReadsPrice),t.description!==void 0&&(e.description=t.description),t.tiers?.length&&(e.tiers=t.tiers.map(r=>Ay.toJSON(r))),t.temperature!==void 0&&(e.temperature=t.temperature),t.isR1FormatRequired!==void 0&&(e.isR1FormatRequired=t.isR1FormatRequired),t.apiFormat!==void 0&&(e.apiFormat=vee(t.apiFormat)),t.supportsTools!==void 0&&(e.supportsTools=t.supportsTools),t.supportsAdaptiveThinking!==void 0&&(e.supportsAdaptiveThinking=t.supportsAdaptiveThinking),e},create(t){return pa.fromPartial(t??{})},fromPartial(t){let e=vLn();return e.maxTokens=t.maxTokens??void 0,e.contextWindow=t.contextWindow??void 0,e.supportsImages=t.supportsImages??void 0,e.supportsPromptCache=t.supportsPromptCache??!1,e.inputPrice=t.inputPrice??void 0,e.outputPrice=t.outputPrice??void 0,e.thinkingConfig=t.thinkingConfig!==void 0&&t.thinkingConfig!==null?If.fromPartial(t.thinkingConfig):void 0,e.supportsGlobalEndpoint=t.supportsGlobalEndpoint??void 0,e.cacheWritesPrice=t.cacheWritesPrice??void 0,e.cacheReadsPrice=t.cacheReadsPrice??void 0,e.description=t.description??void 0,e.tiers=t.tiers?.map(r=>Ay.fromPartial(r))||[],e.temperature=t.temperature??void 0,e.isR1FormatRequired=t.isR1FormatRequired??void 0,e.apiFormat=t.apiFormat??void 0,e.supportsTools=t.supportsTools??void 0,e.supportsAdaptiveThinking=t.supportsAdaptiveThinking??void 0,e}};Nu={encode(t,e=new dr){t.maxTokens!==void 0&&e.uint32(8).int64(t.maxTokens),t.contextWindow!==void 0&&e.uint32(16).int64(t.contextWindow),t.supportsImages!==void 0&&e.uint32(24).bool(t.supportsImages),t.supportsPromptCache!==!1&&e.uint32(32).bool(t.supportsPromptCache),t.inputPrice!==void 0&&e.uint32(41).double(t.inputPrice),t.outputPrice!==void 0&&e.uint32(49).double(t.outputPrice),t.thinkingConfig!==void 0&&If.encode(t.thinkingConfig,e.uint32(58).fork()).join(),t.supportsGlobalEndpoint!==void 0&&e.uint32(64).bool(t.supportsGlobalEndpoint),t.cacheWritesPrice!==void 0&&e.uint32(73).double(t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&e.uint32(81).double(t.cacheReadsPrice),t.description!==void 0&&e.uint32(90).string(t.description);for(let r of t.tiers)Ay.encode(r,e.uint32(98).fork()).join();return t.temperature!==void 0&&e.uint32(105).double(t.temperature),t.apiFormat!==void 0&&e.uint32(112).int32(t.apiFormat),t.supportsReasoning!==void 0&&e.uint32(120).bool(t.supportsReasoning),t.supportsAdaptiveThinking!==void 0&&e.uint32(128).bool(t.supportsAdaptiveThinking),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=bLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==8)break;a.maxTokens=OA(r.int64());continue}case 2:{if(o!==16)break;a.contextWindow=OA(r.int64());continue}case 3:{if(o!==24)break;a.supportsImages=r.bool();continue}case 4:{if(o!==32)break;a.supportsPromptCache=r.bool();continue}case 5:{if(o!==41)break;a.inputPrice=r.double();continue}case 6:{if(o!==49)break;a.outputPrice=r.double();continue}case 7:{if(o!==58)break;a.thinkingConfig=If.decode(r,r.uint32());continue}case 8:{if(o!==64)break;a.supportsGlobalEndpoint=r.bool();continue}case 9:{if(o!==73)break;a.cacheWritesPrice=r.double();continue}case 10:{if(o!==81)break;a.cacheReadsPrice=r.double();continue}case 11:{if(o!==90)break;a.description=r.string();continue}case 12:{if(o!==98)break;a.tiers.push(Ay.decode(r,r.uint32()));continue}case 13:{if(o!==105)break;a.temperature=r.double();continue}case 14:{if(o!==112)break;a.apiFormat=r.int32();continue}case 15:{if(o!==120)break;a.supportsReasoning=r.bool();continue}case 16:{if(o!==128)break;a.supportsAdaptiveThinking=r.bool();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{maxTokens:rt(t.maxTokens)?globalThis.Number(t.maxTokens):rt(t.max_tokens)?globalThis.Number(t.max_tokens):void 0,contextWindow:rt(t.contextWindow)?globalThis.Number(t.contextWindow):rt(t.context_window)?globalThis.Number(t.context_window):void 0,supportsImages:rt(t.supportsImages)?globalThis.Boolean(t.supportsImages):rt(t.supports_images)?globalThis.Boolean(t.supports_images):void 0,supportsPromptCache:rt(t.supportsPromptCache)?globalThis.Boolean(t.supportsPromptCache):rt(t.supports_prompt_cache)?globalThis.Boolean(t.supports_prompt_cache):!1,inputPrice:rt(t.inputPrice)?globalThis.Number(t.inputPrice):rt(t.input_price)?globalThis.Number(t.input_price):void 0,outputPrice:rt(t.outputPrice)?globalThis.Number(t.outputPrice):rt(t.output_price)?globalThis.Number(t.output_price):void 0,thinkingConfig:rt(t.thinkingConfig)?If.fromJSON(t.thinkingConfig):rt(t.thinking_config)?If.fromJSON(t.thinking_config):void 0,supportsGlobalEndpoint:rt(t.supportsGlobalEndpoint)?globalThis.Boolean(t.supportsGlobalEndpoint):rt(t.supports_global_endpoint)?globalThis.Boolean(t.supports_global_endpoint):void 0,cacheWritesPrice:rt(t.cacheWritesPrice)?globalThis.Number(t.cacheWritesPrice):rt(t.cache_writes_price)?globalThis.Number(t.cache_writes_price):void 0,cacheReadsPrice:rt(t.cacheReadsPrice)?globalThis.Number(t.cacheReadsPrice):rt(t.cache_reads_price)?globalThis.Number(t.cache_reads_price):void 0,description:rt(t.description)?globalThis.String(t.description):void 0,tiers:globalThis.Array.isArray(t?.tiers)?t.tiers.map(e=>Ay.fromJSON(e)):[],temperature:rt(t.temperature)?globalThis.Number(t.temperature):void 0,apiFormat:rt(t.apiFormat)?d7(t.apiFormat):rt(t.api_format)?d7(t.api_format):void 0,supportsReasoning:rt(t.supportsReasoning)?globalThis.Boolean(t.supportsReasoning):rt(t.supports_reasoning)?globalThis.Boolean(t.supports_reasoning):void 0,supportsAdaptiveThinking:rt(t.supportsAdaptiveThinking)?globalThis.Boolean(t.supportsAdaptiveThinking):rt(t.supports_adaptive_thinking)?globalThis.Boolean(t.supports_adaptive_thinking):void 0}},toJSON(t){let e={};return t.maxTokens!==void 0&&(e.maxTokens=Math.round(t.maxTokens)),t.contextWindow!==void 0&&(e.contextWindow=Math.round(t.contextWindow)),t.supportsImages!==void 0&&(e.supportsImages=t.supportsImages),t.supportsPromptCache!==!1&&(e.supportsPromptCache=t.supportsPromptCache),t.inputPrice!==void 0&&(e.inputPrice=t.inputPrice),t.outputPrice!==void 0&&(e.outputPrice=t.outputPrice),t.thinkingConfig!==void 0&&(e.thinkingConfig=If.toJSON(t.thinkingConfig)),t.supportsGlobalEndpoint!==void 0&&(e.supportsGlobalEndpoint=t.supportsGlobalEndpoint),t.cacheWritesPrice!==void 0&&(e.cacheWritesPrice=t.cacheWritesPrice),t.cacheReadsPrice!==void 0&&(e.cacheReadsPrice=t.cacheReadsPrice),t.description!==void 0&&(e.description=t.description),t.tiers?.length&&(e.tiers=t.tiers.map(r=>Ay.toJSON(r))),t.temperature!==void 0&&(e.temperature=t.temperature),t.apiFormat!==void 0&&(e.apiFormat=vee(t.apiFormat)),t.supportsReasoning!==void 0&&(e.supportsReasoning=t.supportsReasoning),t.supportsAdaptiveThinking!==void 0&&(e.supportsAdaptiveThinking=t.supportsAdaptiveThinking),e},create(t){return Nu.fromPartial(t??{})},fromPartial(t){let e=bLn();return e.maxTokens=t.maxTokens??void 0,e.contextWindow=t.contextWindow??void 0,e.supportsImages=t.supportsImages??void 0,e.supportsPromptCache=t.supportsPromptCache??!1,e.inputPrice=t.inputPrice??void 0,e.outputPrice=t.outputPrice??void 0,e.thinkingConfig=t.thinkingConfig!==void 0&&t.thinkingConfig!==null?If.fromPartial(t.thinkingConfig):void 0,e.supportsGlobalEndpoint=t.supportsGlobalEndpoint??void 0,e.cacheWritesPrice=t.cacheWritesPrice??void 0,e.cacheReadsPrice=t.cacheReadsPrice??void 0,e.description=t.description??void 0,e.tiers=t.tiers?.map(r=>Ay.fromPartial(r))||[],e.temperature=t.temperature??void 0,e.apiFormat=t.apiFormat??void 0,e.supportsReasoning=t.supportsReasoning??void 0,e.supportsAdaptiveThinking=t.supportsAdaptiveThinking??void 0,e}};PA={encode(t,e=new dr){return t.apiKey!==void 0&&e.uint32(10).string(t.apiKey),t.diracApiKey!==void 0&&e.uint32(18).string(t.diracApiKey),t.ulid!==void 0&&e.uint32(26).string(t.ulid),t.liteLlmBaseUrl!==void 0&&e.uint32(34).string(t.liteLlmBaseUrl),t.liteLlmApiKey!==void 0&&e.uint32(42).string(t.liteLlmApiKey),t.liteLlmUsePromptCache!==void 0&&e.uint32(48).bool(t.liteLlmUsePromptCache),globalThis.Object.entries(t.openAiHeaders).forEach(([r,i])=>{Het.encode({key:r,value:i},e.uint32(58).fork()).join()}),t.anthropicBaseUrl!==void 0&&e.uint32(66).string(t.anthropicBaseUrl),t.openRouterApiKey!==void 0&&e.uint32(74).string(t.openRouterApiKey),t.openRouterProviderSorting!==void 0&&e.uint32(82).string(t.openRouterProviderSorting),t.awsAccessKey!==void 0&&e.uint32(90).string(t.awsAccessKey),t.awsSecretKey!==void 0&&e.uint32(98).string(t.awsSecretKey),t.awsSessionToken!==void 0&&e.uint32(106).string(t.awsSessionToken),t.awsRegion!==void 0&&e.uint32(114).string(t.awsRegion),t.awsUseCrossRegionInference!==void 0&&e.uint32(120).bool(t.awsUseCrossRegionInference),t.awsBedrockUsePromptCache!==void 0&&e.uint32(128).bool(t.awsBedrockUsePromptCache),t.awsUseProfile!==void 0&&e.uint32(136).bool(t.awsUseProfile),t.awsProfile!==void 0&&e.uint32(146).string(t.awsProfile),t.awsBedrockEndpoint!==void 0&&e.uint32(154).string(t.awsBedrockEndpoint),t.claudeCodePath!==void 0&&e.uint32(162).string(t.claudeCodePath),t.vertexProjectId!==void 0&&e.uint32(170).string(t.vertexProjectId),t.vertexRegion!==void 0&&e.uint32(178).string(t.vertexRegion),t.openAiBaseUrl!==void 0&&e.uint32(186).string(t.openAiBaseUrl),t.openAiApiKey!==void 0&&e.uint32(194).string(t.openAiApiKey),t.lmStudioBaseUrl!==void 0&&e.uint32(218).string(t.lmStudioBaseUrl),t.geminiApiKey!==void 0&&e.uint32(226).string(t.geminiApiKey),t.geminiBaseUrl!==void 0&&e.uint32(234).string(t.geminiBaseUrl),t.openAiNativeApiKey!==void 0&&e.uint32(242).string(t.openAiNativeApiKey),t.deepSeekApiKey!==void 0&&e.uint32(250).string(t.deepSeekApiKey),t.requestyApiKey!==void 0&&e.uint32(258).string(t.requestyApiKey),t.requestyBaseUrl!==void 0&&e.uint32(266).string(t.requestyBaseUrl),t.togetherApiKey!==void 0&&e.uint32(274).string(t.togetherApiKey),t.fireworksApiKey!==void 0&&e.uint32(282).string(t.fireworksApiKey),t.fireworksModelMaxCompletionTokens!==void 0&&e.uint32(288).int64(t.fireworksModelMaxCompletionTokens),t.fireworksModelMaxTokens!==void 0&&e.uint32(296).int64(t.fireworksModelMaxTokens),t.qwenApiKey!==void 0&&e.uint32(306).string(t.qwenApiKey),t.doubaoApiKey!==void 0&&e.uint32(314).string(t.doubaoApiKey),t.mistralApiKey!==void 0&&e.uint32(322).string(t.mistralApiKey),t.azureApiVersion!==void 0&&e.uint32(330).string(t.azureApiVersion),t.qwenApiLine!==void 0&&e.uint32(338).string(t.qwenApiLine),t.nebiusApiKey!==void 0&&e.uint32(346).string(t.nebiusApiKey),t.xaiApiKey!==void 0&&e.uint32(370).string(t.xaiApiKey),t.sambanovaApiKey!==void 0&&e.uint32(378).string(t.sambanovaApiKey),t.cerebrasApiKey!==void 0&&e.uint32(386).string(t.cerebrasApiKey),t.requestTimeoutMs!==void 0&&e.uint32(392).int64(t.requestTimeoutMs),t.moonshotApiKey!==void 0&&e.uint32(450).string(t.moonshotApiKey),t.moonshotApiLine!==void 0&&e.uint32(458).string(t.moonshotApiLine),t.awsAuthentication!==void 0&&e.uint32(466).string(t.awsAuthentication),t.awsBedrockApiKey!==void 0&&e.uint32(474).string(t.awsBedrockApiKey),t.groqApiKey!==void 0&&e.uint32(490).string(t.groqApiKey),t.huggingFaceApiKey!==void 0&&e.uint32(498).string(t.huggingFaceApiKey),t.huaweiCloudMaasApiKey!==void 0&&e.uint32(506).string(t.huaweiCloudMaasApiKey),t.basetenApiKey!==void 0&&e.uint32(514).string(t.basetenApiKey),t.zaiApiKey!==void 0&&e.uint32(530).string(t.zaiApiKey),t.zaiApiLine!==void 0&&e.uint32(538).string(t.zaiApiLine),t.lmStudioMaxTokens!==void 0&&e.uint32(546).string(t.lmStudioMaxTokens),t.vercelAiGatewayApiKey!==void 0&&e.uint32(554).string(t.vercelAiGatewayApiKey),t.qwenCodeOauthPath!==void 0&&e.uint32(562).string(t.qwenCodeOauthPath),t.difyApiKey!==void 0&&e.uint32(570).string(t.difyApiKey),t.difyBaseUrl!==void 0&&e.uint32(578).string(t.difyBaseUrl),t.awsUseGlobalInference!==void 0&&e.uint32(616).bool(t.awsUseGlobalInference),t.minimaxApiKey!==void 0&&e.uint32(626).string(t.minimaxApiKey),t.minimaxApiLine!==void 0&&e.uint32(634).string(t.minimaxApiLine),t.aihubmixApiKey!==void 0&&e.uint32(658).string(t.aihubmixApiKey),t.aihubmixBaseUrl!==void 0&&e.uint32(666).string(t.aihubmixBaseUrl),t.aihubmixAppCode!==void 0&&e.uint32(674).string(t.aihubmixAppCode),t.nousResearchApiKey!==void 0&&e.uint32(682).string(t.nousResearchApiKey),t.azureIdentity!==void 0&&e.uint32(688).bool(t.azureIdentity),t.wandbApiKey!==void 0&&e.uint32(698).string(t.wandbApiKey),t.planModeApiProvider!==void 0&&e.uint32(800).int32(t.planModeApiProvider),t.planModeApiModelId!==void 0&&e.uint32(810).string(t.planModeApiModelId),t.planModeThinkingBudgetTokens!==void 0&&e.uint32(816).int64(t.planModeThinkingBudgetTokens),t.planModeReasoningEffort!==void 0&&e.uint32(826).string(t.planModeReasoningEffort),t.planModeVsCodeLmModelSelector!==void 0&&js.encode(t.planModeVsCodeLmModelSelector,e.uint32(834).fork()).join(),t.planModeAwsBedrockCustomSelected!==void 0&&e.uint32(840).bool(t.planModeAwsBedrockCustomSelected),t.planModeAwsBedrockCustomModelBaseId!==void 0&&e.uint32(850).string(t.planModeAwsBedrockCustomModelBaseId),t.planModeOpenRouterModelId!==void 0&&e.uint32(858).string(t.planModeOpenRouterModelId),t.planModeOpenRouterModelInfo!==void 0&&Zt.encode(t.planModeOpenRouterModelInfo,e.uint32(866).fork()).join(),t.planModeOpenAiModelId!==void 0&&e.uint32(874).string(t.planModeOpenAiModelId),t.planModeOpenAiModelInfo!==void 0&&pa.encode(t.planModeOpenAiModelInfo,e.uint32(882).fork()).join(),t.planModeLmStudioModelId!==void 0&&e.uint32(898).string(t.planModeLmStudioModelId),t.planModeLiteLlmModelId!==void 0&&e.uint32(906).string(t.planModeLiteLlmModelId),t.planModeLiteLlmModelInfo!==void 0&&Nu.encode(t.planModeLiteLlmModelInfo,e.uint32(914).fork()).join(),t.planModeRequestyModelId!==void 0&&e.uint32(922).string(t.planModeRequestyModelId),t.planModeRequestyModelInfo!==void 0&&Zt.encode(t.planModeRequestyModelInfo,e.uint32(930).fork()).join(),t.planModeTogetherModelId!==void 0&&e.uint32(938).string(t.planModeTogetherModelId),t.planModeFireworksModelId!==void 0&&e.uint32(946).string(t.planModeFireworksModelId),t.planModeGroqModelId!==void 0&&e.uint32(970).string(t.planModeGroqModelId),t.planModeGroqModelInfo!==void 0&&Zt.encode(t.planModeGroqModelInfo,e.uint32(978).fork()).join(),t.planModeHuggingFaceModelId!==void 0&&e.uint32(986).string(t.planModeHuggingFaceModelId),t.planModeHuggingFaceModelInfo!==void 0&&Zt.encode(t.planModeHuggingFaceModelInfo,e.uint32(994).fork()).join(),t.planModeHuaweiCloudMaasModelId!==void 0&&e.uint32(1002).string(t.planModeHuaweiCloudMaasModelId),t.planModeHuaweiCloudMaasModelInfo!==void 0&&Zt.encode(t.planModeHuaweiCloudMaasModelInfo,e.uint32(1010).fork()).join(),t.planModeBasetenModelId!==void 0&&e.uint32(1018).string(t.planModeBasetenModelId),t.planModeBasetenModelInfo!==void 0&&Zt.encode(t.planModeBasetenModelInfo,e.uint32(1026).fork()).join(),t.planModeVercelAiGatewayModelId!==void 0&&e.uint32(1034).string(t.planModeVercelAiGatewayModelId),t.planModeVercelAiGatewayModelInfo!==void 0&&Zt.encode(t.planModeVercelAiGatewayModelInfo,e.uint32(1042).fork()).join(),t.planModeAihubmixModelId!==void 0&&e.uint32(1090).string(t.planModeAihubmixModelId),t.planModeAihubmixModelInfo!==void 0&&pa.encode(t.planModeAihubmixModelInfo,e.uint32(1098).fork()).join(),t.planModeNousResearchModelId!==void 0&&e.uint32(1106).string(t.planModeNousResearchModelId),t.geminiPlanModeThinkingLevel!==void 0&&e.uint32(1114).string(t.geminiPlanModeThinkingLevel),t.planModeDiracModelId!==void 0&&e.uint32(1122).string(t.planModeDiracModelId),t.planModeDiracModelInfo!==void 0&&Zt.encode(t.planModeDiracModelInfo,e.uint32(1130).fork()).join(),t.actModeApiProvider!==void 0&&e.uint32(1600).int32(t.actModeApiProvider),t.actModeApiModelId!==void 0&&e.uint32(1610).string(t.actModeApiModelId),t.actModeThinkingBudgetTokens!==void 0&&e.uint32(1616).int64(t.actModeThinkingBudgetTokens),t.actModeReasoningEffort!==void 0&&e.uint32(1626).string(t.actModeReasoningEffort),t.actModeVsCodeLmModelSelector!==void 0&&js.encode(t.actModeVsCodeLmModelSelector,e.uint32(1634).fork()).join(),t.actModeAwsBedrockCustomSelected!==void 0&&e.uint32(1640).bool(t.actModeAwsBedrockCustomSelected),t.actModeAwsBedrockCustomModelBaseId!==void 0&&e.uint32(1650).string(t.actModeAwsBedrockCustomModelBaseId),t.actModeOpenRouterModelId!==void 0&&e.uint32(1658).string(t.actModeOpenRouterModelId),t.actModeOpenRouterModelInfo!==void 0&&Zt.encode(t.actModeOpenRouterModelInfo,e.uint32(1666).fork()).join(),t.actModeOpenAiModelId!==void 0&&e.uint32(1674).string(t.actModeOpenAiModelId),t.actModeOpenAiModelInfo!==void 0&&pa.encode(t.actModeOpenAiModelInfo,e.uint32(1682).fork()).join(),t.actModeLmStudioModelId!==void 0&&e.uint32(1698).string(t.actModeLmStudioModelId),t.actModeLiteLlmModelId!==void 0&&e.uint32(1706).string(t.actModeLiteLlmModelId),t.actModeLiteLlmModelInfo!==void 0&&Nu.encode(t.actModeLiteLlmModelInfo,e.uint32(1714).fork()).join(),t.actModeRequestyModelId!==void 0&&e.uint32(1722).string(t.actModeRequestyModelId),t.actModeRequestyModelInfo!==void 0&&Zt.encode(t.actModeRequestyModelInfo,e.uint32(1730).fork()).join(),t.actModeTogetherModelId!==void 0&&e.uint32(1738).string(t.actModeTogetherModelId),t.actModeFireworksModelId!==void 0&&e.uint32(1746).string(t.actModeFireworksModelId),t.actModeGroqModelId!==void 0&&e.uint32(1770).string(t.actModeGroqModelId),t.actModeGroqModelInfo!==void 0&&Zt.encode(t.actModeGroqModelInfo,e.uint32(1778).fork()).join(),t.actModeHuggingFaceModelId!==void 0&&e.uint32(1786).string(t.actModeHuggingFaceModelId),t.actModeHuggingFaceModelInfo!==void 0&&Zt.encode(t.actModeHuggingFaceModelInfo,e.uint32(1794).fork()).join(),t.actModeHuaweiCloudMaasModelId!==void 0&&e.uint32(1802).string(t.actModeHuaweiCloudMaasModelId),t.actModeHuaweiCloudMaasModelInfo!==void 0&&Zt.encode(t.actModeHuaweiCloudMaasModelInfo,e.uint32(1810).fork()).join(),t.actModeBasetenModelId!==void 0&&e.uint32(1818).string(t.actModeBasetenModelId),t.actModeBasetenModelInfo!==void 0&&Zt.encode(t.actModeBasetenModelInfo,e.uint32(1826).fork()).join(),t.actModeVercelAiGatewayModelId!==void 0&&e.uint32(1834).string(t.actModeVercelAiGatewayModelId),t.actModeVercelAiGatewayModelInfo!==void 0&&Zt.encode(t.actModeVercelAiGatewayModelInfo,e.uint32(1842).fork()).join(),t.actModeAihubmixModelId!==void 0&&e.uint32(1890).string(t.actModeAihubmixModelId),t.actModeAihubmixModelInfo!==void 0&&pa.encode(t.actModeAihubmixModelInfo,e.uint32(1898).fork()).join(),t.actModeNousResearchModelId!==void 0&&e.uint32(1906).string(t.actModeNousResearchModelId),t.geminiActModeThinkingLevel!==void 0&&e.uint32(1914).string(t.geminiActModeThinkingLevel),t.actModeDiracModelId!==void 0&&e.uint32(1922).string(t.actModeDiracModelId),t.actModeDiracModelInfo!==void 0&&Zt.encode(t.actModeDiracModelInfo,e.uint32(1930).fork()).join(),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=SLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.apiKey=r.string();continue}case 2:{if(o!==18)break;a.diracApiKey=r.string();continue}case 3:{if(o!==26)break;a.ulid=r.string();continue}case 4:{if(o!==34)break;a.liteLlmBaseUrl=r.string();continue}case 5:{if(o!==42)break;a.liteLlmApiKey=r.string();continue}case 6:{if(o!==48)break;a.liteLlmUsePromptCache=r.bool();continue}case 7:{if(o!==58)break;let n=Het.decode(r,r.uint32());n.value!==void 0&&(a.openAiHeaders[n.key]=n.value);continue}case 8:{if(o!==66)break;a.anthropicBaseUrl=r.string();continue}case 9:{if(o!==74)break;a.openRouterApiKey=r.string();continue}case 10:{if(o!==82)break;a.openRouterProviderSorting=r.string();continue}case 11:{if(o!==90)break;a.awsAccessKey=r.string();continue}case 12:{if(o!==98)break;a.awsSecretKey=r.string();continue}case 13:{if(o!==106)break;a.awsSessionToken=r.string();continue}case 14:{if(o!==114)break;a.awsRegion=r.string();continue}case 15:{if(o!==120)break;a.awsUseCrossRegionInference=r.bool();continue}case 16:{if(o!==128)break;a.awsBedrockUsePromptCache=r.bool();continue}case 17:{if(o!==136)break;a.awsUseProfile=r.bool();continue}case 18:{if(o!==146)break;a.awsProfile=r.string();continue}case 19:{if(o!==154)break;a.awsBedrockEndpoint=r.string();continue}case 20:{if(o!==162)break;a.claudeCodePath=r.string();continue}case 21:{if(o!==170)break;a.vertexProjectId=r.string();continue}case 22:{if(o!==178)break;a.vertexRegion=r.string();continue}case 23:{if(o!==186)break;a.openAiBaseUrl=r.string();continue}case 24:{if(o!==194)break;a.openAiApiKey=r.string();continue}case 27:{if(o!==218)break;a.lmStudioBaseUrl=r.string();continue}case 28:{if(o!==226)break;a.geminiApiKey=r.string();continue}case 29:{if(o!==234)break;a.geminiBaseUrl=r.string();continue}case 30:{if(o!==242)break;a.openAiNativeApiKey=r.string();continue}case 31:{if(o!==250)break;a.deepSeekApiKey=r.string();continue}case 32:{if(o!==258)break;a.requestyApiKey=r.string();continue}case 33:{if(o!==266)break;a.requestyBaseUrl=r.string();continue}case 34:{if(o!==274)break;a.togetherApiKey=r.string();continue}case 35:{if(o!==282)break;a.fireworksApiKey=r.string();continue}case 36:{if(o!==288)break;a.fireworksModelMaxCompletionTokens=OA(r.int64());continue}case 37:{if(o!==296)break;a.fireworksModelMaxTokens=OA(r.int64());continue}case 38:{if(o!==306)break;a.qwenApiKey=r.string();continue}case 39:{if(o!==314)break;a.doubaoApiKey=r.string();continue}case 40:{if(o!==322)break;a.mistralApiKey=r.string();continue}case 41:{if(o!==330)break;a.azureApiVersion=r.string();continue}case 42:{if(o!==338)break;a.qwenApiLine=r.string();continue}case 43:{if(o!==346)break;a.nebiusApiKey=r.string();continue}case 46:{if(o!==370)break;a.xaiApiKey=r.string();continue}case 47:{if(o!==378)break;a.sambanovaApiKey=r.string();continue}case 48:{if(o!==386)break;a.cerebrasApiKey=r.string();continue}case 49:{if(o!==392)break;a.requestTimeoutMs=OA(r.int64());continue}case 56:{if(o!==450)break;a.moonshotApiKey=r.string();continue}case 57:{if(o!==458)break;a.moonshotApiLine=r.string();continue}case 58:{if(o!==466)break;a.awsAuthentication=r.string();continue}case 59:{if(o!==474)break;a.awsBedrockApiKey=r.string();continue}case 61:{if(o!==490)break;a.groqApiKey=r.string();continue}case 62:{if(o!==498)break;a.huggingFaceApiKey=r.string();continue}case 63:{if(o!==506)break;a.huaweiCloudMaasApiKey=r.string();continue}case 64:{if(o!==514)break;a.basetenApiKey=r.string();continue}case 66:{if(o!==530)break;a.zaiApiKey=r.string();continue}case 67:{if(o!==538)break;a.zaiApiLine=r.string();continue}case 68:{if(o!==546)break;a.lmStudioMaxTokens=r.string();continue}case 69:{if(o!==554)break;a.vercelAiGatewayApiKey=r.string();continue}case 70:{if(o!==562)break;a.qwenCodeOauthPath=r.string();continue}case 71:{if(o!==570)break;a.difyApiKey=r.string();continue}case 72:{if(o!==578)break;a.difyBaseUrl=r.string();continue}case 77:{if(o!==616)break;a.awsUseGlobalInference=r.bool();continue}case 78:{if(o!==626)break;a.minimaxApiKey=r.string();continue}case 79:{if(o!==634)break;a.minimaxApiLine=r.string();continue}case 82:{if(o!==658)break;a.aihubmixApiKey=r.string();continue}case 83:{if(o!==666)break;a.aihubmixBaseUrl=r.string();continue}case 84:{if(o!==674)break;a.aihubmixAppCode=r.string();continue}case 85:{if(o!==682)break;a.nousResearchApiKey=r.string();continue}case 86:{if(o!==688)break;a.azureIdentity=r.bool();continue}case 87:{if(o!==698)break;a.wandbApiKey=r.string();continue}case 100:{if(o!==800)break;a.planModeApiProvider=r.int32();continue}case 101:{if(o!==810)break;a.planModeApiModelId=r.string();continue}case 102:{if(o!==816)break;a.planModeThinkingBudgetTokens=OA(r.int64());continue}case 103:{if(o!==826)break;a.planModeReasoningEffort=r.string();continue}case 104:{if(o!==834)break;a.planModeVsCodeLmModelSelector=js.decode(r,r.uint32());continue}case 105:{if(o!==840)break;a.planModeAwsBedrockCustomSelected=r.bool();continue}case 106:{if(o!==850)break;a.planModeAwsBedrockCustomModelBaseId=r.string();continue}case 107:{if(o!==858)break;a.planModeOpenRouterModelId=r.string();continue}case 108:{if(o!==866)break;a.planModeOpenRouterModelInfo=Zt.decode(r,r.uint32());continue}case 109:{if(o!==874)break;a.planModeOpenAiModelId=r.string();continue}case 110:{if(o!==882)break;a.planModeOpenAiModelInfo=pa.decode(r,r.uint32());continue}case 112:{if(o!==898)break;a.planModeLmStudioModelId=r.string();continue}case 113:{if(o!==906)break;a.planModeLiteLlmModelId=r.string();continue}case 114:{if(o!==914)break;a.planModeLiteLlmModelInfo=Nu.decode(r,r.uint32());continue}case 115:{if(o!==922)break;a.planModeRequestyModelId=r.string();continue}case 116:{if(o!==930)break;a.planModeRequestyModelInfo=Zt.decode(r,r.uint32());continue}case 117:{if(o!==938)break;a.planModeTogetherModelId=r.string();continue}case 118:{if(o!==946)break;a.planModeFireworksModelId=r.string();continue}case 121:{if(o!==970)break;a.planModeGroqModelId=r.string();continue}case 122:{if(o!==978)break;a.planModeGroqModelInfo=Zt.decode(r,r.uint32());continue}case 123:{if(o!==986)break;a.planModeHuggingFaceModelId=r.string();continue}case 124:{if(o!==994)break;a.planModeHuggingFaceModelInfo=Zt.decode(r,r.uint32());continue}case 125:{if(o!==1002)break;a.planModeHuaweiCloudMaasModelId=r.string();continue}case 126:{if(o!==1010)break;a.planModeHuaweiCloudMaasModelInfo=Zt.decode(r,r.uint32());continue}case 127:{if(o!==1018)break;a.planModeBasetenModelId=r.string();continue}case 128:{if(o!==1026)break;a.planModeBasetenModelInfo=Zt.decode(r,r.uint32());continue}case 129:{if(o!==1034)break;a.planModeVercelAiGatewayModelId=r.string();continue}case 130:{if(o!==1042)break;a.planModeVercelAiGatewayModelInfo=Zt.decode(r,r.uint32());continue}case 136:{if(o!==1090)break;a.planModeAihubmixModelId=r.string();continue}case 137:{if(o!==1098)break;a.planModeAihubmixModelInfo=pa.decode(r,r.uint32());continue}case 138:{if(o!==1106)break;a.planModeNousResearchModelId=r.string();continue}case 139:{if(o!==1114)break;a.geminiPlanModeThinkingLevel=r.string();continue}case 140:{if(o!==1122)break;a.planModeDiracModelId=r.string();continue}case 141:{if(o!==1130)break;a.planModeDiracModelInfo=Zt.decode(r,r.uint32());continue}case 200:{if(o!==1600)break;a.actModeApiProvider=r.int32();continue}case 201:{if(o!==1610)break;a.actModeApiModelId=r.string();continue}case 202:{if(o!==1616)break;a.actModeThinkingBudgetTokens=OA(r.int64());continue}case 203:{if(o!==1626)break;a.actModeReasoningEffort=r.string();continue}case 204:{if(o!==1634)break;a.actModeVsCodeLmModelSelector=js.decode(r,r.uint32());continue}case 205:{if(o!==1640)break;a.actModeAwsBedrockCustomSelected=r.bool();continue}case 206:{if(o!==1650)break;a.actModeAwsBedrockCustomModelBaseId=r.string();continue}case 207:{if(o!==1658)break;a.actModeOpenRouterModelId=r.string();continue}case 208:{if(o!==1666)break;a.actModeOpenRouterModelInfo=Zt.decode(r,r.uint32());continue}case 209:{if(o!==1674)break;a.actModeOpenAiModelId=r.string();continue}case 210:{if(o!==1682)break;a.actModeOpenAiModelInfo=pa.decode(r,r.uint32());continue}case 212:{if(o!==1698)break;a.actModeLmStudioModelId=r.string();continue}case 213:{if(o!==1706)break;a.actModeLiteLlmModelId=r.string();continue}case 214:{if(o!==1714)break;a.actModeLiteLlmModelInfo=Nu.decode(r,r.uint32());continue}case 215:{if(o!==1722)break;a.actModeRequestyModelId=r.string();continue}case 216:{if(o!==1730)break;a.actModeRequestyModelInfo=Zt.decode(r,r.uint32());continue}case 217:{if(o!==1738)break;a.actModeTogetherModelId=r.string();continue}case 218:{if(o!==1746)break;a.actModeFireworksModelId=r.string();continue}case 221:{if(o!==1770)break;a.actModeGroqModelId=r.string();continue}case 222:{if(o!==1778)break;a.actModeGroqModelInfo=Zt.decode(r,r.uint32());continue}case 223:{if(o!==1786)break;a.actModeHuggingFaceModelId=r.string();continue}case 224:{if(o!==1794)break;a.actModeHuggingFaceModelInfo=Zt.decode(r,r.uint32());continue}case 225:{if(o!==1802)break;a.actModeHuaweiCloudMaasModelId=r.string();continue}case 226:{if(o!==1810)break;a.actModeHuaweiCloudMaasModelInfo=Zt.decode(r,r.uint32());continue}case 227:{if(o!==1818)break;a.actModeBasetenModelId=r.string();continue}case 228:{if(o!==1826)break;a.actModeBasetenModelInfo=Zt.decode(r,r.uint32());continue}case 229:{if(o!==1834)break;a.actModeVercelAiGatewayModelId=r.string();continue}case 230:{if(o!==1842)break;a.actModeVercelAiGatewayModelInfo=Zt.decode(r,r.uint32());continue}case 236:{if(o!==1890)break;a.actModeAihubmixModelId=r.string();continue}case 237:{if(o!==1898)break;a.actModeAihubmixModelInfo=pa.decode(r,r.uint32());continue}case 238:{if(o!==1906)break;a.actModeNousResearchModelId=r.string();continue}case 239:{if(o!==1914)break;a.geminiActModeThinkingLevel=r.string();continue}case 240:{if(o!==1922)break;a.actModeDiracModelId=r.string();continue}case 241:{if(o!==1930)break;a.actModeDiracModelInfo=Zt.decode(r,r.uint32());continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{apiKey:rt(t.apiKey)?globalThis.String(t.apiKey):rt(t.api_key)?globalThis.String(t.api_key):void 0,diracApiKey:rt(t.diracApiKey)?globalThis.String(t.diracApiKey):rt(t.dirac_api_key)?globalThis.String(t.dirac_api_key):void 0,ulid:rt(t.ulid)?globalThis.String(t.ulid):void 0,liteLlmBaseUrl:rt(t.liteLlmBaseUrl)?globalThis.String(t.liteLlmBaseUrl):rt(t.lite_llm_base_url)?globalThis.String(t.lite_llm_base_url):void 0,liteLlmApiKey:rt(t.liteLlmApiKey)?globalThis.String(t.liteLlmApiKey):rt(t.lite_llm_api_key)?globalThis.String(t.lite_llm_api_key):void 0,liteLlmUsePromptCache:rt(t.liteLlmUsePromptCache)?globalThis.Boolean(t.liteLlmUsePromptCache):rt(t.lite_llm_use_prompt_cache)?globalThis.Boolean(t.lite_llm_use_prompt_cache):void 0,openAiHeaders:Bhe(t.openAiHeaders)?globalThis.Object.entries(t.openAiHeaders).reduce((e,[r,i])=>(e[r]=globalThis.String(i),e),{}):Bhe(t.open_ai_headers)?globalThis.Object.entries(t.open_ai_headers).reduce((e,[r,i])=>(e[r]=globalThis.String(i),e),{}):{},anthropicBaseUrl:rt(t.anthropicBaseUrl)?globalThis.String(t.anthropicBaseUrl):rt(t.anthropic_base_url)?globalThis.String(t.anthropic_base_url):void 0,openRouterApiKey:rt(t.openRouterApiKey)?globalThis.String(t.openRouterApiKey):rt(t.open_router_api_key)?globalThis.String(t.open_router_api_key):void 0,openRouterProviderSorting:rt(t.openRouterProviderSorting)?globalThis.String(t.openRouterProviderSorting):rt(t.open_router_provider_sorting)?globalThis.String(t.open_router_provider_sorting):void 0,awsAccessKey:rt(t.awsAccessKey)?globalThis.String(t.awsAccessKey):rt(t.aws_access_key)?globalThis.String(t.aws_access_key):void 0,awsSecretKey:rt(t.awsSecretKey)?globalThis.String(t.awsSecretKey):rt(t.aws_secret_key)?globalThis.String(t.aws_secret_key):void 0,awsSessionToken:rt(t.awsSessionToken)?globalThis.String(t.awsSessionToken):rt(t.aws_session_token)?globalThis.String(t.aws_session_token):void 0,awsRegion:rt(t.awsRegion)?globalThis.String(t.awsRegion):rt(t.aws_region)?globalThis.String(t.aws_region):void 0,awsUseCrossRegionInference:rt(t.awsUseCrossRegionInference)?globalThis.Boolean(t.awsUseCrossRegionInference):rt(t.aws_use_cross_region_inference)?globalThis.Boolean(t.aws_use_cross_region_inference):void 0,awsBedrockUsePromptCache:rt(t.awsBedrockUsePromptCache)?globalThis.Boolean(t.awsBedrockUsePromptCache):rt(t.aws_bedrock_use_prompt_cache)?globalThis.Boolean(t.aws_bedrock_use_prompt_cache):void 0,awsUseProfile:rt(t.awsUseProfile)?globalThis.Boolean(t.awsUseProfile):rt(t.aws_use_profile)?globalThis.Boolean(t.aws_use_profile):void 0,awsProfile:rt(t.awsProfile)?globalThis.String(t.awsProfile):rt(t.aws_profile)?globalThis.String(t.aws_profile):void 0,awsBedrockEndpoint:rt(t.awsBedrockEndpoint)?globalThis.String(t.awsBedrockEndpoint):rt(t.aws_bedrock_endpoint)?globalThis.String(t.aws_bedrock_endpoint):void 0,claudeCodePath:rt(t.claudeCodePath)?globalThis.String(t.claudeCodePath):rt(t.claude_code_path)?globalThis.String(t.claude_code_path):void 0,vertexProjectId:rt(t.vertexProjectId)?globalThis.String(t.vertexProjectId):rt(t.vertex_project_id)?globalThis.String(t.vertex_project_id):void 0,vertexRegion:rt(t.vertexRegion)?globalThis.String(t.vertexRegion):rt(t.vertex_region)?globalThis.String(t.vertex_region):void 0,openAiBaseUrl:rt(t.openAiBaseUrl)?globalThis.String(t.openAiBaseUrl):rt(t.open_ai_base_url)?globalThis.String(t.open_ai_base_url):void 0,openAiApiKey:rt(t.openAiApiKey)?globalThis.String(t.openAiApiKey):rt(t.open_ai_api_key)?globalThis.String(t.open_ai_api_key):void 0,lmStudioBaseUrl:rt(t.lmStudioBaseUrl)?globalThis.String(t.lmStudioBaseUrl):rt(t.lm_studio_base_url)?globalThis.String(t.lm_studio_base_url):void 0,geminiApiKey:rt(t.geminiApiKey)?globalThis.String(t.geminiApiKey):rt(t.gemini_api_key)?globalThis.String(t.gemini_api_key):void 0,geminiBaseUrl:rt(t.geminiBaseUrl)?globalThis.String(t.geminiBaseUrl):rt(t.gemini_base_url)?globalThis.String(t.gemini_base_url):void 0,openAiNativeApiKey:rt(t.openAiNativeApiKey)?globalThis.String(t.openAiNativeApiKey):rt(t.open_ai_native_api_key)?globalThis.String(t.open_ai_native_api_key):void 0,deepSeekApiKey:rt(t.deepSeekApiKey)?globalThis.String(t.deepSeekApiKey):rt(t.deep_seek_api_key)?globalThis.String(t.deep_seek_api_key):void 0,requestyApiKey:rt(t.requestyApiKey)?globalThis.String(t.requestyApiKey):rt(t.requesty_api_key)?globalThis.String(t.requesty_api_key):void 0,requestyBaseUrl:rt(t.requestyBaseUrl)?globalThis.String(t.requestyBaseUrl):rt(t.requesty_base_url)?globalThis.String(t.requesty_base_url):void 0,togetherApiKey:rt(t.togetherApiKey)?globalThis.String(t.togetherApiKey):rt(t.together_api_key)?globalThis.String(t.together_api_key):void 0,fireworksApiKey:rt(t.fireworksApiKey)?globalThis.String(t.fireworksApiKey):rt(t.fireworks_api_key)?globalThis.String(t.fireworks_api_key):void 0,fireworksModelMaxCompletionTokens:rt(t.fireworksModelMaxCompletionTokens)?globalThis.Number(t.fireworksModelMaxCompletionTokens):rt(t.fireworks_model_max_completion_tokens)?globalThis.Number(t.fireworks_model_max_completion_tokens):void 0,fireworksModelMaxTokens:rt(t.fireworksModelMaxTokens)?globalThis.Number(t.fireworksModelMaxTokens):rt(t.fireworks_model_max_tokens)?globalThis.Number(t.fireworks_model_max_tokens):void 0,qwenApiKey:rt(t.qwenApiKey)?globalThis.String(t.qwenApiKey):rt(t.qwen_api_key)?globalThis.String(t.qwen_api_key):void 0,doubaoApiKey:rt(t.doubaoApiKey)?globalThis.String(t.doubaoApiKey):rt(t.doubao_api_key)?globalThis.String(t.doubao_api_key):void 0,mistralApiKey:rt(t.mistralApiKey)?globalThis.String(t.mistralApiKey):rt(t.mistral_api_key)?globalThis.String(t.mistral_api_key):void 0,azureApiVersion:rt(t.azureApiVersion)?globalThis.String(t.azureApiVersion):rt(t.azure_api_version)?globalThis.String(t.azure_api_version):void 0,qwenApiLine:rt(t.qwenApiLine)?globalThis.String(t.qwenApiLine):rt(t.qwen_api_line)?globalThis.String(t.qwen_api_line):void 0,nebiusApiKey:rt(t.nebiusApiKey)?globalThis.String(t.nebiusApiKey):rt(t.nebius_api_key)?globalThis.String(t.nebius_api_key):void 0,xaiApiKey:rt(t.xaiApiKey)?globalThis.String(t.xaiApiKey):rt(t.xai_api_key)?globalThis.String(t.xai_api_key):void 0,sambanovaApiKey:rt(t.sambanovaApiKey)?globalThis.String(t.sambanovaApiKey):rt(t.sambanova_api_key)?globalThis.String(t.sambanova_api_key):void 0,cerebrasApiKey:rt(t.cerebrasApiKey)?globalThis.String(t.cerebrasApiKey):rt(t.cerebras_api_key)?globalThis.String(t.cerebras_api_key):void 0,requestTimeoutMs:rt(t.requestTimeoutMs)?globalThis.Number(t.requestTimeoutMs):rt(t.request_timeout_ms)?globalThis.Number(t.request_timeout_ms):void 0,moonshotApiKey:rt(t.moonshotApiKey)?globalThis.String(t.moonshotApiKey):rt(t.moonshot_api_key)?globalThis.String(t.moonshot_api_key):void 0,moonshotApiLine:rt(t.moonshotApiLine)?globalThis.String(t.moonshotApiLine):rt(t.moonshot_api_line)?globalThis.String(t.moonshot_api_line):void 0,awsAuthentication:rt(t.awsAuthentication)?globalThis.String(t.awsAuthentication):rt(t.aws_authentication)?globalThis.String(t.aws_authentication):void 0,awsBedrockApiKey:rt(t.awsBedrockApiKey)?globalThis.String(t.awsBedrockApiKey):rt(t.aws_bedrock_api_key)?globalThis.String(t.aws_bedrock_api_key):void 0,groqApiKey:rt(t.groqApiKey)?globalThis.String(t.groqApiKey):rt(t.groq_api_key)?globalThis.String(t.groq_api_key):void 0,huggingFaceApiKey:rt(t.huggingFaceApiKey)?globalThis.String(t.huggingFaceApiKey):rt(t.hugging_face_api_key)?globalThis.String(t.hugging_face_api_key):void 0,huaweiCloudMaasApiKey:rt(t.huaweiCloudMaasApiKey)?globalThis.String(t.huaweiCloudMaasApiKey):rt(t.huawei_cloud_maas_api_key)?globalThis.String(t.huawei_cloud_maas_api_key):void 0,basetenApiKey:rt(t.basetenApiKey)?globalThis.String(t.basetenApiKey):rt(t.baseten_api_key)?globalThis.String(t.baseten_api_key):void 0,zaiApiKey:rt(t.zaiApiKey)?globalThis.String(t.zaiApiKey):rt(t.zai_api_key)?globalThis.String(t.zai_api_key):void 0,zaiApiLine:rt(t.zaiApiLine)?globalThis.String(t.zaiApiLine):rt(t.zai_api_line)?globalThis.String(t.zai_api_line):void 0,lmStudioMaxTokens:rt(t.lmStudioMaxTokens)?globalThis.String(t.lmStudioMaxTokens):rt(t.lm_studio_max_tokens)?globalThis.String(t.lm_studio_max_tokens):void 0,vercelAiGatewayApiKey:rt(t.vercelAiGatewayApiKey)?globalThis.String(t.vercelAiGatewayApiKey):rt(t.vercel_ai_gateway_api_key)?globalThis.String(t.vercel_ai_gateway_api_key):void 0,qwenCodeOauthPath:rt(t.qwenCodeOauthPath)?globalThis.String(t.qwenCodeOauthPath):rt(t.qwen_code_oauth_path)?globalThis.String(t.qwen_code_oauth_path):void 0,difyApiKey:rt(t.difyApiKey)?globalThis.String(t.difyApiKey):rt(t.dify_api_key)?globalThis.String(t.dify_api_key):void 0,difyBaseUrl:rt(t.difyBaseUrl)?globalThis.String(t.difyBaseUrl):rt(t.dify_base_url)?globalThis.String(t.dify_base_url):void 0,awsUseGlobalInference:rt(t.awsUseGlobalInference)?globalThis.Boolean(t.awsUseGlobalInference):rt(t.aws_use_global_inference)?globalThis.Boolean(t.aws_use_global_inference):void 0,minimaxApiKey:rt(t.minimaxApiKey)?globalThis.String(t.minimaxApiKey):rt(t.minimax_api_key)?globalThis.String(t.minimax_api_key):void 0,minimaxApiLine:rt(t.minimaxApiLine)?globalThis.String(t.minimaxApiLine):rt(t.minimax_api_line)?globalThis.String(t.minimax_api_line):void 0,aihubmixApiKey:rt(t.aihubmixApiKey)?globalThis.String(t.aihubmixApiKey):rt(t.aihubmix_api_key)?globalThis.String(t.aihubmix_api_key):void 0,aihubmixBaseUrl:rt(t.aihubmixBaseUrl)?globalThis.String(t.aihubmixBaseUrl):rt(t.aihubmix_base_url)?globalThis.String(t.aihubmix_base_url):void 0,aihubmixAppCode:rt(t.aihubmixAppCode)?globalThis.String(t.aihubmixAppCode):rt(t.aihubmix_app_code)?globalThis.String(t.aihubmix_app_code):void 0,nousResearchApiKey:rt(t.nousResearchApiKey)?globalThis.String(t.nousResearchApiKey):rt(t.nous_research_api_key)?globalThis.String(t.nous_research_api_key):void 0,azureIdentity:rt(t.azureIdentity)?globalThis.Boolean(t.azureIdentity):rt(t.azure_identity)?globalThis.Boolean(t.azure_identity):void 0,wandbApiKey:rt(t.wandbApiKey)?globalThis.String(t.wandbApiKey):rt(t.wandb_api_key)?globalThis.String(t.wandb_api_key):void 0,planModeApiProvider:rt(t.planModeApiProvider)?$x(t.planModeApiProvider):rt(t.plan_mode_api_provider)?$x(t.plan_mode_api_provider):void 0,planModeApiModelId:rt(t.planModeApiModelId)?globalThis.String(t.planModeApiModelId):rt(t.plan_mode_api_model_id)?globalThis.String(t.plan_mode_api_model_id):void 0,planModeThinkingBudgetTokens:rt(t.planModeThinkingBudgetTokens)?globalThis.Number(t.planModeThinkingBudgetTokens):rt(t.plan_mode_thinking_budget_tokens)?globalThis.Number(t.plan_mode_thinking_budget_tokens):void 0,planModeReasoningEffort:rt(t.planModeReasoningEffort)?globalThis.String(t.planModeReasoningEffort):rt(t.plan_mode_reasoning_effort)?globalThis.String(t.plan_mode_reasoning_effort):void 0,planModeVsCodeLmModelSelector:rt(t.planModeVsCodeLmModelSelector)?js.fromJSON(t.planModeVsCodeLmModelSelector):rt(t.plan_mode_vs_code_lm_model_selector)?js.fromJSON(t.plan_mode_vs_code_lm_model_selector):void 0,planModeAwsBedrockCustomSelected:rt(t.planModeAwsBedrockCustomSelected)?globalThis.Boolean(t.planModeAwsBedrockCustomSelected):rt(t.plan_mode_aws_bedrock_custom_selected)?globalThis.Boolean(t.plan_mode_aws_bedrock_custom_selected):void 0,planModeAwsBedrockCustomModelBaseId:rt(t.planModeAwsBedrockCustomModelBaseId)?globalThis.String(t.planModeAwsBedrockCustomModelBaseId):rt(t.plan_mode_aws_bedrock_custom_model_base_id)?globalThis.String(t.plan_mode_aws_bedrock_custom_model_base_id):void 0,planModeOpenRouterModelId:rt(t.planModeOpenRouterModelId)?globalThis.String(t.planModeOpenRouterModelId):rt(t.plan_mode_open_router_model_id)?globalThis.String(t.plan_mode_open_router_model_id):void 0,planModeOpenRouterModelInfo:rt(t.planModeOpenRouterModelInfo)?Zt.fromJSON(t.planModeOpenRouterModelInfo):rt(t.plan_mode_open_router_model_info)?Zt.fromJSON(t.plan_mode_open_router_model_info):void 0,planModeOpenAiModelId:rt(t.planModeOpenAiModelId)?globalThis.String(t.planModeOpenAiModelId):rt(t.plan_mode_open_ai_model_id)?globalThis.String(t.plan_mode_open_ai_model_id):void 0,planModeOpenAiModelInfo:rt(t.planModeOpenAiModelInfo)?pa.fromJSON(t.planModeOpenAiModelInfo):rt(t.plan_mode_open_ai_model_info)?pa.fromJSON(t.plan_mode_open_ai_model_info):void 0,planModeLmStudioModelId:rt(t.planModeLmStudioModelId)?globalThis.String(t.planModeLmStudioModelId):rt(t.plan_mode_lm_studio_model_id)?globalThis.String(t.plan_mode_lm_studio_model_id):void 0,planModeLiteLlmModelId:rt(t.planModeLiteLlmModelId)?globalThis.String(t.planModeLiteLlmModelId):rt(t.plan_mode_lite_llm_model_id)?globalThis.String(t.plan_mode_lite_llm_model_id):void 0,planModeLiteLlmModelInfo:rt(t.planModeLiteLlmModelInfo)?Nu.fromJSON(t.planModeLiteLlmModelInfo):rt(t.plan_mode_lite_llm_model_info)?Nu.fromJSON(t.plan_mode_lite_llm_model_info):void 0,planModeRequestyModelId:rt(t.planModeRequestyModelId)?globalThis.String(t.planModeRequestyModelId):rt(t.plan_mode_requesty_model_id)?globalThis.String(t.plan_mode_requesty_model_id):void 0,planModeRequestyModelInfo:rt(t.planModeRequestyModelInfo)?Zt.fromJSON(t.planModeRequestyModelInfo):rt(t.plan_mode_requesty_model_info)?Zt.fromJSON(t.plan_mode_requesty_model_info):void 0,planModeTogetherModelId:rt(t.planModeTogetherModelId)?globalThis.String(t.planModeTogetherModelId):rt(t.plan_mode_together_model_id)?globalThis.String(t.plan_mode_together_model_id):void 0,planModeFireworksModelId:rt(t.planModeFireworksModelId)?globalThis.String(t.planModeFireworksModelId):rt(t.plan_mode_fireworks_model_id)?globalThis.String(t.plan_mode_fireworks_model_id):void 0,planModeGroqModelId:rt(t.planModeGroqModelId)?globalThis.String(t.planModeGroqModelId):rt(t.plan_mode_groq_model_id)?globalThis.String(t.plan_mode_groq_model_id):void 0,planModeGroqModelInfo:rt(t.planModeGroqModelInfo)?Zt.fromJSON(t.planModeGroqModelInfo):rt(t.plan_mode_groq_model_info)?Zt.fromJSON(t.plan_mode_groq_model_info):void 0,planModeHuggingFaceModelId:rt(t.planModeHuggingFaceModelId)?globalThis.String(t.planModeHuggingFaceModelId):rt(t.plan_mode_hugging_face_model_id)?globalThis.String(t.plan_mode_hugging_face_model_id):void 0,planModeHuggingFaceModelInfo:rt(t.planModeHuggingFaceModelInfo)?Zt.fromJSON(t.planModeHuggingFaceModelInfo):rt(t.plan_mode_hugging_face_model_info)?Zt.fromJSON(t.plan_mode_hugging_face_model_info):void 0,planModeHuaweiCloudMaasModelId:rt(t.planModeHuaweiCloudMaasModelId)?globalThis.String(t.planModeHuaweiCloudMaasModelId):rt(t.plan_mode_huawei_cloud_maas_model_id)?globalThis.String(t.plan_mode_huawei_cloud_maas_model_id):void 0,planModeHuaweiCloudMaasModelInfo:rt(t.planModeHuaweiCloudMaasModelInfo)?Zt.fromJSON(t.planModeHuaweiCloudMaasModelInfo):rt(t.plan_mode_huawei_cloud_maas_model_info)?Zt.fromJSON(t.plan_mode_huawei_cloud_maas_model_info):void 0,planModeBasetenModelId:rt(t.planModeBasetenModelId)?globalThis.String(t.planModeBasetenModelId):rt(t.plan_mode_baseten_model_id)?globalThis.String(t.plan_mode_baseten_model_id):void 0,planModeBasetenModelInfo:rt(t.planModeBasetenModelInfo)?Zt.fromJSON(t.planModeBasetenModelInfo):rt(t.plan_mode_baseten_model_info)?Zt.fromJSON(t.plan_mode_baseten_model_info):void 0,planModeVercelAiGatewayModelId:rt(t.planModeVercelAiGatewayModelId)?globalThis.String(t.planModeVercelAiGatewayModelId):rt(t.plan_mode_vercel_ai_gateway_model_id)?globalThis.String(t.plan_mode_vercel_ai_gateway_model_id):void 0,planModeVercelAiGatewayModelInfo:rt(t.planModeVercelAiGatewayModelInfo)?Zt.fromJSON(t.planModeVercelAiGatewayModelInfo):rt(t.plan_mode_vercel_ai_gateway_model_info)?Zt.fromJSON(t.plan_mode_vercel_ai_gateway_model_info):void 0,planModeAihubmixModelId:rt(t.planModeAihubmixModelId)?globalThis.String(t.planModeAihubmixModelId):rt(t.plan_mode_aihubmix_model_id)?globalThis.String(t.plan_mode_aihubmix_model_id):void 0,planModeAihubmixModelInfo:rt(t.planModeAihubmixModelInfo)?pa.fromJSON(t.planModeAihubmixModelInfo):rt(t.plan_mode_aihubmix_model_info)?pa.fromJSON(t.plan_mode_aihubmix_model_info):void 0,planModeNousResearchModelId:rt(t.planModeNousResearchModelId)?globalThis.String(t.planModeNousResearchModelId):rt(t.plan_mode_nous_research_model_id)?globalThis.String(t.plan_mode_nous_research_model_id):void 0,geminiPlanModeThinkingLevel:rt(t.geminiPlanModeThinkingLevel)?globalThis.String(t.geminiPlanModeThinkingLevel):rt(t.gemini_plan_mode_thinking_level)?globalThis.String(t.gemini_plan_mode_thinking_level):void 0,planModeDiracModelId:rt(t.planModeDiracModelId)?globalThis.String(t.planModeDiracModelId):rt(t.plan_mode_dirac_model_id)?globalThis.String(t.plan_mode_dirac_model_id):void 0,planModeDiracModelInfo:rt(t.planModeDiracModelInfo)?Zt.fromJSON(t.planModeDiracModelInfo):rt(t.plan_mode_dirac_model_info)?Zt.fromJSON(t.plan_mode_dirac_model_info):void 0,actModeApiProvider:rt(t.actModeApiProvider)?$x(t.actModeApiProvider):rt(t.act_mode_api_provider)?$x(t.act_mode_api_provider):void 0,actModeApiModelId:rt(t.actModeApiModelId)?globalThis.String(t.actModeApiModelId):rt(t.act_mode_api_model_id)?globalThis.String(t.act_mode_api_model_id):void 0,actModeThinkingBudgetTokens:rt(t.actModeThinkingBudgetTokens)?globalThis.Number(t.actModeThinkingBudgetTokens):rt(t.act_mode_thinking_budget_tokens)?globalThis.Number(t.act_mode_thinking_budget_tokens):void 0,actModeReasoningEffort:rt(t.actModeReasoningEffort)?globalThis.String(t.actModeReasoningEffort):rt(t.act_mode_reasoning_effort)?globalThis.String(t.act_mode_reasoning_effort):void 0,actModeVsCodeLmModelSelector:rt(t.actModeVsCodeLmModelSelector)?js.fromJSON(t.actModeVsCodeLmModelSelector):rt(t.act_mode_vs_code_lm_model_selector)?js.fromJSON(t.act_mode_vs_code_lm_model_selector):void 0,actModeAwsBedrockCustomSelected:rt(t.actModeAwsBedrockCustomSelected)?globalThis.Boolean(t.actModeAwsBedrockCustomSelected):rt(t.act_mode_aws_bedrock_custom_selected)?globalThis.Boolean(t.act_mode_aws_bedrock_custom_selected):void 0,actModeAwsBedrockCustomModelBaseId:rt(t.actModeAwsBedrockCustomModelBaseId)?globalThis.String(t.actModeAwsBedrockCustomModelBaseId):rt(t.act_mode_aws_bedrock_custom_model_base_id)?globalThis.String(t.act_mode_aws_bedrock_custom_model_base_id):void 0,actModeOpenRouterModelId:rt(t.actModeOpenRouterModelId)?globalThis.String(t.actModeOpenRouterModelId):rt(t.act_mode_open_router_model_id)?globalThis.String(t.act_mode_open_router_model_id):void 0,actModeOpenRouterModelInfo:rt(t.actModeOpenRouterModelInfo)?Zt.fromJSON(t.actModeOpenRouterModelInfo):rt(t.act_mode_open_router_model_info)?Zt.fromJSON(t.act_mode_open_router_model_info):void 0,actModeOpenAiModelId:rt(t.actModeOpenAiModelId)?globalThis.String(t.actModeOpenAiModelId):rt(t.act_mode_open_ai_model_id)?globalThis.String(t.act_mode_open_ai_model_id):void 0,actModeOpenAiModelInfo:rt(t.actModeOpenAiModelInfo)?pa.fromJSON(t.actModeOpenAiModelInfo):rt(t.act_mode_open_ai_model_info)?pa.fromJSON(t.act_mode_open_ai_model_info):void 0,actModeLmStudioModelId:rt(t.actModeLmStudioModelId)?globalThis.String(t.actModeLmStudioModelId):rt(t.act_mode_lm_studio_model_id)?globalThis.String(t.act_mode_lm_studio_model_id):void 0,actModeLiteLlmModelId:rt(t.actModeLiteLlmModelId)?globalThis.String(t.actModeLiteLlmModelId):rt(t.act_mode_lite_llm_model_id)?globalThis.String(t.act_mode_lite_llm_model_id):void 0,actModeLiteLlmModelInfo:rt(t.actModeLiteLlmModelInfo)?Nu.fromJSON(t.actModeLiteLlmModelInfo):rt(t.act_mode_lite_llm_model_info)?Nu.fromJSON(t.act_mode_lite_llm_model_info):void 0,actModeRequestyModelId:rt(t.actModeRequestyModelId)?globalThis.String(t.actModeRequestyModelId):rt(t.act_mode_requesty_model_id)?globalThis.String(t.act_mode_requesty_model_id):void 0,actModeRequestyModelInfo:rt(t.actModeRequestyModelInfo)?Zt.fromJSON(t.actModeRequestyModelInfo):rt(t.act_mode_requesty_model_info)?Zt.fromJSON(t.act_mode_requesty_model_info):void 0,actModeTogetherModelId:rt(t.actModeTogetherModelId)?globalThis.String(t.actModeTogetherModelId):rt(t.act_mode_together_model_id)?globalThis.String(t.act_mode_together_model_id):void 0,actModeFireworksModelId:rt(t.actModeFireworksModelId)?globalThis.String(t.actModeFireworksModelId):rt(t.act_mode_fireworks_model_id)?globalThis.String(t.act_mode_fireworks_model_id):void 0,actModeGroqModelId:rt(t.actModeGroqModelId)?globalThis.String(t.actModeGroqModelId):rt(t.act_mode_groq_model_id)?globalThis.String(t.act_mode_groq_model_id):void 0,actModeGroqModelInfo:rt(t.actModeGroqModelInfo)?Zt.fromJSON(t.actModeGroqModelInfo):rt(t.act_mode_groq_model_info)?Zt.fromJSON(t.act_mode_groq_model_info):void 0,actModeHuggingFaceModelId:rt(t.actModeHuggingFaceModelId)?globalThis.String(t.actModeHuggingFaceModelId):rt(t.act_mode_hugging_face_model_id)?globalThis.String(t.act_mode_hugging_face_model_id):void 0,actModeHuggingFaceModelInfo:rt(t.actModeHuggingFaceModelInfo)?Zt.fromJSON(t.actModeHuggingFaceModelInfo):rt(t.act_mode_hugging_face_model_info)?Zt.fromJSON(t.act_mode_hugging_face_model_info):void 0,actModeHuaweiCloudMaasModelId:rt(t.actModeHuaweiCloudMaasModelId)?globalThis.String(t.actModeHuaweiCloudMaasModelId):rt(t.act_mode_huawei_cloud_maas_model_id)?globalThis.String(t.act_mode_huawei_cloud_maas_model_id):void 0,actModeHuaweiCloudMaasModelInfo:rt(t.actModeHuaweiCloudMaasModelInfo)?Zt.fromJSON(t.actModeHuaweiCloudMaasModelInfo):rt(t.act_mode_huawei_cloud_maas_model_info)?Zt.fromJSON(t.act_mode_huawei_cloud_maas_model_info):void 0,actModeBasetenModelId:rt(t.actModeBasetenModelId)?globalThis.String(t.actModeBasetenModelId):rt(t.act_mode_baseten_model_id)?globalThis.String(t.act_mode_baseten_model_id):void 0,actModeBasetenModelInfo:rt(t.actModeBasetenModelInfo)?Zt.fromJSON(t.actModeBasetenModelInfo):rt(t.act_mode_baseten_model_info)?Zt.fromJSON(t.act_mode_baseten_model_info):void 0,actModeVercelAiGatewayModelId:rt(t.actModeVercelAiGatewayModelId)?globalThis.String(t.actModeVercelAiGatewayModelId):rt(t.act_mode_vercel_ai_gateway_model_id)?globalThis.String(t.act_mode_vercel_ai_gateway_model_id):void 0,actModeVercelAiGatewayModelInfo:rt(t.actModeVercelAiGatewayModelInfo)?Zt.fromJSON(t.actModeVercelAiGatewayModelInfo):rt(t.act_mode_vercel_ai_gateway_model_info)?Zt.fromJSON(t.act_mode_vercel_ai_gateway_model_info):void 0,actModeAihubmixModelId:rt(t.actModeAihubmixModelId)?globalThis.String(t.actModeAihubmixModelId):rt(t.act_mode_aihubmix_model_id)?globalThis.String(t.act_mode_aihubmix_model_id):void 0,actModeAihubmixModelInfo:rt(t.actModeAihubmixModelInfo)?pa.fromJSON(t.actModeAihubmixModelInfo):rt(t.act_mode_aihubmix_model_info)?pa.fromJSON(t.act_mode_aihubmix_model_info):void 0,actModeNousResearchModelId:rt(t.actModeNousResearchModelId)?globalThis.String(t.actModeNousResearchModelId):rt(t.act_mode_nous_research_model_id)?globalThis.String(t.act_mode_nous_research_model_id):void 0,geminiActModeThinkingLevel:rt(t.geminiActModeThinkingLevel)?globalThis.String(t.geminiActModeThinkingLevel):rt(t.gemini_act_mode_thinking_level)?globalThis.String(t.gemini_act_mode_thinking_level):void 0,actModeDiracModelId:rt(t.actModeDiracModelId)?globalThis.String(t.actModeDiracModelId):rt(t.act_mode_dirac_model_id)?globalThis.String(t.act_mode_dirac_model_id):void 0,actModeDiracModelInfo:rt(t.actModeDiracModelInfo)?Zt.fromJSON(t.actModeDiracModelInfo):rt(t.act_mode_dirac_model_info)?Zt.fromJSON(t.act_mode_dirac_model_info):void 0}},toJSON(t){let e={};if(t.apiKey!==void 0&&(e.apiKey=t.apiKey),t.diracApiKey!==void 0&&(e.diracApiKey=t.diracApiKey),t.ulid!==void 0&&(e.ulid=t.ulid),t.liteLlmBaseUrl!==void 0&&(e.liteLlmBaseUrl=t.liteLlmBaseUrl),t.liteLlmApiKey!==void 0&&(e.liteLlmApiKey=t.liteLlmApiKey),t.liteLlmUsePromptCache!==void 0&&(e.liteLlmUsePromptCache=t.liteLlmUsePromptCache),t.openAiHeaders){let r=globalThis.Object.entries(t.openAiHeaders);r.length>0&&(e.openAiHeaders={},r.forEach(([i,a])=>{e.openAiHeaders[i]=a}))}return t.anthropicBaseUrl!==void 0&&(e.anthropicBaseUrl=t.anthropicBaseUrl),t.openRouterApiKey!==void 0&&(e.openRouterApiKey=t.openRouterApiKey),t.openRouterProviderSorting!==void 0&&(e.openRouterProviderSorting=t.openRouterProviderSorting),t.awsAccessKey!==void 0&&(e.awsAccessKey=t.awsAccessKey),t.awsSecretKey!==void 0&&(e.awsSecretKey=t.awsSecretKey),t.awsSessionToken!==void 0&&(e.awsSessionToken=t.awsSessionToken),t.awsRegion!==void 0&&(e.awsRegion=t.awsRegion),t.awsUseCrossRegionInference!==void 0&&(e.awsUseCrossRegionInference=t.awsUseCrossRegionInference),t.awsBedrockUsePromptCache!==void 0&&(e.awsBedrockUsePromptCache=t.awsBedrockUsePromptCache),t.awsUseProfile!==void 0&&(e.awsUseProfile=t.awsUseProfile),t.awsProfile!==void 0&&(e.awsProfile=t.awsProfile),t.awsBedrockEndpoint!==void 0&&(e.awsBedrockEndpoint=t.awsBedrockEndpoint),t.claudeCodePath!==void 0&&(e.claudeCodePath=t.claudeCodePath),t.vertexProjectId!==void 0&&(e.vertexProjectId=t.vertexProjectId),t.vertexRegion!==void 0&&(e.vertexRegion=t.vertexRegion),t.openAiBaseUrl!==void 0&&(e.openAiBaseUrl=t.openAiBaseUrl),t.openAiApiKey!==void 0&&(e.openAiApiKey=t.openAiApiKey),t.lmStudioBaseUrl!==void 0&&(e.lmStudioBaseUrl=t.lmStudioBaseUrl),t.geminiApiKey!==void 0&&(e.geminiApiKey=t.geminiApiKey),t.geminiBaseUrl!==void 0&&(e.geminiBaseUrl=t.geminiBaseUrl),t.openAiNativeApiKey!==void 0&&(e.openAiNativeApiKey=t.openAiNativeApiKey),t.deepSeekApiKey!==void 0&&(e.deepSeekApiKey=t.deepSeekApiKey),t.requestyApiKey!==void 0&&(e.requestyApiKey=t.requestyApiKey),t.requestyBaseUrl!==void 0&&(e.requestyBaseUrl=t.requestyBaseUrl),t.togetherApiKey!==void 0&&(e.togetherApiKey=t.togetherApiKey),t.fireworksApiKey!==void 0&&(e.fireworksApiKey=t.fireworksApiKey),t.fireworksModelMaxCompletionTokens!==void 0&&(e.fireworksModelMaxCompletionTokens=Math.round(t.fireworksModelMaxCompletionTokens)),t.fireworksModelMaxTokens!==void 0&&(e.fireworksModelMaxTokens=Math.round(t.fireworksModelMaxTokens)),t.qwenApiKey!==void 0&&(e.qwenApiKey=t.qwenApiKey),t.doubaoApiKey!==void 0&&(e.doubaoApiKey=t.doubaoApiKey),t.mistralApiKey!==void 0&&(e.mistralApiKey=t.mistralApiKey),t.azureApiVersion!==void 0&&(e.azureApiVersion=t.azureApiVersion),t.qwenApiLine!==void 0&&(e.qwenApiLine=t.qwenApiLine),t.nebiusApiKey!==void 0&&(e.nebiusApiKey=t.nebiusApiKey),t.xaiApiKey!==void 0&&(e.xaiApiKey=t.xaiApiKey),t.sambanovaApiKey!==void 0&&(e.sambanovaApiKey=t.sambanovaApiKey),t.cerebrasApiKey!==void 0&&(e.cerebrasApiKey=t.cerebrasApiKey),t.requestTimeoutMs!==void 0&&(e.requestTimeoutMs=Math.round(t.requestTimeoutMs)),t.moonshotApiKey!==void 0&&(e.moonshotApiKey=t.moonshotApiKey),t.moonshotApiLine!==void 0&&(e.moonshotApiLine=t.moonshotApiLine),t.awsAuthentication!==void 0&&(e.awsAuthentication=t.awsAuthentication),t.awsBedrockApiKey!==void 0&&(e.awsBedrockApiKey=t.awsBedrockApiKey),t.groqApiKey!==void 0&&(e.groqApiKey=t.groqApiKey),t.huggingFaceApiKey!==void 0&&(e.huggingFaceApiKey=t.huggingFaceApiKey),t.huaweiCloudMaasApiKey!==void 0&&(e.huaweiCloudMaasApiKey=t.huaweiCloudMaasApiKey),t.basetenApiKey!==void 0&&(e.basetenApiKey=t.basetenApiKey),t.zaiApiKey!==void 0&&(e.zaiApiKey=t.zaiApiKey),t.zaiApiLine!==void 0&&(e.zaiApiLine=t.zaiApiLine),t.lmStudioMaxTokens!==void 0&&(e.lmStudioMaxTokens=t.lmStudioMaxTokens),t.vercelAiGatewayApiKey!==void 0&&(e.vercelAiGatewayApiKey=t.vercelAiGatewayApiKey),t.qwenCodeOauthPath!==void 0&&(e.qwenCodeOauthPath=t.qwenCodeOauthPath),t.difyApiKey!==void 0&&(e.difyApiKey=t.difyApiKey),t.difyBaseUrl!==void 0&&(e.difyBaseUrl=t.difyBaseUrl),t.awsUseGlobalInference!==void 0&&(e.awsUseGlobalInference=t.awsUseGlobalInference),t.minimaxApiKey!==void 0&&(e.minimaxApiKey=t.minimaxApiKey),t.minimaxApiLine!==void 0&&(e.minimaxApiLine=t.minimaxApiLine),t.aihubmixApiKey!==void 0&&(e.aihubmixApiKey=t.aihubmixApiKey),t.aihubmixBaseUrl!==void 0&&(e.aihubmixBaseUrl=t.aihubmixBaseUrl),t.aihubmixAppCode!==void 0&&(e.aihubmixAppCode=t.aihubmixAppCode),t.nousResearchApiKey!==void 0&&(e.nousResearchApiKey=t.nousResearchApiKey),t.azureIdentity!==void 0&&(e.azureIdentity=t.azureIdentity),t.wandbApiKey!==void 0&&(e.wandbApiKey=t.wandbApiKey),t.planModeApiProvider!==void 0&&(e.planModeApiProvider=Hq(t.planModeApiProvider)),t.planModeApiModelId!==void 0&&(e.planModeApiModelId=t.planModeApiModelId),t.planModeThinkingBudgetTokens!==void 0&&(e.planModeThinkingBudgetTokens=Math.round(t.planModeThinkingBudgetTokens)),t.planModeReasoningEffort!==void 0&&(e.planModeReasoningEffort=t.planModeReasoningEffort),t.planModeVsCodeLmModelSelector!==void 0&&(e.planModeVsCodeLmModelSelector=js.toJSON(t.planModeVsCodeLmModelSelector)),t.planModeAwsBedrockCustomSelected!==void 0&&(e.planModeAwsBedrockCustomSelected=t.planModeAwsBedrockCustomSelected),t.planModeAwsBedrockCustomModelBaseId!==void 0&&(e.planModeAwsBedrockCustomModelBaseId=t.planModeAwsBedrockCustomModelBaseId),t.planModeOpenRouterModelId!==void 0&&(e.planModeOpenRouterModelId=t.planModeOpenRouterModelId),t.planModeOpenRouterModelInfo!==void 0&&(e.planModeOpenRouterModelInfo=Zt.toJSON(t.planModeOpenRouterModelInfo)),t.planModeOpenAiModelId!==void 0&&(e.planModeOpenAiModelId=t.planModeOpenAiModelId),t.planModeOpenAiModelInfo!==void 0&&(e.planModeOpenAiModelInfo=pa.toJSON(t.planModeOpenAiModelInfo)),t.planModeLmStudioModelId!==void 0&&(e.planModeLmStudioModelId=t.planModeLmStudioModelId),t.planModeLiteLlmModelId!==void 0&&(e.planModeLiteLlmModelId=t.planModeLiteLlmModelId),t.planModeLiteLlmModelInfo!==void 0&&(e.planModeLiteLlmModelInfo=Nu.toJSON(t.planModeLiteLlmModelInfo)),t.planModeRequestyModelId!==void 0&&(e.planModeRequestyModelId=t.planModeRequestyModelId),t.planModeRequestyModelInfo!==void 0&&(e.planModeRequestyModelInfo=Zt.toJSON(t.planModeRequestyModelInfo)),t.planModeTogetherModelId!==void 0&&(e.planModeTogetherModelId=t.planModeTogetherModelId),t.planModeFireworksModelId!==void 0&&(e.planModeFireworksModelId=t.planModeFireworksModelId),t.planModeGroqModelId!==void 0&&(e.planModeGroqModelId=t.planModeGroqModelId),t.planModeGroqModelInfo!==void 0&&(e.planModeGroqModelInfo=Zt.toJSON(t.planModeGroqModelInfo)),t.planModeHuggingFaceModelId!==void 0&&(e.planModeHuggingFaceModelId=t.planModeHuggingFaceModelId),t.planModeHuggingFaceModelInfo!==void 0&&(e.planModeHuggingFaceModelInfo=Zt.toJSON(t.planModeHuggingFaceModelInfo)),t.planModeHuaweiCloudMaasModelId!==void 0&&(e.planModeHuaweiCloudMaasModelId=t.planModeHuaweiCloudMaasModelId),t.planModeHuaweiCloudMaasModelInfo!==void 0&&(e.planModeHuaweiCloudMaasModelInfo=Zt.toJSON(t.planModeHuaweiCloudMaasModelInfo)),t.planModeBasetenModelId!==void 0&&(e.planModeBasetenModelId=t.planModeBasetenModelId),t.planModeBasetenModelInfo!==void 0&&(e.planModeBasetenModelInfo=Zt.toJSON(t.planModeBasetenModelInfo)),t.planModeVercelAiGatewayModelId!==void 0&&(e.planModeVercelAiGatewayModelId=t.planModeVercelAiGatewayModelId),t.planModeVercelAiGatewayModelInfo!==void 0&&(e.planModeVercelAiGatewayModelInfo=Zt.toJSON(t.planModeVercelAiGatewayModelInfo)),t.planModeAihubmixModelId!==void 0&&(e.planModeAihubmixModelId=t.planModeAihubmixModelId),t.planModeAihubmixModelInfo!==void 0&&(e.planModeAihubmixModelInfo=pa.toJSON(t.planModeAihubmixModelInfo)),t.planModeNousResearchModelId!==void 0&&(e.planModeNousResearchModelId=t.planModeNousResearchModelId),t.geminiPlanModeThinkingLevel!==void 0&&(e.geminiPlanModeThinkingLevel=t.geminiPlanModeThinkingLevel),t.planModeDiracModelId!==void 0&&(e.planModeDiracModelId=t.planModeDiracModelId),t.planModeDiracModelInfo!==void 0&&(e.planModeDiracModelInfo=Zt.toJSON(t.planModeDiracModelInfo)),t.actModeApiProvider!==void 0&&(e.actModeApiProvider=Hq(t.actModeApiProvider)),t.actModeApiModelId!==void 0&&(e.actModeApiModelId=t.actModeApiModelId),t.actModeThinkingBudgetTokens!==void 0&&(e.actModeThinkingBudgetTokens=Math.round(t.actModeThinkingBudgetTokens)),t.actModeReasoningEffort!==void 0&&(e.actModeReasoningEffort=t.actModeReasoningEffort),t.actModeVsCodeLmModelSelector!==void 0&&(e.actModeVsCodeLmModelSelector=js.toJSON(t.actModeVsCodeLmModelSelector)),t.actModeAwsBedrockCustomSelected!==void 0&&(e.actModeAwsBedrockCustomSelected=t.actModeAwsBedrockCustomSelected),t.actModeAwsBedrockCustomModelBaseId!==void 0&&(e.actModeAwsBedrockCustomModelBaseId=t.actModeAwsBedrockCustomModelBaseId),t.actModeOpenRouterModelId!==void 0&&(e.actModeOpenRouterModelId=t.actModeOpenRouterModelId),t.actModeOpenRouterModelInfo!==void 0&&(e.actModeOpenRouterModelInfo=Zt.toJSON(t.actModeOpenRouterModelInfo)),t.actModeOpenAiModelId!==void 0&&(e.actModeOpenAiModelId=t.actModeOpenAiModelId),t.actModeOpenAiModelInfo!==void 0&&(e.actModeOpenAiModelInfo=pa.toJSON(t.actModeOpenAiModelInfo)),t.actModeLmStudioModelId!==void 0&&(e.actModeLmStudioModelId=t.actModeLmStudioModelId),t.actModeLiteLlmModelId!==void 0&&(e.actModeLiteLlmModelId=t.actModeLiteLlmModelId),t.actModeLiteLlmModelInfo!==void 0&&(e.actModeLiteLlmModelInfo=Nu.toJSON(t.actModeLiteLlmModelInfo)),t.actModeRequestyModelId!==void 0&&(e.actModeRequestyModelId=t.actModeRequestyModelId),t.actModeRequestyModelInfo!==void 0&&(e.actModeRequestyModelInfo=Zt.toJSON(t.actModeRequestyModelInfo)),t.actModeTogetherModelId!==void 0&&(e.actModeTogetherModelId=t.actModeTogetherModelId),t.actModeFireworksModelId!==void 0&&(e.actModeFireworksModelId=t.actModeFireworksModelId),t.actModeGroqModelId!==void 0&&(e.actModeGroqModelId=t.actModeGroqModelId),t.actModeGroqModelInfo!==void 0&&(e.actModeGroqModelInfo=Zt.toJSON(t.actModeGroqModelInfo)),t.actModeHuggingFaceModelId!==void 0&&(e.actModeHuggingFaceModelId=t.actModeHuggingFaceModelId),t.actModeHuggingFaceModelInfo!==void 0&&(e.actModeHuggingFaceModelInfo=Zt.toJSON(t.actModeHuggingFaceModelInfo)),t.actModeHuaweiCloudMaasModelId!==void 0&&(e.actModeHuaweiCloudMaasModelId=t.actModeHuaweiCloudMaasModelId),t.actModeHuaweiCloudMaasModelInfo!==void 0&&(e.actModeHuaweiCloudMaasModelInfo=Zt.toJSON(t.actModeHuaweiCloudMaasModelInfo)),t.actModeBasetenModelId!==void 0&&(e.actModeBasetenModelId=t.actModeBasetenModelId),t.actModeBasetenModelInfo!==void 0&&(e.actModeBasetenModelInfo=Zt.toJSON(t.actModeBasetenModelInfo)),t.actModeVercelAiGatewayModelId!==void 0&&(e.actModeVercelAiGatewayModelId=t.actModeVercelAiGatewayModelId),t.actModeVercelAiGatewayModelInfo!==void 0&&(e.actModeVercelAiGatewayModelInfo=Zt.toJSON(t.actModeVercelAiGatewayModelInfo)),t.actModeAihubmixModelId!==void 0&&(e.actModeAihubmixModelId=t.actModeAihubmixModelId),t.actModeAihubmixModelInfo!==void 0&&(e.actModeAihubmixModelInfo=pa.toJSON(t.actModeAihubmixModelInfo)),t.actModeNousResearchModelId!==void 0&&(e.actModeNousResearchModelId=t.actModeNousResearchModelId),t.geminiActModeThinkingLevel!==void 0&&(e.geminiActModeThinkingLevel=t.geminiActModeThinkingLevel),t.actModeDiracModelId!==void 0&&(e.actModeDiracModelId=t.actModeDiracModelId),t.actModeDiracModelInfo!==void 0&&(e.actModeDiracModelInfo=Zt.toJSON(t.actModeDiracModelInfo)),e},create(t){return PA.fromPartial(t??{})},fromPartial(t){let e=SLn();return e.apiKey=t.apiKey??void 0,e.diracApiKey=t.diracApiKey??void 0,e.ulid=t.ulid??void 0,e.liteLlmBaseUrl=t.liteLlmBaseUrl??void 0,e.liteLlmApiKey=t.liteLlmApiKey??void 0,e.liteLlmUsePromptCache=t.liteLlmUsePromptCache??void 0,e.openAiHeaders=globalThis.Object.entries(t.openAiHeaders??{}).reduce((r,[i,a])=>(a!==void 0&&(r[i]=globalThis.String(a)),r),{}),e.anthropicBaseUrl=t.anthropicBaseUrl??void 0,e.openRouterApiKey=t.openRouterApiKey??void 0,e.openRouterProviderSorting=t.openRouterProviderSorting??void 0,e.awsAccessKey=t.awsAccessKey??void 0,e.awsSecretKey=t.awsSecretKey??void 0,e.awsSessionToken=t.awsSessionToken??void 0,e.awsRegion=t.awsRegion??void 0,e.awsUseCrossRegionInference=t.awsUseCrossRegionInference??void 0,e.awsBedrockUsePromptCache=t.awsBedrockUsePromptCache??void 0,e.awsUseProfile=t.awsUseProfile??void 0,e.awsProfile=t.awsProfile??void 0,e.awsBedrockEndpoint=t.awsBedrockEndpoint??void 0,e.claudeCodePath=t.claudeCodePath??void 0,e.vertexProjectId=t.vertexProjectId??void 0,e.vertexRegion=t.vertexRegion??void 0,e.openAiBaseUrl=t.openAiBaseUrl??void 0,e.openAiApiKey=t.openAiApiKey??void 0,e.lmStudioBaseUrl=t.lmStudioBaseUrl??void 0,e.geminiApiKey=t.geminiApiKey??void 0,e.geminiBaseUrl=t.geminiBaseUrl??void 0,e.openAiNativeApiKey=t.openAiNativeApiKey??void 0,e.deepSeekApiKey=t.deepSeekApiKey??void 0,e.requestyApiKey=t.requestyApiKey??void 0,e.requestyBaseUrl=t.requestyBaseUrl??void 0,e.togetherApiKey=t.togetherApiKey??void 0,e.fireworksApiKey=t.fireworksApiKey??void 0,e.fireworksModelMaxCompletionTokens=t.fireworksModelMaxCompletionTokens??void 0,e.fireworksModelMaxTokens=t.fireworksModelMaxTokens??void 0,e.qwenApiKey=t.qwenApiKey??void 0,e.doubaoApiKey=t.doubaoApiKey??void 0,e.mistralApiKey=t.mistralApiKey??void 0,e.azureApiVersion=t.azureApiVersion??void 0,e.qwenApiLine=t.qwenApiLine??void 0,e.nebiusApiKey=t.nebiusApiKey??void 0,e.xaiApiKey=t.xaiApiKey??void 0,e.sambanovaApiKey=t.sambanovaApiKey??void 0,e.cerebrasApiKey=t.cerebrasApiKey??void 0,e.requestTimeoutMs=t.requestTimeoutMs??void 0,e.moonshotApiKey=t.moonshotApiKey??void 0,e.moonshotApiLine=t.moonshotApiLine??void 0,e.awsAuthentication=t.awsAuthentication??void 0,e.awsBedrockApiKey=t.awsBedrockApiKey??void 0,e.groqApiKey=t.groqApiKey??void 0,e.huggingFaceApiKey=t.huggingFaceApiKey??void 0,e.huaweiCloudMaasApiKey=t.huaweiCloudMaasApiKey??void 0,e.basetenApiKey=t.basetenApiKey??void 0,e.zaiApiKey=t.zaiApiKey??void 0,e.zaiApiLine=t.zaiApiLine??void 0,e.lmStudioMaxTokens=t.lmStudioMaxTokens??void 0,e.vercelAiGatewayApiKey=t.vercelAiGatewayApiKey??void 0,e.qwenCodeOauthPath=t.qwenCodeOauthPath??void 0,e.difyApiKey=t.difyApiKey??void 0,e.difyBaseUrl=t.difyBaseUrl??void 0,e.awsUseGlobalInference=t.awsUseGlobalInference??void 0,e.minimaxApiKey=t.minimaxApiKey??void 0,e.minimaxApiLine=t.minimaxApiLine??void 0,e.aihubmixApiKey=t.aihubmixApiKey??void 0,e.aihubmixBaseUrl=t.aihubmixBaseUrl??void 0,e.aihubmixAppCode=t.aihubmixAppCode??void 0,e.nousResearchApiKey=t.nousResearchApiKey??void 0,e.azureIdentity=t.azureIdentity??void 0,e.wandbApiKey=t.wandbApiKey??void 0,e.planModeApiProvider=t.planModeApiProvider??void 0,e.planModeApiModelId=t.planModeApiModelId??void 0,e.planModeThinkingBudgetTokens=t.planModeThinkingBudgetTokens??void 0,e.planModeReasoningEffort=t.planModeReasoningEffort??void 0,e.planModeVsCodeLmModelSelector=t.planModeVsCodeLmModelSelector!==void 0&&t.planModeVsCodeLmModelSelector!==null?js.fromPartial(t.planModeVsCodeLmModelSelector):void 0,e.planModeAwsBedrockCustomSelected=t.planModeAwsBedrockCustomSelected??void 0,e.planModeAwsBedrockCustomModelBaseId=t.planModeAwsBedrockCustomModelBaseId??void 0,e.planModeOpenRouterModelId=t.planModeOpenRouterModelId??void 0,e.planModeOpenRouterModelInfo=t.planModeOpenRouterModelInfo!==void 0&&t.planModeOpenRouterModelInfo!==null?Zt.fromPartial(t.planModeOpenRouterModelInfo):void 0,e.planModeOpenAiModelId=t.planModeOpenAiModelId??void 0,e.planModeOpenAiModelInfo=t.planModeOpenAiModelInfo!==void 0&&t.planModeOpenAiModelInfo!==null?pa.fromPartial(t.planModeOpenAiModelInfo):void 0,e.planModeLmStudioModelId=t.planModeLmStudioModelId??void 0,e.planModeLiteLlmModelId=t.planModeLiteLlmModelId??void 0,e.planModeLiteLlmModelInfo=t.planModeLiteLlmModelInfo!==void 0&&t.planModeLiteLlmModelInfo!==null?Nu.fromPartial(t.planModeLiteLlmModelInfo):void 0,e.planModeRequestyModelId=t.planModeRequestyModelId??void 0,e.planModeRequestyModelInfo=t.planModeRequestyModelInfo!==void 0&&t.planModeRequestyModelInfo!==null?Zt.fromPartial(t.planModeRequestyModelInfo):void 0,e.planModeTogetherModelId=t.planModeTogetherModelId??void 0,e.planModeFireworksModelId=t.planModeFireworksModelId??void 0,e.planModeGroqModelId=t.planModeGroqModelId??void 0,e.planModeGroqModelInfo=t.planModeGroqModelInfo!==void 0&&t.planModeGroqModelInfo!==null?Zt.fromPartial(t.planModeGroqModelInfo):void 0,e.planModeHuggingFaceModelId=t.planModeHuggingFaceModelId??void 0,e.planModeHuggingFaceModelInfo=t.planModeHuggingFaceModelInfo!==void 0&&t.planModeHuggingFaceModelInfo!==null?Zt.fromPartial(t.planModeHuggingFaceModelInfo):void 0,e.planModeHuaweiCloudMaasModelId=t.planModeHuaweiCloudMaasModelId??void 0,e.planModeHuaweiCloudMaasModelInfo=t.planModeHuaweiCloudMaasModelInfo!==void 0&&t.planModeHuaweiCloudMaasModelInfo!==null?Zt.fromPartial(t.planModeHuaweiCloudMaasModelInfo):void 0,e.planModeBasetenModelId=t.planModeBasetenModelId??void 0,e.planModeBasetenModelInfo=t.planModeBasetenModelInfo!==void 0&&t.planModeBasetenModelInfo!==null?Zt.fromPartial(t.planModeBasetenModelInfo):void 0,e.planModeVercelAiGatewayModelId=t.planModeVercelAiGatewayModelId??void 0,e.planModeVercelAiGatewayModelInfo=t.planModeVercelAiGatewayModelInfo!==void 0&&t.planModeVercelAiGatewayModelInfo!==null?Zt.fromPartial(t.planModeVercelAiGatewayModelInfo):void 0,e.planModeAihubmixModelId=t.planModeAihubmixModelId??void 0,e.planModeAihubmixModelInfo=t.planModeAihubmixModelInfo!==void 0&&t.planModeAihubmixModelInfo!==null?pa.fromPartial(t.planModeAihubmixModelInfo):void 0,e.planModeNousResearchModelId=t.planModeNousResearchModelId??void 0,e.geminiPlanModeThinkingLevel=t.geminiPlanModeThinkingLevel??void 0,e.planModeDiracModelId=t.planModeDiracModelId??void 0,e.planModeDiracModelInfo=t.planModeDiracModelInfo!==void 0&&t.planModeDiracModelInfo!==null?Zt.fromPartial(t.planModeDiracModelInfo):void 0,e.actModeApiProvider=t.actModeApiProvider??void 0,e.actModeApiModelId=t.actModeApiModelId??void 0,e.actModeThinkingBudgetTokens=t.actModeThinkingBudgetTokens??void 0,e.actModeReasoningEffort=t.actModeReasoningEffort??void 0,e.actModeVsCodeLmModelSelector=t.actModeVsCodeLmModelSelector!==void 0&&t.actModeVsCodeLmModelSelector!==null?js.fromPartial(t.actModeVsCodeLmModelSelector):void 0,e.actModeAwsBedrockCustomSelected=t.actModeAwsBedrockCustomSelected??void 0,e.actModeAwsBedrockCustomModelBaseId=t.actModeAwsBedrockCustomModelBaseId??void 0,e.actModeOpenRouterModelId=t.actModeOpenRouterModelId??void 0,e.actModeOpenRouterModelInfo=t.actModeOpenRouterModelInfo!==void 0&&t.actModeOpenRouterModelInfo!==null?Zt.fromPartial(t.actModeOpenRouterModelInfo):void 0,e.actModeOpenAiModelId=t.actModeOpenAiModelId??void 0,e.actModeOpenAiModelInfo=t.actModeOpenAiModelInfo!==void 0&&t.actModeOpenAiModelInfo!==null?pa.fromPartial(t.actModeOpenAiModelInfo):void 0,e.actModeLmStudioModelId=t.actModeLmStudioModelId??void 0,e.actModeLiteLlmModelId=t.actModeLiteLlmModelId??void 0,e.actModeLiteLlmModelInfo=t.actModeLiteLlmModelInfo!==void 0&&t.actModeLiteLlmModelInfo!==null?Nu.fromPartial(t.actModeLiteLlmModelInfo):void 0,e.actModeRequestyModelId=t.actModeRequestyModelId??void 0,e.actModeRequestyModelInfo=t.actModeRequestyModelInfo!==void 0&&t.actModeRequestyModelInfo!==null?Zt.fromPartial(t.actModeRequestyModelInfo):void 0,e.actModeTogetherModelId=t.actModeTogetherModelId??void 0,e.actModeFireworksModelId=t.actModeFireworksModelId??void 0,e.actModeGroqModelId=t.actModeGroqModelId??void 0,e.actModeGroqModelInfo=t.actModeGroqModelInfo!==void 0&&t.actModeGroqModelInfo!==null?Zt.fromPartial(t.actModeGroqModelInfo):void 0,e.actModeHuggingFaceModelId=t.actModeHuggingFaceModelId??void 0,e.actModeHuggingFaceModelInfo=t.actModeHuggingFaceModelInfo!==void 0&&t.actModeHuggingFaceModelInfo!==null?Zt.fromPartial(t.actModeHuggingFaceModelInfo):void 0,e.actModeHuaweiCloudMaasModelId=t.actModeHuaweiCloudMaasModelId??void 0,e.actModeHuaweiCloudMaasModelInfo=t.actModeHuaweiCloudMaasModelInfo!==void 0&&t.actModeHuaweiCloudMaasModelInfo!==null?Zt.fromPartial(t.actModeHuaweiCloudMaasModelInfo):void 0,e.actModeBasetenModelId=t.actModeBasetenModelId??void 0,e.actModeBasetenModelInfo=t.actModeBasetenModelInfo!==void 0&&t.actModeBasetenModelInfo!==null?Zt.fromPartial(t.actModeBasetenModelInfo):void 0,e.actModeVercelAiGatewayModelId=t.actModeVercelAiGatewayModelId??void 0,e.actModeVercelAiGatewayModelInfo=t.actModeVercelAiGatewayModelInfo!==void 0&&t.actModeVercelAiGatewayModelInfo!==null?Zt.fromPartial(t.actModeVercelAiGatewayModelInfo):void 0,e.actModeAihubmixModelId=t.actModeAihubmixModelId??void 0,e.actModeAihubmixModelInfo=t.actModeAihubmixModelInfo!==void 0&&t.actModeAihubmixModelInfo!==null?pa.fromPartial(t.actModeAihubmixModelInfo):void 0,e.actModeNousResearchModelId=t.actModeNousResearchModelId??void 0,e.geminiActModeThinkingLevel=t.geminiActModeThinkingLevel??void 0,e.actModeDiracModelId=t.actModeDiracModelId??void 0,e.actModeDiracModelInfo=t.actModeDiracModelInfo!==void 0&&t.actModeDiracModelInfo!==null?Zt.fromPartial(t.actModeDiracModelInfo):void 0,e}};Het={encode(t,e=new dr){return t.key!==""&&e.uint32(10).string(t.key),t.value!==""&&e.uint32(18).string(t.value),e},decode(t,e){let r=t instanceof yt?t:new yt(t),i=e===void 0?r.len:r.pos+e,a=xLn();for(;r.pos<i;){let o=r.uint32();switch(o>>>3){case 1:{if(o!==10)break;a.key=r.string();continue}case 2:{if(o!==18)break;a.value=r.string();continue}}if((o&7)===4||o===0)break;r.skip(o&7)}return a},fromJSON(t){return{key:rt(t.key)?globalThis.String(t.key):"",value:rt(t.value)?globalThis.String(t.value):""}},toJSON(t){let e={};return t.key!==""&&(e.key=t.key),t.value!==""&&(e.value=t.value),e},create(t){return Het.fromPartial(t??{})},fromPartial(t){let e=xLn();return e.key=t.key??"",e.value=t.value??"",e}},Oiu={name:"ModelsService",fullName:"dirac.ModelsService",methods:{getLmStudioModels:{name:"getLmStudioModels",requestType:bs,requestStream:!1,responseType:gee,responseStream:!1,options:{}},getVsCodeLmModels:{name:"getVsCodeLmModels",requestType:ua,requestStream:!1,responseType:Vet,responseStream:!1,options:{}},refreshOpenRouterModelsRpc:{name:"refreshOpenRouterModelsRpc",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},refreshDiracModelsRpc:{name:"refreshDiracModelsRpc",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},refreshHuggingFaceModels:{name:"refreshHuggingFaceModels",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},refreshOpenAiModels:{name:"refreshOpenAiModels",requestType:orr,requestStream:!1,responseType:gee,responseStream:!1,options:{}},refreshRequestyModels:{name:"refreshRequestyModels",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},refreshLiteLlmModelsRpc:{name:"refreshLiteLlmModelsRpc",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},subscribeToOpenRouterModels:{name:"subscribeToOpenRouterModels",requestType:ua,requestStream:!1,responseType:lp,responseStream:!0,options:{}},subscribeToLiteLlmModels:{name:"subscribeToLiteLlmModels",requestType:ua,requestStream:!1,responseType:lp,responseStream:!0,options:{}},updateApiConfigurationProto:{name:"updateApiConfigurationProto",requestType:srr,requestStream:!1,responseType:zn,responseStream:!1,options:{}},updateApiConfiguration:{name:"updateApiConfiguration",requestType:urr,requestStream:!1,responseType:zn,responseStream:!1,options:{}},updateApiConfigurationPartial:{name:"updateApiConfigurationPartial",requestType:crr,requestStream:!1,responseType:zn,responseStream:!1,options:{}},authenticateOpenAiCodex:{name:"authenticateOpenAiCodex",requestType:ua,requestStream:!1,responseType:zn,responseStream:!1,options:{}},signOutOpenAiCodex:{name:"signOutOpenAiCodex",requestType:ua,requestStream:!1,responseType:zn,responseStream:!1,options:{}},refreshGroqModelsRpc:{name:"refreshGroqModelsRpc",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},refreshBasetenModelsRpc:{name:"refreshBasetenModelsRpc",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},getAihubmixModels:{name:"getAihubmixModels",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}},refreshVercelAiGatewayModelsRpc:{name:"refreshVercelAiGatewayModelsRpc",requestType:ua,requestStream:!1,responseType:lp,responseStream:!1,options:{}}}}});var BLn={};Gn(BLn,{ALL_MODEL_MAPS:()=>Arr,ALL_PROVIDERS:()=>Fiu,ANTHROPIC_FAST_MODE_SUFFIX:()=>Ket,ANTHROPIC_MAX_THINKING_BUDGET:()=>u4e,ANTHROPIC_MIN_THINKING_BUDGET:()=>Niu,CLAUDE_OPUS_1M_TIERS:()=>Vq,CLAUDE_SONNET_1M_SUFFIX:()=>NA,CLAUDE_SONNET_1M_TIERS:()=>f7,DEFAULT_API_PROVIDER:()=>Wet,GPT_5_4_PRO_TIERS:()=>wLn,GPT_5_4_TIERS:()=>TLn,GPT_5_5_TIERS:()=>_Ln,OPENROUTER_PROVIDER_PREFERENCES:()=>lrr,QwenApiRegions:()=>Yet,anthropicDefaultModelId:()=>h_,anthropicModels:()=>Fm,azureOpenAiDefaultApiVersion:()=>zet,basetenDefaultModelId:()=>uH,basetenModels:()=>l4,bedrockDefaultModelId:()=>c4,bedrockModels:()=>uS,cerebrasDefaultModelId:()=>Nhe,cerebrasModels:()=>p7,claudeCodeDefaultModelId:()=>Rhe,claudeCodeModels:()=>Wq,deepSeekDefaultModelId:()=>pP,deepSeekModels:()=>AP,doubaoDefaultModelId:()=>Phe,doubaoModels:()=>Zq,fireworksDefaultModelId:()=>cH,fireworksModels:()=>lH,geminiDefaultModelId:()=>p3,geminiModels:()=>fP,getModelInfo:()=>grr,getProviderForModel:()=>Jet,groqDefaultModelId:()=>CP,groqModels:()=>g_,huaweiCloudMaasDefaultModelId:()=>oH,huaweiCloudMaasModels:()=>sH,huggingFaceDefaultModelId:()=>$q,huggingFaceModels:()=>gP,internationalQwenDefaultModelId:()=>xee,internationalQwenModels:()=>Xq,internationalZAiDefaultModelId:()=>l4e,internationalZAiModels:()=>Iee,isAnthropicAdaptiveThinkingSupported:()=>bee,liteLlmDefaultModelId:()=>tH,liteLlmModelInfoSaneDefaults:()=>frr,mainlandQwenDefaultModelId:()=>drr,mainlandQwenModels:()=>Mhe,mainlandZAiDefaultModelId:()=>prr,mainlandZAiModels:()=>d4e,minimaxDefaultModelId:()=>fH,minimaxModels:()=>hH,mistralDefaultModelId:()=>eH,mistralModels:()=>mP,moonshotDefaultModelId:()=>bP,moonshotModels:()=>vP,nebiusDefaultModelId:()=>Ohe,nebiusModels:()=>rH,nousResearchDefaultModelId:()=>pH,nousResearchModels:()=>AH,openAiCodexDefaultModelId:()=>jq,openAiCodexModels:()=>See,openAiModelInfoSaneDefaults:()=>Nm,openAiNativeDefaultModelId:()=>A_,openAiNativeModels:()=>hP,openRouterClaudeOpus461mModelId:()=>Jq,openRouterClaudeSonnet41mModelId:()=>Kq,openRouterClaudeSonnet451mModelId:()=>zq,openRouterClaudeSonnet461mModelId:()=>Yq,openRouterDefaultModelId:()=>p_,openRouterDefaultModelInfo:()=>Dhe,qwenCodeDefaultModelId:()=>Lhe,qwenCodeModels:()=>dH,requestyDefaultModelId:()=>c4e,requestyDefaultModelInfo:()=>hrr,sambanovaDefaultModelId:()=>Fhe,sambanovaModels:()=>aH,vertexDefaultModelId:()=>khe,vertexGlobalModels:()=>Liu,vertexModels:()=>h7,wandbDefaultModelId:()=>iH,wandbModels:()=>nH,xaiDefaultModelId:()=>EP,xaiModels:()=>yP});function bee(t,e){if(e?.supportsAdaptiveThinking!==void 0)return e.supportsAdaptiveThinking;let r=t.toLowerCase();if(!(r.startsWith("claude-")||r.includes("anthropic.claude-")||r.startsWith("anthropic/")))return!1;let a=r.match(/claude-(\d+)[.-](\d+)/);if(a){let o=parseInt(a[1]),n=parseInt(a[2]);if(o<4||o===4&&n<=5)return!1}return!r.includes("claude-3")}function Jet(t){for(let[e,r]of Arr)if(t&&t in r)return e}function grr(t){for(let[e,r]of Arr)if(t&&t in r)return r[t]}var Fiu,Wet,NA,Ket,f7,Vq,_Ln,TLn,wLn,h_,Niu,u4e,Fm,Rhe,Wq,c4,uS,p_,Kq,zq,Yq,Jq,Dhe,lrr,khe,h7,Liu,Nm,p3,fP,A_,hP,jq,See,zet,pP,AP,$q,gP,Xq,Mhe,Yet,xee,drr,Phe,Zq,eH,mP,tH,frr,rH,Ohe,nH,iH,EP,yP,Fhe,aH,Nhe,p7,CP,g_,c4e,hrr,vP,bP,oH,sH,l4,uH,l4e,Iee,prr,d4e,cH,lH,dH,Lhe,fH,hH,pH,AH,Arr,Bo=$(()=>{"use strict";FA();Fiu=["anthropic","claude-code","openrouter","bedrock","vertex","openai","lmstudio","gemini","openai-native","openai-codex","requesty","together","deepseek","qwen","qwen-code","doubao","mistral","github-copilot","vscode-lm","dirac","litellm","moonshot","nebius","fireworks","xai","sambanova","cerebras","groq","huggingface","huawei-cloud-maas","dify","baseten","vercel-ai-gateway","zai","oca","aihubmix","minimax","nousResearch","wandb"],Wet="openrouter",NA=":1m",Ket=":fast",f7=[{contextWindow:2e5,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3},{contextWindow:Number.MAX_SAFE_INTEGER,inputPrice:6,outputPrice:22.5,cacheWritesPrice:7.5,cacheReadsPrice:.6}],Vq=[{contextWindow:2e5,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5},{contextWindow:Number.MAX_SAFE_INTEGER,inputPrice:10,outputPrice:37.5,cacheWritesPrice:12.5,cacheReadsPrice:1}],_Ln=[{contextWindow:272e3,inputPrice:5,outputPrice:30,cacheReadsPrice:.5},{contextWindow:Number.MAX_SAFE_INTEGER,inputPrice:10,outputPrice:45,cacheReadsPrice:1}],TLn=[{contextWindow:272e3,inputPrice:2.5,outputPrice:15,cacheReadsPrice:.25},{contextWindow:Number.MAX_SAFE_INTEGER,inputPrice:5,outputPrice:22.5,cacheReadsPrice:.5}],wLn=[{contextWindow:272e3,inputPrice:30,outputPrice:180},{contextWindow:Number.MAX_SAFE_INTEGER,inputPrice:60,outputPrice:270}],h_="claude-sonnet-4-6",Niu=1024,u4e=6e3,Fm={"claude-sonnet-4-6":{maxTokens:64e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3},"claude-sonnet-4-6:1m":{maxTokens:64e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,tiers:f7},"claude-haiku-4-5-20251001":{maxTokens:64e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,inputPrice:1,outputPrice:5,cacheWritesPrice:1.25,cacheReadsPrice:.1},"claude-opus-4-6":{maxTokens:128e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5},"claude-opus-4-6:fast":{maxTokens:128e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:30,outputPrice:150,cacheWritesPrice:37.5,cacheReadsPrice:3,description:"Anthropic fast mode preview for Claude Opus 4.6. Same model and capabilities with higher output token speed at premium pricing. Requires fast mode access on your Anthropic account."},"claude-opus-4-7:1m":{maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5,tiers:Vq},"claude-opus-4-7:fast":{maxTokens:128e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:30,outputPrice:150,cacheWritesPrice:37.5,cacheReadsPrice:3,description:"Anthropic fast mode preview for Claude Opus 4.6. Same model and capabilities with higher output token speed at premium pricing. Requires fast mode access on your Anthropic account."},"claude-opus-4-6:1m":{maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5,tiers:Vq},"claude-opus-4-6:1m:fast":{maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,inputPrice:30,outputPrice:150,cacheWritesPrice:37.5,cacheReadsPrice:3,description:"Anthropic fast mode preview for Claude Opus 4.6 with the 1M context beta enabled. Same model and capabilities with higher output token speed at premium pricing across the full 1M context window. Requires both fast mode and 1M context access on your Anthropic account."}};Rhe="claude-sonnet-4-6",Wq={opus:{...Fm["claude-opus-4-6"],supportsImages:!1,supportsPromptCache:!1},"opus[1m]":{...Fm["claude-opus-4-6:1m"],supportsImages:!1,supportsPromptCache:!1},"claude-haiku-4-5-20251001":{...Fm["claude-haiku-4-5-20251001"],supportsImages:!1,supportsPromptCache:!1},"claude-sonnet-4-6":{...Fm["claude-sonnet-4-6"],supportsImages:!1,supportsPromptCache:!1},"claude-sonnet-4-6[1m]":{...Fm["claude-sonnet-4-6:1m"],supportsImages:!1,supportsPromptCache:!1},"claude-opus-4-6":{...Fm["claude-opus-4-6"],supportsImages:!1,supportsPromptCache:!1},"claude-opus-4-6[1m]":{...Fm["claude-opus-4-6:1m"],supportsImages:!1,supportsPromptCache:!1}},c4="anthropic.claude-sonnet-4-6",uS={"anthropic.claude-sonnet-4-6":{maxTokens:64e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,supportsGlobalEndpoint:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3},"anthropic.claude-sonnet-4-6:1m":{maxTokens:64e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,supportsGlobalEndpoint:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,tiers:f7},"anthropic.claude-sonnet-4-5-20250929-v1:0:1m":{maxTokens:64e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsGlobalEndpoint:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,tiers:f7},"anthropic.claude-haiku-4-5-20251001-v1:0":{maxTokens:64e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsGlobalEndpoint:!0,inputPrice:1,outputPrice:5,cacheWritesPrice:1.25,cacheReadsPrice:.1},"anthropic.claude-sonnet-4-20250514-v1:0:1m":{maxTokens:64e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsGlobalEndpoint:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,tiers:f7},"anthropic.claude-opus-4-6-v1":{maxTokens:128e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,supportsGlobalEndpoint:!0,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5},"anthropic.claude-opus-4-6-v1:1m":{maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,supportsAdaptiveThinking:!0,supportsGlobalEndpoint:!0,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5,tiers:Vq},"openai.gpt-oss-120b-1:0":{maxTokens:8192,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.15,outputPrice:.6,description:"A state-of-the-art 120B open-weight Mixture-of-Experts language model optimized for strong reasoning, tool use, and efficient deployment on large GPUs"},"openai.gpt-oss-20b-1:0":{maxTokens:8192,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.07,outputPrice:.3,description:"A compact 20B open-weight Mixture-of-Experts language model designed for strong reasoning and tool use, ideal for edge devices and local inference."}},p_="anthropic/claude-sonnet-4.5",Kq=`anthropic/claude-sonnet-4${NA}`,zq=`anthropic/claude-sonnet-4.5${NA}`,Yq=`anthropic/claude-sonnet-4.6${NA}`,Jq=`anthropic/claude-opus-4.6${NA}`,Dhe={maxTokens:64e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,description:`Claude Sonnet 4.5 delivers superior intelligence across coding, agentic search, and AI agent capabilities. It's a powerful choice for agentic coding, and can complete tasks across the entire software development lifecycle, from initial planning to bug fixes, maintenance to large refactors. It offers strong performance in both planning and solving for complex coding tasks, making it an ideal choice to power end-to-end software development processes.
40
40
 
41
41
  Read more in the [blog post here](https://www.anthropic.com/claude/sonnet)`},lrr={"moonshotai/kimi-k2:exacto":{order:["groq","moonshotai"],allow_fallbacks:!1},"z-ai/glm-4.6:exacto":{order:["z-ai","novita"],allow_fallbacks:!1},"deepseek/deepseek-v3.1-terminus:exacto":{order:["novita","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-coder:exacto":{order:["baseten"],allow_fallbacks:!1},"openai/gpt-oss-120b:exacto":{order:["groq","novita"],allow_fallbacks:!1},"moonshotai/kimi-k2":{order:["groq","fireworks","baseten","parasail","novita","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-coder":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-235b-a22b-thinking-2507":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-235b-a22b-07-25":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-30b-a3b-thinking-2507":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-30b-a3b-instruct-2507":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-30b-a3b:free":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-next-80b-a3b-thinking":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-next-80b-a3b-instruct":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"qwen/qwen3-max":{order:["nebius","baseten","fireworks","together","deepinfra"],allow_fallbacks:!1},"deepseek/deepseek-v3.2-exp":{order:["deepseek","novita","fireworks","nebius"],allow_fallbacks:!1},"z-ai/glm-4.6":{order:["z-ai","novita","baseten","fireworks","chutes"],allow_fallbacks:!1},"z-ai/glm-4.5v":{order:["z-ai","novita","baseten","fireworks","chutes"],allow_fallbacks:!1},"z-ai/glm-4.5":{order:["z-ai","novita","baseten","fireworks","chutes"],allow_fallbacks:!1},"z-ai/glm-4.5-air":{order:["z-ai","novita","baseten","fireworks","chutes"],allow_fallbacks:!1}},khe="gemini-3-pro-preview",h7={"gemini-3.1-pro-preview":{maxTokens:8192,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:2,outputPrice:12,temperature:1,supportsReasoning:!0,thinkingConfig:{geminiThinkingLevel:"high",supportsThinkingLevel:!0}},"gemini-3-pro-preview":{maxTokens:8192,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:2,outputPrice:12,temperature:1,supportsReasoning:!0,thinkingConfig:{geminiThinkingLevel:"high",supportsThinkingLevel:!0}},"gemini-3-flash-preview":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:.5,outputPrice:3,cacheReadsPrice:.05,cacheWritesPrice:0,temperature:.35,supportsReasoning:!0,thinkingConfig:{geminiThinkingLevel:"high",supportsThinkingLevel:!0}},"claude-sonnet-4-6":{maxTokens:64e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,supportsReasoning:!0,supportsAdaptiveThinking:!0},"claude-sonnet-4-6:1m":{maxTokens:64e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,supportsReasoning:!0,supportsAdaptiveThinking:!0,tiers:f7},"claude-haiku-4-5@20251001":{maxTokens:64e3,contextWindow:2e5,supportsImages:!1,supportsPromptCache:!0,inputPrice:1,outputPrice:5,cacheWritesPrice:1.25,cacheReadsPrice:.1,supportsReasoning:!0},"claude-opus-4-6":{maxTokens:128e3,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5,supportsReasoning:!0,supportsAdaptiveThinking:!0},"claude-opus-4-6:1m":{maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:5,outputPrice:25,cacheWritesPrice:6.25,cacheReadsPrice:.5,supportsReasoning:!0,supportsAdaptiveThinking:!0,tiers:Vq},"mistral-small-2503":{maxTokens:128e3,contextWindow:128e3,supportsImages:!0,supportsPromptCache:!1,inputPrice:.1,outputPrice:.3},"codestral-2501":{maxTokens:256e3,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.3,outputPrice:.9},"llama-4-maverick-17b-128e-instruct-maas":{maxTokens:128e3,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!1,inputPrice:.35,outputPrice:1.15},"llama-4-scout-17b-16e-instruct-maas":{maxTokens:1e6,contextWindow:10485760,supportsImages:!0,supportsPromptCache:!1,inputPrice:.25,outputPrice:.7},"gemini-2.5-pro-exp-03-25":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!1,inputPrice:0,outputPrice:0},"gemini-2.5-pro":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:2.5,outputPrice:15,cacheReadsPrice:.625,thinkingConfig:{maxBudget:32767},tiers:[{contextWindow:2e5,inputPrice:1.25,outputPrice:10,cacheReadsPrice:.31},{contextWindow:Number.POSITIVE_INFINITY,inputPrice:2.5,outputPrice:15,cacheReadsPrice:.625}]},"gemini-2.5-flash":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:.3,outputPrice:2.5,thinkingConfig:{maxBudget:24576,outputPrice:3.5}},"gemini-2.5-flash-lite-preview-06-17":{maxTokens:64e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:.1,outputPrice:.4,cacheReadsPrice:.025,description:"Preview version - may not be available in all regions",thinkingConfig:{maxBudget:24576}},"gemini-2.0-flash-thinking-exp-01-21":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!1,supportsGlobalEndpoint:!0,inputPrice:0,outputPrice:0}},Liu=Object.fromEntries(Object.entries(h7).filter(([t,e])=>Object.hasOwn(e,"supportsGlobalEndpoint"))),Nm={maxTokens:-1,contextWindow:128e3,supportsImages:!0,supportsPromptCache:!1,supportsTools:!0,supportsReasoning:!0,isR1FormatRequired:!1,inputPrice:0,outputPrice:0,temperature:0},p3="gemini-3.1-pro-preview",fP={"gemini-3.1-pro-preview":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,inputPrice:4,outputPrice:18,cacheReadsPrice:.4,thinkingConfig:{geminiThinkingLevel:"high",supportsThinkingLevel:!0},tiers:[{contextWindow:2e5,inputPrice:2,outputPrice:12,cacheReadsPrice:.2},{contextWindow:Number.POSITIVE_INFINITY,inputPrice:4,outputPrice:18,cacheReadsPrice:.4}]},"gemini-3-pro-preview":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,inputPrice:4,outputPrice:18,cacheReadsPrice:.4,thinkingConfig:{geminiThinkingLevel:"high",supportsThinkingLevel:!0},tiers:[{contextWindow:2e5,inputPrice:2,outputPrice:12,cacheReadsPrice:.2},{contextWindow:Number.POSITIVE_INFINITY,inputPrice:4,outputPrice:18,cacheReadsPrice:.4}]},"gemini-3-flash-preview":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:.5,outputPrice:3,cacheReadsPrice:.05,cacheWritesPrice:0,temperature:.35,supportsReasoning:!0,thinkingConfig:{geminiThinkingLevel:"low",supportsThinkingLevel:!0}},"gemini-2.5-pro":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,inputPrice:2.5,outputPrice:15,cacheReadsPrice:.625,thinkingConfig:{maxBudget:32767},tiers:[{contextWindow:2e5,inputPrice:1.25,outputPrice:10,cacheReadsPrice:.31},{contextWindow:Number.POSITIVE_INFINITY,inputPrice:2.5,outputPrice:15,cacheReadsPrice:.625}]},"gemini-2.5-flash-lite-preview-06-17":{maxTokens:64e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsGlobalEndpoint:!0,inputPrice:.1,outputPrice:.4,cacheReadsPrice:.025,description:"Preview version - may not be available in all regions",thinkingConfig:{maxBudget:24576}},"gemini-2.5-flash":{maxTokens:65536,contextWindow:1048576,supportsImages:!0,supportsPromptCache:!0,inputPrice:.3,outputPrice:2.5,cacheReadsPrice:.075,thinkingConfig:{maxBudget:24576,outputPrice:3.5}}},A_="gpt-5.4",hP={"gpt-5.5":{name:"GPT-5.5",maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,inputPrice:5,outputPrice:30,cacheReadsPrice:.5,cacheWritesPrice:0,supportsReasoning:!0,apiFormat:4,tiers:_Ln},"gpt-5.4":{name:"GPT-5.4",maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,inputPrice:2.5,outputPrice:15,cacheReadsPrice:.25,cacheWritesPrice:0,supportsReasoning:!0,apiFormat:4,tiers:TLn},"gpt-5.4-mini":{name:"GPT-5.4 mini",maxTokens:128e3,contextWindow:4e5,supportsImages:!0,supportsPromptCache:!0,inputPrice:.75,outputPrice:4.5,cacheReadsPrice:.075,cacheWritesPrice:0,supportsReasoning:!0,apiFormat:4},"gpt-5.4-nano":{name:"GPT-5.4 nano",maxTokens:128e3,contextWindow:4e5,supportsImages:!0,supportsPromptCache:!0,inputPrice:.2,outputPrice:1.25,cacheReadsPrice:.02,cacheWritesPrice:0,supportsReasoning:!0,apiFormat:4},"gpt-5.4-pro":{name:"GPT-5.4 Pro",maxTokens:128e3,contextWindow:105e4,supportsImages:!0,supportsPromptCache:!0,inputPrice:30,outputPrice:180,cacheReadsPrice:0,cacheWritesPrice:0,supportsReasoning:!0,apiFormat:4,tiers:wLn}},jq="gpt-5.5",See={"gpt-5.5":{maxTokens:128e3,contextWindow:105e4,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,apiFormat:4,inputPrice:0,outputPrice:0,description:"GPT-5.5 Codex snapshot (2026-04-23), Dec 01, 2025 knowledge cutoff, with reasoning token support"},"gpt-5.4":{maxTokens:128e3,contextWindow:1e6,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,apiFormat:4,inputPrice:0,outputPrice:0,description:"GPT-5.4 Codex: OpenAI's latest flagship coding model via ChatGPT subscription"},"gpt-5.4-mini":{maxTokens:128e3,contextWindow:4e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,apiFormat:4,inputPrice:0,outputPrice:0,description:"GPT-5.4 mini Codex via ChatGPT subscription"},"gpt-5.4-nano":{maxTokens:128e3,contextWindow:4e5,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,apiFormat:4,inputPrice:0,outputPrice:0,description:"GPT-5.4 nano Codex via ChatGPT subscription"},"gpt-5.4-pro":{maxTokens:128e3,contextWindow:105e4,supportsImages:!0,supportsPromptCache:!0,supportsReasoning:!0,apiFormat:4,inputPrice:0,outputPrice:0,description:"GPT-5.4 Pro Codex via ChatGPT subscription"}},zet="2024-08-01-preview",pP="deepseek-v4-flash",AP={"deepseek-v4-flash":{maxTokens:384e3,contextWindow:1048576,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,supportsReasoningEffort:!0,supportsTools:!0,inputPrice:0,outputPrice:.28,cacheWritesPrice:.14,cacheReadsPrice:.0028},"deepseek-v4-pro":{maxTokens:384e3,contextWindow:1048576,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,supportsReasoningEffort:!0,supportsTools:!0,inputPrice:0,outputPrice:3.48,cacheWritesPrice:1.74,cacheReadsPrice:.0145},"deepseek-chat":{maxTokens:8e3,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!0,inputPrice:0,outputPrice:1.1,cacheWritesPrice:.27,cacheReadsPrice:.07},"deepseek-reasoner":{maxTokens:8e3,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,supportsTools:!0,inputPrice:0,outputPrice:2.19,cacheWritesPrice:.55,cacheReadsPrice:.14}},$q="moonshotai/Kimi-K2-Instruct",gP={"openai/gpt-oss-120b":{maxTokens:32766,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,description:"Large open-weight reasoning model for high-end desktops and data centers, built for complex coding, math, and general AI tasks."},"openai/gpt-oss-20b":{maxTokens:32766,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,description:"Medium open-weight reasoning model that runs on most desktops, balancing strong reasoning with broad accessibility."},"moonshotai/Kimi-K2-Instruct":{supportsTools:!0,maxTokens:131072,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,description:"Advanced reasoning model with superior performance across coding, math, and general capabilities."},"deepseek-ai/DeepSeek-R1":{maxTokens:8192,contextWindow:64e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,description:"DeepSeek's reasoning model with step-by-step thinking capabilities."}},Xq={"qwen-turbo-latest":{maxTokens:16384,contextWindow:1e6,supportsImages:!1,supportsPromptCache:!1,inputPrice:.3,outputPrice:.6,cacheWritesPrice:.3,cacheReadsPrice:.6,thinkingConfig:{maxBudget:38912,outputPrice:6}},"qwen-max-latest":{maxTokens:30720,contextWindow:32768,supportsImages:!1,supportsPromptCache:!1,inputPrice:2.4,outputPrice:9.6,cacheWritesPrice:2.4,cacheReadsPrice:9.6}},Mhe={"qwen-plus-latest":{maxTokens:16384,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:.8,outputPrice:2,cacheWritesPrice:.8,cacheReadsPrice:2,thinkingConfig:{maxBudget:38912,outputPrice:16}},"qwen-turbo-latest":{maxTokens:16384,contextWindow:1e6,supportsImages:!1,supportsPromptCache:!1,inputPrice:.3,outputPrice:.6,cacheWritesPrice:.3,cacheReadsPrice:.6,thinkingConfig:{maxBudget:38912,outputPrice:6}},"deepseek-v3":{maxTokens:8e3,contextWindow:64e3,supportsImages:!1,supportsPromptCache:!0,inputPrice:0,outputPrice:.28,cacheWritesPrice:.14,cacheReadsPrice:.014},"deepseek-r1":{maxTokens:8e3,contextWindow:64e3,supportsImages:!1,supportsPromptCache:!0,inputPrice:0,outputPrice:2.19,cacheWritesPrice:.55,cacheReadsPrice:.14},"qwen-vl-max":{maxTokens:30720,contextWindow:32768,supportsImages:!0,supportsPromptCache:!1,inputPrice:3,outputPrice:9,cacheWritesPrice:3,cacheReadsPrice:9},"qwen-vl-max-latest":{maxTokens:129024,contextWindow:131072,supportsImages:!0,supportsPromptCache:!1,inputPrice:3,outputPrice:9,cacheWritesPrice:3,cacheReadsPrice:9},"qwen-vl-plus":{maxTokens:6e3,contextWindow:8e3,supportsImages:!0,supportsPromptCache:!1,inputPrice:1.5,outputPrice:4.5,cacheWritesPrice:1.5,cacheReadsPrice:4.5},"qwen-vl-plus-latest":{maxTokens:129024,contextWindow:131072,supportsImages:!0,supportsPromptCache:!1,inputPrice:1.5,outputPrice:4.5,cacheWritesPrice:1.5,cacheReadsPrice:4.5}},Yet=(r=>(r.CHINA="china",r.INTERNATIONAL="international",r))(Yet||{}),xee=Object.keys(Xq)[0],drr=Object.keys(Mhe)[0],Phe="doubao-1-5-pro-256k-250115",Zq={"doubao-1-5-pro-256k-250115":{maxTokens:12288,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.7,outputPrice:1.3,cacheWritesPrice:0,cacheReadsPrice:0},"doubao-1-5-pro-32k-250115":{maxTokens:12288,contextWindow:32e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.11,outputPrice:.3,cacheWritesPrice:0,cacheReadsPrice:0},"deepseek-v3-250324":{maxTokens:12288,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.55,outputPrice:2.19,cacheWritesPrice:0,cacheReadsPrice:0},"deepseek-r1-250120":{maxTokens:32768,contextWindow:64e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.27,outputPrice:1.09,cacheWritesPrice:0,cacheReadsPrice:0}},eH="devstral-2512",mP={"devstral-2512":{maxTokens:256e3,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0},"labs-devstral-small-2512":{maxTokens:256e3,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0},"mistral-large-2512":{maxTokens:256e3,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.5,outputPrice:1.5},"ministral-14b-2512":{maxTokens:256e3,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.2,outputPrice:.2},"mistral-small-latest":{maxTokens:128e3,contextWindow:128e3,supportsImages:!0,supportsPromptCache:!1,inputPrice:.1,outputPrice:.3},"mistral-medium-latest":{maxTokens:128e3,contextWindow:128e3,supportsImages:!0,supportsPromptCache:!1,inputPrice:.4,outputPrice:2},"mistral-small-2501":{maxTokens:32e3,contextWindow:32e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.1,outputPrice:.3},"open-codestral-mamba":{maxTokens:256e3,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.15,outputPrice:.15},"codestral-2501":{maxTokens:256e3,contextWindow:256e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.3,outputPrice:.9},"devstral-small-2505":{maxTokens:128e3,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:.1,outputPrice:.3},"devstral-medium-latest":{maxTokens:128e3,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:.4,outputPrice:2}},tH="anthropic/claude-4-6-sonnet",frr={maxTokens:-1,contextWindow:128e3,supportsImages:!0,supportsPromptCache:!0,inputPrice:0,supportsTools:!0,outputPrice:0,cacheWritesPrice:0,cacheReadsPrice:0,temperature:0},rH={"openai/gpt-oss-120b":{maxTokens:32766,contextWindow:131e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.15,outputPrice:.6},"openai/gpt-oss-20b":{maxTokens:32766,contextWindow:131e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.05,outputPrice:.2}},Ohe="openai/gpt-oss-120b",nH={"MiniMaxAI/MiniMax-M2.5":{supportsTools:!0,maxTokens:40960,contextWindow:197e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.3,outputPrice:1.2,description:"MoE model with a highly sparse architecture designed for high-throughput and low latency with strong coding capabilities"},"nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8":{maxTokens:8192,contextWindow:262e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.2,outputPrice:.8,description:"A LatentMoE model designed to deliver strong agentic, reasoning, and conversational capabilities"},"openai/gpt-oss-120b":{maxTokens:32768,contextWindow:131e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.15,outputPrice:.6,description:"Efficient Mixture-of-Experts model designed for high-reasoning, agentic and general-purpose use cases"},"openai/gpt-oss-20b":{maxTokens:32768,contextWindow:131e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.05,outputPrice:.2,description:"Lower latency Mixture-of-Experts model trained on OpenAI\u2019s Harmony response format with reasoning capabilities"},"zai-org/GLM-5-FP8":{supportsTools:!0,maxTokens:8192,contextWindow:2e5,supportsImages:!1,supportsPromptCache:!1,inputPrice:1,outputPrice:3.2,description:"Mixture-of-Experts model for long-horizon agentic tasks with strong performance on reasoning and coding"}},iH="openai/gpt-oss-120b",EP="grok-4-1-fast-reasoning",yP={"grok-4-1-fast-reasoning":{contextWindow:2e6,supportsImages:!1,supportsPromptCache:!0,inputPrice:.2,cacheReadsPrice:.05,outputPrice:.5,description:"xAI's Grok 4.1 Reasoning Fast - multimodal model with 2M context."},"grok-4-1-fast-non-reasoning":{contextWindow:2e6,supportsImages:!0,supportsPromptCache:!0,inputPrice:.2,cacheReadsPrice:.05,outputPrice:.5,description:"xAI's Grok 4.1 Non-Reasoning Fast - multimodal model with 2M context."},"grok-code-fast-1":{contextWindow:256e3,supportsImages:!1,supportsPromptCache:!0,inputPrice:.2,cacheReadsPrice:.02,outputPrice:1.5,description:"xAI's Grok Coding model."}},Fhe="Meta-Llama-3.3-70B-Instruct",aH={"DeepSeek-R1-0528":{maxTokens:7168,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,temperature:.6,inputPrice:5,outputPrice:7},"DeepSeek-R1-Distill-Llama-70B":{maxTokens:4096,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,temperature:.6,inputPrice:.7,outputPrice:1.4},"DeepSeek-V3-0324":{maxTokens:7168,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,temperature:.3,inputPrice:3,outputPrice:4.5},"DeepSeek-V3.1":{maxTokens:7168,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,temperature:.6,inputPrice:3,outputPrice:4.5},"DeepSeek-V3.1-Terminus":{maxTokens:7168,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,temperature:.6,inputPrice:3,outputPrice:4.5},"Llama-4-Maverick-17B-128E-Instruct":{maxTokens:4096,contextWindow:131072,supportsImages:!0,supportsPromptCache:!1,temperature:.6,inputPrice:.63,outputPrice:1.8},"Meta-Llama-3.1-8B-Instruct":{maxTokens:4096,contextWindow:16384,supportsImages:!1,supportsPromptCache:!1,temperature:.6,inputPrice:.1,outputPrice:.2},"Meta-Llama-3.3-70B-Instruct":{maxTokens:3072,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,temperature:.6,inputPrice:.6,outputPrice:1.2},"MiniMax-M2.5":{supportsTools:!0,maxTokens:16384,contextWindow:163840,supportsImages:!1,supportsPromptCache:!1,temperature:1,inputPrice:.3,outputPrice:1.2},"Qwen3-235B":{maxTokens:4096,contextWindow:65536,supportsImages:!1,supportsPromptCache:!1,temperature:.7,inputPrice:.4,outputPrice:.8},"Qwen3-32B":{maxTokens:4096,contextWindow:32768,supportsImages:!1,supportsPromptCache:!1,temperature:.6,inputPrice:.4,outputPrice:.8}},Nhe="zai-glm-4.7",p7={"zai-glm-4.7":{supportsTools:!0,maxTokens:4e4,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,temperature:.9,inputPrice:0,outputPrice:0,description:"Highly capable general-purpose model on Cerebras (up to 1,000 tokens/s), competitive with leading proprietary models on coding tasks."},"gpt-oss-120b":{maxTokens:65536,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,description:"Intelligent general purpose model with 3,000 tokens/s"},"qwen-3-235b-a22b-instruct-2507":{maxTokens:64e3,contextWindow:64e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,description:"Intelligent model with ~1400 tokens/s"}},CP="openai/gpt-oss-20b",g_={"openai/gpt-oss-120b":{maxTokens:32766,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:.15,outputPrice:.75,description:"A state-of-the-art 120B open-weight Mixture-of-Experts language model optimized for strong reasoning, tool use, and efficient deployment on large GPUs"},"openai/gpt-oss-20b":{maxTokens:32766,contextWindow:131072,supportsImages:!1,supportsPromptCache:!1,inputPrice:.1,outputPrice:.5,description:"A compact 20B open-weight Mixture-of-Experts language model designed for strong reasoning and tool use, ideal for edge devices and local inference."}},c4e="anthropic/claude-4-6-sonnet-latest",hrr={maxTokens:8192,contextWindow:2e5,supportsImages:!0,supportsPromptCache:!0,inputPrice:3,outputPrice:15,cacheWritesPrice:3.75,cacheReadsPrice:.3,description:"Anthropic's most intelligent model. Highest level of intelligence and capability."},vP={"kimi-k2.6":{maxTokens:32e3,contextWindow:262144,supportsImages:!0,supportsReasoning:!0,supportsPromptCache:!0,inputPrice:.95,outputPrice:4,cacheReadsPrice:.16,temperature:1,isR1FormatRequired:!0,supportsTools:!0},"kimi-k2.5":{maxTokens:32e3,contextWindow:262144,supportsImages:!0,supportsReasoning:!0,supportsPromptCache:!0,inputPrice:.6,outputPrice:3,cacheReadsPrice:.1,temperature:1,isR1FormatRequired:!0,supportsTools:!0},"kimi-k2-0905-preview":{maxTokens:16384,contextWindow:262144,supportsImages:!1,supportsReasoning:!0,supportsPromptCache:!1,inputPrice:.6,outputPrice:2.5,temperature:.6,isR1FormatRequired:!0,supportsTools:!0},"kimi-k2-thinking-turbo":{maxTokens:32e3,contextWindow:262144,supportsImages:!1,supportsReasoning:!0,supportsPromptCache:!1,inputPrice:2.4,outputPrice:10,temperature:1,isR1FormatRequired:!0,supportsTools:!0}},bP="kimi-k2.6",oH="DeepSeek-V3",sH={"DeepSeek-V3":{maxTokens:16384,contextWindow:64e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.27,outputPrice:1.1,cacheWritesPrice:0,cacheReadsPrice:0},"DeepSeek-R1":{maxTokens:16384,contextWindow:64e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.55,outputPrice:2.2,cacheWritesPrice:0,cacheReadsPrice:0,thinkingConfig:{maxBudget:8192,outputPrice:2.2}}},l4={"moonshotai/Kimi-K2-Thinking":{supportsTools:!0,maxTokens:163800,contextWindow:262e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.6,outputPrice:2.5,cacheWritesPrice:0,cacheReadsPrice:0,description:"Kimi K2 Thinking - A model with enhanced reasoning capabilities from Kimi K2",supportsReasoning:!0},"zai-org/GLM-4.6":{supportsTools:!0,maxTokens:2e5,contextWindow:2e5,supportsImages:!1,supportsPromptCache:!1,inputPrice:.6,outputPrice:2.2,cacheWritesPrice:0,cacheReadsPrice:0,description:"Frontier open model with advanced agentic, reasoning and coding capabilities",supportsReasoning:!0},"deepseek-ai/DeepSeek-R1":{maxTokens:131072,contextWindow:163840,supportsImages:!1,supportsPromptCache:!1,inputPrice:2.55,outputPrice:5.95,cacheWritesPrice:0,cacheReadsPrice:0,description:"DeepSeek's first-generation reasoning model",supportsReasoning:!0},"deepseek-ai/DeepSeek-V3.2":{maxTokens:131072,contextWindow:163840,supportsImages:!1,supportsPromptCache:!1,inputPrice:.3,outputPrice:.45,cacheWritesPrice:0,cacheReadsPrice:0,description:"DeepSeek's hybrid reasoning model with efficient long context scaling with GPT-5 level performance",supportsReasoning:!0},"openai/gpt-oss-120b":{maxTokens:128072,contextWindow:128072,supportsImages:!1,supportsPromptCache:!1,inputPrice:.1,outputPrice:.5,cacheWritesPrice:0,cacheReadsPrice:0,description:"Extremely capable general-purpose LLM with strong, controllable reasoning capabilities",supportsReasoning:!0}},uH="zai-org/GLM-4.6",l4e="glm-5",Iee={"glm-5.1":{supportsTools:!0,maxTokens:128e3,contextWindow:2e5,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,thinkingConfig:{maxBudget:128e3},cacheReadsPrice:.26,inputPrice:1.4,outputPrice:4.4},"glm-5":{supportsTools:!0,maxTokens:128e3,contextWindow:2e5,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,thinkingConfig:{maxBudget:128e3},cacheReadsPrice:.2,inputPrice:1,outputPrice:3.2}},prr="glm-5",d4e={"glm-5.1":{supportsTools:!0,maxTokens:128e3,contextWindow:2e5,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,thinkingConfig:{maxBudget:128e3},cacheReadsPrice:.26,inputPrice:1.4,outputPrice:4.4},"glm-5":{supportsTools:!0,maxTokens:128e3,contextWindow:2e5,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,thinkingConfig:{maxBudget:128e3},cacheReadsPrice:.2,inputPrice:1,outputPrice:3.2}},cH="accounts/fireworks/models/kimi-k2p6",lH={"accounts/fireworks/models/kimi-k2p6":{isR1FormatRequired:!0,supportsTools:!0,maxTokens:16384,contextWindow:262144,supportsImages:!0,supportsReasoning:!0,supportsPromptCache:!0,inputPrice:.95,outputPrice:4,cacheReadsPrice:.16,description:"Moonshot's flagship open agentic model. Kimi K2.5 unifies vision and text, thinking and non-thinking modes, and single-agent and multi-agent execution."},"accounts/fireworks/models/kimi-k2p5":{isR1FormatRequired:!0,supportsTools:!0,maxTokens:16384,contextWindow:262144,supportsImages:!0,supportsReasoning:!0,supportsPromptCache:!0,inputPrice:.6,outputPrice:3,cacheWritesPrice:.6,cacheReadsPrice:.1,description:"Moonshot's flagship open agentic model. Kimi K2.5 unifies vision and text, thinking and non-thinking modes, and single-agent and multi-agent execution."},"accounts/fireworks/models/deepseek-v3p2":{maxTokens:16384,contextWindow:163840,supportsImages:!1,supportsPromptCache:!0,inputPrice:.56,outputPrice:1.68,cacheWritesPrice:.56,cacheReadsPrice:.28,description:"DeepSeek V3.2 model tuned for high computational efficiency and strong reasoning and agent performance."},"accounts/fireworks/models/glm-5":{supportsTools:!0,maxTokens:16384,contextWindow:202752,supportsImages:!1,supportsReasoning:!0,supportsPromptCache:!0,inputPrice:1,outputPrice:3.2,cacheWritesPrice:1,cacheReadsPrice:.2,description:"GLM-5 is Z.ai's flagship reasoning model for complex systems engineering and long-horizon agentic tasks."},"accounts/fireworks/models/minimax-m2p5":{supportsTools:!0,maxTokens:16384,contextWindow:196608,supportsImages:!1,supportsReasoning:!0,supportsPromptCache:!0,inputPrice:.3,outputPrice:1.2,cacheWritesPrice:.3,cacheReadsPrice:.03,description:"MiniMax M2.5 is built for state-of-the-art coding, agentic tool use."},"accounts/fireworks/models/minimax-m2p1":{supportsTools:!0,maxTokens:16384,contextWindow:196608,supportsImages:!1,supportsReasoning:!0,supportsPromptCache:!0,inputPrice:.3,outputPrice:1.2,cacheWritesPrice:.3,cacheReadsPrice:.03,description:"MiniMax M2.1 is tuned for strong real-world performance across coding, agent-driven, and workflow-heavy tasks."},"accounts/fireworks/models/gpt-oss-120b":{maxTokens:16384,contextWindow:131072,supportsImages:!1,supportsPromptCache:!0,inputPrice:.15,outputPrice:.6,cacheWritesPrice:.15,cacheReadsPrice:.01,description:"OpenAI gpt-oss-120b open-weight model for production and high-reasoning use cases."}},dH={"qwen3-coder-plus":{maxTokens:65536,contextWindow:1e6,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,cacheWritesPrice:0,cacheReadsPrice:0,description:"Qwen3 Coder Plus - High-performance coding model with 1M context window for large codebases"},"qwen3-coder-flash":{maxTokens:65536,contextWindow:1e6,supportsImages:!1,supportsPromptCache:!1,inputPrice:0,outputPrice:0,cacheWritesPrice:0,cacheReadsPrice:0,description:"Qwen3 Coder Flash - Fast coding model with 1M context window optimized for speed"}},Lhe="qwen3-coder-plus",fH="MiniMax-M2.7",hH={"MiniMax-M2.7":{supportsTools:!0,maxTokens:128e3,contextWindow:192e3,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,inputPrice:.3,outputPrice:1.2,cacheWritesPrice:.375,cacheReadsPrice:.06,description:"Latest flagship model with enhanced reasoning and coding"},"MiniMax-M2.7-highspeed":{supportsTools:!0,maxTokens:128e3,contextWindow:192e3,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,inputPrice:.6,outputPrice:2.4,cacheWritesPrice:.375,cacheReadsPrice:.06,description:"High-speed version of M2.7 for low-latency scenarios"},"MiniMax-M2.5":{supportsTools:!0,maxTokens:128e3,contextWindow:192e3,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,inputPrice:.3,outputPrice:1.2,cacheWritesPrice:.375,cacheReadsPrice:.03},"MiniMax-M2.5-highspeed":{supportsTools:!0,maxTokens:128e3,contextWindow:192e3,supportsImages:!1,supportsPromptCache:!0,supportsReasoning:!0,inputPrice:.6,outputPrice:2.4,cacheWritesPrice:.375,cacheReadsPrice:.03}},pH="Hermes-4-405B",AH={"Hermes-4-405B":{maxTokens:8192,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.09,outputPrice:.37,description:"This is the largest model in the Hermes 4 family, and it is the fullest expression of our design, focused on advanced reasoning and creative depth rather than optimizing inference speed or cost."},"Hermes-4-70B":{maxTokens:8192,contextWindow:128e3,supportsImages:!1,supportsPromptCache:!1,inputPrice:.05,outputPrice:.2,description:"This incarnation of Hermes 4 balances scale and size. It handles complex reasoning tasks, while staying fast and cost effective. A versatile choice for many use cases."}},Arr=[["anthropic",Fm],["claude-code",Wq],["bedrock",uS],["vertex",h7],["gemini",fP],["openai-native",hP],["openai-codex",See],["deepseek",AP],["huggingface",gP],["qwen",Xq],["qwen",Mhe],["doubao",Zq],["mistral",mP],["nebius",rH],["wandb",nH],["xai",yP],["sambanova",aH],["cerebras",p7],["groq",g_],["moonshot",vP],["huawei-cloud-maas",sH],["baseten",l4],["zai",Iee],["zai",d4e],["fireworks",lH],["qwen-code",dH],["minimax",hH],["nousResearch",AH]]});function wh(t,e){let r=Qiu[t];return r?`${e}Mode${r}`:`${e}ModeApiModelId`}function mrr(t){return Uiu[t]||""}var Qiu,_ee,Uiu,f4e=$(()=>{"use strict";Bo();Qiu={openrouter:"OpenRouterModelId",dirac:"DiracModelId",openai:"OpenAiModelId",lmstudio:"LmStudioModelId",litellm:"LiteLlmModelId",requesty:"RequestyModelId",together:"TogetherModelId",fireworks:"FireworksModelId",groq:"GroqModelId",baseten:"BasetenModelId",huggingface:"HuggingFaceModelId",aihubmix:"AihubmixModelId",nousResearch:"NousResearchModelId","vercel-ai-gateway":"VercelAiGatewayModelId"},_ee={dirac:["diracApiKey"],anthropic:"apiKey",openrouter:"openRouterApiKey",bedrock:["awsAccessKey","awsBedrockApiKey"],openai:["openAiApiKey","openAiCompatibleCustomApiKey"],gemini:"geminiApiKey","openai-native":"openAiNativeApiKey",requesty:"requestyApiKey",together:"togetherApiKey",deepseek:"deepSeekApiKey",qwen:"qwenApiKey","qwen-code":"qwenApiKey",doubao:"doubaoApiKey",mistral:"mistralApiKey",litellm:"liteLlmApiKey",moonshot:"moonshotApiKey",nebius:"nebiusApiKey",fireworks:"fireworksApiKey",xai:"xaiApiKey",sambanova:"sambanovaApiKey",cerebras:"cerebrasApiKey",groq:"groqApiKey",huggingface:"huggingFaceApiKey","huawei-cloud-maas":"huaweiCloudMaasApiKey",dify:"difyApiKey",baseten:"basetenApiKey","vercel-ai-gateway":"vercelAiGatewayApiKey",zai:"zaiApiKey",aihubmix:"aihubmixApiKey",minimax:"minimaxApiKey",nousResearch:"nousResearchApiKey",wandb:"wandbApiKey"},Uiu={anthropic:h_,openrouter:p_,dirac:p_,openai:A_,lmstudio:"",litellm:tH,requesty:c4e,together:p_,fireworks:cH,groq:CP,baseten:uH,huggingface:$q,"huawei-cloud-maas":oH,aihubmix:p_,bedrock:c4,nousResearch:pH,"vercel-ai-gateway":p_,xai:EP,gemini:p3,minimax:fH,moonshot:bP,qwen:xee,deepseek:pP,wandb:iH}});var jet,Err=$(()=>{"use strict";jet={version:1,enabled:!0,favorites:[],maxRequests:20,actions:{readFiles:!0,readFilesExternally:!1,editFiles:!1,editFilesExternally:!1,executeCommands:!0,useBrowser:!1,applyDiff:!1},enableNotifications:!1}});var $et,yrr=$(()=>{"use strict";$et={viewport:{width:900,height:600},remoteBrowserEnabled:!1,remoteBrowserHost:"http://localhost:9222",chromeExecutablePath:"",disableToolUse:!0,customArgs:""}});function FLn(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e,r.default]).filter(([e,r])=>r!==void 0))}function jiu(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>"transform"in r&&r.transform!==void 0).map(([e,r])=>[e,r.transform]))}function NLn(t,e){return new Set(Object.entries(t).filter(([r,i])=>e in i&&i[e]===!0).map(([r])=>r))}var h4e,RLn,Giu,Qhe,qiu,DLn,Xet,Hiu,kLn,Viu,Wiu,p4e,Kiu,Crr,Zet,MLn,ett,vrr,PLn,OLn,ziu,Tee,brr,Yiu,Srr,xrr,Irr,Jiu,_rr,Uhe=$(()=>{"use strict";Err();Bo();yrr();h4e={diracVersion:{default:void 0},"dirac.generatedMachineId":{default:void 0},lastShownAnnouncementId:{default:void 0},taskHistory:{default:[],isAsync:!0},favoritedModelIds:{default:[]},terminalReuseEnabled:{default:!0},vscodeTerminalExecutionMode:{default:"vscodeTerminal"},isNewUser:{default:!0},welcomeViewCompleted:{default:void 0},workspaceRoots:{default:void 0},primaryRootIndex:{default:0},multiRootEnabled:{default:!0},lastDismissedInfoBannerVersion:{default:0},lastDismissedModelBannerVersion:{default:0},lastDismissedCliBannerVersion:{default:0},remoteRulesToggles:{default:{}},remoteWorkflowToggles:{default:{}},dismissedBanners:{default:[]},worktreeAutoOpenPath:{default:void 0}},RLn={liteLlmBaseUrl:{default:void 0},liteLlmUsePromptCache:{default:void 0},openAiHeaders:{default:{}},anthropicBaseUrl:{default:void 0},openRouterProviderSorting:{default:void 0},awsRegion:{default:void 0},awsUseCrossRegionInference:{default:void 0},awsUseGlobalInference:{default:void 0},awsBedrockUsePromptCache:{default:void 0},awsAuthentication:{default:void 0},awsUseProfile:{default:void 0},awsProfile:{default:void 0},awsBedrockEndpoint:{default:void 0},claudeCodePath:{default:void 0},vertexProjectId:{default:void 0},vertexRegion:{default:void 0},openAiBaseUrl:{default:void 0},lmStudioBaseUrl:{default:void 0},lmStudioMaxTokens:{default:void 0},geminiBaseUrl:{default:void 0},geminiSearchEnabled:{default:!0},requestyBaseUrl:{default:void 0},fireworksModelMaxCompletionTokens:{default:void 0},fireworksModelMaxTokens:{default:void 0},qwenCodeOauthPath:{default:void 0},azureApiVersion:{default:void 0},qwenApiLine:{default:void 0},moonshotApiLine:{default:void 0},requestTimeoutMs:{default:void 0},difyBaseUrl:{default:void 0},zaiApiLine:{default:void 0},minimaxApiLine:{default:void 0},aihubmixBaseUrl:{default:void 0},aihubmixAppCode:{default:void 0},enableParallelToolCalling:{default:!0},planModeApiModelId:{default:void 0},planModeThinkingBudgetTokens:{default:void 0},geminiPlanModeThinkingLevel:{default:void 0},planModeReasoningEffort:{default:void 0},planModeVerbosity:{default:void 0},planModeVsCodeLmModelSelector:{default:void 0},planModeAwsBedrockCustomSelected:{default:void 0},planModeAwsBedrockCustomModelBaseId:{default:void 0},planModeOpenRouterModelId:{default:void 0},planModeOpenRouterModelInfo:{default:void 0},planModeDiracModelId:{default:void 0},planModeDiracModelInfo:{default:void 0},planModeOpenAiModelId:{default:void 0},planModeOpenAiModelInfo:{default:void 0},planModeLmStudioModelId:{default:void 0},planModeLiteLlmModelId:{default:void 0},planModeLiteLlmModelInfo:{default:void 0},planModeRequestyModelId:{default:void 0},planModeRequestyModelInfo:{default:void 0},planModeTogetherModelId:{default:void 0},planModeFireworksModelId:{default:void 0},planModeGroqModelId:{default:void 0},planModeGroqModelInfo:{default:void 0},planModeBasetenModelId:{default:void 0},planModeBasetenModelInfo:{default:void 0},planModeHuggingFaceModelId:{default:void 0},planModeHuggingFaceModelInfo:{default:void 0},planModeHuaweiCloudMaasModelId:{default:void 0},planModeHuaweiCloudMaasModelInfo:{default:void 0},planModeAihubmixModelId:{default:void 0},planModeAihubmixModelInfo:{default:void 0},planModeGithubCopilotModelId:{default:void 0},planModeGithubCopilotModelInfo:{default:void 0},planModeNousResearchModelId:{default:void 0},planModeVercelAiGatewayModelId:{default:void 0},planModeVercelAiGatewayModelInfo:{default:void 0},actModeApiModelId:{default:void 0},actModeThinkingBudgetTokens:{default:void 0},geminiActModeThinkingLevel:{default:void 0},actModeReasoningEffort:{default:void 0},actModeVerbosity:{default:void 0},actModeVsCodeLmModelSelector:{default:void 0},actModeAwsBedrockCustomSelected:{default:void 0},actModeAwsBedrockCustomModelBaseId:{default:void 0},actModeOpenRouterModelId:{default:void 0},actModeOpenRouterModelInfo:{default:void 0},actModeDiracModelId:{default:void 0},actModeDiracModelInfo:{default:void 0},actModeOpenAiModelId:{default:void 0},actModeOpenAiModelInfo:{default:void 0},actModeLmStudioModelId:{default:void 0},actModeLiteLlmModelId:{default:void 0},actModeLiteLlmModelInfo:{default:void 0},actModeRequestyModelId:{default:void 0},actModeRequestyModelInfo:{default:void 0},actModeTogetherModelId:{default:void 0},actModeFireworksModelId:{default:void 0},actModeGroqModelId:{default:void 0},actModeGroqModelInfo:{default:void 0},actModeBasetenModelId:{default:void 0},actModeBasetenModelInfo:{default:void 0},actModeHuggingFaceModelId:{default:void 0},actModeHuggingFaceModelInfo:{default:void 0},actModeHuaweiCloudMaasModelId:{default:void 0},actModeHuaweiCloudMaasModelInfo:{default:void 0},actModeAihubmixModelId:{default:void 0},actModeAihubmixModelInfo:{default:void 0},actModeGithubCopilotModelId:{default:void 0},actModeGithubCopilotModelInfo:{default:void 0},actModeNousResearchModelId:{default:void 0},actModeVercelAiGatewayModelId:{default:void 0},actModeVercelAiGatewayModelInfo:{default:void 0},planModeApiProvider:{default:Wet},actModeApiProvider:{default:Wet},lmStudioModelId:{default:void 0}},Giu={autoApprovalSettings:{default:jet},globalDiracRulesToggles:{default:{}},globalWorkflowToggles:{default:{}},globalSkillsToggles:{default:{}},browserSettings:{default:$et,transform:t=>({...$et,...t})},telemetrySetting:{default:"unset"},planActSeparateModelsSetting:{default:!1,isComputed:!0},enableCheckpointsSetting:{default:!0},shellIntegrationTimeout:{default:4e3},defaultTerminalProfile:{default:"default"},terminalOutputLineLimit:{default:500},maxConsecutiveMistakes:{default:5},strictPlanModeEnabled:{default:!1},hooksEnabled:{default:!0},yoloModeToggled:{default:!1},autoApproveAllToggled:{default:!1},useAutoCondense:{default:!0},subagentsEnabled:{default:!1},diracWebToolsEnabled:{default:!0},worktreesEnabled:{default:!1},preferredLanguage:{default:"English"},mode:{default:"act"},customPrompt:{default:void 0},backgroundEditEnabled:{default:!1},optOutOfRemoteConfig:{default:!1},doubleCheckCompletionEnabled:{default:!1},openTelemetryEnabled:{default:!0},openTelemetryMetricsExporter:{default:void 0},openTelemetryLogsExporter:{default:void 0},openTelemetryOtlpProtocol:{default:"http/json"},openTelemetryOtlpEndpoint:{default:"http://localhost:4318"},openTelemetryOtlpMetricsProtocol:{default:void 0},openTelemetryOtlpMetricsEndpoint:{default:void 0},openTelemetryOtlpLogsProtocol:{default:void 0},openTelemetryOtlpLogsEndpoint:{default:void 0},openTelemetryMetricExportInterval:{default:6e4},openTelemetryOtlpInsecure:{default:!1},openTelemetryLogBatchSize:{default:512},openTelemetryLogBatchTimeout:{default:5e3},openTelemetryLogMaxQueueSize:{default:2048},writePromptMetadataEnabled:{default:!1},writePromptMetadataDirectory:{default:void 0}},Qhe={...RLn,...Giu},qiu={...h4e,...Qhe},DLn=["apiKey","dirac:diracAccountId","diracApiKey","openRouterApiKey","awsAccessKey","awsSecretKey","awsSessionToken","awsBedrockApiKey","openAiApiKey","geminiApiKey","openAiNativeApiKey","deepSeekApiKey","requestyApiKey","togetherApiKey","fireworksApiKey","qwenApiKey","doubaoApiKey","mistralApiKey","liteLlmApiKey","authNonce","xaiApiKey","moonshotApiKey","zaiApiKey","huggingFaceApiKey","nebiusApiKey","sambanovaApiKey","cerebrasApiKey","groqApiKey","huaweiCloudMaasApiKey","basetenApiKey","vercelAiGatewayApiKey","difyApiKey","openAiCompatibleCustomApiKey","minimaxApiKey","aihubmixApiKey","nousResearchApiKey","openai-codex-oauth-credentials","wandbApiKey","github-copilot-oauth-credentials"],Xet=["localDiracRulesToggles","localCursorRulesToggles","localWindsurfRulesToggles","localAgentsRulesToggles","localSkillsToggles","workflowToggles"],Hiu=new Set(Object.keys(h4e)),kLn=new Set(Object.keys(Qhe)),Viu=new Set(Object.keys(qiu)),Wiu=new Set(Object.keys(RLn)),p4e=Array.from(DLn),Kiu=Array.from(kLn),Crr=Array.from(Wiu),Zet=Array.from(Viu),MLn=FLn(h4e),ett=FLn(Qhe),vrr=jiu(Qhe),PLn=NLn({...h4e,...Qhe},"isAsync"),OLn=NLn({...h4e,...Qhe},"isComputed"),ziu=t=>Hiu.has(t),Tee=t=>kLn.has(t),brr=t=>new Set(DLn).has(t),Yiu=t=>new Set(Xet).has(t),Srr=t=>PLn.has(t),xrr=t=>OLn.has(t),Irr=t=>MLn[t]??ett[t],Jiu=t=>t in vrr,_rr=(t,e)=>{let r=vrr[t];return r?r(e):e}});import LLn from"node:fs";import $iu from"node:os";import Ghe from"node:path";function Ziu(t){let e=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);e=(e<<5)-e+i,e=e&e}return Math.abs(e).toString(16).substring(0,8)}function Trr(t={}){let e=t.diracDir||process.env.DIRAC_DIR||Ghe.join($iu.homedir(),".dirac"),r=Ghe.join(e,Xiu),i;if(t.workspaceStorageDir)i=t.workspaceStorageDir;else{let o=t.workspacePath||process.cwd(),n=Ziu(o);i=Ghe.join(r,"workspaces",n)}LLn.mkdirSync(r,{recursive:!0}),LLn.mkdirSync(i,{recursive:!0});let a=new Uq(Ghe.join(r,"globalState.json"),"GlobalState");return{globalState:a,globalStateBackingStore:a,secrets:new Uq(Ghe.join(r,"secrets.json"),"Secrets",{fileMode:384}),workspaceState:new Uq(Ghe.join(i,"workspaceState.json"),"WorkspaceState"),dataDir:r,workspaceStoragePath:i}}var Xiu,wrr=$(()=>{"use strict";ztr();Xiu="data"});var Brr={};Gn(Brr,{OPENAI_REASONING_EFFORT_OPTIONS:()=>gH,isOpenaiReasoningEffort:()=>wee,normalizeOpenaiReasoningEffort:()=>TE});function wee(t){return typeof t=="string"&&gH.includes(t)}function TE(t){let e=(t||"medium").toLowerCase();return wee(e)?e:"medium"}var gH,Xx=$(()=>{"use strict";gH=["none","low","medium","high","xhigh"]});var Rrr={};Gn(Rrr,{ASYNC_PROPERTIES:()=>PLn,ApiHandlerSettingsKeys:()=>Crr,COMPUTED_PROPERTIES:()=>OLn,DiracBlobStorage:()=>Fet,DiracFileStorage:()=>Uq,DiracInMemoryStorage:()=>Ktr,DiracStorage:()=>The,DiracSyncStorage:()=>n4e,GLOBAL_STATE_DEFAULTS:()=>MLn,GlobalStateAndSettingKeys:()=>Zet,LocalStateKeys:()=>Xet,OPENAI_REASONING_EFFORT_OPTIONS:()=>gH,ProviderToApiKeyMap:()=>_ee,SETTINGS_DEFAULTS:()=>ett,SETTINGS_TRANSFORMS:()=>vrr,SecretKeys:()=>p4e,SettingsKeys:()=>Kiu,applyTransform:()=>_rr,blobStorage:()=>u7,createStorageContext:()=>Trr,getDefaultValue:()=>Irr,getProviderDefaultModelId:()=>mrr,getProviderModelIdKey:()=>wh,hasTransform:()=>Jiu,isAsyncProperty:()=>Srr,isComputedProperty:()=>xrr,isGlobalStateKey:()=>ziu,isLocalStateKey:()=>Yiu,isOpenaiReasoningEffort:()=>wee,isSecretKey:()=>brr,isSettingsKey:()=>Tee,normalizeOpenaiReasoningEffort:()=>TE});var mH=$(()=>{"use strict";i4e();ztr();Oet();f4e();Uhe();wrr();Xx()});import{existsSync as eau,readFileSync as tau}from"node:fs";import rau from"node:path";import Drr from"pino";function ULn(t,e={}){try{if(eau(t))return JSON.parse(tau(t,"utf8"))}catch{}return e}function nau(t){let e=QLn.get(t);if(!e){let r=Drr.transport({target:"pino-roll",options:{name:t,file:Prr.replace(".1",""),mkdir:!0,frequency:"daily",limit:{count:5}}});e=Drr({timestamp:Drr.stdTimeFunctions.isoTime},r),QLn.set(t,e)}return e}var Prr,ttt,QLn,Mrr,EH,krr,iau,Orr,GLn,rtt,SP=$(()=>{"use strict";DA();Wtr();l7n();mH();Prr=rau.join(Vtr.log,"dirac.1.log");ttt=class{variables=new Map;persistent=!0;description="CLI Environment Variables";entries(){return this.variables.entries()}replace(e,r){this.variables.set(e,{value:r,type:"replace"})}append(e,r){this.variables.set(e,{value:r,type:"append"})}prepend(e,r){this.variables.set(e,{value:r,type:"prepend"})}get(e){return this.variables.get(e)}forEach(e){this.variables.forEach((r,i)=>e(i,r,this))}delete(e){return this.variables.delete(e)}clear(){this.variables.clear()}getScoped(e){return this}},QLn=new Map;Mrr=class{listeners=[];event=e=>(this.listeners.push(e),{dispose:()=>{let r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)}});fire(e){this.listeners.forEach(r=>r(e))}dispose(){this.listeners.length=0}},EH=()=>{},krr=async()=>{},iau={dispose:EH},Orr={workspaceFolders:void 0,getWorkspaceFolder:t=>{},onDidChangeWorkspaceFolders:()=>iau,fs:{readFile:async t=>new Uint8Array,writeFile:krr,delete:krr,stat:async t=>({type:1,size:0}),readDirectory:async t=>[],createDirectory:krr}},GLn={showInformationMessage:async t=>{al(`[INFO] ${t}`)},showWarningMessage:async t=>{oS(`[WARN] ${t}`)},showErrorMessage:async t=>{r4e(`[ERROR] ${t}`)},createOutputChannel:t=>{let e=nau(t),r=i=>e.info({channel:t},i);return{appendLine:r,append:r,clear:EH,show:EH,hide:EH,dispose:EH}},terminals:[],activeTerminal:void 0,createTerminal:t=>({name:"CLI Terminal",processId:Promise.resolve(process.pid),sendText:e=>al(`[${new Date().toISOString()}] [Terminal] ${e}`),show:EH,hide:EH,dispose:EH})},rtt=new Mrr});var Nrr={};Gn(Nrr,{ENV_VAR_TO_SECRET_KEY:()=>qLn,ENV_VAR_TO_SETTINGS_KEY:()=>HLn,getProviderFromEnv:()=>aau,getSecretsFromEnv:()=>qhe,getSettingsFromEnv:()=>Frr});function qhe(){let t={};for(let[r,i]of Object.entries(qLn)){let a=process.env[r];a&&(t[i]=a)}process.env.OPENAI_API_KEY&&!t.openAiNativeApiKey&&(t.openAiNativeApiKey=process.env.OPENAI_API_KEY);let e=process.env.OPENAI_COMPATIBLE_CUSTOM_KEY||process.env.OPENAI_API_BASE;return e&&!t.openAiApiKey&&(t.openAiApiKey=e),t}function Frr(){let t={};for(let[e,r]of Object.entries(HLn)){let i=process.env[e];i&&(t[r]=i)}return process.env.AWS_BEDROCK_MODEL&&(process.env.AWS_BEDROCK_MODEL_ACT||(t.actModeApiModelId=process.env.AWS_BEDROCK_MODEL),process.env.AWS_BEDROCK_MODEL_PLAN||(t.planModeApiModelId=process.env.AWS_BEDROCK_MODEL)),t}function aau(){if(process.env.ANTHROPIC_API_KEY)return"anthropic";if(process.env.OPENROUTER_API_KEY)return"openrouter";if(process.env.OPENAI_API_KEY)return"openai-native";if(process.env.GEMINI_API_KEY)return"gemini";if(process.env.GOOGLE_CLOUD_PROJECT||process.env.GCP_PROJECT)return"vertex";if(process.env.AWS_ACCESS_KEY_ID||process.env.AWS_BEDROCK_MODEL)return"bedrock";if(process.env.GROQ_API_KEY)return"groq";if(process.env.XAI_API_KEY)return"xai";if(process.env.MISTRAL_API_KEY)return"mistral";if(process.env.MOONSHOT_API_KEY)return"moonshot";if(process.env.HF_TOKEN)return"huggingface";if(process.env.ZAI_API_KEY)return"zai";if(process.env.MINIMAX_API_KEY||process.env.MINIMAX_CN_API_KEY)return"minimax";if(process.env.CEREBRAS_API_KEY)return"cerebras";if(process.env.AI_GATEWAY_API_KEY)return"vercel-ai-gateway";if(process.env.OPENCODE_API_KEY||process.env.KIMI_API_KEY)return"openai-native";if(process.env.DEEPSEEK_API_KEY)return"deepseek";if(process.env.QWEN_API_KEY)return"qwen";if(process.env.TOGETHER_API_KEY)return"together";if(process.env.FIREWORKS_API_KEY)return"fireworks";if(process.env.NEBIUS_API_KEY)return"nebius";if(process.env.OPENAI_COMPATIBLE_CUSTOM_KEY||process.env.OPENAI_API_BASE)return"openai"}var qLn,HLn,A4e=$(()=>{"use strict";qLn={ANTHROPIC_API_KEY:"apiKey",OPENAI_API_KEY:"openAiApiKey",AZURE_OPENAI_API_KEY:"openAiApiKey",GEMINI_API_KEY:"geminiApiKey",GROQ_API_KEY:"groqApiKey",CEREBRAS_API_KEY:"cerebrasApiKey",XAI_API_KEY:"xaiApiKey",OPENROUTER_API_KEY:"openRouterApiKey",AI_GATEWAY_API_KEY:"vercelAiGatewayApiKey",ZAI_API_KEY:"zaiApiKey",MISTRAL_API_KEY:"mistralApiKey",MOONSHOT_API_KEY:"moonshotApiKey",MINIMAX_API_KEY:"minimaxApiKey",MINIMAX_CN_API_KEY:"minimaxApiKey",HF_TOKEN:"huggingFaceApiKey",OPENCODE_API_KEY:"openAiNativeApiKey",KIMI_API_KEY:"openAiNativeApiKey",DEEPSEEK_API_KEY:"deepSeekApiKey",QWEN_API_KEY:"qwenApiKey",TOGETHER_API_KEY:"togetherApiKey",FIREWORKS_API_KEY:"fireworksApiKey",NEBIUS_API_KEY:"nebiusApiKey",OPENAI_COMPATIBLE_CUSTOM_KEY:"openAiCompatibleCustomApiKey",OPENAI_API_BASE:"openAiCompatibleCustomApiKey",AWS_ACCESS_KEY_ID:"awsAccessKey",AWS_SECRET_ACCESS_KEY:"awsSecretKey",AWS_SESSION_TOKEN:"awsSessionToken"},HLn={GOOGLE_CLOUD_PROJECT:"vertexProjectId",GCP_PROJECT:"vertexProjectId",GOOGLE_CLOUD_LOCATION:"vertexRegion",GOOGLE_CLOUD_REGION:"vertexRegion",AWS_BEDROCK_MODEL:"actModeApiModelId",AWS_BEDROCK_MODEL_ACT:"actModeApiModelId",AWS_BEDROCK_MODEL_PLAN:"planModeApiModelId",AWS_REGION:"awsRegion"}});import{stat as oau,lstat as VLn,readdir as sau,realpath as uau}from"node:fs/promises";import{Readable as cau}from"node:stream";import{resolve as WLn,relative as lau,join as dau,sep as fau}from"node:path";function jLn(t,e={}){let r=e.entryType||e.type;if(r==="both"&&(r=m_.FILE_DIR_TYPE),r&&(e.type=r),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(r&&!KLn.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${KLn.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new Qrr(e)}var m_,Lrr,JLn,hau,KLn,pau,Aau,gau,mau,zLn,YLn,Qrr,$Ln=$(()=>{"use strict";m_={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},Lrr={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:m_.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(Lrr);JLn="READDIRP_RECURSIVE_ERROR",hau=new Set(["ENOENT","EPERM","EACCES","ELOOP",JLn]),KLn=[m_.DIR_TYPE,m_.EVERYTHING_TYPE,m_.FILE_DIR_TYPE,m_.FILE_TYPE],pau=new Set([m_.DIR_TYPE,m_.EVERYTHING_TYPE,m_.FILE_DIR_TYPE]),Aau=new Set([m_.EVERYTHING_TYPE,m_.FILE_DIR_TYPE,m_.FILE_TYPE]),gau=t=>hau.has(t.code),mau=process.platform==="win32",zLn=t=>!0,YLn=t=>{if(t===void 0)return zLn;if(typeof t=="function")return t;if(typeof t=="string"){let e=t.trim();return r=>r.basename===e}if(Array.isArray(t)){let e=t.map(r=>r.trim());return r=>e.some(i=>r.basename===i)}return zLn},Qrr=class extends cau{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let r={...Lrr,...e},{root:i,type:a}=r;this._fileFilter=YLn(r.fileFilter),this._directoryFilter=YLn(r.directoryFilter);let o=r.lstat?VLn:oau;mau?this._stat=n=>o(n,{bigint:!0}):this._stat=o,this._maxDepth=r.depth??Lrr.depth,this._wantsDir=a?pau.has(a):!1,this._wantsFile=a?Aau.has(a):!1,this._wantsEverything=a===m_.EVERYTHING_TYPE,this._root=WLn(i),this._isDirent=!r.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(i,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let r=this.parent,i=r&&r.files;if(i&&i.length>0){let{path:a,depth:o}=r,n=i.splice(0,e).map(u=>this._formatEntry(u,a)),s=await Promise.all(n);for(let u of s){if(!u)continue;if(this.destroyed)return;let f=await this._getEntryType(u);f==="directory"&&this._directoryFilter(u)?(o<=this._maxDepth&&this.parents.push(this._exploreDir(u.fullPath,o+1)),this._wantsDir&&(this.push(u),e--)):(f==="file"||this._includeAsFile(u))&&this._fileFilter(u)&&this._wantsFile&&(this.push(u),e--)}}else{let a=this.parents.pop();if(!a){this.push(null);break}if(this.parent=await a,this.destroyed)return}}}catch(r){this.destroy(r)}finally{this.reading=!1}}}async _exploreDir(e,r){let i;try{i=await sau(e,this._rdOptions)}catch(a){this._onError(a)}return{files:i,depth:r,path:e}}async _formatEntry(e,r){let i,a=this._isDirent?e.name:e;try{let o=WLn(dau(r,a));i={path:lau(this._root,o),fullPath:o,basename:a},i[this._statsProp]=this._isDirent?e:await this._stat(o)}catch(o){this._onError(o);return}return i}_onError(e){gau(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){if(!e&&this._statsProp in e)return"";let r=e[this._statsProp];if(r.isFile())return"file";if(r.isDirectory())return"directory";if(r&&r.isSymbolicLink()){let i=e.fullPath;try{let a=await uau(i),o=await VLn(a);if(o.isFile())return"file";if(o.isDirectory()){let n=a.length;if(i.startsWith(a)&&i.substr(n,1)===fau){let s=new Error(`Circular symlink detected: "${i}" points to "${a}"`);return s.code=JLn,this._onError(s)}return"directory"}}catch(a){return this._onError(a),""}}}_includeAsFile(e){let r=e&&e[this._statsProp];return r&&this._wantsEverything&&!r.isDirectory()}}});import{watchFile as Eau,unwatchFile as XLn,watch as yau}from"fs";import{open as Cau,stat as e9n,lstat as vau,realpath as Urr}from"fs/promises";import*as dp from"path";import{type as bau}from"os";function ZLn(t,e,r,i,a){let o=(n,s)=>{r(t),a(n,s,{watchedPath:t}),s&&t!==s&&att(dp.resolve(t,s),Bee,dp.join(t,s))};try{return yau(t,{persistent:e.persistent},o)}catch(n){i(n);return}}var Sau,Hrr,t9n,stt,utt,Vrr,xau,Iau,_au,r9n,Zp,d4,Tau,wau,Bee,ntt,Hhe,Bau,Rau,Dau,qrr,g4e,kau,m4e,n9n,itt,att,Mau,Grr,Pau,ott,i9n=$(()=>{"use strict";Sau="data",Hrr="end",t9n="close",stt=()=>{},utt=process.platform,Vrr=utt==="win32",xau=utt==="darwin",Iau=utt==="linux",_au=utt==="freebsd",r9n=bau()==="OS400",Zp={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},d4=Zp,Tau="watch",wau={lstat:vau,stat:e9n},Bee="listeners",ntt="errHandlers",Hhe="rawEmitters",Bau=[Bee,ntt,Hhe],Rau=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Dau=t=>Rau.has(dp.extname(t).slice(1).toLowerCase()),qrr=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},g4e=(t,e,r)=>{let i=t[e];i instanceof Set||(t[e]=i=new Set([i])),i.add(r)},kau=t=>e=>{let r=t[e];r instanceof Set?r.clear():delete t[e]},m4e=(t,e,r)=>{let i=t[e];i instanceof Set?i.delete(r):i===r&&delete t[e]},n9n=t=>t instanceof Set?t.size===0:!t,itt=new Map;att=(t,e,r,i,a)=>{let o=itt.get(t);o&&qrr(o[e],n=>{n(r,i,a)})},Mau=(t,e,r,i)=>{let{listener:a,errHandler:o,rawEmitter:n}=i,s=itt.get(e),u;if(!r.persistent)return u=ZLn(t,r,a,o,n),u?u.close.bind(u):void 0;if(s)g4e(s,Bee,a),g4e(s,ntt,o),g4e(s,Hhe,n);else{if(u=ZLn(t,r,att.bind(null,e,Bee),o,att.bind(null,e,Hhe)),!u)return;u.on(d4.ERROR,async f=>{let d=att.bind(null,e,ntt);if(s&&(s.watcherUnusable=!0),Vrr&&f.code==="EPERM")try{await(await Cau(t,"r")).close(),d(f)}catch{}else d(f)}),s={listeners:a,errHandlers:o,rawEmitters:n,watcher:u},itt.set(e,s)}return()=>{m4e(s,Bee,a),m4e(s,ntt,o),m4e(s,Hhe,n),n9n(s.listeners)&&(s.watcher.close(),itt.delete(e),Bau.forEach(kau(s)),s.watcher=void 0,Object.freeze(s))}},Grr=new Map,Pau=(t,e,r,i)=>{let{listener:a,rawEmitter:o}=i,n=Grr.get(e),s=n&&n.options;return s&&(s.persistent<r.persistent||s.interval>r.interval)&&(XLn(e),n=void 0),n?(g4e(n,Bee,a),g4e(n,Hhe,o)):(n={listeners:a,rawEmitters:o,options:r,watcher:Eau(e,r,(u,f)=>{qrr(n.rawEmitters,h=>{h(d4.CHANGE,e,{curr:u,prev:f})});let d=u.mtimeMs;(u.size!==f.size||d>f.mtimeMs||d===0)&&qrr(n.listeners,h=>h(t,u))})},Grr.set(e,n)),()=>{m4e(n,Bee,a),m4e(n,Hhe,o),n9n(n.listeners)&&(Grr.delete(e),XLn(e),n.options=n.watcher=void 0,Object.freeze(n))}},ott=class{constructor(e){this.fsw=e,this._boundHandleError=r=>e._handleError(r)}_watchWithNodeFs(e,r){let i=this.fsw.options,a=dp.dirname(e),o=dp.basename(e);this.fsw._getWatchedDir(a).add(o);let s=dp.resolve(e),u={persistent:i.persistent};r||(r=stt);let f;if(i.usePolling){let d=i.interval!==i.binaryInterval;u.interval=d&&Dau(o)?i.binaryInterval:i.interval,f=Pau(e,s,u,{listener:r,rawEmitter:this.fsw._emitRaw})}else f=Mau(e,s,u,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return f}_handleFile(e,r,i){if(this.fsw.closed)return;let a=dp.dirname(e),o=dp.basename(e),n=this.fsw._getWatchedDir(a),s=r;if(n.has(o))return;let u=async(d,h)=>{if(this.fsw._throttle(Tau,e,5)){if(!h||h.mtimeMs===0)try{let c=await e9n(e);if(this.fsw.closed)return;let p=c.atimeMs,A=c.mtimeMs;if((!p||p<=A||A!==s.mtimeMs)&&this.fsw._emit(d4.CHANGE,e,c),(xau||Iau||_au)&&s.ino!==c.ino){this.fsw._closeFile(d),s=c;let m=this._watchWithNodeFs(e,u);m&&this.fsw._addPathCloser(d,m)}else s=c}catch{this.fsw._remove(a,o)}else if(n.has(o)){let c=h.atimeMs,p=h.mtimeMs;(!c||c<=p||p!==s.mtimeMs)&&this.fsw._emit(d4.CHANGE,e,h),s=h}}},f=this._watchWithNodeFs(e,u);if(!(i&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(d4.ADD,e,0))return;this.fsw._emit(d4.ADD,e,r)}return f}async _handleSymlink(e,r,i,a){if(this.fsw.closed)return;let o=e.fullPath,n=this.fsw._getWatchedDir(r);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let s;try{s=await Urr(i)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(n.has(a)?this.fsw._symlinkPaths.get(o)!==s&&(this.fsw._symlinkPaths.set(o,s),this.fsw._emit(d4.CHANGE,i,e.stats)):(n.add(a),this.fsw._symlinkPaths.set(o,s),this.fsw._emit(d4.ADD,i,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(o))return!0;this.fsw._symlinkPaths.set(o,!0)}_handleRead(e,r,i,a,o,n,s){if(e=dp.join(e,""),s=this.fsw._throttle("readdir",e,1e3),!s)return;let u=this.fsw._getWatchedDir(i.path),f=new Set,d=this.fsw._readdirp(e,{fileFilter:h=>i.filterPath(h),directoryFilter:h=>i.filterDir(h)});if(d)return d.on(Sau,async h=>{if(this.fsw.closed){d=void 0;return}let c=h.path,p=dp.join(e,c);if(f.add(c),!(h.stats.isSymbolicLink()&&await this._handleSymlink(h,e,p,c))){if(this.fsw.closed){d=void 0;return}(c===a||!a&&!u.has(c))&&(this.fsw._incrReadyCount(),p=dp.join(o,dp.relative(o,p)),this._addToNodeFs(p,r,i,n+1))}}).on(d4.ERROR,this._boundHandleError),new Promise((h,c)=>{if(!d)return c();d.once(Hrr,()=>{if(this.fsw.closed){d=void 0;return}let p=s?s.clear():!1;h(void 0),u.getChildren().filter(A=>A!==e&&!f.has(A)).forEach(A=>{this.fsw._remove(e,A)}),d=void 0,p&&this._handleRead(e,!1,i,a,o,n,s)})})}async _handleDir(e,r,i,a,o,n,s){let u=this.fsw._getWatchedDir(dp.dirname(e)),f=u.has(dp.basename(e));!(i&&this.fsw.options.ignoreInitial)&&!o&&!f&&this.fsw._emit(d4.ADD_DIR,e,r),u.add(dp.basename(e)),this.fsw._getWatchedDir(e);let d,h,c=this.fsw.options.depth;if((c==null||a<=c)&&!this.fsw._symlinkPaths.has(s)){if(!o&&(await this._handleRead(e,i,n,o,e,a,d),this.fsw.closed))return;h=this._watchWithNodeFs(e,(p,A)=>{A&&A.mtimeMs===0||this._handleRead(p,!1,n,o,e,a,d)})}return h}async _addToNodeFs(e,r,i,a,o){let n=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return n(),!1;let s=this.fsw._getWatchHelpers(e);i&&(s.filterPath=u=>i.filterPath(u),s.filterDir=u=>i.filterDir(u));try{let u=await wau[s.statMethod](s.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(s.watchPath,u))return n(),!1;let f=this.fsw.options.followSymlinks,d;if(u.isDirectory()){let h=dp.resolve(e),c=f?await Urr(e):e;if(this.fsw.closed||(d=await this._handleDir(s.watchPath,u,r,a,o,s,c),this.fsw.closed))return;h!==c&&c!==void 0&&this.fsw._symlinkPaths.set(h,c)}else if(u.isSymbolicLink()){let h=f?await Urr(e):e;if(this.fsw.closed)return;let c=dp.dirname(s.watchPath);if(this.fsw._getWatchedDir(c).add(s.watchPath),this.fsw._emit(d4.ADD,s.watchPath,u),d=await this._handleDir(c,u,r,a,e,s,h),this.fsw.closed)return;h!==void 0&&this.fsw._symlinkPaths.set(dp.resolve(e),h)}else d=this._handleFile(s.watchPath,u,r);return n(),d&&this.fsw._addPathCloser(e,d),!1}catch(u){if(this.fsw._handleError(u))return n(),e}}}});import{stat as Oau}from"fs";import{stat as Fau,readdir as Nau}from"fs/promises";import{EventEmitter as Lau}from"events";import*as ac from"path";function ctt(t){return Array.isArray(t)?t:[t]}function Wau(t){return typeof t=="function"?t:typeof t=="string"?e=>t===e:t instanceof RegExp?e=>t.test(e):typeof t=="object"&&t!==null?e=>{if(t.path===e)return!0;if(t.recursive){let r=ac.relative(t.path,e);return r?!r.startsWith("..")&&!ac.isAbsolute(r):!1}return!1}:()=>!1}function Kau(t){if(typeof t!="string")throw new Error("string expected");t=ac.normalize(t),t=t.replace(/\\/g,"/");let e=!1;t.startsWith("//")&&(e=!0);let r=/\/\//;for(;t.match(r);)t=t.replace(r,"/");return e&&(t="/"+t),t}function o9n(t,e,r){let i=Kau(e);for(let a=0;a<t.length;a++){let o=t[a];if(o(i,r))return!0}return!1}function zau(t,e){if(t==null)throw new TypeError("anymatch: specify first argument");let i=ctt(t).map(a=>Wau(a));return e==null?(a,o)=>o9n(i,a,o):o9n(i,e)}function Xau(t,e={}){let r=new ltt(e);return r.add(t),r}var Wrr,Qau,l9n,Uau,Gau,qau,a9n,Hau,Vau,Krr,s9n,u9n,d9n,c9n,Yau,Jau,zrr,jau,$au,Yrr,ltt,yH,E4e=$(()=>{"use strict";$Ln();i9n();Wrr="/",Qau="//",l9n=".",Uau="..",Gau="string",qau=/\\/g,a9n=/\/\//,Hau=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,Vau=/^\.[/\\]/;Krr=t=>typeof t=="object"&&t!==null&&!(t instanceof RegExp);s9n=t=>{let e=ctt(t).flat();if(!e.every(r=>typeof r===Gau))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(d9n)},u9n=t=>{let e=t.replace(qau,Wrr),r=!1;for(e.startsWith(Qau)&&(r=!0);e.match(a9n);)e=e.replace(a9n,Wrr);return r&&(e=Wrr+e),e},d9n=t=>u9n(ac.normalize(u9n(t))),c9n=(t="")=>e=>typeof e=="string"?d9n(ac.isAbsolute(e)?e:ac.join(t,e)):e,Yau=(t,e)=>ac.isAbsolute(t)?t:ac.join(e,t),Jau=Object.freeze(new Set),zrr=class{constructor(e,r){this.path=e,this._removeWatcher=r,this.items=new Set}add(e){let{items:r}=this;r&&e!==l9n&&e!==Uau&&r.add(e)}async remove(e){let{items:r}=this;if(!r||(r.delete(e),r.size>0))return;let i=this.path;try{await Nau(i)}catch{this._removeWatcher&&this._removeWatcher(ac.dirname(i),ac.basename(i))}}has(e){let{items:r}=this;if(r)return r.has(e)}getChildren(){let{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=stt,this.items=Jau,Object.freeze(this)}},jau="stat",$au="lstat",Yrr=class{constructor(e,r,i){this.fsw=i;let a=e;this.path=e=e.replace(Vau,""),this.watchPath=a,this.fullWatchPath=ac.resolve(a),this.dirParts=[],this.dirParts.forEach(o=>{o.length>1&&o.pop()}),this.followSymlinks=r,this.statMethod=r?jau:$au}entryPath(e){return ac.join(this.watchPath,ac.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:r}=e;if(r&&r.isSymbolicLink())return this.filterDir(e);let i=this.entryPath(e);return this.fsw._isntIgnored(i,r)&&this.fsw._hasReadPermissions(r)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},ltt=class extends Lau{constructor(e={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let r=e.awaitWriteFinish,i={stabilityThreshold:2e3,pollInterval:100},a={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?ctt(e.ignored):ctt([]),awaitWriteFinish:r===!0?i:typeof r=="object"?{...i,...r}:!1};r9n&&(a.usePolling=!0),a.atomic===void 0&&(a.atomic=!a.usePolling);let o=process.env.CHOKIDAR_USEPOLLING;if(o!==void 0){let u=o.toLowerCase();u==="false"||u==="0"?a.usePolling=!1:u==="true"||u==="1"?a.usePolling=!0:a.usePolling=!!u}let n=process.env.CHOKIDAR_INTERVAL;n&&(a.interval=Number.parseInt(n,10));let s=0;this._emitReady=()=>{s++,s>=this._readyCount&&(this._emitReady=stt,this._readyEmitted=!0,process.nextTick(()=>this.emit(Zp.READY)))},this._emitRaw=(...u)=>this.emit(Zp.RAW,...u),this._boundRemove=this._remove.bind(this),this.options=a,this._nodeFsHandler=new ott(this),Object.freeze(a)}_addIgnoredPath(e){if(Krr(e)){for(let r of this._ignoredPaths)if(Krr(r)&&r.path===e.path&&r.recursive===e.recursive)return}this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),typeof e=="string")for(let r of this._ignoredPaths)Krr(r)&&r.path===e&&this._ignoredPaths.delete(r)}add(e,r,i){let{cwd:a}=this.options;this.closed=!1,this._closePromise=void 0;let o=s9n(e);return a&&(o=o.map(n=>Yau(n,a))),o.forEach(n=>{this._removeIgnoredPath(n)}),this._userIgnored=void 0,this._readyCount||(this._readyCount=0),this._readyCount+=o.length,Promise.all(o.map(async n=>{let s=await this._nodeFsHandler._addToNodeFs(n,!i,void 0,0,r);return s&&this._emitReady(),s})).then(n=>{this.closed||n.forEach(s=>{s&&this.add(ac.dirname(s),ac.basename(r||s))})}),this}unwatch(e){if(this.closed)return this;let r=s9n(e),{cwd:i}=this.options;return r.forEach(a=>{!ac.isAbsolute(a)&&!this._closers.has(a)&&(i&&(a=ac.join(i,a)),a=ac.resolve(a)),this._closePath(a),this._addIgnoredPath(a),this._watched.has(a)&&this._addIgnoredPath({path:a,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(r=>r.forEach(i=>{let a=i();a instanceof Promise&&e.push(a)})),this._streams.forEach(r=>r.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(r=>r.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((r,i)=>{let o=(this.options.cwd?ac.relative(this.options.cwd,i):i)||l9n;e[o]=r.getChildren().sort()}),e}emitWithAll(e,r){this.emit(e,...r),e!==Zp.ERROR&&this.emit(Zp.ALL,e,...r)}async _emit(e,r,i){if(this.closed)return;let a=this.options;Vrr&&(r=ac.normalize(r)),a.cwd&&(r=ac.relative(a.cwd,r));let o=[r];i!=null&&o.push(i);let n=a.awaitWriteFinish,s;if(n&&(s=this._pendingWrites.get(r)))return s.lastChange=new Date,this;if(a.atomic){if(e===Zp.UNLINK)return this._pendingUnlinks.set(r,[e,...o]),setTimeout(()=>{this._pendingUnlinks.forEach((u,f)=>{this.emit(...u),this.emit(Zp.ALL,...u),this._pendingUnlinks.delete(f)})},typeof a.atomic=="number"?a.atomic:100),this;e===Zp.ADD&&this._pendingUnlinks.has(r)&&(e=Zp.CHANGE,this._pendingUnlinks.delete(r))}if(n&&(e===Zp.ADD||e===Zp.CHANGE)&&this._readyEmitted){let u=(f,d)=>{f?(e=Zp.ERROR,o[0]=f,this.emitWithAll(e,o)):d&&(o.length>1?o[1]=d:o.push(d),this.emitWithAll(e,o))};return this._awaitWriteFinish(r,n.stabilityThreshold,e,u),this}if(e===Zp.CHANGE&&!this._throttle(Zp.CHANGE,r,50))return this;if(a.alwaysStat&&i===void 0&&(e===Zp.ADD||e===Zp.ADD_DIR||e===Zp.CHANGE)){let u=a.cwd?ac.join(a.cwd,r):r,f;try{f=await Fau(u)}catch{}if(!f||this.closed)return;o.push(f)}return this.emitWithAll(e,o),this}_handleError(e){let r=e&&e.code;return e&&r!=="ENOENT"&&r!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||r!=="EPERM"&&r!=="EACCES")&&this.emit(Zp.ERROR,e),e||this.closed}_throttle(e,r,i){this._throttled.has(e)||this._throttled.set(e,new Map);let a=this._throttled.get(e);if(!a)throw new Error("invalid throttle");let o=a.get(r);if(o)return o.count++,!1;let n,s=()=>{let f=a.get(r),d=f?f.count:0;return a.delete(r),clearTimeout(n),f&&clearTimeout(f.timeoutObject),d};n=setTimeout(s,i);let u={timeoutObject:n,clear:s,count:0};return a.set(r,u),u}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,r,i,a){let o=this.options.awaitWriteFinish;if(typeof o!="object")return;let n=o.pollInterval,s,u=e;this.options.cwd&&!ac.isAbsolute(e)&&(u=ac.join(this.options.cwd,e));let f=new Date,d=this._pendingWrites;function h(c){Oau(u,(p,A)=>{if(p||!d.has(e)){p&&p.code!=="ENOENT"&&a(p);return}let m=Number(new Date);c&&A.size!==c.size&&(d.get(e).lastChange=m);let C=d.get(e);m-C.lastChange>=r?(d.delete(e),a(void 0,A)):s=setTimeout(h,n,A)})}d.has(e)||(d.set(e,{lastChange:f,cancelWait:()=>(d.delete(e),clearTimeout(s),i)}),s=setTimeout(h,n))}_isIgnored(e,r){if(this.options.atomic&&Hau.test(e))return!0;if(!this._userIgnored){let{cwd:i}=this.options,o=(this.options.ignored||[]).map(c9n(i)),s=[...[...this._ignoredPaths].map(c9n(i)),...o];this._userIgnored=zau(s,void 0)}return this._userIgnored(e,r)}_isntIgnored(e,r){return!this._isIgnored(e,r)}_getWatchHelpers(e){return new Yrr(e,this.options.followSymlinks,this)}_getWatchedDir(e){let r=ac.resolve(e);return this._watched.has(r)||this._watched.set(r,new zrr(r,this._boundRemove)),this._watched.get(r)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,r,i){let a=ac.join(e,r),o=ac.resolve(a);if(i=i??(this._watched.has(a)||this._watched.has(o)),!this._throttle("remove",a,100))return;!i&&this._watched.size===1&&this.add(e,r,!0),this._getWatchedDir(a).getChildren().forEach(c=>this._remove(a,c));let u=this._getWatchedDir(e),f=u.has(r);u.remove(r),this._symlinkPaths.has(o)&&this._symlinkPaths.delete(o);let d=a;if(this.options.cwd&&(d=ac.relative(this.options.cwd,a)),this.options.awaitWriteFinish&&this._pendingWrites.has(d)&&this._pendingWrites.get(d).cancelWait()===Zp.ADD)return;this._watched.delete(a),this._watched.delete(o);let h=i?Zp.UNLINK_DIR:Zp.UNLINK;f&&!this._isIgnored(a)&&this._emit(h,a),this._closePath(a)}_closePath(e){this._closeFile(e);let r=ac.dirname(e);this._getWatchedDir(r).remove(ac.basename(e))}_closeFile(e){let r=this._closers.get(e);r&&(r.forEach(i=>i()),this._closers.delete(e))}_addPathCloser(e,r){if(!r)return;let i=this._closers.get(e);i||(i=[],this._closers.set(e,i)),i.push(r)}_readdirp(e,r){if(this.closed)return;let i={type:Zp.ALL,alwaysStat:!0,lstat:!0,...r,depth:0},a=jLn(e,i);return this._streams.add(a),a.once(t9n,()=>{a=void 0}),a.once(Hrr,()=>{a&&(this._streams.delete(a),a=void 0)}),a}};yH={watch:Xau,FSWatcher:ltt}});var f9n=re((y4e,Jrr)=>{"use strict";(function(t,e){typeof y4e=="object"&&typeof Jrr=="object"?Jrr.exports=e(He("child_process"),He("crypto")):typeof define=="function"&&define.amd?define(["child_process","crypto"],e):typeof y4e=="object"?y4e["electron-machine-id"]=e(He("child_process"),He("crypto")):t["electron-machine-id"]=e(t.child_process,t.crypto)})(y4e,function(t,e){return(function(r){function i(o){if(a[o])return a[o].exports;var n=a[o]={exports:{},id:o,loaded:!1};return r[o].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}var a={};return i.m=r,i.c=a,i.p="",i(0)})([function(r,i,a){r.exports=a(34)},function(r,i,a){var o=a(29)("wks"),n=a(33),s=a(2).Symbol,u=typeof s=="function",f=r.exports=function(d){return o[d]||(o[d]=u&&s[d]||(u?s:n)("Symbol."+d))};f.store=o},function(r,i){var a=r.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=a)},function(r,i,a){var o=a(9);r.exports=function(n){if(!o(n))throw TypeError(n+" is not an object!");return n}},function(r,i,a){r.exports=!a(24)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(r,i,a){var o=a(12),n=a(17);r.exports=a(4)?function(s,u,f){return o.f(s,u,n(1,f))}:function(s,u,f){return s[u]=f,s}},function(r,i){var a=r.exports={version:"2.4.0"};typeof __e=="number"&&(__e=a)},function(r,i,a){var o=a(14);r.exports=function(n,s,u){if(o(n),s===void 0)return n;switch(u){case 1:return function(f){return n.call(s,f)};case 2:return function(f,d){return n.call(s,f,d)};case 3:return function(f,d,h){return n.call(s,f,d,h)}}return function(){return n.apply(s,arguments)}}},function(r,i){var a={}.hasOwnProperty;r.exports=function(o,n){return a.call(o,n)}},function(r,i){r.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},function(r,i){r.exports={}},function(r,i){var a={}.toString;r.exports=function(o){return a.call(o).slice(8,-1)}},function(r,i,a){var o=a(3),n=a(26),s=a(32),u=Object.defineProperty;i.f=a(4)?Object.defineProperty:function(f,d,h){if(o(f),d=s(d,!0),o(h),n)try{return u(f,d,h)}catch{}if("get"in h||"set"in h)throw TypeError("Accessors not supported!");return"value"in h&&(f[d]=h.value),f}},function(r,i,a){var o=a(42),n=a(15);r.exports=function(s){return o(n(s))}},function(r,i){r.exports=function(a){if(typeof a!="function")throw TypeError(a+" is not a function!");return a}},function(r,i){r.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},function(r,i,a){var o=a(9),n=a(2).document,s=o(n)&&o(n.createElement);r.exports=function(u){return s?n.createElement(u):{}}},function(r,i){r.exports=function(a,o){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:o}}},function(r,i,a){var o=a(12).f,n=a(8),s=a(1)("toStringTag");r.exports=function(u,f,d){u&&!n(u=d?u:u.prototype,s)&&o(u,s,{configurable:!0,value:f})}},function(r,i,a){var o=a(29)("keys"),n=a(33);r.exports=function(s){return o[s]||(o[s]=n(s))}},function(r,i){var a=Math.ceil,o=Math.floor;r.exports=function(n){return isNaN(n=+n)?0:(n>0?o:a)(n)}},function(r,i,a){var o=a(11),n=a(1)("toStringTag"),s=o((function(){return arguments})())=="Arguments",u=function(f,d){try{return f[d]}catch{}};r.exports=function(f){var d,h,c;return f===void 0?"Undefined":f===null?"Null":typeof(h=u(d=Object(f),n))=="string"?h:s?o(d):(c=o(d))=="Object"&&typeof d.callee=="function"?"Arguments":c}},function(r,i){r.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(r,i,a){var o=a(2),n=a(6),s=a(7),u=a(5),f="prototype",d=function(h,c,p){var A,m,C,T=h&d.F,w=h&d.G,B=h&d.S,R=h&d.P,v=h&d.B,S=h&d.W,b=w?n:n[c]||(n[c]={}),I=b[f],g=w?o:B?o[c]:(o[c]||{})[f];w&&(p=c);for(A in p)m=!T&&g&&g[A]!==void 0,m&&A in b||(C=m?g[A]:p[A],b[A]=w&&typeof g[A]!="function"?p[A]:v&&m?s(C,o):S&&g[A]==C?(function(E){var y=function(x,k,N){if(this instanceof E){switch(arguments.length){case 0:return new E;case 1:return new E(x);case 2:return new E(x,k)}return new E(x,k,N)}return E.apply(this,arguments)};return y[f]=E[f],y})(C):R&&typeof C=="function"?s(Function.call,C):C,R&&((b.virtual||(b.virtual={}))[A]=C,h&d.R&&I&&!I[A]&&u(I,A,C)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,r.exports=d},function(r,i){r.exports=function(a){try{return!!a()}catch{return!0}}},function(r,i,a){r.exports=a(2).document&&document.documentElement},function(r,i,a){r.exports=!a(4)&&!a(24)(function(){return Object.defineProperty(a(16)("div"),"a",{get:function(){return 7}}).a!=7})},function(r,i,a){"use strict";var o=a(28),n=a(23),s=a(57),u=a(5),f=a(8),d=a(10),h=a(45),c=a(18),p=a(52),A=a(1)("iterator"),m=!([].keys&&"next"in[].keys()),C="@@iterator",T="keys",w="values",B=function(){return this};r.exports=function(R,v,S,b,I,g,E){h(S,v,b);var y,x,k,N=function(O){if(!m&&O in G)return G[O];switch(O){case T:return function(){return new S(this,O)};case w:return function(){return new S(this,O)}}return function(){return new S(this,O)}},L=v+" Iterator",Q=I==w,q=!1,G=R.prototype,F=G[A]||G[C]||I&&G[I],P=F||N(I),M=I?Q?N("entries"):P:void 0,D=v=="Array"&&G.entries||F;if(D&&(k=p(D.call(new R)),k!==Object.prototype&&(c(k,L,!0),o||f(k,A)||u(k,A,B))),Q&&F&&F.name!==w&&(q=!0,P=function(){return F.call(this)}),o&&!E||!m&&!q&&G[A]||u(G,A,P),d[v]=P,d[L]=B,I)if(y={values:Q?P:N(w),keys:g?P:N(T),entries:M},E)for(x in y)x in G||s(G,x,y[x]);else n(n.P+n.F*(m||q),v,y);return y}},function(r,i){r.exports=!0},function(r,i,a){var o=a(2),n="__core-js_shared__",s=o[n]||(o[n]={});r.exports=function(u){return s[u]||(s[u]={})}},function(r,i,a){var o,n,s,u=a(7),f=a(41),d=a(25),h=a(16),c=a(2),p=c.process,A=c.setImmediate,m=c.clearImmediate,C=c.MessageChannel,T=0,w={},B="onreadystatechange",R=function(){var S=+this;if(w.hasOwnProperty(S)){var b=w[S];delete w[S],b()}},v=function(S){R.call(S.data)};A&&m||(A=function(S){for(var b=[],I=1;arguments.length>I;)b.push(arguments[I++]);return w[++T]=function(){f(typeof S=="function"?S:Function(S),b)},o(T),T},m=function(S){delete w[S]},a(11)(p)=="process"?o=function(S){p.nextTick(u(R,S,1))}:C?(n=new C,s=n.port2,n.port1.onmessage=v,o=u(s.postMessage,s,1)):c.addEventListener&&typeof postMessage=="function"&&!c.importScripts?(o=function(S){c.postMessage(S+"","*")},c.addEventListener("message",v,!1)):o=B in h("script")?function(S){d.appendChild(h("script"))[B]=function(){d.removeChild(this),R.call(S)}}:function(S){setTimeout(u(R,S,1),0)}),r.exports={set:A,clear:m}},function(r,i,a){var o=a(20),n=Math.min;r.exports=function(s){return s>0?n(o(s),9007199254740991):0}},function(r,i,a){var o=a(9);r.exports=function(n,s){if(!o(n))return n;var u,f;if(s&&typeof(u=n.toString)=="function"&&!o(f=u.call(n))||typeof(u=n.valueOf)=="function"&&!o(f=u.call(n))||!s&&typeof(u=n.toString)=="function"&&!o(f=u.call(n)))return f;throw TypeError("Can't convert object to primitive value")}},function(r,i){var a=0,o=Math.random();r.exports=function(n){return"Symbol(".concat(n===void 0?"":n,")_",(++a+o).toString(36))}},function(r,i,a){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}function n(){return process.platform!=="win32"?"":process.arch==="ia32"&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"}function s(B){return(0,A.createHash)("sha256").update(B).digest("hex")}function u(B){switch(C){case"darwin":return B.split("IOPlatformUUID")[1].split(`
42
- `)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return B.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}function f(B){var R=u((0,p.execSync)(w[C]).toString());return B?R:s(R)}function d(B){return new c.default(function(R,v){return(0,p.exec)(w[C],{},function(S,b,I){if(S)return v(new Error("Error while obtaining machine id: "+S.stack));var g=u(b.toString());return R(B?g:s(g))})})}Object.defineProperty(i,"__esModule",{value:!0});var h=a(35),c=o(h);i.machineIdSync=f,i.machineId=d;var p=a(70),A=a(71),m=process,C=m.platform,T={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},w={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:T[n()]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(r,i,a){r.exports={default:a(36),__esModule:!0}},function(r,i,a){a(66),a(68),a(69),a(67),r.exports=a(6).Promise},function(r,i){r.exports=function(){}},function(r,i){r.exports=function(a,o,n,s){if(!(a instanceof o)||s!==void 0&&s in a)throw TypeError(n+": incorrect invocation!");return a}},function(r,i,a){var o=a(13),n=a(31),s=a(62);r.exports=function(u){return function(f,d,h){var c,p=o(f),A=n(p.length),m=s(h,A);if(u&&d!=d){for(;A>m;)if(c=p[m++],c!=c)return!0}else for(;A>m;m++)if((u||m in p)&&p[m]===d)return u||m||0;return!u&&-1}}},function(r,p,a){var o=a(7),n=a(44),s=a(43),u=a(3),f=a(31),d=a(64),h={},c={},p=r.exports=function(A,m,C,T,w){var B,R,v,S,b=w?function(){return A}:d(A),I=o(C,T,m?2:1),g=0;if(typeof b!="function")throw TypeError(A+" is not iterable!");if(s(b)){for(B=f(A.length);B>g;g++)if(S=m?I(u(R=A[g])[0],R[1]):I(A[g]),S===h||S===c)return S}else for(v=b.call(A);!(R=v.next()).done;)if(S=n(v,I,R.value,m),S===h||S===c)return S};p.BREAK=h,p.RETURN=c},function(r,i){r.exports=function(a,o,n){var s=n===void 0;switch(o.length){case 0:return s?a():a.call(n);case 1:return s?a(o[0]):a.call(n,o[0]);case 2:return s?a(o[0],o[1]):a.call(n,o[0],o[1]);case 3:return s?a(o[0],o[1],o[2]):a.call(n,o[0],o[1],o[2]);case 4:return s?a(o[0],o[1],o[2],o[3]):a.call(n,o[0],o[1],o[2],o[3])}return a.apply(n,o)}},function(r,i,a){var o=a(11);r.exports=Object("z").propertyIsEnumerable(0)?Object:function(n){return o(n)=="String"?n.split(""):Object(n)}},function(r,i,a){var o=a(10),n=a(1)("iterator"),s=Array.prototype;r.exports=function(u){return u!==void 0&&(o.Array===u||s[n]===u)}},function(r,i,a){var o=a(3);r.exports=function(n,s,u,f){try{return f?s(o(u)[0],u[1]):s(u)}catch(h){var d=n.return;throw d!==void 0&&o(d.call(n)),h}}},function(r,i,a){"use strict";var o=a(49),n=a(17),s=a(18),u={};a(5)(u,a(1)("iterator"),function(){return this}),r.exports=function(f,d,h){f.prototype=o(u,{next:n(1,h)}),s(f,d+" Iterator")}},function(r,i,a){var o=a(1)("iterator"),n=!1;try{var s=[7][o]();s.return=function(){n=!0},Array.from(s,function(){throw 2})}catch{}r.exports=function(u,f){if(!f&&!n)return!1;var d=!1;try{var h=[7],c=h[o]();c.next=function(){return{done:d=!0}},h[o]=function(){return c},u(h)}catch{}return d}},function(r,i){r.exports=function(a,o){return{value:o,done:!!a}}},function(r,i,a){var o=a(2),n=a(30).set,s=o.MutationObserver||o.WebKitMutationObserver,u=o.process,f=o.Promise,d=a(11)(u)=="process";r.exports=function(){var h,c,p,A=function(){var w,B;for(d&&(w=u.domain)&&w.exit();h;){B=h.fn,h=h.next;try{B()}catch(R){throw h?p():c=void 0,R}}c=void 0,w&&w.enter()};if(d)p=function(){u.nextTick(A)};else if(s){var m=!0,C=document.createTextNode("");new s(A).observe(C,{characterData:!0}),p=function(){C.data=m=!m}}else if(f&&f.resolve){var T=f.resolve();p=function(){T.then(A)}}else p=function(){n.call(o,A)};return function(w){var B={fn:w,next:void 0};c&&(c.next=B),h||(h=B,p()),c=B}}},function(r,i,a){var o=a(3),n=a(50),s=a(22),u=a(19)("IE_PROTO"),f=function(){},d="prototype",h=function(){var c,p=a(16)("iframe"),A=s.length,m=">";for(p.style.display="none",a(25).appendChild(p),p.src="javascript:",c=p.contentWindow.document,c.open(),c.write("<script>document.F=Object</script"+m),c.close(),h=c.F;A--;)delete h[d][s[A]];return h()};r.exports=Object.create||function(c,p){var A;return c!==null?(f[d]=o(c),A=new f,f[d]=null,A[u]=c):A=h(),p===void 0?A:n(A,p)}},function(r,i,a){var o=a(12),n=a(3),s=a(54);r.exports=a(4)?Object.defineProperties:function(u,f){n(u);for(var d,h=s(f),c=h.length,p=0;c>p;)o.f(u,d=h[p++],f[d]);return u}},function(r,i,a){var o=a(55),n=a(17),s=a(13),u=a(32),f=a(8),d=a(26),h=Object.getOwnPropertyDescriptor;i.f=a(4)?h:function(c,p){if(c=s(c),p=u(p,!0),d)try{return h(c,p)}catch{}if(f(c,p))return n(!o.f.call(c,p),c[p])}},function(r,i,a){var o=a(8),n=a(63),s=a(19)("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(f){return f=n(f),o(f,s)?f[s]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?u:null}},function(r,i,a){var o=a(8),n=a(13),s=a(39)(!1),u=a(19)("IE_PROTO");r.exports=function(f,d){var h,c=n(f),p=0,A=[];for(h in c)h!=u&&o(c,h)&&A.push(h);for(;d.length>p;)o(c,h=d[p++])&&(~s(A,h)||A.push(h));return A}},function(r,i,a){var o=a(53),n=a(22);r.exports=Object.keys||function(s){return o(s,n)}},function(r,i){i.f={}.propertyIsEnumerable},function(r,i,a){var o=a(5);r.exports=function(n,s,u){for(var f in s)u&&n[f]?n[f]=s[f]:o(n,f,s[f]);return n}},function(r,i,a){r.exports=a(5)},function(r,i,a){var o=a(9),n=a(3),s=function(u,f){if(n(u),!o(f)&&f!==null)throw TypeError(f+": can't set as prototype!")};r.exports={set:Object.setPrototypeOf||("__proto__"in{}?(function(u,f,d){try{d=a(7)(Function.call,a(51).f(Object.prototype,"__proto__").set,2),d(u,[]),f=!(u instanceof Array)}catch{f=!0}return function(h,c){return s(h,c),f?h.__proto__=c:d(h,c),h}})({},!1):void 0),check:s}},function(r,i,a){"use strict";var o=a(2),n=a(6),s=a(12),u=a(4),f=a(1)("species");r.exports=function(d){var h=typeof n[d]=="function"?n[d]:o[d];u&&h&&!h[f]&&s.f(h,f,{configurable:!0,get:function(){return this}})}},function(r,i,a){var o=a(3),n=a(14),s=a(1)("species");r.exports=function(u,f){var d,h=o(u).constructor;return h===void 0||(d=o(h)[s])==null?f:n(d)}},function(r,i,a){var o=a(20),n=a(15);r.exports=function(s){return function(u,f){var d,h,c=String(n(u)),p=o(f),A=c.length;return p<0||p>=A?s?"":void 0:(d=c.charCodeAt(p),d<55296||d>56319||p+1===A||(h=c.charCodeAt(p+1))<56320||h>57343?s?c.charAt(p):d:s?c.slice(p,p+2):(d-55296<<10)+(h-56320)+65536)}}},function(r,i,a){var o=a(20),n=Math.max,s=Math.min;r.exports=function(u,f){return u=o(u),u<0?n(u+f,0):s(u,f)}},function(r,i,a){var o=a(15);r.exports=function(n){return Object(o(n))}},function(r,i,a){var o=a(21),n=a(1)("iterator"),s=a(10);r.exports=a(6).getIteratorMethod=function(u){if(u!=null)return u[n]||u["@@iterator"]||s[o(u)]}},function(r,i,a){"use strict";var o=a(37),n=a(47),s=a(10),u=a(13);r.exports=a(27)(Array,"Array",function(f,d){this._t=u(f),this._i=0,this._k=d},function(){var f=this._t,d=this._k,h=this._i++;return!f||h>=f.length?(this._t=void 0,n(1)):d=="keys"?n(0,h):d=="values"?n(0,f[h]):n(0,[h,f[h]])},"values"),s.Arguments=s.Array,o("keys"),o("values"),o("entries")},function(r,i){},function(r,i,a){"use strict";var o,n,s,u=a(28),f=a(2),d=a(7),h=a(21),c=a(23),p=a(9),A=(a(3),a(14)),m=a(38),C=a(40),T=(a(58).set,a(60)),w=a(30).set,B=a(48)(),R="Promise",v=f.TypeError,b=f.process,S=f[R],b=f.process,I=h(b)=="process",g=function(){},E=!!(function(){try{var D=S.resolve(1),O=(D.constructor={})[a(1)("species")]=function(U){U(g,g)};return(I||typeof PromiseRejectionEvent=="function")&&D.then(g)instanceof O}catch{}})(),y=function(D,O){return D===O||D===S&&O===s},x=function(D){var O;return!(!p(D)||typeof(O=D.then)!="function")&&O},k=function(D){return y(S,D)?new N(D):new n(D)},N=n=function(D){var O,U;this.promise=new D(function(H,K){if(O!==void 0||U!==void 0)throw v("Bad Promise constructor");O=H,U=K}),this.resolve=A(O),this.reject=A(U)},L=function(D){try{D()}catch(O){return{error:O}}},Q=function(D,O){if(!D._n){D._n=!0;var U=D._c;B(function(){for(var H=D._v,K=D._s==1,V=0,W=function(z){var Y,J,j=K?z.ok:z.fail,X=z.resolve,ee=z.reject,te=z.domain;try{j?(K||(D._h==2&&F(D),D._h=1),j===!0?Y=H:(te&&te.enter(),Y=j(H),te&&te.exit()),Y===z.promise?ee(v("Promise-chain cycle")):(J=x(Y))?J.call(Y,X,ee):X(Y)):ee(H)}catch(ie){ee(ie)}};U.length>V;)W(U[V++]);D._c=[],D._n=!1,O&&!D._h&&q(D)})}},q=function(D){w.call(f,function(){var O,U,H,K=D._v;if(G(D)&&(O=L(function(){I?b.emit("unhandledRejection",K,D):(U=f.onunhandledrejection)?U({promise:D,reason:K}):(H=f.console)&&H.error&&H.error("Unhandled promise rejection",K)}),D._h=I||G(D)?2:1),D._a=void 0,O)throw O.error})},G=function(D){if(D._h==1)return!1;for(var O,U=D._a||D._c,H=0;U.length>H;)if(O=U[H++],O.fail||!G(O.promise))return!1;return!0},F=function(D){w.call(f,function(){var O;I?b.emit("rejectionHandled",D):(O=f.onrejectionhandled)&&O({promise:D,reason:D._v})})},P=function(D){var O=this;O._d||(O._d=!0,O=O._w||O,O._v=D,O._s=2,O._a||(O._a=O._c.slice()),Q(O,!0))},M=function(D){var O,U=this;if(!U._d){U._d=!0,U=U._w||U;try{if(U===D)throw v("Promise can't be resolved itself");(O=x(D))?B(function(){var H={_w:U,_d:!1};try{O.call(D,d(M,H,1),d(P,H,1))}catch(K){P.call(H,K)}}):(U._v=D,U._s=1,Q(U,!1))}catch(H){P.call({_w:U,_d:!1},H)}}};E||(S=function(D){m(this,S,R,"_h"),A(D),o.call(this);try{D(d(M,this,1),d(P,this,1))}catch(O){P.call(this,O)}},o=function(D){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},o.prototype=a(56)(S.prototype,{then:function(D,O){var U=k(T(this,S));return U.ok=typeof D!="function"||D,U.fail=typeof O=="function"&&O,U.domain=I?b.domain:void 0,this._c.push(U),this._a&&this._a.push(U),this._s&&Q(this,!1),U.promise},catch:function(D){return this.then(void 0,D)}}),N=function(){var D=new o;this.promise=D,this.resolve=d(M,D,1),this.reject=d(P,D,1)}),c(c.G+c.W+c.F*!E,{Promise:S}),a(18)(S,R),a(59)(R),s=a(6)[R],c(c.S+c.F*!E,R,{reject:function(D){var O=k(this),U=O.reject;return U(D),O.promise}}),c(c.S+c.F*(u||!E),R,{resolve:function(D){if(D instanceof S&&y(D.constructor,this))return D;var O=k(this),U=O.resolve;return U(D),O.promise}}),c(c.S+c.F*!(E&&a(46)(function(D){S.all(D).catch(g)})),R,{all:function(D){var O=this,U=k(O),H=U.resolve,K=U.reject,V=L(function(){var W=[],z=0,Y=1;C(D,!1,function(J){var j=z++,X=!1;W.push(void 0),Y++,O.resolve(J).then(function(ee){X||(X=!0,W[j]=ee,--Y||H(W))},K)}),--Y||H(W)});return V&&K(V.error),U.promise},race:function(D){var O=this,U=k(O),H=U.reject,K=L(function(){C(D,!1,function(V){O.resolve(V).then(U.resolve,H)})});return K&&H(K.error),U.promise}})},function(r,i,a){"use strict";var o=a(61)(!0);a(27)(String,"String",function(n){this._t=String(n),this._i=0},function(){var n,s=this._t,u=this._i;return u>=s.length?{value:void 0,done:!0}:(n=o(s,u),this._i+=n.length,{value:n,done:!1})})},function(r,i,a){a(65);for(var o=a(2),n=a(5),s=a(10),u=a(1)("toStringTag"),f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;d<5;d++){var h=f[d],c=o[h],p=c&&c.prototype;p&&!p[u]&&n(p,u,h),s[h]=s.Array}},function(r,i){r.exports=He("child_process")},function(r,i){r.exports=He("crypto")}])})});function dtt(t,e=0){return(gy[t[e+0]]+gy[t[e+1]]+gy[t[e+2]]+gy[t[e+3]]+"-"+gy[t[e+4]]+gy[t[e+5]]+"-"+gy[t[e+6]]+gy[t[e+7]]+"-"+gy[t[e+8]]+gy[t[e+9]]+"-"+gy[t[e+10]]+gy[t[e+11]]+gy[t[e+12]]+gy[t[e+13]]+gy[t[e+14]]+gy[t[e+15]]).toLowerCase()}var gy,jrr=$(()=>{"use strict";gy=[];for(let t=0;t<256;++t)gy.push((t+256).toString(16).slice(1))});import{randomFillSync as Zau}from"crypto";function Vhe(){return ftt>htt.length-16&&(Zau(htt),ftt=0),htt.slice(ftt,ftt+=16)}var htt,ftt,$rr=$(()=>{"use strict";htt=new Uint8Array(256),ftt=htt.length});import{randomUUID as eou}from"crypto";var Xrr,h9n=$(()=>{"use strict";Xrr={randomUUID:eou}});function tou(t,e,r){if(Xrr.randomUUID&&!e&&!t)return Xrr.randomUUID();t=t||{};let i=t.random??t.rng?.()??Vhe();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[r+a]=i[a];return e}return dtt(i)}var Zrr,p9n=$(()=>{"use strict";h9n();$rr();jrr();Zrr=tou});function rou(t,e,r){let i;if(t)i=A9n(t.random??t.rng?.()??Vhe(),t.msecs,t.seq,e,r);else{let a=Date.now(),o=Vhe();nou(enr,a,o),i=A9n(o,enr.msecs,enr.seq,e,r)}return e??dtt(i)}function nou(t,e,r){return t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}function A9n(t,e,r,i,a=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!i)i=new Uint8Array(16),a=0;else if(a<0||a+16>i.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);return e??=Date.now(),r??=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9],i[a++]=e/1099511627776&255,i[a++]=e/4294967296&255,i[a++]=e/16777216&255,i[a++]=e/65536&255,i[a++]=e/256&255,i[a++]=e&255,i[a++]=112|r>>>28&15,i[a++]=r>>>20&255,i[a++]=128|r>>>14&63,i[a++]=r>>>6&255,i[a++]=r<<2&255|t[10]&3,i[a++]=t[11],i[a++]=t[12],i[a++]=t[13],i[a++]=t[14],i[a++]=t[15],i}var enr,tnr,g9n=$(()=>{"use strict";$rr();jrr();enr={};tnr=rou});var rnr=$(()=>{"use strict";p9n();g9n()});var Ree,A3,inr,Whe=$(()=>{Ree="dirac",A3="0.3.16",inr="dirac-run"});var m9n={};Gn(m9n,{HostProvider:()=>en});var en,Ua=$(()=>{"use strict";en=class t{static instance=null;diracType;createDiracWebviewProvider;createDiffViewProvider;createCommentReviewController;createTerminalManager;hostBridge;logToChannel;getCallbackUrl;getBinaryLocation;extensionFsPath;getEnvironmentVariables;globalStorageFsPath;constructor(e,r,i,a,o,n,s,u,f,d,h,c){this.diracType=e,this.createDiracWebviewProvider=r,this.createDiffViewProvider=i,this.createCommentReviewController=a,this.createTerminalManager=o,this.hostBridge=n,this.logToChannel=s,this.getCallbackUrl=u,this.getBinaryLocation=f,this.extensionFsPath=d,this.globalStorageFsPath=h,this.getEnvironmentVariables=c}static initialize(e,r,i,a,o,n,s,u,f,d,h,c){if(t.instance)throw new Error("Host provider has already been initialized.");return t.instance=new t(e,r,i,a,o,n,s,u,f,d,h,c),t.instance}static get(){if(!t.instance)throw new Error("HostProvider not setup. Call HostProvider.initialize() first.");return t.instance}static isInitialized(){return!!t.instance}static reset(){t.instance=null}static get workspace(){return t.get().hostBridge.workspaceClient}static get env(){return t.get().hostBridge.envClient}static get window(){return t.get().hostBridge.windowClient}static get diff(){return t.get().hostBridge.diffClient}}});var my,aou,oou,Ng,E9n,Khe,E_=$(()=>{"use strict";Whe();Ua();my=Ree==="claude-dev"||Ree==="dirac"?"dirac":Ree,aou={PlusButton:my+".plusButtonClicked",SettingsButton:my+".settingsButtonClicked",HistoryButton:my+".historyButtonClicked",WorktreesButton:my+".worktreesButtonClicked",TerminalOutput:my+".addTerminalOutputToChat",AddToChat:my+".addToChat",FixWithDirac:my+".fixWithDirac",ExplainCode:my+".explainCode",ImproveCode:my+".improveCode",FocusChatInput:my+".focusChatInput",Walkthrough:my+".openWalkthrough",GenerateCommit:my+".generateGitCommitMessage",AbortCommit:my+".abortGitCommitMessage",ReconstructTaskHistory:my+".reconstructTaskHistory",JupyterGenerateCell:my+".jupyterGenerateCell",JupyterExplainCell:my+".jupyterExplainCell",JupyterImproveCell:my+".jupyterImproveCell"},oou={Sidebar:Ree+".SidebarProvider"},Ng={id:inr+"."+Ree,name:Ree,version:A3,publisher:inr,commands:aou,views:oou},E9n=null,Khe={init:async t=>{let e=await en.env.getHostVersion({}),r=e.version,i=e.diracVersion||Ng.version,a=e.platform||"unknown",o=process.platform||"unknown",n=e.diracType||"unknown";E9n={hostVersion:r,extensionVersion:i,platform:a,os:o,ide:n,distinctId:t}},get:()=>E9n}});async function v9n(t,e=Zrr){let r=t.globalState.get(y9n);r||(r=await sou()),r||(Qe.warn("No machine ID found for telemetry, generating UUID"),r=`cl-${e()}`,t.globalState.update(y9n,r)),uou(r),await Khe.init(r),Qe.log("[DistinctId] initialized:",r)}async function sou(){try{return await(0,C9n.machineId)()}catch(t){Qe.log("[DistinctId] Failed to get machine ID from node-machine-id",t);return}}function uou(t){zhe&&zhe!==t&&Qe.log("[DistinctId] Updating...",`From ${zhe} to ${t}`),zhe=t}function y_(){return zhe||Qe.debug("[DistinctId] Not initialized. Call initializeDistinctId() first."),zhe}var C9n,zhe,y9n,CH=$(()=>{"use strict";C9n=Qt(f9n());rnr();E_();br();zhe="",y9n="dirac.generatedMachineId"});function N9n(t){return typeof t>"u"||t===null}function cou(t){return typeof t=="object"&&t!==null}function lou(t){return Array.isArray(t)?t:N9n(t)?[]:[t]}function dou(t,e){var r,i,a,o;if(e)for(o=Object.keys(e),r=0,i=o.length;r<i;r+=1)a=o[r],t[a]=e[a];return t}function fou(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function hou(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}function L9n(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
42
+ `)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return B.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return B.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}function f(B){var R=u((0,p.execSync)(w[C]).toString());return B?R:s(R)}function d(B){return new c.default(function(R,v){return(0,p.exec)(w[C],{},function(S,b,I){if(S)return v(new Error("Error while obtaining machine id: "+S.stack));var g=u(b.toString());return R(B?g:s(g))})})}Object.defineProperty(i,"__esModule",{value:!0});var h=a(35),c=o(h);i.machineIdSync=f,i.machineId=d;var p=a(70),A=a(71),m=process,C=m.platform,T={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},w={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:T[n()]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(r,i,a){r.exports={default:a(36),__esModule:!0}},function(r,i,a){a(66),a(68),a(69),a(67),r.exports=a(6).Promise},function(r,i){r.exports=function(){}},function(r,i){r.exports=function(a,o,n,s){if(!(a instanceof o)||s!==void 0&&s in a)throw TypeError(n+": incorrect invocation!");return a}},function(r,i,a){var o=a(13),n=a(31),s=a(62);r.exports=function(u){return function(f,d,h){var c,p=o(f),A=n(p.length),m=s(h,A);if(u&&d!=d){for(;A>m;)if(c=p[m++],c!=c)return!0}else for(;A>m;m++)if((u||m in p)&&p[m]===d)return u||m||0;return!u&&-1}}},function(r,p,a){var o=a(7),n=a(44),s=a(43),u=a(3),f=a(31),d=a(64),h={},c={},p=r.exports=function(A,m,C,T,w){var B,R,v,S,b=w?function(){return A}:d(A),I=o(C,T,m?2:1),g=0;if(typeof b!="function")throw TypeError(A+" is not iterable!");if(s(b)){for(B=f(A.length);B>g;g++)if(S=m?I(u(R=A[g])[0],R[1]):I(A[g]),S===h||S===c)return S}else for(v=b.call(A);!(R=v.next()).done;)if(S=n(v,I,R.value,m),S===h||S===c)return S};p.BREAK=h,p.RETURN=c},function(r,i){r.exports=function(a,o,n){var s=n===void 0;switch(o.length){case 0:return s?a():a.call(n);case 1:return s?a(o[0]):a.call(n,o[0]);case 2:return s?a(o[0],o[1]):a.call(n,o[0],o[1]);case 3:return s?a(o[0],o[1],o[2]):a.call(n,o[0],o[1],o[2]);case 4:return s?a(o[0],o[1],o[2],o[3]):a.call(n,o[0],o[1],o[2],o[3])}return a.apply(n,o)}},function(r,i,a){var o=a(11);r.exports=Object("z").propertyIsEnumerable(0)?Object:function(n){return o(n)=="String"?n.split(""):Object(n)}},function(r,i,a){var o=a(10),n=a(1)("iterator"),s=Array.prototype;r.exports=function(u){return u!==void 0&&(o.Array===u||s[n]===u)}},function(r,i,a){var o=a(3);r.exports=function(n,s,u,f){try{return f?s(o(u)[0],u[1]):s(u)}catch(h){var d=n.return;throw d!==void 0&&o(d.call(n)),h}}},function(r,i,a){"use strict";var o=a(49),n=a(17),s=a(18),u={};a(5)(u,a(1)("iterator"),function(){return this}),r.exports=function(f,d,h){f.prototype=o(u,{next:n(1,h)}),s(f,d+" Iterator")}},function(r,i,a){var o=a(1)("iterator"),n=!1;try{var s=[7][o]();s.return=function(){n=!0},Array.from(s,function(){throw 2})}catch{}r.exports=function(u,f){if(!f&&!n)return!1;var d=!1;try{var h=[7],c=h[o]();c.next=function(){return{done:d=!0}},h[o]=function(){return c},u(h)}catch{}return d}},function(r,i){r.exports=function(a,o){return{value:o,done:!!a}}},function(r,i,a){var o=a(2),n=a(30).set,s=o.MutationObserver||o.WebKitMutationObserver,u=o.process,f=o.Promise,d=a(11)(u)=="process";r.exports=function(){var h,c,p,A=function(){var w,B;for(d&&(w=u.domain)&&w.exit();h;){B=h.fn,h=h.next;try{B()}catch(R){throw h?p():c=void 0,R}}c=void 0,w&&w.enter()};if(d)p=function(){u.nextTick(A)};else if(s){var m=!0,C=document.createTextNode("");new s(A).observe(C,{characterData:!0}),p=function(){C.data=m=!m}}else if(f&&f.resolve){var T=f.resolve();p=function(){T.then(A)}}else p=function(){n.call(o,A)};return function(w){var B={fn:w,next:void 0};c&&(c.next=B),h||(h=B,p()),c=B}}},function(r,i,a){var o=a(3),n=a(50),s=a(22),u=a(19)("IE_PROTO"),f=function(){},d="prototype",h=function(){var c,p=a(16)("iframe"),A=s.length,m=">";for(p.style.display="none",a(25).appendChild(p),p.src="javascript:",c=p.contentWindow.document,c.open(),c.write("<script>document.F=Object</script"+m),c.close(),h=c.F;A--;)delete h[d][s[A]];return h()};r.exports=Object.create||function(c,p){var A;return c!==null?(f[d]=o(c),A=new f,f[d]=null,A[u]=c):A=h(),p===void 0?A:n(A,p)}},function(r,i,a){var o=a(12),n=a(3),s=a(54);r.exports=a(4)?Object.defineProperties:function(u,f){n(u);for(var d,h=s(f),c=h.length,p=0;c>p;)o.f(u,d=h[p++],f[d]);return u}},function(r,i,a){var o=a(55),n=a(17),s=a(13),u=a(32),f=a(8),d=a(26),h=Object.getOwnPropertyDescriptor;i.f=a(4)?h:function(c,p){if(c=s(c),p=u(p,!0),d)try{return h(c,p)}catch{}if(f(c,p))return n(!o.f.call(c,p),c[p])}},function(r,i,a){var o=a(8),n=a(63),s=a(19)("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(f){return f=n(f),o(f,s)?f[s]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?u:null}},function(r,i,a){var o=a(8),n=a(13),s=a(39)(!1),u=a(19)("IE_PROTO");r.exports=function(f,d){var h,c=n(f),p=0,A=[];for(h in c)h!=u&&o(c,h)&&A.push(h);for(;d.length>p;)o(c,h=d[p++])&&(~s(A,h)||A.push(h));return A}},function(r,i,a){var o=a(53),n=a(22);r.exports=Object.keys||function(s){return o(s,n)}},function(r,i){i.f={}.propertyIsEnumerable},function(r,i,a){var o=a(5);r.exports=function(n,s,u){for(var f in s)u&&n[f]?n[f]=s[f]:o(n,f,s[f]);return n}},function(r,i,a){r.exports=a(5)},function(r,i,a){var o=a(9),n=a(3),s=function(u,f){if(n(u),!o(f)&&f!==null)throw TypeError(f+": can't set as prototype!")};r.exports={set:Object.setPrototypeOf||("__proto__"in{}?(function(u,f,d){try{d=a(7)(Function.call,a(51).f(Object.prototype,"__proto__").set,2),d(u,[]),f=!(u instanceof Array)}catch{f=!0}return function(h,c){return s(h,c),f?h.__proto__=c:d(h,c),h}})({},!1):void 0),check:s}},function(r,i,a){"use strict";var o=a(2),n=a(6),s=a(12),u=a(4),f=a(1)("species");r.exports=function(d){var h=typeof n[d]=="function"?n[d]:o[d];u&&h&&!h[f]&&s.f(h,f,{configurable:!0,get:function(){return this}})}},function(r,i,a){var o=a(3),n=a(14),s=a(1)("species");r.exports=function(u,f){var d,h=o(u).constructor;return h===void 0||(d=o(h)[s])==null?f:n(d)}},function(r,i,a){var o=a(20),n=a(15);r.exports=function(s){return function(u,f){var d,h,c=String(n(u)),p=o(f),A=c.length;return p<0||p>=A?s?"":void 0:(d=c.charCodeAt(p),d<55296||d>56319||p+1===A||(h=c.charCodeAt(p+1))<56320||h>57343?s?c.charAt(p):d:s?c.slice(p,p+2):(d-55296<<10)+(h-56320)+65536)}}},function(r,i,a){var o=a(20),n=Math.max,s=Math.min;r.exports=function(u,f){return u=o(u),u<0?n(u+f,0):s(u,f)}},function(r,i,a){var o=a(15);r.exports=function(n){return Object(o(n))}},function(r,i,a){var o=a(21),n=a(1)("iterator"),s=a(10);r.exports=a(6).getIteratorMethod=function(u){if(u!=null)return u[n]||u["@@iterator"]||s[o(u)]}},function(r,i,a){"use strict";var o=a(37),n=a(47),s=a(10),u=a(13);r.exports=a(27)(Array,"Array",function(f,d){this._t=u(f),this._i=0,this._k=d},function(){var f=this._t,d=this._k,h=this._i++;return!f||h>=f.length?(this._t=void 0,n(1)):d=="keys"?n(0,h):d=="values"?n(0,f[h]):n(0,[h,f[h]])},"values"),s.Arguments=s.Array,o("keys"),o("values"),o("entries")},function(r,i){},function(r,i,a){"use strict";var o,n,s,u=a(28),f=a(2),d=a(7),h=a(21),c=a(23),p=a(9),A=(a(3),a(14)),m=a(38),C=a(40),T=(a(58).set,a(60)),w=a(30).set,B=a(48)(),R="Promise",v=f.TypeError,b=f.process,S=f[R],b=f.process,I=h(b)=="process",g=function(){},E=!!(function(){try{var D=S.resolve(1),O=(D.constructor={})[a(1)("species")]=function(U){U(g,g)};return(I||typeof PromiseRejectionEvent=="function")&&D.then(g)instanceof O}catch{}})(),y=function(D,O){return D===O||D===S&&O===s},x=function(D){var O;return!(!p(D)||typeof(O=D.then)!="function")&&O},k=function(D){return y(S,D)?new N(D):new n(D)},N=n=function(D){var O,U;this.promise=new D(function(H,K){if(O!==void 0||U!==void 0)throw v("Bad Promise constructor");O=H,U=K}),this.resolve=A(O),this.reject=A(U)},L=function(D){try{D()}catch(O){return{error:O}}},Q=function(D,O){if(!D._n){D._n=!0;var U=D._c;B(function(){for(var H=D._v,K=D._s==1,V=0,W=function(z){var Y,J,j=K?z.ok:z.fail,X=z.resolve,ee=z.reject,te=z.domain;try{j?(K||(D._h==2&&F(D),D._h=1),j===!0?Y=H:(te&&te.enter(),Y=j(H),te&&te.exit()),Y===z.promise?ee(v("Promise-chain cycle")):(J=x(Y))?J.call(Y,X,ee):X(Y)):ee(H)}catch(ie){ee(ie)}};U.length>V;)W(U[V++]);D._c=[],D._n=!1,O&&!D._h&&q(D)})}},q=function(D){w.call(f,function(){var O,U,H,K=D._v;if(G(D)&&(O=L(function(){I?b.emit("unhandledRejection",K,D):(U=f.onunhandledrejection)?U({promise:D,reason:K}):(H=f.console)&&H.error&&H.error("Unhandled promise rejection",K)}),D._h=I||G(D)?2:1),D._a=void 0,O)throw O.error})},G=function(D){if(D._h==1)return!1;for(var O,U=D._a||D._c,H=0;U.length>H;)if(O=U[H++],O.fail||!G(O.promise))return!1;return!0},F=function(D){w.call(f,function(){var O;I?b.emit("rejectionHandled",D):(O=f.onrejectionhandled)&&O({promise:D,reason:D._v})})},P=function(D){var O=this;O._d||(O._d=!0,O=O._w||O,O._v=D,O._s=2,O._a||(O._a=O._c.slice()),Q(O,!0))},M=function(D){var O,U=this;if(!U._d){U._d=!0,U=U._w||U;try{if(U===D)throw v("Promise can't be resolved itself");(O=x(D))?B(function(){var H={_w:U,_d:!1};try{O.call(D,d(M,H,1),d(P,H,1))}catch(K){P.call(H,K)}}):(U._v=D,U._s=1,Q(U,!1))}catch(H){P.call({_w:U,_d:!1},H)}}};E||(S=function(D){m(this,S,R,"_h"),A(D),o.call(this);try{D(d(M,this,1),d(P,this,1))}catch(O){P.call(this,O)}},o=function(D){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},o.prototype=a(56)(S.prototype,{then:function(D,O){var U=k(T(this,S));return U.ok=typeof D!="function"||D,U.fail=typeof O=="function"&&O,U.domain=I?b.domain:void 0,this._c.push(U),this._a&&this._a.push(U),this._s&&Q(this,!1),U.promise},catch:function(D){return this.then(void 0,D)}}),N=function(){var D=new o;this.promise=D,this.resolve=d(M,D,1),this.reject=d(P,D,1)}),c(c.G+c.W+c.F*!E,{Promise:S}),a(18)(S,R),a(59)(R),s=a(6)[R],c(c.S+c.F*!E,R,{reject:function(D){var O=k(this),U=O.reject;return U(D),O.promise}}),c(c.S+c.F*(u||!E),R,{resolve:function(D){if(D instanceof S&&y(D.constructor,this))return D;var O=k(this),U=O.resolve;return U(D),O.promise}}),c(c.S+c.F*!(E&&a(46)(function(D){S.all(D).catch(g)})),R,{all:function(D){var O=this,U=k(O),H=U.resolve,K=U.reject,V=L(function(){var W=[],z=0,Y=1;C(D,!1,function(J){var j=z++,X=!1;W.push(void 0),Y++,O.resolve(J).then(function(ee){X||(X=!0,W[j]=ee,--Y||H(W))},K)}),--Y||H(W)});return V&&K(V.error),U.promise},race:function(D){var O=this,U=k(O),H=U.reject,K=L(function(){C(D,!1,function(V){O.resolve(V).then(U.resolve,H)})});return K&&H(K.error),U.promise}})},function(r,i,a){"use strict";var o=a(61)(!0);a(27)(String,"String",function(n){this._t=String(n),this._i=0},function(){var n,s=this._t,u=this._i;return u>=s.length?{value:void 0,done:!0}:(n=o(s,u),this._i+=n.length,{value:n,done:!1})})},function(r,i,a){a(65);for(var o=a(2),n=a(5),s=a(10),u=a(1)("toStringTag"),f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;d<5;d++){var h=f[d],c=o[h],p=c&&c.prototype;p&&!p[u]&&n(p,u,h),s[h]=s.Array}},function(r,i){r.exports=He("child_process")},function(r,i){r.exports=He("crypto")}])})});function dtt(t,e=0){return(gy[t[e+0]]+gy[t[e+1]]+gy[t[e+2]]+gy[t[e+3]]+"-"+gy[t[e+4]]+gy[t[e+5]]+"-"+gy[t[e+6]]+gy[t[e+7]]+"-"+gy[t[e+8]]+gy[t[e+9]]+"-"+gy[t[e+10]]+gy[t[e+11]]+gy[t[e+12]]+gy[t[e+13]]+gy[t[e+14]]+gy[t[e+15]]).toLowerCase()}var gy,jrr=$(()=>{"use strict";gy=[];for(let t=0;t<256;++t)gy.push((t+256).toString(16).slice(1))});import{randomFillSync as Zau}from"crypto";function Vhe(){return ftt>htt.length-16&&(Zau(htt),ftt=0),htt.slice(ftt,ftt+=16)}var htt,ftt,$rr=$(()=>{"use strict";htt=new Uint8Array(256),ftt=htt.length});import{randomUUID as eou}from"crypto";var Xrr,h9n=$(()=>{"use strict";Xrr={randomUUID:eou}});function tou(t,e,r){if(Xrr.randomUUID&&!e&&!t)return Xrr.randomUUID();t=t||{};let i=t.random??t.rng?.()??Vhe();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[r+a]=i[a];return e}return dtt(i)}var Zrr,p9n=$(()=>{"use strict";h9n();$rr();jrr();Zrr=tou});function rou(t,e,r){let i;if(t)i=A9n(t.random??t.rng?.()??Vhe(),t.msecs,t.seq,e,r);else{let a=Date.now(),o=Vhe();nou(enr,a,o),i=A9n(o,enr.msecs,enr.seq,e,r)}return e??dtt(i)}function nou(t,e,r){return t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}function A9n(t,e,r,i,a=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!i)i=new Uint8Array(16),a=0;else if(a<0||a+16>i.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);return e??=Date.now(),r??=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9],i[a++]=e/1099511627776&255,i[a++]=e/4294967296&255,i[a++]=e/16777216&255,i[a++]=e/65536&255,i[a++]=e/256&255,i[a++]=e&255,i[a++]=112|r>>>28&15,i[a++]=r>>>20&255,i[a++]=128|r>>>14&63,i[a++]=r>>>6&255,i[a++]=r<<2&255|t[10]&3,i[a++]=t[11],i[a++]=t[12],i[a++]=t[13],i[a++]=t[14],i[a++]=t[15],i}var enr,tnr,g9n=$(()=>{"use strict";$rr();jrr();enr={};tnr=rou});var rnr=$(()=>{"use strict";p9n();g9n()});var Ree,A3,inr,Whe=$(()=>{Ree="dirac",A3="0.3.17",inr="dirac-run"});var m9n={};Gn(m9n,{HostProvider:()=>en});var en,Ua=$(()=>{"use strict";en=class t{static instance=null;diracType;createDiracWebviewProvider;createDiffViewProvider;createCommentReviewController;createTerminalManager;hostBridge;logToChannel;getCallbackUrl;getBinaryLocation;extensionFsPath;getEnvironmentVariables;globalStorageFsPath;constructor(e,r,i,a,o,n,s,u,f,d,h,c){this.diracType=e,this.createDiracWebviewProvider=r,this.createDiffViewProvider=i,this.createCommentReviewController=a,this.createTerminalManager=o,this.hostBridge=n,this.logToChannel=s,this.getCallbackUrl=u,this.getBinaryLocation=f,this.extensionFsPath=d,this.globalStorageFsPath=h,this.getEnvironmentVariables=c}static initialize(e,r,i,a,o,n,s,u,f,d,h,c){if(t.instance)throw new Error("Host provider has already been initialized.");return t.instance=new t(e,r,i,a,o,n,s,u,f,d,h,c),t.instance}static get(){if(!t.instance)throw new Error("HostProvider not setup. Call HostProvider.initialize() first.");return t.instance}static isInitialized(){return!!t.instance}static reset(){t.instance=null}static get workspace(){return t.get().hostBridge.workspaceClient}static get env(){return t.get().hostBridge.envClient}static get window(){return t.get().hostBridge.windowClient}static get diff(){return t.get().hostBridge.diffClient}}});var my,aou,oou,Ng,E9n,Khe,E_=$(()=>{"use strict";Whe();Ua();my=Ree==="claude-dev"||Ree==="dirac"?"dirac":Ree,aou={PlusButton:my+".plusButtonClicked",SettingsButton:my+".settingsButtonClicked",HistoryButton:my+".historyButtonClicked",WorktreesButton:my+".worktreesButtonClicked",TerminalOutput:my+".addTerminalOutputToChat",AddToChat:my+".addToChat",FixWithDirac:my+".fixWithDirac",ExplainCode:my+".explainCode",ImproveCode:my+".improveCode",FocusChatInput:my+".focusChatInput",Walkthrough:my+".openWalkthrough",GenerateCommit:my+".generateGitCommitMessage",AbortCommit:my+".abortGitCommitMessage",ReconstructTaskHistory:my+".reconstructTaskHistory",JupyterGenerateCell:my+".jupyterGenerateCell",JupyterExplainCell:my+".jupyterExplainCell",JupyterImproveCell:my+".jupyterImproveCell"},oou={Sidebar:Ree+".SidebarProvider"},Ng={id:inr+"."+Ree,name:Ree,version:A3,publisher:inr,commands:aou,views:oou},E9n=null,Khe={init:async t=>{let e=await en.env.getHostVersion({}),r=e.version,i=e.diracVersion||Ng.version,a=e.platform||"unknown",o=process.platform||"unknown",n=e.diracType||"unknown";E9n={hostVersion:r,extensionVersion:i,platform:a,os:o,ide:n,distinctId:t}},get:()=>E9n}});async function v9n(t,e=Zrr){let r=t.globalState.get(y9n);r||(r=await sou()),r||(Qe.warn("No machine ID found for telemetry, generating UUID"),r=`cl-${e()}`,t.globalState.update(y9n,r)),uou(r),await Khe.init(r),Qe.log("[DistinctId] initialized:",r)}async function sou(){try{return await(0,C9n.machineId)()}catch(t){Qe.log("[DistinctId] Failed to get machine ID from node-machine-id",t);return}}function uou(t){zhe&&zhe!==t&&Qe.log("[DistinctId] Updating...",`From ${zhe} to ${t}`),zhe=t}function y_(){return zhe||Qe.debug("[DistinctId] Not initialized. Call initializeDistinctId() first."),zhe}var C9n,zhe,y9n,CH=$(()=>{"use strict";C9n=Qt(f9n());rnr();E_();br();zhe="",y9n="dirac.generatedMachineId"});function N9n(t){return typeof t>"u"||t===null}function cou(t){return typeof t=="object"&&t!==null}function lou(t){return Array.isArray(t)?t:N9n(t)?[]:[t]}function dou(t,e){var r,i,a,o;if(e)for(o=Object.keys(e),r=0,i=o.length;r<i;r+=1)a=o[r],t[a]=e[a];return t}function fou(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function hou(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}function L9n(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
43
43
 
44
44
  `+t.mark.snippet),i+" "+r):i}function v4e(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=L9n(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function anr(t,e,r,i,a){var o="",n="",s=Math.floor(a/2)-1;return i-e>s&&(o=" ... ",e=i-s+o.length),r-i>s&&(n=" ...",r=i+s-n.length),{str:o+t.slice(e,r).replace(/\t/g,"\u2192")+n,pos:i-e+o.length}}function onr(t,e){return Lm.repeat(" ",e-t.length)+t}function Cou(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],o,n=-1;o=r.exec(t.buffer);)a.push(o.index),i.push(o.index+o[0].length),t.position<=o.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var s="",u,f,d=Math.min(t.line+e.linesAfter,a.length).toString().length,h=e.maxLength-(e.indent+d+3);for(u=1;u<=e.linesBefore&&!(n-u<0);u++)f=anr(t.buffer,i[n-u],a[n-u],t.position-(i[n]-i[n-u]),h),s=Lm.repeat(" ",e.indent)+onr((t.line-u+1).toString(),d)+" | "+f.str+`
45
45
  `+s;for(f=anr(t.buffer,i[n],a[n],t.position,h),s+=Lm.repeat(" ",e.indent)+onr((t.line+1).toString(),d)+" | "+f.str+`