tokentracker-cli 0.5.69 → 0.5.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/README.md +3 -2
  2. package/dashboard/dist/assets/{Card-ClNKd74W.js → Card-5ebScQbM.js} +1 -1
  3. package/dashboard/dist/assets/{DashboardPage-DiUhik_k.js → DashboardPage-B32RhUB1.js} +2 -2
  4. package/dashboard/dist/assets/{FadeIn-c2wFBL_u.js → FadeIn-CHjFUAEe.js} +1 -1
  5. package/dashboard/dist/assets/{IpCheckPage-UPn-zQGB.js → IpCheckPage-CrbKufId.js} +1 -1
  6. package/dashboard/dist/assets/{LeaderboardPage-ZpuPopCf.js → LeaderboardPage-CVKBhGzY.js} +2 -2
  7. package/dashboard/dist/assets/{LeaderboardProfilePage-C62TdxVy.js → LeaderboardProfilePage-CbpzxvLA.js} +1 -1
  8. package/dashboard/dist/assets/{LimitsPage-CQEaB_b2.js → LimitsPage-BwQ4isbM.js} +1 -1
  9. package/dashboard/dist/assets/{SettingsPage-8RdfHCcA.js → SettingsPage-Y3Znzs1i.js} +1 -1
  10. package/dashboard/dist/assets/{WidgetsPage-DiKFOpFH.js → WidgetsPage-tNojCBaj.js} +1 -1
  11. package/dashboard/dist/assets/{download-BmThIfGZ.js → download-CQASvwEL.js} +1 -1
  12. package/dashboard/dist/assets/leaderboard-columns-DFG1TWe9.js +1 -0
  13. package/dashboard/dist/assets/{main-D49FUfq7.js → main-Cv6YpYdZ.js} +16 -15
  14. package/dashboard/dist/assets/{use-limits-display-prefs-BHo0gzBa.js → use-limits-display-prefs-BUrHqTkA.js} +1 -1
  15. package/dashboard/dist/assets/{use-usage-limits-BGttWixw.js → use-usage-limits-D-gv2i1R.js} +1 -1
  16. package/dashboard/dist/brand-logos/kimi.svg +1 -0
  17. package/dashboard/dist/index.html +1 -1
  18. package/dashboard/dist/share.html +1 -1
  19. package/package.json +1 -1
  20. package/src/commands/init.js +11 -0
  21. package/src/commands/status.js +9 -0
  22. package/src/commands/sync.js +26 -0
  23. package/src/lib/rollout.js +172 -0
  24. package/dashboard/dist/assets/leaderboard-columns-9wPbwNaz.js +0 -1
@@ -1 +1 @@
1
- import{e as w,D as e,B as n,aT as b,aW as j,r as h,a_ as k,az as v}from"./main-D49FUfq7.js";import{F as f,S as N,a as W}from"./FadeIn-c2wFBL_u.js";import{D as S}from"./download-BmThIfGZ.js";const F=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],C=w("arrow-up-right",F),M=264,A=124,c="ui-rounded, -apple-system, system-ui",m=["#5A8CF2","#9973E6","#4DB8A6","#E68C59"],D={claude:"#C77DFF",codex:"#34C759",cursor:"#FFCC00",gemini:"#0A84FF"};function _(a){return a>=.9?"#E64D4D":a>=.7?"#D9A633":"#33B866"}function g({size:a="sm",children:r}){const s=a==="lg",i=s?560:264,l=s?32:22;return e.jsx("div",{className:v("flex w-full items-center justify-center rounded-xl bg-oai-gray-100 dark:bg-oai-gray-950/60",s?"py-10 sm:py-14 px-6":"py-6 px-4"),children:e.jsx("div",{className:"overflow-hidden bg-white dark:bg-oai-gray-800 shadow-oai-md dark:shadow-[0_2px_4px_rgba(0,0,0,0.4),0_8px_24px_rgba(0,0,0,0.5)]",style:{width:"100%",maxWidth:i,aspectRatio:`${M} / ${A}`,borderRadius:l},children:r})})}function z({size:a="sm"}){const r="M0,104 L14,104 C26,98 34,100 44,96 S58,88 68,92 80,100 90,94 102,80 112,82 126,92 136,88 150,74 162,76 178,88 188,86 204,72 216,74 236,84 250,80 L264,80",s=`${r} L264,124 L0,124 Z`,i=`sparkArea-${a}`;return e.jsx(g,{size:a,children:e.jsxs("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:i,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#0A84FF",stopOpacity:"0.18"}),e.jsx("stop",{offset:"100%",stopColor:"#0A84FF",stopOpacity:"0"})]})}),e.jsx("text",{x:"14",y:"20",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"700",letterSpacing:"0.6",children:"TODAY"}),e.jsx("text",{x:"14",y:"46",className:"fill-oai-black dark:fill-white",fontSize:"22",fontWeight:"700",fontFamily:c,children:"203.2M"}),e.jsx("text",{x:"14",y:"60",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:c,children:"$129.56 ±0%"}),e.jsx("text",{x:"134",y:"20",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"700",letterSpacing:"0.6",children:"7 DAYS"}),e.jsx("text",{x:"134",y:"46",className:"fill-oai-black dark:fill-white",fontSize:"22",fontWeight:"700",fontFamily:c,children:"880.9M"}),e.jsx("text",{x:"134",y:"60",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:c,children:"$673.61"}),e.jsx("path",{d:s,fill:`url(#${i})`,stroke:"none"}),e.jsx("path",{d:r,fill:"none",stroke:"#0A84FF",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})})}const u=(()=>{const s=[];for(let i=0;i<26;i++)for(let l=0;l<7;l++){const t=Math.sin((i+1)*12.9898+(l+1)*78.233+17)*43758.5453,d=Math.floor(Math.abs(t-Math.floor(t))*100);s.push({w:i,d:l,v:d})}return s})();function p(a,r){return a<18?r?"#262626":"#e5e5e5":a<38?"rgba(10, 132, 255, 0.28)":a<58?"rgba(10, 132, 255, 0.50)":a<80?"rgba(10, 132, 255, 0.75)":"#0A84FF"}function E(){return e.jsx(g,{children:e.jsxs("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:[e.jsx("g",{transform:`translate(${19.5}, 10)`,className:"hidden dark:inline",children:u.map(t=>e.jsx("rect",{x:t.w*(7.5+1.2),y:t.d*(8+1.2),width:7.5,height:8,rx:"1.3",fill:p(t.v,!0)},`d-${t.w}-${t.d}`))}),e.jsx("g",{transform:`translate(${19.5}, 10)`,className:"dark:hidden",children:u.map(t=>e.jsx("rect",{x:t.w*(7.5+1.2),y:t.d*(8+1.2),width:7.5,height:8,rx:"1.3",fill:p(t.v,!1)},`l-${t.w}-${t.d}`))}),e.jsx("text",{x:19.5,y:"102",className:"fill-oai-black dark:fill-white",fontSize:"10",fontWeight:"700",fontFamily:c,children:"10.3B"}),e.jsx("text",{x:19.5+30,y:"102",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"9",fontWeight:"500",children:"tokens · 202 active days"})]})})}function $(){const a=[{name:"claude-opus-4-6",value:"586.4M",pct:59},{name:"claude-sonnet-4-5-20250929",value:"218.7M",pct:22},{name:"gpt-5.4",value:"80.6M",pct:8},{name:"composer-2-fast",value:"52.1M",pct:5}],r=22,s=28,i=14,l=236;return e.jsx(g,{children:e.jsx("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:a.map((t,d)=>{const o=s+d*r,x=m[d%m.length];return e.jsxs("g",{children:[e.jsx("circle",{cx:"18",cy:o-3,r:"2.5",fill:x}),e.jsx("text",{x:"26",y:o,className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"500",children:t.name}),e.jsx("text",{x:"218",y:o,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"9",fontWeight:"600",fontFamily:c,children:t.value}),e.jsxs("text",{x:"250",y:o,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"600",fontFamily:c,children:[t.pct,"%"]}),e.jsx("rect",{x:i,y:o+4,width:l,height:"2.8",rx:"1.4",className:"fill-oai-gray-200 dark:fill-oai-gray-700"}),e.jsx("rect",{x:i,y:o+4,width:Math.max(l*(t.pct/100),4),height:"2.8",rx:"1.4",fill:x})]},t.name)})})})}function L(){const a=[{label:"Claude · 7d",source:"claude",reset:"in 1d",pct:61},{label:"Claude · 5h",source:"claude",reset:"in 4h 28m",pct:4},{label:"Cursor",source:"cursor",reset:"in 25d",pct:51},{label:"Codex · weekly",source:"codex",reset:"in 1d",pct:32}],r=22,s=28,i=14,l=236;return e.jsx(g,{children:e.jsx("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:a.map((t,d)=>{const o=s+d*r,x=D[t.source],y=_(t.pct/100);return e.jsxs("g",{children:[e.jsx("circle",{cx:"18",cy:o-3,r:"2.5",fill:x}),e.jsx("text",{x:"26",y:o,className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"500",children:t.label}),e.jsx("text",{x:"218",y:o,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:c,children:t.reset}),e.jsxs("text",{x:"250",y:o,textAnchor:"end",className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"700",fontFamily:c,children:[t.pct,"%"]}),e.jsx("rect",{x:i,y:o+4,width:l,height:"2.8",rx:"1.4",className:"fill-oai-gray-200 dark:fill-oai-gray-700"}),e.jsx("rect",{x:i,y:o+4,width:Math.max(l*(t.pct/100),4),height:"2.8",rx:"1.4",fill:y})]},t.label)})})})}function P(){const[a,r]=h.useState("loading");return h.useEffect(()=>{if(typeof window>"u")return;if(k()){r("native");return}const s=(navigator.userAgent||"").toLowerCase(),i=/mac/.test(s)&&!/iphone|ipad/.test(s);r(i?"mac-web":"other")},[]),a}function O(){const a=P();return a==="loading"?e.jsx("div",{className:"h-10 w-40","aria-hidden":"true"}):a==="native"?e.jsxs("button",{type:"button",onClick:()=>b("openWidgetGallery"),className:"inline-flex h-10 items-center gap-2 rounded-lg bg-oai-black px-4 text-sm font-medium text-white transition-colors hover:bg-oai-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:bg-white dark:text-oai-black dark:hover:bg-oai-gray-200",children:[n("widgets.cta.open_gallery"),e.jsx(C,{className:"h-4 w-4","aria-hidden":"true"})]}):a==="mac-web"?e.jsxs("a",{href:"https://github.com/mm7894215/TokenTracker/releases/latest",target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-10 items-center gap-2 rounded-lg bg-oai-black px-4 text-sm font-medium text-white no-underline transition-colors hover:bg-oai-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:bg-white dark:text-oai-black dark:hover:bg-oai-gray-200",children:[e.jsx(S,{className:"h-4 w-4","aria-hidden":"true"}),n("widgets.cta.download")]}):e.jsxs("span",{className:"inline-flex h-10 items-center gap-2 rounded-lg border border-oai-gray-200 bg-oai-gray-50 px-4 text-sm font-medium text-oai-gray-500 dark:border-oai-gray-800 dark:bg-oai-gray-900 dark:text-oai-gray-400",children:[e.jsx(j,{className:"h-4 w-4","aria-hidden":"true"}),n("widgets.cta.macos_only")]})}const H=[{id:"heatmap",Preview:E,nameKey:"widgets.heatmap.name",descKey:"widgets.heatmap.description"},{id:"topModels",Preview:$,nameKey:"widgets.topModels.name",descKey:"widgets.topModels.description"},{id:"limits",Preview:L,nameKey:"widgets.limits.name",descKey:"widgets.limits.description"}];function G(){return e.jsx("div",{className:"flex flex-col flex-1 text-oai-black dark:text-oai-white font-oai antialiased",children:e.jsx("main",{className:"flex-1 pt-8 sm:pt-10 pb-12 sm:pb-16",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 sm:px-6",children:[e.jsx(f,{y:12,children:e.jsxs("header",{className:"mb-10 flex flex-col gap-6 sm:mb-14 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"mb-3 text-3xl font-semibold tracking-tight text-oai-black dark:text-white sm:text-4xl",children:n("widgets.page.title")}),e.jsx("p",{className:"max-w-xl text-sm text-oai-gray-500 dark:text-oai-gray-400 sm:text-base",children:n("widgets.page.subtitle")})]}),e.jsx("div",{className:"shrink-0",children:e.jsx(O,{})})]})}),e.jsx(f,{y:16,delay:.08,children:e.jsxs("section",{className:"mb-14 sm:mb-16","aria-label":n("widgets.hero.aria"),children:[e.jsx(z,{size:"lg"}),e.jsx("p",{className:"mt-5 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:n("widgets.hero.annotation")})]})}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-5 text-xs font-semibold uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-400",children:n("widgets.section.more")}),e.jsx(N,{staggerDelay:.08,initialDelay:.12,children:e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3 sm:gap-5",children:H.map(({id:a,Preview:r,nameKey:s,descKey:i})=>e.jsx(W,{children:e.jsxs("article",{className:"rounded-xl border border-oai-gray-200 bg-white p-4 transition-colors duration-200 dark:border-oai-gray-800 dark:bg-oai-gray-900 sm:p-5",children:[e.jsx(r,{}),e.jsxs("div",{className:"mt-4",children:[e.jsx("h3",{className:"text-[15px] font-semibold text-oai-black dark:text-white",children:n(s)}),e.jsx("p",{className:"mt-1.5 text-sm leading-relaxed text-oai-gray-500 dark:text-oai-gray-400",children:n(i)})]})]})},a))})})]})]})})})}export{G as WidgetsPage};
1
+ import{e as w,D as e,B as n,aT as b,aW as j,r as h,a_ as k,az as v}from"./main-Cv6YpYdZ.js";import{F as f,S as N,a as W}from"./FadeIn-CHjFUAEe.js";import{D as S}from"./download-CQASvwEL.js";const F=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],C=w("arrow-up-right",F),M=264,A=124,c="ui-rounded, -apple-system, system-ui",m=["#5A8CF2","#9973E6","#4DB8A6","#E68C59"],D={claude:"#C77DFF",codex:"#34C759",cursor:"#FFCC00",gemini:"#0A84FF"};function _(a){return a>=.9?"#E64D4D":a>=.7?"#D9A633":"#33B866"}function g({size:a="sm",children:r}){const s=a==="lg",i=s?560:264,l=s?32:22;return e.jsx("div",{className:v("flex w-full items-center justify-center rounded-xl bg-oai-gray-100 dark:bg-oai-gray-950/60",s?"py-10 sm:py-14 px-6":"py-6 px-4"),children:e.jsx("div",{className:"overflow-hidden bg-white dark:bg-oai-gray-800 shadow-oai-md dark:shadow-[0_2px_4px_rgba(0,0,0,0.4),0_8px_24px_rgba(0,0,0,0.5)]",style:{width:"100%",maxWidth:i,aspectRatio:`${M} / ${A}`,borderRadius:l},children:r})})}function z({size:a="sm"}){const r="M0,104 L14,104 C26,98 34,100 44,96 S58,88 68,92 80,100 90,94 102,80 112,82 126,92 136,88 150,74 162,76 178,88 188,86 204,72 216,74 236,84 250,80 L264,80",s=`${r} L264,124 L0,124 Z`,i=`sparkArea-${a}`;return e.jsx(g,{size:a,children:e.jsxs("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:i,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#0A84FF",stopOpacity:"0.18"}),e.jsx("stop",{offset:"100%",stopColor:"#0A84FF",stopOpacity:"0"})]})}),e.jsx("text",{x:"14",y:"20",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"700",letterSpacing:"0.6",children:"TODAY"}),e.jsx("text",{x:"14",y:"46",className:"fill-oai-black dark:fill-white",fontSize:"22",fontWeight:"700",fontFamily:c,children:"203.2M"}),e.jsx("text",{x:"14",y:"60",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:c,children:"$129.56 ±0%"}),e.jsx("text",{x:"134",y:"20",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"700",letterSpacing:"0.6",children:"7 DAYS"}),e.jsx("text",{x:"134",y:"46",className:"fill-oai-black dark:fill-white",fontSize:"22",fontWeight:"700",fontFamily:c,children:"880.9M"}),e.jsx("text",{x:"134",y:"60",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:c,children:"$673.61"}),e.jsx("path",{d:s,fill:`url(#${i})`,stroke:"none"}),e.jsx("path",{d:r,fill:"none",stroke:"#0A84FF",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})})}const u=(()=>{const s=[];for(let i=0;i<26;i++)for(let l=0;l<7;l++){const t=Math.sin((i+1)*12.9898+(l+1)*78.233+17)*43758.5453,d=Math.floor(Math.abs(t-Math.floor(t))*100);s.push({w:i,d:l,v:d})}return s})();function p(a,r){return a<18?r?"#262626":"#e5e5e5":a<38?"rgba(10, 132, 255, 0.28)":a<58?"rgba(10, 132, 255, 0.50)":a<80?"rgba(10, 132, 255, 0.75)":"#0A84FF"}function E(){return e.jsx(g,{children:e.jsxs("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:[e.jsx("g",{transform:`translate(${19.5}, 10)`,className:"hidden dark:inline",children:u.map(t=>e.jsx("rect",{x:t.w*(7.5+1.2),y:t.d*(8+1.2),width:7.5,height:8,rx:"1.3",fill:p(t.v,!0)},`d-${t.w}-${t.d}`))}),e.jsx("g",{transform:`translate(${19.5}, 10)`,className:"dark:hidden",children:u.map(t=>e.jsx("rect",{x:t.w*(7.5+1.2),y:t.d*(8+1.2),width:7.5,height:8,rx:"1.3",fill:p(t.v,!1)},`l-${t.w}-${t.d}`))}),e.jsx("text",{x:19.5,y:"102",className:"fill-oai-black dark:fill-white",fontSize:"10",fontWeight:"700",fontFamily:c,children:"10.3B"}),e.jsx("text",{x:19.5+30,y:"102",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"9",fontWeight:"500",children:"tokens · 202 active days"})]})})}function $(){const a=[{name:"claude-opus-4-6",value:"586.4M",pct:59},{name:"claude-sonnet-4-5-20250929",value:"218.7M",pct:22},{name:"gpt-5.4",value:"80.6M",pct:8},{name:"composer-2-fast",value:"52.1M",pct:5}],r=22,s=28,i=14,l=236;return e.jsx(g,{children:e.jsx("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:a.map((t,d)=>{const o=s+d*r,x=m[d%m.length];return e.jsxs("g",{children:[e.jsx("circle",{cx:"18",cy:o-3,r:"2.5",fill:x}),e.jsx("text",{x:"26",y:o,className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"500",children:t.name}),e.jsx("text",{x:"218",y:o,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"9",fontWeight:"600",fontFamily:c,children:t.value}),e.jsxs("text",{x:"250",y:o,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"600",fontFamily:c,children:[t.pct,"%"]}),e.jsx("rect",{x:i,y:o+4,width:l,height:"2.8",rx:"1.4",className:"fill-oai-gray-200 dark:fill-oai-gray-700"}),e.jsx("rect",{x:i,y:o+4,width:Math.max(l*(t.pct/100),4),height:"2.8",rx:"1.4",fill:x})]},t.name)})})})}function L(){const a=[{label:"Claude · 7d",source:"claude",reset:"in 1d",pct:61},{label:"Claude · 5h",source:"claude",reset:"in 4h 28m",pct:4},{label:"Cursor",source:"cursor",reset:"in 25d",pct:51},{label:"Codex · weekly",source:"codex",reset:"in 1d",pct:32}],r=22,s=28,i=14,l=236;return e.jsx(g,{children:e.jsx("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:a.map((t,d)=>{const o=s+d*r,x=D[t.source],y=_(t.pct/100);return e.jsxs("g",{children:[e.jsx("circle",{cx:"18",cy:o-3,r:"2.5",fill:x}),e.jsx("text",{x:"26",y:o,className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"500",children:t.label}),e.jsx("text",{x:"218",y:o,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:c,children:t.reset}),e.jsxs("text",{x:"250",y:o,textAnchor:"end",className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"700",fontFamily:c,children:[t.pct,"%"]}),e.jsx("rect",{x:i,y:o+4,width:l,height:"2.8",rx:"1.4",className:"fill-oai-gray-200 dark:fill-oai-gray-700"}),e.jsx("rect",{x:i,y:o+4,width:Math.max(l*(t.pct/100),4),height:"2.8",rx:"1.4",fill:y})]},t.label)})})})}function P(){const[a,r]=h.useState("loading");return h.useEffect(()=>{if(typeof window>"u")return;if(k()){r("native");return}const s=(navigator.userAgent||"").toLowerCase(),i=/mac/.test(s)&&!/iphone|ipad/.test(s);r(i?"mac-web":"other")},[]),a}function O(){const a=P();return a==="loading"?e.jsx("div",{className:"h-10 w-40","aria-hidden":"true"}):a==="native"?e.jsxs("button",{type:"button",onClick:()=>b("openWidgetGallery"),className:"inline-flex h-10 items-center gap-2 rounded-lg bg-oai-black px-4 text-sm font-medium text-white transition-colors hover:bg-oai-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:bg-white dark:text-oai-black dark:hover:bg-oai-gray-200",children:[n("widgets.cta.open_gallery"),e.jsx(C,{className:"h-4 w-4","aria-hidden":"true"})]}):a==="mac-web"?e.jsxs("a",{href:"https://github.com/mm7894215/TokenTracker/releases/latest",target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-10 items-center gap-2 rounded-lg bg-oai-black px-4 text-sm font-medium text-white no-underline transition-colors hover:bg-oai-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:bg-white dark:text-oai-black dark:hover:bg-oai-gray-200",children:[e.jsx(S,{className:"h-4 w-4","aria-hidden":"true"}),n("widgets.cta.download")]}):e.jsxs("span",{className:"inline-flex h-10 items-center gap-2 rounded-lg border border-oai-gray-200 bg-oai-gray-50 px-4 text-sm font-medium text-oai-gray-500 dark:border-oai-gray-800 dark:bg-oai-gray-900 dark:text-oai-gray-400",children:[e.jsx(j,{className:"h-4 w-4","aria-hidden":"true"}),n("widgets.cta.macos_only")]})}const H=[{id:"heatmap",Preview:E,nameKey:"widgets.heatmap.name",descKey:"widgets.heatmap.description"},{id:"topModels",Preview:$,nameKey:"widgets.topModels.name",descKey:"widgets.topModels.description"},{id:"limits",Preview:L,nameKey:"widgets.limits.name",descKey:"widgets.limits.description"}];function G(){return e.jsx("div",{className:"flex flex-col flex-1 text-oai-black dark:text-oai-white font-oai antialiased",children:e.jsx("main",{className:"flex-1 pt-8 sm:pt-10 pb-12 sm:pb-16",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 sm:px-6",children:[e.jsx(f,{y:12,children:e.jsxs("header",{className:"mb-10 flex flex-col gap-6 sm:mb-14 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"mb-3 text-3xl font-semibold tracking-tight text-oai-black dark:text-white sm:text-4xl",children:n("widgets.page.title")}),e.jsx("p",{className:"max-w-xl text-sm text-oai-gray-500 dark:text-oai-gray-400 sm:text-base",children:n("widgets.page.subtitle")})]}),e.jsx("div",{className:"shrink-0",children:e.jsx(O,{})})]})}),e.jsx(f,{y:16,delay:.08,children:e.jsxs("section",{className:"mb-14 sm:mb-16","aria-label":n("widgets.hero.aria"),children:[e.jsx(z,{size:"lg"}),e.jsx("p",{className:"mt-5 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:n("widgets.hero.annotation")})]})}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-5 text-xs font-semibold uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-400",children:n("widgets.section.more")}),e.jsx(N,{staggerDelay:.08,initialDelay:.12,children:e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3 sm:gap-5",children:H.map(({id:a,Preview:r,nameKey:s,descKey:i})=>e.jsx(W,{children:e.jsxs("article",{className:"rounded-xl border border-oai-gray-200 bg-white p-4 transition-colors duration-200 dark:border-oai-gray-800 dark:bg-oai-gray-900 sm:p-5",children:[e.jsx(r,{}),e.jsxs("div",{className:"mt-4",children:[e.jsx("h3",{className:"text-[15px] font-semibold text-oai-black dark:text-white",children:n(s)}),e.jsx("p",{className:"mt-1.5 text-sm leading-relaxed text-oai-gray-500 dark:text-oai-gray-400",children:n(i)})]})]})},a))})})]})]})})})}export{G as WidgetsPage};
@@ -1 +1 @@
1
- import{e as o}from"./main-D49FUfq7.js";const a=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],d=o("download",a);export{d as D};
1
+ import{e as o}from"./main-Cv6YpYdZ.js";const a=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],d=o("download",a);export{d as D};
@@ -0,0 +1 @@
1
+ import{ad as l,D as n,az as i}from"./main-Cv6YpYdZ.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 h({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)})}const k=new Set(["/brand-logos/cursor.svg","/brand-logos/kiro.svg","/brand-logos/copilot.svg"]);function w({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 ${k.has(r)?"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:"kimi_tokens",copyKey:"leaderboard.column.kimi",icon:"/brand-logos/kimi.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}],f="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",_="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",v="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 K(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-emerald-950":"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-[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-emerald-950":"bg-white dark:bg-oai-gray-950 group-hover:bg-oai-gray-50 dark:group-hover:bg-oai-gray-900/60")}function S(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{f as L,_ as a,x as b,T as c,w as d,h as e,S as f,v as g,K as l};