PageSourceSearch

https://xyc.ai/static/js/async/6719.66eb1512c4.js

js xyc.ai collected 2026-10-05 14:40:14 UTC 3,185 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[6719],{94114(t,e,s){s.d(e,{LogStatCards:()=>g});var a=s(72361),n=s(68413),l=s(20032),i=s(3642),r=s(74400),o=s(18434),d=s(63578),c=s(6702),u=s(61631),m=s(10400);function g(t){let e=function(){let{t}=(0,c.Bd)();return[{key:"count",title:t("Total Count"),description:t("Statistical count"),icon:u.VwU,getValue:t=>t?.rpm??0},{key:"quota",title:t("Total Quota"),description:t("Statistical quota"),icon:u.TxX,getValue:t=>t?.quota??0},{key:"tokens",title:t("Total Tokens"),description:t("Statistical tokens"),icon:u.zgK,getValue:t=>t?.tpm??0},{key:"avgRpm",title:t("Average RPM"),description:t("Requests per minute"),icon:u._I2,getValue:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,m.Z)(t?.rpm??0,e)}},{key:"avgTpm",title:t("Average TPM"),description:t("Tokens per minute"),icon:u.KqI,getValue:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,m.Z)(t?.tpm??0,e)}}]}(),s=(0,l.n)(t=>t.auth.user),g=!!(s?.role&&s.role>=10),[x,p]=(0,n.useState)(null),[h,f]=(0,n.useState)(!0),[v,k]=(0,n.useState)(!1),[b,j]=(0,n.useState)(0),{filters:N,onDataUpdate:y}=t;(0,n.useEffect)(()=>{let t=new AbortController;f(!0),k(!1),y?.([],!0);let e=(0,r.GW)((0,m.JL)(N?.time_granularity),N?.start_timestamp,N?.end_timestamp);return j((e.end_timestamp-e.start_timestamp)/60),(0,d.l0)((0,m.DK)(e,N),g).then(e=>{if(t.signal.aborted)return;let s=e?.data||[];p((0,m.yG)(s)),y?.(s,!1)}).catch(()=>{t.signal.aborted||(p(null),k(!0),y?.([],!1))}).finally(()=>{t.signal.aborted||f(!1)}),()=>{t.abort()}},[N,g,y]);let w={rpm:x?.totalCount??0,quota:x?.totalQuota??0,tpm:x?.totalTokens??0},T=e.map(t=>({title:t.title,value:"quota"===t.key?(0,i.eN)(t.getValue(w,b)):(0,i.ZV)(t.getValue(w,b)),desc:t.description,icon:t.icon}));return(0,a.jsx)("div",{className:"overflow-hidden rounded-lg border",children:(0,a.jsx)("div",{className:"divide-border/60 grid grid-cols-2 divide-x sm:grid-cols-3 lg:grid-cols-5",children:T.map((t,e)=>{let s=t.icon;return(0,a.jsxs)("div",{className:`px-3 py-2.5 sm:px-5 sm:py-4 ${e===T.length-1&&T.length%2!=0?"col-span-2 sm:col-span-1":""}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(s,{className:"text-muted-foreground/60 size-3.5 shrink-0"}),(0,a.jsx)("div",{className:"text-muted-foreground truncate text-xs font-medium tracking-wider uppercase",children:t.title})]}),h?(0,a.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,a.jsx)(o.E,{className:"h-7 w-20"}),(0,a.jsx)(o.E,{className:"h-3.5 w-28"})]}):v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"text-muted-foreground mt-1.5 font-mono text-lg font-bold tracking-tight tabular-nums sm:mt-2 sm:text-2xl",children:"--"}),(0,a.jsx)("div",{className:"text-muted-foreground/40 mt-1 hidden text-xs md:block",children:t.desc})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"text-foreground mt-1.5 font-mono text-lg font-bold tracking-tight tabular-nums sm:mt-2 sm:text-2xl",children:t.value}),(0,a.jsx)("div",{className:"text-muted-foreground/60 mt-1 hidden text-xs md:block",children:t.desc})]})]},t.title)})})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.