tokentracker-cli 0.5.66 → 0.5.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/dashboard/dist/assets/{Card-DSx0j4mK.js → Card-DRlkZv_R.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-1P9-gqhu.js → DashboardPage-DGTHX5GE.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-DL1zAbdt.js → FadeIn-Bn7l-4GG.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-BM3t1yfV.js → IpCheckPage-CsusUMV9.js} +1 -1
- package/dashboard/dist/assets/LeaderboardPage-Cx8DHWwS.js +5 -0
- package/dashboard/dist/assets/{LeaderboardProfilePage-aO-byJ7B.js → LeaderboardProfilePage-BjjMqsNu.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-CwUkpJp_.js → LimitsPage-xb3c6ewg.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-DhirGYnP.js → SettingsPage-CqsOiOnP.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-P9a72ksF.js → WidgetsPage-IIarm2pR.js} +1 -1
- package/dashboard/dist/assets/{download-DTMGheZ-.js → download-Bfr-Ch-O.js} +1 -1
- package/dashboard/dist/assets/leaderboard-columns-B9643ZQU.js +1 -0
- package/dashboard/dist/assets/{main-DHsb2wcd.css → main-CNzfq4Ln.css} +1 -1
- package/dashboard/dist/assets/{main-XWVaG1Bp.js → main-CryDk9yC.js} +4 -6
- package/dashboard/dist/assets/{use-limits-display-prefs-B4BIb5sR.js → use-limits-display-prefs-BbghS-7x.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-DOtf83Kb.js → use-usage-limits-BZnmAIq1.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +2 -2
- package/src/lib/runtime-config.js +1 -1
- package/dashboard/dist/assets/LeaderboardPage-BZvpMVkN.js +0 -5
- package/dashboard/dist/assets/leaderboard-columns-DVxnNSJP.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./main-
|
|
1
|
+
import{r as a}from"./main-CryDk9yC.js";const d=["claude","codex","cursor","gemini","kiro","copilot","antigravity"],v={claude:"Claude",codex:"Codex",cursor:"Cursor",gemini:"Gemini",kiro:"Kiro",copilot:"GitHub Copilot",antigravity:"Antigravity"},k={claude:"/brand-logos/claude-code.svg",codex:"/brand-logos/codex.svg",cursor:"/brand-logos/cursor.svg",gemini:"/brand-logos/gemini.svg",kiro:"/brand-logos/kiro.svg",copilot:"/brand-logos/copilot.svg",antigravity:"/brand-logos/antigravity.svg"},l="tt.limits.providerOrder",g="tt.limits.providerVisibility";function y(){if(typeof window>"u")return[...d];try{const r=window.localStorage.getItem(l);if(!r)return[...d];const s=JSON.parse(r);if(!Array.isArray(s))return[...d];const n=s.filter(c=>d.includes(c));for(const c of d)n.includes(c)||n.push(c);return n}catch{return[...d]}}function m(){const r=Object.fromEntries(d.map(s=>[s,!0]));if(typeof window>"u")return r;try{const s=window.localStorage.getItem(g);if(!s)return r;const n=JSON.parse(s);if(!n||typeof n!="object")return r;const c={...r};for(const u of d)typeof n[u]=="boolean"&&(c[u]=n[u]);return c}catch{return r}}function C(){const[r,s]=a.useState(y),[n,c]=a.useState(m);a.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(l,JSON.stringify(r))}catch{}},[r]),a.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(g,JSON.stringify(n))}catch{}},[n]),a.useEffect(()=>{if(typeof window>"u")return;const o=t=>{t.key===l&&s(y()),t.key===g&&c(m())};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[]);const u=a.useCallback(o=>{c(t=>({...t,[o]:!t[o]}))},[]),b=a.useCallback(o=>{s(t=>{const e=t.indexOf(o);if(e<=0)return t;const i=[...t];return[i[e-1],i[e]]=[i[e],i[e-1]],i})},[]),p=a.useCallback(o=>{s(t=>{const e=t.indexOf(o);if(e<0||e>=t.length-1)return t;const i=[...t];return[i[e],i[e+1]]=[i[e+1],i[e]],i})},[]),O=a.useCallback((o,t)=>{o!==t&&s(e=>{const i=e.indexOf(o),w=e.indexOf(t);if(i<0||w<0)return e;const f=[...e],[E]=f.splice(i,1);return f.splice(w,0,E),f})},[]),x=a.useCallback(()=>{s([...d]),c(Object.fromEntries(d.map(o=>[o,!0])))},[]),I=a.useMemo(()=>r.filter(o=>n[o]!==!1),[r,n]);return{order:r,visibility:n,visibleOrdered:I,toggle:u,moveUp:b,moveDown:p,moveToward:O,reset:x}}export{k as L,v as a,C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,aM as l}from"./main-
|
|
1
|
+
import{r,aM as l}from"./main-CryDk9yC.js";function y(i){const[o,a]=r.useState(null),[u,s]=r.useState(null),[c,f]=r.useState(!0),n=!!i?.initialRefresh,g=r.useCallback(async()=>{try{const e=await l({refresh:!0});a(e&&typeof e=="object"?e:null),s(null)}catch(e){s(e?.message||String(e))}},[]);return r.useEffect(()=>{let e=!1;return(async()=>{try{const t=await l(n?{refresh:!0}:{});if(e)return;a(t&&typeof t=="object"?t:null),s(null)}catch(t){if(e)return;s(t?.message||String(t))}finally{e||f(!1)}})(),()=>{e=!0}},[n]),{data:o,error:u,isLoading:c,refresh:g}}export{y as u};
|
|
@@ -135,8 +135,8 @@
|
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
</script>
|
|
138
|
-
<script type="module" crossorigin src="/assets/main-
|
|
139
|
-
<link rel="stylesheet" crossorigin href="/assets/main-
|
|
138
|
+
<script type="module" crossorigin src="/assets/main-CryDk9yC.js"></script>
|
|
139
|
+
<link rel="stylesheet" crossorigin href="/assets/main-CNzfq4Ln.css">
|
|
140
140
|
</head>
|
|
141
141
|
<body>
|
|
142
142
|
<main class="aeo-seed-content" aria-label="Token Tracker AI-readable summary">
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"description": "Shareable Token Tracker dashboard snapshot."
|
|
52
52
|
}
|
|
53
53
|
</script>
|
|
54
|
-
<script type="module" crossorigin src="/assets/main-
|
|
55
|
-
<link rel="stylesheet" crossorigin href="/assets/main-
|
|
54
|
+
<script type="module" crossorigin src="/assets/main-CryDk9yC.js"></script>
|
|
55
|
+
<link rel="stylesheet" crossorigin href="/assets/main-CNzfq4Ln.css">
|
|
56
56
|
</head>
|
|
57
57
|
<body>
|
|
58
58
|
<main class="aeo-seed-content" aria-label="Token Tracker share page summary">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokentracker-cli",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Token usage tracker for AI agent CLIs (Claude Code, Codex, Cursor, Kiro, Gemini, OpenCode, OpenClaw, Hermes)",
|
|
3
|
+
"version": "0.5.68",
|
|
4
|
+
"description": "Token usage tracker for AI agent CLIs (Claude Code, Codex, Cursor, Kiro, Gemini, OpenCode, OpenClaw, Hermes, GitHub Copilot)",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"tokentracker-cli": "bin/tracker.js",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as i,ad as V,S as Ge,D as d,az as _,aA as qn,aB as Jn,ah as Qn,ai as Zn,aC as er,h as tr,j as nr,B as M,aD as rr,am as or,ax as Et,aE as kt,aF as Vt,aG as Gt,aH as ar}from"./main-XWVaG1Bp.js";import{L as mn,a as xn,b as ut,l as jt,c as At,d as sr,e as qt}from"./leaderboard-columns-DVxnNSJP.js";function ir(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const bt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Be(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Pt(e){return"nodeType"in e}function G(e){var t,n;return e?Be(e)?e:Pt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Bt(e){const{Document:t}=G(e);return e instanceof t}function rt(e){return Be(e)?!1:e instanceof G(e).HTMLElement}function vn(e){return e instanceof G(e).SVGElement}function ze(e){return e?Be(e)?e.document:Pt(e)?Bt(e)?e:rt(e)||vn(e)?e.ownerDocument:document:document:document}const xe=bt?i.useLayoutEffect:i.useEffect;function zt(e){const t=i.useRef(e);return xe(()=>{t.current=e}),i.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function lr(){const e=i.useRef(null),t=i.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=i.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ze(e,t){t===void 0&&(t=[e]);const n=i.useRef(e);return xe(()=>{n.current!==e&&(n.current=e)},t),n}function ot(e,t){const n=i.useRef();return i.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ft(e){const t=zt(e),n=i.useRef(null),r=i.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Mt(e){const t=i.useRef();return i.useEffect(()=>{t.current=e},[e]),t.current}let St={};function at(e,t){return i.useMemo(()=>{if(t)return t;const n=St[e]==null?0:St[e]+1;return St[e]=n,e+"-"+n},[e,t])}function yn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((a,s)=>{const l=Object.entries(s);for(const[c,u]of l){const g=a[c];g!=null&&(a[c]=g+e*u)}return a},{...t})}}const _e=yn(1),et=yn(-1);function cr(e){return"clientX"in e&&"clientY"in e}function $t(e){if(!e)return!1;const{KeyboardEvent:t}=G(e.target);return t&&e instanceof t}function dr(e){if(!e)return!1;const{TouchEvent:t}=G(e.target);return t&&e instanceof t}function It(e){if(dr(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return cr(e)?{x:e.clientX,y:e.clientY}:null}const tt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[tt.Translate.toString(e),tt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Jt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ur(e){return e.matches(Jt)?e:e.querySelector(Jt)}const fr={display:"none"};function gr(e){let{id:t,value:n}=e;return V.createElement("div",{id:t,style:fr},n)}function hr(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return V.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function pr(){const[e,t]=i.useState("");return{announce:i.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const wn=i.createContext(null);function br(e){const t=i.useContext(wn);i.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function mr(){const[e]=i.useState(()=>new Set),t=i.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[i.useCallback(r=>{let{type:o,event:a}=r;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,a)})},[e]),t]}const xr={draggable:`
|
|
2
|
-
To pick up a draggable item, press the space bar.
|
|
3
|
-
While dragging, use the arrow keys to move the item.
|
|
4
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
|
-
`},vr={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function yr(e){let{announcements:t=vr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=xr}=e;const{announce:a,announcement:s}=pr(),l=at("DndLiveRegion"),[c,u]=i.useState(!1);if(i.useEffect(()=>{u(!0)},[]),br(i.useMemo(()=>({onDragStart(f){let{active:b}=f;a(t.onDragStart({active:b}))},onDragMove(f){let{active:b,over:h}=f;t.onDragMove&&a(t.onDragMove({active:b,over:h}))},onDragOver(f){let{active:b,over:h}=f;a(t.onDragOver({active:b,over:h}))},onDragEnd(f){let{active:b,over:h}=f;a(t.onDragEnd({active:b,over:h}))},onDragCancel(f){let{active:b,over:h}=f;a(t.onDragCancel({active:b,over:h}))}}),[a,t])),!c)return null;const g=V.createElement(V.Fragment,null,V.createElement(gr,{id:r,value:o.draggable}),V.createElement(hr,{id:l,announcement:s}));return n?Ge.createPortal(g,n):g}var P;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(P||(P={}));function gt(){}function Qt(e,t){return i.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function wr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const de=Object.freeze({x:0,y:0});function kn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Sn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function kr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Zt(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Cn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function en(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=en(t,t.left,t.top),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const u=kn(en(c),o);a.push({id:l,data:{droppableContainer:s,value:u}})}}return a.sort(Sn)},Cr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Zt(t),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const u=Zt(c),g=o.reduce((b,h,w)=>b+kn(u[w],h),0),f=Number((g/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:f}})}}return a.sort(Sn)};function Dr(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-r,l=a-n;if(r<o&&n<a){const c=t.width*t.height,u=e.width*e.height,g=s*l,f=g/(c+u-g);return Number(f.toFixed(4))}return 0}const Rr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const c=Dr(l,t);c>0&&o.push({id:s,data:{droppableContainer:a,value:c}})}}return o.sort(kr)};function Nr(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Dn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:de}function Er(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}const jr=Er(1);function Ar(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Mr(e,t,n){const r=Ar(t);if(!r)return e;const{scaleX:o,scaleY:a,x:s,y:l}=r,c=e.left-s-(1-o)*parseFloat(n),u=e.top-l-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),g=o?e.width/o:e.width,f=a?e.height/a:e.height;return{width:g,height:f,top:u,right:c+g,bottom:u+f,left:c}}const Ir={ignoreTransform:!1};function $e(e,t){t===void 0&&(t=Ir);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:g}=G(e).getComputedStyle(e);u&&(n=Mr(n,u,g))}const{top:r,left:o,width:a,height:s,bottom:l,right:c}=n;return{top:r,left:o,width:a,height:s,bottom:l,right:c}}function tn(e){return $e(e,{ignoreTransform:!0})}function Tr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Lr(e,t){return t===void 0&&(t=G(e).getComputedStyle(e)),t.position==="fixed"}function Or(e,t){t===void 0&&(t=G(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?n.test(a):!1})}function mt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Bt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!rt(o)||vn(o)||n.includes(o))return n;const a=G(e).getComputedStyle(o);return o!==e&&Or(o,a)&&n.push(o),Lr(o,a)?n:r(o.parentNode)}return e?r(e):n}function Rn(e){const[t]=mt(e,1);return t??null}function Ct(e){return!bt||!e?null:Be(e)?e:Pt(e)?Bt(e)||e===ze(e).scrollingElement?window:rt(e)?e:null:null}function Nn(e){return Be(e)?e.scrollX:e.scrollLeft}function En(e){return Be(e)?e.scrollY:e.scrollTop}function Tt(e){return{x:Nn(e),y:En(e)}}var B;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(B||(B={}));function jn(e){return!bt||!e?!1:e===document.scrollingElement}function An(e){const t={x:0,y:0},n=jn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:o,isLeft:a,isBottom:s,isRight:l,maxScroll:r,minScroll:t}}const _r={x:.2,y:.2};function Pr(e,t,n,r,o){let{top:a,left:s,right:l,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=_r);const{isTop:u,isBottom:g,isLeft:f,isRight:b}=An(e),h={x:0,y:0},w={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!u&&a<=t.top+m.height?(h.y=B.Backward,w.y=r*Math.abs((t.top+m.height-a)/m.height)):!g&&c>=t.bottom-m.height&&(h.y=B.Forward,w.y=r*Math.abs((t.bottom-m.height-c)/m.height)),!b&&l>=t.right-m.width?(h.x=B.Forward,w.x=r*Math.abs((t.right-m.width-l)/m.width)):!f&&s<=t.left+m.width&&(h.x=B.Backward,w.x=r*Math.abs((t.left+m.width-s)/m.width)),{direction:h,speed:w}}function Br(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Mn(e){return e.reduce((t,n)=>_e(t,Tt(n)),de)}function zr(e){return e.reduce((t,n)=>t+Nn(n),0)}function $r(e){return e.reduce((t,n)=>t+En(n),0)}function Fr(e,t){if(t===void 0&&(t=$e),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);Rn(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ur=[["x",["left","right"],zr],["y",["top","bottom"],$r]];class Ft{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=mt(n),o=Mn(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,s,l]of Ur)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=l(r),g=o[a]-u;return this.rect[c]+g},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class qe{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Xr(e){const{EventTarget:t}=G(e);return e instanceof t?e:ze(e)}function Dt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ae;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ae||(ae={}));function nn(e){e.preventDefault()}function Yr(e){e.stopPropagation()}var R;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(R||(R={}));const In={start:[R.Space,R.Enter],cancel:[R.Esc],end:[R.Space,R.Enter,R.Tab]},Wr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case R.Right:return{...n,x:n.x+25};case R.Left:return{...n,x:n.x-25};case R.Down:return{...n,y:n.y+25};case R.Up:return{...n,y:n.y-25}}};class Ut{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new qe(ze(n)),this.windowListeners=new qe(G(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ae.Resize,this.handleCancel),this.windowListeners.add(ae.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ae.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Fr(r),n(de)}handleKeyDown(t){if($t(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:a=In,coordinateGetter:s=Wr,scrollBehavior:l="smooth"}=o,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,g=u?{x:u.left,y:u.top}:de;this.referenceCoordinates||(this.referenceCoordinates=g);const f=s(t,{active:n,context:r.current,currentCoordinates:g});if(f){const b=et(f,g),h={x:0,y:0},{scrollableAncestors:w}=r.current;for(const m of w){const x=t.code,{isTop:v,isRight:k,isLeft:y,isBottom:C,maxScroll:N,minScroll:j}=An(m),S=Br(m),D={x:Math.min(x===R.Right?S.right-S.width/2:S.right,Math.max(x===R.Right?S.left:S.left+S.width/2,f.x)),y:Math.min(x===R.Down?S.bottom-S.height/2:S.bottom,Math.max(x===R.Down?S.top:S.top+S.height/2,f.y))},T=x===R.Right&&!k||x===R.Left&&!y,L=x===R.Down&&!C||x===R.Up&&!v;if(T&&D.x!==f.x){const I=m.scrollLeft+b.x,H=x===R.Right&&I<=N.x||x===R.Left&&I>=j.x;if(H&&!b.y){m.scrollTo({left:I,behavior:l});return}H?h.x=m.scrollLeft-I:h.x=x===R.Right?m.scrollLeft-N.x:m.scrollLeft-j.x,h.x&&m.scrollBy({left:-h.x,behavior:l});break}else if(L&&D.y!==f.y){const I=m.scrollTop+b.y,H=x===R.Down&&I<=N.y||x===R.Up&&I>=j.y;if(H&&!b.x){m.scrollTo({top:I,behavior:l});return}H?h.y=m.scrollTop-I:h.y=x===R.Down?m.scrollTop-N.y:m.scrollTop-j.y,h.y&&m.scrollBy({top:-h.y,behavior:l});break}}this.handleMove(t,_e(et(f,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Ut.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=In,onActivation:o}=t,{active:a}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function rn(e){return!!(e&&"distance"in e)}function on(e){return!!(e&&"delay"in e)}class Xt{constructor(t,n,r){var o;r===void 0&&(r=Xr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:s}=a;this.props=t,this.events=n,this.document=ze(s),this.documentListeners=new qe(this.document),this.listeners=new qe(r),this.windowListeners=new qe(G(s)),this.initialCoordinates=(o=It(a))!=null?o:de,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ae.Resize,this.handleCancel),this.windowListeners.add(ae.DragStart,nn),this.windowListeners.add(ae.VisibilityChange,this.handleCancel),this.windowListeners.add(ae.ContextMenu,nn),this.documentListeners.add(ae.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(on(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(rn(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ae.Click,Yr,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ae.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:a}=this,{onMove:s,options:{activationConstraint:l}}=a;if(!o)return;const c=(n=It(t))!=null?n:de,u=et(o,c);if(!r&&l){if(rn(l)){if(l.tolerance!=null&&Dt(u,l.tolerance))return this.handleCancel();if(Dt(u,l.distance))return this.handleStart()}if(on(l)&&Dt(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),s(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===R.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Hr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Yt extends Xt{constructor(t){const{event:n}=t,r=ze(n.target);super(t,Hr,r)}}Yt.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Kr={move:{name:"mousemove"},end:{name:"mouseup"}};var Lt;(function(e){e[e.RightClick=2]="RightClick"})(Lt||(Lt={}));class Vr extends Xt{constructor(t){super(t,Kr,ze(t.event.target))}}Vr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Lt.RightClick?!1:(r?.({event:n}),!0)}}];const Rt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Gr extends Xt{constructor(t){super(t,Rt)}static setup(){return window.addEventListener(Rt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Rt.move.name,t)};function t(){}}}Gr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Je;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Je||(Je={}));var ht;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ht||(ht={}));function qr(e){let{acceleration:t,activator:n=Je.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:s=5,order:l=ht.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:g,delta:f,threshold:b}=e;const h=Qr({delta:f,disabled:!a}),[w,m]=lr(),x=i.useRef({x:0,y:0}),v=i.useRef({x:0,y:0}),k=i.useMemo(()=>{switch(n){case Je.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Je.DraggableRect:return o}},[n,o,c]),y=i.useRef(null),C=i.useCallback(()=>{const j=y.current;if(!j)return;const S=x.current.x*v.current.x,D=x.current.y*v.current.y;j.scrollBy(S,D)},[]),N=i.useMemo(()=>l===ht.TreeOrder?[...u].reverse():u,[l,u]);i.useEffect(()=>{if(!a||!u.length||!k){m();return}for(const j of N){if(r?.(j)===!1)continue;const S=u.indexOf(j),D=g[S];if(!D)continue;const{direction:T,speed:L}=Pr(j,D,k,t,b);for(const I of["x","y"])h[I][T[I]]||(L[I]=0,T[I]=0);if(L.x>0||L.y>0){m(),y.current=j,w(C,s),x.current=L,v.current=T;return}}x.current={x:0,y:0},v.current={x:0,y:0},m()},[t,C,r,m,a,s,JSON.stringify(k),JSON.stringify(h),w,u,N,g,JSON.stringify(b)])}const Jr={x:{[B.Backward]:!1,[B.Forward]:!1},y:{[B.Backward]:!1,[B.Forward]:!1}};function Qr(e){let{delta:t,disabled:n}=e;const r=Mt(t);return ot(o=>{if(n||!r||!o)return Jr;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[B.Backward]:o.x[B.Backward]||a.x===-1,[B.Forward]:o.x[B.Forward]||a.x===1},y:{[B.Backward]:o.y[B.Backward]||a.y===-1,[B.Forward]:o.y[B.Forward]||a.y===1}}},[n,t,r])}function Zr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return ot(o=>{var a;return t==null?null:(a=r??o)!=null?a:null},[r,t])}function eo(e,t){return i.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,a=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...a]},[]),[e,t])}var nt;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(nt||(nt={}));var Ot;(function(e){e.Optimized="optimized"})(Ot||(Ot={}));const an=new Map;function to(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,s]=i.useState(null),{frequency:l,measure:c,strategy:u}=o,g=i.useRef(e),f=x(),b=Ze(f),h=i.useCallback(function(v){v===void 0&&(v=[]),!b.current&&s(k=>k===null?v:k.concat(v.filter(y=>!k.includes(y))))},[b]),w=i.useRef(null),m=ot(v=>{if(f&&!n)return an;if(!v||v===an||g.current!==e||a!=null){const k=new Map;for(let y of e){if(!y)continue;if(a&&a.length>0&&!a.includes(y.id)&&y.rect.current){k.set(y.id,y.rect.current);continue}const C=y.node.current,N=C?new Ft(c(C),C):null;y.rect.current=N,N&&k.set(y.id,N)}return k}return v},[e,a,n,f,c]);return i.useEffect(()=>{g.current=e},[e]),i.useEffect(()=>{f||h()},[n,f]),i.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),i.useEffect(()=>{f||typeof l!="number"||w.current!==null||(w.current=setTimeout(()=>{h(),w.current=null},l))},[l,f,h,...r]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:a!=null};function x(){switch(u){case nt.Always:return!1;case nt.BeforeDragging:return n;default:return!n}}}function Tn(e,t){return ot(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function no(e,t){return Tn(e,t)}function ro(e){let{callback:t,disabled:n}=e;const r=zt(t),o=i.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return i.useEffect(()=>()=>o?.disconnect(),[o]),o}function xt(e){let{callback:t,disabled:n}=e;const r=zt(t),o=i.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return i.useEffect(()=>()=>o?.disconnect(),[o]),o}function oo(e){return new Ft($e(e),e)}function sn(e,t,n){t===void 0&&(t=oo);const[r,o]=i.useState(null);function a(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const g=t(e);return JSON.stringify(c)===JSON.stringify(g)?c:g})}const s=ro({callback(c){if(e)for(const u of c){const{type:g,target:f}=u;if(g==="childList"&&f instanceof HTMLElement&&f.contains(e)){a();break}}}}),l=xt({callback:a});return xe(()=>{a(),e?(l?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),s?.disconnect())},[e]),r}function ao(e){const t=Tn(e);return Dn(e,t)}const ln=[];function so(e){const t=i.useRef(e),n=ot(r=>e?r&&r!==ln&&e&&t.current&&e.parentNode===t.current.parentNode?r:mt(e):ln,[e]);return i.useEffect(()=>{t.current=e},[e]),n}function io(e){const[t,n]=i.useState(null),r=i.useRef(e),o=i.useCallback(a=>{const s=Ct(a.target);s&&n(l=>l?(l.set(s,Tt(s)),new Map(l)):null)},[]);return i.useEffect(()=>{const a=r.current;if(e!==a){s(a);const l=e.map(c=>{const u=Ct(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,Tt(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(c=>{const u=Ct(c);u?.removeEventListener("scroll",o)})}},[o,e]),i.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>_e(a,s),de):Mn(e):de,[e,t])}function cn(e,t){t===void 0&&(t=[]);const n=i.useRef(null);return i.useEffect(()=>{n.current=null},t),i.useEffect(()=>{const r=e!==de;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?et(e,n.current):de}function lo(e){i.useEffect(()=>{if(!bt)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function co(e,t){return i.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:a}=r;return n[o]=s=>{a(s,t)},n},{}),[e,t])}function Ln(e){return i.useMemo(()=>e?Tr(e):null,[e])}const dn=[];function uo(e,t){t===void 0&&(t=$e);const[n]=e,r=Ln(n?G(n):null),[o,a]=i.useState(dn);function s(){a(()=>e.length?e.map(c=>jn(c)?r:new Ft(t(c),c)):dn)}const l=xt({callback:s});return xe(()=>{l?.disconnect(),s(),e.forEach(c=>l?.observe(c))},[e]),o}function fo(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return rt(t)?t:e}function go(e){let{measure:t}=e;const[n,r]=i.useState(null),o=i.useCallback(u=>{for(const{target:g}of u)if(rt(g)){r(f=>{const b=t(g);return f?{...f,width:b.width,height:b.height}:b});break}},[t]),a=xt({callback:o}),s=i.useCallback(u=>{const g=fo(u);a?.disconnect(),g&&a?.observe(g),r(g?t(g):null)},[t,a]),[l,c]=ft(s);return i.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const ho=[{sensor:Yt,options:{}},{sensor:Ut,options:{}}],po={current:{}},dt={draggable:{measure:tn},droppable:{measure:tn,strategy:nt.WhileDragging,frequency:Ot.Optimized},dragOverlay:{measure:$e}};class Qe extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const bo={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:dt,measureDroppableContainers:gt,windowRect:null,measuringScheduled:!1},mo={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:gt,draggableNodes:new Map,over:null,measureDroppableContainers:gt},vt=i.createContext(mo),On=i.createContext(bo);function xo(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qe}}}function vo(e,t){switch(t.type){case P.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case P.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case P.DragEnd:case P.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case P.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Qe(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case P.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const s=new Qe(e.droppable.containers);return s.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case P.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Qe(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function yo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=i.useContext(vt),a=Mt(r),s=Mt(n?.id);return i.useEffect(()=>{if(!t&&!r&&a&&s!=null){if(!$t(a)||document.activeElement===a.target)return;const l=o.get(s);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const g of[c.current,u.current]){if(!g)continue;const f=ur(g);if(f){f.focus();break}}})}},[r,t,o,s,a]),null}function wo(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...r}),n):n}function ko(e){return i.useMemo(()=>({draggable:{...dt.draggable,...e?.draggable},droppable:{...dt.droppable,...e?.droppable},dragOverlay:{...dt.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function So(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=i.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;xe(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const g=n(u),f=Dn(g,r);if(s||(f.x=0),l||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const b=Rn(u);b&&b.scrollBy({top:f.y,left:f.x})}},[t,s,l,r,n])}const _n=i.createContext({...de,scaleX:1,scaleY:1});var Ee;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ee||(Ee={}));const Co=i.memo(function(t){var n,r,o,a;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:g=ho,collisionDetection:f=Rr,measuring:b,modifiers:h,...w}=t;const m=i.useReducer(vo,void 0,xo),[x,v]=m,[k,y]=mr(),[C,N]=i.useState(Ee.Uninitialized),j=C===Ee.Initialized,{draggable:{active:S,nodes:D,translate:T},droppable:{containers:L}}=x,I=S!=null?D.get(S):null,H=i.useRef({initial:null,translated:null}),O=i.useMemo(()=>{var X;return S!=null?{id:S,data:(X=I?.data)!=null?X:po,rect:H}:null},[S,I]),K=i.useRef(null),[ke,Te]=i.useState(null),[F,je]=i.useState(null),te=Ze(w,Object.values(w)),Se=at("DndDescribedBy",s),q=i.useMemo(()=>L.getEnabled(),[L]),U=ko(b),{droppableRects:se,measureDroppableContainers:ue,measuringScheduled:Y}=to(q,{dragging:j,dependencies:[T.x,T.y],config:U.droppable}),z=Zr(D,S),ne=i.useMemo(()=>F?It(F):null,[F]),fe=Gn(),re=no(z,U.draggable.measure);So({activeNode:S!=null?D.get(S):null,config:fe.layoutShiftCompensation,initialRect:re,measure:U.draggable.measure});const A=sn(z,U.draggable.measure,re),Ce=sn(z?z.parentElement:null),J=i.useRef({activatorEvent:null,active:null,activeNode:z,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=L.getNodeFor((n=J.current.over)==null?void 0:n.id),ie=go({measure:U.dragOverlay.measure}),ve=(r=ie.nodeRef.current)!=null?r:z,ye=j?(o=ie.rect)!=null?o:A:null,Fe=!!(ie.nodeRef.current&&ie.rect),Ue=ao(Fe?null:A),Ae=Ln(ve?G(ve):null),he=so(j?ge??z:null),Le=uo(he),Me=wo(h,{transform:{x:T.x-Ue.x,y:T.y-Ue.y,scaleX:1,scaleY:1},activatorEvent:F,active:O,activeNodeRect:A,containerNodeRect:Ce,draggingNodeRect:ye,over:J.current.over,overlayNodeRect:ie.rect,scrollableAncestors:he,scrollableAncestorRects:Le,windowRect:Ae}),Xe=ne?_e(ne,T):null,st=io(he),Ie=cn(st),Ye=cn(st,[A]),p=_e(Me,Ie),E=ye?jr(ye,Me):null,W=O&&E?f({active:O,collisionRect:E,droppableRects:se,droppableContainers:q,pointerCoordinates:Xe}):null,We=Cn(W,"id"),[pe,le]=i.useState(null),Wt=Fe?Me:_e(Me,Ye),Wn=Nr(Wt,(a=pe?.rect)!=null?a:null,A),yt=i.useRef(null),Ht=i.useCallback((X,Q)=>{let{sensor:Z,options:De}=Q;if(K.current==null)return;const oe=D.get(K.current);if(!oe)return;const ee=X.nativeEvent,be=new Z({active:K.current,activeNode:oe,event:ee,options:De,context:J,onAbort($){if(!D.get($))return;const{onDragAbort:me}=te.current,we={id:$};me?.(we),k({type:"onDragAbort",event:we})},onPending($,Re,me,we){if(!D.get($))return;const{onDragPending:Ke}=te.current,Ne={id:$,constraint:Re,initialCoordinates:me,offset:we};Ke?.(Ne),k({type:"onDragPending",event:Ne})},onStart($){const Re=K.current;if(Re==null)return;const me=D.get(Re);if(!me)return;const{onDragStart:we}=te.current,He={activatorEvent:ee,active:{id:Re,data:me.data,rect:H}};Ge.unstable_batchedUpdates(()=>{we?.(He),N(Ee.Initializing),v({type:P.DragStart,initialCoordinates:$,active:Re}),k({type:"onDragStart",event:He}),Te(yt.current),je(ee)})},onMove($){v({type:P.DragMove,coordinates:$})},onEnd:Oe(P.DragEnd),onCancel:Oe(P.DragCancel)});yt.current=be;function Oe($){return async function(){const{active:me,collisions:we,over:He,scrollAdjustedTranslate:Ke}=J.current;let Ne=null;if(me&&Ke){const{cancelDrop:Ve}=te.current;Ne={activatorEvent:ee,active:me,collisions:we,delta:Ke,over:He},$===P.DragEnd&&typeof Ve=="function"&&await Promise.resolve(Ve(Ne))&&($=P.DragCancel)}K.current=null,Ge.unstable_batchedUpdates(()=>{v({type:$}),N(Ee.Uninitialized),le(null),Te(null),je(null),yt.current=null;const Ve=$===P.DragEnd?"onDragEnd":"onDragCancel";if(Ne){const wt=te.current[Ve];wt?.(Ne),k({type:Ve,event:Ne})}})}}},[D]),Hn=i.useCallback((X,Q)=>(Z,De)=>{const oe=Z.nativeEvent,ee=D.get(De);if(K.current!==null||!ee||oe.dndKit||oe.defaultPrevented)return;const be={active:ee};X(Z,Q.options,be)===!0&&(oe.dndKit={capturedBy:Q.sensor},K.current=De,Ht(Z,Q))},[D,Ht]),Kt=eo(g,Hn);lo(g),xe(()=>{A&&C===Ee.Initializing&&N(Ee.Initialized)},[A,C]),i.useEffect(()=>{const{onDragMove:X}=te.current,{active:Q,activatorEvent:Z,collisions:De,over:oe}=J.current;if(!Q||!Z)return;const ee={active:Q,activatorEvent:Z,collisions:De,delta:{x:p.x,y:p.y},over:oe};Ge.unstable_batchedUpdates(()=>{X?.(ee),k({type:"onDragMove",event:ee})})},[p.x,p.y]),i.useEffect(()=>{const{active:X,activatorEvent:Q,collisions:Z,droppableContainers:De,scrollAdjustedTranslate:oe}=J.current;if(!X||K.current==null||!Q||!oe)return;const{onDragOver:ee}=te.current,be=De.get(We),Oe=be&&be.rect.current?{id:be.id,rect:be.rect.current,data:be.data,disabled:be.disabled}:null,$={active:X,activatorEvent:Q,collisions:Z,delta:{x:oe.x,y:oe.y},over:Oe};Ge.unstable_batchedUpdates(()=>{le(Oe),ee?.($),k({type:"onDragOver",event:$})})},[We]),xe(()=>{J.current={activatorEvent:F,active:O,activeNode:z,collisionRect:E,collisions:W,droppableRects:se,draggableNodes:D,draggingNode:ve,draggingNodeRect:ye,droppableContainers:L,over:pe,scrollableAncestors:he,scrollAdjustedTranslate:p},H.current={initial:ye,translated:E}},[O,z,W,E,D,ve,ye,se,L,pe,he,p]),qr({...fe,delta:T,draggingRect:E,pointerCoordinates:Xe,scrollableAncestors:he,scrollableAncestorRects:Le});const Kn=i.useMemo(()=>({active:O,activeNode:z,activeNodeRect:A,activatorEvent:F,collisions:W,containerNodeRect:Ce,dragOverlay:ie,draggableNodes:D,droppableContainers:L,droppableRects:se,over:pe,measureDroppableContainers:ue,scrollableAncestors:he,scrollableAncestorRects:Le,measuringConfiguration:U,measuringScheduled:Y,windowRect:Ae}),[O,z,A,F,W,Ce,ie,D,L,se,pe,ue,he,Le,U,Y,Ae]),Vn=i.useMemo(()=>({activatorEvent:F,activators:Kt,active:O,activeNodeRect:A,ariaDescribedById:{draggable:Se},dispatch:v,draggableNodes:D,over:pe,measureDroppableContainers:ue}),[F,Kt,O,A,v,Se,D,pe,ue]);return V.createElement(wn.Provider,{value:y},V.createElement(vt.Provider,{value:Vn},V.createElement(On.Provider,{value:Kn},V.createElement(_n.Provider,{value:Wn},u)),V.createElement(yo,{disabled:l?.restoreFocus===!1})),V.createElement(yr,{...l,hiddenTextDescribedById:Se}));function Gn(){const X=ke?.autoScrollEnabled===!1,Q=typeof c=="object"?c.enabled===!1:c===!1,Z=j&&!X&&!Q;return typeof c=="object"?{...c,enabled:Z}:{enabled:Z}}}),Do=i.createContext(null),un="button",Ro="Draggable";function No(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=at(Ro),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:g,draggableNodes:f,over:b}=i.useContext(vt),{role:h=un,roleDescription:w="draggable",tabIndex:m=0}=o??{},x=c?.id===t,v=i.useContext(x?_n:Do),[k,y]=ft(),[C,N]=ft(),j=co(s,t),S=Ze(n);xe(()=>(f.set(t,{id:t,key:a,node:k,activatorNode:C,data:S}),()=>{const T=f.get(t);T&&T.key===a&&f.delete(t)}),[f,t]);const D=i.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":x&&h===un?!0:void 0,"aria-roledescription":w,"aria-describedby":g.draggable}),[r,h,m,x,w,g.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:D,isDragging:x,listeners:r?void 0:j,node:k,over:b,setNodeRef:y,setActivatorNodeRef:N,transform:v}}function Eo(){return i.useContext(On)}const jo="Droppable",Ao={timeout:25};function Mo(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=at(jo),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=i.useContext(vt),g=i.useRef({disabled:n}),f=i.useRef(!1),b=i.useRef(null),h=i.useRef(null),{disabled:w,updateMeasurementsFor:m,timeout:x}={...Ao,...o},v=Ze(m??r),k=i.useCallback(()=>{if(!f.current){f.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(v.current)?v.current:[v.current]),h.current=null},x)},[x]),y=xt({callback:k,disabled:w||!s}),C=i.useCallback((D,T)=>{y&&(T&&(y.unobserve(T),f.current=!1),D&&y.observe(D))},[y]),[N,j]=ft(C),S=Ze(t);return i.useEffect(()=>{!y||!N.current||(y.disconnect(),f.current=!1,y.observe(N.current))},[N,y]),i.useEffect(()=>(l({type:P.RegisterDroppable,element:{id:r,key:a,disabled:n,node:N,rect:b,data:S}}),()=>l({type:P.UnregisterDroppable,key:a,id:r})),[r]),i.useEffect(()=>{n!==g.current.disabled&&(l({type:P.SetDroppableDisabled,id:r,key:a,disabled:n}),g.current.disabled=n)},[r,a,n,l]),{active:s,rect:b,isOver:c?.id===r,node:N,over:c,setNodeRef:j}}const Io=e=>{let{transform:t}=e;return{...t,y:0}};function Pn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function To(e,t){return e.reduce((n,r,o)=>{const a=t.get(r);return a&&(n[o]=a),n},Array(e.length))}function it(e){return e!==null&&e>=0}function Lo(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Oo(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const lt={scaleX:1,scaleY:1},_o=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:a,index:s}=e;const l=(t=n[o])!=null?t:r;if(!l)return null;const c=Po(n,s,o);if(s===o){const u=n[a];return u?{x:o<a?u.left+u.width-(l.left+l.width):u.left-l.left,y:0,...lt}:null}return s>o&&s<=a?{x:-l.width-c,y:0,...lt}:s<o&&s>=a?{x:l.width+c,y:0,...lt}:{x:0,y:0,...lt}};function Po(e,t,n){const r=e[t],o=e[t-1],a=e[t+1];return!r||!o&&!a?0:n<t?o?r.left-(o.left+o.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(o.left+o.width)}const Bn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=Pn(t,r,n),s=t[o],l=a[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},zn="Sortable",$n=V.createContext({activeIndex:-1,containerId:zn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Bn,disabled:{draggable:!1,droppable:!1}});function Bo(e){let{children:t,id:n,items:r,strategy:o=Bn,disabled:a=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:g}=Eo(),f=at(zn,n),b=l.rect!==null,h=i.useMemo(()=>r.map(j=>typeof j=="object"&&"id"in j?j.id:j),[r]),w=s!=null,m=s?h.indexOf(s.id):-1,x=u?h.indexOf(u.id):-1,v=i.useRef(h),k=!Lo(h,v.current),y=x!==-1&&m===-1||k,C=Oo(a);xe(()=>{k&&w&&g(h)},[k,h,w,g]),i.useEffect(()=>{v.current=h},[h]);const N=i.useMemo(()=>({activeIndex:m,containerId:f,disabled:C,disableTransforms:y,items:h,overIndex:x,useDragOverlay:b,sortedRects:To(h,c),strategy:o}),[m,f,C.draggable,C.droppable,y,h,x,c,b,o]);return V.createElement($n.Provider,{value:N},t)}const zo=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Pn(n,r,o).indexOf(t)},$o=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:s,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!r||l!==a&&o===s?!1:n?!0:s!==o&&t===c},Fo={duration:200,easing:"ease"},Fn="transform",Uo=tt.Transition.toString({property:Fn,duration:0,easing:"linear"}),Xo={roleDescription:"sortable"};function Yo(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,s]=i.useState(null),l=i.useRef(n);return xe(()=>{if(!t&&n!==l.current&&r.current){const c=o.current;if(c){const u=$e(r.current,{ignoreTransform:!0}),g={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(g.x||g.y)&&s(g)}}n!==l.current&&(l.current=n)},[t,n,r,o]),i.useEffect(()=>{a&&s(null)},[a]),a}function Wo(e){let{animateLayoutChanges:t=$o,attributes:n,disabled:r,data:o,getNewIndex:a=zo,id:s,strategy:l,resizeObserverConfig:c,transition:u=Fo}=e;const{items:g,containerId:f,activeIndex:b,disabled:h,disableTransforms:w,sortedRects:m,overIndex:x,useDragOverlay:v,strategy:k}=i.useContext($n),y=Ho(r,h),C=g.indexOf(s),N=i.useMemo(()=>({sortable:{containerId:f,index:C,items:g},...o}),[f,o,C,g]),j=i.useMemo(()=>g.slice(g.indexOf(s)),[g,s]),{rect:S,node:D,isOver:T,setNodeRef:L}=Mo({id:s,data:N,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...c}}),{active:I,activatorEvent:H,activeNodeRect:O,attributes:K,setNodeRef:ke,listeners:Te,isDragging:F,over:je,setActivatorNodeRef:te,transform:Se}=No({id:s,data:N,attributes:{...Xo,...n},disabled:y.draggable}),q=ir(L,ke),U=!!I,se=U&&!w&&it(b)&&it(x),ue=!v&&F,Y=ue&&se?Se:null,ne=se?Y??(l??k)({rects:m,activeNodeRect:O,activeIndex:b,overIndex:x,index:C}):null,fe=it(b)&&it(x)?a({id:s,items:g,activeIndex:b,overIndex:x}):C,re=I?.id,A=i.useRef({activeId:re,items:g,newIndex:fe,containerId:f}),Ce=g!==A.current.items,J=t({active:I,containerId:f,isDragging:F,isSorting:U,id:s,index:C,items:g,newIndex:A.current.newIndex,previousItems:A.current.items,previousContainerId:A.current.containerId,transition:u,wasDragging:A.current.activeId!=null}),ge=Yo({disabled:!J,index:C,node:D,rect:S});return i.useEffect(()=>{U&&A.current.newIndex!==fe&&(A.current.newIndex=fe),f!==A.current.containerId&&(A.current.containerId=f),g!==A.current.items&&(A.current.items=g)},[U,fe,f,g]),i.useEffect(()=>{if(re===A.current.activeId)return;if(re&&!A.current.activeId){A.current.activeId=re;return}const ve=setTimeout(()=>{A.current.activeId=re},50);return()=>clearTimeout(ve)},[re]),{active:I,activeIndex:b,attributes:K,data:N,rect:S,index:C,newIndex:fe,items:g,isOver:T,isSorting:U,isDragging:F,listeners:Te,node:D,overIndex:x,over:je,setNodeRef:q,setActivatorNodeRef:te,setDroppableNodeRef:L,setDraggableNodeRef:ke,transform:ge??ne,transition:ie()};function ie(){if(ge||Ce&&A.current.newIndex===C)return Uo;if(!(ue&&!$t(H)||!u)&&(U||J))return tt.Transition.toString({...u,property:Fn})}}function Ho(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function pt(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Ko=[R.Down,R.Right,R.Up,R.Left],Vo=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:s,scrollableAncestors:l}}=t;if(Ko.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const b=o.get(f.id);if(b)switch(e.code){case R.Down:r.top<b.top&&c.push(f);break;case R.Up:r.top>b.top&&c.push(f);break;case R.Left:r.left>b.left&&c.push(f);break;case R.Right:r.left<b.left&&c.push(f);break}});const u=Cr({collisionRect:r,droppableRects:o,droppableContainers:c});let g=Cn(u,"id");if(g===s?.id&&u.length>1&&(g=u[1].id),g!=null){const f=a.get(n.id),b=a.get(g),h=b?o.get(b.id):null,w=b?.node.current;if(w&&h&&f&&b){const x=mt(w).some((j,S)=>l[S]!==j),v=Un(f,b),k=Go(f,b),y=x||!v?{x:0,y:0}:{x:k?r.width-h.width:0,y:k?r.height-h.height:0},C={x:h.left,y:h.top};return y.x&&y.y?C:et(C,y)}}}};function Un(e,t){return!pt(e)||!pt(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Go(e,t){return!pt(e)||!pt(t)||!Un(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Pe(e,{min:t,max:n,fallback:r}){const o=Number(e);if(!Number.isFinite(o))return r;const a=Math.floor(o);return a<t?t:a>n?n:a}function qo(e,t){const n=Pe(t,{min:0,max:1e6,fallback:0}),r=Pe(e,{min:1,max:Math.max(1,n||1),fallback:1});if(n<=1)return[1];const o=new Set([1,n,r-2,r-1,r,r+1,r+2]),a=Array.from(o).filter(c=>Number.isInteger(c)&&c>=1&&c<=n).sort((c,u)=>c-u),s=[];let l=null;for(const c of a)l!=null&&c-l>1&&s.push(null),s.push(c),l=c;return s}function Jo({page:e,totalPages:t}){const n=typeof t=="number"&&Number.isFinite(t)&&t>=0,r=n?Pe(t,{min:0,max:1e6,fallback:0}):null,o=Pe(e,{min:1,max:n?Math.max(1,r||1):1e6,fallback:1}),a=o>1,s=n?o<r:!0;return{canPrev:a,canNext:s,safePage:o,safeTotal:r}}function Qo({entries:e,me:t,meLabel:n,limit:r}){const o=Pe(r,{min:1,max:1e3,fallback:20}),a=Array.isArray(e)?e.slice(0,o):[],s=t&&typeof t.rank=="number"?t.rank:null,l=a.some(h=>!!h?.is_me);if(!s||l)return a;const c={rank:s,is_me:!0,display_name:n,avatar_url:null,gpt_tokens:t?.gpt_tokens??"0",claude_tokens:t?.claude_tokens??"0",gemini_tokens:t?.gemini_tokens??"0",cursor_tokens:t?.cursor_tokens??"0",opencode_tokens:t?.opencode_tokens??"0",openclaw_tokens:t?.openclaw_tokens??"0",hermes_tokens:t?.hermes_tokens??"0",kiro_tokens:t?.kiro_tokens??"0",copilot_tokens:t?.copilot_tokens??"0",other_tokens:t?.other_tokens??"0",total_tokens:t?.total_tokens??"0"},u=3,g=4,b=a.filter(h=>!h?.is_me).filter((h,w)=>w!==u).slice();return b.splice(Math.min(g,b.length),0,c),b.slice(0,o)}function ce({className:e}){return d.jsx("div",{className:_("rounded bg-oai-gray-200/70 dark:bg-oai-gray-800/70 animate-pulse",e)})}function Zo({index:e}){const t=e<3?"w-24":e<8?"w-20":"w-16",n=e<3?"w-16":"w-12",r=e<5?"w-14":"w-10";return d.jsxs("tr",{className:"group",children:[d.jsx("td",{className:_(jt(!1),"!group-hover:bg-transparent"),children:d.jsx(ce,{className:"h-4 w-6"})}),d.jsx("td",{className:_(At(!1),"!group-hover:bg-transparent"),children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx(ce,{className:"h-8 w-8 min-w-8 rounded-full"}),d.jsx(ce,{className:_("h-4",t)})]})}),d.jsx("td",{className:"px-4 py-4 bg-white dark:bg-oai-gray-950",children:d.jsx(ce,{className:_("h-4",n)})}),d.jsx("td",{className:"px-4 py-4 bg-white dark:bg-oai-gray-950",children:d.jsx(ce,{className:"h-4 w-12"})}),ut.map(o=>d.jsx("td",{className:"px-4 py-4 bg-white dark:bg-oai-gray-950",children:d.jsx(ce,{className:_("h-4",r)})},o.key))]})}function ea({rows:e=10}){return d.jsx("div",{className:"w-full overflow-x-auto",children:d.jsxs("table",{className:"min-w-max w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-oai-gray-200 dark:border-oai-gray-800",children:d.jsxs("tr",{children:[d.jsx("th",{className:_(mn,"font-medium text-oai-gray-500 dark:text-oai-gray-400"),children:d.jsx(ce,{className:"h-3.5 w-6"})}),d.jsx("th",{className:_(xn,"font-medium text-oai-gray-500 dark:text-oai-gray-400"),children:d.jsx(ce,{className:"h-3.5 w-12"})}),d.jsx("th",{className:"px-4 py-4",children:d.jsx(ce,{className:"h-3.5 w-10"})}),d.jsx("th",{className:"px-4 py-4",children:d.jsx(ce,{className:"h-3.5 w-14"})}),ut.map(t=>d.jsx("th",{className:"px-4 py-4",children:d.jsx(ce,{className:"h-3.5 w-12"})},t.key))]})}),d.jsx("tbody",{className:"divide-y divide-oai-gray-100 dark:divide-oai-gray-800/50",children:Array.from({length:e},(t,n)=>d.jsx(Zo,{index:n},n))})]})})}function ta({id:e,thClassName:t,children:n}){const{attributes:r,listeners:o,setNodeRef:a,transform:s,transition:l,isDragging:c}=Wo({id:e}),u=tt.Transform.toString(s)||"";i.useLayoutEffect(()=>{const f=document.querySelectorAll(`td[data-column-key="${e}"]`),b="0 2px 10px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(15, 23, 42, 0.06)";return f.forEach(h=>{h.style.transform=u,h.style.transition=l||"",h.style.zIndex=c?"20":"",h.style.position=u?"relative":"",h.style.boxShadow=c?b:""}),()=>{f.forEach(h=>{h.style.transform="",h.style.transition="",h.style.zIndex="",h.style.position="",h.style.boxShadow=""})}},[e,u,l,c]);const g={transform:u,transition:l,position:u?"relative":void 0,zIndex:c?20:void 0,boxShadow:c?"0 2px 10px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(15, 23, 42, 0.06)":void 0};return d.jsx("th",{ref:a,style:g,className:_(t,"group/col select-none cursor-grab active:cursor-grabbing touch-none"),...r,...o,children:d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx("span",{"aria-hidden":"true",className:_("-mr-1 inline-flex h-4 w-3 shrink-0 items-center justify-center text-oai-gray-400 dark:text-oai-gray-600","opacity-0 transition-opacity duration-150 group-hover/col:opacity-100",c&&"opacity-100"),children:d.jsxs("svg",{viewBox:"0 0 8 14",width:"8",height:"14",fill:"currentColor","aria-hidden":"true",children:[d.jsx("circle",{cx:"2",cy:"2",r:"1"}),d.jsx("circle",{cx:"6",cy:"2",r:"1"}),d.jsx("circle",{cx:"2",cy:"7",r:"1"}),d.jsx("circle",{cx:"6",cy:"7",r:"1"}),d.jsx("circle",{cx:"2",cy:"12",r:"1"}),d.jsx("circle",{cx:"6",cy:"12",r:"1"})]})}),n]})})}const Xn="tokentracker.leaderboard.columnOrder.v1";function na(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(Xn);if(!e)return null;const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):null}catch{return null}}function Nt(e){if(!(typeof window>"u"))try{window.localStorage.setItem(Xn,JSON.stringify(e))}catch{}}function fn(e,t){if(!e)return t;const n=new Set(t),r=e.filter(a=>n.has(a)),o=t.filter(a=>!r.includes(a));return[...r,...o]}function ra(e){const t=i.useMemo(()=>e.join("|"),[e]),[n,r]=i.useState(()=>fn(na(),e));i.useEffect(()=>{r(s=>{const l=fn(s,e);return l.length===s.length&&l.every((u,g)=>u===s[g])?s:(Nt(l),l)})},[t,e]);const o=i.useCallback((s,l)=>{!s||!l||s===l||r(c=>{const u=c.indexOf(s),g=c.indexOf(l);if(u===-1||g===-1)return c;const f=c.slice(),[b]=f.splice(u,1);return f.splice(g,0,b),Nt(f),f})},[]),a=i.useCallback(()=>{Nt(e),r(e)},[e]);return{order:n,reorder:o,reset:a}}const ct=20;function gn(e){const t=Number(e);return!Number.isFinite(t)||t<=0?"-":t>=1e3?`$${Math.round(t).toLocaleString()}`:t>=10?`$${Math.round(t)}`:`$${t.toFixed(2)}`}function hn(e,t,n){const r=t?"text-oai-gray-700 dark:text-oai-gray-300":"text-oai-gray-500 dark:text-oai-gray-400",o=t?"bg-oai-brand-50 dark:bg-oai-brand-900/10":"bg-white dark:bg-oai-gray-950 group-hover:bg-oai-gray-50 dark:group-hover:bg-oai-gray-900/60";return n.map(a=>d.jsx("td",{"data-column-key":a.key,className:_("px-4 py-4 whitespace-nowrap text-right tabular-nums",r,o),children:Et(e?.[a.key])},a.key))}const oa={1:{text:"text-amber-600 dark:text-amber-400",badge:"bg-amber-50 dark:bg-amber-900/20"},2:{text:"text-gray-500 dark:text-gray-300",badge:"bg-gray-50 dark:bg-gray-800/40"},3:{text:"text-orange-700 dark:text-orange-400",badge:"bg-orange-50 dark:bg-orange-900/20"}};function pn({rank:e,placeholder:t}){const n=oa[e];return n?d.jsx("span",{className:_("inline-flex items-center justify-center h-7 w-7 rounded-full text-xs font-bold",n.text,n.badge),children:e}):d.jsx("span",{className:"inline-flex items-center justify-center h-7 w-7 text-sm",children:e??t})}function _t(e){if(typeof e!="string")return null;const t=e.trim().toLowerCase();return t==="week"||t==="month"||t==="total"?t:null}function aa(e){if(!e)return M("shared.error.prefix",{error:M("leaderboard.error.unknown")});const t=e?.message||String(e),n=String(t||"").trim()||M("leaderboard.error.unknown");return M("shared.error.prefix",{error:n})}function Yn(e){return typeof e!="string"?"":e.trim()}function sa(e){const t=Yn(e);return t?t.toLowerCase()==="anonymous":!0}function ia(e,t=""){if(typeof e!="string")return null;const n=e.trim().toLowerCase();if(!n)return null;const r=new URLSearchParams(typeof t=="string"?t:""),o=_t(r.get("period")),a=o?`?period=${o}`:"";return`/share/pv1-${n}${a}`}function bn(e,t){const n=typeof e?.user_id=="string"?e.user_id.trim():"";return n||`${e?.rank??""}:${t}`}function da({auth:e,signedIn:t,sessionSoftExpired:n}){const r=qn(),o=Jn(),{openLoginModal:a}=Qn(),{signedIn:s,loading:l,user:c}=Zn(),u=i.useMemo(()=>er(),[]),g=tr(),f=t&&!n,b=i.useMemo(()=>f&&(typeof e=="function"||typeof e=="string"||e&&typeof e=="object")?e:null,[e,f]),h=f?b:null,w=f&&nr(h),m=M("shared.placeholder.short"),x=i.useMemo(()=>ut.map(p=>p.key),[]),{order:v,reorder:k,reset:y}=ra(x),C=i.useMemo(()=>{const p=new Map;for(const E of ut)p.set(E.key,E);return p},[]),N=i.useMemo(()=>v.map(p=>C.get(p)).filter(Boolean),[v,C]),j=i.useMemo(()=>v.every((p,E)=>p===x[E]),[v,x]),S=wr(Qt(Yt,{activationConstraint:{distance:6}}),Qt(Ut,{coordinateGetter:Vo})),D=i.useCallback(p=>{const{active:E,over:W}=p;!W||E.id===W.id||k(String(E.id),String(W.id))},[k]),[T,L]=i.useState(1),[I,H]=i.useState(0),[O,K]=i.useState(()=>({loading:!1,error:null,data:null})),[ke,Te]=i.useState(()=>rr()),[F,je]=i.useState(!1),[te,Se]=i.useState(!1),q=i.useMemo(()=>{const p=new URLSearchParams(r?.search||"");return _t(p.get("period"))||"total"},[r?.search]),U=r?.search||"",se=p=>{const E=_t(p);if(!E||E===q)return;const W=new URLSearchParams(r?.search||"");W.set("period",E),L(1),o(`${r?.pathname||"/leaderboard"}?${W.toString()}`,{replace:!0})};i.useEffect(()=>{l||g||s||a()},[s,l,g,a]),i.useEffect(()=>{L(1)},[q]);const ue=i.useMemo(()=>(Pe(T,{min:1,max:1e6,fallback:1})-1)*ct,[T]);i.useEffect(()=>{if(!u&&!g)return;let p=!0;return K(E=>({...E,loading:!0,error:null})),(async()=>{const E=await or({userId:c?.id||null,period:q,limit:ct,offset:ue});p&&K({loading:!1,error:null,data:E})})().catch(E=>{p&&K({loading:!1,error:aa(E),data:null})}),()=>{p=!1}},[u,c?.id,ue,I,g,q]);const Y=O.data,z=Y?.total_pages??null,ne=Y?.page??T,fe=i.useMemo(()=>qo(ne,z),[ne,z]),re=Y?.from||null,A=Y?.to||null,Ce=Y?.generated_at||null,J=Y?.me||null,ge=M("leaderboard.me_label"),ie=M("leaderboard.anon_label"),ve=M("leaderboard.period.week"),ye=M("leaderboard.period.month"),Fe=M("leaderboard.period.total"),Ue=q==="month"?ye:q==="total"?Fe:ve,Ae=i.useMemo(()=>{const p=Array.isArray(Y?.entries)?Y.entries:[];return ne!==1?p:Qo({entries:p,me:J,meLabel:ge,limit:ct})},[ne,Y?.entries,J,ge]),he=async()=>{je(!0);try{ar(!0),Te(!0),await Vt(()=>kt(h));const p=await kt(h);p&&await Gt({accessToken:p}),H(E=>E+1)}catch(p){console.warn("[tokentracker] sync:",p)}finally{je(!1)}},Le=async()=>{Se(!0);try{const p=await kt(h);ke&&p&&await Vt(()=>Promise.resolve(p)),p&&await Gt({accessToken:p}),H(E=>E+1)}catch(p){console.warn("[tokentracker] refresh:",p)}finally{Se(!1)}},{canPrev:Me,canNext:Xe}=Jo({page:ne,totalPages:z}),st=Array.isArray(Ae)&&Ae.length!==0;let Ie=null;O.loading?Ie=d.jsx(ea,{rows:ct}):O.error?Ie=d.jsx("div",{className:"px-6 py-12 text-center",children:d.jsx("p",{className:"text-sm text-red-500 dark:text-red-400",children:O.error})}):st?Ie=d.jsx(Co,{sensors:S,collisionDetection:Sr,modifiers:[Io],onDragEnd:D,children:d.jsx("div",{className:"w-full overflow-x-auto",children:d.jsxs("table",{className:"min-w-max w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-oai-gray-200 dark:border-oai-gray-800",children:d.jsxs("tr",{children:[d.jsx("th",{className:_(mn,"text-[11px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500"),children:M("leaderboard.column.rank")}),d.jsx("th",{className:_(xn,"text-[11px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500"),children:M("leaderboard.column.user")}),d.jsx("th",{className:"px-4 py-4 text-[11px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500 whitespace-nowrap text-right align-middle",children:M("leaderboard.column.total")}),d.jsx("th",{className:"px-4 py-4 text-[11px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500 whitespace-nowrap text-right align-middle",title:"Based on estimated API pricing, not actual billing",children:"Est. Cost"}),d.jsx(Bo,{items:v,strategy:_o,children:N.map(p=>d.jsx(ta,{id:p.key,thClassName:"px-4 py-4 text-[11px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500 whitespace-nowrap align-middle",children:d.jsx(sr,{iconSrc:p.icon,label:M(p.copyKey)})},p.key))})]})}),d.jsx("tbody",{className:"divide-y divide-oai-gray-100 dark:divide-oai-gray-800/50",children:Ae.map(p=>{const E=!!p?.is_me,W=typeof p?.user_id=="string"?p.user_id:null,We=Yn(p?.display_name),pe=sa(We)?ie:We,le=E?ge:pe;return!!W&&!E&&!!p?.is_public&&ia(W,U),E?d.jsxs("tr",{className:"border-y border-oai-brand-300/40 dark:border-oai-brand-500/30 bg-oai-brand-50 dark:bg-oai-brand-900/10 transition-colors",children:[d.jsx("td",{className:_(jt(!0),"font-semibold text-oai-brand-600 dark:text-oai-brand-400"),children:d.jsx(pn,{rank:p?.rank,placeholder:m})}),d.jsx("td",{className:At(!0),children:d.jsxs("div",{className:"flex min-w-0 max-w-[min(160px,40vw)] items-center gap-4",children:[d.jsx(qt,{avatarUrl:p?.avatar_url,displayName:le,seed:bn(p,le)}),d.jsx("span",{className:"truncate font-semibold text-oai-black dark:text-oai-white",children:le})]})}),d.jsx("td",{className:"px-4 py-4 font-medium text-oai-black dark:text-oai-white whitespace-nowrap text-right tabular-nums bg-oai-brand-50 dark:bg-oai-brand-900/10",children:Et(p?.total_tokens)}),d.jsx("td",{className:"px-4 py-4 font-medium text-oai-brand-600 dark:text-oai-brand-400 whitespace-nowrap text-right tabular-nums bg-oai-brand-50 dark:bg-oai-brand-900/10",title:"Based on estimated API pricing, not actual billing",children:gn(p?.estimated_cost_usd)}),hn(p,!0,N)]},`row-${p?.rank}-${le}`):d.jsxs("tr",{className:"group transition-colors",children:[d.jsx("td",{className:_(jt(!1),"font-medium text-oai-gray-500 dark:text-oai-gray-400"),children:d.jsx(pn,{rank:p?.rank,placeholder:m})}),d.jsx("td",{className:At(!1),children:d.jsxs("div",{className:"flex min-w-0 max-w-[min(160px,40vw)] items-center gap-4",children:[d.jsx(qt,{avatarUrl:p?.avatar_url,displayName:le,seed:bn(p,le)}),d.jsx("span",{className:"truncate font-medium text-oai-gray-800 dark:text-oai-gray-200",children:le})]})}),d.jsx("td",{className:"px-4 py-4 font-semibold text-oai-gray-800 dark:text-oai-gray-200 whitespace-nowrap text-right tabular-nums bg-white dark:bg-oai-gray-950 group-hover:bg-oai-gray-50 dark:group-hover:bg-oai-gray-900/60",children:Et(p?.total_tokens)}),d.jsx("td",{className:"px-4 py-4 text-oai-gray-500 dark:text-oai-gray-400 whitespace-nowrap text-right tabular-nums bg-white dark:bg-oai-gray-950 group-hover:bg-oai-gray-50 dark:group-hover:bg-oai-gray-900/60",title:"Based on estimated API pricing, not actual billing",children:gn(p?.estimated_cost_usd)}),hn(p,!1,N)]},`row-${p?.rank}-${le}`)})})]})})}):Ie=d.jsx("div",{className:"px-6 py-12 text-center",children:d.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-400",children:M("leaderboard.empty")})});let Ye=null;return typeof z=="number"?Ye=fe.map((p,E)=>p==null?d.jsx("span",{className:"px-2 text-oai-gray-400 dark:text-oai-gray-500",children:M("leaderboard.pagination.ellipsis")},`ellipsis-${E}`):d.jsx("button",{className:_("flex h-8 w-8 items-center justify-center rounded-md text-sm font-medium transition-colors",p===ne?"bg-oai-gray-200 dark:bg-oai-gray-800 text-oai-black dark:text-white":"text-oai-gray-500 dark:text-oai-gray-400 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white"),onClick:()=>L(p),disabled:O.loading,children:String(p)},`page-${p}`)):Ye=d.jsx("span",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-400",children:M("leaderboard.pagination.page_unknown",{page:String(ne)})}),d.jsxs("div",{className:"flex flex-col flex-1 text-oai-black dark:text-oai-white font-oai antialiased",children:[d.jsx("main",{className:"flex-1 pt-8 sm:pt-10 pb-12 sm:pb-16",children:d.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[d.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6 mb-8",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl sm:text-4xl font-semibold tracking-tight text-oai-black dark:text-white mb-3",children:M("leaderboard.title")}),d.jsxs("p",{className:"text-oai-gray-500 dark:text-oai-gray-400 text-sm sm:text-base",children:[q==="total"?M("leaderboard.range.total"):re&&A?M("leaderboard.range",{period:Ue,from:re,to:A}):M("leaderboard.range_loading",{period:Ue}),Ce&&d.jsx("span",{className:"ml-2 pl-2 border-l border-oai-gray-200 dark:border-oai-gray-800 inline-block text-oai-gray-400 dark:text-oai-gray-500 text-xs",children:M("leaderboard.generated_at",{ts:Ce})})]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[!j&&d.jsx("button",{onClick:y,title:M("leaderboard.columns.reset_hint"),className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-black dark:hover:text-white transition-colors",children:M("leaderboard.columns.reset")}),f&&w&&d.jsx("button",{onClick:Le,disabled:te||O.loading,className:"text-sm text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-black dark:hover:text-white transition-colors disabled:opacity-50",children:te?"Refreshing...":"↻"}),d.jsx("div",{className:"inline-flex p-1 border border-oai-gray-200 dark:border-oai-gray-800 rounded-lg",children:["week","month","total"].map(p=>d.jsx("button",{onClick:()=>se(p),disabled:O.loading,className:_("px-4 py-1.5 text-sm font-medium rounded-md transition-colors",q===p?"bg-oai-gray-200 dark:bg-oai-gray-800 text-oai-black dark:text-white":"text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-800 dark:hover:text-oai-gray-200"),children:p==="week"?ve:p==="month"?ye:Fe},p))})]})]}),!t&&d.jsxs("div",{className:"mb-6 flex items-center justify-between text-sm",children:[d.jsx("p",{className:"text-oai-gray-500 dark:text-oai-gray-400",children:"Sign in to join the leaderboard"}),d.jsx("button",{onClick:a,className:"px-3 py-1.5 text-sm font-medium text-oai-gray-600 dark:text-oai-gray-300 border border-oai-gray-300 dark:border-oai-gray-700 rounded-md hover:text-oai-black dark:hover:text-white hover:border-oai-gray-400 dark:hover:border-oai-gray-600 transition-colors",children:"Sign In"})]}),f&&w&&!ke&&d.jsxs("div",{className:"mb-6 flex items-center justify-between text-sm",children:[d.jsx("p",{className:"text-oai-gray-500 dark:text-oai-gray-400",children:"Enable Cloud Sync to appear in rankings"}),d.jsx("button",{onClick:he,disabled:F,className:"px-3 py-1.5 text-sm font-medium text-oai-gray-600 dark:text-oai-gray-300 border border-oai-gray-300 dark:border-oai-gray-700 rounded-md hover:text-oai-black dark:hover:text-white hover:border-oai-gray-400 dark:hover:border-oai-gray-600 disabled:opacity-50 transition-colors",children:F?"Syncing...":"Enable & Sync"})]}),d.jsxs("div",{className:"rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",children:[Ie,d.jsxs("div",{className:"px-6 py-3 border-t border-oai-gray-200 dark:border-oai-gray-800 flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{className:_("px-3 py-1.5 text-sm font-medium text-oai-gray-500 dark:text-oai-gray-400 rounded-md transition-colors",Me&&!O.loading?"hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white":"opacity-50 cursor-not-allowed"),onClick:()=>L(p=>Math.max(1,p-1)),disabled:!Me||O.loading,children:M("leaderboard.pagination.prev")}),d.jsx("button",{className:_("px-3 py-1.5 text-sm font-medium text-oai-gray-500 dark:text-oai-gray-400 rounded-md transition-colors",Xe&&!O.loading?"hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white":"opacity-50 cursor-not-allowed"),onClick:()=>L(p=>p+1),disabled:!Xe||O.loading,children:M("leaderboard.pagination.next")})]}),d.jsx("div",{className:"flex flex-wrap items-center gap-1",children:Ye})]})]})]})}),d.jsx("footer",{className:"border-t border-oai-gray-200 dark:border-oai-gray-900 py-8 transition-colors duration-200",children:d.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between px-4 sm:px-6 text-sm text-oai-gray-400 dark:text-oai-gray-500",children:[d.jsx("p",{children:M("landing.v2.footer.line")}),d.jsx("a",{href:"https://github.com/mm7894215/TokenTracker",className:"text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",target:"_blank",rel:"noopener noreferrer",children:M("landing.v2.nav.github")})]})})]})}export{da as LeaderboardPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ad as l,D as n,az as i}from"./main-XWVaG1Bp.js";function y(r){let e=0;const o=String(r??"");for(let a=0;a<o.length;a+=1)e=Math.imul(31,e)+o.charCodeAt(a)|0;return Math.abs(e)%360}function m(r){const e=String(r??"").trim();if(!e)return"?";const o=e.split(/\s+/).filter(Boolean);if(o.length>=2){const a=o[0][0]||"",t=o[1][0]||"";return`${a}${t}`.toUpperCase()}return e.slice(0,2).toUpperCase()}const g={sm:"h-7 w-7 min-h-7 min-w-7 text-[10px]",md:"h-8 w-8 min-h-8 min-w-8 text-[11px]",lg:"h-14 w-14 min-h-14 min-w-14 text-base"};function k({avatarUrl:r,displayName:e,seed:o,size:a="md",className:t}){const d=g[a]||g.md,b=y(o??e??""),s=typeof r=="string"?r.trim():"",[p,c]=l.useState(!1);return l.useEffect(()=>{c(!1)},[s]),s&&!p?n.jsx("img",{src:s,alt:"",referrerPolicy:"no-referrer",onError:()=>c(!0),className:i("rounded-full object-cover ring-1 ring-white/10",d,t)}):n.jsx("div",{className:i("flex shrink-0 items-center justify-center rounded-full font-semibold text-white ring-1 ring-white/10",d,t),style:{backgroundColor:`hsl(${b} 42% 34%)`},"aria-hidden":!0,children:m(e)})}function h({iconSrc:r,label:e}){return n.jsxs("span",{className:"inline-flex items-center gap-3",children:[r?n.jsx("img",{src:r,alt:"",width:16,height:16,className:`h-4 w-4 shrink-0 object-contain opacity-90 ${r==="/brand-logos/cursor.svg"?"dark:invert":""}`}):null,n.jsx("span",{className:"whitespace-nowrap",children:e})]})}const x=[{key:"gpt_tokens",copyKey:"leaderboard.column.codex",icon:"/brand-logos/codex.svg"},{key:"claude_tokens",copyKey:"leaderboard.column.claude",icon:"/brand-logos/claude-code.svg"},{key:"gemini_tokens",copyKey:"leaderboard.column.gemini",icon:"/brand-logos/gemini.svg"},{key:"cursor_tokens",copyKey:"leaderboard.column.cursor",icon:"/brand-logos/cursor.svg"},{key:"kiro_tokens",copyKey:"leaderboard.column.kiro",icon:"/brand-logos/kiro.svg"},{key:"copilot_tokens",copyKey:"leaderboard.column.copilot",icon:"/brand-logos/copilot.svg"},{key:"opencode_tokens",copyKey:"leaderboard.column.opencode",icon:"/brand-logos/opencode.svg"},{key:"openclaw_tokens",copyKey:"leaderboard.column.openclaw",icon:"/brand-logos/openclaw.svg"},{key:"hermes_tokens",copyKey:"leaderboard.column.hermes",icon:null},{key:"other_tokens",copyKey:"leaderboard.column.supplemental",icon:null}],w="sticky left-0 z-40 w-[72px] min-w-[72px] max-w-[72px] border-r border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 px-4 py-4 align-middle",f="sticky left-[72px] z-40 min-w-[140px] max-w-[min(180px,35vw)] border-r border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 px-4 py-4 align-middle",_="sticky left-[72px] z-40 min-w-[6rem] border-r border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 px-4 py-4";function v(r){return i("sticky left-0 z-30 w-[72px] min-w-[72px] max-w-[72px] border-r border-oai-gray-200 dark:border-oai-gray-800 px-4 py-4 whitespace-nowrap",r?"bg-oai-brand-50 dark:bg-oai-brand-900/10":"bg-white dark:bg-oai-gray-950 group-hover:bg-oai-gray-50 dark:group-hover:bg-oai-gray-900/60")}function K(r){return i("sticky left-[72px] z-30 min-w-[140px] max-w-[min(180px,35vw)] border-r border-oai-gray-200 dark:border-oai-gray-800 px-4 py-4 min-w-0",r?"bg-oai-brand-50 dark:bg-oai-brand-900/10":"bg-white dark:bg-oai-gray-950 group-hover:bg-oai-gray-50 dark:group-hover:bg-oai-gray-900/60")}function T(r){return i("sticky left-[72px] z-30 min-w-[6rem] border-r border-oai-gray-200 dark:border-oai-gray-800 px-4 py-4 whitespace-nowrap","bg-white dark:bg-oai-gray-950")}export{w as L,f as a,x as b,K as c,h as d,k as e,T as f,_ as g,v as l};
|