1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OperationChart-DGFtPqoW.js","assets/react-core-QNRZhnR1.js","assets/vchart-BiCQyR74.js","assets/antd-BUm1ErOG.js","assets/ReferralDashboard-D4gOCdbW.js","assets/semi-ui-61B7usrt.js","assets/semi-ui-BJ0eBS0j.css","assets/index-Dm8l550f.js","assets/i18n-DqLeUXkN.js","assets/tools-D6jkvNIx.js","assets/vite-preload-BPXyjPM0.js","assets/index-DBGSO8Vi.css","assets/quota-Bg_IJNMI.js","assets/dashboard.constants-sZtFASc4.js","assets/user-plus-DOV4iQoh.js","assets/refresh-cw-CsF24o2n.js","assets/users-Ct0CZXBJ.js","assets/trending-up-QJMx3YeX.js","assets/search-3uNL1STL.js","assets/SubscriptionDashboard-BDtBJxdU.js"])))=>i.map(i=>d[i]); 2import{r as d,k as e}from"./react-core-QNRZhnR1.js";import{_ as re}from"./vite-preload-BPXyjPM0.js";import{T as Re,an as G,ae as Q,D as I,ab as $e,ac as ne,Z as Ee,$ as D,ag as Ae,J as Me,as as J,ah as Y,_ as Pe}from"./semi-ui-61B7usrt.js";import{A as Be,s as de,q as Ve,r as Z}from"./index-Dm8l550f.js";import{u as We}from"./i18n-DqLeUXkN.js";import{f as A}from"./antd-BUm1ErOG.js";import{C as q,F,a as He}from"./dashboard.constants-sZtFASc4.js";import{r as p}from"./quota-Bg_IJNMI.js";import{D as Le}from"./dollar-sign-BqhbbAPP.js";import{A as ce}from"./activity-GY2b_DVl.js";import{U as le}from"./users-Ct0CZXBJ.js";import{C as ue}from"./chart-no-axes-column-CAWKozyX.js";import{R as Ke}from"./refresh-cw-CsF24o2n.js";import{T as Ue}from"./trending-up-QJMx3YeX.js";import{H as Ge}from"./hash-PH4j3kbY.js";import"./tools-D6jkvNIx.js";const me=s=>{const r=A();switch(s){case"today":return[r.startOf("day").unix(),r.unix()];case"yesterday":return[r.subtract(1,"day").startOf("day").unix(),r.subtract(1,"day").endOf("day").unix()];case"7d":return[r.subtract(6,"day").startOf("day").unix(),r.unix()];case"30d":return[r.subtract(29,"day").startOf("day").unix(),r.unix()];default:return[r.startOf("day").unix(),r.unix()]}},Qe=()=>{const[s,r]=d.useState(!1),[u,k]=d.useState("today"),[f,M]=d.useState(null),[W,X]=d.useState(null),[$]=d.useState(100),[C,_]=d.useState(!1),n=d.useCallback(async(v,y,m=C)=>{r(!0);try{const w=await Be.get("/api/stat/operation",{params:{start_timestamp:v,end_timestamp:y,top_n:$,include_subscription:m}});w.data.success?X(w.data.data):de(w.data.message)}catch{de("è·åè¿è¥æ°æ®å¤±è´¥")}finally{r(!1)}},[$,C]),P=d.useCallback(()=>{let v,y;u==="custom"&&f?[v,y]=f:[v,y]=me(u),n(v,y,C)},[u,f,n,C]);d.useEffect(()=>{P()},[u]);const ee=v=>{k(v)},se=v=>{if(v&&v.length===2){const y=A(v[0]).startOf("day").unix(),m=A(v[1]).endOf("day").unix();M([y,m]),k("custom"),n(y,m,C)}},te=d.useCallback(()=>{if(C)return;_(!0);let v,y;u==="custom"&&f?[v,y]=f:[v,y]=me(u),n(v,y,!0)},[C,u,f,n]);return{loading:s,data:W,period:u,handlePeriodChange:ee,handleCustomRangeChange:se,refresh:P,enableSubscriptionData:te}},{Title:Ye,Text:b}=Re,Ze=d.lazy(()=>re(()=>import("./OperationChart-DGFtPqoW.js"),__vite__mapDeps([0,1,2,3]))),Je=d.lazy(()=>re(()=>import("./ReferralDashboard-D4gOCdbW.js"),__vite__mapDeps([4,1,5,6,7,8,9,10,11,3,12,13,14,15,16,17,18]))),Xe=d.lazy(()=>re(()=>import("./SubscriptionDashboard-BDtBJxdU.js"),__vite__mapDeps([19,1,5,6,3,13,12,8,7,9,10,11,16]))),O=s=>s?(s/5e5).toFixed(4):"0",h=s=>s?s>=1e6?(s/1e6).toFixed(1)+"M":s>=1e3?(s/1e3).toFixed(1)+"K":String(s):"0",ae=s=>"Â¥ "+Number(s||0).toFixed(2),es=s=>"$ "+Number(s||0).toFixed(2),ss=(s,r=!1,u=!1)=>{if(!r)return;const k=String(s||"").length,f={minWidth:0,whiteSpace:"nowrap",letterSpacing:"-0.025em"};return k>=22?{...f,fontSize:u?14:15}:k>=18?{...f,fontSize:u?15:17}:k>=14?{...f,fontSize:u?16:18}:f},ts=({rank:s})=>{const r=s===0?"amber":s===1?"grey":s===2?"orange":"default";return e.jsx(Pe,{size:"small",shape:"circle",color:r,children:s+1})},j=(s,r,u,k)=>({title:s,dataIndex:r,width:k||void 0,sorter:(f,M)=>(f[r]??0)-(M[r]??0),render:u}),V=({rows:s=4})=>e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(J,{active:!0,placeholder:e.jsx(J.Paragraph,{rows:s}),loading:!0})}),is=()=>{const{t:s}=We(),r=Ve(),[u,k]=d.useState("operation"),[f,M]=d.useState(!1),[W,X]=d.useState(!1),[$,C]=d.use
2State("channel"),{loading:_,data:n,period:P,handlePeriodChange:ee,handleCustomRangeChange:se,refresh:te,enableSubscriptionData:v}=Qe(),y=(n==null?void 0:n.overview)||{},m=(n==null?void 0:n.time_series)||[],w=(n==null?void 0:n.revenue_overview)||{},oe=(n==null?void 0:n.revenue_time_series)||[],E=(n==null?void 0:n.interval_seconds)||3600,B=(n==null?void 0:n.model_stats)||[],xe=(n==null?void 0:n.user_stats)||[],pe=(n==null?void 0:n.topup_stats)||[],he=(n==null?void 0:n.channel_stats)||[],ye=(n==null?void 0:n.group_stats)||[],ve=(n==null?void 0:n.subscription_overview)||{},fe=(n==null?void 0:n.subscription_plan_stats)||[],be=(n==null?void 0:n.subscription_user_stats)||[],je=(n==null?void 0:n.subscription_order_stats)||[],H=(t,i=4)=>e.jsx(d.Suspense,{fallback:e.jsx(V,{rows:i}),children:e.jsx(Ze,{spec:t,option:He})}),ge=t=>{k(t),t==="referral"&&!f&&d.startTransition(()=>{M(!0)}),t==="subscription"&&!W&&(d.startTransition(()=>{X(!0)}),v())},_e=[{key:"total_revenue",value:w.total_revenue??y.total_billing,label:s("æ»æ¶å
¥(Â¥)"),icon:e.jsx(Z,{size:14}),colorClass:"bg-emerald-50 dark:bg-emerald-900/20",format:ae},{key:"wallet_subscription_revenue",label:s("é±å
å
å¼/订é
"),icon:e.jsx(Z,{size:14}),colorClass:"bg-cyan-50 dark:bg-cyan-900/20",fitValue:!0,format:()=>`${ae(w.wallet_revenue)} / ${ae(w.subscription_revenue)}`},{key:"total_topup_amount",value:w.total_topup_amount??w.wallet_topup_amount,label:s("æ»å
å¼éé¢"),icon:e.jsx(Z,{size:14}),colorClass:"bg-teal-50 dark:bg-teal-900/20",format:es},{key:"total_quota",label:s("æ»æ¶èéé¢"),icon:e.jsx(Le,{size:14}),colorClass:"bg-red-50 dark:bg-red-900/20",format:t=>(t?(t/5e5).toFixed(4):"0.0000")+" $"},{key:"requests_and_tokens",label:s("è¯·æ±æ° / Tokenæ¶è"),icon:e.jsx(ce,{size:14}),colorClass:"bg-blue-50 dark:bg-blue-900/20",fitValue:!0,format:()=>`${h(y.total_requests)} / ${h(y.total_tokens)}`},{key:"active_vs_total",label:s("æ´»è· / æ»ç¨æ·"),icon:e.jsx(le,{size:14}),colorClass:"bg-purple-50 dark:bg-purple-900/20",format:()=>`${h(y.active_users)} / ${h(y.total_users)}`}],Se=d.useMemo(()=>{const t=E<=3600?"HH:mm":"MM-DD",i=new Map;m.forEach(o=>{i.set(o.timestamp,{timestamp:o.timestamp,tokens:o.tokens||0})}),oe.forEach(o=>{i.set(o.timestamp,{...i.get(o.timestamp)||{timestamp:o.timestamp},total_revenue:o.total_revenue||0,wallet_revenue:o.wallet_revenue||0,subscription_revenue:o.subscription_revenue||0})});const l=Array.from(i.values()).sort((o,T)=>o.timestamp-T.timestamp),x=l.map(o=>A.unix(o.timestamp).format(t)),a=l.map((o,T)=>({x:x[T],y:o.tokens||0})),c=l.map((o,T)=>({x:x[T],y:Number(o.total_revenue||0)})),g=l.map((o,T)=>({x:x[T],y:Number(o.wallet_revenue||0)})),Oe=l.map((o,T)=>({x:x[T],y:Number(o.subscription_revenue||0)}));return{type:"common",data:[{id:"tokens",values:a},{id:"totalRevenue",values:c},{id:"walletRevenue",values:g},{id:"subscriptionRevenue",values:Oe}],series:[{type:"line",dataIndex:0,xField:"x",yField:"y",name:s("Tokenæ¶è"),line:{style:{stroke:"#3b82f6",lineWidth:2}},point:{visible:l.length<=48,style:{fill:"#3b82f6"}},label:{visible:!1},tooltip:{visible:!0}},{type:"line",dataIndex:1,xField:"x",yField:"y",name:s("æ»æ¶å
¥(Â¥)"),axisId:"right",line:{style:{stroke:"#f59e0b",lineWidth:2}},point:{visible:l.length<=48,style:{fill:"#f59e0b"}},label:{visible:!1},tooltip:{visible:!0}},{type:"line",dataIndex:2,xField:"x",yField:"y",name:s("é±å
å
弿¶å
¥(Â¥)"),axisId:"right",line:{style:{stroke:"#10b981",lineWidth:2,lineDash:[4,3]}},point:{visible:l.length<=48,style:{fill:"#10b981"}},label:{visible:!1},tooltip:{visible:!0}},{type:"line",dataIndex:3,xField:"x",yField:"y",name:s("订é
æ¶å
¥(Â¥)"),axisId:"right",line:{style:{stroke:"#06b6d4",lineWidth:2,lineDash:[2,3]}},point:{visible:l.length<=48,style:{fill:"#06b6d4"}},label:{visible:!1},tooltip:{visible:!0}}],axes:[{orient:"bottom",label:{visible:!0}},{orient:"left",label:{formatMethod:o=>o>=1e3?Math.round(o/1e3)+"K":o}},{orient:"right",id:"right",seriesIndex:[1,2,3],label:{formatMethod:o=>"Â¥"+o}}],legends:{visible:!0,orient:"bottom",item:{label:{style:{fontSize:12}}}},tooltip:{visible:!0},background:"transparent"}},[m,oe,E,s]),ke=d.useMemo(()=>{const t=E<=3600?"HH:mm":"MM-DD",i=m.map(a=>A.unix(a.timestamp).format(t)),l=m.map((a,c)=>({x:i[c],y:a.requests})),x=m.map((a,c)=>({x:i[c],y:a.quota?Math.round(a.quota/5e5*1e4)/1e4:0}));return{type:"common",data:[{id:"req",values:l},{id:"csm",values:x}],series:[{type:"line",dataIndex:0,xField:"x",yField:"y",name:s("请æ±é"),line:{style:{stroke:"#3b82f6",lineWidth:2}},point:{visible:m.length<=48,style:{fill:"#3b82f6"}},label:{visible:!1}},{type:"line",dataIndex:1,xField:"x",yField:"y",name:s("æ¶èéé¢($)"),axisId:"right2",line:{style:{stroke:"#ef4444",lineWidth:2,lineDash:[4,3]}},point:{visible:m.length<=48,style:{fill:"#ef4444"}},label:{visible:!1}}],axes:[{orient:"bottom",label:{visible:!0,style:{fontSize:10}}},{orient:"left"},{orient:"right",id:"right2",seriesIndex:1,label:{formatMethod:a=>a+"$"}}],legends:{visible:!0,orient:"bottom",item:{label:{style:{fontSize:11}}}},tooltip:{visible:!0},background:"transparent"}},[m,E,s]),we=d.useMemo(()=>{const t=E<=3600?"HH:mm":"MM-DD",i=m.map(c=>A.unix(c.timestamp).format(t)),l=s("æ°å¢ç¨æ·"),x=s("æ´»è·ç¨æ·");return{type:"line",data:[{id:"nu",values:[...m.map((c,g)=>({x:i[g],y:c.new_users||0,type:l})),...m.map((c,g)=>({x:i[g],y:c.active_users||0,type:x}))]}],xField:"x",yField:"y",seriesField:"type",line:{style:{lineWidth:2}},point:{visible:m.length<=48},label:{visible:!1},color:["#3b82f6","#10b981"],axes:[{orient:"bottom",label:{visible:!0,style:{fontSize:10}}},{orient:"left"}],legends:{visible:!0,orient:"bottom",item:{label:{style:{fontSize:11}}}},tooltip:{visible:!0},background:"transparent"}},[m,E,s]),ze=d.useMemo(()=>({type:"bar",direction:"horizontal",data:[{id:"models",values:B.slice(0,10).map(i=>({name:i.model_name,requests:i.requests}))}],xField:"requests",yField:"name",bar:{style:{fill:"#6366f1",cornerRadius:4}},axes:[{orient:"left",label:{style:{fontSize:11}}},{orient:"bottom"}],tooltip:{visible:!0},background:"transparent"}),[B]),z={title:s("æå"),dataIndex:"rank",width:64,render:(t,i,l)=>e.jsx(ts,{rank:l})},Ce=r?[z,{title:s("模å"),dataIndex:"model_name",render:(t,i)=>e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all",fontSize:13},children:t}),e.jsxs("div",{style:{fontSize:11,color:"var(--semi-color-text-3)",marginTop:2},children:[s("请æ±")," ",h(i.requests)," · Token ",h(i.tokens)]})]})},j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",100)]:[z,{title:s("模å"),dataIndex:"model_name",width:200,render:t=>e.jsx(b,{strong:!0,style:{wordBreak:"break-all"},children:t})},j(s("è¯·æ±æ°"),"requests",t=>h(t),80),j(s("Tokenæ¶è"),"tokens",t=>h(t),110),j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",110)],Ne=r?[z,{title:s("æ¸ é"),dataIndex:"channel_name",render:(t,i)=>{const l=t||`#${i.channel_id}`;return e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all",fontSize:13},children:l}),e.jsxs("div",{style:{fontSize:11,color:"var(--semi-color-text-3)",marginTop:2},children:["ID: ",i.channel_id," · ",s("请æ±")," ",h(i.requests)," · Token ",h(i.tokens)]})]})}},j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",100)]:[z,{title:s("æ¸ é"),dataIndex:"channel_name",width:220,render:(t,i)=>{const l=t||`#${i.channel_id}`;return e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all"},children:l}),e.jsxs("div",{style:{fontSize:"11px",color:"var(--semi-color-text-3)"},children:["ID: ",i.channel_id]})]})}},j(s("è¯·æ±æ°"),"requests",t=>h(t),90),j(s("Tokenæ¶è"),"tokens",t=>h(t),110),j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",110)],Te=r?[z,{title:s("åç»"),dataIndex:"group",render:(t,i)=>e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all",fontSize:13},children:t||s("æªåç»")}),e.jsxs("div",{style:{fontSize:11,color:"var(--semi-color-text-3)",marginTop:2},children:[s("请æ±")," ",h(i.requests)," · Token ",h(i.tokens)]})]})},j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",100)]:[z,{title:s("åç»"),dataIndex:"group",width:220,render:t=>e.jsx(b,{strong:!0,style:{wordBreak:"break-all"},children:t||s("æªåç»")})},j(s("è¯·æ±æ°"),"requests",t=>h(t),90),j(s("Tokenæ¶è"),"tokens",t=>h(t),110),j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",110)],Ie=$==="channel"?he:ye,De=$==="channel"?Ne:Te,qe=r?[z,{title:s("ç¨æ·"),dataIndex:"username",render:(t,i)=>e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all",fontSize:13},children:t}),e.jsxs("div",{style:{fontSize:11,color:"var(--semi-color-text-3)",marginTop:2},children:["ID: ",i.user_id," · ",s("请æ±")," ",h(i.requests)]})]})},j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",100),{title:s("å©ä½/æ»é¢åº¦"),dataIndex:"remain_quota",width:120,render:(t,i)=>{const l=i.remain_quota||0,x=i.used_quota||0,a=l+x,c=a>0?l/a*100:0,g=e.jsxs("div",{className:"text-xs p-2 space-y-1",children:[e.jsxs("div",{children:[s("å·²ç¨é¢åº¦"),": ",p(x)]}),e.jsxs("div",{children:[s("å©ä½é¢åº¦"),": ",p(l)," (",c.toFixed(0),"%)"]}),e.jsxs("div",{children:[s("æ»é¢åº¦"),": ",p(a)]})]});return e.jsx(G,{content:g,position:"top",children:e.jsxs("div",{className:"flex flex-col gap-0.5",style:{minWidth:100},children:[e.jsxs(b,{size:"small",children:[p(l)," / ",p(a)]}),e.jsx(Q,{percent:c,size:"small",showInfo:!1,style:{width:"100%"}})]})})}}]:[z,{title:s("ç¨æ·"),dataIndex:"username",width:180,render:(t,i)=>e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all"},children:t}),e.jsxs("div",{style:{fontSize:"11px",color:"var(--semi-color-text-3)"},children:["ID: ",i.user_id]})]})},j(s("è¯·æ±æ°"),"requests",t=>h(t),80),j(s("æ¶èéé¢"),"quota",t=>O(t)+" $",110),{title:s("å©ä½/æ»é¢åº¦"),dataIndex:"remain_quota",width:180,render:(t,i)=>{const l=i.remain_quota||0,x=i.used_quota||0,a=l+x,c=a>0?l/a*100:0,g=e.jsxs("div",{className:"text-xs p-2 space-y-1",children:[e.jsxs("div",{children:[s("å·²ç¨é¢åº¦"),": ",p(x)]}),e.jsxs("div",{children:[s("å©ä½é¢åº¦"),": ",p(l)," (",c.toFixed(0),"%)"]}),e.jsxs("div",{children:[s("æ»é¢åº¦"),": ",p(a)]})]});return e.jsx(G,{content:g,position:"top",children:e.jsxs("div",{className:"flex flex-col gap-0.5",style:{minWidth:140},children:[e.jsxs(b,{size:"small",children:[p(l)," / ",p(a)]}),e.jsx(Q,{percent:c,size:"small",showInfo:!1,style:{width:"100%"}})]})})}}],Fe=r?[z,{title:s("ç¨æ·"),dataIndex:"username",render:(t,i)=>e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all",fontSize:13},children:t}),e.jsxs("div",{style:{fontSize:11,color:"var(--semi-color-text-3)",marginTop:2},children:["ID: ",i.user_id]})]})},{title:s("å
å¼"),dataIndex:"amount",width:90,render:(t,i)=>e.jsxs("div",{children:[e.jsxs("div",{style:{fontWeight:600,fontSize:13},children:[t?t.toFixed(2):"0.00"," $"]}),e.jsxs("div",{style:{fontSize:11,color:"var(--semi-color-text-3)",marginTop:2}
2,children:[h(i.count)," ",s("次")]})]})},{title:s("å©ä½/æ»é¢åº¦"),dataIndex:"quota",width:120,render:(t,i)=>{const l=i.quota||0,x=i.used_quota||0,a=l+x,c=a>0?l/a*100:0,g=e.jsxs("div",{className:"text-xs p-2 space-y-1",children:[e.jsxs("div",{children:[s("å·²ç¨é¢åº¦"),": ",p(x)]}),e.jsxs("div",{children:[s("å©ä½é¢åº¦"),": ",p(l)," (",c.toFixed(0),"%)"]}),e.jsxs("div",{children:[s("æ»é¢åº¦"),": ",p(a)]})]});return e.jsx(G,{content:g,position:"top",children:e.jsxs("div",{className:"flex flex-col gap-0.5",style:{minWidth:100},children:[e.jsxs(b,{size:"small",children:[p(l)," / ",p(a)]}),e.jsx(Q,{percent:c,size:"small",showInfo:!1,style:{width:"100%"}})]})})}}]:[z,{title:s("ç¨æ·"),dataIndex:"username",width:180,render:(t,i)=>e.jsxs("div",{children:[e.jsx(b,{strong:!0,style:{wordBreak:"break-all"},children:t}),e.jsxs("div",{style:{fontSize:"11px",color:"var(--semi-color-text-3)"},children:["ID: ",i.user_id]})]})},{title:s("å
å¼"),dataIndex:"amount",width:140,sorter:(t,i)=>t.amount-i.amount,render:(t,i)=>e.jsxs("div",{children:[e.jsxs(b,{strong:!0,children:[t?t.toFixed(2):"0.00"," $"]}),e.jsxs("div",{style:{fontSize:"11px",color:"var(--semi-color-text-3)",marginTop:2},children:[h(i.count)," ",s("次")]})]})},{title:s("å©ä½/æ»é¢åº¦"),dataIndex:"quota",width:180,render:(t,i)=>{const l=i.quota||0,x=i.used_quota||0,a=l+x,c=a>0?l/a*100:0,g=e.jsxs("div",{className:"text-xs p-2 space-y-1",children:[e.jsxs("div",{children:[s("å·²ç¨é¢åº¦"),": ",p(x)]}),e.jsxs("div",{children:[s("å©ä½é¢åº¦"),": ",p(l)," (",c.toFixed(0),"%)"]}),e.jsxs("div",{children:[s("æ»é¢åº¦"),": ",p(a)]})]});return e.jsx(G,{content:g,position:"top",children:e.jsxs("div",{className:"flex flex-col gap-0.5",style:{minWidth:140},children:[e.jsxs(b,{size:"small",children:[p(l)," / ",p(a)]}),e.jsx(Q,{percent:c,size:"small",showInfo:!1,style:{width:"100%"}})]})})}}],L=e.jsx("div",{className:"py-8 text-center text-gray-400",children:s("ææ æ°æ®")}),R={padding:"14px 20px"},K={padding:0},ie={padding:"0 16px 12px"},N="!rounded-2xl",S=16,U=e.jsx(I,{...q,className:N,bodyStyle:{padding:"20px"},children:e.jsx("div",{className:"h-64",children:e.jsx(V,{rows:6})})});return e.jsxs("div",{className:"pb-8",children:[e.jsxs($e,{type:"card",activeKey:u,onChange:ge,children:[e.jsx(ne,{itemKey:"operation",tab:s("è¿è¥çæ¿")}),e.jsx(ne,{itemKey:"subscription",tab:s("订é
æ°æ®")}),e.jsx(ne,{itemKey:"referral",tab:s("ææ°æ°æ®")})]}),e.jsxs("div",{style:{display:u==="operation"?"block":"none",paddingTop:S},children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",style:{marginBottom:S},children:[e.jsxs("div",{className:F,children:[e.jsx(ue,{size:20}),e.jsx(Ye,{heading:4,style:{margin:0},children:s("è¿è¥çæ¿")})]}),e.jsxs(Ee,{wrap:!0,children:[e.jsxs(D,{value:P,onChange:ee,style:{width:110},size:"small",children:[e.jsx(D.Option,{value:"today",children:s("仿¥")}),e.jsx(D.Option,{value:"yesterday",children:s("æ¨æ¥")}),e.jsx(D.Option,{value:"7d",children:s("è¿7æ¥")}),e.jsx(D.Option,{value:"30d",children:s("è¿30æ¥")}),e.jsx(D.Option,{value:"custom",children:s("èªå®ä¹")})]}),P==="custom"&&e.jsx(Ae,{type:"dateRange",size:"small",onChange:se,style:{width:220}}),e.jsx(Me,{icon:e.jsx(Ke,{size:14}),size:"small",onClick:te,loading:_,children:s("å·æ°")})]})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4",style:{marginBottom:S},children:_e.map(t=>{const i=t.format(t.value??y[t.key]);return e.jsxs(I,{...q,className:`${t.colorClass} border-0 ${N}`,bodyStyle:{padding:"14px 16px"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-gray-500 dark:text-gray-400",children:[t.icon,e.jsx("span",{className:"text-xs font-medium tracking-wide",children:t.label})]}),e.jsx(J,{loading:_,active:!0,placeholder:e.jsx(J.Paragraph,{active:!0,rows:1,style:{width:"80px",height:"24px",marginTop:"8px"}}),children:e.jsx("div",{className:"mt-2 text-xl font-bold leading-tight truncate",title:i,style:ss(i,t.fitValue,r),children:i})})]},t.key)})}),e.jsx("div",{style:{paddingBottom:S},children:e.jsx(I,{...q,className:N,headerStyle:R,title:e.jsxs("div",{className:F,children:[e.jsx(Ue,{size:16}),e.jsx("span",{children:s("è¶å¿åæ")})]}),bodyStyle:ie,children:e.jsx("div",{className:"h-64",children:_?e.jsx(V,{rows:5}):m.length>0?H(Se,5):e.jsx("div",{className:"flex items-center justify-center h-full text-gray-400",children:s("ææ æ°æ®")})})})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",style:{paddingBottom:S},children:[e.jsx(I,{...q,className:`${N} min-w-0`,headerStyle:R,title:e.jsxs("div",{className:F,children:[e.jsx(ce,{size:16}),e.jsx("span",{children:s("请æ±åæ")})]}),bodyStyle:ie,children:e.jsx("div",{className:"h-52",children:_?e.jsx(V,{rows:4}):m.length>0?H(ke,4):e.jsx("div",{className:"flex items-center justify-center h-full text-gray-400",children:s("ææ æ°æ®")})})}),e.jsx(I,{...q,className:`${N} min-w-0`,headerStyle:R,title:e.jsxs("div",{className:F,children:[e.jsx(le,{size:16}),e.jsx("span",{children:s("ç¨æ·è¶å¿")})]}),bodyStyle:ie,children:e.jsx("div",{className:"h-52",children:_?e.jsx(V,{rows:4}):m.length>0?H(we,4):e.jsx("div",{className:"flex items-center justify-center h-full text-gray-400",children:s("ææ æ°æ®")})})})]}),e.jsx("div",{style:{paddingBottom:S},children:e.jsxs(I,{...q,className:`${N} min-w-0`,headerStyle:R,title:e.jsxs("div",{className:F,children:[e.jsx(ue,{size:16}),e.jsx("span",{children:s("æ¨¡åæ¶èæè¡ (Top 10)")}
2)]}),bodyStyle:K,children:[B.length>0&&e.jsx("div",{className:"h-48 px-4 pt-2 pb-1",children:H(ze,4)}),e.jsx(Y,{dataSource:B,columns:Ce,pagination:!1,size:"small",loading:_,empty:L,scroll:{y:480},style:{borderTop:B.length>0?"1px solid var(--semi-color-border)":"none"}})]})}),e.jsx("div",{style:{paddingBottom:S},children:e.jsx(I,{...q,className:`${N} min-w-0`,headerStyle:R,title:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 w-full",children:[e.jsxs("div",{className:F,children:[e.jsx(Ge,{size:16}),e.jsx("span",{children:s("æ¸ é/åç»æ¶èæè¡ (Top 100)")})]}),e.jsxs(D,{value:$,onChange:C,size:"small",style:{width:110},children:[e.jsx(D.Option,{value:"channel",children:s("æ¸ é")}),e.jsx(D.Option,{value:"group",children:s("åç»")})]})]}),bodyStyle:K,children:e.jsx(Y,{dataSource:Ie,columns:De,pagination:!1,size:"small",loading:_,empty:L,scroll:{y:480}})})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsx(I,{...q,className:`${N} min-w-0`,headerStyle:R,title:e.jsxs("div",{className:F,children:[e.jsx(le,{size:16}),e.jsx("span",{children:s("ç¨æ·æ¶èæè¡ (Top 100)")})]}),bodyStyle:K,children:e.jsx(Y,{dataSource:xe,columns:qe,pagination:!1,size:"small",loading:_,empty:L,scroll:{y:480}})}),e.jsx(I,{...q,className:`${N} min-w-0`,headerStyle:R,title:e.jsxs("div",{className:F,children:[e.jsx(Z,{size:16}),e.jsx("span",{children:s("ç¨æ·å
å¼æè¡ (Top 100)")})]}),bodyStyle:K,children:e.jsx(Y,{dataSource:pe,columns:Fe,pagination:!1,size:"small",loading:_,empty:L,scroll:{y:480}})})]})]}),W?e.jsx("div",{style:{display:u==="subscription"?"block":"none",paddingTop:S},children:e.jsx(d.Suspense,{fallback:U,children:e.jsx(Xe,{loading:_,overview:ve,planStats:fe,userStats:be,orderStats:je,isMobile:r})})}):u==="subscription"?e.jsx("div",{style:{paddingTop:S},children:U}):null,f?e.jsx("div",{style:{display:u==="referral"?"block":"none",paddingTop:S},children:e.jsx(d.Suspense,{fallback:U,children:e.jsx(Je,{})})}):u==="referral"?e.jsx("div",{style:{paddingTop:S},children:U}):null]})},js=()=>e.jsx("div",{className:"mt-[60px] px-4 sm:px-6 max-w-screen-2xl",children:e.jsx(is,{})});export{js as default};
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.