cc-viewer 1.6.172 → 1.6.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/cli.js +10 -3
  2. package/dist/assets/{App-DJ6lxhm-.js → App-qWOkopw9.js} +2 -2
  3. package/dist/assets/AppHeader-Cvooec4y.css +41 -0
  4. package/dist/assets/{AppHeader.module-CRACUDG7.js → AppHeader.module-DMS396h8.js} +33 -33
  5. package/dist/assets/Mobile-D8XbfoDb.js +10 -0
  6. package/dist/assets/{_baseUniq-CeIkZz29.js → _baseUniq-CrD0xpPl.js} +1 -1
  7. package/dist/assets/{arc-CgUcUMGn.js → arc-B1EtGnv1.js} +1 -1
  8. package/dist/assets/{architectureDiagram-Q4EWVU46-rjbm3MfS.js → architectureDiagram-Q4EWVU46-DgmSkgwj.js} +1 -1
  9. package/dist/assets/{blockDiagram-DXYQGD6D-lrpXINN-.js → blockDiagram-DXYQGD6D-ldHYNCP_.js} +1 -1
  10. package/dist/assets/{c4Diagram-AHTNJAMY-BTr3E-Nu.js → c4Diagram-AHTNJAMY-C88-XfL7.js} +1 -1
  11. package/dist/assets/channel-CyEQFtCX.js +1 -0
  12. package/dist/assets/{chunk-4BX2VUAB-D5CX4IVL.js → chunk-4BX2VUAB-CpeAQTum.js} +1 -1
  13. package/dist/assets/{chunk-4TB4RGXK-DIBjbPh5.js → chunk-4TB4RGXK-w1bF_Aax.js} +1 -1
  14. package/dist/assets/{chunk-55IACEB6-CeDHtFm7.js → chunk-55IACEB6-DmFD8aeg.js} +1 -1
  15. package/dist/assets/{chunk-EDXVE4YY-tLDKwMcT.js → chunk-EDXVE4YY-C30g862_.js} +1 -1
  16. package/dist/assets/{chunk-FMBD7UC4-SAzByOX0.js → chunk-FMBD7UC4-DGtNEtew.js} +1 -1
  17. package/dist/assets/{chunk-OYMX7WX6-B4yj-XBK.js → chunk-OYMX7WX6-DnbLchec.js} +1 -1
  18. package/dist/assets/{chunk-QZHKN3VN-C9qetHLp.js → chunk-QZHKN3VN-9tjAlOn6.js} +1 -1
  19. package/dist/assets/{chunk-YZCP3GAM-D5DDIuLb.js → chunk-YZCP3GAM-C8zlNgSy.js} +1 -1
  20. package/dist/assets/classDiagram-6PBFFD2Q-xc7gx6do.js +1 -0
  21. package/dist/assets/classDiagram-v2-HSJHXN6E-xc7gx6do.js +1 -0
  22. package/dist/assets/clone-vjhp4Jg-.js +1 -0
  23. package/dist/assets/{cose-bilkent-S5V4N54A-CvCHWHKd.js → cose-bilkent-S5V4N54A-g7n8jTb9.js} +1 -1
  24. package/dist/assets/{dagre-KV5264BT-DRYdRD0I.js → dagre-KV5264BT-YmgReAHj.js} +1 -1
  25. package/dist/assets/{diagram-5BDNPKRD-Ir95aJNy.js → diagram-5BDNPKRD-CU6AayPx.js} +1 -1
  26. package/dist/assets/{diagram-G4DWMVQ6-Cs7kitSF.js → diagram-G4DWMVQ6-JYHOUlzf.js} +1 -1
  27. package/dist/assets/{diagram-MMDJMWI5-DywjtILp.js → diagram-MMDJMWI5-CK0BEeDL.js} +1 -1
  28. package/dist/assets/{diagram-TYMM5635-B96D4Hx4.js → diagram-TYMM5635-B79ZQ605.js} +1 -1
  29. package/dist/assets/{erDiagram-SMLLAGMA-D2o4UM3A.js → erDiagram-SMLLAGMA-BE0H0mY9.js} +1 -1
  30. package/dist/assets/{flowDiagram-DWJPFMVM-B4RQuSKQ.js → flowDiagram-DWJPFMVM-RPH1z3dw.js} +1 -1
  31. package/dist/assets/{ganttDiagram-T4ZO3ILL-DyIt2YxR.js → ganttDiagram-T4ZO3ILL-CpffhNgS.js} +1 -1
  32. package/dist/assets/{gitGraphDiagram-UUTBAWPF-EEBsNiig.js → gitGraphDiagram-UUTBAWPF-JfK-bMP5.js} +1 -1
  33. package/dist/assets/{graph-0MDrJLzR.js → graph-BM1DxvYu.js} +1 -1
  34. package/dist/assets/{index-BssUV-ro.js → index-Bde8piev.js} +2 -2
  35. package/dist/assets/{infoDiagram-42DDH7IO-Lx--ekdZ.js → infoDiagram-42DDH7IO-DoIoXWsI.js} +1 -1
  36. package/dist/assets/{ishikawaDiagram-UXIWVN3A-_VPUjWYl.js → ishikawaDiagram-UXIWVN3A-5F8HAZ5x.js} +1 -1
  37. package/dist/assets/{journeyDiagram-VCZTEJTY-CSdED5yp.js → journeyDiagram-VCZTEJTY-CmsonEtz.js} +1 -1
  38. package/dist/assets/{kanban-definition-6JOO6SKY-B9wEOAzF.js → kanban-definition-6JOO6SKY-UZ9bWu5-.js} +1 -1
  39. package/dist/assets/{layout-BMqIvQML.js → layout-BpZAjPK8.js} +1 -1
  40. package/dist/assets/{linear-EBoOi153.js → linear-Cx3E0FkS.js} +1 -1
  41. package/dist/assets/{mermaid.core-CFWuAxt_.js → mermaid.core-BCXcdmGC.js} +4 -4
  42. package/dist/assets/{min-BBwdyNA_.js → min-CgmxLJ49.js} +1 -1
  43. package/dist/assets/{mindmap-definition-QFDTVHPH-BOnghuy5.js → mindmap-definition-QFDTVHPH-Vx83q3eA.js} +1 -1
  44. package/dist/assets/{pieDiagram-DEJITSTG-BPcwMcDb.js → pieDiagram-DEJITSTG-gl5e_feW.js} +1 -1
  45. package/dist/assets/{quadrantDiagram-34T5L4WZ-BFqUJUUi.js → quadrantDiagram-34T5L4WZ-gqyCl0QM.js} +1 -1
  46. package/dist/assets/{requirementDiagram-MS252O5E-BdOh0XX_.js → requirementDiagram-MS252O5E-BK06L4ve.js} +1 -1
  47. package/dist/assets/{sankeyDiagram-XADWPNL6-D6ZeSun0.js → sankeyDiagram-XADWPNL6-C1fZQsMf.js} +1 -1
  48. package/dist/assets/{sequenceDiagram-FGHM5R23-DFPpKl88.js → sequenceDiagram-FGHM5R23-5X9encoD.js} +1 -1
  49. package/dist/assets/{stateDiagram-FHFEXIEX-Hbq_Y83Y.js → stateDiagram-FHFEXIEX-CuO6v9SO.js} +1 -1
  50. package/dist/assets/stateDiagram-v2-QKLJ7IA2-Ghhubn9m.js +1 -0
  51. package/dist/assets/{timeline-definition-GMOUNBTQ-oO_LCIkV.js → timeline-definition-GMOUNBTQ-RG5XTlpg.js} +1 -1
  52. package/dist/assets/{vennDiagram-DHZGUBPP-DrYGcnDm.js → vennDiagram-DHZGUBPP-Cvf51Cpv.js} +1 -1
  53. package/dist/assets/{wardley-RL74JXVD-D4kYmL_V.js → wardley-RL74JXVD-Cc68zTTG.js} +1 -1
  54. package/dist/assets/{wardleyDiagram-NUSXRM2D-B5FdNlyF.js → wardleyDiagram-NUSXRM2D-D_Pk-gwB.js} +1 -1
  55. package/dist/assets/{xychartDiagram-5P7HB3ND-DkIxiS0X.js → xychartDiagram-5P7HB3ND-B8L22NRB.js} +1 -1
  56. package/dist/index.html +1 -1
  57. package/package.json +1 -1
  58. package/pty-manager.js +63 -1
  59. package/dist/assets/AppHeader-5M4otyi2.css +0 -41
  60. package/dist/assets/Mobile-Dl__vxRu.js +0 -10
  61. package/dist/assets/channel-DaMu9EmC.js +0 -1
  62. package/dist/assets/classDiagram-6PBFFD2Q-DQIUL94-.js +0 -1
  63. package/dist/assets/classDiagram-v2-HSJHXN6E-DQIUL94-.js +0 -1
  64. package/dist/assets/clone-CBzhyTk8.js +0 -1
  65. package/dist/assets/stateDiagram-v2-QKLJ7IA2-BFMvs4uP.js +0 -1
@@ -0,0 +1,10 @@
1
+ var re=Object.defineProperty;var ce=(m,j,s)=>j in m?re(m,j,{enumerable:!0,configurable:!0,writable:!0,value:s}):m[j]=s;var V=(m,j,s)=>ce(m,typeof j!="symbol"?j+"":j,s);import{j as e}from"./vendor-codemirror-C7imH6Hd.js";import{a as p,I as de,b as he,R as me,M as xe,s as ue,B as ge,d as E,C as Z,e as fe,f as be,S as pe,h as X,i as Q,j as je}from"./vendor-antd--lnyToqQ.js";import{f as _e,a as R,t as a,i as ae,I as ve,F as Ne,b as Se,c as ye,d as Ce,e as we,g as Te,h as Le,j as ke,s as t,C as W,k as B,A as Ve,l as Pe,m as Me,n as J,o as i,u as Ie,R as $e,p as Ae,q as Re,r as De,T as Ee,O as Fe,v as ee}from"./AppHeader.module-DMS396h8.js";import{i as Be,a as se,s as ze}from"./index-Bde8piev.js";import"./vendor-markdown-CO-jRjTB.js";import"./vendor-xterm-DWMOrwSy.js";import"./vendor-highlight-D4ATuRwX.js";import"./vendor-virtuoso-DDKvHLUv.js";var Oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},qe=function(j,s){return p.createElement(de,he({},j,{ref:s,icon:Oe}))},He=p.forwardRef(qe);const We="_container_tjqxo_1",Ge="_fileListSection_tjqxo_10",Ue="_header_tjqxo_19",Xe="_headerLeft_tjqxo_28",Je="_headerTitle_tjqxo_34",Ke="_fileCount_tjqxo_42",Ye="_closeBtn_tjqxo_50",Ze="_changesContainer_tjqxo_66",Qe="_changeItem_tjqxo_73",es="_changeItemActive_tjqxo_90",ss="_dirItem_tjqxo_99",ts="_dirArrow_tjqxo_110",is="_dirName_tjqxo_119",ls="_status_tjqxo_124",as="_icon_tjqxo_133",ns="_fileName_tjqxo_142",os="_diffSection_tjqxo_149",rs="_diffHeader_tjqxo_157",cs="_diffFilePath_tjqxo_167",ds="_diffBadge_tjqxo_177",hs="_diffContent_tjqxo_189",ms="_diffPlaceholder_tjqxo_195",xs="_statusText_tjqxo_206",us="_errorText_tjqxo_213",gs="_emptyText_tjqxo_220",fs="_warningText_tjqxo_227",bs="_fileSizeNote_tjqxo_239",ps="_statusTextItalic_tjqxo_244",js="_imagePreviewWrap_tjqxo_248",_s="_imagePreview_tjqxo_248",vs="_rotated90_tjqxo_264",Ns="_repoHeader_tjqxo_269",Ss="_repoArrow_tjqxo_288",ys="_repoArrowExpanded_tjqxo_299",Cs="_repoName_tjqxo_303",ws="_repoBadge_tjqxo_310",f={container:We,fileListSection:Ge,header:Ue,headerLeft:Xe,headerTitle:Je,fileCount:Ke,closeBtn:Ye,changesContainer:Ze,changeItem:Qe,changeItemActive:es,dirItem:ss,dirArrow:ts,dirName:is,status:ls,icon:as,fileName:ns,diffSection:os,diffHeader:rs,diffFilePath:cs,diffBadge:ds,diffContent:hs,diffPlaceholder:ms,statusText:xs,errorText:us,emptyText:gs,warningText:fs,fileSizeNote:bs,statusTextItalic:ps,imagePreviewWrap:js,imagePreview:_s,rotated90:vs,repoHeader:Ns,repoArrow:Ss,repoArrowExpanded:ys,repoName:Cs,repoBadge:ws},Ts={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},Ls={"??":"U"},ks={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function Vs(m){const j=m.includes(".")?m.split(".").pop().toLowerCase():"",s=ks[j]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function Ps(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.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"})})}function te(m){const j={dirs:{},files:[]};for(const s of m){const n=s.file.split("/");let u=j;for(let c=0;c<n.length-1;c++)u.dirs[n[c]]||(u.dirs[n[c]]={dirs:{},files:[]}),u=u.dirs[n[c]];u.files.push({name:n[n.length-1],status:s.status,fullPath:s.file})}return j}function K({name:m,node:j,depth:s,selectedFile:n,selectedRepo:u,repoPath:c,onFileClick:o}){const x=Object.keys(j.dirs).sort(),d=[...j.files].sort((l,h)=>l.name.localeCompare(h.name));return e.jsxs(e.Fragment,{children:[m&&e.jsxs("div",{className:f.dirItem,style:{paddingLeft:8+s*16},children:[e.jsx("span",{className:f.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:f.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:f.icon,children:Ps()}),e.jsx("span",{className:f.dirName,children:m})]}),x.map(l=>e.jsx(K,{name:l,node:j.dirs[l],depth:m?s+1:s,selectedFile:n,selectedRepo:u,repoPath:c,onFileClick:o},l)),d.map(l=>e.jsxs("div",{className:`${f.changeItem} ${n===l.fullPath&&u===c?f.changeItemActive:""}`,style:{paddingLeft:8+(m?s+1:s)*16},onClick:()=>o&&o(c,l.fullPath),children:[e.jsx("span",{className:f.icon,children:Vs(l.name)}),e.jsx("span",{className:f.fileName,children:l.name}),e.jsx("span",{className:f.status,style:{color:Ts[l.status]||"#888"},children:Ls[l.status]||l.status})]},l.fullPath))]})}function Ms({visible:m,onClose:j}){const[s,n]=p.useState(null),[u,c]=p.useState(null),[o,x]=p.useState(!0),[d,l]=p.useState(null),[h,g]=p.useState(null),[v,y]=p.useState(new Set),[N,L]=p.useState(null),[C,r]=p.useState(null),[b,_]=p.useState(!1),[P,M]=p.useState(!1),A=p.useRef(!0);p.useEffect(()=>{if(A.current=!0,!!m)return x(!0),c(null),_e().then(S=>{A.current&&(n(S),x(!1))}).catch(()=>{A.current&&(c("Failed to load git status"),x(!1))}),()=>{A.current=!1}},[m]),p.useEffect(()=>{if(!d||!h){L(null),r(null);return}_(!0),L(null),r(null);const S=h&&h!=="."?`&repo=${encodeURIComponent(h)}`:"";fetch(R(`/api/git-diff?files=${encodeURIComponent(d)}${S}`)).then(w=>{if(!w.ok)throw new Error(`HTTP ${w.status}`);return w.json()}).then(w=>{A.current&&(w.diffs&&w.diffs[0]?L(w.diffs[0]):r("No diff data available"),_(!1))}).catch(w=>{A.current&&(r(`${a("ui.fileLoadError")}: ${w.message}`),_(!1))})},[d,h]);const G=p.useMemo(()=>s?s.reduce((S,w)=>S+w.changes.length,0):0,[s]),U=!s||s.length<=1,O=(S,w)=>{l(w),g(S)},D=d&&h&&h!=="."?`${h}/${d}`:d;return e.jsxs("div",{className:f.container,children:[e.jsxs("div",{className:f.fileListSection,children:[e.jsxs("div",{className:f.header,children:[e.jsxs("div",{className:f.headerLeft,children:[e.jsx("span",{className:f.headerTitle,children:a("ui.gitChanges")}),e.jsx("span",{className:f.fileCount,children:G})]}),j&&e.jsx("button",{className:f.closeBtn,onClick:j,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:f.changesContainer,children:[o&&e.jsx("div",{className:f.statusText,children:"Loading..."}),u&&e.jsx("div",{className:f.errorText,children:u}),!o&&!u&&(!s||s.length===0)&&e.jsx("div",{className:f.emptyText,children:"No changes"}),!o&&!u&&s&&s.map(S=>{const w=v.has(S.path);return U?e.jsx(K,{name:"",node:te(S.changes),depth:0,selectedFile:d,selectedRepo:h,repoPath:S.path,onFileClick:O},S.path):e.jsxs(me.Fragment,{children:[e.jsxs("div",{className:f.repoHeader,onClick:()=>y(H=>{const F=new Set(H);return w?F.delete(S.path):F.add(S.path),F}),children:[e.jsx("span",{className:`${f.repoArrow} ${w?"":f.repoArrowExpanded}`,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{className:f.repoName,children:S.name}),e.jsx("span",{className:f.repoBadge,children:S.changes.length})]}),!w&&e.jsx(K,{name:"",node:te(S.changes),depth:1,selectedFile:d,selectedRepo:h,repoPath:S.path,onFileClick:O})]},S.path)})]})]}),e.jsx("div",{className:f.diffSection,children:d?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:f.diffHeader,children:[e.jsx("span",{className:f.diffFilePath,children:D}),e.jsx("span",{className:f.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:f.diffContent,children:[b&&e.jsx("div",{className:f.statusText,children:a("ui.loading")}),C&&e.jsx("div",{className:f.errorText,children:C}),!b&&!C&&N&&e.jsx(e.Fragment,{children:N.is_large?e.jsxs("div",{className:f.warningText,children:[e.jsx("p",{children:a("ui.largeFileWarning")}),e.jsxs("p",{className:f.fileSizeNote,children:[a("ui.fileSize"),": ",(N.size/(1024*1024)).toFixed(2)," MB"]})]}):ae(d)&&!N.is_deleted?e.jsxs("div",{className:f.imagePreviewWrap,children:[e.jsx("img",{className:f.imagePreview,src:R(`/api/file-raw?path=${encodeURIComponent(D)}`),alt:d,onClick:()=>M(!0)}),P&&e.jsx(ve,{src:R(`/api/file-raw?path=${encodeURIComponent(D)}`),alt:d,onClose:()=>M(!1)})]}):N.is_binary?e.jsx("div",{className:`${f.statusText} ${f.statusTextItalic}`,children:a("ui.binaryFileNotice")}):e.jsx(Ne,{file_path:d,old_string:N.old_content,new_string:N.new_content})})]})]}):e.jsxs("div",{className:f.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:a("ui.mobileGitDiffHint")})]})})]})}const Is="_container_1hzyt_1",$s="_fileListSection_1hzyt_10",As="_header_1hzyt_19",Rs="_headerLeft_1hzyt_28",Ds="_headerTitle_1hzyt_34",Es="_fileCount_1hzyt_42",Fs="_closeBtn_1hzyt_50",Bs="_treeContainer_1hzyt_66",zs="_treeItem_1hzyt_73",Os="_treeItemActive_1hzyt_90",qs="_treeItemIgnored_1hzyt_99",Hs="_arrow_1hzyt_103",Ws="_arrowExpanded_1hzyt_113",Gs="_icon_1hzyt_117",Us="_fileName_1hzyt_126",Xs="_contentSection_1hzyt_133",Js="_contentPlaceholder_1hzyt_141",Ks="_statusText_1hzyt_152",Ys="_errorText_1hzyt_159",Zs="_emptyText_1hzyt_166",T={container:Is,fileListSection:$s,header:As,headerLeft:Rs,headerTitle:Ds,fileCount:Es,closeBtn:Fs,treeContainer:Bs,treeItem:zs,treeItemActive:Os,treeItemIgnored:qs,arrow:Hs,arrowExpanded:Ws,icon:Gs,fileName:Us,contentSection:Xs,contentPlaceholder:Js,statusText:Ks,errorText:Ys,emptyText:Zs},Qs={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function et(m){const j=m.includes(".")?m.split(".").pop().toLowerCase():"",s=Qs[j]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function st(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.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"})})}function ne({item:m,path:j,depth:s,expandedPaths:n,onToggleExpand:u,currentFile:c,onFileClick:o}){const[x,d]=p.useState(null),[l,h]=p.useState(!1),g=j?`${j}/${m.name}`:m.name,v=n.has(g),y=m.type==="directory",N=!y&&c===g,L=m.gitIgnored||!1;p.useEffect(()=>{y&&v&&x===null&&!l&&(h(!0),fetch(R(`/api/files?path=${encodeURIComponent(g)}`)).then(r=>r.ok?r.json():Promise.reject()).then(r=>{d(r),h(!1)}).catch(()=>{h(!1)}))},[v]);const C=p.useCallback(()=>{y?u(g):o(g)},[y,g,u,o]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`${T.treeItem} ${N?T.treeItemActive:""} ${L?T.treeItemIgnored:""}`,style:{paddingLeft:8+s*16},onClick:C,children:[y?e.jsx("span",{className:`${T.arrow} ${v?T.arrowExpanded:""}`,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}):e.jsx("span",{style:{width:16,flexShrink:0}}),e.jsx("span",{className:T.icon,children:y?st():et(m.name)}),e.jsx("span",{className:T.fileName,children:m.name}),l&&e.jsx("span",{style:{fontSize:10,color:"var(--text-disabled)"},children:"..."})]}),y&&v&&x&&x.map(r=>e.jsx(ne,{item:r,path:g,depth:s+1,expandedPaths:n,onToggleExpand:u,currentFile:c,onFileClick:o},r.name))]})}function tt({visible:m,onClose:j,targetFile:s}){const[n,u]=p.useState(null),[c,o]=p.useState(!0),[x,d]=p.useState(null),[l,h]=p.useState(new Set),[g,v]=p.useState(null),y=p.useRef(!0),N=p.useRef(null);p.useEffect(()=>{if(y.current=!0,!m){v(null),h(new Set),N.current=null;return}return o(!0),d(null),fetch(R("/api/files?path=")).then(_=>_.ok?_.json():Promise.reject()).then(_=>{y.current&&(u(_),o(!1))}).catch(()=>{y.current&&(d(a("ui.fileLoadError")),o(!1))}),()=>{y.current=!1}},[m]),p.useEffect(()=>{!s||!m||N.current!==s.file&&(N.current=s.file,v(s.file),s.ancestors&&s.ancestors.length>0&&h(_=>{const P=new Set(_);return s.ancestors.forEach(M=>P.add(M)),P}))},[s,m]);const L=p.useCallback(_=>{h(P=>{const M=new Set(P);return M.has(_)?M.delete(_):M.add(_),M})},[]),C=p.useCallback(_=>{v(_)},[]),r=p.useCallback(()=>{v(null)},[]),b=n?n.length:0;return e.jsxs("div",{className:T.container,children:[e.jsxs("div",{className:T.fileListSection,children:[e.jsxs("div",{className:T.header,children:[e.jsxs("div",{className:T.headerLeft,children:[e.jsx("span",{className:T.headerTitle,children:a("ui.projectFolder")}),e.jsx("span",{className:T.fileCount,children:b})]}),j&&e.jsx("button",{className:T.closeBtn,onClick:j,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:T.treeContainer,children:[c&&e.jsx("div",{className:T.statusText,children:a("ui.loading")}),x&&e.jsx("div",{className:T.errorText,children:a("ui.fileLoadError")}),!c&&!x&&(!n||n.length===0)&&e.jsx("div",{className:T.emptyText,children:a("ui.mobileFileExplorerHint")}),!c&&!x&&n&&n.map(_=>e.jsx(ne,{item:_,path:"",depth:0,expandedPaths:l,onToggleExpand:L,currentFile:g,onFileClick:C},_.name))]})]}),e.jsx("div",{className:T.contentSection,children:g?ae(g)?e.jsx(Se,{filePath:g,onClose:r}):e.jsx(ye,{filePath:g,onClose:r}):e.jsxs("div",{className:T.contentPlaceholder,children:[e.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e.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"})}),e.jsx("span",{children:a("ui.mobileFileExplorerHint")})]})})]})}const it="_container_1bb9n_1",lt="_header_1bb9n_9",at="_headerTitle_1bb9n_18",nt="_closeBtn_1bb9n_24",ot="_content_1bb9n_38",rt="_empty_1bb9n_47",ct="_fixedTable_1bb9n_54",dt="_ellipsisCell_1bb9n_58",ht="_thLeft_1bb9n_65",mt="_colWide_1bb9n_69",xt="_colNarrow_1bb9n_73",k={container:it,header:lt,headerTitle:at,closeBtn:nt,content:ot,empty:rt,fixedTable:ct,ellipsisCell:dt,thLeft:ht,colWide:mt,colNarrow:xt},ut=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],ie={ttl:"cacheLoss.ttl",system_change:"cacheLoss.systemChange",tools_change:"cacheLoss.toolsChange",model_change:"cacheLoss.modelChange",msg_truncated:"cacheLoss.msgTruncated",msg_modified:"cacheLoss.msgModified",key_change:"cacheLoss.keyChange"};function gt({requests:m=[],visible:j,onClose:s}){const{byModel:n,models:u,toolStats:c,skillStats:o,cacheStats:x,activeReasons:d,totalCount:l,totalCache:h,hasCacheStats:g,subAgentEntries:v,hasSubAgentStats:y,teammateEntries:N,hasTeammateStats:L,isEmpty:C}=p.useMemo(()=>{const r=Ce(m),b=Object.keys(r),_=we(m),P=Te(m),M=Le(m),A=ut.filter(I=>M[I].count>0),G=A.reduce((I,$)=>I+M[$].count,0),U=A.reduce((I,$)=>I+M[$].cacheCreate,0),O=A.length>0,D={},S={};for(let I=0;I<m.length;I++){const $=ke(m[I],m[I+1]);if($.type==="SubAgent"){const q=$.subType||"Other";D[q]=(D[q]||0)+1}else if($.type==="Teammate"){const q=$.subType||"Teammate";S[q]=(S[q]||0)+1}}const w=Object.entries(D).sort((I,$)=>$[1]-I[1]),H=w.length>0,F=Object.entries(S).sort((I,$)=>$[1]-I[1]),Y=F.length>0,oe=b.length===0&&_.length===0&&!O&&!H&&!Y&&P.length===0;return{byModel:r,models:b,toolStats:_,skillStats:P,cacheStats:M,activeReasons:A,totalCount:G,totalCache:U,hasCacheStats:O,subAgentEntries:w,hasSubAgentStats:H,teammateEntries:F,hasTeammateStats:Y,isEmpty:oe}},[m]);return j?e.jsxs("div",{className:k.container,children:[e.jsxs("div",{className:k.header,children:[e.jsx("span",{className:k.headerTitle,children:a("ui.tokenStats")}),e.jsx("button",{className:k.closeBtn,onClick:s,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:k.content,children:C?e.jsx("div",{className:k.empty,children:"—"}):e.jsxs(e.Fragment,{children:[o.length>0&&e.jsxs("div",{className:t.modelCard,children:[e.jsx("div",{className:t.modelName,children:a("ui.skillUsageStats")}),e.jsxs("table",{className:t.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${t.th} ${k.thLeft}`,children:"Skill"}),e.jsx("td",{className:t.th,children:a("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[o.map(([r,b])=>e.jsxs("tr",{className:t.rowBorder,children:[e.jsx("td",{className:t.label,children:r}),e.jsx("td",{className:t.td,children:b})]},r)),o.length>1&&e.jsxs("tr",{className:t.rebuildTotalRow,children:[e.jsx("td",{className:t.label,children:"Total"}),e.jsx("td",{className:t.td,children:o.reduce((r,b)=>r+b[1],0)})]})]})]})]}),y&&e.jsxs("div",{className:t.modelCard,children:[e.jsx("div",{className:t.modelName,children:a("ui.subAgentStats")}),e.jsxs("table",{className:t.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${t.th} ${k.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:t.th,children:a("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([r,b])=>e.jsxs("tr",{className:t.rowBorder,children:[e.jsxs("td",{className:t.label,children:[r," ",e.jsx(W,{doc:`SubAgent-${r}`})]}),e.jsx("td",{className:t.td,children:b})]},r)),v.length>1&&e.jsxs("tr",{className:t.rebuildTotalRow,children:[e.jsx("td",{className:t.label,children:"Total"}),e.jsx("td",{className:t.td,children:v.reduce((r,b)=>r+b[1],0)})]})]})]})]}),L&&e.jsxs("div",{className:t.modelCard,children:[e.jsx("div",{className:t.modelName,children:"Teammate"}),e.jsxs("table",{className:t.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${t.th} ${k.thLeft}`,children:"Name"}),e.jsx("td",{className:t.th,children:a("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[N.map(([r,b])=>e.jsxs("tr",{className:t.rowBorder,children:[e.jsx("td",{className:t.label,children:r}),e.jsx("td",{className:t.td,children:b})]},r)),N.length>1&&e.jsxs("tr",{className:t.rebuildTotalRow,children:[e.jsx("td",{className:t.label,children:"Total"}),e.jsx("td",{className:t.td,children:N.reduce((r,b)=>r+b[1],0)})]})]})]})]}),c.length>0&&e.jsxs("div",{className:t.modelCard,children:[e.jsx("div",{className:t.modelName,children:a("ui.toolUsageStats")}),e.jsxs("table",{className:t.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${t.th} ${k.thLeft}`,children:"Tool"}),e.jsx("td",{className:t.th,children:a("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[c.map(([r,b])=>e.jsxs("tr",{className:t.rowBorder,children:[e.jsxs("td",{className:t.label,children:[r," ",e.jsx(W,{doc:`Tool-${r}`})]}),e.jsx("td",{className:t.td,children:b})]},r)),c.length>1&&e.jsxs("tr",{className:t.rebuildTotalRow,children:[e.jsx("td",{className:t.label,children:"Total"}),e.jsx("td",{className:t.td,children:c.reduce((r,b)=>r+b[1],0)})]})]})]})]}),g&&e.jsxs("div",{className:t.modelCard,children:[e.jsxs("div",{className:t.modelName,children:["MainAgent",e.jsx(W,{doc:"MainAgent"})," ",a("ui.cacheRebuildStats"),e.jsx(W,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${t.statsTable} ${k.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:k.colWide}),e.jsx("col",{className:k.colNarrow}),e.jsx("col",{className:k.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${t.th} ${k.thLeft}`,children:a("ui.cacheRebuild.reason")}),e.jsx("td",{className:t.th,children:a("ui.cacheRebuild.count")}),e.jsx("td",{className:t.th,children:a("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[d.map(r=>e.jsxs("tr",{className:t.rowBorder,children:[e.jsx("td",{className:`${t.label} ${k.ellipsisCell}`,title:a(`ui.${ie[r]}`),children:a(`ui.${ie[r]}`)}),e.jsx("td",{className:t.td,children:x[r].count}),e.jsx("td",{className:t.td,children:B(x[r].cacheCreate)})]},r)),d.length>1&&e.jsxs("tr",{className:t.rebuildTotalRow,children:[e.jsx("td",{className:t.label,children:"Total"}),e.jsx("td",{className:t.td,children:l}),e.jsx("td",{className:t.td,children:B(h)})]})]})]})]}),u.map(r=>{const b=n[r],_=b.input+b.cacheCreation+b.cacheRead,P=_>0?(b.cacheRead/_*100).toFixed(1):"0.0";return e.jsxs("div",{className:t.modelCard,children:[e.jsx("div",{className:t.modelName,children:r}),e.jsx("table",{className:t.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:t.label,children:"Token"}),e.jsx("td",{className:t.th,children:"input"}),e.jsx("td",{className:t.th,children:"output"})]}),e.jsxs("tr",{className:t.rowBorder,children:[e.jsx("td",{className:t.label}),e.jsx("td",{className:t.td,children:B(_)}),e.jsx("td",{className:t.td,children:B(b.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:t.label,children:"Cache"}),e.jsx("td",{className:t.th,children:"create"}),e.jsx("td",{className:t.th,children:"read"})]}),e.jsxs("tr",{className:t.rowBorder,children:[e.jsx("td",{className:t.label}),e.jsx("td",{className:t.td,children:B(b.cacheCreation)}),e.jsx("td",{className:t.td,children:B(b.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:t.label,children:a("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:t.td,children:[P,"%"]})]})]})})]},r)})]})})]}):null}const z=class z extends Ve{constructor(s){super(s);V(this,"_handleMobileOpenFile",(s,n)=>{this.state.localLogFile||this.setState({mobileFileExplorerVisible:!0,mobileFileExplorerTarget:{file:s,ancestors:n||[]},mobileGitDiffVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileChatVisible:!1})});V(this,"handleExportPromptsTxt",s=>{if(!s||s.length===0)return;const n=[];for(const x of s){const d=[],l=x.timestamp?new Date(x.timestamp).toLocaleString():"";l&&d.push(`${l}:
2
+ `);const h=(x.segments||[]).filter(g=>g.type==="text").map(g=>g.content);h.length>0&&d.push(h.join(`
3
+ `)),n.push(d.join(`
4
+ `))}if(n.length===0)return;const u=new Blob([n.join(`
5
+
6
+
7
+
8
+ `)],{type:"text/plain;charset=utf-8"}),c=URL.createObjectURL(u),o=document.createElement("a");o.href=c,o.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,o.click(),URL.revokeObjectURL(c)});V(this,"handlePendingPermission",s=>{this.setState({globalPermission:s})});V(this,"handlePendingPlanApproval",s=>{this.setState({globalPlanApproval:s})});V(this,"handleAutoApproveChange",s=>{this.setState({autoApproveSeconds:s}),fetch(R("/api/preferences"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoApproveSeconds:s})}).catch(()=>{})});V(this,"_isInternalDrag",s=>s.dataTransfer.types.includes("text/x-preset-reorder"));V(this,"_onDragOver",s=>{if(s.preventDefault(),this._isInternalDrag(s))return;if(s.target.closest&&s.target.closest("[data-file-explorer]")){this.state.isDragging&&this.setState({isDragging:!1});return}this.state.isDragging||this.setState({isDragging:!0})});V(this,"_onDragLeave",s=>{const n=this._layoutRef.current;n&&!n.contains(s.relatedTarget)&&this.setState({isDragging:!1})});V(this,"_onDrop",s=>{if(s.preventDefault(),this._isInternalDrag(s))return;this.setState({isDragging:!1});const n=Array.from(s.dataTransfer.files);if(!n.length)return;const u=this.state.mobileTerminalVisible;Promise.all(n.map(c=>Ie(c).then(o=>({name:c.name,path:o})).catch(o=>(ue.error(`${c.name}: ${o.message}`),null)))).then(c=>{const o=c.filter(Boolean);o.length&&(u?this.setState(x=>({terminalPendingImages:[...x.terminalPendingImages,...o.map(d=>({path:d.path,source:"drop"}))]})):this.setState(x=>({pendingUploadPaths:[...x.pendingUploadPaths||[],...o.map(d=>`"${d.path}"`)]})))})});V(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});V(this,"_handleTerminalFilePath",s=>{this.setState(n=>({terminalPendingImages:[...n.terminalPendingImages,{path:s,source:"terminal"}]}))});V(this,"_handleRemoveTerminalImage",s=>{this.setState(n=>({terminalPendingImages:n.terminalPendingImages.filter((u,c)=>c!==s)}))});V(this,"_handleClearTerminalImages",()=>{this.setState({terminalPendingImages:[]})});Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,mobileFileExplorerVisible:!1,globalPermission:null,globalPlanApproval:null,autoApproveSeconds:0,hasGit:!0,terminalPendingImages:[]}),this._lastContextPercent=0}componentDidMount(){super.componentDidMount(),fetch(R("/api/git-repos")).then(s=>s.ok?s.json():Promise.reject()).then(s=>{var n;(n=s.repos)!=null&&n.length||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>{fetch(R("/api/git-status")).then(s=>{s.ok||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>this.setState({hasGit:!1,mobileGitDiffVisible:!1}))}),Be&&!se&&window.visualViewport&&(this._onVisualViewportChange=()=>{const s=this._layoutRef.current;if(!s)return;const n=window.visualViewport;s.style.position="fixed",s.style.top=`${n.offsetTop}px`,s.style.height=`${n.height}px`,s.style.width="100%",s.style.left="0"},window.visualViewport.addEventListener("resize",this._onVisualViewportChange),window.visualViewport.addEventListener("scroll",this._onVisualViewportChange),this._onVisualViewportChange()),se&&(this._mqlWide=window.matchMedia("(min-width: 1400px)"),this._modeSwitchDialog=null,this._onWideChange=s=>{s.matches?this._modeSwitchDialog=xe.confirm({title:a("ui.modeSwitchTitle"),content:a("ui.modeSwitchToFullView"),okText:a("ui.ok"),onOk:()=>{this._modeSwitchDialog=null,ze("pc")},onCancel:()=>{this._modeSwitchDialog=null}}):this._modeSwitchDialog&&(this._modeSwitchDialog.destroy(),this._modeSwitchDialog=null)},this._mqlWide.addEventListener("change",this._onWideChange))}componentWillUnmount(){this._onVisualViewportChange&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",this._onVisualViewportChange),window.visualViewport.removeEventListener("scroll",this._onVisualViewportChange)),this._mqlWide&&this._mqlWide.removeEventListener("change",this._onWideChange),this._modeSwitchDialog&&(this._modeSwitchDialog.destroy(),this._modeSwitchDialog=null),super.componentWillUnmount()}static parseSegments(s){const n=[],u=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let c=0,o;for(;(o=u.exec(s))!==null;){const d=s.slice(c,o.index).trim();d&&n.push({type:"text",content:d});const l=o[1];if(c=o.index+o[0].length,z.COMMAND_TAGS.has(l))continue;const h=new RegExp(`^<${l}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${l}>$`),g=o[0].match(h),v=g?g[1].trim():o[0].trim();n.push({type:"system",content:v,label:l})}const x=s.slice(c).trim();return x&&n.push({type:"text",content:x}),n}static extractUserTexts(s){const n=[],u=[];let c=null;for(const o of s)if(o.role==="user"){if(typeof o.content=="string"){const x=o.content.trim();if(!x)continue;if(!Pe(x)){if(/Implement the following plan:/i.test(x))continue;n.push(x),u.push(x)}}else if(Array.isArray(o.content)){const{commands:x,textBlocks:d}=Me(o.content);x.length>0&&(c=x[x.length-1]);const l=[];for(const g of d)/Implement the following plan:/i.test((g.text||"").trim())||l.push(g.text.trim());const h=o.content.filter(g=>{var v;return g.type==="text"&&((v=g.text)==null?void 0:v.trim())}).map(g=>g.text.trim());l.length>0&&(n.push(l.join(`
9
+ `)),u.push(h.join(`
10
+ `)))}}return{userMsgs:n,fullTexts:u,slashCmd:c}}extractUserPrompts(s){var x;const n=[],u=new Set;let c=null;const o=s.filter(d=>J(d));for(let d=0;d<o.length;d++){const l=o[d],h=((x=l.body)==null?void 0:x.messages)||[],g=l.timestamp||"",{userMsgs:v,fullTexts:y,slashCmd:N}=z.extractUserTexts(h);N&&N!=="/compact"&&N!==c&&n.push({type:"prompt",segments:[{type:"text",content:N}],timestamp:g}),c=N;for(let L=0;L<v.length;L++){const C=v[L];if(u.has(C))continue;u.add(C);const r=y[L]||C;n.push({type:"prompt",segments:z.parseSegments(r),timestamp:g})}}return n}renderOriginalPrompt(s){const n=s.segments.filter(u=>u.type==="text");return n.length===0?null:e.jsx("div",{className:i.mobilePromptCard,children:n.map((u,c)=>e.jsx("pre",{className:i.mobilePromptPreText,children:u.content},c))})}render(){var d;const{filteredRequests:s,fileLoading:n,fileLoadingCount:u,mainAgentSessions:c}=this.renderPrepare();if(this.state.workspaceMode)return this.renderWorkspaceMode();const o=!!this._isLocalLog;let x=null;for(let l=s.length-1;l>=0;l--)if(J(s[l])&&((d=s[l].body)!=null&&d.model)){x=s[l].body.model;break}return e.jsxs("div",{className:i.mobileCLIRoot,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[this.state.isDragging&&e.jsx("div",{className:i.dragOverlay,children:e.jsxs("div",{className:i.dragOverlayContent,children:[e.jsx($e,{className:i.dragIcon}),e.jsx("p",{children:a("ui.dragDropHint")})]})}),e.jsxs("div",{className:i.mobileCLIHeader,children:[e.jsxs("div",{className:i.mobileCLIHeaderLeft,children:[e.jsx("button",{className:i.mobileMenuBtn,onClick:()=>this.setState(l=>({mobileMenuVisible:!l.mobileMenuVisible})),"aria-label":a("ui.mobileMenu"),children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),o?e.jsxs(e.Fragment,{children:[e.jsx(ge,{status:"processing",color:"green"}),e.jsx("span",{className:i.mobileCLIStatusLabel,children:a("ui.historyLog",{file:this._localLogFile})})]}):(()=>{var y,N,L;const l=this.state.contextWindow;let h=0;if((l==null?void 0:l.used_percentage)!=null)h=Math.min(100,Math.max(0,Math.round(l.used_percentage/83.5*100)));else if(s.length>0){for(let C=s.length-1;C>=0;C--)if(J(s[C])&&((N=(y=s[C].response)==null?void 0:y.body)!=null&&N.usage)){const r=s[C].response.body.usage,b=(r.input_tokens||0)+(r.cache_creation_input_tokens||0)+(r.cache_read_input_tokens||0),P=((l==null?void 0:l.context_window_size)||Ae(((L=s[C].body)==null?void 0:L.model)||this.state.settingsModel))*.835;P>0&&b>0&&(h=Math.min(100,Math.max(0,Math.round(b/P*100))));break}}h===0&&this._lastContextPercent>0?h=this._lastContextPercent:this._lastContextPercent=h;const g=h>=80?"var(--color-error-light)":h>=60?"var(--color-warning-light)":"var(--color-success)",v=`${a("ui.liveMonitoring")}${this.state.projectName?`: ${this.state.projectName}`:""}`;return e.jsxs("span",{className:i.mobileCtxTag,style:{borderColor:g,color:g},title:v,children:[e.jsx("span",{className:i.mobileCtxTagFill,style:{width:`${h}%`,backgroundColor:g}}),e.jsx("span",{className:i.mobileCtxTagContent,children:v})]})})()]}),e.jsxs("div",{className:i.mobileCLIHeaderRight,children:[o?e.jsx(E,{type:"text",size:"small",icon:e.jsx(He,{}),onClick:()=>history.back(),className:i.mobileNavBtn,children:a("ui.mobileGoBack")}):this.state.hasGit?e.jsx(E,{type:"text",size:"small",icon:e.jsx(Re,{}),onClick:()=>this.setState(l=>({mobileGitDiffVisible:!l.mobileGitDiffVisible,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileFileExplorerVisible:!1})),style:{color:this.state.mobileGitDiffVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileGitDiffVisible?a("ui.mobileGitDiffExit"):a("ui.mobileGitDiffBrowse")}):null,!o&&e.jsx(E,{type:"text",size:"small",icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"4 17 10 11 4 5"}),e.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),onClick:()=>this.setState(l=>({mobileTerminalVisible:!l.mobileTerminalVisible,mobileGitDiffVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileFileExplorerVisible:!1})),style:{color:this.state.mobileTerminalVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileTerminalVisible?a("ui.mobileTerminalExit"):a("ui.mobileTerminalBrowse")})]}),this.state.mobileMenuVisible&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:i.mobileMenuOverlay,onClick:()=>this.setState({mobileMenuVisible:!1})}),e.jsxs("div",{className:i.mobileMenuDropdown,children:[e.jsxs("button",{className:i.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileLogMgmtVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileFileExplorerVisible:!1}),this.handleImportLocalLogs()},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),a("ui.logManagement")]}),e.jsxs("button",{className:i.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileStatsVisible:!0,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileFileExplorerVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7"})]}),a("ui.tokenStats")]}),e.jsxs("button",{className:i.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileSettingsVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobilePromptVisible:!1,mobileFileExplorerVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),a("ui.settings")]}),!o&&e.jsxs("button",{className:i.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileFileExplorerVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1})},children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),a("ui.projectFolder")]}),e.jsxs("button",{className:i.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobilePromptVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobileFileExplorerVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"12",y1:"18",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"12",x2:"9",y2:"15"}),e.jsx("line",{x1:"12",y1:"12",x2:"15",y2:"15"})]}),a("ui.userPrompt")]})]})]})]}),e.jsxs("div",{className:i.mobileCLIBody,children:[!o&&e.jsxs(e.Fragment,{children:[n&&e.jsxs("div",{className:i.mobileLoadingOverlay,children:[e.jsx("div",{className:i.mobileLoadingSpinner}),e.jsxs("div",{className:i.mobileLoadingLabel,children:[a("ui.loadingChat"),u>0?` (${u})`:""]})]}),e.jsx(Z,{theme:this.themeConfig,children:e.jsx("div",{className:i.mobileChatInner,children:e.jsx(De,{requests:s,mainAgentSessions:c,streamingLatest:this.state.streamingLatest,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:null,scrollToTimestamp:null,onScrollTsDone:()=>{},cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:this.state.mobileTerminalVisible,mobileChatVisible:!0,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:l=>this.loadSession(l),onPendingPermission:this.handlePendingPermission,onPendingPlanApproval:this.handlePendingPlanApproval,pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed,onMobileOpenFile:this._handleMobileOpenFile})})})]}),!o&&e.jsx("div",{className:`${i.mobileChatOverlay} ${this.state.mobileTerminalVisible?i.mobileChatOverlayVisible:""}`,children:e.jsx(Ee,{modelName:x,onFilePath:this._handleTerminalFilePath,pendingImages:this.state.terminalPendingImages,onRemovePendingImage:this._handleRemoveTerminalImage,onClearPendingImages:this._handleClearTerminalImages})}),e.jsx("div",{className:`${i.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?i.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:i.mobileGitDiffInner,children:e.jsx(Ms,{visible:this.state.mobileGitDiffVisible,onClose:()=>this.setState({mobileGitDiffVisible:!1})})})}),e.jsx("div",{className:`${i.mobileFileExplorerOverlay} ${this.state.mobileFileExplorerVisible?i.mobileFileExplorerOverlayVisible:""}`,children:e.jsx("div",{className:i.mobileFileExplorerInner,children:e.jsx(tt,{visible:this.state.mobileFileExplorerVisible,onClose:()=>this.setState({mobileFileExplorerVisible:!1,mobileFileExplorerTarget:null}),targetFile:this.state.mobileFileExplorerTarget})})}),e.jsx("div",{className:`${i.mobileStatsOverlay} ${this.state.mobileStatsVisible?i.mobileStatsOverlayVisible:""}`,children:e.jsx("div",{className:i.mobileStatsInner,children:e.jsx(gt,{requests:s,visible:this.state.mobileStatsVisible,onClose:()=>this.setState({mobileStatsVisible:!1})})})}),e.jsxs("div",{className:`${i.mobileLogMgmtOverlay} ${this.state.mobileLogMgmtVisible?i.mobileLogMgmtOverlayVisible:""}`,children:[e.jsxs("div",{className:i.mobileLogMgmtHeader,children:[e.jsxs("span",{className:i.mobileLogMgmtTitle,children:[e.jsx(Fe,{apiEndpoint:R("/api/open-log-dir"),title:a("ui.openLogDir"),size:14}),a("ui.importLocalLogs")]}),e.jsx("button",{className:i.mobileLogMgmtClose,onClick:()=>this.setState({mobileLogMgmtVisible:!1,selectedLogs:new Set}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:i.mobileLogMgmtActions,children:[e.jsx(E,{size:"small",type:this.state.selectedLogs.size>=2?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:this.state.selectedLogs.size<2?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:void 0,children:a("ui.mergeLogs")}),e.jsx(E,{size:"small",icon:e.jsx(fe,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,style:this.state.selectedLogs.size===0?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:{color:"var(--color-error-light)",borderColor:"var(--color-error-light)"},children:a("ui.deleteLogs")}),e.jsx(E,{size:"small",icon:e.jsx(be,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:a("ui.refreshStats")})]}),e.jsx("div",{className:i.mobileLogMgmtBody,children:this.state.localLogsLoading?e.jsx("div",{className:i.spinCenter,children:e.jsx(pe,{})}):(()=>{const l=this.state.localLogs[this.state.currentProject];return!l||l.length===0?e.jsx("div",{className:i.emptyCenter,children:a("ui.noLogs")}):e.jsx(Z,{theme:this.themeConfig,children:e.jsx("div",{className:i.logListContainer,children:this.renderLogTable(l,!0)})})})()})]}),e.jsxs("div",{className:`${i.mobileSettingsOverlay} ${this.state.mobileSettingsVisible?i.mobileSettingsOverlayVisible:""}`,children:[e.jsxs("div",{className:i.mobileLogMgmtHeader,children:[e.jsx("span",{className:i.mobileLogMgmtTitle,children:a("ui.settings")}),e.jsx("button",{className:i.mobileLogMgmtClose,onClick:()=>this.setState({mobileSettingsVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:i.mobileSettingsBody,children:[e.jsx("div",{className:i.mobileSettingsSectionTitle,children:a("ui.chatDisplaySwitches")}),e.jsxs("div",{className:i.mobileSettingsRow,children:[e.jsx("span",{className:i.mobileSettingsLabel,children:a("ui.collapseToolResults")}),e.jsx(X,{checked:!!this.state.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),e.jsxs("div",{className:i.mobileSettingsRow,children:[e.jsx("span",{className:i.mobileSettingsLabel,children:a("ui.expandThinking")}),e.jsx(X,{checked:!!this.state.expandThinking,onChange:this.handleExpandThinkingChange})]}),e.jsxs("div",{className:i.mobileSettingsRow,children:[e.jsx("span",{className:i.mobileSettingsLabel,children:a("ui.showFullToolContent")}),e.jsx(X,{checked:!!this.state.showFullToolContent,onChange:this.handleShowFullToolContentChange})]}),e.jsx("div",{className:i.mobileSettingsSectionTitle,children:a("ui.themeColor")}),e.jsx("div",{className:i.mobileSettingsRow,children:e.jsx(Q,{size:"small",value:this.state.themeColor||"dark",onChange:this.handleThemeColorChange,options:[{label:a("ui.themeColor.dark"),value:"dark"},{label:a("ui.themeColor.light"),value:"light"}],style:{width:140}})}),e.jsx("div",{className:i.mobileSettingsSectionTitle,children:a("ui.permission.autoApprove.setting")}),e.jsx("div",{className:i.mobileSettingsRow,children:e.jsx(Q,{size:"small",value:this.state.autoApproveSeconds||0,onChange:this.handleAutoApproveChange,options:[{label:a("ui.permission.autoApprove.off"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"10s",value:10},{label:"15s",value:15},{label:"20s",value:20},{label:"30s",value:30},{label:"60s",value:60}],style:{width:100}})})]})]}),e.jsxs("div",{className:`${i.mobilePromptOverlay} ${this.state.mobilePromptVisible?i.mobilePromptOverlayVisible:""}`,children:[e.jsxs("div",{className:i.mobileLogMgmtHeader,children:[e.jsx("span",{className:i.mobileLogMgmtTitle,children:a("ui.userPrompt")}),e.jsx("button",{className:i.mobileLogMgmtClose,onClick:()=>this.setState({mobilePromptVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:i.mobilePromptBody,children:(()=>{const l=this.extractUserPrompts(s);return l.length===0?e.jsx("div",{className:i.mobilePromptEmpty,children:a("ui.noPrompt")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:i.mobilePromptHeader,children:[e.jsxs("span",{className:i.mobilePromptCount,children:[l.length," ",a("ui.promptCountUnit")]}),e.jsx(E,{size:"small",icon:e.jsx(je,{}),onClick:()=>this.handleExportPromptsTxt(l),children:a("ui.exportPromptsTxt")})]}),e.jsx("div",{className:i.mobilePromptList,children:l.map((h,g)=>e.jsxs("div",{className:i.mobilePromptItem,children:[h.timestamp&&e.jsx("div",{className:i.mobilePromptTimestamp,children:new Date(h.timestamp).toLocaleString()}),this.renderOriginalPrompt(h)]},g))})]})})()})]})]}),this.state.globalPermission&&e.jsx(ee,{toolName:this.state.globalPermission.permission.toolName,toolInput:this.state.globalPermission.permission.input,requestId:this.state.globalPermission.permission.id,onAllow:this.state.globalPermission.handlers.allow,onAllowSession:this.state.globalPermission.handlers.allowSession,onDeny:this.state.globalPermission.handlers.deny,visible:!0,global:!0,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,modelName:this.state.globalPermission.modelName}),this.state.globalPlanApproval&&e.jsx(ee,{toolName:"ExitPlanMode",toolInput:this.state.globalPlanApproval.plan.input,requestId:this.state.globalPlanApproval.plan.id,onAllow:this.state.globalPlanApproval.handlers.approve,onDeny:l=>this.state.globalPlanApproval.handlers.reject(l,""),visible:!0,global:!0})]})}};V(z,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let le=z;export{le as default};
@@ -1 +1 @@
1
- import{aW as L,bj as ln,aG as A,aU as P,aF as W,bk as gn,bl as dn,bm as hn,bn as z,bo as pn,bp as An,bq as m,aX as N,b0 as U,b3 as T,br as _n,a_ as on,bs as wn,bt as On,aH as V,bu as vn,bv as I}from"./mermaid.core-CFWuAxt_.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function bn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var B=P?P.prototype:void 0,H=B?B.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return bn(n,k)+"";if(x(n))return H?H.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function Rn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function In(n,r,e){return r===r?Rn(n,r,e):cn(n,Tn,e)}function Sn(n,r){var e=n==null?0:n.length;return!!e&&In(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Gn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Fn,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Gn(Dn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[R(r[e++])];return e&&e==i?n:void 0}function mn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var K=P?P.isConcatSpreadable:void 0;function Nn(n){return A(n)||z(n)||!!(K&&n&&n[K])}function Kr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=Nn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Un(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Bn(){return[]}var Hn=Object.prototype,Kn=Hn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Kn.call(n,r)}))}:Bn;function Zn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Z(n){return Zn(n,M,qn)}var Xn="__lodash_hash_undefined__";function Yn(n){return this.__data__.set(n,Xn),this}function Jn(n){return this.__data__.has(n)}function b(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}b.prototype.add=b.prototype.push=Yn;b.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new b:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,v){if(!tn(o,v)&&(p===O||f(p,O,e,i,t)))return o.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",X=P?P.prototype:void 0,S=X?X.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new m(n),new m(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(S)return S.call(n)==S.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Z(n),a=u.length,h=Z(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],v=r[d];if(i)var D=s?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(D===void 0?O===v||f(O,v,e,i,t):D)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,Y="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:N(n),h=u?J:N(r);a=a==Y?c:a,h=h==Y?c:h;var g=a==c,l=h==c,d=a==h;if(d&&U(n)){if(!U(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function F(n,r,e,i,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Or(n,r,e,i,F,f)}var vr=1,Pr=2;function br(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?F(h,a,vr|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||br(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=R(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Rr(n,r){return n!=null&&Tr(n,r,cr)}var Ir=1,Sr=2;function Lr(n,r){return $(n)&&sn(r)?un(R(n),r):function(e){var i=mn(e,n);return i===void 0&&i===r?Rr(e,n):F(r,i,Ir|Sr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(R(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Lr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&vn(n,r,M)}function Fr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Fr(Cr);function Gr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Dr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Zr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function mr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Xr(n,r,e){var i=A(n)?Un:mr,f=arguments.length<3;return i(n,an(r),e,f,G)}var Nr=1/0,Ur=I&&1/C(new I([,-0]))[1]==Nr?function(n){return new I(n)}:yn,Br=200;function Yr(n,r,e){var i=-1,f=Sn,t=n.length,s=!0,u=[],a=u;if(t>=Br){var h=r?null:Ur(n);if(h)return C(h);s=!1,f=tn,a=new b}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Kr as b,an as c,bn as d,rn as e,Zn as f,qn as g,En as h,x as i,Z as j,M as k,Yr as l,Zr as m,qr as n,cn as o,Gr as p,Cr as q,Xr as r,Bn as s,Tr as t,j as u,R as v,nn as w,Rr as x,Dn as y};
1
+ import{aW as L,bj as ln,aG as A,aU as P,aF as W,bk as gn,bl as dn,bm as hn,bn as z,bo as pn,bp as An,bq as m,aX as N,b0 as U,b3 as T,br as _n,a_ as on,bs as wn,bt as On,aH as V,bu as vn,bv as I}from"./mermaid.core-BCXcdmGC.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function bn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var B=P?P.prototype:void 0,H=B?B.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return bn(n,k)+"";if(x(n))return H?H.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function Rn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function In(n,r,e){return r===r?Rn(n,r,e):cn(n,Tn,e)}function Sn(n,r){var e=n==null?0:n.length;return!!e&&In(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Gn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Fn,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Gn(Dn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[R(r[e++])];return e&&e==i?n:void 0}function mn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var K=P?P.isConcatSpreadable:void 0;function Nn(n){return A(n)||z(n)||!!(K&&n&&n[K])}function Kr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=Nn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Un(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Bn(){return[]}var Hn=Object.prototype,Kn=Hn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Kn.call(n,r)}))}:Bn;function Zn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Z(n){return Zn(n,M,qn)}var Xn="__lodash_hash_undefined__";function Yn(n){return this.__data__.set(n,Xn),this}function Jn(n){return this.__data__.has(n)}function b(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}b.prototype.add=b.prototype.push=Yn;b.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new b:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,v){if(!tn(o,v)&&(p===O||f(p,O,e,i,t)))return o.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",X=P?P.prototype:void 0,S=X?X.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new m(n),new m(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(S)return S.call(n)==S.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Z(n),a=u.length,h=Z(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],v=r[d];if(i)var D=s?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(D===void 0?O===v||f(O,v,e,i,t):D)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,Y="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:N(n),h=u?J:N(r);a=a==Y?c:a,h=h==Y?c:h;var g=a==c,l=h==c,d=a==h;if(d&&U(n)){if(!U(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function F(n,r,e,i,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Or(n,r,e,i,F,f)}var vr=1,Pr=2;function br(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?F(h,a,vr|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||br(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=R(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Rr(n,r){return n!=null&&Tr(n,r,cr)}var Ir=1,Sr=2;function Lr(n,r){return $(n)&&sn(r)?un(R(n),r):function(e){var i=mn(e,n);return i===void 0&&i===r?Rr(e,n):F(r,i,Ir|Sr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(R(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Lr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&vn(n,r,M)}function Fr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Fr(Cr);function Gr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Dr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Zr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function mr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Xr(n,r,e){var i=A(n)?Un:mr,f=arguments.length<3;return i(n,an(r),e,f,G)}var Nr=1/0,Ur=I&&1/C(new I([,-0]))[1]==Nr?function(n){return new I(n)}:yn,Br=200;function Yr(n,r,e){var i=-1,f=Sn,t=n.length,s=!0,u=[],a=u;if(t>=Br){var h=r?null:Ur(n);if(h)return C(h);s=!1,f=tn,a=new b}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Kr as b,an as c,bn as d,rn as e,Zn as f,qn as g,En as h,x as i,Z as j,M as k,Yr as l,Zr as m,qr as n,cn as o,Gr as p,Cr as q,Xr as r,Bn as s,Tr as t,j as u,R as v,nn as w,Rr as x,Dn as y};
@@ -1 +1 @@
1
- import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-CFWuAxt_.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-BCXcdmGC.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};