cc-viewer 1.5.5 → 1.5.7
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.
|
@@ -489,7 +489,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error
|
|
|
489
489
|
`))}return r.join(`
|
|
490
490
|
|
|
491
491
|
|
|
492
|
-
`)}renderProjectStatsContent(){const{projectStats:n,projectStatsLoading:r}=this.state;if(r)return S.jsx("div",{className:fe.projectStatsCenter,children:S.jsx(ks,{})});if(!n)return S.jsx("div",{className:fe.projectStatsEmpty,children:me("ui.projectStats.noData")});const{summary:i,models:o,updatedAt:s}=n;o&&Object.entries(o).sort((c,h)=>h[1]-c[1]);const a={};if(n.files){for(const c of Object.values(n.files))if(c.models)for(const[h,m]of Object.entries(c.models))a[h]||(a[h]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),a[h].input+=m.input_tokens||0,a[h].output+=m.output_tokens||0,a[h].cacheRead+=m.cache_read_input_tokens||0,a[h].cacheCreation+=m.cache_creation_input_tokens||0,a[h].count+=m.count||0}const l=Object.entries(a).sort((c,h)=>h[1].count-c[1].count);return S.jsxs("div",{className:fe.projectStatsContent,children:[s&&S.jsx("div",{className:fe.projectStatsUpdated,children:me("ui.projectStats.updatedAt",{time:new Date(s).toLocaleString()})}),S.jsxs("div",{className:fe.projectStatsSummary,children:[S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:(i==null?void 0:i.requestCount)??0}),S.jsx("div",{className:fe.projectStatLabel,children:me("ui.projectStats.totalRequests")})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:(i==null?void 0:i.sessionCount)??0}),S.jsx("div",{className:fe.projectStatLabel,children:me("ui.projectStats.sessionCount")})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:(i==null?void 0:i.fileCount)??0}),S.jsx("div",{className:fe.projectStatLabel,children:me("ui.projectStats.totalFiles")})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:dr(i==null?void 0:i.input_tokens)}),S.jsx("div",{className:fe.projectStatLabel,children:"Input Tokens"})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:dr(i==null?void 0:i.output_tokens)}),S.jsx("div",{className:fe.projectStatLabel,children:"Output Tokens"})]})]}),l.length>0&&S.jsxs("div",{className:fe.projectStatsSection,children:[S.jsx("div",{className:fe.projectStatsSectionTitle,children:me("ui.projectStats.modelUsage")}),l.map(([c,h])=>{const m=h.input+h.cacheRead+h.cacheCreation,p=m>0?(h.cacheRead/m*100).toFixed(1):"0.0";return S.jsxs("div",{className:fe.projectStatsModelCard,children:[S.jsxs("div",{className:fe.projectStatsModelHeader,children:[S.jsx("span",{className:fe.projectStatsModelName,children:c}),S.jsxs("span",{className:fe.projectStatsModelCount,children:[h.count," reqs"]})]}),S.jsx("table",{className:fe.statsTable,children:S.jsxs("tbody",{children:[S.jsxs("tr",{children:[S.jsx("td",{className:fe.label,children:"Token"}),S.jsx("td",{className:fe.th,children:"input"}),S.jsx("td",{className:fe.th,children:"output"})]}),S.jsxs("tr",{className:fe.rowBorder,children:[S.jsx("td",{className:fe.label}),S.jsx("td",{className:fe.td,children:dr(m)}),S.jsx("td",{className:fe.td,children:dr(h.output)})]}),S.jsxs("tr",{children:[S.jsx("td",{className:fe.label,children:"Cache"}),S.jsx("td",{className:fe.th,children:"create"}),S.jsx("td",{className:fe.th,children:"read"})]}),S.jsxs("tr",{className:fe.rowBorder,children:[S.jsx("td",{className:fe.label}),S.jsx("td",{className:fe.td,children:dr(h.cacheCreation)}),S.jsx("td",{className:fe.td,children:dr(h.cacheRead)})]}),S.jsxs("tr",{children:[S.jsx("td",{className:fe.label,children:me("ui.hitRate")}),S.jsxs("td",{colSpan:2,className:fe.td,children:[p,"%"]})]})]})})]},c)})]})]})}render(){const{requestCount:n,requests:r=[],viewMode:i,cacheType:o,onToggleViewMode:s,onImportLocalLogs:a,onLangChange:l,isLocalLog:c,localLogFile:h,projectName:m,collapseToolResults:p,onCollapseToolResultsChange:g,expandThinking:v,onExpandThinkingChange:_,expandDiff:b,onExpandDiffChange:C,filterIrrelevant:x,onFilterIrrelevantChange:w,updateInfo:k,onDismissUpdate:$,cliMode:R,terminalVisible:I,onToggleTerminal:P,onReturnToWorkspaces:M}=this.props,{countdownText:z}=this.state,F=[{key:"import-local",icon:S.jsx(D5,{}),label:me("ui.importLocalLogs"),onClick:a},{key:"export-prompts",icon:S.jsx(Aee,{}),label:me("ui.exportPrompts"),onClick:this.handleShowPrompts},{key:"plugin-management",icon:S.jsx(A5,{}),label:me("ui.pluginManagement"),onClick:this.handleShowPlugins},...R&&M?[{key:"switch-workspace",icon:S.jsx(D5,{style:{transform:"scaleX(-1)"}}),label:me("ui.switchWorkspace"),onClick:M}]:[],{type:"divider"},{key:"project-stats",icon:S.jsx(B5,{}),label:me("ui.projectStats"),onClick:this.handleShowProjectStats},...i==="raw"?[{key:"global-settings",icon:S.jsx(z5,{}),label:me("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}]:[],...i==="chat"?[{key:"display-settings",icon:S.jsx(z5,{}),label:me("ui.settings"),onClick:()=>this.setState({settingsDrawerVisible:!0})}]:[],{key:"language",icon:S.jsx(zee,{}),label:me("ui.languageSettings"),children:[{key:"lang-grid-container",type:"group",label:S.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"8px",padding:"8px 4px",minWidth:"360px",maxHeight:"none"},children:Mre.map(T=>S.jsx(gn,{size:"small",type:T.value===Oh()?"primary":"default",onClick:O=>{O.stopPropagation(),uC(T.value),l&&l()},style:{width:"100%",textAlign:"center"},children:T.label},T.value))})}]}];return S.jsxs("div",{className:fe.headerBar,children:[S.jsxs(Fs,{size:"middle",children:[S.jsx(Gg,{menu:{items:F},trigger:["hover"],children:S.jsxs(Ire,{strong:!0,className:fe.titleText,children:[S.jsx("img",{src:"/favicon.ico",alt:"Logo",className:fe.logoImage}),"CC-Viewer ",S.jsx(js,{className:fe.titleArrow})]})}),S.jsx(lh,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:S.jsxs(xo,{className:fe.tokenStatsTag,children:[S.jsx(Nee,{className:fe.tokenStatsIcon}),me("ui.tokenStats")]})}),(()=>{const O=Date.now(),N=c?[]:(r||[]).filter(K=>!K.response&&O-new Date(K.timestamp).getTime()<3e5),A=N.length>0,B=c?null:A?S.jsxs("svg",{className:fe.liveSpinner,width:"10",height:"10",viewBox:"0 0 10 10",children:[S.jsx("line",{x1:"5",y1:"1",x2:"5",y2:"9",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),S.jsx("line",{x1:"1",y1:"5",x2:"9",y2:"5",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),S.jsx("line",{x1:"2.2",y1:"2.2",x2:"7.8",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:fe.liveSpinnerDiag}),S.jsx("line",{x1:"7.8",y1:"2.2",x2:"2.2",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:fe.liveSpinnerDiag})]}):S.jsx(OS,{status:"processing",color:"green"}),D=!c&&!A,j=B&&S.jsx("span",{className:fe.liveDotWrap,children:D?S.jsx(Zs,{title:me("ui.noInflightRequests"),placement:"bottom",children:B}):B}),W=S.jsxs(xo,{color:c?void 0:"green",className:`${fe.liveTag} ${c?fe.liveTagHistory:""}`,children:[j,S.jsx("span",{className:fe.liveTagText,children:c?me("ui.historyLog",{file:h}):me("ui.liveMonitoring")+(m?`:${m}`:"")})]});if(A){const K=S.jsx("div",{className:fe.inflightList,children:N.map((V,U)=>{var re;const q=_l(V),Y=Vp(q.type,q.subType),Z=((re=V.body)==null?void 0:re.model)||"",ee=Z.includes("-")?Z.split("-").slice(0,2).join("-"):Z,se=new Date(V.timestamp).toLocaleTimeString("zh-CN");return S.jsxs("div",{className:fe.inflightItem,children:[S.jsx("span",{className:fe.inflightTag,children:Y}),S.jsx("span",{className:fe.inflightModel,children:ee}),S.jsx("span",{className:fe.inflightTime,children:se})]},U)})});return S.jsx(lh,{content:K,title:me("ui.inflightRequests"),placement:"bottom",children:W})}return W})(),k&&S.jsx(xo,{color:k.type==="completed"?"green":"orange",closable:!0,onClose:()=>$&&$(),children:k.type==="completed"?me("ui.update.completed",{version:k.version}):me("ui.update.majorAvailable",{version:k.version})})]}),S.jsxs(Fs,{size:"middle",children:[z&&S.jsxs(xo,{color:z===me("ui.cacheExpired")?"red":"green",children:[me("ui.cacheCountdown",{type:o?`(${o})`:""}),S.jsx("strong",{className:fe.countdownStrong,children:z})]}),i==="chat"&&R&&this.state.localUrl&&S.jsx(lh,{content:S.jsxs("div",{className:fe.qrcodePopover,children:[S.jsx("div",{className:fe.qrcodeTitle,children:me("ui.scanToCoding")}),S.jsx(V8,{value:this.state.localUrl,size:200,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),S.jsx(mc,{readOnly:!0,value:this.state.localUrl,className:fe.qrcodeUrlInput,suffix:S.jsx(dh,{className:fe.qrcodeUrlCopy,onClick:()=>{navigator.clipboard.writeText(this.state.localUrl).then(()=>{ar.success(me("ui.copied"))}).catch(()=>{})}})})]}),trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:S.jsx(gn,{icon:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{verticalAlign:"-3px"},children:[S.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),S.jsx("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]})})}),R&&i==="chat"&&!c&&S.jsx(gn,{type:I?"primary":"default",ghost:I,icon:S.jsx(np,{}),onClick:P,children:me("ui.terminal")}),S.jsx(gn,{type:i==="raw"?"primary":"default",icon:i==="raw"?S.jsx(M8,{}):S.jsx(ep,{}),onClick:s,children:me(i==="raw"?"ui.chatMode":"ui.rawMode")})]}),S.jsxs(xi,{title:`${me("ui.userPrompt")} (${this.state.promptData.length}${me("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[S.jsx("div",{className:fe.promptExportBar,children:S.jsx(gn,{icon:S.jsx(N8,{}),onClick:this.handleExportPromptsTxt,children:me("ui.exportPromptsTxt")})}),S.jsx(qg,{activeKey:this.state.promptViewMode,onChange:T=>this.setState({promptViewMode:T}),size:"small",items:[{key:"original",label:me("ui.promptModeOriginal")},{key:"context",label:me("ui.promptModeContext")},{key:"text",label:me("ui.promptModeText")}]}),this.state.promptViewMode==="text"?S.jsx("textarea",{readOnly:!0,className:fe.promptTextarea,value:this.buildTextModeContent()}):S.jsxs("div",{className:fe.promptScrollArea,children:[this.state.promptData.length===0&&S.jsx("div",{className:fe.promptEmpty,children:me("ui.noPrompt")}),this.state.promptData.map((T,O)=>{const N=T.timestamp?new Date(T.timestamp).toLocaleString():me("ui.unknownTime");return S.jsxs("div",{children:[S.jsxs("div",{className:fe.promptTimestamp,children:[N,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(T):this.renderTextPrompt(T)]},O)})]})]}),S.jsx(Jm,{title:me("ui.settings"),placement:"left",width:360,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:S.jsxs("div",{className:fe.settingsGroupBox,children:[S.jsx("div",{className:fe.settingsGroupTitle,children:me("ui.chatDisplaySwitches")}),S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.collapseToolResults")}),S.jsx(al,{checked:!!p,onChange:T=>g&&g(T)})]}),S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.expandThinking")}),S.jsx(al,{checked:!!v,onChange:T=>_&&_(T)})]})]})}),S.jsxs(Jm,{title:me("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.filterIrrelevant")}),S.jsx(al,{checked:!!x,onChange:T=>w&&w(T)})]}),S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.expandDiff")}),S.jsx(al,{checked:!!b,onChange:T=>C&&C(T)})]})]}),S.jsx(Jm,{title:S.jsxs("span",{children:[S.jsx(B5,{style:{marginRight:8}}),me("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()}),S.jsxs(xi,{title:S.jsxs("span",{children:[S.jsx(A5,{style:{marginRight:8}}),me("ui.pluginManagement")]}),open:this.state.pluginModalVisible,onCancel:()=>this.setState({pluginModalVisible:!1}),footer:S.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[S.jsx(gn,{icon:S.jsx(Mp,{}),onClick:this.handleAddPlugin,children:me("ui.plugins.add")}),S.jsx(gn,{icon:S.jsx(JX,{}),onClick:this.handleReloadPlugins,children:me("ui.plugins.reload")})]}),width:560,children:[this.state.pluginsDir&&S.jsxs("div",{className:fe.pluginDirHint,children:[S.jsxs("span",{style:{color:"#888"},children:[me("ui.plugins.pluginsDir"),":"]})," ",S.jsx("code",{className:fe.pluginDirPath,onClick:()=>{navigator.clipboard.writeText(this.state.pluginsDir).then(()=>{ar.success(me("ui.copied"))}).catch(()=>{})},children:this.state.pluginsDir})]}),this.state.pluginsList.length===0?S.jsxs("div",{className:fe.pluginEmpty,children:[S.jsx("div",{style:{fontSize:14,marginBottom:4},children:me("ui.plugins.empty")}),S.jsx("div",{style:{fontSize:12,color:"#666",marginBottom:12},children:me("ui.plugins.emptyHint")}),S.jsx(gn,{icon:S.jsx(Mp,{}),onClick:this.handleAddPlugin,children:me("ui.plugins.add")})]}):S.jsx("div",{className:fe.pluginList,children:this.state.pluginsList.map(T=>S.jsxs("div",{className:fe.pluginItem,children:[S.jsxs("div",{className:fe.pluginInfo,children:[S.jsx("span",{className:fe.pluginName,children:T.name}),S.jsx("span",{className:fe.pluginFile,children:T.file}),T.hooks.length>0&&S.jsx("span",{className:fe.pluginHooks,children:T.hooks.map(O=>S.jsx("span",{className:fe.pluginHookTag,children:O},O))})]}),S.jsxs("div",{className:fe.pluginActions,children:[S.jsx(al,{size:"small",checked:T.enabled,onChange:O=>this.handleTogglePlugin(T.name,O)}),S.jsx(gn,{type:"text",size:"small",danger:!0,icon:S.jsx(Dp,{}),onClick:()=>this.handleDeletePlugin(T.file,T.name)})]})]},T.file))})]}),S.jsx(xi,{title:me("ui.plugins.delete"),open:this.state.deleteConfirmVisible,onCancel:()=>this.setState({deleteConfirmVisible:!1,deleteTarget:null}),onOk:this.handleDeletePluginConfirm,okType:"danger",okText:"OK",cancelText:"Cancel",children:S.jsx("p",{children:this.state.deleteTarget?me("ui.plugins.deleteConfirm",{name:this.state.deleteTarget.name}):""})})]})}};It(bu,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let q_=bu;const Pre="_centerEmpty_oxhcp_1",Lre="_scrollContainer_oxhcp_8",Are="_listItem_oxhcp_15",Bre="_listItemActive_oxhcp_27",Dre="_itemContent_oxhcp_36",zre="_itemHeader_oxhcp_41",jre="_tagNoMargin_oxhcp_49",Fre="_modelName_oxhcp_54",Hre="_time_oxhcp_58",Wre="_detailRow_oxhcp_64",Vre="_urlText_oxhcp_71",Kre="_duration_oxhcp_80",Ure="_statusOk_oxhcp_85",qre="_statusErr_oxhcp_91",Gre="_statusDefault_oxhcp_96",Xre="_usageBox_oxhcp_101",Yre="_cacheDot_oxhcp_111",Zre="_cacheDotLoss_oxhcp_120",Qre="_cacheDotNormal_oxhcp_125",Mr={centerEmpty:Pre,scrollContainer:Lre,listItem:Are,listItemActive:Bre,itemContent:Dre,itemHeader:zre,tagNoMargin:jre,modelName:Fre,time:Hre,detailRow:Wre,urlText:Vre,duration:Kre,statusOk:Ure,statusErr:qre,statusDefault:Gre,usageBox:Xre,cacheDot:Yre,cacheDotLoss:Zre,cacheDotNormal:Qre};class Jre extends te.Component{constructor(t){super(t),this.activeItemRef=te.createRef()}componentDidMount(){this.scrollToSelected(!0)}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.requests!==this.props.requests&&this.scrollToSelected(!1)}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:n,onSelect:r}=this.props;return t.length===0?S.jsx("div",{className:Mr.centerEmpty,children:S.jsx(Ii,{description:me("ui.waitingRequests")})}):S.jsx("div",{className:Mr.scrollContainer,children:S.jsx(Lp,{dataSource:t,size:"small",split:!1,renderItem:(i,o)=>{var k,$,R;const s=new Date(i.timestamp).toLocaleTimeString("zh-CN"),a=o===n,l=i.response&&i.response.status<400,c=i.response&&i.response.status>=400,h=dte((k=i.body)==null?void 0:k.model),m=o+1<t.length?t[o+1]:null,{type:p,subType:g}=_l(i,m),v=(R=($=i.response)==null?void 0:$.body)==null?void 0:R.usage,_=v?(v.input_tokens||0)+(v.cache_read_input_tokens||0)+(v.cache_creation_input_tokens||0):null,b=(v==null?void 0:v.output_tokens)||null,C=(v==null?void 0:v.cache_read_input_tokens)||0,x=(v==null?void 0:v.cache_creation_input_tokens)||0;let w=i.url;try{const I=new URL(i.url);w=I.host+I.pathname}catch{}return S.jsx(Lp.Item,{ref:a?this.activeItemRef:void 0,onClick:()=>r(o),className:`${Mr.listItem} ${a?Mr.listItemActive:""}`,children:S.jsxs("div",{className:Mr.itemContent,children:[S.jsxs("div",{className:Mr.itemHeader,children:[p==="MainAgent"?S.jsx(xo,{color:"orange",className:Mr.tagNoMargin,children:"MainAgent"}):p==="Plan"?S.jsx(xo,{className:Mr.tagNoMargin,style:{color:"#a33",borderColor:"#a33",backgroundColor:"#000"},children:Vp(p,g)}):p==="Count"||p==="Preflight"?S.jsx(xo,{className:Mr.tagNoMargin,style:{color:"#666",borderColor:"#444",backgroundColor:"#000"},children:p}):S.jsx(xo,{className:Mr.tagNoMargin,children:Vp(p,g)}),h&&S.jsx("span",{className:Mr.modelName,style:{color:p==="MainAgent"?"#d4822d":"#8c8c8c"},children:h}),S.jsx("span",{className:Mr.time,children:s})]}),S.jsxs("div",{className:Mr.detailRow,children:[S.jsx("span",{className:Mr.urlText,title:i.url,children:w}),i.duration&&S.jsxs("span",{className:Mr.duration,children:[i.duration,"ms"]}),i.response&&S.jsx("span",{className:l?Mr.statusOk:c?Mr.statusErr:Mr.statusDefault,children:i.response.status})]}),v&&S.jsxs("div",{className:Mr.usageBox,children:[S.jsxs("div",{children:["token: output:",dr(b)||0,", input: ",dr(_)||0]}),(C>0||x>0)&&S.jsx("div",{children:(()=>{const I=U8(t,o),P={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let M;if(I){const F=(I.reasons||[I.reason]).map(T=>me(P[T]||P.key_change)).join(`
|
|
492
|
+
`)}renderProjectStatsContent(){const{projectStats:n,projectStatsLoading:r}=this.state;if(r)return S.jsx("div",{className:fe.projectStatsCenter,children:S.jsx(ks,{})});if(!n)return S.jsx("div",{className:fe.projectStatsEmpty,children:me("ui.projectStats.noData")});const{summary:i,models:o,updatedAt:s}=n;o&&Object.entries(o).sort((c,h)=>h[1]-c[1]);const a={};if(n.files){for(const c of Object.values(n.files))if(c.models)for(const[h,m]of Object.entries(c.models))a[h]||(a[h]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),a[h].input+=m.input_tokens||0,a[h].output+=m.output_tokens||0,a[h].cacheRead+=m.cache_read_input_tokens||0,a[h].cacheCreation+=m.cache_creation_input_tokens||0,a[h].count+=m.count||0}const l=Object.entries(a).sort((c,h)=>h[1].count-c[1].count);return S.jsxs("div",{className:fe.projectStatsContent,children:[s&&S.jsx("div",{className:fe.projectStatsUpdated,children:me("ui.projectStats.updatedAt",{time:new Date(s).toLocaleString()})}),S.jsxs("div",{className:fe.projectStatsSummary,children:[S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:(i==null?void 0:i.requestCount)??0}),S.jsx("div",{className:fe.projectStatLabel,children:me("ui.projectStats.totalRequests")})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:(i==null?void 0:i.sessionCount)??0}),S.jsx("div",{className:fe.projectStatLabel,children:me("ui.projectStats.sessionCount")})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:(i==null?void 0:i.fileCount)??0}),S.jsx("div",{className:fe.projectStatLabel,children:me("ui.projectStats.totalFiles")})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:dr(i==null?void 0:i.input_tokens)}),S.jsx("div",{className:fe.projectStatLabel,children:"Input Tokens"})]}),S.jsxs("div",{className:fe.projectStatCard,children:[S.jsx("div",{className:fe.projectStatValue,children:dr(i==null?void 0:i.output_tokens)}),S.jsx("div",{className:fe.projectStatLabel,children:"Output Tokens"})]})]}),l.length>0&&S.jsxs("div",{className:fe.projectStatsSection,children:[S.jsx("div",{className:fe.projectStatsSectionTitle,children:me("ui.projectStats.modelUsage")}),l.map(([c,h])=>{const m=h.input+h.cacheRead+h.cacheCreation,p=m>0?(h.cacheRead/m*100).toFixed(1):"0.0";return S.jsxs("div",{className:fe.projectStatsModelCard,children:[S.jsxs("div",{className:fe.projectStatsModelHeader,children:[S.jsx("span",{className:fe.projectStatsModelName,children:c}),S.jsxs("span",{className:fe.projectStatsModelCount,children:[h.count," reqs"]})]}),S.jsx("table",{className:fe.statsTable,children:S.jsxs("tbody",{children:[S.jsxs("tr",{children:[S.jsx("td",{className:fe.label,children:"Token"}),S.jsx("td",{className:fe.th,children:"input"}),S.jsx("td",{className:fe.th,children:"output"})]}),S.jsxs("tr",{className:fe.rowBorder,children:[S.jsx("td",{className:fe.label}),S.jsx("td",{className:fe.td,children:dr(m)}),S.jsx("td",{className:fe.td,children:dr(h.output)})]}),S.jsxs("tr",{children:[S.jsx("td",{className:fe.label,children:"Cache"}),S.jsx("td",{className:fe.th,children:"create"}),S.jsx("td",{className:fe.th,children:"read"})]}),S.jsxs("tr",{className:fe.rowBorder,children:[S.jsx("td",{className:fe.label}),S.jsx("td",{className:fe.td,children:dr(h.cacheCreation)}),S.jsx("td",{className:fe.td,children:dr(h.cacheRead)})]}),S.jsxs("tr",{children:[S.jsx("td",{className:fe.label,children:me("ui.hitRate")}),S.jsxs("td",{colSpan:2,className:fe.td,children:[p,"%"]})]})]})})]},c)})]})]})}render(){const{requestCount:n,requests:r=[],viewMode:i,cacheType:o,onToggleViewMode:s,onImportLocalLogs:a,onLangChange:l,isLocalLog:c,localLogFile:h,projectName:m,collapseToolResults:p,onCollapseToolResultsChange:g,expandThinking:v,onExpandThinkingChange:_,expandDiff:b,onExpandDiffChange:C,filterIrrelevant:x,onFilterIrrelevantChange:w,updateInfo:k,onDismissUpdate:$,cliMode:R,terminalVisible:I,onToggleTerminal:P,onReturnToWorkspaces:M}=this.props,{countdownText:z}=this.state,F=[{key:"import-local",icon:S.jsx(D5,{}),label:me("ui.importLocalLogs"),onClick:a},{key:"export-prompts",icon:S.jsx(Aee,{}),label:me("ui.exportPrompts"),onClick:this.handleShowPrompts},{key:"plugin-management",icon:S.jsx(A5,{}),label:me("ui.pluginManagement"),onClick:this.handleShowPlugins},...R&&M?[{key:"switch-workspace",icon:S.jsx(D5,{style:{transform:"scaleX(-1)"}}),label:me("ui.switchWorkspace"),onClick:M}]:[],{type:"divider"},{key:"project-stats",icon:S.jsx(B5,{}),label:me("ui.projectStats"),onClick:this.handleShowProjectStats},...i==="raw"?[{key:"global-settings",icon:S.jsx(z5,{}),label:me("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}]:[],...i==="chat"?[{key:"display-settings",icon:S.jsx(z5,{}),label:me("ui.settings"),onClick:()=>this.setState({settingsDrawerVisible:!0})}]:[],{key:"language",icon:S.jsx(zee,{}),label:me("ui.languageSettings"),children:[{key:"lang-grid-container",type:"group",label:S.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"8px",padding:"8px 4px",minWidth:"360px",maxHeight:"none"},children:Mre.map(T=>S.jsx(gn,{size:"small",type:T.value===Oh()?"primary":"default",onClick:O=>{O.stopPropagation(),uC(T.value),l&&l()},style:{width:"100%",textAlign:"center"},children:T.label},T.value))})}]}];return S.jsxs("div",{className:fe.headerBar,children:[S.jsxs(Fs,{size:"middle",children:[S.jsx(Gg,{menu:{items:F},trigger:["hover"],children:S.jsxs(Ire,{strong:!0,className:fe.titleText,children:[S.jsx("img",{src:"/favicon.ico",alt:"Logo",className:fe.logoImage}),"CC-Viewer ",S.jsx(js,{className:fe.titleArrow})]})}),S.jsx(lh,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:S.jsxs(xo,{className:fe.tokenStatsTag,children:[S.jsx(Nee,{className:fe.tokenStatsIcon}),me("ui.tokenStats")]})}),(()=>{const O=Date.now(),N=c?[]:(r||[]).filter(K=>!K.response&&O-new Date(K.timestamp).getTime()<3e5),A=N.length>0,B=c?null:A?S.jsxs("svg",{className:fe.liveSpinner,width:"10",height:"10",viewBox:"0 0 10 10",children:[S.jsx("line",{x1:"5",y1:"1",x2:"5",y2:"9",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),S.jsx("line",{x1:"1",y1:"5",x2:"9",y2:"5",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),S.jsx("line",{x1:"2.2",y1:"2.2",x2:"7.8",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:fe.liveSpinnerDiag}),S.jsx("line",{x1:"7.8",y1:"2.2",x2:"2.2",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:fe.liveSpinnerDiag})]}):S.jsx(OS,{status:"processing",color:"green"}),D=!c&&!A,j=B&&S.jsx("span",{className:fe.liveDotWrap,children:D?S.jsx(Zs,{title:me("ui.noInflightRequests"),placement:"bottom",children:B}):B}),W=S.jsxs(xo,{color:c?void 0:"green",className:`${fe.liveTag} ${c?fe.liveTagHistory:""}`,children:[j,S.jsx("span",{className:fe.liveTagText,children:c?me("ui.historyLog",{file:h}):me("ui.liveMonitoring")+(m?`:${m}`:"")})]});if(A){const K=S.jsx("div",{className:fe.inflightList,children:N.map((V,U)=>{var re;const q=_l(V),Y=Vp(q.type,q.subType),Z=((re=V.body)==null?void 0:re.model)||"",ee=Z.includes("-")?Z.split("-").slice(0,2).join("-"):Z,se=new Date(V.timestamp).toLocaleTimeString("zh-CN");return S.jsxs("div",{className:fe.inflightItem,children:[S.jsx("span",{className:fe.inflightTag,children:Y}),S.jsx("span",{className:fe.inflightModel,children:ee}),S.jsx("span",{className:fe.inflightTime,children:se})]},U)})});return S.jsx(lh,{content:K,title:me("ui.inflightRequests"),placement:"bottom",children:W})}return W})(),k&&S.jsx(xo,{color:k.type==="completed"?"green":"orange",closable:!0,onClose:()=>$&&$(),children:k.type==="completed"?me("ui.update.completed",{version:k.version}):me("ui.update.majorAvailable",{version:k.version})})]}),S.jsxs(Fs,{size:"middle",children:[z&&S.jsxs(xo,{color:z===me("ui.cacheExpired")?"red":"green",children:[me("ui.cacheCountdown",{type:o?`(${o})`:""}),S.jsx("strong",{className:fe.countdownStrong,children:z})]}),i==="chat"&&R&&!c&&this.state.localUrl&&S.jsx(lh,{content:S.jsxs("div",{className:fe.qrcodePopover,children:[S.jsx("div",{className:fe.qrcodeTitle,children:me("ui.scanToCoding")}),S.jsx(V8,{value:this.state.localUrl,size:200,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),S.jsx(mc,{readOnly:!0,value:this.state.localUrl,className:fe.qrcodeUrlInput,suffix:S.jsx(dh,{className:fe.qrcodeUrlCopy,onClick:()=>{navigator.clipboard.writeText(this.state.localUrl).then(()=>{ar.success(me("ui.copied"))}).catch(()=>{})}})})]}),trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:S.jsx(gn,{icon:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{verticalAlign:"-3px"},children:[S.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),S.jsx("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]})})}),R&&i==="chat"&&!c&&S.jsx(gn,{type:I?"primary":"default",ghost:I,icon:S.jsx(np,{}),onClick:P,children:me("ui.terminal")}),S.jsx(gn,{type:i==="raw"?"primary":"default",icon:i==="raw"?S.jsx(M8,{}):S.jsx(ep,{}),onClick:s,children:me(i==="raw"?"ui.chatMode":"ui.rawMode")})]}),S.jsxs(xi,{title:`${me("ui.userPrompt")} (${this.state.promptData.length}${me("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[S.jsx("div",{className:fe.promptExportBar,children:S.jsx(gn,{icon:S.jsx(N8,{}),onClick:this.handleExportPromptsTxt,children:me("ui.exportPromptsTxt")})}),S.jsx(qg,{activeKey:this.state.promptViewMode,onChange:T=>this.setState({promptViewMode:T}),size:"small",items:[{key:"original",label:me("ui.promptModeOriginal")},{key:"context",label:me("ui.promptModeContext")},{key:"text",label:me("ui.promptModeText")}]}),this.state.promptViewMode==="text"?S.jsx("textarea",{readOnly:!0,className:fe.promptTextarea,value:this.buildTextModeContent()}):S.jsxs("div",{className:fe.promptScrollArea,children:[this.state.promptData.length===0&&S.jsx("div",{className:fe.promptEmpty,children:me("ui.noPrompt")}),this.state.promptData.map((T,O)=>{const N=T.timestamp?new Date(T.timestamp).toLocaleString():me("ui.unknownTime");return S.jsxs("div",{children:[S.jsxs("div",{className:fe.promptTimestamp,children:[N,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(T):this.renderTextPrompt(T)]},O)})]})]}),S.jsx(Jm,{title:me("ui.settings"),placement:"left",width:360,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:S.jsxs("div",{className:fe.settingsGroupBox,children:[S.jsx("div",{className:fe.settingsGroupTitle,children:me("ui.chatDisplaySwitches")}),S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.collapseToolResults")}),S.jsx(al,{checked:!!p,onChange:T=>g&&g(T)})]}),S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.expandThinking")}),S.jsx(al,{checked:!!v,onChange:T=>_&&_(T)})]})]})}),S.jsxs(Jm,{title:me("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.filterIrrelevant")}),S.jsx(al,{checked:!!x,onChange:T=>w&&w(T)})]}),S.jsxs("div",{className:fe.settingsItem,children:[S.jsx("span",{className:fe.settingsLabel,children:me("ui.expandDiff")}),S.jsx(al,{checked:!!b,onChange:T=>C&&C(T)})]})]}),S.jsx(Jm,{title:S.jsxs("span",{children:[S.jsx(B5,{style:{marginRight:8}}),me("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()}),S.jsxs(xi,{title:S.jsxs("span",{children:[S.jsx(A5,{style:{marginRight:8}}),me("ui.pluginManagement")]}),open:this.state.pluginModalVisible,onCancel:()=>this.setState({pluginModalVisible:!1}),footer:S.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[S.jsx(gn,{icon:S.jsx(Mp,{}),onClick:this.handleAddPlugin,children:me("ui.plugins.add")}),S.jsx(gn,{icon:S.jsx(JX,{}),onClick:this.handleReloadPlugins,children:me("ui.plugins.reload")})]}),width:560,children:[this.state.pluginsDir&&S.jsxs("div",{className:fe.pluginDirHint,children:[S.jsxs("span",{style:{color:"#888"},children:[me("ui.plugins.pluginsDir"),":"]})," ",S.jsx("code",{className:fe.pluginDirPath,onClick:()=>{navigator.clipboard.writeText(this.state.pluginsDir).then(()=>{ar.success(me("ui.copied"))}).catch(()=>{})},children:this.state.pluginsDir})]}),this.state.pluginsList.length===0?S.jsxs("div",{className:fe.pluginEmpty,children:[S.jsx("div",{style:{fontSize:14,marginBottom:4},children:me("ui.plugins.empty")}),S.jsx("div",{style:{fontSize:12,color:"#666",marginBottom:12},children:me("ui.plugins.emptyHint")}),S.jsx(gn,{icon:S.jsx(Mp,{}),onClick:this.handleAddPlugin,children:me("ui.plugins.add")})]}):S.jsx("div",{className:fe.pluginList,children:this.state.pluginsList.map(T=>S.jsxs("div",{className:fe.pluginItem,children:[S.jsxs("div",{className:fe.pluginInfo,children:[S.jsx("span",{className:fe.pluginName,children:T.name}),S.jsx("span",{className:fe.pluginFile,children:T.file}),T.hooks.length>0&&S.jsx("span",{className:fe.pluginHooks,children:T.hooks.map(O=>S.jsx("span",{className:fe.pluginHookTag,children:O},O))})]}),S.jsxs("div",{className:fe.pluginActions,children:[S.jsx(al,{size:"small",checked:T.enabled,onChange:O=>this.handleTogglePlugin(T.name,O)}),S.jsx(gn,{type:"text",size:"small",danger:!0,icon:S.jsx(Dp,{}),onClick:()=>this.handleDeletePlugin(T.file,T.name)})]})]},T.file))})]}),S.jsx(xi,{title:me("ui.plugins.delete"),open:this.state.deleteConfirmVisible,onCancel:()=>this.setState({deleteConfirmVisible:!1,deleteTarget:null}),onOk:this.handleDeletePluginConfirm,okType:"danger",okText:"OK",cancelText:"Cancel",children:S.jsx("p",{children:this.state.deleteTarget?me("ui.plugins.deleteConfirm",{name:this.state.deleteTarget.name}):""})})]})}};It(bu,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let q_=bu;const Pre="_centerEmpty_oxhcp_1",Lre="_scrollContainer_oxhcp_8",Are="_listItem_oxhcp_15",Bre="_listItemActive_oxhcp_27",Dre="_itemContent_oxhcp_36",zre="_itemHeader_oxhcp_41",jre="_tagNoMargin_oxhcp_49",Fre="_modelName_oxhcp_54",Hre="_time_oxhcp_58",Wre="_detailRow_oxhcp_64",Vre="_urlText_oxhcp_71",Kre="_duration_oxhcp_80",Ure="_statusOk_oxhcp_85",qre="_statusErr_oxhcp_91",Gre="_statusDefault_oxhcp_96",Xre="_usageBox_oxhcp_101",Yre="_cacheDot_oxhcp_111",Zre="_cacheDotLoss_oxhcp_120",Qre="_cacheDotNormal_oxhcp_125",Mr={centerEmpty:Pre,scrollContainer:Lre,listItem:Are,listItemActive:Bre,itemContent:Dre,itemHeader:zre,tagNoMargin:jre,modelName:Fre,time:Hre,detailRow:Wre,urlText:Vre,duration:Kre,statusOk:Ure,statusErr:qre,statusDefault:Gre,usageBox:Xre,cacheDot:Yre,cacheDotLoss:Zre,cacheDotNormal:Qre};class Jre extends te.Component{constructor(t){super(t),this.activeItemRef=te.createRef()}componentDidMount(){this.scrollToSelected(!0)}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.requests!==this.props.requests&&this.scrollToSelected(!1)}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:n,onSelect:r}=this.props;return t.length===0?S.jsx("div",{className:Mr.centerEmpty,children:S.jsx(Ii,{description:me("ui.waitingRequests")})}):S.jsx("div",{className:Mr.scrollContainer,children:S.jsx(Lp,{dataSource:t,size:"small",split:!1,renderItem:(i,o)=>{var k,$,R;const s=new Date(i.timestamp).toLocaleTimeString("zh-CN"),a=o===n,l=i.response&&i.response.status<400,c=i.response&&i.response.status>=400,h=dte((k=i.body)==null?void 0:k.model),m=o+1<t.length?t[o+1]:null,{type:p,subType:g}=_l(i,m),v=(R=($=i.response)==null?void 0:$.body)==null?void 0:R.usage,_=v?(v.input_tokens||0)+(v.cache_read_input_tokens||0)+(v.cache_creation_input_tokens||0):null,b=(v==null?void 0:v.output_tokens)||null,C=(v==null?void 0:v.cache_read_input_tokens)||0,x=(v==null?void 0:v.cache_creation_input_tokens)||0;let w=i.url;try{const I=new URL(i.url);w=I.host+I.pathname}catch{}return S.jsx(Lp.Item,{ref:a?this.activeItemRef:void 0,onClick:()=>r(o),className:`${Mr.listItem} ${a?Mr.listItemActive:""}`,children:S.jsxs("div",{className:Mr.itemContent,children:[S.jsxs("div",{className:Mr.itemHeader,children:[p==="MainAgent"?S.jsx(xo,{color:"orange",className:Mr.tagNoMargin,children:"MainAgent"}):p==="Plan"?S.jsx(xo,{className:Mr.tagNoMargin,style:{color:"#a33",borderColor:"#a33",backgroundColor:"#000"},children:Vp(p,g)}):p==="Count"||p==="Preflight"?S.jsx(xo,{className:Mr.tagNoMargin,style:{color:"#666",borderColor:"#444",backgroundColor:"#000"},children:p}):S.jsx(xo,{className:Mr.tagNoMargin,children:Vp(p,g)}),h&&S.jsx("span",{className:Mr.modelName,style:{color:p==="MainAgent"?"#d4822d":"#8c8c8c"},children:h}),S.jsx("span",{className:Mr.time,children:s})]}),S.jsxs("div",{className:Mr.detailRow,children:[S.jsx("span",{className:Mr.urlText,title:i.url,children:w}),i.duration&&S.jsxs("span",{className:Mr.duration,children:[i.duration,"ms"]}),i.response&&S.jsx("span",{className:l?Mr.statusOk:c?Mr.statusErr:Mr.statusDefault,children:i.response.status})]}),v&&S.jsxs("div",{className:Mr.usageBox,children:[S.jsxs("div",{children:["token: output:",dr(b)||0,", input: ",dr(_)||0]}),(C>0||x>0)&&S.jsx("div",{children:(()=>{const I=U8(t,o),P={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let M;if(I){const F=(I.reasons||[I.reason]).map(T=>me(P[T]||P.key_change)).join(`
|
|
493
493
|
`);M=S.jsx(Zs,{title:S.jsx("span",{style:{whiteSpace:"pre-line"},children:F}),children:S.jsx("span",{className:`${Mr.cacheDot} ${Mr.cacheDotLoss}`})})}else M=S.jsx("span",{className:`${Mr.cacheDot} ${Mr.cacheDotNormal}`});return S.jsxs(S.Fragment,{children:["cache",M,": ",C>0?`read:${dr(C)}`:"",C>0&&x>0?", ":"",x>0?`create:${dr(x)}`:""]})})()})]})]})})}})})}}const eie=e=>typeof e=="boolean"||e instanceof Boolean,tie=e=>typeof e=="number"||e instanceof Number,nie=e=>typeof e=="bigint"||e instanceof BigInt,cN=e=>!!e&&e instanceof Date,rie=e=>typeof e=="string"||e instanceof String,iie=e=>Array.isArray(e),uN=e=>typeof e=="object"&&e!==null,dN=e=>!!e&&e instanceof Object&&typeof e=="function";function Gp(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function oie(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function hN(e){let{field:t,value:n,data:r,lastElement:i,openBracket:o,closeBracket:s,level:a,style:l,shouldExpandNode:c,clickToExpandNode:h,outerRef:m,beforeExpandChange:p}=e;const g=d.useRef(!1),[v,_]=d.useState(()=>c(a,n,t)),b=d.useRef(null);d.useEffect(()=>{g.current?_(c(a,n,t)):g.current=!0},[c]);const C=d.useId();if(r.length===0)return sie({field:t,openBracket:o,closeBracket:s,lastElement:i,style:l});const x=v?l.collapseIcon:l.expandIcon,w=v?l.ariaLables.collapseJson:l.ariaLables.expandJson,k=a+1,$=r.length-1,R=M=>{v!==M&&(!p||p({level:a,value:n,field:t,newExpandValue:M}))&&_(M)},I=M=>{if(M.key==="ArrowRight"||M.key==="ArrowLeft")M.preventDefault(),R(M.key==="ArrowRight");else if(M.key==="ArrowUp"||M.key==="ArrowDown"){M.preventDefault();const z=M.key==="ArrowUp"?-1:1;if(!m.current)return;const F=m.current.querySelectorAll("[role=button]");let T=-1;for(let N=0;N<F.length;N++)if(F[N].tabIndex===0){T=N;break}if(T<0)return;const O=(T+z+F.length)%F.length;F[T].tabIndex=-1,F[O].tabIndex=0,F[O].focus()}},P=()=>{var M;R(!v);const z=b.current;if(!z)return;const F=(M=m.current)===null||M===void 0?void 0:M.querySelector('[role=button][tabindex="0"]');F&&(F.tabIndex=-1),z.tabIndex=0,z.focus()};return d.createElement("div",{className:l.basicChildStyle,role:"treeitem","aria-expanded":v,"aria-selected":void 0},d.createElement("span",{className:x,onClick:P,onKeyDown:I,role:"button","aria-label":w,"aria-expanded":v,"aria-controls":v?C:void 0,ref:b,tabIndex:a===0?0:-1}),(t||t==="")&&(h?d.createElement("span",{className:l.clickableLabel,onClick:P,onKeyDown:I},Gp(t,l.quotesForFieldNames),":"):d.createElement("span",{className:l.label},Gp(t,l.quotesForFieldNames),":")),d.createElement("span",{className:l.punctuation},o),v?d.createElement("ul",{id:C,role:"group",className:l.childFieldsContainer},r.map((M,z)=>d.createElement(G_,{key:M[0]||z,field:M[0],value:M[1],style:l,lastElement:z===$,level:k,shouldExpandNode:c,clickToExpandNode:h,beforeExpandChange:p,outerRef:m}))):d.createElement("span",{className:l.collapsedContent,onClick:P,onKeyDown:I}),d.createElement("span",{className:l.punctuation},s),!i&&d.createElement("span",{className:l.punctuation},","))}function sie(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:o}=e;return d.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&d.createElement("span",{className:o.label},Gp(t,o.quotesForFieldNames),":"),d.createElement("span",{className:o.punctuation},n),d.createElement("span",{className:o.punctuation},r),!i&&d.createElement("span",{className:o.punctuation},","))}function aie(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:o,clickToExpandNode:s,level:a,outerRef:l,beforeExpandChange:c}=e;return hN({field:t,value:n,lastElement:i||!1,level:a,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:o,clickToExpandNode:s,data:Object.keys(n).map(h=>[h,n[h]]),outerRef:l,beforeExpandChange:c})}function lie(e){let{field:t,value:n,style:r,lastElement:i,level:o,shouldExpandNode:s,clickToExpandNode:a,outerRef:l,beforeExpandChange:c}=e;return hN({field:t,value:n,lastElement:i||!1,level:o,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:s,clickToExpandNode:a,data:n.map(h=>[void 0,h]),outerRef:l,beforeExpandChange:c})}function cie(e){let{field:t,value:n,style:r,lastElement:i}=e,o,s=r.otherValue;return n===null?(o="null",s=r.nullValue):n===void 0?(o="undefined",s=r.undefinedValue):rie(n)?(o=oie(n,!r.noQuotesForStringValues,r.stringifyStringValues),s=r.stringValue):eie(n)?(o=n?"true":"false",s=r.booleanValue):tie(n)?(o=n.toString(),s=r.numberValue):nie(n)?(o=`${n.toString()}n`,s=r.numberValue):cN(n)?o=n.toISOString():dN(n)?o="function() { }":o=n.toString(),d.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&d.createElement("span",{className:r.label},Gp(t,r.quotesForFieldNames),":"),d.createElement("span",{className:s},o),!i&&d.createElement("span",{className:r.punctuation},","))}function G_(e){const t=e.value;return iie(t)?d.createElement(lie,Object.assign({},e)):uN(t)&&!cN(t)&&!dN(t)?d.createElement(aie,Object.assign({},e)):d.createElement(cie,Object.assign({},e))}var er={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const fN={collapseJson:"collapse JSON",expandJson:"expand JSON"},F1={container:er["container-light"],basicChildStyle:er["basic-element-style"],childFieldsContainer:er["child-fields-container"],label:er["label-light"],clickableLabel:er["clickable-label-light"],nullValue:er["value-null-light"],undefinedValue:er["value-undefined-light"],stringValue:er["value-string-light"],booleanValue:er["value-boolean-light"],numberValue:er["value-number-light"],otherValue:er["value-other-light"],punctuation:er["punctuation-light"],collapseIcon:er["collapse-icon-light"],expandIcon:er["expand-icon-light"],collapsedContent:er["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:fN,stringifyStringValues:!1},uie={container:er["container-dark"],basicChildStyle:er["basic-element-style"],childFieldsContainer:er["child-fields-container"],label:er["label-dark"],clickableLabel:er["clickable-label-dark"],nullValue:er["value-null-dark"],undefinedValue:er["value-undefined-dark"],stringValue:er["value-string-dark"],booleanValue:er["value-boolean-dark"],numberValue:er["value-number-dark"],otherValue:er["value-other-dark"],punctuation:er["punctuation-dark"],collapseIcon:er["collapse-icon-dark"],expandIcon:er["expand-icon-dark"],collapsedContent:er["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:fN,stringifyStringValues:!1},die=()=>!0,hie=e=>{let{data:t,style:n=F1,shouldExpandNode:r=die,clickToExpandNode:i=!1,beforeExpandChange:o,compactTopLevel:s,...a}=e;const l=d.useRef(null);return d.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:l,role:"tree"}),s&&uN(t)?Object.entries(t).map(c=>{let[h,m]=c;return d.createElement(G_,{key:h,field:h,value:m,style:{...F1,...n},lastElement:!0,level:1,shouldExpandNode:r,clickToExpandNode:i,beforeExpandChange:o,outerRef:l})}):d.createElement(G_,{value:t,style:{...F1,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:l,beforeExpandChange:o}))},fie="_container_1h2lr_1",mie={container:fie},pie={...uie,container:"rjv-container"};class Xp extends te.Component{shouldComponentUpdate(t){return t.data!==this.props.data||t.defaultExpand!==this.props.defaultExpand||t.expandNode!==this.props.expandNode}render(){const{data:t,defaultExpand:n,expandNode:r}=this.props;if(t==null)return null;const i=typeof r=="function"?r:n==="all"?()=>!0:n==="root"?o=>o<2:o=>o<1;return S.jsx("div",{className:mie.container,children:S.jsx(hie,{data:t,shouldExpandNode:i,style:pie})})}}const gie="_tag_17wfp_1",vie="_tagActive_17wfp_22",bie="_tagLoading_17wfp_27",_ie="_spinner_17wfp_32",xm={tag:gie,tagActive:vie,tagLoading:bie,spinner:_ie};function yC({text:e,onTranslated:t}){const[n,r]=d.useState("idle"),i=d.useRef(null),o=d.useCallback(a=>{if(a.stopPropagation(),n==="loading")return;if(n==="done"){r("idle"),t==null||t(null);return}if(i.current){r("done"),t==null||t(i.current);return}r("loading");const l=window.location.port||"7008",c=`${window.location.protocol}//${window.location.hostname}:${l}`;fetch(`${c}/api/translate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,to:Oh()})}).then(h=>{if(!h.ok)throw new Error(`HTTP ${h.status}`);return h.json()}).then(h=>{const m=h.text||"";i.current=m,r("done"),t==null||t(m)}).catch(()=>{r("idle")})},[n,e,t]),s=me(n==="loading"?"ui.translating":"ui.translate");return S.jsxs("span",{className:`${xm.tag} ${n==="done"?xm.tagActive:""} ${n==="loading"?xm.tagLoading:""}`,onClick:o,children:[n==="loading"&&S.jsx("span",{className:xm.spinner}),s]})}const yie="_root_1bepf_1",Sie="_sidebar_1bepf_9",Cie="_section_1bepf_18",xie="_sectionHeader_1bepf_22",wie="_arrow_1bepf_38",Eie="_sectionTitle_1bepf_44",kie="_sectionCount_1bepf_52",$ie="_sectionBody_1bepf_61",Rie="_historyToggle_1bepf_66",Tie="_historyToggleLabel_1bepf_82",Nie="_item_1bepf_87",Oie="_itemActive_1bepf_103",Mie="_itemContent_1bepf_113",Iie="_itemLabel_1bepf_119",Pie="_itemSublabel_1bepf_127",Lie="_itemTime_1bepf_136",Aie="_content_1bepf_145",Bie="_contentEmpty_1bepf_153",Die="_contentInner_1bepf_160",zie="_emptyWrap_1bepf_164",jie="_roleHeader_1bepf_172",Fie="_roleBadge_1bepf_180",Hie="_role_user_1bepf_189",Wie="_role_assistant_1bepf_195",Vie="_roleLabel_1bepf_201",Kie="_contentTime_1bepf_208",Uie="_turnDivider_1bepf_216",qie="_textBlock_1bepf_223",Gie="_textBlockBar_1bepf_230",Xie="_textBlockBody_1bepf_239",Yie="_textBlockCompact_1bepf_247",Zie="_textBlockCompactFloat_1bepf_254",Qie="_thinkingBlock_1bepf_261",Jie="_thinkingHeader_1bepf_269",eoe="_thinkingPreview_1bepf_284",toe="_thinkingBody_1bepf_294",noe="_toolBlock_1bepf_300",roe="_toolBlockResult_1bepf_307",ioe="_toolBlockError_1bepf_311",ooe="_toolBlockHeader_1bepf_315",soe="_toolBlockBody_1bepf_326",aoe="_toolName_1bepf_331",loe="_toolId_1bepf_337",coe="_errorLabel_1bepf_344",uoe="_blockTag_1bepf_354",doe="_blockTagText_1bepf_367",hoe="_blockTagThinking_1bepf_373",foe="_blockTagResult_1bepf_379",moe="_blockTagError_1bepf_385",poe="_jsonBlock_1bepf_392",goe="_jsonBlockLabel_1bepf_399",voe="_blockSeparator_1bepf_409",boe="_markdownBody_1bepf_416",Pt={root:yie,sidebar:Sie,section:Cie,sectionHeader:xie,arrow:wie,sectionTitle:Eie,sectionCount:kie,sectionBody:$ie,historyToggle:Rie,historyToggleLabel:Tie,item:Nie,itemActive:Oie,itemContent:Mie,itemLabel:Iie,itemSublabel:Pie,itemTime:Lie,content:Aie,contentEmpty:Bie,contentInner:Die,emptyWrap:zie,roleHeader:jie,roleBadge:Fie,role_user:Hie,role_assistant:Wie,roleLabel:Vie,contentTime:Kie,turnDivider:Uie,textBlock:qie,textBlockBar:Gie,textBlockBody:Xie,textBlockCompact:Yie,textBlockCompactFloat:Zie,thinkingBlock:Qie,thinkingHeader:Jie,thinkingPreview:eoe,thinkingBody:toe,toolBlock:noe,toolBlockResult:roe,toolBlockError:ioe,toolBlockHeader:ooe,toolBlockBody:soe,toolName:aoe,toolId:loe,errorLabel:coe,blockTag:uoe,blockTagText:doe,blockTagThinking:hoe,blockTagResult:foe,blockTagError:moe,jsonBlock:poe,jsonBlockLabel:goe,blockSeparator:voe,markdownBody:boe},{Text:_oe}=ss;function X_(e){if(e==null)return[];if(typeof e=="string"){const t=e.trim();return t?[{type:"markdown",text:t}]:[]}if(Array.isArray(e)){const t=[];for(const n of e)if(n)if(n.type==="text"){const r=(n.text||"").trim();r&&t.push({type:"markdown",text:r})}else if(n.type==="tool_use")t.push({type:"tool_use",name:n.name||"unknown",id:n.id||"",input:n.input??{}});else if(n.type==="tool_result"){const r=yoe(n.content);t.push({type:"tool_result",tool_use_id:n.tool_use_id||"",is_error:n.is_error,content:r})}else if(n.type==="thinking"){const r=n.thinking||"";r.trim()&&t.push({type:"thinking",text:r})}else n.type==="image"?t.push({type:"json",label:"image",data:n}):t.push({type:"json",label:n.type||"block",data:n});return t}return[{type:"json",label:"content",data:e}]}function yoe(e){if(e==null)return[];if(typeof e=="string"){const t=e.trim();return t?[{type:"markdown",text:t}]:[]}return Array.isArray(e)?e.flatMap(t=>{if(!t)return[];if(t.type==="text"){const n=(t.text||"").trim();return n?[{type:"markdown",text:n}]:[]}return[{type:"json",label:t.type||"block",data:t}]}):[{type:"json",label:"content",data:e}]}function Soe(e){if(!e)return null;if(typeof e=="string")return[{type:"markdown",text:e}];if(Array.isArray(e)){const t=[];return e.forEach((n,r)=>{r>0&&t.push({type:"separator"}),n&&(typeof n=="string"?t.push({type:"markdown",text:n}):n.type==="text"?t.push({type:"markdown",text:n.text||""}):t.push({type:"json",label:n.type||"item",data:n}))}),t}return[{type:"json",label:"system",data:e}]}function Coe(e){const t=[],n=(e==null?void 0:e.name)||"unknown",r=(e==null?void 0:e.description)||"";let i=`### ${n}
|
|
494
494
|
|
|
495
495
|
`;r&&(i+=`${r}
|
|
@@ -499,7 +499,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error
|
|
|
499
499
|
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
500
500
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
501
501
|
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const hse=new dse;function mN(e,t,n){return hse.diff(e,t,n)}function fse(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
502
|
-
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const o=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}const mse="
|
|
502
|
+
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const o=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}const mse="_wrapper_xav1m_1",pse="_header_xav1m_9",gse="_headerRight_xav1m_16",vse="_filePath_xav1m_24",bse="_toggle_xav1m_30",_se="_diffSummary_xav1m_39",yse="_tableWrap_xav1m_44",Sse="_diffTable_xav1m_48",Cse="_lineNumOld_xav1m_61",xse="_lineNumNew_xav1m_62",wse="_prefix_xav1m_82",Ese="_lineContent_xav1m_94",kse="_rowContext_xav1m_98",$se="_rowDel_xav1m_110",Rse="_rowAdd_xav1m_125",Qi={wrapper:mse,header:pse,headerRight:gse,filePath:vse,toggle:bse,diffSummary:_se,tableWrap:yse,diffTable:Sse,lineNumOld:Cse,lineNumNew:xse,prefix:wse,lineContent:Ese,rowContext:kse,rowDel:$se,rowAdd:Rse},{Text:H1}=ss;function Tse(e,t,n){const r=mN(e,t),i=[];let o=n,s=n;for(const a of r){const l=a.value.replace(/\n$/,"").split(`
|
|
503
503
|
`);if(a.value!=="")for(const c of l)a.added?i.push({type:"add",oldNum:null,newNum:s++,text:c}):a.removed?i.push({type:"del",oldNum:o++,newNum:null,text:c}):i.push({type:"context",oldNum:o++,newNum:s++,text:c})}return i}function Nse({file_path:e,old_string:t,new_string:n,startLine:r=1}){const[i,o]=d.useState(!1),s=d.useMemo(()=>Tse(t,n,r),[t,n,r]),a=s.filter(p=>p.type==="add").length,l=s.filter(p=>p.type==="del").length,c=d.useMemo(()=>{let p=1;for(const g of s)g.oldNum!=null&&g.oldNum>p&&(p=g.oldNum),g.newNum!=null&&g.newNum>p&&(p=g.newNum);return p},[s]),m=String(c).length*8+10;return S.jsxs("div",{className:Qi.wrapper,children:[S.jsxs("div",{className:Qi.header,children:[S.jsxs(H1,{className:Qi.filePath,children:["Edit: ",e]}),S.jsxs("span",{className:Qi.headerRight,children:[S.jsx(H1,{className:Qi.diffSummary,children:me("ui.diffSummary",{added:a,removed:l})}),S.jsx(H1,{className:Qi.toggle,onClick:()=>o(p=>!p),children:me(i?"ui.expand":"ui.collapse")})]})]}),!i&&S.jsx("div",{className:Qi.tableWrap,children:S.jsx("table",{className:Qi.diffTable,style:{"--line-num-w":`${m}px`},children:S.jsx("tbody",{children:s.map((p,g)=>{const v=p.type==="del"?Qi.rowDel:p.type==="add"?Qi.rowAdd:Qi.rowContext,_=p.type==="del"?"-":p.type==="add"?"+":" ";return S.jsxs("tr",{className:v,children:[S.jsx("td",{className:Qi.lineNumOld,children:p.oldNum??""}),S.jsx("td",{className:Qi.lineNumNew,children:p.newNum??""}),S.jsx("td",{className:Qi.prefix,children:_}),S.jsx("td",{className:Qi.lineContent,children:p.text})]},g)})})})})]})}const Ose="_plainResult_1uh60_1",Mse="_plainTitle_1uh60_7",Ise="_plainPre_1uh60_11",Pse="_codeResult_1uh60_20",Lse="_codeHeader_1uh60_27",Ase="_codeTitle_1uh60_36",Bse="_codeToggle_1uh60_41",Dse="_codePre_1uh60_48",zse="_markdownBody_1uh60_57",Ji={plainResult:Ose,plainTitle:Mse,plainPre:Ise,codeResult:Pse,codeHeader:Lse,codeTitle:Ase,codeToggle:Bse,codePre:Dse,markdownBody:zse},{Text:Zc}=ss,Qc={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",css:"css",scss:"css",less:"css",html:"html",htm:"html",xml:"xml",svg:"xml",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",sh:"shell",bash:"shell",zsh:"shell",md:"markdown",sql:"sql"},jse=["Read","Grep","Glob","Bash","Write","Edit"];function Fse(e,t,n){if(!t)return null;const r=t.file_path||"";if(r){const i=r.split(".").pop().toLowerCase();if(Qc[i])return Qc[i]}if(e==="Bash")return"shell-output";if(e==="Glob")return"file-list";if(e==="Grep"){const i=t.glob||"";if(i){const o=i.replace(/[{}*]/g,",").split(",").filter(Boolean);for(const s of o){const a=s.replace(/^\./,"").toLowerCase();if(Qc[a])return Qc[a]}}if(t.output_mode==="files_with_matches"||!t.output_mode)return"file-list";if(t.output_mode==="content"&&n){const o=n.match(/^[\w/.~-]+\.([\w]+):\d+/m);if(o&&Qc[o[1].toLowerCase()])return Qc[o[1].toLowerCase()]}return"shell-output"}return n?Hse(n):null}function Hse(e){const t=e.substring(0,2e3);return/^\s*[\[{]/.test(t)&&/[}\]]\s*$/.test(t.trimEnd())?"json":/^\s*<!DOCTYPE|^\s*<html|^\s*<\?xml/i.test(t)?"html":/^#!.*python/m.test(t)||/\bdef\s+\w+\s*\(.*\)\s*:/m.test(t)||/\bclass\s+\w+.*:/m.test(t)||/^\s*(from\s+\w+\s+import|import\s+\w+)/m.test(t)&&/:$/.test(t)?"python":/\bfn\s+\w+\s*\(/.test(t)&&/\blet\s+(mut\s+)?\w+/.test(t)?"rust":/^package\s+\w+/m.test(t)&&/\bfunc\s+/.test(t)?"go":/\bpublic\s+(class|interface|static)\b/.test(t)?"java":/\bdef\s+\w+/.test(t)&&/\bend\b/.test(t)&&!/;/.test(t)?"ruby":/^#!.*\b(bash|sh|zsh)\b/m.test(t)?"shell":/\b(const|let|var)\s+\w+\s*=/.test(t)&&(/=>/.test(t)||/\brequire\s*\(/.test(t))||/^\s*import\s+.*\s+from\s+['"]/.test(t)||/^\s*export\s+(default\s+)?(function|class|const)\b/m.test(t)?"javascript":/[.#][\w-]+\s*\{[\s\S]*?:\s*[\w#]/.test(t)?"css":/^[\w-]+\s*:(\s+\S|$)/m.test(t)&&!/[{;]/.test(t)?"yaml":/\b(SELECT|INSERT|UPDATE|DELETE|CREATE\s+TABLE)\b/i.test(t)?"sql":null}const Wse={javascript:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(const|let|var|function|return|if|else|for|while|class|import|export|from|default|new|this|async|await|try|catch|throw|switch|case|break|continue|typeof|instanceof|in|of|null|undefined|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],typescript:null,python:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('''[\s\S]*?'''|"""[\s\S]*?"""|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|class|return|if|elif|else|for|while|import|from|as|try|except|finally|raise|with|yield|lambda|pass|break|continue|and|or|not|in|is|None|True|False|self|async|await)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],go:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`[^`]*`)/g,cls:"hl-string"},{pattern:/\b(func|return|if|else|for|range|switch|case|default|break|continue|go|defer|select|chan|map|struct|interface|package|import|var|const|type|nil|true|false|make|new|append|len|cap)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],rust:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(fn|let|mut|return|if|else|for|while|loop|match|struct|enum|impl|trait|pub|use|mod|crate|self|super|where|async|await|move|ref|true|false|Some|None|Ok|Err)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],java:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(public|private|protected|class|interface|extends|implements|return|if|else|for|while|switch|case|break|continue|new|this|super|static|final|void|int|long|double|float|boolean|char|String|import|package|try|catch|throw|throws|null|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*[fFdDlL]?)\b/g,cls:"hl-number"}],ruby:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|end|class|module|return|if|elsif|else|unless|for|while|do|begin|rescue|ensure|raise|yield|block_given\?|nil|true|false|self|require|include|attr_accessor|attr_reader)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],css:[{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/([.#][\w-]+)/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*(px|em|rem|%|vh|vw|s|ms)?)\b/g,cls:"hl-number"}],json:[{pattern:/("(?:[^"\\]|\\.)*")\s*:/g,cls:"hl-keyword"},{pattern:/:\s*("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(true|false|null)\b/g,cls:"hl-keyword"},{pattern:/\b(-?\d+\.?\d*([eE][+-]?\d+)?)\b/g,cls:"hl-number"}],shell:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(if|then|else|elif|fi|for|while|do|done|case|esac|function|return|exit|export|source|alias|cd|ls|grep|find|echo|cat|mkdir|rm|cp|mv|chmod|sudo|apt|npm|pip|git)\b/g,cls:"hl-keyword"}],sql:[{pattern:/(--.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/\b(SELECT|FROM|WHERE|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER|TABLE|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|IN|IS|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|SET|VALUES|INTO|DISTINCT|COUNT|SUM|AVG|MAX|MIN|LIKE|BETWEEN|EXISTS|CASE|WHEN|THEN|ELSE|END)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],html:[{pattern:/(<!--[\s\S]*?-->)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/(<\/?[\w-]+|\/?>)/g,cls:"hl-keyword"}],xml:null,yaml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*:/gm,cls:"hl-keyword"},{pattern:/\b(true|false|null|yes|no)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],markdown:[{pattern:/^(#{1,6}\s.*$)/gm,cls:"hl-keyword"},{pattern:/(`[^`]+`)/g,cls:"hl-string"},{pattern:/(\*\*[^*]+\*\*|__[^_]+__)/g,cls:"hl-keyword"},{pattern:/(\[[^\]]+\]\([^)]+\))/g,cls:"hl-string"}],toml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*=/gm,cls:"hl-keyword"},{pattern:/(\[[\w.-]+\])/g,cls:"hl-keyword"},{pattern:/\b(true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}]},Vse=[{pattern:/(\/\/.*$|#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],Kse=[{pattern:/^([\w/.~-]+:\d+[:-])/gm,cls:"hl-keyword"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],Use=[{pattern:/^(.*\.(jsx?|tsx?|mjs|cjs))$/gm,cls:"hl-string"},{pattern:/^(.*\.(py|rb|go|rs|java|c|cpp|h))$/gm,cls:"hl-keyword"},{pattern:/^(.*\.(json|ya?ml|toml|xml|html?|css|scss|less|md))$/gm,cls:"hl-number"},{pattern:/^(.*\.(log|txt|csv|jsonl))$/gm,cls:"hl-comment"}];function qse(e,t){let n=t;n==="typescript"&&(n="javascript"),n==="xml"&&(n="html"),(n==="c"||n==="cpp")&&(n="javascript");let r;n==="shell-output"?r=Kse:n==="file-list"?r=Use:r=Wse[n]||Vse;const i=/^(\s*\d+→)/gm,o=[];let s=e.replace(i,h=>{const m=o.length;return o.push(h),`L${m}`});const a=Fp(s),l=[];let c=a;for(const h of r)h.pattern.lastIndex=0,c=c.replace(h.pattern,m=>{const p=l.length;return l.push(`<span class="${h.cls}">${m}</span>`),`P${p}`});return c=c.replace(/\x02P(\d+)\x02/g,(h,m)=>l[parseInt(m)]),c=c.replace(/\x01L(\d+)\x01/g,(h,m)=>`<span class="hl-linenum">${Fp(o[parseInt(m)])}</span>`),c}function Y5({toolName:e,toolInput:t,resultText:n,defaultCollapsed:r}){const[i,o]=d.useState(r??!1);d.useEffect(()=>{o(r??!1)},[r]);const s=jse.includes(e),a=s?Fse(e,t,n):null,l=n.length>5e3?n.substring(0,5e3)+`
|
|
504
504
|
... (truncated)`:n;let c=e?me("ui.toolReturnNamed",{name:e}):"Result";if(t){const m=t.file_path||t.path||"";if(m){const p=m.split("/");c=`${e}: ${p[p.length-1]}`}}if(!s)return e==="Task"?S.jsxs("div",{className:Ji.plainResult,children:[S.jsxs("div",{className:Ji.codeHeader,children:[S.jsx(Zc,{type:"secondary",className:Ji.plainTitle,children:c}),S.jsx(Zc,{className:Ji.codeToggle,onClick:()=>o(m=>!m),children:me(i?"ui.expand":"ui.collapse")})]}),!i&&S.jsx("div",{className:`chat-md ${Ji.markdownBody}`,dangerouslySetInnerHTML:{__html:Cs(l)}})]}):S.jsxs("div",{className:Ji.plainResult,children:[S.jsxs("div",{className:Ji.codeHeader,children:[S.jsx(Zc,{type:"secondary",className:Ji.plainTitle,children:c}),S.jsx(Zc,{className:Ji.codeToggle,onClick:()=>o(m=>!m),children:me(i?"ui.expand":"ui.collapse")})]}),!i&&S.jsx("pre",{className:Ji.plainPre,children:l})]});const h=qse(l,a||"fallback");return S.jsxs("div",{className:`tool-result-code ${Ji.codeResult}`,children:[S.jsxs("div",{className:Ji.codeHeader,children:[S.jsxs(Zc,{className:Ji.codeTitle,children:[c,a?` (${a})`:""]}),S.jsx(Zc,{className:Ji.codeToggle,onClick:()=>o(m=>!m),children:me(i?"ui.expand":"ui.collapse")})]}),!i&&S.jsx("pre",{className:`code-highlight ${Ji.codePre}`,dangerouslySetInnerHTML:{__html:h}})]})}const Gse="_avatar_w9l4s_3",Xse="_avatarImg_w9l4s_13",Yse="_messageRow_w9l4s_32",Zse="_messageRowEnd_w9l4s_38",Qse="_contentCol_w9l4s_47",Jse="_contentColLimited_w9l4s_52",eae="_labelRow_w9l4s_60",tae="_labelRowEnd_w9l4s_67",nae="_labelRight_w9l4s_74",rae="_labelText_w9l4s_82",iae="_timeText_w9l4s_86",oae="_timeTextNoMargin_w9l4s_92",sae="_labelTextRight_w9l4s_98",aae="_bubbleUser_w9l4s_105 _bubble_w9l4s_21",lae="_bubbleAssistant_w9l4s_111 _bubble_w9l4s_21",cae="_bubbleHighlight_w9l4s_119",uae="_bubbleHighlightFading_w9l4s_123",dae="_borderSvg_w9l4s_128",hae="_borderSvgFading_w9l4s_137",fae="_borderRect_w9l4s_142",mae="_bubblePlan_w9l4s_151 _bubble_w9l4s_21",pae="_bubbleSubAgent_w9l4s_159 _bubble_w9l4s_21",gae="_bubbleSelection_w9l4s_165 _bubble_w9l4s_21",vae="_systemTagLabel_w9l4s_173",bae="_skillLabel_w9l4s_177",_ae="_systemTagPre_w9l4s_182",yae="_collapseMargin_w9l4s_190",Sae="_collapseNoMargin_w9l4s_194",Cae="_thinkingLabel_w9l4s_200",xae="_toolBox_w9l4s_206",wae="_toolLabel_w9l4s_215",Eae="_codePre_w9l4s_221",kae="_pathTag_w9l4s_233",$ae="_descSpan_w9l4s_240",Rae="_secondarySpan_w9l4s_245",Tae="_patternSpan_w9l4s_249",Nae="_kvContainer_w9l4s_255",Oae="_kvItem_w9l4s_260",Mae="_kvKey_w9l4s_264",Iae="_kvValue_w9l4s_268",Pae="_toolResult_w9l4s_274",Lae="_toolResultLabel_w9l4s_283",Aae="_compactLabel_w9l4s_289",Bae="_compactPre_w9l4s_294",Dae="_viewRequestBtn_w9l4s_304",zae="_optionList_w9l4s_318",jae="_optionDesc_w9l4s_322",Fae="_questionText_w9l4s_330",Hae="_questionSpacing_w9l4s_336",Wae="_option_w9l4s_318",Vae="_askQuestionBox_w9l4s_349",Kae="_askQuestionHeader_w9l4s_358",Uae="_askQuestionText_w9l4s_369",qae="_askOptionItem_w9l4s_375",Gae="_planModeBox_w9l4s_383",Xae="_planModeLabel_w9l4s_392",Yae="_planModePermissions_w9l4s_397",Zae="_planModePermLabel_w9l4s_403",at={avatar:Gse,avatarImg:Xse,messageRow:Yse,messageRowEnd:Zse,contentCol:Qse,contentColLimited:Jse,labelRow:eae,labelRowEnd:tae,labelRight:nae,labelText:rae,timeText:iae,timeTextNoMargin:oae,labelTextRight:sae,bubbleUser:aae,bubbleAssistant:lae,bubbleHighlight:cae,bubbleHighlightFading:uae,borderSvg:dae,borderSvgFading:hae,borderRect:fae,bubblePlan:mae,bubbleSubAgent:pae,bubbleSelection:gae,systemTagLabel:vae,skillLabel:bae,systemTagPre:_ae,collapseMargin:yae,collapseNoMargin:Sae,thinkingLabel:Cae,toolBox:xae,toolLabel:wae,codePre:Eae,pathTag:kae,descSpan:$ae,secondarySpan:Rae,patternSpan:Tae,kvContainer:Nae,kvItem:Oae,kvKey:Mae,kvValue:Iae,toolResult:Pae,toolResultLabel:Lae,compactLabel:Aae,compactPre:Bae,viewRequestBtn:Dae,optionList:zae,optionDesc:jae,questionText:Fae,questionSpacing:Hae,option:Wae,askQuestionBox:Vae,askQuestionHeader:Kae,askQuestionText:Uae,askOptionItem:qae,planModeBox:Gae,planModeLabel:Xae,planModePermissions:Yae,planModePermLabel:Zae},{Text:_o}=ss;class ps extends te.Component{constructor(n){super(n);It(this,"handleThinkingTranslated",(n,r)=>{this.setState(i=>({thinkingTranslated:{...i.thinkingTranslated,[n]:r?Cs(r):null}}))});this.state={thinkingTranslated:{}}}formatTime(n){if(!n)return null;try{const r=new Date(n),i=o=>String(o).padStart(2,"0");return`${i(r.getMonth()+1)}-${i(r.getDate())} ${i(r.getHours())}:${i(r.getMinutes())}:${i(r.getSeconds())}`}catch{return null}}renderViewRequestBtn(){const{requestIndex:n,onViewRequest:r}=this.props;return n==null||!r?null:S.jsx("span",{className:at.viewRequestBtn,onClick:i=>{i.stopPropagation(),r(n)},children:me("ui.viewRequest")})}renderLabel(n,r){const{timestamp:i}=this.props,o=this.formatTime(i);return S.jsxs("div",{className:at.labelRow,children:[S.jsxs(_o,{type:"secondary",className:at.labelText,children:[n,r||""]}),S.jsxs("span",{className:at.labelRight,children:[this.renderViewRequestBtn(),o&&S.jsx(_o,{className:at.timeText,children:o})]})]})}renderUserAvatar(n){const{userProfile:r}=this.props;return r!=null&&r.avatar?S.jsx("img",{src:r.avatar,className:at.avatarImg,alt:r.name||"User"}):S.jsx("div",{className:at.avatar,style:{background:n},dangerouslySetInnerHTML:{__html:su("user")}})}getUserName(){const{userProfile:n}=this.props;return(n==null?void 0:n.name)||"User"}renderSegments(n){return n.map((r,i)=>r.type==="system-tag"?S.jsx(Gd,{ghost:!0,size:"small",items:[{key:"1",label:S.jsx(_o,{type:"secondary",className:at.systemTagLabel,children:r.tag}),children:S.jsx("pre",{className:at.systemTagPre,children:r.content})}],className:at.collapseMargin},i):S.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:Cs(r.content)}},i))}renderToolCall(n){if(typeof n.input=="string")try{const h=n.input.replace(/^\[object Object\]/,"");n={...n,input:JSON.parse(h)}}catch{}if(n.name==="Edit"&&n.input&&n.input.old_string!=null&&n.input.new_string!=null){const h=this.props.editSnapshotMap||{},m=n.input.file_path||"";let p=1;const g=h[n.id];if(g&&n.input.old_string){const v=g.plainText.indexOf(n.input.old_string);if(v>=0){const b=g.plainText.substring(0,v).split(`
|
|
505
505
|
`).length-1;p=g.lineNums[b]??b+1}}return S.jsx(Nse,{file_path:m,old_string:n.input.old_string,new_string:n.input.new_string,startLine:p},n.id)}const r=n.input&&typeof n.input=="object"?n.input:{},i=(h,m)=>S.jsxs("div",{className:at.toolBox,children:[S.jsx(_o,{strong:!0,className:at.toolLabel,children:h}),m]},n.id),o=(h,m)=>S.jsx("pre",{className:at.codePre,style:{color:m},children:h}),s=h=>S.jsx("span",{className:at.pathTag,children:h});if(n.name==="Bash"){const h=r.command||"",m=r.description||"";return i(S.jsxs(S.Fragment,{children:["Bash",m?S.jsxs("span",{className:at.descSpan,children:[" — ",m]}):""]}),o(h,"#c9d1d9"))}if(n.name==="Read"){const h=r.file_path||"",m=[];r.offset&&m.push(`offset: ${r.offset}`),r.limit&&m.push(`limit: ${r.limit}`);const p=m.length?` (${m.join(", ")})`:"";return i(S.jsxs(S.Fragment,{children:["Read: ",s(h),S.jsx("span",{className:at.secondarySpan,children:p})]}),null)}if(n.name==="Write"){const h=r.file_path||"",m=r.content||"",p=m.split(`
|
|
@@ -644,7 +644,7 @@ void main() {
|
|
|
644
644
|
|
|
645
645
|
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},tfe=new efe;function pb(e){nfe(e)||tfe.onUnexpectedError(e)}var jy="Canceled";function nfe(e){return e instanceof rfe?!0:e instanceof Error&&e.name===jy&&e.message===jy}var rfe=class extends Error{constructor(){super(jy),this.name=this.message}},bk=class Fy extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Fy)return t;let n=new Fy;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function ife(e,t){let n=this,r=!1,i;return function(){return r||(r=!0,t||(i=e.apply(n,arguments))),i}}var ofe;(e=>{function t(o){return o<0}e.isLessThan=t;function n(o){return o<=0}e.isLessThanOrEqual=n;function r(o){return o>0}e.isGreaterThan=r;function i(o){return o===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(ofe||(ofe={}));var OO;(e=>{function t(k){return k&&typeof k=="object"&&typeof k[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(k){yield k}e.single=i;function o(k){return t(k)?k:i(k)}e.wrap=o;function s(k){return k||n}e.from=s;function*a(k){for(let $=k.length-1;$>=0;$--)yield k[$]}e.reverse=a;function l(k){return!k||k[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(k){return k[Symbol.iterator]().next().value}e.first=c;function h(k,$){let R=0;for(let I of k)if($(I,R++))return!0;return!1}e.some=h;function m(k,$){for(let R of k)if($(R))return R}e.find=m;function*p(k,$){for(let R of k)$(R)&&(yield R)}e.filter=p;function*g(k,$){let R=0;for(let I of k)yield $(I,R++)}e.map=g;function*v(k,$){let R=0;for(let I of k)yield*$(I,R++)}e.flatMap=v;function*_(...k){for(let $ of k)yield*$}e.concat=_;function b(k,$,R){let I=R;for(let P of k)I=$(I,P);return I}e.reduce=b;function*C(k,$,R=k.length){for($<0&&($+=k.length),R<0?R+=k.length:R>k.length&&(R=k.length);$<R;$++)yield k[$]}e.slice=C;function x(k,$=Number.POSITIVE_INFINITY){let R=[];if($===0)return[R,k];let I=k[Symbol.iterator]();for(let P=0;P<$;P++){let M=I.next();if(M.done)return[R,e.empty()];R.push(M.value)}return[R,{[Symbol.iterator](){return I}}]}e.consume=x;async function w(k){let $=[];for await(let R of k)$.push(R);return Promise.resolve($)}e.asyncToArray=w})(OO||(OO={}));function MO(e){if(OO.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function sfe(...e){return IO(()=>MO(e))}function IO(e){return{dispose:ife(()=>{e()})}}var PO=class LO{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{MO(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?LO.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};PO.DISABLE_DISPOSED_WARNING=!1;var PC=PO,ig=class{constructor(){this._store=new PC,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ig.None=Object.freeze({dispose(){}});var afe=globalThis.performance&&typeof globalThis.performance.now=="function",lfe=class AO{static create(t){return new AO(t)}constructor(t){this._now=afe&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},cfe;(e=>{e.None=()=>ig.None;function t(T,O){return m(T,()=>{},0,void 0,!0,void 0,O)}e.defer=t;function n(T){return(O,N=null,A)=>{let B=!1,D;return D=T(j=>{if(!B)return D?D.dispose():B=!0,O.call(N,j)},null,A),B&&D.dispose(),D}}e.once=n;function r(T,O,N){return c((A,B=null,D)=>T(j=>A.call(B,O(j)),null,D),N)}e.map=r;function i(T,O,N){return c((A,B=null,D)=>T(j=>{O(j),A.call(B,j)},null,D),N)}e.forEach=i;function o(T,O,N){return c((A,B=null,D)=>T(j=>O(j)&&A.call(B,j),null,D),N)}e.filter=o;function s(T){return T}e.signal=s;function a(...T){return(O,N=null,A)=>{let B=sfe(...T.map(D=>D(j=>O.call(N,j))));return h(B,A)}}e.any=a;function l(T,O,N,A){let B=N;return r(T,D=>(B=O(B,D),B),A)}e.reduce=l;function c(T,O){let N,A={onWillAddFirstListener(){N=T(B.fire,B)},onDidRemoveLastListener(){N==null||N.dispose()}},B=new il(A);return O==null||O.add(B),B.event}function h(T,O){return O instanceof Array?O.push(T):O&&O.add(T),T}function m(T,O,N=100,A=!1,B=!1,D,j){let W,K,V,U=0,q,Y={leakWarningThreshold:D,onWillAddFirstListener(){W=T(ee=>{U++,K=O(K,ee),A&&!V&&(Z.fire(K),K=void 0),q=()=>{let se=K;K=void 0,V=void 0,(!A||U>1)&&Z.fire(se),U=0},typeof N=="number"?(clearTimeout(V),V=setTimeout(q,N)):V===void 0&&(V=0,queueMicrotask(q))})},onWillRemoveListener(){B&&U>0&&(q==null||q())},onDidRemoveLastListener(){q=void 0,W.dispose()}},Z=new il(Y);return j==null||j.add(Z),Z.event}e.debounce=m;function p(T,O=0,N){return e.debounce(T,(A,B)=>A?(A.push(B),A):[B],O,void 0,!0,void 0,N)}e.accumulate=p;function g(T,O=(A,B)=>A===B,N){let A=!0,B;return o(T,D=>{let j=A||!O(D,B);return A=!1,B=D,j},N)}e.latch=g;function v(T,O,N){return[e.filter(T,O,N),e.filter(T,A=>!O(A),N)]}e.split=v;function _(T,O=!1,N=[],A){let B=N.slice(),D=T(K=>{B?B.push(K):W.fire(K)});A&&A.add(D);let j=()=>{B==null||B.forEach(K=>W.fire(K)),B=null},W=new il({onWillAddFirstListener(){D||(D=T(K=>W.fire(K)),A&&A.add(D))},onDidAddFirstListener(){B&&(O?setTimeout(j):j())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return A&&A.add(W),W.event}e.buffer=_;function b(T,O){return(N,A,B)=>{let D=O(new x);return T(function(j){let W=D.evaluate(j);W!==C&&N.call(A,W)},void 0,B)}}e.chain=b;let C=Symbol("HaltChainable");class x{constructor(){this.steps=[]}map(O){return this.steps.push(O),this}forEach(O){return this.steps.push(N=>(O(N),N)),this}filter(O){return this.steps.push(N=>O(N)?N:C),this}reduce(O,N){let A=N;return this.steps.push(B=>(A=O(A,B),A)),this}latch(O=(N,A)=>N===A){let N=!0,A;return this.steps.push(B=>{let D=N||!O(B,A);return N=!1,A=B,D?B:C}),this}evaluate(O){for(let N of this.steps)if(O=N(O),O===C)break;return O}}function w(T,O,N=A=>A){let A=(...W)=>j.fire(N(...W)),B=()=>T.on(O,A),D=()=>T.removeListener(O,A),j=new il({onWillAddFirstListener:B,onDidRemoveLastListener:D});return j.event}e.fromNodeEventEmitter=w;function k(T,O,N=A=>A){let A=(...W)=>j.fire(N(...W)),B=()=>T.addEventListener(O,A),D=()=>T.removeEventListener(O,A),j=new il({onWillAddFirstListener:B,onDidRemoveLastListener:D});return j.event}e.fromDOMEventEmitter=k;function $(T){return new Promise(O=>n(T)(O))}e.toPromise=$;function R(T){let O=new il;return T.then(N=>{O.fire(N)},()=>{O.fire(void 0)}).finally(()=>{O.dispose()}),O.event}e.fromPromise=R;function I(T,O){return T(N=>O.fire(N))}e.forward=I;function P(T,O,N){return O(N),T(A=>O(A))}e.runAndSubscribe=P;class M{constructor(O,N){this._observable=O,this._counter=0,this._hasChanged=!1;let A={onWillAddFirstListener:()=>{O.addObserver(this)},onDidRemoveLastListener:()=>{O.removeObserver(this)}};this.emitter=new il(A),N&&N.add(this.emitter)}beginUpdate(O){this._counter++}handlePossibleChange(O){}handleChange(O,N){this._hasChanged=!0}endUpdate(O){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function z(T,O){return new M(T,O).emitter.event}e.fromObservable=z;function F(T){return(O,N,A)=>{let B=0,D=!1,j={beginUpdate(){B++},endUpdate(){B--,B===0&&(T.reportChanges(),D&&(D=!1,O.call(N)))},handlePossibleChange(){},handleChange(){D=!0}};T.addObserver(j),T.reportChanges();let W={dispose(){T.removeObserver(j)}};return A instanceof PC?A.add(W):Array.isArray(A)&&A.push(W),W}}e.fromObservableLight=F})(cfe||(cfe={}));var Hy=class Wy{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Wy._idPool++}`,Wy.all.add(this)}start(t){this._stopWatch=new lfe,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Hy.all=new Set,Hy._idPool=0;var ufe=Hy,dfe=-1,BO=class DO{constructor(t,n,r=(DO._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,n){let r=this.threshold;if(r<=0||n<r)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let[o,s]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${s}):`;console.warn(a),console.warn(o);let l=new mfe(a,o);this._errorHandler(l)}return()=>{let o=this._stacks.get(t.value)||0;this._stacks.set(t.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[r,i]of this._stacks)(!t||n<i)&&(t=[r,i],n=i);return t}};BO._idPool=1;var hfe=BO,ffe=class zO{constructor(t){this.value=t}static create(){let t=new Error;return new zO(t.stack??"")}print(){console.warn(this.value.split(`
|
|
646
646
|
`).slice(2).join(`
|
|
647
|
-
`))}},mfe=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},pfe=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},gfe=0,gb=class{constructor(e){this.value=e,this.id=gfe++}},vfe=2,bfe,il=class{constructor(e){var t,n,r,i;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new hfe((e==null?void 0:e.onListenerError)??pb,((n=this._options)==null?void 0:n.leakWarningThreshold)??dfe):void 0,this._perfMon=(r=this._options)!=null&&r._profName?new ufe(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var e,t,n,r;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(n=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||n.call(t),(r=this._leakageMon)==null||r.dispose())}get event(){return this._event??(this._event=(e,t,n)=>{var s,a,l,c,h;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let m=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(m);let p=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],g=new pfe(`${m}. HINT: Stack shows most frequent listener (${p[1]}-times)`,p[0]);return(((s=this._options)==null?void 0:s.onListenerError)||pb)(g),ig.None}if(this._disposed)return ig.None;t&&(e=e.bind(t));let r=new gb(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=ffe.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof gb?(this._deliveryQueue??(this._deliveryQueue=new _fe),this._listeners=[this._listeners,r]):this._listeners.push(r):((l=(a=this._options)==null?void 0:a.onWillAddFirstListener)==null||l.call(a,this),this._listeners=r,(h=(c=this._options)==null?void 0:c.onDidAddFirstListener)==null||h.call(c,this)),this._size++;let o=IO(()=>{i==null||i(),this._removeListener(r)});return n instanceof PC?n.add(o):Array.isArray(n)&&n.push(o),o}),this._event}_removeListener(e){var i,o,s,a;if((o=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||o.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(a=(s=this._options)==null?void 0:s.onDidRemoveLastListener)==null||a.call(s,this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*vfe<=t.length){let l=0;for(let c=0;c<t.length;c++)t[c]?t[l++]=t[c]:r&&(this._deliveryQueue.end--,l<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=l}}_deliver(e,t){var r;if(!e)return;let n=((r=this._options)==null?void 0:r.onListenerError)||pb;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,n,r,i;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(n=this._perfMon)==null||n.stop()),(r=this._perfMon)==null||r.start(this._size),this._listeners)if(this._listeners instanceof gb)this._deliver(this._listeners,e);else{let o=this._deliveryQueue;o.enqueue(this,e,this._listeners.length),this._deliverQueue(o)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}},_fe=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},og=class fp{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new il,this.onChange=this._onChange.event;let t=new Jhe;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,n,r=!1){return(t&16777215)<<3|(n&3)<<1|(r?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let o=0;o<i;++o){let s=t.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=i)return n+this.wcwidth(s);let c=t.charCodeAt(o);56320<=c&&c<=57343?s=(s-55296)*1024+c-56320+65536:n+=this.wcwidth(c)}let a=this.charProperties(s,r),l=fp.extractWidth(a);fp.extractShouldJoin(a)&&(l-=fp.extractWidth(r)),n+=l,r=a}return n}charProperties(t,n){return this._activeProvider.charProperties(t,n)}},vb=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],yfe=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],bb=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],Sfe=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],ba;function _k(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var Cfe=class{constructor(){if(this.version="11",!ba){ba=new Uint8Array(65536),ba.fill(1),ba[0]=0,ba.fill(0,1,32),ba.fill(0,127,160);for(let e=0;e<vb.length;++e)ba.fill(0,vb[e][0],vb[e][1]+1);for(let e=0;e<bb.length;++e)ba.fill(2,bb[e][0],bb[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?ba[e]:_k(e,yfe)?0:_k(e,Sfe)?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let i=og.extractWidth(t);i===0?r=!1:i>n&&(n=i)}return og.createPropertyValue(0,n,r)}},xfe=class{activate(e){e.unicode.register(new Cfe)}dispose(){}};const wfe="_terminalPanel_jipsg_1",Efe="_terminalContainer_jipsg_8",kfe="_virtualKeybar_jipsg_16",$fe="_virtualKey_jipsg_16",Rfe="_virtualKeyPressed_jipsg_47",ru={terminalPanel:wfe,terminalContainer:Efe,virtualKeybar:kfe,virtualKey:$fe,virtualKeyPressed:Rfe},Tfe=[{label:"↑",seq:"\x1B[A"},{label:"↓",seq:"\x1B[B"},{label:"←",seq:"\x1B[D"},{label:"→",seq:"\x1B[C"},{label:"Enter",seq:"\r"},{label:"Tab",seq:" "},{label:"Esc",seq:"\x1B"},{label:"Ctrl+C",seq:""}];class jO extends te.Component{constructor(n){super(n);It(this,"handleVirtualKey",n=>{var r;this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:n})),oi||(r=this.terminal)==null||r.focus()});It(this,"_vkTouchStart",n=>{const r=n.touches[0];this._vkStartX=r.clientX,this._vkStartY=r.clientY,this._vkMoved=!1,this._vkTarget=n.currentTarget,this._vkTarget.classList.add(ru.virtualKeyPressed)});It(this,"_vkTouchMove",n=>{if(this._vkMoved)return;const r=n.touches[0],i=r.clientX-this._vkStartX,o=r.clientY-this._vkStartY;i*i+o*o>64&&(this._vkMoved=!0)});It(this,"_vkTouchEnd",(n,r)=>{var i;r.preventDefault(),(i=this._vkTarget)==null||i.classList.remove(ru.virtualKeyPressed),this._vkTarget=null,this._vkMoved||this.handleVirtualKey(n)});this.containerRef=te.createRef(),this.terminal=null,this.fitAddon=null,this.ws=null,this.resizeObserver=null}componentDidMount(){this.initTerminal(),this.connectWebSocket(),this.setupResizeObserver()}componentWillUnmount(){this._stopMobileMomentum&&this._stopMobileMomentum(),this._writeTimer&&cancelAnimationFrame(this._writeTimer),this.ws&&(this.ws.close(),this.ws=null),this._resizeDebounceTimer&&clearTimeout(this._resizeDebounceTimer),this._webglRecoveryTimer&&clearTimeout(this._webglRecoveryTimer),this.resizeObserver&&this.resizeObserver.disconnect(),this.webglAddon&&(this.webglAddon.dispose(),this.webglAddon=null),this.terminal&&this.terminal.dispose()}initTerminal(){this.terminal=new sde({cursorBlink:!oi,fontSize:oi?11:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:"#0a0a0a",foreground:"#d4d4d4",cursor:"#d4d4d4",selectionBackground:"#264f78"},allowProposedApi:!0,scrollback:oi?2e3:5e3,smoothScrollDuration:0,scrollOnUserInput:!0}),this.fitAddon=new cde,this.terminal.loadAddon(this.fitAddon),this.terminal.loadAddon(new Yhe);const n=new xfe;this.terminal.loadAddon(n),this.terminal.unicode.activeVersion="11",this.terminal.open(this.containerRef.current),this._loadWebglAddon(!1),this._writeBuffer="",this._writeTimer=null,requestAnimationFrame(oi?()=>{this._mobileFixedResize()}:()=>{this.fitAddon.fit(),this.terminal.focus()}),this.terminal.onData(r=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:r}))}),oi&&this._setupMobileTouchScroll()}_setupMobileTouchScroll(){var v;const n=(v=this.containerRef.current)==null?void 0:v.querySelector(".xterm-screen");if(!n)return;const r=this.terminal,i=()=>{var b,C,x,w;const _=(w=(x=(C=(b=r._core)==null?void 0:b._renderService)==null?void 0:C.dimensions)==null?void 0:x.css)==null?void 0:w.cell;return(_==null?void 0:_.height)||15};let o=0,s=0,a=null,l=0,c=0,h=null,m=[];const p=()=>{a&&(cancelAnimationFrame(a),a=null),h&&(cancelAnimationFrame(h),h=null),c=0,l=0},g=()=>{if(h=null,c===0)return;l+=c,c=0;const _=i(),b=Math.trunc(l/_);b!==0&&(r.scrollLines(b),l-=b*_)};n.addEventListener("touchstart",_=>{p(),_.touches.length===1&&(o=_.touches[0].clientY,s=performance.now(),m=[])},{passive:!0}),n.addEventListener("touchmove",_=>{if(_.touches.length!==1)return;const b=_.touches[0].clientY,C=performance.now(),x=C-s,w=o-b;if(x>0){const k=w/x*16;for(m.push({v:k,t:C});m.length>0&&C-m[0].t>100;)m.shift()}c+=w,h||(h=requestAnimationFrame(g)),o=b,s=C},{passive:!0}),n.addEventListener("touchend",()=>{if(h&&(cancelAnimationFrame(h),h=null),c!==0){l+=c,c=0;const w=i(),k=Math.trunc(l/w);k!==0&&r.scrollLines(k),l=0}let _=0;if(m.length>=2){let w=0,k=0;const $=m[m.length-1].t;for(const R of m){const I=Math.max(0,1-($-R.t)/100);k+=R.v*I,w+=I}_=w>0?k/w:0}if(m=[],Math.abs(_)<.5)return;const b=.95;let C=0;const x=()=>{if(Math.abs(_)<.3){const $=i(),R=Math.round(C/$);R!==0&&r.scrollLines(R),a=null;return}C+=_;const w=i(),k=Math.trunc(C/w);k!==0&&(r.scrollLines(k),C-=k*w),_*=b,a=requestAnimationFrame(x)};a=requestAnimationFrame(x)},{passive:!0}),this._stopMobileMomentum=p}connectWebSocket(){const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this.ws=new WebSocket(r),this.ws.onmessage=i=>{try{const o=JSON.parse(i.data);o.type==="data"?this._throttledWrite(o.data):o.type==="exit"?(this._flushWrite(),this.terminal.write(`\r
|
|
647
|
+
`))}},mfe=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},pfe=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},gfe=0,gb=class{constructor(e){this.value=e,this.id=gfe++}},vfe=2,bfe,il=class{constructor(e){var t,n,r,i;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new hfe((e==null?void 0:e.onListenerError)??pb,((n=this._options)==null?void 0:n.leakWarningThreshold)??dfe):void 0,this._perfMon=(r=this._options)!=null&&r._profName?new ufe(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var e,t,n,r;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(n=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||n.call(t),(r=this._leakageMon)==null||r.dispose())}get event(){return this._event??(this._event=(e,t,n)=>{var s,a,l,c,h;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let m=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(m);let p=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],g=new pfe(`${m}. HINT: Stack shows most frequent listener (${p[1]}-times)`,p[0]);return(((s=this._options)==null?void 0:s.onListenerError)||pb)(g),ig.None}if(this._disposed)return ig.None;t&&(e=e.bind(t));let r=new gb(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=ffe.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof gb?(this._deliveryQueue??(this._deliveryQueue=new _fe),this._listeners=[this._listeners,r]):this._listeners.push(r):((l=(a=this._options)==null?void 0:a.onWillAddFirstListener)==null||l.call(a,this),this._listeners=r,(h=(c=this._options)==null?void 0:c.onDidAddFirstListener)==null||h.call(c,this)),this._size++;let o=IO(()=>{i==null||i(),this._removeListener(r)});return n instanceof PC?n.add(o):Array.isArray(n)&&n.push(o),o}),this._event}_removeListener(e){var i,o,s,a;if((o=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||o.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(a=(s=this._options)==null?void 0:s.onDidRemoveLastListener)==null||a.call(s,this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*vfe<=t.length){let l=0;for(let c=0;c<t.length;c++)t[c]?t[l++]=t[c]:r&&(this._deliveryQueue.end--,l<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=l}}_deliver(e,t){var r;if(!e)return;let n=((r=this._options)==null?void 0:r.onListenerError)||pb;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,n,r,i;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(n=this._perfMon)==null||n.stop()),(r=this._perfMon)==null||r.start(this._size),this._listeners)if(this._listeners instanceof gb)this._deliver(this._listeners,e);else{let o=this._deliveryQueue;o.enqueue(this,e,this._listeners.length),this._deliverQueue(o)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}},_fe=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},og=class fp{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new il,this.onChange=this._onChange.event;let t=new Jhe;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,n,r=!1){return(t&16777215)<<3|(n&3)<<1|(r?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let o=0;o<i;++o){let s=t.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=i)return n+this.wcwidth(s);let c=t.charCodeAt(o);56320<=c&&c<=57343?s=(s-55296)*1024+c-56320+65536:n+=this.wcwidth(c)}let a=this.charProperties(s,r),l=fp.extractWidth(a);fp.extractShouldJoin(a)&&(l-=fp.extractWidth(r)),n+=l,r=a}return n}charProperties(t,n){return this._activeProvider.charProperties(t,n)}},vb=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],yfe=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],bb=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],Sfe=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],ba;function _k(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var Cfe=class{constructor(){if(this.version="11",!ba){ba=new Uint8Array(65536),ba.fill(1),ba[0]=0,ba.fill(0,1,32),ba.fill(0,127,160);for(let e=0;e<vb.length;++e)ba.fill(0,vb[e][0],vb[e][1]+1);for(let e=0;e<bb.length;++e)ba.fill(2,bb[e][0],bb[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?ba[e]:_k(e,yfe)?0:_k(e,Sfe)?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let i=og.extractWidth(t);i===0?r=!1:i>n&&(n=i)}return og.createPropertyValue(0,n,r)}},xfe=class{activate(e){e.unicode.register(new Cfe)}dispose(){}};const wfe="_terminalPanel_jipsg_1",Efe="_terminalContainer_jipsg_8",kfe="_virtualKeybar_jipsg_16",$fe="_virtualKey_jipsg_16",Rfe="_virtualKeyPressed_jipsg_47",ru={terminalPanel:wfe,terminalContainer:Efe,virtualKeybar:kfe,virtualKey:$fe,virtualKeyPressed:Rfe},Tfe=[{label:"↑",seq:"\x1B[A"},{label:"↓",seq:"\x1B[B"},{label:"←",seq:"\x1B[D"},{label:"→",seq:"\x1B[C"},{label:"Enter",seq:"\r"},{label:"Tab",seq:" "},{label:"Esc",seq:"\x1B"},{label:"Ctrl+C",seq:""}];class jO extends te.Component{constructor(n){super(n);It(this,"handleVirtualKey",n=>{var r,i;if(this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:n})),oi){const o=(r=this.containerRef.current)==null?void 0:r.querySelector(".xterm-helper-textarea");o&&o.blur()}else(i=this.terminal)==null||i.focus()});It(this,"_vkTouchStart",n=>{n.preventDefault();const r=n.touches[0];this._vkStartX=r.clientX,this._vkStartY=r.clientY,this._vkMoved=!1,this._vkTarget=n.currentTarget,this._vkTarget.classList.add(ru.virtualKeyPressed)});It(this,"_vkTouchMove",n=>{if(this._vkMoved)return;const r=n.touches[0],i=r.clientX-this._vkStartX,o=r.clientY-this._vkStartY;i*i+o*o>64&&(this._vkMoved=!0)});It(this,"_vkTouchEnd",(n,r)=>{var i;r.preventDefault(),(i=this._vkTarget)==null||i.classList.remove(ru.virtualKeyPressed),this._vkTarget=null,this._vkMoved||this.handleVirtualKey(n)});this.containerRef=te.createRef(),this.terminal=null,this.fitAddon=null,this.ws=null,this.resizeObserver=null}componentDidMount(){this.initTerminal(),this.connectWebSocket(),this.setupResizeObserver()}componentWillUnmount(){this._stopMobileMomentum&&this._stopMobileMomentum(),this._writeTimer&&cancelAnimationFrame(this._writeTimer),this.ws&&(this.ws.close(),this.ws=null),this._resizeDebounceTimer&&clearTimeout(this._resizeDebounceTimer),this._webglRecoveryTimer&&clearTimeout(this._webglRecoveryTimer),this.resizeObserver&&this.resizeObserver.disconnect(),this.webglAddon&&(this.webglAddon.dispose(),this.webglAddon=null),this.terminal&&this.terminal.dispose()}initTerminal(){this.terminal=new sde({cursorBlink:!oi,fontSize:oi?11:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:"#0a0a0a",foreground:"#d4d4d4",cursor:"#d4d4d4",selectionBackground:"#264f78"},allowProposedApi:!0,scrollback:oi?2e3:5e3,smoothScrollDuration:0,scrollOnUserInput:!0}),this.fitAddon=new cde,this.terminal.loadAddon(this.fitAddon),this.terminal.loadAddon(new Yhe);const n=new xfe;this.terminal.loadAddon(n),this.terminal.unicode.activeVersion="11",this.terminal.open(this.containerRef.current),this._loadWebglAddon(!1),this._writeBuffer="",this._writeTimer=null,requestAnimationFrame(oi?()=>{this._mobileFixedResize()}:()=>{this.fitAddon.fit(),this.terminal.focus()}),this.terminal.onData(r=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:r}))}),oi&&this._setupMobileTouchScroll()}_setupMobileTouchScroll(){var v;const n=(v=this.containerRef.current)==null?void 0:v.querySelector(".xterm-screen");if(!n)return;const r=this.terminal,i=()=>{var b,C,x,w;const _=(w=(x=(C=(b=r._core)==null?void 0:b._renderService)==null?void 0:C.dimensions)==null?void 0:x.css)==null?void 0:w.cell;return(_==null?void 0:_.height)||15};let o=0,s=0,a=null,l=0,c=0,h=null,m=[];const p=()=>{a&&(cancelAnimationFrame(a),a=null),h&&(cancelAnimationFrame(h),h=null),c=0,l=0},g=()=>{if(h=null,c===0)return;l+=c,c=0;const _=i(),b=Math.trunc(l/_);b!==0&&(r.scrollLines(b),l-=b*_)};n.addEventListener("touchstart",_=>{p(),_.touches.length===1&&(o=_.touches[0].clientY,s=performance.now(),m=[])},{passive:!0}),n.addEventListener("touchmove",_=>{if(_.touches.length!==1)return;const b=_.touches[0].clientY,C=performance.now(),x=C-s,w=o-b;if(x>0){const k=w/x*16;for(m.push({v:k,t:C});m.length>0&&C-m[0].t>100;)m.shift()}c+=w,h||(h=requestAnimationFrame(g)),o=b,s=C},{passive:!0}),n.addEventListener("touchend",()=>{if(h&&(cancelAnimationFrame(h),h=null),c!==0){l+=c,c=0;const w=i(),k=Math.trunc(l/w);k!==0&&r.scrollLines(k),l=0}let _=0;if(m.length>=2){let w=0,k=0;const $=m[m.length-1].t;for(const R of m){const I=Math.max(0,1-($-R.t)/100);k+=R.v*I,w+=I}_=w>0?k/w:0}if(m=[],Math.abs(_)<.5)return;const b=.95;let C=0;const x=()=>{if(Math.abs(_)<.3){const $=i(),R=Math.round(C/$);R!==0&&r.scrollLines(R),a=null;return}C+=_;const w=i(),k=Math.trunc(C/w);k!==0&&(r.scrollLines(k),C-=k*w),_*=b,a=requestAnimationFrame(x)};a=requestAnimationFrame(x)},{passive:!0}),this._stopMobileMomentum=p}connectWebSocket(){const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this.ws=new WebSocket(r),this.ws.onmessage=i=>{try{const o=JSON.parse(i.data);o.type==="data"?this._throttledWrite(o.data):o.type==="exit"?(this._flushWrite(),this.terminal.write(`\r
|
|
648
648
|
\x1B[33m${me("ui.terminal.exited",{code:o.exitCode??"?"})}\x1B[0m\r
|
|
649
649
|
`)):o.type==="state"&&!o.running&&o.exitCode!==null&&(this._flushWrite(),this.terminal.write(`\x1B[33m${me("ui.terminal.exited",{code:o.exitCode})}\x1B[0m\r
|
|
650
650
|
`))}catch{}},this.ws.onclose=()=>{setTimeout(()=>{var i;this.containerRef.current&&((i=this.terminal)==null||i.reset(),this.connectWebSocket())},2e3)},this.ws.onopen=()=>{this.sendResize()}}sendResize(){if(this.ws&&this.ws.readyState===WebSocket.OPEN&&this.terminal){const n={type:"resize",cols:this.terminal.cols,rows:this.terminal.rows};oi&&(n.mobile=!0),this.ws.send(JSON.stringify(n))}}setupResizeObserver(){oi||(this.resizeObserver=new ResizeObserver(()=>{this._resizeDebounceTimer&&clearTimeout(this._resizeDebounceTimer),this._resizeDebounceTimer=setTimeout(()=>{if(this._resizeDebounceTimer=null,this.fitAddon&&this.containerRef.current)try{this.fitAddon.fit(),this.sendResize()}catch{}},150)}),this.containerRef.current&&this.resizeObserver.observe(this.containerRef.current))}_loadWebglAddon(n){try{this.webglAddon=new Vhe,this.webglAddon.onContextLoss(()=>{var r;(r=this.webglAddon)==null||r.dispose(),this.webglAddon=null,n||(this._webglRecoveryTimer=setTimeout(()=>{this._webglRecoveryTimer=null,this._loadWebglAddon(!0)},1e3))}),this.terminal.loadAddon(this.webglAddon)}catch{this.webglAddon=null}}_mobileFixedResize(){var g,v,_,b;if(!this.terminal)return;const n=(b=(_=(v=(g=this.terminal._core)==null?void 0:g._renderService)==null?void 0:v.dimensions)==null?void 0:_.css)==null?void 0:b.cell;if(!n||!n.width||!n.height){setTimeout(()=>this._mobileFixedResize(),50);return}const r=60,i=16,o=8,s=40,a=52,l=window.innerWidth-i,c=window.innerHeight-s-a-o,h=this.terminal.options.fontSize,m=n.width,p=Math.floor(h*l/(r*m)*10)/10;this.terminal.options.fontSize=p,requestAnimationFrame(()=>{var k,$,R,I;const C=(I=(R=($=(k=this.terminal._core)==null?void 0:k._renderService)==null?void 0:$.dimensions)==null?void 0:R.css)==null?void 0:I.cell,x=(C==null?void 0:C.height)||n.height,w=Math.max(5,Math.min(Math.floor(c/x),100));this.terminal.resize(r,w),this.sendResize()})}_throttledWrite(n){this._writeBuffer+=n,this._writeTimer||(this._writeTimer=requestAnimationFrame(()=>{this._flushWrite()}))}_flushWrite(){if(this._writeTimer&&(cancelAnimationFrame(this._writeTimer),this._writeTimer=null),!this._writeBuffer||!this.terminal)return;const n=32768;if(this._writeBuffer.length<=n){const r=this._writeBuffer;this._writeBuffer="",this.terminal.write(r)}else{const r=this._writeBuffer.slice(0,n);this._writeBuffer=this._writeBuffer.slice(n),this.terminal.write(r),this._writeTimer=requestAnimationFrame(()=>{this._flushWrite()})}}render(){return S.jsxs("div",{className:ru.terminalPanel,children:[S.jsx("div",{ref:this.containerRef,className:ru.terminalContainer}),oi&&S.jsx("div",{className:ru.virtualKeybar,children:Tfe.map(n=>S.jsx("button",{className:ru.virtualKey,onTouchStart:this._vkTouchStart,onTouchMove:this._vkTouchMove,onTouchEnd:r=>this._vkTouchEnd(n.seq,r),children:n.label},n.label))})]})}}const Nfe="_fileExplorer_dbq1c_1",Ofe="_header_dbq1c_12",Mfe="_headerTitle_dbq1c_21",Ife="_collapseBtn_dbq1c_29",Pfe="_treeContainer_dbq1c_48",Lfe="_treeItem_dbq1c_54",Afe="_treeItemSelected_dbq1c_70",Bfe="_arrow_dbq1c_74",Dfe="_icon_dbq1c_83",zfe="_fileName_dbq1c_93",jfe="_loading_dbq1c_98",Ffe="_error_dbq1c_104",Hfe="_treeItemGitIgnored_dbq1c_110",ro={fileExplorer:Nfe,header:Ofe,headerTitle:Mfe,collapseBtn:Ife,treeContainer:Pfe,treeItem:Lfe,treeItemSelected:Afe,arrow:Bfe,icon:Dfe,fileName:zfe,loading:jfe,error:Ffe,treeItemGitIgnored:Hfe},Wfe={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",less:"#a86fd9",html:"#e34c26",htm:"#e34c26",xml:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584",rb:"#cc342d",java:"#b07219",c:"#555",cpp:"#f34b7d",h:"#555",sh:"#4eaa25",bash:"#4eaa25",zsh:"#4eaa25",yml:"#cb171e",yaml:"#cb171e",toml:"#999",svg:"#e34c26",png:"#a86fd9",jpg:"#a86fd9",jpeg:"#a86fd9",gif:"#a86fd9",ico:"#a86fd9",webp:"#a86fd9"};function Vfe(e,t){if(t==="directory")return S.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:S.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})});const n=e.includes(".")?e.split(".").pop().toLowerCase():"",r=Wfe[n]||"#888";return S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"1.5",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function FO({item:e,path:t,depth:n,onFileClick:r,expandedPaths:i,onToggleExpand:o,currentFile:s}){const[a,l]=d.useState(null),[c,h]=d.useState(!1),[m,p]=d.useState(null),g=t?`${t}/${e.name}`:e.name,v=i.has(g),_=e.gitIgnored||!1,b=d.useCallback(async()=>{h(!0),p(null);try{const k=await fetch(Bn(`/api/files?path=${encodeURIComponent(g)}`));if(!k.ok)throw new Error("Failed");const $=await k.json();l($)}catch{p("Error")}finally{h(!1)}},[g]);d.useEffect(()=>{e.type==="directory"&&v&&a===null&&!c&&b()},[]);const C=d.useCallback(async()=>{if(e.type!=="directory"){r&&r(g);return}if(v){o(g);return}a===null&&await b(),o(g)},[v,a,g,e,r,o,b]),x=e.type==="directory",w=!x&&s&&s===g;return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:`${ro.treeItem}${w?" "+ro.treeItemSelected:""}${_?" "+ro.treeItemGitIgnored:""}`,style:{paddingLeft:8+n*16},onClick:C,children:[S.jsx("span",{className:ro.arrow,children:x?S.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:v?"rotate(90deg)":"none",transition:"transform 0.15s"},children:S.jsx("polyline",{points:"9 6 15 12 9 18"})}):""}),S.jsx("span",{className:ro.icon,children:Vfe(e.name,e.type)}),S.jsx("span",{className:ro.fileName,children:e.name})]}),v&&c&&S.jsx("div",{className:ro.loading,style:{paddingLeft:24+n*16},children:"..."}),v&&m&&S.jsx("div",{className:ro.error,style:{paddingLeft:24+n*16},children:m}),v&&a&&a.map(k=>S.jsx(FO,{item:k,path:g,depth:n+1,onFileClick:r,expandedPaths:i,onToggleExpand:o,currentFile:s},k.name))]})}function Kfe({onClose:e,onFileClick:t,expandedPaths:n,onToggleExpand:r,currentFile:i}){const[o,s]=d.useState(null),[a,l]=d.useState(null),c=d.useRef(!0),h=d.useRef(null),m=d.useRef(null);return d.useCallback(()=>{c.current&&fetch(Bn("/api/files?path=")).then(p=>p.ok?p.json():Promise.reject()).then(p=>{c.current&&s(p)}).catch(()=>{c.current&&l("Failed to load")})},[]),d.useEffect(()=>{c.current=!0,fetch(Bn("/api/files?path=")).then(v=>v.ok?v.json():Promise.reject()).then(v=>{c.current&&s(v)}).catch(()=>{c.current&&l("Failed to load")});const g=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;try{h.current=new WebSocket(g),h.current.onmessage=v=>{try{JSON.parse(v.data).type==="file-change"&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{c.current&&fetch(Bn("/api/files?path=")).then(b=>b.ok?b.json():Promise.reject()).then(b=>{c.current&&s(b)}).catch(()=>{c.current&&l("Failed to load")})},300))}catch(_){console.error("[FileExplorer] Failed to parse WebSocket message:",_)}},h.current.onerror=v=>{console.error("[FileExplorer] WebSocket error:",v)},h.current.onclose=()=>{console.log("[FileExplorer] WebSocket closed, reconnecting in 2s..."),setTimeout(()=>{if(c.current){const v=new WebSocket(g);v.onmessage=h.current.onmessage,v.onerror=h.current.onerror,v.onclose=h.current.onclose,h.current=v}},2e3)}}catch(v){console.error("[FileExplorer] Failed to create WebSocket:",v)}return()=>{c.current=!1,h.current&&(h.current.close(),h.current=null),m.current&&(clearTimeout(m.current),m.current=null)}},[]),S.jsxs("div",{className:ro.fileExplorer,children:[S.jsxs("div",{className:ro.header,children:[S.jsx("span",{className:ro.headerTitle,children:me("ui.fileExplorer")}),S.jsx("button",{className:ro.collapseBtn,onClick:e,title:"Close",children:S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("polyline",{points:"11 17 6 12 11 7"}),S.jsx("polyline",{points:"18 17 13 12 18 7"})]})})]}),S.jsxs("div",{className:ro.treeContainer,children:[a&&S.jsx("div",{className:ro.error,children:a}),!o&&!a&&S.jsx("div",{className:ro.loading,children:"Loading..."}),o&&o.map(p=>S.jsx(FO,{item:p,path:"",depth:0,onFileClick:t,expandedPaths:n,onToggleExpand:r,currentFile:i},p.name))]})]})}var _b,yk;function Ufe(){if(yk)return _b;yk=1;function e(ce){return ce instanceof Map?ce.clear=ce.delete=ce.set=function(){throw new Error("map is read-only")}:ce instanceof Set&&(ce.add=ce.clear=ce.delete=function(){throw new Error("set is read-only")}),Object.freeze(ce),Object.getOwnPropertyNames(ce).forEach($e=>{const Be=ce[$e],lt=typeof Be;(lt==="object"||lt==="function")&&!Object.isFrozen(Be)&&e(Be)}),ce}class t{constructor($e){$e.data===void 0&&($e.data={}),this.data=$e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(ce){return ce.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(ce,...$e){const Be=Object.create(null);for(const lt in ce)Be[lt]=ce[lt];return $e.forEach(function(lt){for(const $t in lt)Be[$t]=lt[$t]}),Be}const i="</span>",o=ce=>!!ce.scope,s=(ce,{prefix:$e})=>{if(ce.startsWith("language:"))return ce.replace("language:","language-");if(ce.includes(".")){const Be=ce.split(".");return[`${$e}${Be.shift()}`,...Be.map((lt,$t)=>`${lt}${"_".repeat($t+1)}`)].join(" ")}return`${$e}${ce}`};class a{constructor($e,Be){this.buffer="",this.classPrefix=Be.classPrefix,$e.walk(this)}addText($e){this.buffer+=n($e)}openNode($e){if(!o($e))return;const Be=s($e.scope,{prefix:this.classPrefix});this.span(Be)}closeNode($e){o($e)&&(this.buffer+=i)}value(){return this.buffer}span($e){this.buffer+=`<span class="${$e}">`}}const l=(ce={})=>{const $e={children:[]};return Object.assign($e,ce),$e};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add($e){this.top.children.push($e)}openNode($e){const Be=l({scope:$e});this.add(Be),this.stack.push(Be)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk($e){return this.constructor._walk($e,this.rootNode)}static _walk($e,Be){return typeof Be=="string"?$e.addText(Be):Be.children&&($e.openNode(Be),Be.children.forEach(lt=>this._walk($e,lt)),$e.closeNode(Be)),$e}static _collapse($e){typeof $e!="string"&&$e.children&&($e.children.every(Be=>typeof Be=="string")?$e.children=[$e.children.join("")]:$e.children.forEach(Be=>{c._collapse(Be)}))}}class h extends c{constructor($e){super(),this.options=$e}addText($e){$e!==""&&this.add($e)}startScope($e){this.openNode($e)}endScope(){this.closeNode()}__addSublanguage($e,Be){const lt=$e.root;Be&&(lt.scope=`language:${Be}`),this.add(lt)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(ce){return ce?typeof ce=="string"?ce:ce.source:null}function p(ce){return _("(?=",ce,")")}function g(ce){return _("(?:",ce,")*")}function v(ce){return _("(?:",ce,")?")}function _(...ce){return ce.map(Be=>m(Be)).join("")}function b(ce){const $e=ce[ce.length-1];return typeof $e=="object"&&$e.constructor===Object?(ce.splice(ce.length-1,1),$e):{}}function C(...ce){return"("+(b(ce).capture?"":"?:")+ce.map(lt=>m(lt)).join("|")+")"}function x(ce){return new RegExp(ce.toString()+"|").exec("").length-1}function w(ce,$e){const Be=ce&&ce.exec($e);return Be&&Be.index===0}const k=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(ce,{joinWith:$e}){let Be=0;return ce.map(lt=>{Be+=1;const $t=Be;let Ye=m(lt),Fe="";for(;Ye.length>0;){const De=k.exec(Ye);if(!De){Fe+=Ye;break}Fe+=Ye.substring(0,De.index),Ye=Ye.substring(De.index+De[0].length),De[0][0]==="\\"&&De[1]?Fe+="\\"+String(Number(De[1])+$t):(Fe+=De[0],De[0]==="("&&Be++)}return Fe}).map(lt=>`(${lt})`).join($e)}const R=/\b\B/,I="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",M="\\b\\d+(\\.\\d+)?",z="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",T="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",O=(ce={})=>{const $e=/^#![ ]*\//;return ce.binary&&(ce.begin=_($e,/.*\b/,ce.binary,/\b.*/)),r({scope:"meta",begin:$e,end:/$/,relevance:0,"on:begin":(Be,lt)=>{Be.index!==0&<.ignoreMatch()}},ce)},N={begin:"\\\\[\\s\\S]",relevance:0},A={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[N]},B={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[N]},D={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},j=function(ce,$e,Be={}){const lt=r({scope:"comment",begin:ce,end:$e,contains:[]},Be);lt.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const $t=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return lt.contains.push({begin:_(/[ ]+/,"(",$t,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),lt},W=j("//","$"),K=j("/\\*","\\*/"),V=j("#","$"),U={scope:"number",begin:M,relevance:0},q={scope:"number",begin:z,relevance:0},Y={scope:"number",begin:F,relevance:0},Z={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[N,{begin:/\[/,end:/\]/,relevance:0,contains:[N]}]},ee={scope:"title",begin:I,relevance:0},se={scope:"title",begin:P,relevance:0},re={begin:"\\.\\s*"+P,relevance:0};var ye=Object.freeze({__proto__:null,APOS_STRING_MODE:A,BACKSLASH_ESCAPE:N,BINARY_NUMBER_MODE:Y,BINARY_NUMBER_RE:F,COMMENT:j,C_BLOCK_COMMENT_MODE:K,C_LINE_COMMENT_MODE:W,C_NUMBER_MODE:q,C_NUMBER_RE:z,END_SAME_AS_BEGIN:function(ce){return Object.assign(ce,{"on:begin":($e,Be)=>{Be.data._beginMatch=$e[1]},"on:end":($e,Be)=>{Be.data._beginMatch!==$e[1]&&Be.ignoreMatch()}})},HASH_COMMENT_MODE:V,IDENT_RE:I,MATCH_NOTHING_RE:R,METHOD_GUARD:re,NUMBER_MODE:U,NUMBER_RE:M,PHRASAL_WORDS_MODE:D,QUOTE_STRING_MODE:B,REGEXP_MODE:Z,RE_STARTERS_RE:T,SHEBANG:O,TITLE_MODE:ee,UNDERSCORE_IDENT_RE:P,UNDERSCORE_TITLE_MODE:se});function he(ce,$e){ce.input[ce.index-1]==="."&&$e.ignoreMatch()}function le(ce,$e){ce.className!==void 0&&(ce.scope=ce.className,delete ce.className)}function pe(ce,$e){$e&&ce.beginKeywords&&(ce.begin="\\b("+ce.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",ce.__beforeBegin=he,ce.keywords=ce.keywords||ce.beginKeywords,delete ce.beginKeywords,ce.relevance===void 0&&(ce.relevance=0))}function oe(ce,$e){Array.isArray(ce.illegal)&&(ce.illegal=C(...ce.illegal))}function ue(ce,$e){if(ce.match){if(ce.begin||ce.end)throw new Error("begin & end are not supported with match");ce.begin=ce.match,delete ce.match}}function ie(ce,$e){ce.relevance===void 0&&(ce.relevance=1)}const be=(ce,$e)=>{if(!ce.beforeMatch)return;if(ce.starts)throw new Error("beforeMatch cannot be used with starts");const Be=Object.assign({},ce);Object.keys(ce).forEach(lt=>{delete ce[lt]}),ce.keywords=Be.keywords,ce.begin=_(Be.beforeMatch,p(Be.begin)),ce.starts={relevance:0,contains:[Object.assign(Be,{endsParent:!0})]},ce.relevance=0,delete Be.beforeMatch},Ee=["of","and","for","in","not","or","if","then","parent","list","value"],Me="keyword";function Ie(ce,$e,Be=Me){const lt=Object.create(null);return typeof ce=="string"?$t(Be,ce.split(" ")):Array.isArray(ce)?$t(Be,ce):Object.keys(ce).forEach(function(Ye){Object.assign(lt,Ie(ce[Ye],$e,Ye))}),lt;function $t(Ye,Fe){$e&&(Fe=Fe.map(De=>De.toLowerCase())),Fe.forEach(function(De){const Ne=De.split("|");lt[Ne[0]]=[Ye,ge(Ne[0],Ne[1])]})}}function ge(ce,$e){return $e?Number($e):xe(ce)?0:1}function xe(ce){return Ee.includes(ce.toLowerCase())}const Ce={},we=ce=>{console.error(ce)},We=(ce,...$e)=>{console.log(`WARN: ${ce}`,...$e)},qe=(ce,$e)=>{Ce[`${ce}/${$e}`]||(console.log(`Deprecated as of ${ce}. ${$e}`),Ce[`${ce}/${$e}`]=!0)},dt=new Error;function ot(ce,$e,{key:Be}){let lt=0;const $t=ce[Be],Ye={},Fe={};for(let De=1;De<=$e.length;De++)Fe[De+lt]=$t[De],Ye[De+lt]=!0,lt+=x($e[De-1]);ce[Be]=Fe,ce[Be]._emit=Ye,ce[Be]._multi=!0}function et(ce){if(Array.isArray(ce.begin)){if(ce.skip||ce.excludeBegin||ce.returnBegin)throw we("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dt;if(typeof ce.beginScope!="object"||ce.beginScope===null)throw we("beginScope must be object"),dt;ot(ce,ce.begin,{key:"beginScope"}),ce.begin=$(ce.begin,{joinWith:""})}}function st(ce){if(Array.isArray(ce.end)){if(ce.skip||ce.excludeEnd||ce.returnEnd)throw we("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dt;if(typeof ce.endScope!="object"||ce.endScope===null)throw we("endScope must be object"),dt;ot(ce,ce.end,{key:"endScope"}),ce.end=$(ce.end,{joinWith:""})}}function Ae(ce){ce.scope&&typeof ce.scope=="object"&&ce.scope!==null&&(ce.beginScope=ce.scope,delete ce.scope)}function Le(ce){Ae(ce),typeof ce.beginScope=="string"&&(ce.beginScope={_wrap:ce.beginScope}),typeof ce.endScope=="string"&&(ce.endScope={_wrap:ce.endScope}),et(ce),st(ce)}function Ge(ce){function $e(Fe,De){return new RegExp(m(Fe),"m"+(ce.case_insensitive?"i":"")+(ce.unicodeRegex?"u":"")+(De?"g":""))}class Be{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(De,Ne){Ne.position=this.position++,this.matchIndexes[this.matchAt]=Ne,this.regexes.push([Ne,De]),this.matchAt+=x(De)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const De=this.regexes.map(Ne=>Ne[1]);this.matcherRe=$e($(De,{joinWith:"|"}),!0),this.lastIndex=0}exec(De){this.matcherRe.lastIndex=this.lastIndex;const Ne=this.matcherRe.exec(De);if(!Ne)return null;const je=Ne.findIndex((Qe,Ct)=>Ct>0&&Qe!==void 0),Pe=this.matchIndexes[je];return Ne.splice(0,je),Object.assign(Ne,Pe)}}class lt{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(De){if(this.multiRegexes[De])return this.multiRegexes[De];const Ne=new Be;return this.rules.slice(De).forEach(([je,Pe])=>Ne.addRule(je,Pe)),Ne.compile(),this.multiRegexes[De]=Ne,Ne}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(De,Ne){this.rules.push([De,Ne]),Ne.type==="begin"&&this.count++}exec(De){const Ne=this.getMatcher(this.regexIndex);Ne.lastIndex=this.lastIndex;let je=Ne.exec(De);if(this.resumingScanAtSamePosition()&&!(je&&je.index===this.lastIndex)){const Pe=this.getMatcher(0);Pe.lastIndex=this.lastIndex+1,je=Pe.exec(De)}return je&&(this.regexIndex+=je.position+1,this.regexIndex===this.count&&this.considerAll()),je}}function $t(Fe){const De=new lt;return Fe.contains.forEach(Ne=>De.addRule(Ne.begin,{rule:Ne,type:"begin"})),Fe.terminatorEnd&&De.addRule(Fe.terminatorEnd,{type:"end"}),Fe.illegal&&De.addRule(Fe.illegal,{type:"illegal"}),De}function Ye(Fe,De){const Ne=Fe;if(Fe.isCompiled)return Ne;[le,ue,Le,be].forEach(Pe=>Pe(Fe,De)),ce.compilerExtensions.forEach(Pe=>Pe(Fe,De)),Fe.__beforeBegin=null,[pe,oe,ie].forEach(Pe=>Pe(Fe,De)),Fe.isCompiled=!0;let je=null;return typeof Fe.keywords=="object"&&Fe.keywords.$pattern&&(Fe.keywords=Object.assign({},Fe.keywords),je=Fe.keywords.$pattern,delete Fe.keywords.$pattern),je=je||/\w+/,Fe.keywords&&(Fe.keywords=Ie(Fe.keywords,ce.case_insensitive)),Ne.keywordPatternRe=$e(je,!0),De&&(Fe.begin||(Fe.begin=/\B|\b/),Ne.beginRe=$e(Ne.begin),!Fe.end&&!Fe.endsWithParent&&(Fe.end=/\B|\b/),Fe.end&&(Ne.endRe=$e(Ne.end)),Ne.terminatorEnd=m(Ne.end)||"",Fe.endsWithParent&&De.terminatorEnd&&(Ne.terminatorEnd+=(Fe.end?"|":"")+De.terminatorEnd)),Fe.illegal&&(Ne.illegalRe=$e(Fe.illegal)),Fe.contains||(Fe.contains=[]),Fe.contains=[].concat(...Fe.contains.map(function(Pe){return tt(Pe==="self"?Fe:Pe)})),Fe.contains.forEach(function(Pe){Ye(Pe,Ne)}),Fe.starts&&Ye(Fe.starts,De),Ne.matcher=$t(Ne),Ne}if(ce.compilerExtensions||(ce.compilerExtensions=[]),ce.contains&&ce.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return ce.classNameAliases=r(ce.classNameAliases||{}),Ye(ce)}function Ke(ce){return ce?ce.endsWithParent||Ke(ce.starts):!1}function tt(ce){return ce.variants&&!ce.cachedVariants&&(ce.cachedVariants=ce.variants.map(function($e){return r(ce,{variants:null},$e)})),ce.cachedVariants?ce.cachedVariants:Ke(ce)?r(ce,{starts:ce.starts?r(ce.starts):null}):Object.isFrozen(ce)?r(ce):ce}var He="11.11.1";class Je extends Error{constructor($e,Be){super($e),this.name="HTMLInjectionError",this.html=Be}}const ht=n,bt=r,Zt=Symbol("nomatch"),Qt=7,jt=function(ce){const $e=Object.create(null),Be=Object.create(null),lt=[];let $t=!0;const Ye="Could not find the language '{}', did you forget to load/include a language module?",Fe={disableAutodetect:!0,name:"Plain text",contains:[]};let De={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function Ne(ke){return De.noHighlightRe.test(ke)}function je(ke){let Ue=ke.className+" ";Ue+=ke.parentNode?ke.parentNode.className:"";const ft=De.languageDetectRe.exec(Ue);if(ft){const Ut=Ze(ft[1]);return Ut||(We(Ye.replace("{}",ft[1])),We("Falling back to no-highlight mode for this block.",ke)),Ut?ft[1]:"no-highlight"}return Ue.split(/\s+/).find(Ut=>Ne(Ut)||Ze(Ut))}function Pe(ke,Ue,ft){let Ut="",_n="";typeof Ue=="object"?(Ut=ke,ft=Ue.ignoreIllegals,_n=Ue.language):(qe("10.7.0","highlight(lang, code, ...args) has been deprecated."),qe("10.7.0",`Please use highlight(code, options) instead.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
body{margin:0;background-color:#0d0d0d}*{scrollbar-width:thin;scrollbar-color:#3a3a3a #0d0d0d}@media(pointer:coarse){*{scrollbar-width:auto;scrollbar-color:auto}}@media(pointer:fine){*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:#0d0d0d}*::-webkit-scrollbar-thumb{background:#3a3a3a;border-radius:3px}*::-webkit-scrollbar-thumb:hover{background:#555}}.code-highlight{color:#e6edf3}.hl-keyword{color:#ff7b72}.hl-string{color:#a5d6ff}.hl-comment{color:#8b949e;font-style:italic}.hl-number{color:#79c0ff}.hl-linenum{color:#484f58;-webkit-user-select:none;user-select:none}.chat-md pre{background:#0d1117;border:1px solid #2a2a2a;border-radius:6px;padding:12px;overflow-x:auto;font-size:13px;line-height:1.5}.chat-md code{background:#1a1a2e;padding:2px 6px;border-radius:4px;font-size:13px;color:#e5e7eb}.chat-md pre code{background:none;padding:0}.chat-md p{margin:6px 0}.chat-md ul,.chat-md ol{padding-left:20px;margin:6px 0}.chat-md li{margin:2px 0}.chat-md h1,.chat-md h2,.chat-md h3{margin:12px 0 6px;color:#fff}.chat-md h1{font-size:1.3em}.chat-md h2{font-size:1.15em}.chat-md h3{font-size:1.05em}.chat-md blockquote{border-left:3px solid #3b82f6;margin:8px 0;padding:4px 12px;color:#9ca3af}.chat-md table{border-collapse:collapse;margin:8px 0;font-size:13px}.chat-md th,.chat-md td{border:1px solid #2a2a2a;padding:6px 10px}.chat-md th{background:#1a1a1a;color:#fff}.chat-md a{color:#60a5fa}.chat-md hr{border:none;border-top:1px solid #2a2a2a;margin:12px 0}.chat-md strong{color:#f1f5f9}.chat-md em{color:#cbd5e1}.ant-tooltip .ant-tooltip-inner{background-color:#090909}.ant-tooltip .ant-tooltip-arrow:before,.ant-tooltip .ant-tooltip-arrow:after{background:#090909}._helpBtn_ovmho_1{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#1a1a1a;border:1px solid #444;color:#aaa;font-size:11px;line-height:1;cursor:pointer;margin-left:4px;vertical-align:middle;transition:background .2s;-webkit-user-select:none;user-select:none}._helpBtn_ovmho_1:hover{background:#333}._modalBody_ovmho_24{max-height:60vh;overflow-y:auto;overflow-x:hidden;line-height:1.7;color:#d9d9d9;word-break:break-word}._modalBody_ovmho_24 h1,._modalBody_ovmho_24 h2,._modalBody_ovmho_24 h3{margin-top:.8em;color:#f0f0f0}._modalBody_ovmho_24 p{margin:.5em 0}._modalBody_ovmho_24 code{background:#2a2a2a;padding:1px 4px;border-radius:3px;font-size:.9em;color:#e8ab6a}._modalBody_ovmho_24 pre{background:#1a1a1a;padding:12px;border-radius:6px;overflow-x:auto;color:#d9d9d9;max-width:100%;box-sizing:border-box}._modalBody_ovmho_24 a{color:#5b9bd5}._modalBody_ovmho_24 strong{color:#f0f0f0}._spinWrap_ovmho_70{display:flex;justify-content:center;padding:40px 0}._modalBody_ovmho_24 textarea{width:100%;min-height:200px;background:#1a1a1a;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:1px solid #333;border-radius:6px;padding:10px 14px;resize:vertical;outline:none;box-sizing:border-box}@media(max-width:768px){._modalBody_ovmho_24{font-size:13px;line-height:1.6;max-height:75vh}._modalBody_ovmho_24 h1{font-size:18px}._modalBody_ovmho_24 h2{font-size:16px}._modalBody_ovmho_24 h3{font-size:14px}._modalBody_ovmho_24 pre{font-size:12px;padding:8px}._modalBody_ovmho_24 code,._modalBody_ovmho_24 textarea{font-size:12px}}._headerBar_1oh31_2{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%}._titleText_1oh31_11{color:#fff;font-size:18px;cursor:pointer}._logoImage_1oh31_17{height:24px;width:24px;margin-right:6px;border-radius:3px;vertical-align:text-bottom}._titleArrow_1oh31_25{font-size:12px;margin-left:4px}._tokenStatsTag_1oh31_31{border-radius:12px;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;color:#ccc}._tokenStatsIcon_1oh31_39{margin-right:4px}._liveTag_1oh31_44{border-radius:12px}._liveDotWrap_1oh31_48{display:inline-flex;align-items:center;justify-content:center;width:10px;height:10px;vertical-align:middle;margin-right:2px;position:relative;top:-1px}._liveTag_1oh31_44 .ant-badge-status-processing{animation:_breathe_1oh31_1 2.5s ease-in-out infinite}@keyframes _breathe_1oh31_1{0%,to{opacity:.4;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}._liveSpinner_1oh31_70{display:block;animation:_spinPlusStar_1oh31_1 2s linear infinite}._liveSpinnerDiag_1oh31_75{animation:_diagFade_1oh31_1 2s ease-in-out infinite}@keyframes _spinPlusStar_1oh31_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _diagFade_1oh31_1{0%,to{opacity:1}50%{opacity:0}}._inflightList_1oh31_90{min-width:180px}._inflightItem_1oh31_94{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12px}._inflightItem_1oh31_94+._inflightItem_1oh31_94{border-top:1px solid #333}._inflightTag_1oh31_106{color:#52c41a;font-weight:500;white-space:nowrap}._inflightModel_1oh31_112{color:#999;white-space:nowrap}._inflightTime_1oh31_117{color:#666;margin-left:auto;white-space:nowrap}._liveTagHistory_1oh31_123{background:#2a2a2a;border-color:#424242;color:#d1d5db}._liveTagText_1oh31_129{margin-left:4px}._countdownStrong_1oh31_134{font-variant-numeric:tabular-nums}._qrcodePopover_1oh31_139{display:flex;flex-direction:column;align-items:center;padding:8px}._qrcodeSection_1oh31_146{display:flex;flex-direction:column;align-items:center;padding:16px;margin-bottom:12px;border:1px solid #333;border-radius:8px;background:#111}._qrcodeTitle_1oh31_157{font-size:14px;font-weight:600;color:#e5e5e5;margin-bottom:12px}._qrcodeUrlInput_1oh31_164{margin-top:12px;font-size:12px;font-family:Menlo,Monaco,monospace}._qrcodeUrlCopy_1oh31_170{cursor:pointer;color:#888;transition:color .2s}._qrcodeUrlCopy_1oh31_170:hover{color:#3b82f6}._settingsGroupBox_1oh31_181{border:1px solid #333;border-radius:8px;background:#111;padding:4px 16px;margin-bottom:12px}._settingsGroupTitle_1oh31_189{font-size:14px;font-weight:600;color:#e5e5e5;padding:12px 0 4px;border-bottom:1px solid #333}._settingsItem_1oh31_198{display:flex;justify-content:space-between;align-items:center;padding:12px 0}._settingsLabel_1oh31_205{font-size:14px}._tokenStatsEmpty_1oh31_210{padding:8px 4px;color:#999;font-size:13px}._tokenStatsContainer_1oh31_217{display:flex;gap:12px;align-items:flex-start}._tokenStatsColumn_1oh31_223{min-width:240px}._toolStatsColumn_1oh31_227{min-width:180px}._modelCard_1oh31_232{border:1px solid #333;border-radius:6px;padding:8px 10px;background:#111}._modelCardSpaced_1oh31_239{margin-bottom:10px}._modelName_1oh31_245{font-size:13px;font-weight:600;color:#e5e5e5;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._statsTable_1oh31_255{width:100%;border-collapse:collapse}._th_1oh31_260{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#888;font-weight:400;text-align:right}._td_1oh31_270{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#e5e5e5;text-align:right}._label_1oh31_279{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#aaa;font-weight:400;text-align:left}._rowBorder_1oh31_289{border-bottom:1px solid #2a2a2a}._rebuildCard_1oh31_293{border:1px solid #333;border-radius:6px;padding:8px 10px;margin-top:10px;background:#111}._rebuildTotalRow_1oh31_301{border-top:1px solid #444}._rebuildTotalRow_1oh31_301 td{font-weight:600}._promptExportBar_1oh31_310{margin-bottom:12px}._promptScrollArea_1oh31_314{max-height:500px;overflow:auto}._promptEmpty_1oh31_319{color:#999;padding:12px}._promptTimestamp_1oh31_325{color:#666;font-size:12px;margin:12px 0 4px;padding-bottom:6px}._textPromptCard_1oh31_333{margin:4px 0;background:#141414;border-radius:6px;border:1px solid #303030;padding:10px 14px}._preText_1oh31_342{white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.6;color:#d9d9d9;margin:4px 0}._systemCollapse_1oh31_352{margin:4px 0;background:#1a1a1a;border:1px solid #303030;border-radius:6px}._systemLabel_1oh31_359{color:#888;font-size:12px}._preSys_1oh31_364{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#999;margin:0}._promptTextarea_1oh31_374{box-sizing:border-box;background:#000;width:100%;min-height:400px;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:none;resize:vertical;padding:10px 14px;outline:none}._projectStatsCenter_1oh31_390{display:flex;justify-content:center;padding:40px 0}._projectStatsEmpty_1oh31_396{color:#999;padding:40px 0;text-align:center;font-size:13px}._projectStatsContent_1oh31_403{display:flex;flex-direction:column;gap:16px}._projectStatsUpdated_1oh31_409{color:#666;font-size:12px;text-align:right}._projectStatsSummary_1oh31_415{display:grid;grid-template-columns:1fr 1fr;gap:10px}._projectStatCard_1oh31_421{background:#111;border:1px solid #333;border-radius:8px;padding:14px 12px;text-align:center}._projectStatValue_1oh31_429{font-size:22px;font-weight:700;color:#e5e5e5;font-family:monospace;font-variant-numeric:tabular-nums}._projectStatLabel_1oh31_437{font-size:12px;color:#888;margin-top:4px}._projectStatsSection_1oh31_443{display:flex;flex-direction:column;gap:10px}._projectStatsSectionTitle_1oh31_449{font-size:14px;font-weight:600;color:#ccc;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelCard_1oh31_457{background:#111;border:1px solid #333;border-radius:6px;padding:10px 12px}._projectStatsModelHeader_1oh31_464{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelName_1oh31_473{font-size:13px;font-weight:600;color:#e5e5e5}._projectStatsModelCount_1oh31_479{font-size:12px;color:#888;font-family:monospace}._pluginDirHint_1oh31_486{margin-bottom:12px;font-size:12px;color:#888}._pluginDirPath_1oh31_492{font-family:Menlo,Monaco,monospace;color:#aaa;cursor:pointer;padding:1px 4px;border-radius:3px;background:#1a1a1a}._pluginDirPath_1oh31_492:hover{color:#3b82f6}._pluginList_1oh31_505{display:flex;flex-direction:column;gap:8px}._pluginItem_1oh31_511{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #303030;border-radius:6px;background:#141414}._pluginInfo_1oh31_521{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}._pluginName_1oh31_529{font-size:14px;color:#e5e5e5;font-weight:500}._pluginFile_1oh31_535{font-size:12px;color:#666;font-family:Menlo,Monaco,monospace}._pluginHooks_1oh31_541{display:flex;gap:4px;flex-wrap:wrap;margin-top:2px}._pluginHookTag_1oh31_548{font-size:11px;padding:0 5px;border-radius:3px;background:#1e3a5f;color:#6cb6ff;line-height:18px}._pluginActions_1oh31_557{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:12px}._pluginEmpty_1oh31_565{text-align:center;padding:32px 0;color:#999}._centerEmpty_oxhcp_1{display:flex;align-items:center;justify-content:center;height:100%}._scrollContainer_oxhcp_8{overflow:auto;height:100%;-webkit-overflow-scrolling:touch;will-change:scroll-position}._listItem_oxhcp_15{cursor:pointer;padding:8px 12px;border-left:3px solid transparent;border-bottom:1px solid #1f1f1f;transition:background .15s}._listItem_oxhcp_15:hover{background:#151515}._listItemActive_oxhcp_27{background:#1a2332;border-left-color:#3b82f6}._listItemActive_oxhcp_27:hover{background:#1a2332}._itemContent_oxhcp_36{width:100%;min-width:0}._itemHeader_oxhcp_41{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-size:12px}._tagNoMargin_oxhcp_49{margin:0;font-size:12px}._modelName_oxhcp_54{font-size:12px}._time_oxhcp_58{font-size:12px;color:#6b7280;margin-left:auto}._detailRow_oxhcp_64{display:flex;gap:8px;font-size:12px;align-items:center}._urlText_oxhcp_71{color:#555;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}._duration_oxhcp_80{color:#6b7280;flex-shrink:0}._statusOk_oxhcp_85{color:#52c41a;opacity:.5;flex-shrink:0}._statusErr_oxhcp_91{color:#ef4444;flex-shrink:0}._statusDefault_oxhcp_96{color:#9ca3af;flex-shrink:0}._usageBox_oxhcp_101{background:#111;border-radius:4px;padding:3px 6px;margin-top:4px;font-size:12px;color:#6b7280;line-height:1.6}._cacheDot_oxhcp_111{display:inline-block;width:6px;height:6px;border-radius:50%;margin:0 3px;vertical-align:middle}._cacheDotLoss_oxhcp_120{background-color:#8b1a1a;cursor:help}._cacheDotNormal_oxhcp_125{background-color:#3a3a3a}._GzYRV{line-height:1.2;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{font-size:1.2em;margin-right:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{font-weight:600;margin-right:5px;color:#000}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{font-weight:bolder;margin-right:5px;color:#fdf6e3}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}._container_1h2lr_1{background:#0d1117;border-radius:6px;border:1px solid #2a2a2a;padding:12px;font-size:13px;font-family:monospace;overflow:auto}._tag_17wfp_1{display:inline-block;font-size:10px;color:#6b7280;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:3px;padding:0 4px;margin-left:6px;cursor:pointer;line-height:18px;vertical-align:middle;transition:color .2s,border-color .2s;-webkit-user-select:none;user-select:none}._tag_17wfp_1:hover{color:#93c5fd;border-color:#93c5fd4d}._tagActive_17wfp_22{color:#93c5fd;border-color:#93c5fd40}._tagLoading_17wfp_27{cursor:wait;opacity:.7}._spinner_17wfp_32{display:inline-block;width:10px;height:10px;border:1.5px solid rgba(147,197,253,.3);border-top-color:#93c5fd;border-radius:50%;animation:_spin_17wfp_32 .6s linear infinite;margin-right:3px;vertical-align:middle}@keyframes _spin_17wfp_32{to{transform:rotate(360deg)}}._root_1bepf_1{display:flex;height:100%;min-height:0;gap:0}._sidebar_1bepf_9{width:220px;flex-shrink:0;border-right:1px solid #2a2a2a;overflow-y:auto;padding:4px 0;-webkit-overflow-scrolling:touch}._section_1bepf_18{-webkit-user-select:none;user-select:none}._sectionHeader_1bepf_22{display:flex;align-items:center;gap:6px;padding:6px 10px;cursor:pointer;color:#d1d5db;font-size:12px;font-weight:600;transition:background .15s}._sectionHeader_1bepf_22:hover{background:#ffffff0d}._arrow_1bepf_38{font-size:10px;color:#888;flex-shrink:0}._sectionTitle_1bepf_44{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._sectionCount_1bepf_52{font-size:11px;color:#666;background:#1f1f1f;border-radius:10px;padding:0 6px;line-height:18px}._sectionBody_1bepf_61{padding:2px 0}._historyToggle_1bepf_66{display:flex;align-items:center;gap:6px;padding:4px 10px 4px 14px;cursor:pointer;color:#666;font-size:11px;transition:color .15s,background .15s}._historyToggle_1bepf_66:hover{color:#888;background:#ffffff08}._historyToggleLabel_1bepf_82{flex:1}._item_1bepf_87{display:flex;align-items:center;justify-content:space-between;padding:5px 10px 5px 24px;font-size:12px;color:#888;cursor:pointer;transition:background .15s,color .15s}._item_1bepf_87:hover{background:#ffffff0a;color:#d1d5db}._itemActive_1bepf_103{background:#63b3ed1f;color:#63b3ed}._itemActive_1bepf_103:hover{background:#63b3ed29;color:#63b3ed}._itemContent_1bepf_113{flex:1;min-width:0;overflow:hidden}._itemLabel_1bepf_119{font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}._itemSublabel_1bepf_127{font-size:10px;color:#555;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}._itemTime_1bepf_136{font-size:9px;color:#555;flex-shrink:0;margin-left:4px;font-family:monospace}._content_1bepf_145{flex:1;min-width:0;overflow:auto;padding:12px 16px;-webkit-overflow-scrolling:touch}._contentEmpty_1bepf_153{height:100%;display:flex;align-items:center;justify-content:center}._contentInner_1bepf_160{padding-bottom:20px}._emptyWrap_1bepf_164{display:flex;align-items:center;justify-content:center;height:200px}._roleHeader_1bepf_172{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:nowrap}._roleBadge_1bepf_180{font-size:10px;font-weight:600;letter-spacing:.04em;padding:2px 7px;border-radius:4px;flex-shrink:0}._role_user_1bepf_189{background:#3b82f62e;color:#60a5fa;border:1px solid rgba(59,130,246,.3)}._role_assistant_1bepf_195{background:#8b5cf62e;color:#a78bfa;border:1px solid rgba(139,92,246,.3)}._roleLabel_1bepf_201{font-size:11px;color:#666;flex:1;min-width:0}._contentTime_1bepf_208{margin-left:auto;font-size:10px;color:#555;font-family:monospace;flex-shrink:0}._turnDivider_1bepf_216{border:none;border-top:1px solid #1e1e1e;margin:14px 0}._textBlock_1bepf_223{margin-bottom:8px;border:1px solid #222;border-radius:6px;overflow:hidden}._textBlockBar_1bepf_230{display:flex;align-items:center;gap:6px;padding:4px 10px;background:#141414;border-bottom:1px solid #222}._textBlockBody_1bepf_239{padding:10px 12px;font-size:13px;line-height:1.7;color:#d1d5db;word-break:break-word}._textBlockCompact_1bepf_247{position:relative;padding:8px 10px;font-size:12px;color:#aaa}._textBlockCompactFloat_1bepf_254{float:right;margin-left:6px;margin-bottom:2px}._thinkingBlock_1bepf_261{margin-bottom:8px;border:1px solid #2a2a1e;border-radius:6px;overflow:hidden;background:#111108}._thinkingHeader_1bepf_269{display:flex;align-items:center;gap:6px;padding:5px 10px;cursor:pointer;font-size:12px;color:#888;transition:background .15s}._thinkingHeader_1bepf_269:hover{background:#ffffc808}._thinkingPreview_1bepf_284{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#666;font-size:11px}._thinkingBody_1bepf_294{padding:8px 12px;border-top:1px solid #2a2a1e}._toolBlock_1bepf_300{margin-bottom:8px;border:1px solid #222;border-radius:6px;overflow:hidden}._toolBlockResult_1bepf_307{border-color:#1a2a1a}._toolBlockError_1bepf_311{border-color:#2a1a1a}._toolBlockHeader_1bepf_315{display:flex;align-items:center;gap:8px;padding:5px 10px;background:#141414;border-bottom:1px solid #222;font-size:12px;flex-wrap:wrap}._toolBlockBody_1bepf_326{padding:8px 10px;font-size:12px}._toolName_1bepf_331{color:#d1d5db;font-weight:500;font-family:monospace}._toolId_1bepf_337{color:#555;font-size:10px;font-family:monospace;margin-left:auto}._errorLabel_1bepf_344{font-size:10px;color:#f87171;background:#ef44441f;border:1px solid rgba(239,68,68,.25);border-radius:3px;padding:1px 5px}._blockTag_1bepf_354{font-size:9px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;padding:1px 5px;border-radius:3px;background:#1a1a1a;color:#666;border:1px solid #2a2a2a;flex-shrink:0}._blockTagText_1bepf_367{background:#3b82f61a;color:#60a5fa;border-color:#3b82f633}._blockTagThinking_1bepf_373{background:#eab3081a;color:#ca8a04;border-color:#eab30833}._blockTagResult_1bepf_379{background:#22c55e1a;color:#4ade80;border-color:#22c55e33}._blockTagError_1bepf_385{background:#ef44441a;color:#f87171;border-color:#ef444433}._jsonBlock_1bepf_392{margin-bottom:8px;border:1px solid #222;border-radius:6px;overflow:hidden}._jsonBlockLabel_1bepf_399{font-size:10px;color:#666;padding:3px 10px;background:#141414;border-bottom:1px solid #222;font-family:monospace}._blockSeparator_1bepf_409{border:none;border-top:1px solid #2a2a2a;margin:16px 0}._markdownBody_1bepf_416{font-size:13px;line-height:1.7;color:#d1d5db;word-break:break-word}._container_i6t4e_1{height:100%;overflow:auto;padding:0 16px;-webkit-overflow-scrolling:touch;will-change:scroll-position}._emptyState_i6t4e_9{display:flex;align-items:center;justify-content:center;height:100%}._urlSection_i6t4e_16{padding:12px 0;border-bottom:1px solid #1f1f1f;display:flex;align-items:flex-start}._urlLeft_i6t4e_23{flex:1;min-width:0}._tokenStatsBox_i6t4e_28{flex-shrink:0;padding-left:12px;display:flex;align-items:center}._tokenGrid_i6t4e_35{display:flex;border:1px solid #303030;border-radius:6px;overflow:hidden;min-width:360px;font-size:11px;line-height:1.6}._tokenRows_i6t4e_45{flex:1}._tokenRow_i6t4e_45{display:flex}._tokenRowBorder_i6t4e_53{border-top:1px solid #303030}._tokenLabel_i6t4e_57{color:#888;padding:4px 8px;white-space:nowrap;font-weight:600}._tokenTd_i6t4e_64{flex:1;color:#d1d5db;text-align:right;padding:4px 8px;font-family:monospace;white-space:nowrap}._tokenHitRate_i6t4e_73{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#d1d5db;padding:4px 8px;font-family:monospace;white-space:nowrap;border-left:1px solid #303030;min-width:100px}._tokenHitRateLabel_i6t4e_86{color:#888;font-size:10px;font-family:sans-serif}._tokenRowBorder_i6t4e_53 td{border-top:1px solid #303030}._urlText_i6t4e_96{color:#d1d5db;font-size:13px;margin-bottom:8px;word-break:break-all}._metaText_i6t4e_103,._headersContainer_i6t4e_107{font-size:12px}._headerRow_i6t4e_111{display:flex;padding:4px 0;border-bottom:1px solid #1f1f1f}._headerKey_i6t4e_117{min-width:200px;flex-shrink:0}._headerValue_i6t4e_122{word-break:break-all;margin-left:8px}._streamingBox_i6t4e_127{padding:20px;background:#1a1a1a;border-radius:6px;border:1px solid #2a2a2a}._bodyToolbar_i6t4e_134{display:flex;gap:8px;margin-bottom:8px}._rawTextPre_i6t4e_140{background:#0d1117;border:1px solid #2a2a2a;border-radius:6px;padding:12px;font-size:12px;color:#e5e7eb;overflow:auto;max-height:600px;white-space:pre-wrap;word-break:break-all}._tabContent_i6t4e_153{padding:12px 0}._collapseSpacing_i6t4e_157{margin-bottom:16px}._bodyLabel_i6t4e_161{margin:0}._bodyHeader_i6t4e_165{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}._diffSection_i6t4e_172{margin-bottom:16px}._diffToggle_i6t4e_176{display:inline-block;margin-bottom:8px;cursor:pointer}._diffIcon_i6t4e_182{font-size:12px;margin-left:4px}._viewInChatBtn_i6t4e_187{display:inline-flex;align-items:center;height:26px;border-radius:13px;border:1px solid #424242;background:transparent;color:#888;cursor:pointer;font-size:12px;transition:all .2s;padding:0 10px;white-space:nowrap}._viewInChatBtn_i6t4e_187:hover{border-color:#666;color:#d1d5db;background:#ffffff0f}._reminderSelect_i6t4e_208{min-width:140px;font-size:12px}._reminderSelect_i6t4e_208 .ant-select-selector{border-radius:2px!important;border-color:#424242!important;background:transparent!important;min-height:26px!important;height:auto!important;padding:0 8px!important;font-family:monospace}._reminderSelect_i6t4e_208 .ant-select-selection-placeholder{font-size:11px}._wrapper_1ovxs_1{margin:6px 0;background:#1a1a2e;border:1px solid #2a2a3e;border-radius:8px;padding:8px 12px}._header_1ovxs_9{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}._headerRight_1ovxs_16{display:flex;align-items:center;gap:12px}._filePath_1ovxs_22{color:#a78bfa;font-size:12px;font-weight:600}._toggle_1ovxs_28{color:#6b7280;font-size:11px;cursor:pointer;-webkit-user-select:none;user-select:none}._diffSummary_1ovxs_35{font-size:11px;color:#6b7280}._tableWrap_1ovxs_40{overflow-x:auto}._diffTable_1ovxs_44{width:100%;border-collapse:collapse;font-family:SF Mono,Cascadia Code,Fira Code,Menlo,Consolas,monospace;font-size:12px;line-height:1.5;table-layout:fixed}._diffTable_1ovxs_44 td{padding:0 4px;white-space:pre;vertical-align:top}._lineNumOld_1ovxs_59,._lineNumNew_1ovxs_60{width:var(--line-num-w, 40px);min-width:var(--line-num-w, 40px);max-width:var(--line-num-w, 40px);text-align:right;color:#484f58;-webkit-user-select:none;user-select:none;padding-right:6px}._prefix_1ovxs_70{width:16px;min-width:16px;max-width:16px;text-align:center;-webkit-user-select:none;user-select:none;font-weight:600}._lineContent_1ovxs_79{width:100%;overflow:hidden;text-overflow:ellipsis}._rowContext_1ovxs_85 td{color:#8b949e}._rowDel_1ovxs_89{background:#ef44441f}._rowDel_1ovxs_89 td{color:#fca5a5}._rowDel_1ovxs_89 ._prefix_1ovxs_70{color:#ef4444}._rowAdd_1ovxs_99{background:#22c55e1f}._rowAdd_1ovxs_99 td{color:#86efac}._rowAdd_1ovxs_99 ._prefix_1ovxs_70{color:#22c55e}._plainResult_1uh60_1{background:#111;border-radius:6px;font-size:12px}._plainTitle_1uh60_7{font-size:11px}._plainPre_1uh60_11{color:#d1d5db;margin:0;white-space:pre-wrap;word-break:break-all;font-size:12px;padding:8px 12px}._codeResult_1uh60_20{background:#0d1117;border-radius:6px;border:1px solid #1e2a3a;overflow:hidden}._codeHeader_1uh60_27{display:flex;justify-content:space-between;align-items:center;padding:4px 10px;background:#161b22;border-bottom:1px solid #1e2a3a}._codeTitle_1uh60_36{font-size:11px;color:#8b949e}._codeToggle_1uh60_41{font-size:11px;color:#484f58;cursor:pointer;-webkit-user-select:none;user-select:none}._codePre_1uh60_48{margin:0;padding:8px 12px;font-size:12px;line-height:1.5;overflow:auto;max-height:500px}._markdownBody_1uh60_57{padding:8px 12px;font-size:13px;line-height:1.6;overflow:auto;max-height:500px}._avatar_w9l4s_3{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}._avatarImg_w9l4s_13{width:32px;height:32px;border-radius:50%;flex-shrink:0;object-fit:cover}._bubble_w9l4s_21{border-radius:8px;padding:10px 14px;max-width:100%;font-size:14px;line-height:1.6;word-break:break-word}._messageRow_w9l4s_32{display:flex;gap:10px;padding:8px 0}._messageRowEnd_w9l4s_38{display:flex;gap:10px;padding:8px 0;justify-content:flex-end}._contentCol_w9l4s_47{min-width:0;flex:1}._contentColLimited_w9l4s_52{min-width:0;max-width:80%;width:fit-content}._labelRow_w9l4s_60{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px}._labelRowEnd_w9l4s_67{display:flex;justify-content:flex-end;align-items:center;margin-bottom:2px}._labelRight_w9l4s_74{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}._labelText_w9l4s_82{font-size:11px}._timeText_w9l4s_86,._timeTextNoMargin_w9l4s_92{font-size:10px;color:#6b7280;flex-shrink:0}._labelTextRight_w9l4s_98{font-size:11px;margin-left:auto}._bubbleUser_w9l4s_105{background:#1668dc;color:#e5e7eb}._bubbleAssistant_w9l4s_111{background:#141414;color:#e5e7eb;transition:box-shadow 0s;position:relative}._bubbleHighlight_w9l4s_119{box-shadow:0 0 10px #1668dc99}._bubbleHighlightFading_w9l4s_123{box-shadow:0 0 10px #1668dc00;transition:box-shadow 5s ease-out}._borderSvg_w9l4s_128{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}._borderSvgFading_w9l4s_137{opacity:0;transition:opacity 5s ease-out}._borderRect_w9l4s_142{animation:_dashRotate_w9l4s_1 4s linear infinite}@keyframes _dashRotate_w9l4s_1{0%{stroke-dashoffset:0}to{stroke-dashoffset:-100}}._bubblePlan_w9l4s_151{background:#141428;border:5px solid #1668dc;font-size:12px;color:#e5e7eb}._bubbleSubAgent_w9l4s_159{background:#1a1a2e;color:#e5e7eb}._bubbleSelection_w9l4s_165{background:#1a3a1a;color:#e5e7eb}._systemTagLabel_w9l4s_173{font-size:12px}._skillLabel_w9l4s_177{font-size:12px;color:#a78bfa}._systemTagPre_w9l4s_182{font-size:12px;color:#9ca3af;white-space:pre-wrap;word-break:break-all;margin:0}._collapseMargin_w9l4s_190{margin:4px 0}._collapseNoMargin_w9l4s_194{margin:0}._thinkingLabel_w9l4s_200{font-size:12px}._toolBox_w9l4s_206{background:#1a1a2e;border:1px solid #2a2a3e;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._toolLabel_w9l4s_215{color:#a78bfa}._codePre_w9l4s_221{font-size:12px;margin:4px 0 0;white-space:pre-wrap;word-break:break-all;background:#0d1117;border-radius:4px;padding:6px 8px}._pathTag_w9l4s_233{color:#7dd3fc;font-size:11px}._descSpan_w9l4s_240{color:#6b7280;font-weight:400}._secondarySpan_w9l4s_245{color:#6b7280}._patternSpan_w9l4s_249{color:#fbbf24}._kvContainer_w9l4s_255{margin-top:4px;font-size:11px}._kvItem_w9l4s_260{margin:2px 0}._kvKey_w9l4s_264{color:#7dd3fc}._kvValue_w9l4s_268{color:#9ca3af}._toolResult_w9l4s_274{background:#111827;border:1px solid #1e293b;border-radius:6px;padding:6px 10px;margin:2px 0 6px;font-size:11px}._toolResultLabel_w9l4s_283{font-size:11px}._compactLabel_w9l4s_289{font-size:12px;color:#93c5fd}._compactPre_w9l4s_294{font-size:12px;color:#d1d5db;white-space:pre-wrap;word-break:break-all;margin:0}._viewRequestBtn_w9l4s_304{font-size:10px;color:#555;cursor:pointer;margin-left:6px;flex-shrink:0}._viewRequestBtn_w9l4s_304:hover{color:#93c5fd}._optionList_w9l4s_318{padding-left:8px}._optionDesc_w9l4s_322{color:#555;margin-left:6px;font-weight:400}._questionText_w9l4s_330{font-size:13px;color:#ccc;margin-bottom:4px}._questionSpacing_w9l4s_336{margin-bottom:10px}._option_w9l4s_318{font-size:12px;padding:1px 0}._askQuestionBox_w9l4s_349{background:#0d1f0d;border:1px solid #2ea043;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._askQuestionHeader_w9l4s_358{display:inline-block;background:#1a3a1a;color:#7ee787;font-size:10px;padding:1px 6px;border-radius:4px;margin-bottom:4px;font-weight:600}._askQuestionText_w9l4s_369{color:#e5e7eb;font-size:13px;margin-bottom:4px}._askOptionItem_w9l4s_375{font-size:12px;color:#9ca3af;padding:1px 0}._planModeBox_w9l4s_383{background:#0d1528;border:1px solid #1668dc;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._planModeLabel_w9l4s_392{color:#93c5fd;font-weight:600}._planModePermissions_w9l4s_397{margin-top:6px;padding-top:6px;border-top:1px solid #1e3a5f}._planModePermLabel_w9l4s_403{color:#6b7280;font-size:11px;margin-bottom:2px}/**
|
|
1
|
+
body{margin:0;background-color:#0d0d0d}*{scrollbar-width:thin;scrollbar-color:#3a3a3a #0d0d0d}@media(pointer:coarse){*{scrollbar-width:auto;scrollbar-color:auto}}@media(pointer:fine){*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:#0d0d0d}*::-webkit-scrollbar-thumb{background:#3a3a3a;border-radius:3px}*::-webkit-scrollbar-thumb:hover{background:#555}}.code-highlight{color:#e6edf3}.hl-keyword{color:#ff7b72}.hl-string{color:#a5d6ff}.hl-comment{color:#8b949e;font-style:italic}.hl-number{color:#79c0ff}.hl-linenum{color:#484f58;-webkit-user-select:none;user-select:none}.chat-md pre{background:#0d1117;border:1px solid #2a2a2a;border-radius:6px;padding:12px;overflow-x:auto;font-size:13px;line-height:1.5}.chat-md code{background:#1a1a2e;padding:2px 6px;border-radius:4px;font-size:13px;color:#e5e7eb}.chat-md pre code{background:none;padding:0}.chat-md p{margin:6px 0}.chat-md ul,.chat-md ol{padding-left:20px;margin:6px 0}.chat-md li{margin:2px 0}.chat-md h1,.chat-md h2,.chat-md h3{margin:12px 0 6px;color:#fff}.chat-md h1{font-size:1.3em}.chat-md h2{font-size:1.15em}.chat-md h3{font-size:1.05em}.chat-md blockquote{border-left:3px solid #3b82f6;margin:8px 0;padding:4px 12px;color:#9ca3af}.chat-md table{border-collapse:collapse;margin:8px 0;font-size:13px}.chat-md th,.chat-md td{border:1px solid #2a2a2a;padding:6px 10px}.chat-md th{background:#1a1a1a;color:#fff}.chat-md a{color:#60a5fa}.chat-md hr{border:none;border-top:1px solid #2a2a2a;margin:12px 0}.chat-md strong{color:#f1f5f9}.chat-md em{color:#cbd5e1}.ant-tooltip .ant-tooltip-inner{background-color:#090909}.ant-tooltip .ant-tooltip-arrow:before,.ant-tooltip .ant-tooltip-arrow:after{background:#090909}._helpBtn_ovmho_1{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#1a1a1a;border:1px solid #444;color:#aaa;font-size:11px;line-height:1;cursor:pointer;margin-left:4px;vertical-align:middle;transition:background .2s;-webkit-user-select:none;user-select:none}._helpBtn_ovmho_1:hover{background:#333}._modalBody_ovmho_24{max-height:60vh;overflow-y:auto;overflow-x:hidden;line-height:1.7;color:#d9d9d9;word-break:break-word}._modalBody_ovmho_24 h1,._modalBody_ovmho_24 h2,._modalBody_ovmho_24 h3{margin-top:.8em;color:#f0f0f0}._modalBody_ovmho_24 p{margin:.5em 0}._modalBody_ovmho_24 code{background:#2a2a2a;padding:1px 4px;border-radius:3px;font-size:.9em;color:#e8ab6a}._modalBody_ovmho_24 pre{background:#1a1a1a;padding:12px;border-radius:6px;overflow-x:auto;color:#d9d9d9;max-width:100%;box-sizing:border-box}._modalBody_ovmho_24 a{color:#5b9bd5}._modalBody_ovmho_24 strong{color:#f0f0f0}._spinWrap_ovmho_70{display:flex;justify-content:center;padding:40px 0}._modalBody_ovmho_24 textarea{width:100%;min-height:200px;background:#1a1a1a;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:1px solid #333;border-radius:6px;padding:10px 14px;resize:vertical;outline:none;box-sizing:border-box}@media(max-width:768px){._modalBody_ovmho_24{font-size:13px;line-height:1.6;max-height:75vh}._modalBody_ovmho_24 h1{font-size:18px}._modalBody_ovmho_24 h2{font-size:16px}._modalBody_ovmho_24 h3{font-size:14px}._modalBody_ovmho_24 pre{font-size:12px;padding:8px}._modalBody_ovmho_24 code,._modalBody_ovmho_24 textarea{font-size:12px}}._headerBar_1oh31_2{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%}._titleText_1oh31_11{color:#fff;font-size:18px;cursor:pointer}._logoImage_1oh31_17{height:24px;width:24px;margin-right:6px;border-radius:3px;vertical-align:text-bottom}._titleArrow_1oh31_25{font-size:12px;margin-left:4px}._tokenStatsTag_1oh31_31{border-radius:12px;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;color:#ccc}._tokenStatsIcon_1oh31_39{margin-right:4px}._liveTag_1oh31_44{border-radius:12px}._liveDotWrap_1oh31_48{display:inline-flex;align-items:center;justify-content:center;width:10px;height:10px;vertical-align:middle;margin-right:2px;position:relative;top:-1px}._liveTag_1oh31_44 .ant-badge-status-processing{animation:_breathe_1oh31_1 2.5s ease-in-out infinite}@keyframes _breathe_1oh31_1{0%,to{opacity:.4;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}._liveSpinner_1oh31_70{display:block;animation:_spinPlusStar_1oh31_1 2s linear infinite}._liveSpinnerDiag_1oh31_75{animation:_diagFade_1oh31_1 2s ease-in-out infinite}@keyframes _spinPlusStar_1oh31_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _diagFade_1oh31_1{0%,to{opacity:1}50%{opacity:0}}._inflightList_1oh31_90{min-width:180px}._inflightItem_1oh31_94{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12px}._inflightItem_1oh31_94+._inflightItem_1oh31_94{border-top:1px solid #333}._inflightTag_1oh31_106{color:#52c41a;font-weight:500;white-space:nowrap}._inflightModel_1oh31_112{color:#999;white-space:nowrap}._inflightTime_1oh31_117{color:#666;margin-left:auto;white-space:nowrap}._liveTagHistory_1oh31_123{background:#2a2a2a;border-color:#424242;color:#d1d5db}._liveTagText_1oh31_129{margin-left:4px}._countdownStrong_1oh31_134{font-variant-numeric:tabular-nums}._qrcodePopover_1oh31_139{display:flex;flex-direction:column;align-items:center;padding:8px}._qrcodeSection_1oh31_146{display:flex;flex-direction:column;align-items:center;padding:16px;margin-bottom:12px;border:1px solid #333;border-radius:8px;background:#111}._qrcodeTitle_1oh31_157{font-size:14px;font-weight:600;color:#e5e5e5;margin-bottom:12px}._qrcodeUrlInput_1oh31_164{margin-top:12px;font-size:12px;font-family:Menlo,Monaco,monospace}._qrcodeUrlCopy_1oh31_170{cursor:pointer;color:#888;transition:color .2s}._qrcodeUrlCopy_1oh31_170:hover{color:#3b82f6}._settingsGroupBox_1oh31_181{border:1px solid #333;border-radius:8px;background:#111;padding:4px 16px;margin-bottom:12px}._settingsGroupTitle_1oh31_189{font-size:14px;font-weight:600;color:#e5e5e5;padding:12px 0 4px;border-bottom:1px solid #333}._settingsItem_1oh31_198{display:flex;justify-content:space-between;align-items:center;padding:12px 0}._settingsLabel_1oh31_205{font-size:14px}._tokenStatsEmpty_1oh31_210{padding:8px 4px;color:#999;font-size:13px}._tokenStatsContainer_1oh31_217{display:flex;gap:12px;align-items:flex-start}._tokenStatsColumn_1oh31_223{min-width:240px}._toolStatsColumn_1oh31_227{min-width:180px}._modelCard_1oh31_232{border:1px solid #333;border-radius:6px;padding:8px 10px;background:#111}._modelCardSpaced_1oh31_239{margin-bottom:10px}._modelName_1oh31_245{font-size:13px;font-weight:600;color:#e5e5e5;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._statsTable_1oh31_255{width:100%;border-collapse:collapse}._th_1oh31_260{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#888;font-weight:400;text-align:right}._td_1oh31_270{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#e5e5e5;text-align:right}._label_1oh31_279{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#aaa;font-weight:400;text-align:left}._rowBorder_1oh31_289{border-bottom:1px solid #2a2a2a}._rebuildCard_1oh31_293{border:1px solid #333;border-radius:6px;padding:8px 10px;margin-top:10px;background:#111}._rebuildTotalRow_1oh31_301{border-top:1px solid #444}._rebuildTotalRow_1oh31_301 td{font-weight:600}._promptExportBar_1oh31_310{margin-bottom:12px}._promptScrollArea_1oh31_314{max-height:500px;overflow:auto}._promptEmpty_1oh31_319{color:#999;padding:12px}._promptTimestamp_1oh31_325{color:#666;font-size:12px;margin:12px 0 4px;padding-bottom:6px}._textPromptCard_1oh31_333{margin:4px 0;background:#141414;border-radius:6px;border:1px solid #303030;padding:10px 14px}._preText_1oh31_342{white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.6;color:#d9d9d9;margin:4px 0}._systemCollapse_1oh31_352{margin:4px 0;background:#1a1a1a;border:1px solid #303030;border-radius:6px}._systemLabel_1oh31_359{color:#888;font-size:12px}._preSys_1oh31_364{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#999;margin:0}._promptTextarea_1oh31_374{box-sizing:border-box;background:#000;width:100%;min-height:400px;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:none;resize:vertical;padding:10px 14px;outline:none}._projectStatsCenter_1oh31_390{display:flex;justify-content:center;padding:40px 0}._projectStatsEmpty_1oh31_396{color:#999;padding:40px 0;text-align:center;font-size:13px}._projectStatsContent_1oh31_403{display:flex;flex-direction:column;gap:16px}._projectStatsUpdated_1oh31_409{color:#666;font-size:12px;text-align:right}._projectStatsSummary_1oh31_415{display:grid;grid-template-columns:1fr 1fr;gap:10px}._projectStatCard_1oh31_421{background:#111;border:1px solid #333;border-radius:8px;padding:14px 12px;text-align:center}._projectStatValue_1oh31_429{font-size:22px;font-weight:700;color:#e5e5e5;font-family:monospace;font-variant-numeric:tabular-nums}._projectStatLabel_1oh31_437{font-size:12px;color:#888;margin-top:4px}._projectStatsSection_1oh31_443{display:flex;flex-direction:column;gap:10px}._projectStatsSectionTitle_1oh31_449{font-size:14px;font-weight:600;color:#ccc;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelCard_1oh31_457{background:#111;border:1px solid #333;border-radius:6px;padding:10px 12px}._projectStatsModelHeader_1oh31_464{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelName_1oh31_473{font-size:13px;font-weight:600;color:#e5e5e5}._projectStatsModelCount_1oh31_479{font-size:12px;color:#888;font-family:monospace}._pluginDirHint_1oh31_486{margin-bottom:12px;font-size:12px;color:#888}._pluginDirPath_1oh31_492{font-family:Menlo,Monaco,monospace;color:#aaa;cursor:pointer;padding:1px 4px;border-radius:3px;background:#1a1a1a}._pluginDirPath_1oh31_492:hover{color:#3b82f6}._pluginList_1oh31_505{display:flex;flex-direction:column;gap:8px}._pluginItem_1oh31_511{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #303030;border-radius:6px;background:#141414}._pluginInfo_1oh31_521{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}._pluginName_1oh31_529{font-size:14px;color:#e5e5e5;font-weight:500}._pluginFile_1oh31_535{font-size:12px;color:#666;font-family:Menlo,Monaco,monospace}._pluginHooks_1oh31_541{display:flex;gap:4px;flex-wrap:wrap;margin-top:2px}._pluginHookTag_1oh31_548{font-size:11px;padding:0 5px;border-radius:3px;background:#1e3a5f;color:#6cb6ff;line-height:18px}._pluginActions_1oh31_557{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:12px}._pluginEmpty_1oh31_565{text-align:center;padding:32px 0;color:#999}._centerEmpty_oxhcp_1{display:flex;align-items:center;justify-content:center;height:100%}._scrollContainer_oxhcp_8{overflow:auto;height:100%;-webkit-overflow-scrolling:touch;will-change:scroll-position}._listItem_oxhcp_15{cursor:pointer;padding:8px 12px;border-left:3px solid transparent;border-bottom:1px solid #1f1f1f;transition:background .15s}._listItem_oxhcp_15:hover{background:#151515}._listItemActive_oxhcp_27{background:#1a2332;border-left-color:#3b82f6}._listItemActive_oxhcp_27:hover{background:#1a2332}._itemContent_oxhcp_36{width:100%;min-width:0}._itemHeader_oxhcp_41{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-size:12px}._tagNoMargin_oxhcp_49{margin:0;font-size:12px}._modelName_oxhcp_54{font-size:12px}._time_oxhcp_58{font-size:12px;color:#6b7280;margin-left:auto}._detailRow_oxhcp_64{display:flex;gap:8px;font-size:12px;align-items:center}._urlText_oxhcp_71{color:#555;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}._duration_oxhcp_80{color:#6b7280;flex-shrink:0}._statusOk_oxhcp_85{color:#52c41a;opacity:.5;flex-shrink:0}._statusErr_oxhcp_91{color:#ef4444;flex-shrink:0}._statusDefault_oxhcp_96{color:#9ca3af;flex-shrink:0}._usageBox_oxhcp_101{background:#111;border-radius:4px;padding:3px 6px;margin-top:4px;font-size:12px;color:#6b7280;line-height:1.6}._cacheDot_oxhcp_111{display:inline-block;width:6px;height:6px;border-radius:50%;margin:0 3px;vertical-align:middle}._cacheDotLoss_oxhcp_120{background-color:#8b1a1a;cursor:help}._cacheDotNormal_oxhcp_125{background-color:#3a3a3a}._GzYRV{line-height:1.2;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{font-size:1.2em;margin-right:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{font-weight:600;margin-right:5px;color:#000}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{font-weight:bolder;margin-right:5px;color:#fdf6e3}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}._container_1h2lr_1{background:#0d1117;border-radius:6px;border:1px solid #2a2a2a;padding:12px;font-size:13px;font-family:monospace;overflow:auto}._tag_17wfp_1{display:inline-block;font-size:10px;color:#6b7280;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:3px;padding:0 4px;margin-left:6px;cursor:pointer;line-height:18px;vertical-align:middle;transition:color .2s,border-color .2s;-webkit-user-select:none;user-select:none}._tag_17wfp_1:hover{color:#93c5fd;border-color:#93c5fd4d}._tagActive_17wfp_22{color:#93c5fd;border-color:#93c5fd40}._tagLoading_17wfp_27{cursor:wait;opacity:.7}._spinner_17wfp_32{display:inline-block;width:10px;height:10px;border:1.5px solid rgba(147,197,253,.3);border-top-color:#93c5fd;border-radius:50%;animation:_spin_17wfp_32 .6s linear infinite;margin-right:3px;vertical-align:middle}@keyframes _spin_17wfp_32{to{transform:rotate(360deg)}}._root_1bepf_1{display:flex;height:100%;min-height:0;gap:0}._sidebar_1bepf_9{width:220px;flex-shrink:0;border-right:1px solid #2a2a2a;overflow-y:auto;padding:4px 0;-webkit-overflow-scrolling:touch}._section_1bepf_18{-webkit-user-select:none;user-select:none}._sectionHeader_1bepf_22{display:flex;align-items:center;gap:6px;padding:6px 10px;cursor:pointer;color:#d1d5db;font-size:12px;font-weight:600;transition:background .15s}._sectionHeader_1bepf_22:hover{background:#ffffff0d}._arrow_1bepf_38{font-size:10px;color:#888;flex-shrink:0}._sectionTitle_1bepf_44{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._sectionCount_1bepf_52{font-size:11px;color:#666;background:#1f1f1f;border-radius:10px;padding:0 6px;line-height:18px}._sectionBody_1bepf_61{padding:2px 0}._historyToggle_1bepf_66{display:flex;align-items:center;gap:6px;padding:4px 10px 4px 14px;cursor:pointer;color:#666;font-size:11px;transition:color .15s,background .15s}._historyToggle_1bepf_66:hover{color:#888;background:#ffffff08}._historyToggleLabel_1bepf_82{flex:1}._item_1bepf_87{display:flex;align-items:center;justify-content:space-between;padding:5px 10px 5px 24px;font-size:12px;color:#888;cursor:pointer;transition:background .15s,color .15s}._item_1bepf_87:hover{background:#ffffff0a;color:#d1d5db}._itemActive_1bepf_103{background:#63b3ed1f;color:#63b3ed}._itemActive_1bepf_103:hover{background:#63b3ed29;color:#63b3ed}._itemContent_1bepf_113{flex:1;min-width:0;overflow:hidden}._itemLabel_1bepf_119{font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}._itemSublabel_1bepf_127{font-size:10px;color:#555;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}._itemTime_1bepf_136{font-size:9px;color:#555;flex-shrink:0;margin-left:4px;font-family:monospace}._content_1bepf_145{flex:1;min-width:0;overflow:auto;padding:12px 16px;-webkit-overflow-scrolling:touch}._contentEmpty_1bepf_153{height:100%;display:flex;align-items:center;justify-content:center}._contentInner_1bepf_160{padding-bottom:20px}._emptyWrap_1bepf_164{display:flex;align-items:center;justify-content:center;height:200px}._roleHeader_1bepf_172{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:nowrap}._roleBadge_1bepf_180{font-size:10px;font-weight:600;letter-spacing:.04em;padding:2px 7px;border-radius:4px;flex-shrink:0}._role_user_1bepf_189{background:#3b82f62e;color:#60a5fa;border:1px solid rgba(59,130,246,.3)}._role_assistant_1bepf_195{background:#8b5cf62e;color:#a78bfa;border:1px solid rgba(139,92,246,.3)}._roleLabel_1bepf_201{font-size:11px;color:#666;flex:1;min-width:0}._contentTime_1bepf_208{margin-left:auto;font-size:10px;color:#555;font-family:monospace;flex-shrink:0}._turnDivider_1bepf_216{border:none;border-top:1px solid #1e1e1e;margin:14px 0}._textBlock_1bepf_223{margin-bottom:8px;border:1px solid #222;border-radius:6px;overflow:hidden}._textBlockBar_1bepf_230{display:flex;align-items:center;gap:6px;padding:4px 10px;background:#141414;border-bottom:1px solid #222}._textBlockBody_1bepf_239{padding:10px 12px;font-size:13px;line-height:1.7;color:#d1d5db;word-break:break-word}._textBlockCompact_1bepf_247{position:relative;padding:8px 10px;font-size:12px;color:#aaa}._textBlockCompactFloat_1bepf_254{float:right;margin-left:6px;margin-bottom:2px}._thinkingBlock_1bepf_261{margin-bottom:8px;border:1px solid #2a2a1e;border-radius:6px;overflow:hidden;background:#111108}._thinkingHeader_1bepf_269{display:flex;align-items:center;gap:6px;padding:5px 10px;cursor:pointer;font-size:12px;color:#888;transition:background .15s}._thinkingHeader_1bepf_269:hover{background:#ffffc808}._thinkingPreview_1bepf_284{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#666;font-size:11px}._thinkingBody_1bepf_294{padding:8px 12px;border-top:1px solid #2a2a1e}._toolBlock_1bepf_300{margin-bottom:8px;border:1px solid #222;border-radius:6px;overflow:hidden}._toolBlockResult_1bepf_307{border-color:#1a2a1a}._toolBlockError_1bepf_311{border-color:#2a1a1a}._toolBlockHeader_1bepf_315{display:flex;align-items:center;gap:8px;padding:5px 10px;background:#141414;border-bottom:1px solid #222;font-size:12px;flex-wrap:wrap}._toolBlockBody_1bepf_326{padding:8px 10px;font-size:12px}._toolName_1bepf_331{color:#d1d5db;font-weight:500;font-family:monospace}._toolId_1bepf_337{color:#555;font-size:10px;font-family:monospace;margin-left:auto}._errorLabel_1bepf_344{font-size:10px;color:#f87171;background:#ef44441f;border:1px solid rgba(239,68,68,.25);border-radius:3px;padding:1px 5px}._blockTag_1bepf_354{font-size:9px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;padding:1px 5px;border-radius:3px;background:#1a1a1a;color:#666;border:1px solid #2a2a2a;flex-shrink:0}._blockTagText_1bepf_367{background:#3b82f61a;color:#60a5fa;border-color:#3b82f633}._blockTagThinking_1bepf_373{background:#eab3081a;color:#ca8a04;border-color:#eab30833}._blockTagResult_1bepf_379{background:#22c55e1a;color:#4ade80;border-color:#22c55e33}._blockTagError_1bepf_385{background:#ef44441a;color:#f87171;border-color:#ef444433}._jsonBlock_1bepf_392{margin-bottom:8px;border:1px solid #222;border-radius:6px;overflow:hidden}._jsonBlockLabel_1bepf_399{font-size:10px;color:#666;padding:3px 10px;background:#141414;border-bottom:1px solid #222;font-family:monospace}._blockSeparator_1bepf_409{border:none;border-top:1px solid #2a2a2a;margin:16px 0}._markdownBody_1bepf_416{font-size:13px;line-height:1.7;color:#d1d5db;word-break:break-word}._container_i6t4e_1{height:100%;overflow:auto;padding:0 16px;-webkit-overflow-scrolling:touch;will-change:scroll-position}._emptyState_i6t4e_9{display:flex;align-items:center;justify-content:center;height:100%}._urlSection_i6t4e_16{padding:12px 0;border-bottom:1px solid #1f1f1f;display:flex;align-items:flex-start}._urlLeft_i6t4e_23{flex:1;min-width:0}._tokenStatsBox_i6t4e_28{flex-shrink:0;padding-left:12px;display:flex;align-items:center}._tokenGrid_i6t4e_35{display:flex;border:1px solid #303030;border-radius:6px;overflow:hidden;min-width:360px;font-size:11px;line-height:1.6}._tokenRows_i6t4e_45{flex:1}._tokenRow_i6t4e_45{display:flex}._tokenRowBorder_i6t4e_53{border-top:1px solid #303030}._tokenLabel_i6t4e_57{color:#888;padding:4px 8px;white-space:nowrap;font-weight:600}._tokenTd_i6t4e_64{flex:1;color:#d1d5db;text-align:right;padding:4px 8px;font-family:monospace;white-space:nowrap}._tokenHitRate_i6t4e_73{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#d1d5db;padding:4px 8px;font-family:monospace;white-space:nowrap;border-left:1px solid #303030;min-width:100px}._tokenHitRateLabel_i6t4e_86{color:#888;font-size:10px;font-family:sans-serif}._tokenRowBorder_i6t4e_53 td{border-top:1px solid #303030}._urlText_i6t4e_96{color:#d1d5db;font-size:13px;margin-bottom:8px;word-break:break-all}._metaText_i6t4e_103,._headersContainer_i6t4e_107{font-size:12px}._headerRow_i6t4e_111{display:flex;padding:4px 0;border-bottom:1px solid #1f1f1f}._headerKey_i6t4e_117{min-width:200px;flex-shrink:0}._headerValue_i6t4e_122{word-break:break-all;margin-left:8px}._streamingBox_i6t4e_127{padding:20px;background:#1a1a1a;border-radius:6px;border:1px solid #2a2a2a}._bodyToolbar_i6t4e_134{display:flex;gap:8px;margin-bottom:8px}._rawTextPre_i6t4e_140{background:#0d1117;border:1px solid #2a2a2a;border-radius:6px;padding:12px;font-size:12px;color:#e5e7eb;overflow:auto;max-height:600px;white-space:pre-wrap;word-break:break-all}._tabContent_i6t4e_153{padding:12px 0}._collapseSpacing_i6t4e_157{margin-bottom:16px}._bodyLabel_i6t4e_161{margin:0}._bodyHeader_i6t4e_165{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}._diffSection_i6t4e_172{margin-bottom:16px}._diffToggle_i6t4e_176{display:inline-block;margin-bottom:8px;cursor:pointer}._diffIcon_i6t4e_182{font-size:12px;margin-left:4px}._viewInChatBtn_i6t4e_187{display:inline-flex;align-items:center;height:26px;border-radius:13px;border:1px solid #424242;background:transparent;color:#888;cursor:pointer;font-size:12px;transition:all .2s;padding:0 10px;white-space:nowrap}._viewInChatBtn_i6t4e_187:hover{border-color:#666;color:#d1d5db;background:#ffffff0f}._reminderSelect_i6t4e_208{min-width:140px;font-size:12px}._reminderSelect_i6t4e_208 .ant-select-selector{border-radius:2px!important;border-color:#424242!important;background:transparent!important;min-height:26px!important;height:auto!important;padding:0 8px!important;font-family:monospace}._reminderSelect_i6t4e_208 .ant-select-selection-placeholder{font-size:11px}._wrapper_xav1m_1{margin:6px 0;background:#1a1a2e;border:1px solid #2a2a3e;border-radius:8px;padding:8px 12px}._header_xav1m_9{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}._headerRight_xav1m_16{display:flex;align-items:center;gap:12px;flex-shrink:0;white-space:nowrap}._filePath_xav1m_24{color:#a78bfa;font-size:12px;font-weight:600}._toggle_xav1m_30{color:#6b7280;font-size:11px;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;flex-shrink:0}._diffSummary_xav1m_39{font-size:11px;color:#6b7280}._tableWrap_xav1m_44{overflow-x:auto}._diffTable_xav1m_48{border-collapse:collapse;font-family:SF Mono,Cascadia Code,Fira Code,Menlo,Consolas,monospace;font-size:12px;line-height:1.5}._diffTable_xav1m_48 td{padding:0 4px;white-space:pre;vertical-align:top}._lineNumOld_xav1m_61,._lineNumNew_xav1m_62{width:var(--line-num-w, 40px);min-width:var(--line-num-w, 40px);max-width:var(--line-num-w, 40px);text-align:right;color:#484f58;-webkit-user-select:none;user-select:none;padding-right:6px;position:sticky;z-index:2}._lineNumOld_xav1m_61{left:0}._lineNumNew_xav1m_62{left:var(--line-num-w, 40px)}._prefix_xav1m_82{width:16px;min-width:16px;max-width:16px;text-align:center;-webkit-user-select:none;user-select:none;font-weight:600;position:sticky;left:calc(var(--line-num-w, 40px) * 2);z-index:2}._lineContent_xav1m_94{white-space:pre}._rowContext_xav1m_98{background:#1a1a2e}._rowContext_xav1m_98 td{color:#8b949e}._rowContext_xav1m_98 ._lineNumOld_xav1m_61,._rowContext_xav1m_98 ._lineNumNew_xav1m_62,._rowContext_xav1m_98 ._prefix_xav1m_82{background:#1a1a2e}._rowDel_xav1m_110{background:#ef44441f}._rowDel_xav1m_110 td{color:#fca5a5}._rowDel_xav1m_110 ._prefix_xav1m_82{color:#ef4444}._rowDel_xav1m_110 ._lineNumOld_xav1m_61,._rowDel_xav1m_110 ._lineNumNew_xav1m_62,._rowDel_xav1m_110 ._prefix_xav1m_82{background:#341f31}._rowAdd_xav1m_125{background:#22c55e1f}._rowAdd_xav1m_125 td{color:#86efac}._rowAdd_xav1m_125 ._prefix_xav1m_82{color:#22c55e}._rowAdd_xav1m_125 ._lineNumOld_xav1m_61,._rowAdd_xav1m_125 ._lineNumNew_xav1m_62,._rowAdd_xav1m_125 ._prefix_xav1m_82{background:#1b2f34}._plainResult_1uh60_1{background:#111;border-radius:6px;font-size:12px}._plainTitle_1uh60_7{font-size:11px}._plainPre_1uh60_11{color:#d1d5db;margin:0;white-space:pre-wrap;word-break:break-all;font-size:12px;padding:8px 12px}._codeResult_1uh60_20{background:#0d1117;border-radius:6px;border:1px solid #1e2a3a;overflow:hidden}._codeHeader_1uh60_27{display:flex;justify-content:space-between;align-items:center;padding:4px 10px;background:#161b22;border-bottom:1px solid #1e2a3a}._codeTitle_1uh60_36{font-size:11px;color:#8b949e}._codeToggle_1uh60_41{font-size:11px;color:#484f58;cursor:pointer;-webkit-user-select:none;user-select:none}._codePre_1uh60_48{margin:0;padding:8px 12px;font-size:12px;line-height:1.5;overflow:auto;max-height:500px}._markdownBody_1uh60_57{padding:8px 12px;font-size:13px;line-height:1.6;overflow:auto;max-height:500px}._avatar_w9l4s_3{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}._avatarImg_w9l4s_13{width:32px;height:32px;border-radius:50%;flex-shrink:0;object-fit:cover}._bubble_w9l4s_21{border-radius:8px;padding:10px 14px;max-width:100%;font-size:14px;line-height:1.6;word-break:break-word}._messageRow_w9l4s_32{display:flex;gap:10px;padding:8px 0}._messageRowEnd_w9l4s_38{display:flex;gap:10px;padding:8px 0;justify-content:flex-end}._contentCol_w9l4s_47{min-width:0;flex:1}._contentColLimited_w9l4s_52{min-width:0;max-width:80%;width:fit-content}._labelRow_w9l4s_60{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px}._labelRowEnd_w9l4s_67{display:flex;justify-content:flex-end;align-items:center;margin-bottom:2px}._labelRight_w9l4s_74{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}._labelText_w9l4s_82{font-size:11px}._timeText_w9l4s_86,._timeTextNoMargin_w9l4s_92{font-size:10px;color:#6b7280;flex-shrink:0}._labelTextRight_w9l4s_98{font-size:11px;margin-left:auto}._bubbleUser_w9l4s_105{background:#1668dc;color:#e5e7eb}._bubbleAssistant_w9l4s_111{background:#141414;color:#e5e7eb;transition:box-shadow 0s;position:relative}._bubbleHighlight_w9l4s_119{box-shadow:0 0 10px #1668dc99}._bubbleHighlightFading_w9l4s_123{box-shadow:0 0 10px #1668dc00;transition:box-shadow 5s ease-out}._borderSvg_w9l4s_128{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}._borderSvgFading_w9l4s_137{opacity:0;transition:opacity 5s ease-out}._borderRect_w9l4s_142{animation:_dashRotate_w9l4s_1 4s linear infinite}@keyframes _dashRotate_w9l4s_1{0%{stroke-dashoffset:0}to{stroke-dashoffset:-100}}._bubblePlan_w9l4s_151{background:#141428;border:5px solid #1668dc;font-size:12px;color:#e5e7eb}._bubbleSubAgent_w9l4s_159{background:#1a1a2e;color:#e5e7eb}._bubbleSelection_w9l4s_165{background:#1a3a1a;color:#e5e7eb}._systemTagLabel_w9l4s_173{font-size:12px}._skillLabel_w9l4s_177{font-size:12px;color:#a78bfa}._systemTagPre_w9l4s_182{font-size:12px;color:#9ca3af;white-space:pre-wrap;word-break:break-all;margin:0}._collapseMargin_w9l4s_190{margin:4px 0}._collapseNoMargin_w9l4s_194{margin:0}._thinkingLabel_w9l4s_200{font-size:12px}._toolBox_w9l4s_206{background:#1a1a2e;border:1px solid #2a2a3e;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._toolLabel_w9l4s_215{color:#a78bfa}._codePre_w9l4s_221{font-size:12px;margin:4px 0 0;white-space:pre-wrap;word-break:break-all;background:#0d1117;border-radius:4px;padding:6px 8px}._pathTag_w9l4s_233{color:#7dd3fc;font-size:11px}._descSpan_w9l4s_240{color:#6b7280;font-weight:400}._secondarySpan_w9l4s_245{color:#6b7280}._patternSpan_w9l4s_249{color:#fbbf24}._kvContainer_w9l4s_255{margin-top:4px;font-size:11px}._kvItem_w9l4s_260{margin:2px 0}._kvKey_w9l4s_264{color:#7dd3fc}._kvValue_w9l4s_268{color:#9ca3af}._toolResult_w9l4s_274{background:#111827;border:1px solid #1e293b;border-radius:6px;padding:6px 10px;margin:2px 0 6px;font-size:11px}._toolResultLabel_w9l4s_283{font-size:11px}._compactLabel_w9l4s_289{font-size:12px;color:#93c5fd}._compactPre_w9l4s_294{font-size:12px;color:#d1d5db;white-space:pre-wrap;word-break:break-all;margin:0}._viewRequestBtn_w9l4s_304{font-size:10px;color:#555;cursor:pointer;margin-left:6px;flex-shrink:0}._viewRequestBtn_w9l4s_304:hover{color:#93c5fd}._optionList_w9l4s_318{padding-left:8px}._optionDesc_w9l4s_322{color:#555;margin-left:6px;font-weight:400}._questionText_w9l4s_330{font-size:13px;color:#ccc;margin-bottom:4px}._questionSpacing_w9l4s_336{margin-bottom:10px}._option_w9l4s_318{font-size:12px;padding:1px 0}._askQuestionBox_w9l4s_349{background:#0d1f0d;border:1px solid #2ea043;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._askQuestionHeader_w9l4s_358{display:inline-block;background:#1a3a1a;color:#7ee787;font-size:10px;padding:1px 6px;border-radius:4px;margin-bottom:4px;font-weight:600}._askQuestionText_w9l4s_369{color:#e5e7eb;font-size:13px;margin-bottom:4px}._askOptionItem_w9l4s_375{font-size:12px;color:#9ca3af;padding:1px 0}._planModeBox_w9l4s_383{background:#0d1528;border:1px solid #1668dc;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._planModeLabel_w9l4s_392{color:#93c5fd;font-weight:600}._planModePermissions_w9l4s_397{margin-top:6px;padding-top:6px;border-top:1px solid #1e3a5f}._planModePermLabel_w9l4s_403{color:#6b7280;font-size:11px;margin-bottom:2px}/**
|
|
2
2
|
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
3
|
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
4
|
* https://github.com/chjj/term.js
|
package/dist/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<title>Claude Code Viewer</title>
|
|
7
7
|
<link rel="icon" href="/favicon.ico?v=1">
|
|
8
8
|
<link rel="shortcut icon" href="/favicon.ico?v=1">
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-CDCylIQw.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DanT_EUs.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|