diff --git a/webui/dist/assets/index-CzGCLWjB.js b/webui/dist/assets/index-Tw768L2V.js similarity index 99% rename from webui/dist/assets/index-CzGCLWjB.js rename to webui/dist/assets/index-Tw768L2V.js index e5a0efdf..8dc6947c 100644 --- a/webui/dist/assets/index-CzGCLWjB.js +++ b/webui/dist/assets/index-Tw768L2V.js @@ -82,7 +82,7 @@ ${n.map(([o,l])=>{const u=l.theme?.[r]||l.color;return u?` --color-${o}: ${u};` `)} } `).join(` -`)}}):null},af=ti,kc=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:u,labelClassName:d,formatter:f,color:m,nameKey:p,labelKey:g},x)=>{const{config:j}=qq(),b=y.useMemo(()=>{if(a||!t?.length)return null;const[N]=t,O=`${g||N?.dataKey||N?.name||"value"}`,C=zN(j,N,O),A=!g&&typeof l=="string"?j[l]?.label||l:C?.label;return u?i.jsx("div",{className:ue("font-medium",d),children:u(A,t)}):A?i.jsx("div",{className:ue("font-medium",d),children:A}):null},[l,u,t,a,d,j,g]);if(!e||!t?.length)return null;const w=t.length===1&&r!=="dot";return i.jsxs("div",{ref:x,className:ue("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:b,i.jsx("div",{className:"grid gap-1.5",children:t.filter(N=>N.type!=="none").map((N,O)=>{const C=`${p||N.name||N.dataKey||"value"}`,A=zN(j,N,C),E=m||N.payload.fill||N.color;return i.jsx("div",{className:ue("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:f&&N?.value!==void 0&&N.name?f(N.value,N.name,N,O,N.payload):i.jsxs(i.Fragment,{children:[A?.icon?i.jsx(A.icon,{}):!o&&i.jsx("div",{className:ue("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":E,"--color-border":E}}),i.jsxs("div",{className:ue("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[i.jsxs("div",{className:"grid gap-1.5",children:[w?b:null,i.jsx("span",{className:"text-muted-foreground",children:A?.label||N.name})]}),N.value&&i.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:N.value.toLocaleString()})]})]})},N.dataKey)})})]})});kc.displayName="ChartTooltip";const Rpe=Js,Fq=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:l}=qq();return n?.length?i.jsx("div",{ref:o,className:ue("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.filter(u=>u.type!=="none").map(u=>{const d=`${a||u.dataKey||"value"}`,f=zN(l,u,d);return i.jsxs("div",{className:ue("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[f?.icon&&!t?i.jsx(f.icon,{}):i.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:u.color}}),f?.label]},u.value)})}):null});Fq.displayName="ChartLegend";function zN(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let a=n;return n in t&&typeof t[n]=="string"?a=t[n]:r&&n in r&&typeof r[n]=="string"&&(a=r[n]),a in e?e[a]:e[n]}const Dpe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$pe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),I3=e=>{const t=$pe(e);return t.charAt(0).toUpperCase()+t.slice(1)},Uq=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ipe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Lpe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Bpe=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},d)=>y.createElement("svg",{ref:d,...Lpe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Uq("lucide",a),...!o&&!Ipe(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,m])=>y.createElement(f,m)),...Array.isArray(o)?o:[o]]));const Ce=(e,t)=>{const n=y.forwardRef(({className:r,...a},o)=>y.createElement(Bpe,{ref:o,iconNode:t,className:Uq(`lucide-${Dpe(I3(e))}`,`lucide-${e}`,r),...a}));return n.displayName=I3(e),n};const zpe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],qpe=Ce("activity",zpe);const Fpe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Hq=Ce("arrow-left",Fpe);const Upe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Hpe=Ce("arrow-right",Upe);const Wpe=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Vpe=Ce("ban",Wpe);const Gpe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Ype=Ce("book-open",Gpe);const Kpe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Xpe=Ce("bot",Kpe);const Zpe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],Wq=Ce("boxes",Zpe);const Qpe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],L3=Ce("calendar",Qpe);const Jpe=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],eve=Ce("chart-column",Jpe);const tve=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nl=Ce("check",tve);const nve=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ch=Ce("chevron-down",nve);const rve=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],HC=Ce("chevron-left",rve);const ave=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],WC=Ce("chevron-right",ave);const ive=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qN=Ce("chevron-up",ive);const ove=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],sve=Ce("chevrons-up-down",ove);const lve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],xg=Ce("circle-alert",lve);const cve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Cu=Ce("circle-check",cve);const uve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],dve=Ce("circle-question-mark",uve);const fve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],Vq=Ce("circle-user",fve);const hve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Gq=Ce("circle-x",hve);const mve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pve=Ce("circle",mve);const vve=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rl=Ce("clock",vve);const gve=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],FN=Ce("copy",gve);const yve=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],xve=Ce("database",yve);const bve=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],wve=Ce("dollar-sign",bve);const jve=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],UN=Ce("download",jve);const Sve=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],rv=Ce("external-link",Sve);const _ve=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],HN=Ce("eye-off",_ve);const Nve=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ao=Ce("eye",Nve);const Ove=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],bg=Ce("file-search",Ove);const Cve=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],VC=Ce("file-text",Cve);const Eve=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],WN=Ce("funnel",Eve);const Ave=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],wg=Ce("hash",Ave);const Tve=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],jg=Ce("house",Tve);const kve=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Mve=Ce("image",kve);const Pve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Yq=Ce("info",Pve);const Rve=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Dve=Ce("key",Rve);const $ve=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],VN=Ce("loader-circle",$ve);const Ive=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],B3=Ce("lock",Ive);const Lve=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],z3=Ce("log-out",Lve);const Bve=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],zve=Ce("menu",Bve);const qve=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Ih=Ce("message-square",qve);const Fve=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],GN=Ce("moon",Fve);const Uve=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Kq=Ce("package",Uve);const Hve=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Xq=Ce("palette",Hve);const Wve=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Vve=Ce("pause",Wve);const Gve=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Eu=Ce("pencil",Gve);const Yve=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Kve=Ce("play",Yve);const Xve=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],tr=Ce("plus",Xve);const Zve=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],al=Ce("refresh-cw",Zve);const Qve=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Jve=Ce("rotate-ccw",Qve);const ege=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],tge=Ce("rotate-cw",ege);const nge=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],GC=Ce("save",nge);const rge=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dr=Ce("search",rge);const age=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Zq=Ce("server",age);const ige=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],oge=Ce("settings-2",ige);const sge=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Hc=Ce("settings",sge);const lge=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],cge=Ce("shield",lge);const uge=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],dge=Ce("skip-forward",uge);const fge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],YC=Ce("smile",fge);const hge=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],mge=Ce("sparkles",hge);const pge=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],KC=Ce("square-pen",pge);const vge=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],q3=Ce("star",vge);const gge=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],YN=Ce("sun",gge);const yge=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],xge=Ce("terminal",yge);const bge=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ut=Ce("trash-2",bge);const wge=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],jge=Ce("trending-up",wge);const Sge=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Wc=Ce("triangle-alert",Sge);const _ge=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Qq=Ce("user",_ge);const Nge=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Oge=Ce("users",Nge);const Cge=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lh=Ce("x",Cge);const Ege=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],uh=Ce("zap",Ege);var Age=Symbol.for("react.lazy"),Sg=yO[" use ".trim().toString()];function Tge(e){return typeof e=="object"&&e!==null&&"then"in e}function Jq(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Age&&"_payload"in e&&Tge(e._payload)}function Bh(e){const t=Mge(e),n=y.forwardRef((r,a)=>{let{children:o,...l}=r;Jq(o)&&typeof Sg=="function"&&(o=Sg(o._payload));const u=y.Children.toArray(o),d=u.find(Rge);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var kge=Bh("Slot");function Mge(e){const t=y.forwardRef((n,r)=>{let{children:a,...o}=n;if(Jq(a)&&typeof Sg=="function"&&(a=Sg(a._payload)),y.isValidElement(a)){const l=$ge(a),u=Dge(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pge=Symbol("radix.slottable");function Rge(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pge}function Dge(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function $ge(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const F3=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,U3=Ye,zh=(e,t)=>n=>{var r;if(t?.variants==null)return U3(e,n?.class,n?.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(f=>{const m=n?.[f],p=o?.[f];if(m===null)return null;const g=F3(m)||F3(p);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...x}=m;return Object.entries(x).every(j=>{let[b,w]=j;return Array.isArray(w)?w.includes({...o,...u}[b]):{...o,...u}[b]===w})?[...f,p,g]:f},[]);return U3(e,l,d,n?.class,n?.className)},dh=zh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),fe=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const l=r?kge:"button";return i.jsx(l,{className:ue(dh({variant:t,size:n,className:e})),ref:o,...a})});fe.displayName="Button";function Ige(){const[e,t]=y.useState(null),[n,r]=y.useState(!0),[a,o]=y.useState(24),[l,u]=y.useState(!0),d=y.useCallback(async()=>{try{const O=localStorage.getItem("token"),C=await un.get(`/api/webui/statistics/dashboard?hours=${a}`,{headers:{Authorization:`Bearer ${O}`}});t(C.data),r(!1)}catch(O){console.error("Failed to fetch dashboard data:",O),r(!1)}},[a]);if(y.useEffect(()=>{d()},[d]),y.useEffect(()=>{if(!l)return;const O=setInterval(()=>{d()},3e4);return()=>clearInterval(O)},[l,d]),n||!e)return i.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-200px)]",children:i.jsxs("div",{className:"text-center space-y-4",children:[i.jsx(al,{className:"h-12 w-12 animate-spin mx-auto text-muted-foreground"}),i.jsx("p",{className:"text-muted-foreground",children:"加载统计数据中..."})]})});const{summary:f,model_stats:m,hourly_data:p,daily_data:g,recent_activity:x}=e,j=O=>{const C=Math.floor(O/3600),A=Math.floor(O%3600/60);return`${C}小时${A}分钟`},b=O=>new Date(O).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),w=m.slice(0,6).map(O=>({name:O.model_name,value:O.request_count,fill:`hsl(var(--chart-${m.indexOf(O)%5+1}))`})),N={requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"},tokens:{label:"Tokens",color:"hsl(var(--chart-3))"}};return i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"实时监控面板"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"麦麦运行状态和统计数据一览"})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(sl,{value:a.toString(),onValueChange:O=>o(Number(O)),children:i.jsxs(Zo,{className:"grid grid-cols-3 w-full sm:w-auto",children:[i.jsx(Ct,{value:"24",children:"24小时"}),i.jsx(Ct,{value:"168",children:"7天"}),i.jsx(Ct,{value:"720",children:"30天"})]})}),i.jsxs(fe,{variant:l?"default":"outline",size:"sm",onClick:()=>u(!l),className:"gap-2",children:[i.jsx(al,{className:`h-4 w-4 ${l?"animate-spin":""}`}),i.jsx("span",{className:"hidden sm:inline",children:"自动刷新"})]}),i.jsx(fe,{variant:"outline",size:"sm",onClick:d,children:i.jsx(al,{className:"h-4 w-4"})})]})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-4",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"总请求数"}),i.jsx(qpe,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-2xl font-bold",children:f.total_requests.toLocaleString()}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["最近",a<48?a+"小时":Math.floor(a/24)+"天"]})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"总花费"}),i.jsx(wve,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:["¥",f.total_cost.toFixed(2)]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.cost_per_hour>0?`¥${f.cost_per_hour.toFixed(2)}/小时`:"暂无数据"})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"Token消耗"}),i.jsx(xve,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:[(f.total_tokens/1e3).toFixed(1),"K"]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.tokens_per_hour>0?`${(f.tokens_per_hour/1e3).toFixed(1)}K/小时`:"暂无数据"})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"平均响应"}),i.jsx(uh,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:[f.avg_response_time.toFixed(2),"s"]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"API平均耗时"})]})]})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-3",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"在线时长"}),i.jsx(rl,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsx(cn,{children:i.jsx("div",{className:"text-xl font-bold",children:j(f.online_time)})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"消息处理"}),i.jsx(Ih,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-xl font-bold",children:f.total_messages.toLocaleString()}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["回复 ",f.total_replies.toLocaleString()," 条"]})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"成本效率"}),i.jsx(jge,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-xl font-bold",children:f.total_messages>0?`¥${(f.total_cost/f.total_messages*100).toFixed(2)}`:"¥0.00"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"每100条消息"})]})]})]}),i.jsxs(sl,{defaultValue:"trends",className:"space-y-4",children:[i.jsxs(Zo,{className:"grid w-full grid-cols-2 sm:grid-cols-4",children:[i.jsx(Ct,{value:"trends",children:"趋势"}),i.jsx(Ct,{value:"models",children:"模型"}),i.jsx(Ct,{value:"activity",children:"活动"}),i.jsx(Ct,{value:"daily",children:"日统计"})]}),i.jsxs(Jt,{value:"trends",className:"space-y-4",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"请求趋势"}),i.jsxs(er,{children:["最近",a,"小时的请求量变化"]})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:i.jsxs(Tpe,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx($h,{type:"monotone",dataKey:"requests",stroke:"var(--color-requests)",strokeWidth:2})]})})})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"花费趋势"}),i.jsx(er,{children:"API调用成本变化"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:i.jsxs(FS,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx(si,{dataKey:"cost",fill:"var(--color-cost)"})]})})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"Token消耗"}),i.jsx(er,{children:"Token使用量变化"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:i.jsxs(FS,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx(si,{dataKey:"tokens",fill:"var(--color-tokens)"})]})})})]})]})]}),i.jsx(Jt,{value:"models",className:"space-y-4",children:i.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"模型请求分布"}),i.jsx(er,{children:"各模型使用占比"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:Object.fromEntries(m.slice(0,6).map((O,C)=>[O.model_name,{label:O.model_name,color:`hsl(var(--chart-${C%5+1}))`}])),className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:i.jsxs(kpe,{children:[i.jsx(af,{content:i.jsx(kc,{})}),i.jsx(fo,{data:w,cx:"50%",cy:"50%",labelLine:!1,label:({name:O,percent:C})=>`${O} ${C?(C*100).toFixed(0):0}%`,outerRadius:100,dataKey:"value",children:w.map((O,C)=>i.jsx(ay,{fill:O.fill},`cell-${C}`))})]})})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"模型详细统计"}),i.jsx(er,{children:"请求数、花费和性能"})]}),i.jsx(cn,{children:i.jsx(Kt,{className:"h-[300px] sm:h-[400px]",children:i.jsx("div",{className:"space-y-3",children:m.map((O,C)=>i.jsxs("div",{className:"p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx("h4",{className:"font-semibold text-sm truncate flex-1 min-w-0",children:O.model_name}),i.jsx("div",{className:"w-3 h-3 rounded-full ml-2 flex-shrink-0",style:{backgroundColor:`hsl(var(--chart-${C%5+1}))`}})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"请求数:"}),i.jsx("span",{className:"ml-1 font-medium",children:O.request_count.toLocaleString()})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"花费:"}),i.jsxs("span",{className:"ml-1 font-medium",children:["¥",O.total_cost.toFixed(2)]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),i.jsxs("span",{className:"ml-1 font-medium",children:[(O.total_tokens/1e3).toFixed(1),"K"]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"平均耗时:"}),i.jsxs("span",{className:"ml-1 font-medium",children:[O.avg_response_time.toFixed(2),"s"]})]})]})]},C))})})})]})]})}),i.jsx(Jt,{value:"activity",children:i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"最近活动"}),i.jsx(er,{children:"最新的API调用记录"})]}),i.jsx(cn,{children:i.jsx(Kt,{className:"h-[400px] sm:h-[500px]",children:i.jsx("div",{className:"space-y-2",children:x.map((O,C)=>i.jsxs("div",{className:"p-3 sm:p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-2",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"font-medium text-sm truncate",children:O.model}),i.jsx("div",{className:"text-xs text-muted-foreground",children:O.request_type})]}),i.jsx("div",{className:"text-xs text-muted-foreground flex-shrink-0",children:b(O.timestamp)})]}),i.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),i.jsx("span",{className:"ml-1",children:O.tokens})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"花费:"}),i.jsxs("span",{className:"ml-1",children:["¥",O.cost.toFixed(4)]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"耗时:"}),i.jsxs("span",{className:"ml-1",children:[O.time_cost.toFixed(2),"s"]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"状态:"}),i.jsx("span",{className:`ml-1 ${O.status==="success"?"text-green-600":"text-red-600"}`,children:O.status})]})]})]},C))})})})]})}),i.jsx(Jt,{value:"daily",children:i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"每日统计"}),i.jsx(er,{children:"最近7天的数据汇总"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:{requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"}},className:"h-[400px] sm:h-[500px] w-full aspect-auto",children:i.jsxs(FS,{data:g,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>{const C=new Date(O);return`${C.getMonth()+1}/${C.getDate()}`},stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{yAxisId:"left",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{yAxisId:"right",orientation:"right",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>new Date(O).toLocaleDateString("zh-CN")})}),i.jsx(Rpe,{content:i.jsx(Fq,{})}),i.jsx(si,{yAxisId:"left",dataKey:"requests",fill:"var(--color-requests)"}),i.jsx(si,{yAxisId:"right",dataKey:"cost",fill:"var(--color-cost)"})]})})})]})})]})]})})}const Lge={theme:"system",setTheme:()=>null},eF=y.createContext(Lge),XC=()=>{const e=y.useContext(eF);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Bge=(e,t,n)=>{const r=document.documentElement.classList.contains("no-animations");if(!document.startViewTransition||r){t(e);return}const a=n.clientX,o=n.clientY,l=Math.hypot(Math.max(a,innerWidth-a),Math.max(o,innerHeight-o));document.startViewTransition(()=>{t(e)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${a}px ${o}px)`,`circle(${l}px at ${a}px ${o}px)`]},{duration:500,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})},tF=y.createContext(void 0),nF=()=>{const e=y.useContext(tF);if(e===void 0)throw new Error("useAnimation must be used within an AnimationProvider");return e};function Ay(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ty(e){const[t,n]=y.useState(void 0);return Un(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ky="Switch",[zge]=hr(ky),[qge,Fge]=zge(ky),rF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:l,disabled:u,value:d="on",onCheckedChange:f,form:m,...p}=e,[g,x]=y.useState(null),j=qe(t,C=>x(C)),b=y.useRef(!1),w=g?m||!!g.closest("form"):!0,[N,O]=Na({prop:a,defaultProp:o??!1,onChange:f,caller:ky});return i.jsxs(qge,{scope:n,checked:N,disabled:u,children:[i.jsx(Pe.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":sF(N),"data-disabled":u?"":void 0,disabled:u,value:d,...p,ref:j,onClick:Se(e.onClick,C=>{O(A=>!A),w&&(b.current=C.isPropagationStopped(),b.current||C.stopPropagation())})}),w&&i.jsx(oF,{control:g,bubbles:!b.current,name:r,value:d,checked:N,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});rF.displayName=ky;var aF="SwitchThumb",iF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=Fge(aF,n);return i.jsx(Pe.span,{"data-state":sF(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});iF.displayName=aF;var Uge="SwitchBubbleInput",oF=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const l=y.useRef(null),u=qe(l,o),d=Ay(n),f=Ty(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const p=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==n&&x){const j=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(j)}},[d,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:u,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});oF.displayName=Uge;function sF(e){return e?"checked":"unchecked"}var lF=rF,Hge=iF;const at=y.forwardRef(({className:e,...t},n)=>i.jsx(lF,{className:ue("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:i.jsx(Hge,{className:ue("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));at.displayName=lF.displayName;var Wge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vge=Wge.reduce((e,t)=>{const n=Bh(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Gge="Label",cF=y.forwardRef((e,t)=>i.jsx(Vge.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));cF.displayName=Gge;var uF=cF;const Yge=zh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=y.forwardRef(({className:e,...t},n)=>i.jsx(uF,{ref:n,className:ue(Yge(),e),...t}));J.displayName=uF.displayName;const Ne=y.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:ue("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ne.displayName="Input";const Kge=1,Xge=1e6;let US=0;function Zge(){return US=(US+1)%Number.MAX_SAFE_INTEGER,US.toString()}const HS=new Map,H3=e=>{if(HS.has(e))return;const t=setTimeout(()=>{HS.delete(e),Of({type:"REMOVE_TOAST",toastId:e})},Xge);HS.set(e,t)},Qge=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Kge)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?H3(n):e.toasts.forEach(r=>{H3(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},av=[];let iv={toasts:[]};function Of(e){iv=Qge(iv,e),av.forEach(t=>{t(iv)})}function Jge({...e}){const t=Zge(),n=a=>Of({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Of({type:"DISMISS_TOAST",toastId:t});return Of({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function mr(){const[e,t]=y.useState(iv);return y.useEffect(()=>(av.push(t),()=>{const n=av.indexOf(t);n>-1&&av.splice(n,1)}),[e]),{...e,toast:Jge,dismiss:n=>Of({type:"DISMISS_TOAST",toastId:n})}}const eye=[{id:"minLength",label:"长度至少 10 位",description:"Token 长度必须大于等于 10 个字符",validate:e=>e.length>=10},{id:"hasUppercase",label:"包含大写字母",description:"至少包含一个大写字母 (A-Z)",validate:e=>/[A-Z]/.test(e)},{id:"hasLowercase",label:"包含小写字母",description:"至少包含一个小写字母 (a-z)",validate:e=>/[a-z]/.test(e)},{id:"hasSpecialChar",label:"包含特殊符号",description:"至少包含一个特殊符号 (!@#$%^&*()_+-=[]{}|;:,.<>?/)",validate:e=>/[!@#$%^&*()_+\-=[\]{}|;:,.<>?/]/.test(e)}];function tye(e){const t=eye.map(r=>({id:r.id,label:r.label,description:r.description,passed:r.validate(e)}));return{isValid:t.every(r=>r.passed),rules:t}}const ZC="0.11.3",QC="MaiBot Dashboard",nye=`${QC} v${ZC}`,rye=(e="v")=>`${e}${ZC}`;function aye(e,t=globalThis?.document){const n=nn(e);y.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var iye="DismissableLayer",KN="dismissableLayer.update",oye="dismissableLayer.pointerDownOutside",sye="dismissableLayer.focusOutside",W3,dF=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_l=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=y.useContext(dF),[m,p]=y.useState(null),g=m?.ownerDocument??globalThis?.document,[,x]=y.useState({}),j=qe(t,T=>p(T)),b=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),N=b.indexOf(w),O=m?b.indexOf(m):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,A=O>=N,E=cye(T=>{const M=T.target,$=[...f.branches].some(z=>z.contains(M));!A||$||(a?.(T),l?.(T),T.defaultPrevented||u?.())},g),k=uye(T=>{const M=T.target;[...f.branches].some(z=>z.contains(M))||(o?.(T),l?.(T),T.defaultPrevented||u?.())},g);return aye(T=>{O===f.layers.size-1&&(r?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},g),y.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(W3=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),V3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=W3)}},[m,g,n,f]),y.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),V3())},[m,f]),y.useEffect(()=>{const T=()=>x({});return document.addEventListener(KN,T),()=>document.removeEventListener(KN,T)},[]),i.jsx(Pe.div,{...d,ref:j,style:{pointerEvents:C?A?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,E.onPointerDownCapture)})});_l.displayName=iye;var lye="DismissableLayerBranch",fF=y.forwardRef((e,t)=>{const n=y.useContext(dF),r=y.useRef(null),a=qe(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),i.jsx(Pe.div,{...e,ref:a})});fF.displayName=lye;function cye(e,t=globalThis?.document){const n=nn(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){hF(oye,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uye(e,t=globalThis?.document){const n=nn(e),r=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!r.current&&hF(sye,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function V3(){const e=new CustomEvent(KN);document.dispatchEvent(e)}function hF(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?RO(a,o):a.dispatchEvent(o)}var dye=_l,fye=fF,WS="focusScope.autoFocusOnMount",VS="focusScope.autoFocusOnUnmount",G3={bubbles:!1,cancelable:!0},hye="FocusScope",qh=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=y.useState(null),f=nn(a),m=nn(o),p=y.useRef(null),g=qe(t,b=>d(b)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let b=function(C){if(x.paused||!u)return;const A=C.target;u.contains(A)?p.current=A:zo(p.current,{select:!0})},w=function(C){if(x.paused||!u)return;const A=C.relatedTarget;A!==null&&(u.contains(A)||zo(p.current,{select:!0}))},N=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&zo(u)};document.addEventListener("focusin",b),document.addEventListener("focusout",w);const O=new MutationObserver(N);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",w),O.disconnect()}}},[r,u,x.paused]),y.useEffect(()=>{if(u){K3.add(x);const b=document.activeElement;if(!u.contains(b)){const N=new CustomEvent(WS,G3);u.addEventListener(WS,f),u.dispatchEvent(N),N.defaultPrevented||(mye(xye(mF(u)),{select:!0}),document.activeElement===b&&zo(u))}return()=>{u.removeEventListener(WS,f),setTimeout(()=>{const N=new CustomEvent(VS,G3);u.addEventListener(VS,m),u.dispatchEvent(N),N.defaultPrevented||zo(b??document.body,{select:!0}),u.removeEventListener(VS,m),K3.remove(x)},0)}}},[u,f,m,x]);const j=y.useCallback(b=>{if(!n&&!r||x.paused)return;const w=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,N=document.activeElement;if(w&&N){const O=b.currentTarget,[C,A]=pye(O);C&&A?!b.shiftKey&&N===A?(b.preventDefault(),n&&zo(C,{select:!0})):b.shiftKey&&N===C&&(b.preventDefault(),n&&zo(A,{select:!0})):N===O&&b.preventDefault()}},[n,r,x.paused]);return i.jsx(Pe.div,{tabIndex:-1,...l,ref:g,onKeyDown:j})});qh.displayName=hye;function mye(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zo(r,{select:t}),document.activeElement!==n)return}function pye(e){const t=mF(e),n=Y3(t,e),r=Y3(t.reverse(),e);return[n,r]}function mF(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Y3(e,t){for(const n of e)if(!vye(n,{upTo:t}))return n}function vye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gye(e){return e instanceof HTMLInputElement&&"select"in e}function zo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gye(e)&&t&&e.select()}}var K3=yye();function yye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=X3(e,t),e.unshift(t)},remove(t){e=X3(e,t),e[0]?.resume()}}}function X3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xye(e){return e.filter(t=>t.tagName!=="A")}var bye="Portal",Nl=y.forwardRef((e,t)=>{const{container:n,...r}=e,[a,o]=y.useState(!1);Un(()=>o(!0),[]);const l=n||a&&globalThis?.document?.body;return l?mY.createPortal(i.jsx(Pe.div,{...r,ref:t}),l):null});Nl.displayName=bye;var GS=0;function My(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Z3()),document.body.insertAdjacentElement("beforeend",e[1]??Z3()),GS++,()=>{GS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),GS--}},[])}function Z3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ni=function(){return ni=Object.assign||function(t){for(var n,r=1,a=arguments.length;r"u")return Iye;var t=Lye(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},zye=yF(),Vc="data-scroll-locked",qye=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),` +`)}}):null},af=ti,kc=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:u,labelClassName:d,formatter:f,color:m,nameKey:p,labelKey:g},x)=>{const{config:j}=qq(),b=y.useMemo(()=>{if(a||!t?.length)return null;const[N]=t,O=`${g||N?.dataKey||N?.name||"value"}`,C=zN(j,N,O),A=!g&&typeof l=="string"?j[l]?.label||l:C?.label;return u?i.jsx("div",{className:ue("font-medium",d),children:u(A,t)}):A?i.jsx("div",{className:ue("font-medium",d),children:A}):null},[l,u,t,a,d,j,g]);if(!e||!t?.length)return null;const w=t.length===1&&r!=="dot";return i.jsxs("div",{ref:x,className:ue("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:b,i.jsx("div",{className:"grid gap-1.5",children:t.filter(N=>N.type!=="none").map((N,O)=>{const C=`${p||N.name||N.dataKey||"value"}`,A=zN(j,N,C),E=m||N.payload.fill||N.color;return i.jsx("div",{className:ue("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:f&&N?.value!==void 0&&N.name?f(N.value,N.name,N,O,N.payload):i.jsxs(i.Fragment,{children:[A?.icon?i.jsx(A.icon,{}):!o&&i.jsx("div",{className:ue("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":E,"--color-border":E}}),i.jsxs("div",{className:ue("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[i.jsxs("div",{className:"grid gap-1.5",children:[w?b:null,i.jsx("span",{className:"text-muted-foreground",children:A?.label||N.name})]}),N.value&&i.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:N.value.toLocaleString()})]})]})},N.dataKey)})})]})});kc.displayName="ChartTooltip";const Rpe=Js,Fq=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:l}=qq();return n?.length?i.jsx("div",{ref:o,className:ue("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.filter(u=>u.type!=="none").map(u=>{const d=`${a||u.dataKey||"value"}`,f=zN(l,u,d);return i.jsxs("div",{className:ue("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[f?.icon&&!t?i.jsx(f.icon,{}):i.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:u.color}}),f?.label]},u.value)})}):null});Fq.displayName="ChartLegend";function zN(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let a=n;return n in t&&typeof t[n]=="string"?a=t[n]:r&&n in r&&typeof r[n]=="string"&&(a=r[n]),a in e?e[a]:e[n]}const Dpe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$pe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),I3=e=>{const t=$pe(e);return t.charAt(0).toUpperCase()+t.slice(1)},Uq=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ipe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Lpe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Bpe=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},d)=>y.createElement("svg",{ref:d,...Lpe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Uq("lucide",a),...!o&&!Ipe(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,m])=>y.createElement(f,m)),...Array.isArray(o)?o:[o]]));const Ce=(e,t)=>{const n=y.forwardRef(({className:r,...a},o)=>y.createElement(Bpe,{ref:o,iconNode:t,className:Uq(`lucide-${Dpe(I3(e))}`,`lucide-${e}`,r),...a}));return n.displayName=I3(e),n};const zpe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],qpe=Ce("activity",zpe);const Fpe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Hq=Ce("arrow-left",Fpe);const Upe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Hpe=Ce("arrow-right",Upe);const Wpe=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Vpe=Ce("ban",Wpe);const Gpe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Ype=Ce("book-open",Gpe);const Kpe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Xpe=Ce("bot",Kpe);const Zpe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],Wq=Ce("boxes",Zpe);const Qpe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],L3=Ce("calendar",Qpe);const Jpe=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],eve=Ce("chart-column",Jpe);const tve=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nl=Ce("check",tve);const nve=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ch=Ce("chevron-down",nve);const rve=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],HC=Ce("chevron-left",rve);const ave=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],WC=Ce("chevron-right",ave);const ive=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qN=Ce("chevron-up",ive);const ove=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],sve=Ce("chevrons-up-down",ove);const lve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],xg=Ce("circle-alert",lve);const cve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Cu=Ce("circle-check",cve);const uve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],dve=Ce("circle-question-mark",uve);const fve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],Vq=Ce("circle-user",fve);const hve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Gq=Ce("circle-x",hve);const mve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pve=Ce("circle",mve);const vve=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rl=Ce("clock",vve);const gve=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],FN=Ce("copy",gve);const yve=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],xve=Ce("database",yve);const bve=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],wve=Ce("dollar-sign",bve);const jve=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],UN=Ce("download",jve);const Sve=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],rv=Ce("external-link",Sve);const _ve=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],HN=Ce("eye-off",_ve);const Nve=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ao=Ce("eye",Nve);const Ove=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],bg=Ce("file-search",Ove);const Cve=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],VC=Ce("file-text",Cve);const Eve=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],WN=Ce("funnel",Eve);const Ave=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],wg=Ce("hash",Ave);const Tve=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],jg=Ce("house",Tve);const kve=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Mve=Ce("image",kve);const Pve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Yq=Ce("info",Pve);const Rve=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Dve=Ce("key",Rve);const $ve=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],VN=Ce("loader-circle",$ve);const Ive=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],B3=Ce("lock",Ive);const Lve=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],z3=Ce("log-out",Lve);const Bve=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],zve=Ce("menu",Bve);const qve=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Ih=Ce("message-square",qve);const Fve=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],GN=Ce("moon",Fve);const Uve=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Kq=Ce("package",Uve);const Hve=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Xq=Ce("palette",Hve);const Wve=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Vve=Ce("pause",Wve);const Gve=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Eu=Ce("pencil",Gve);const Yve=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Kve=Ce("play",Yve);const Xve=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],tr=Ce("plus",Xve);const Zve=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],al=Ce("refresh-cw",Zve);const Qve=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Jve=Ce("rotate-ccw",Qve);const ege=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],tge=Ce("rotate-cw",ege);const nge=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],GC=Ce("save",nge);const rge=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dr=Ce("search",rge);const age=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Zq=Ce("server",age);const ige=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],oge=Ce("settings-2",ige);const sge=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Hc=Ce("settings",sge);const lge=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],cge=Ce("shield",lge);const uge=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],dge=Ce("skip-forward",uge);const fge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],YC=Ce("smile",fge);const hge=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],mge=Ce("sparkles",hge);const pge=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],KC=Ce("square-pen",pge);const vge=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],q3=Ce("star",vge);const gge=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],YN=Ce("sun",gge);const yge=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],xge=Ce("terminal",yge);const bge=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ut=Ce("trash-2",bge);const wge=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],jge=Ce("trending-up",wge);const Sge=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Wc=Ce("triangle-alert",Sge);const _ge=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Qq=Ce("user",_ge);const Nge=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Oge=Ce("users",Nge);const Cge=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lh=Ce("x",Cge);const Ege=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],uh=Ce("zap",Ege);var Age=Symbol.for("react.lazy"),Sg=yO[" use ".trim().toString()];function Tge(e){return typeof e=="object"&&e!==null&&"then"in e}function Jq(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Age&&"_payload"in e&&Tge(e._payload)}function Bh(e){const t=Mge(e),n=y.forwardRef((r,a)=>{let{children:o,...l}=r;Jq(o)&&typeof Sg=="function"&&(o=Sg(o._payload));const u=y.Children.toArray(o),d=u.find(Rge);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var kge=Bh("Slot");function Mge(e){const t=y.forwardRef((n,r)=>{let{children:a,...o}=n;if(Jq(a)&&typeof Sg=="function"&&(a=Sg(a._payload)),y.isValidElement(a)){const l=$ge(a),u=Dge(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pge=Symbol("radix.slottable");function Rge(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pge}function Dge(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function $ge(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const F3=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,U3=Ye,zh=(e,t)=>n=>{var r;if(t?.variants==null)return U3(e,n?.class,n?.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(f=>{const m=n?.[f],p=o?.[f];if(m===null)return null;const g=F3(m)||F3(p);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...x}=m;return Object.entries(x).every(j=>{let[b,w]=j;return Array.isArray(w)?w.includes({...o,...u}[b]):{...o,...u}[b]===w})?[...f,p,g]:f},[]);return U3(e,l,d,n?.class,n?.className)},dh=zh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),fe=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const l=r?kge:"button";return i.jsx(l,{className:ue(dh({variant:t,size:n,className:e})),ref:o,...a})});fe.displayName="Button";function Ige(){const[e,t]=y.useState(null),[n,r]=y.useState(!0),[a,o]=y.useState(24),[l,u]=y.useState(!0),d=y.useCallback(async()=>{try{const O=localStorage.getItem("token"),C=await un.get(`/api/webui/statistics/dashboard?hours=${a}`,{headers:{Authorization:`Bearer ${O}`}});t(C.data),r(!1)}catch(O){console.error("Failed to fetch dashboard data:",O),r(!1)}},[a]);if(y.useEffect(()=>{d()},[d]),y.useEffect(()=>{if(!l)return;const O=setInterval(()=>{d()},3e4);return()=>clearInterval(O)},[l,d]),n||!e)return i.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-200px)]",children:i.jsxs("div",{className:"text-center space-y-4",children:[i.jsx(al,{className:"h-12 w-12 animate-spin mx-auto text-muted-foreground"}),i.jsx("p",{className:"text-muted-foreground",children:"加载统计数据中..."})]})});const{summary:f,model_stats:m,hourly_data:p,daily_data:g,recent_activity:x}=e,j=O=>{const C=Math.floor(O/3600),A=Math.floor(O%3600/60);return`${C}小时${A}分钟`},b=O=>new Date(O).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),w=m.slice(0,6).map(O=>({name:O.model_name,value:O.request_count,fill:`hsl(var(--chart-${m.indexOf(O)%5+1}))`})),N={requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"},tokens:{label:"Tokens",color:"hsl(var(--chart-3))"}};return i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"实时监控面板"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"麦麦运行状态和统计数据一览"})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(sl,{value:a.toString(),onValueChange:O=>o(Number(O)),children:i.jsxs(Zo,{className:"grid grid-cols-3 w-full sm:w-auto",children:[i.jsx(Ct,{value:"24",children:"24小时"}),i.jsx(Ct,{value:"168",children:"7天"}),i.jsx(Ct,{value:"720",children:"30天"})]})}),i.jsxs(fe,{variant:l?"default":"outline",size:"sm",onClick:()=>u(!l),className:"gap-2",children:[i.jsx(al,{className:`h-4 w-4 ${l?"animate-spin":""}`}),i.jsx("span",{className:"hidden sm:inline",children:"自动刷新"})]}),i.jsx(fe,{variant:"outline",size:"sm",onClick:d,children:i.jsx(al,{className:"h-4 w-4"})})]})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-4",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"总请求数"}),i.jsx(qpe,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-2xl font-bold",children:f.total_requests.toLocaleString()}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["最近",a<48?a+"小时":Math.floor(a/24)+"天"]})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"总花费"}),i.jsx(wve,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:["¥",f.total_cost.toFixed(2)]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.cost_per_hour>0?`¥${f.cost_per_hour.toFixed(2)}/小时`:"暂无数据"})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"Token消耗"}),i.jsx(xve,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:[(f.total_tokens/1e3).toFixed(1),"K"]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.tokens_per_hour>0?`${(f.tokens_per_hour/1e3).toFixed(1)}K/小时`:"暂无数据"})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"平均响应"}),i.jsx(uh,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:[f.avg_response_time.toFixed(2),"s"]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"API平均耗时"})]})]})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-3",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"在线时长"}),i.jsx(rl,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsx(cn,{children:i.jsx("div",{className:"text-xl font-bold",children:j(f.online_time)})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"消息处理"}),i.jsx(Ih,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-xl font-bold",children:f.total_messages.toLocaleString()}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["回复 ",f.total_replies.toLocaleString()," 条"]})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"成本效率"}),i.jsx(jge,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-xl font-bold",children:f.total_messages>0?`¥${(f.total_cost/f.total_messages*100).toFixed(2)}`:"¥0.00"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"每100条消息"})]})]})]}),i.jsxs(sl,{defaultValue:"trends",className:"space-y-4",children:[i.jsxs(Zo,{className:"grid w-full grid-cols-2 sm:grid-cols-4",children:[i.jsx(Ct,{value:"trends",children:"趋势"}),i.jsx(Ct,{value:"models",children:"模型"}),i.jsx(Ct,{value:"activity",children:"活动"}),i.jsx(Ct,{value:"daily",children:"日统计"})]}),i.jsxs(Jt,{value:"trends",className:"space-y-4",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"请求趋势"}),i.jsxs(er,{children:["最近",a,"小时的请求量变化"]})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:i.jsxs(Tpe,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx($h,{type:"monotone",dataKey:"requests",stroke:"var(--color-requests)",strokeWidth:2})]})})})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"花费趋势"}),i.jsx(er,{children:"API调用成本变化"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:i.jsxs(FS,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx(si,{dataKey:"cost",fill:"var(--color-cost)"})]})})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"Token消耗"}),i.jsx(er,{children:"Token使用量变化"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:i.jsxs(FS,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx(si,{dataKey:"tokens",fill:"var(--color-tokens)"})]})})})]})]})]}),i.jsx(Jt,{value:"models",className:"space-y-4",children:i.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"模型请求分布"}),i.jsx(er,{children:"各模型使用占比"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:Object.fromEntries(m.slice(0,6).map((O,C)=>[O.model_name,{label:O.model_name,color:`hsl(var(--chart-${C%5+1}))`}])),className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:i.jsxs(kpe,{children:[i.jsx(af,{content:i.jsx(kc,{})}),i.jsx(fo,{data:w,cx:"50%",cy:"50%",labelLine:!1,label:({name:O,percent:C})=>`${O} ${C?(C*100).toFixed(0):0}%`,outerRadius:100,dataKey:"value",children:w.map((O,C)=>i.jsx(ay,{fill:O.fill},`cell-${C}`))})]})})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"模型详细统计"}),i.jsx(er,{children:"请求数、花费和性能"})]}),i.jsx(cn,{children:i.jsx(Kt,{className:"h-[300px] sm:h-[400px]",children:i.jsx("div",{className:"space-y-3",children:m.map((O,C)=>i.jsxs("div",{className:"p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx("h4",{className:"font-semibold text-sm truncate flex-1 min-w-0",children:O.model_name}),i.jsx("div",{className:"w-3 h-3 rounded-full ml-2 flex-shrink-0",style:{backgroundColor:`hsl(var(--chart-${C%5+1}))`}})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"请求数:"}),i.jsx("span",{className:"ml-1 font-medium",children:O.request_count.toLocaleString()})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"花费:"}),i.jsxs("span",{className:"ml-1 font-medium",children:["¥",O.total_cost.toFixed(2)]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),i.jsxs("span",{className:"ml-1 font-medium",children:[(O.total_tokens/1e3).toFixed(1),"K"]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"平均耗时:"}),i.jsxs("span",{className:"ml-1 font-medium",children:[O.avg_response_time.toFixed(2),"s"]})]})]})]},C))})})})]})]})}),i.jsx(Jt,{value:"activity",children:i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"最近活动"}),i.jsx(er,{children:"最新的API调用记录"})]}),i.jsx(cn,{children:i.jsx(Kt,{className:"h-[400px] sm:h-[500px]",children:i.jsx("div",{className:"space-y-2",children:x.map((O,C)=>i.jsxs("div",{className:"p-3 sm:p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-2",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"font-medium text-sm truncate",children:O.model}),i.jsx("div",{className:"text-xs text-muted-foreground",children:O.request_type})]}),i.jsx("div",{className:"text-xs text-muted-foreground flex-shrink-0",children:b(O.timestamp)})]}),i.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),i.jsx("span",{className:"ml-1",children:O.tokens})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"花费:"}),i.jsxs("span",{className:"ml-1",children:["¥",O.cost.toFixed(4)]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"耗时:"}),i.jsxs("span",{className:"ml-1",children:[O.time_cost.toFixed(2),"s"]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"状态:"}),i.jsx("span",{className:`ml-1 ${O.status==="success"?"text-green-600":"text-red-600"}`,children:O.status})]})]})]},C))})})})]})}),i.jsx(Jt,{value:"daily",children:i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"每日统计"}),i.jsx(er,{children:"最近7天的数据汇总"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:{requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"}},className:"h-[400px] sm:h-[500px] w-full aspect-auto",children:i.jsxs(FS,{data:g,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>{const C=new Date(O);return`${C.getMonth()+1}/${C.getDate()}`},stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{yAxisId:"left",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{yAxisId:"right",orientation:"right",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>new Date(O).toLocaleDateString("zh-CN")})}),i.jsx(Rpe,{content:i.jsx(Fq,{})}),i.jsx(si,{yAxisId:"left",dataKey:"requests",fill:"var(--color-requests)"}),i.jsx(si,{yAxisId:"right",dataKey:"cost",fill:"var(--color-cost)"})]})})})]})})]})]})})}const Lge={theme:"system",setTheme:()=>null},eF=y.createContext(Lge),XC=()=>{const e=y.useContext(eF);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Bge=(e,t,n)=>{const r=document.documentElement.classList.contains("no-animations");if(!document.startViewTransition||r){t(e);return}const a=n.clientX,o=n.clientY,l=Math.hypot(Math.max(a,innerWidth-a),Math.max(o,innerHeight-o));document.startViewTransition(()=>{t(e)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${a}px ${o}px)`,`circle(${l}px at ${a}px ${o}px)`]},{duration:500,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})},tF=y.createContext(void 0),nF=()=>{const e=y.useContext(tF);if(e===void 0)throw new Error("useAnimation must be used within an AnimationProvider");return e};function Ay(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ty(e){const[t,n]=y.useState(void 0);return Un(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ky="Switch",[zge]=hr(ky),[qge,Fge]=zge(ky),rF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:l,disabled:u,value:d="on",onCheckedChange:f,form:m,...p}=e,[g,x]=y.useState(null),j=qe(t,C=>x(C)),b=y.useRef(!1),w=g?m||!!g.closest("form"):!0,[N,O]=Na({prop:a,defaultProp:o??!1,onChange:f,caller:ky});return i.jsxs(qge,{scope:n,checked:N,disabled:u,children:[i.jsx(Pe.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":sF(N),"data-disabled":u?"":void 0,disabled:u,value:d,...p,ref:j,onClick:Se(e.onClick,C=>{O(A=>!A),w&&(b.current=C.isPropagationStopped(),b.current||C.stopPropagation())})}),w&&i.jsx(oF,{control:g,bubbles:!b.current,name:r,value:d,checked:N,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});rF.displayName=ky;var aF="SwitchThumb",iF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=Fge(aF,n);return i.jsx(Pe.span,{"data-state":sF(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});iF.displayName=aF;var Uge="SwitchBubbleInput",oF=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const l=y.useRef(null),u=qe(l,o),d=Ay(n),f=Ty(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const p=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==n&&x){const j=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(j)}},[d,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:u,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});oF.displayName=Uge;function sF(e){return e?"checked":"unchecked"}var lF=rF,Hge=iF;const at=y.forwardRef(({className:e,...t},n)=>i.jsx(lF,{className:ue("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:i.jsx(Hge,{className:ue("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));at.displayName=lF.displayName;var Wge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vge=Wge.reduce((e,t)=>{const n=Bh(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Gge="Label",cF=y.forwardRef((e,t)=>i.jsx(Vge.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));cF.displayName=Gge;var uF=cF;const Yge=zh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=y.forwardRef(({className:e,...t},n)=>i.jsx(uF,{ref:n,className:ue(Yge(),e),...t}));J.displayName=uF.displayName;const Ne=y.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:ue("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ne.displayName="Input";const Kge=1,Xge=1e6;let US=0;function Zge(){return US=(US+1)%Number.MAX_SAFE_INTEGER,US.toString()}const HS=new Map,H3=e=>{if(HS.has(e))return;const t=setTimeout(()=>{HS.delete(e),Of({type:"REMOVE_TOAST",toastId:e})},Xge);HS.set(e,t)},Qge=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Kge)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?H3(n):e.toasts.forEach(r=>{H3(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},av=[];let iv={toasts:[]};function Of(e){iv=Qge(iv,e),av.forEach(t=>{t(iv)})}function Jge({...e}){const t=Zge(),n=a=>Of({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Of({type:"DISMISS_TOAST",toastId:t});return Of({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function mr(){const[e,t]=y.useState(iv);return y.useEffect(()=>(av.push(t),()=>{const n=av.indexOf(t);n>-1&&av.splice(n,1)}),[e]),{...e,toast:Jge,dismiss:n=>Of({type:"DISMISS_TOAST",toastId:n})}}const eye=[{id:"minLength",label:"长度至少 10 位",description:"Token 长度必须大于等于 10 个字符",validate:e=>e.length>=10},{id:"hasUppercase",label:"包含大写字母",description:"至少包含一个大写字母 (A-Z)",validate:e=>/[A-Z]/.test(e)},{id:"hasLowercase",label:"包含小写字母",description:"至少包含一个小写字母 (a-z)",validate:e=>/[a-z]/.test(e)},{id:"hasSpecialChar",label:"包含特殊符号",description:"至少包含一个特殊符号 (!@#$%^&*()_+-=[]{}|;:,.<>?/)",validate:e=>/[!@#$%^&*()_+\-=[\]{}|;:,.<>?/]/.test(e)}];function tye(e){const t=eye.map(r=>({id:r.id,label:r.label,description:r.description,passed:r.validate(e)}));return{isValid:t.every(r=>r.passed),rules:t}}const ZC="0.11.4",QC="MaiBot Dashboard",nye=`${QC} v${ZC}`,rye=(e="v")=>`${e}${ZC}`;function aye(e,t=globalThis?.document){const n=nn(e);y.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var iye="DismissableLayer",KN="dismissableLayer.update",oye="dismissableLayer.pointerDownOutside",sye="dismissableLayer.focusOutside",W3,dF=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_l=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=y.useContext(dF),[m,p]=y.useState(null),g=m?.ownerDocument??globalThis?.document,[,x]=y.useState({}),j=qe(t,T=>p(T)),b=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),N=b.indexOf(w),O=m?b.indexOf(m):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,A=O>=N,E=cye(T=>{const M=T.target,$=[...f.branches].some(z=>z.contains(M));!A||$||(a?.(T),l?.(T),T.defaultPrevented||u?.())},g),k=uye(T=>{const M=T.target;[...f.branches].some(z=>z.contains(M))||(o?.(T),l?.(T),T.defaultPrevented||u?.())},g);return aye(T=>{O===f.layers.size-1&&(r?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},g),y.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(W3=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),V3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=W3)}},[m,g,n,f]),y.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),V3())},[m,f]),y.useEffect(()=>{const T=()=>x({});return document.addEventListener(KN,T),()=>document.removeEventListener(KN,T)},[]),i.jsx(Pe.div,{...d,ref:j,style:{pointerEvents:C?A?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,E.onPointerDownCapture)})});_l.displayName=iye;var lye="DismissableLayerBranch",fF=y.forwardRef((e,t)=>{const n=y.useContext(dF),r=y.useRef(null),a=qe(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),i.jsx(Pe.div,{...e,ref:a})});fF.displayName=lye;function cye(e,t=globalThis?.document){const n=nn(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){hF(oye,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uye(e,t=globalThis?.document){const n=nn(e),r=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!r.current&&hF(sye,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function V3(){const e=new CustomEvent(KN);document.dispatchEvent(e)}function hF(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?RO(a,o):a.dispatchEvent(o)}var dye=_l,fye=fF,WS="focusScope.autoFocusOnMount",VS="focusScope.autoFocusOnUnmount",G3={bubbles:!1,cancelable:!0},hye="FocusScope",qh=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=y.useState(null),f=nn(a),m=nn(o),p=y.useRef(null),g=qe(t,b=>d(b)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let b=function(C){if(x.paused||!u)return;const A=C.target;u.contains(A)?p.current=A:zo(p.current,{select:!0})},w=function(C){if(x.paused||!u)return;const A=C.relatedTarget;A!==null&&(u.contains(A)||zo(p.current,{select:!0}))},N=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&zo(u)};document.addEventListener("focusin",b),document.addEventListener("focusout",w);const O=new MutationObserver(N);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",w),O.disconnect()}}},[r,u,x.paused]),y.useEffect(()=>{if(u){K3.add(x);const b=document.activeElement;if(!u.contains(b)){const N=new CustomEvent(WS,G3);u.addEventListener(WS,f),u.dispatchEvent(N),N.defaultPrevented||(mye(xye(mF(u)),{select:!0}),document.activeElement===b&&zo(u))}return()=>{u.removeEventListener(WS,f),setTimeout(()=>{const N=new CustomEvent(VS,G3);u.addEventListener(VS,m),u.dispatchEvent(N),N.defaultPrevented||zo(b??document.body,{select:!0}),u.removeEventListener(VS,m),K3.remove(x)},0)}}},[u,f,m,x]);const j=y.useCallback(b=>{if(!n&&!r||x.paused)return;const w=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,N=document.activeElement;if(w&&N){const O=b.currentTarget,[C,A]=pye(O);C&&A?!b.shiftKey&&N===A?(b.preventDefault(),n&&zo(C,{select:!0})):b.shiftKey&&N===C&&(b.preventDefault(),n&&zo(A,{select:!0})):N===O&&b.preventDefault()}},[n,r,x.paused]);return i.jsx(Pe.div,{tabIndex:-1,...l,ref:g,onKeyDown:j})});qh.displayName=hye;function mye(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zo(r,{select:t}),document.activeElement!==n)return}function pye(e){const t=mF(e),n=Y3(t,e),r=Y3(t.reverse(),e);return[n,r]}function mF(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Y3(e,t){for(const n of e)if(!vye(n,{upTo:t}))return n}function vye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gye(e){return e instanceof HTMLInputElement&&"select"in e}function zo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gye(e)&&t&&e.select()}}var K3=yye();function yye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=X3(e,t),e.unshift(t)},remove(t){e=X3(e,t),e[0]?.resume()}}}function X3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xye(e){return e.filter(t=>t.tagName!=="A")}var bye="Portal",Nl=y.forwardRef((e,t)=>{const{container:n,...r}=e,[a,o]=y.useState(!1);Un(()=>o(!0),[]);const l=n||a&&globalThis?.document?.body;return l?mY.createPortal(i.jsx(Pe.div,{...r,ref:t}),l):null});Nl.displayName=bye;var GS=0;function My(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Z3()),document.body.insertAdjacentElement("beforeend",e[1]??Z3()),GS++,()=>{GS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),GS--}},[])}function Z3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ni=function(){return ni=Object.assign||function(t){for(var n,r=1,a=arguments.length;r"u")return Iye;var t=Lye(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},zye=yF(),Vc="data-scroll-locked",qye=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),` .`.concat(jye,` { overflow: hidden `).concat(r,`; padding-right: `).concat(u,"px ").concat(r,`; diff --git a/webui/dist/index.html b/webui/dist/index.html index e46f6757..58ad3474 100644 --- a/webui/dist/index.html +++ b/webui/dist/index.html @@ -5,7 +5,7 @@ MaiBot Dashboard - +