tokentracker-cli 1.1.3 → 1.1.4

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 (115) hide show
  1. package/README.de.md +5 -4
  2. package/README.ja.md +5 -4
  3. package/README.ko.md +5 -4
  4. package/README.md +5 -4
  5. package/README.zh-CN.md +5 -4
  6. package/dashboard/dist/assets/{AchievementBadge-dt_UDU_h.js → AchievementBadge-BGA-HT_B.js} +1 -1
  7. package/dashboard/dist/assets/{AchievementsPage-B5DJ3S9l.js → AchievementsPage-CtRh5AjH.js} +2 -2
  8. package/dashboard/dist/assets/{AchievementsSection-CDxcyig2.js → AchievementsSection-BarRcKaN.js} +1 -1
  9. package/dashboard/dist/assets/{BadgeDetailModal-Cp98zNn2.js → BadgeDetailModal-Bg0BDAN2.js} +1 -1
  10. package/dashboard/dist/assets/{BotAnimated-CR7MiUpo.js → BotAnimated-By9J3-dn.js} +1 -1
  11. package/dashboard/dist/assets/{Card-C8IdDvlg.js → Card-CIoJYi2j.js} +1 -1
  12. package/dashboard/dist/assets/{ClawdAnimated-COeTlW8z.js → ClawdAnimated-Dkvc2xe8.js} +2 -2
  13. package/dashboard/dist/assets/{CommandPalette-Co9k2CCc.js → CommandPalette-BssDtHRl.js} +1 -1
  14. package/dashboard/dist/assets/{CommunityStatsModal-C6XQeRgw.js → CommunityStatsModal-CQrgLlDb.js} +1 -1
  15. package/dashboard/dist/assets/{ConfirmModal-Ai4182O-.js → ConfirmModal-C3hBPgYc.js} +1 -1
  16. package/dashboard/dist/assets/{Controls-BbKzN-Pe.js → Controls-BSW6a1HS.js} +1 -1
  17. package/dashboard/dist/assets/DashboardPage-Dhv7fejy.js +1 -0
  18. package/dashboard/dist/assets/{DevicePage-CZbrtJmb.js → DevicePage-D5eZn0wo.js} +1 -1
  19. package/dashboard/dist/assets/{DialogClose-DMl8tAoX.js → DialogClose-BltQpaJo.js} +1 -1
  20. package/dashboard/dist/assets/DialogDescription-Cof52Icj.js +1 -0
  21. package/dashboard/dist/assets/{DialogTitle-BJxpp2t-.js → DialogTitle-CVddcRPZ.js} +1 -1
  22. package/dashboard/dist/assets/{FadeIn-hU_MXl6R.js → FadeIn-goPv73MT.js} +1 -1
  23. package/dashboard/dist/assets/{HeaderGithubStar-CM5RSxxN.js → HeaderGithubStar-BDBrrkzt.js} +1 -1
  24. package/dashboard/dist/assets/{HoverTooltip-BZKfQyZQ.js → HoverTooltip-qyMezXOs.js} +1 -1
  25. package/dashboard/dist/assets/{IpCheckPage-BjDx-zja.js → IpCheckPage-Ces8JIPb.js} +1 -1
  26. package/dashboard/dist/assets/{LandingPage-CAt8BCDv.js → LandingPage-B2TmLGno.js} +2 -2
  27. package/dashboard/dist/assets/{LeaderboardAvatar-DiCrakjI.js → LeaderboardAvatar-CVVRoNua.js} +1 -1
  28. package/dashboard/dist/assets/{LeaderboardPage-Dj3pHv6U.js → LeaderboardPage-xtt-bOY8.js} +2 -2
  29. package/dashboard/dist/assets/{LeaderboardProfileModal-DEWbcP9p.js → LeaderboardProfileModal-BM4d_I_r.js} +3 -3
  30. package/dashboard/dist/assets/{LeaderboardProfilePage-CTbWHQkY.js → LeaderboardProfilePage-BWqhFLQX.js} +1 -1
  31. package/dashboard/dist/assets/{LimitsPage-V-98OUhF.js → LimitsPage-BZL4Pcl8.js} +1 -1
  32. package/dashboard/dist/assets/{LocalOnlyNotice-a4PqtUZY.js → LocalOnlyNotice-D4gnOEJj.js} +1 -1
  33. package/dashboard/dist/assets/{LoginCard-oD1A2Ru8.js → LoginCard-CB17FQ5w.js} +1 -1
  34. package/dashboard/dist/assets/{LoginModal-D8aSmxok.js → LoginModal-BI-O1rH4.js} +1 -1
  35. package/dashboard/dist/assets/{LoginPage-DIjhBv2X.js → LoginPage-DnGzsvJ4.js} +1 -1
  36. package/dashboard/dist/assets/{PetPage-D7601BTX.js → PetPage-NRnIKMaJ.js} +1 -1
  37. package/dashboard/dist/assets/{PopoverPopup-aPnmKopO.js → PopoverPopup-DHoK6UJZ.js} +1 -1
  38. package/dashboard/dist/assets/{ProviderIcon-rwyfcNlT.js → ProviderIcon-BTkdx9o2.js} +1 -1
  39. package/dashboard/dist/assets/{ResetPasswordPage-AF3SBgW2.js → ResetPasswordPage-C6K0w318.js} +1 -1
  40. package/dashboard/dist/assets/{SegmentedControl-fnlScNMT.js → SegmentedControl-gEoWioBE.js} +1 -1
  41. package/dashboard/dist/assets/{Select-DDjC3RjB.js → Select-CI-qtEYu.js} +1 -1
  42. package/dashboard/dist/assets/{SelectItemText-VhBWE2O8.js → SelectItemText-q-yhzzjw.js} +1 -1
  43. package/dashboard/dist/assets/{ServiceStatusPage-BL3qqEsp.js → ServiceStatusPage-C4xD1CEe.js} +1 -1
  44. package/dashboard/dist/assets/{SessionsPage-DXYiuP2x.js → SessionsPage-CS0Yun2z.js} +1 -1
  45. package/dashboard/dist/assets/{SettingsPage-DTeA_ahr.js → SettingsPage-GVY_ktz4.js} +2 -2
  46. package/dashboard/dist/assets/{SkillsPage-CtTRwVQH.js → SkillsPage-COPRL95O.js} +1 -1
  47. package/dashboard/dist/assets/{TokenGalaxy-CifK91V7.js → TokenGalaxy-Czi0Ic48.js} +1 -1
  48. package/dashboard/dist/assets/{ToolbarRootContext-ClGAIYoa.js → ToolbarRootContext-BZkTiBJB.js} +1 -1
  49. package/dashboard/dist/assets/{TrendMonitor-D1evFHRM.js → TrendMonitor-CnIsuxV-.js} +1 -1
  50. package/dashboard/dist/assets/{WidgetsPage-Cq4RYJDE.js → WidgetsPage-OdX_Fsul.js} +1 -1
  51. package/dashboard/dist/assets/{WrappedPage-CoC5RJH7.js → WrappedPage-h9N63-F8.js} +1 -1
  52. package/dashboard/dist/assets/__vite-browser-external-BFNWaGsk.js +45 -0
  53. package/dashboard/dist/assets/{agent-logos-QLdA9OeA.js → agent-logos-BDiPxrST.js} +1 -1
  54. package/dashboard/dist/assets/{arrow-up-right-BYLgB3bH.js → arrow-up-right-DtFQUeJG.js} +1 -1
  55. package/dashboard/dist/assets/{check-DfnIvqZD.js → check-C35onaNL.js} +1 -1
  56. package/dashboard/dist/assets/{composite--JllTpIX.js → composite-qxBzts0W.js} +1 -1
  57. package/dashboard/dist/assets/{copy-ClKVBIgD.js → copy-D_D71TLc.js} +1 -1
  58. package/dashboard/dist/assets/{download-Di1-UFJX.js → download-DMQI2hQe.js} +1 -1
  59. package/dashboard/dist/assets/{external-link-D7zPVFLO.js → external-link-CemM4dWf.js} +1 -1
  60. package/dashboard/dist/assets/{flame-BMJTxjVg.js → flame-CIvk0SP5.js} +1 -1
  61. package/dashboard/dist/assets/{format-tokens-DCZM5Nfn.js → format-tokens-D3JSvcFl.js} +1 -1
  62. package/dashboard/dist/assets/{icons-I615W2IU.js → icons-Ccf5W0AL.js} +1 -1
  63. package/dashboard/dist/assets/{index-BejnmdPe.js → index-Brd2evyz.js} +1 -1
  64. package/dashboard/dist/assets/{index-BX3CXVdD.js → index-C8Wri_HI.js} +1 -1
  65. package/dashboard/dist/assets/{index-CwczM3BZ.js → index-CFXmD_KX.js} +1 -1
  66. package/dashboard/dist/assets/{info-CFJPny5Q.js → info-CafrKEG8.js} +1 -1
  67. package/dashboard/dist/assets/{link-2-D1ydWh_w.js → link-2-Ds-9Nzlp.js} +1 -1
  68. package/dashboard/dist/assets/{loader-circle-Cq-J-OFg.js → loader-circle-DA4I55-V.js} +1 -1
  69. package/dashboard/dist/assets/{maximize-2-kIoSq57I.js → maximize-2-CjMPt5kU.js} +1 -1
  70. package/dashboard/dist/assets/{modifiers.esm-CLojthuF.js → modifiers.esm-DIxTS09h.js} +1 -1
  71. package/dashboard/dist/assets/module-WSx8viXK.js +3 -0
  72. package/dashboard/dist/assets/{monitor-smartphone-DX2qWHYV.js → monitor-smartphone-IZpIOxn3.js} +1 -1
  73. package/dashboard/dist/assets/{plus-B-JEpo3V.js → plus-vbLFNs70.js} +1 -1
  74. package/dashboard/dist/assets/{provider-display-DJDdrTAS.js → provider-display-BAu_UIfV.js} +2 -2
  75. package/dashboard/dist/assets/{react-Ctoe8iLl.js → react-Djb4VGKb.js} +1 -1
  76. package/dashboard/dist/assets/{search-BTSQrlW-.js → search-Ct6LY9Ke.js} +1 -1
  77. package/dashboard/dist/assets/{skills-api-DKQyM8h7.js → skills-api-BnGI2gEp.js} +1 -1
  78. package/dashboard/dist/assets/{sortable.esm-pOEL13xU.js → sortable.esm-CjCGd6g5.js} +1 -1
  79. package/dashboard/dist/assets/{store-B2RplzvW.js → store-CBxkOqRe.js} +1 -1
  80. package/dashboard/dist/assets/{terminal-BH_6_EW_.js → terminal-Dlpdp5Az.js} +1 -1
  81. package/dashboard/dist/assets/{trash-CC444Mz6.js → trash-pxUSKv66.js} +1 -1
  82. package/dashboard/dist/assets/{use-community-stats-CBXLdD_j.js → use-community-stats-tHaixRIw.js} +1 -1
  83. package/dashboard/dist/assets/{use-latest-request-guard-DMuPfZQI.js → use-latest-request-guard-Cs44WPfL.js} +1 -1
  84. package/dashboard/dist/assets/{use-limits-display-prefs-CmsGTBA4.js → use-limits-display-prefs-Dw56PXWy.js} +1 -1
  85. package/dashboard/dist/assets/{use-ordered-list-BNJNpXjB.js → use-ordered-list-DpLx8oLV.js} +1 -1
  86. package/dashboard/dist/assets/use-reduced-motion-DrlJ9X6p.js +1 -0
  87. package/dashboard/dist/assets/{use-session-efficiency-pref-g_0ISxe1.js → use-session-efficiency-pref-BN3FtBvr.js} +1 -1
  88. package/dashboard/dist/assets/{use-transform-D36BHcXk.js → use-transform-C4nTGgzb.js} +1 -1
  89. package/dashboard/dist/assets/{use-usage-limits-Dxw3vzsD.js → use-usage-limits-Dmwdc1yo.js} +1 -1
  90. package/dashboard/dist/assets/{useCurrency-V2FE4TMo.js → useCurrency-DSc3A_Ih.js} +1 -1
  91. package/dashboard/dist/assets/{useTokenFormat-CEOwvzMt.js → useTokenFormat-BHjcMgm8.js} +1 -1
  92. package/dashboard/dist/assets/{zap-BS7ZU76I.js → zap-BE8i_wu2.js} +1 -1
  93. package/dashboard/dist/brand-logos/trae.svg +1 -0
  94. package/dashboard/dist/index.html +13 -11
  95. package/dashboard/dist/ip-check.html +1 -1
  96. package/dashboard/dist/leaderboard.html +1 -1
  97. package/dashboard/dist/llms.txt +3 -2
  98. package/dashboard/dist/share.html +1 -1
  99. package/package.json +6 -4
  100. package/src/commands/init.js +9 -7
  101. package/src/commands/status.js +9 -9
  102. package/src/commands/sync.js +25 -0
  103. package/src/lib/pricing/curated-overrides.json +7 -0
  104. package/src/lib/pricing/matcher.js +5 -0
  105. package/src/lib/pricing/seed-snapshot.json +1 -1
  106. package/src/lib/rollout.js +197 -18
  107. package/src/lib/trae-db.js +127 -0
  108. package/src/lib/trae-snapshot.js +230 -0
  109. package/src/lib/trae-sqlite.js +143 -0
  110. package/src/lib/trae-usage.js +121 -0
  111. package/dashboard/dist/assets/DashboardPage-DTcVGG4e.js +0 -1
  112. package/dashboard/dist/assets/DialogDescription-haPz7CX9.js +0 -1
  113. package/dashboard/dist/assets/__vite-browser-external-BDugA6I0.js +0 -45
  114. package/dashboard/dist/assets/module-DtWfRKM4.js +0 -3
  115. package/dashboard/dist/assets/use-reduced-motion-CNpG-Yoi.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BotAnimated-CR7MiUpo.js","assets/__vite-browser-external-BDugA6I0.js","assets/__vite-browser-external-Bg0J-a5P.css","assets/skins-C8EyB85e.js"])))=>i.map(i=>d[i]);
2
- import{r,j as l,_ as $}from"./__vite-browser-external-BDugA6I0.js";const C=Object.assign(Object.create(null),{clawd:"clawd",bot:"vector"});function T(e){return C[v(e)]||"atlas"}function v(e){const n=String(e||"").trim().toLowerCase();return/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/.test(n)?n:"clawd"}const V=.84,I=1.35,O=Object.assign(Object.create(null),{clawd:V,bot:I});function M(e){return O[v(e)]??1}const z={idle:{row:0,durations:[280,110,110,140,140,320]},"running-right":{row:1,durations:[120,120,120,120,120,120,120,220]},"running-left":{row:2,durations:[120,120,120,120,120,120,120,220]},waving:{row:3,durations:[140,140,140,280]},jumping:{row:4,durations:[140,140,140,140,280]},failed:{row:5,durations:[140,140,140,140,140,140,140,240]},waiting:{row:6,durations:[150,150,150,150,150,260]},running:{row:7,durations:[120,120,120,120,120,220]},review:{row:8,durations:[150,150,150,150,150,280]}};function P(e){return["error","disconnected","working-overheated"].includes(e)?"failed":["happy","waking","mini-happy","jumping"].includes(e)?"jumping":["working-typing","working-ultrathink","working-juggling","running"].includes(e)?"running":["working-thinking","working-wizard","review"].includes(e)?"review":["sleeping","idle-doze","mini-sleep","waiting"].includes(e)?"waiting":["mini-peek","waving"].includes(e)?"waving":e==="running-left"||e==="running-right"?e:"idle"}function B(){const[e,n]=r.useState(()=>typeof document>"u"?!0:document.visibilityState!=="hidden");return r.useEffect(()=>{if(typeof document>"u")return;const i=()=>n(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",i),()=>document.removeEventListener("visibilitychange",i)},[]),e}function H(){const[e,n]=r.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return r.useEffect(()=>{if(typeof window.matchMedia!="function")return;const i=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>n(o.matches);return i.addEventListener("change",t),()=>i.removeEventListener("change",t)},[]),e}function N({character:e,pet:n=null,state:i="idle-living",dragState:t=null,size:o=48,className:c="",lookDirectionIndex:g=null}){const d=v(e),u=t==="running-left"||t==="running-right"?t:P(i),a=z[u],s=n?.spriteVersionNumber===2?2:1,f=s===2?11:9,w=s===2&&u==="idle"&&Number.isInteger(g)?(g%16+16)%16:null,h=w==null?a.row:9+Math.floor(w/8),m=w==null?null:w%8,k=H(),y=B(),[b,S]=r.useState(0);r.useEffect(()=>{if(S(0),k||!y||w!=null)return;let E=!1,j=0;const x=R=>{j=window.setTimeout(()=>{if(E)return;const A=(R+1)%a.durations.length;S(A),x(A)},a.durations[R])};return x(0),()=>{E=!0,window.clearTimeout(j)}},[w,k,y,a]);const L=r.useMemo(()=>({width:o*(192/208),height:o,backgroundImage:`url(${n?.assetUrl||`/pets/${d}/spritesheet.webp`})`,backgroundRepeat:"no-repeat",backgroundSize:`800% ${f*100}%`,backgroundPosition:`${(m??b)/7*100}% ${h/(f-1)*100}%`,imageRendering:"pixelated"}),[f,m,h,b,d,n?.assetUrl,o]);return l.jsx("div",{"aria-hidden":"true",className:`pet-atlas-animated ${c}`,style:L})}const U=r.lazy(()=>$(()=>import("./BotAnimated-CR7MiUpo.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.BotAnimated}))),_={"idle-living":"idle/living.svg","idle-doze":"idle/doze.svg","idle-follow":"idle/follow.svg","idle-look":"idle/look.svg","idle-yawn":"idle/yawn.svg","idle-collapse":"idle/collapse.svg","working-building":"working/building.svg","working-carrying":"working/carrying.svg","working-conducting":"working/conducting.svg","working-confused":"working/confused.svg","working-debugger":"working/debugger.svg","working-juggling":"working/juggling.svg","working-overheated":"working/overheated.svg","working-pushing":"working/pushing.svg","working-sweeping":"working/sweeping.svg","working-thinking":"working/thinking.svg","working-typing":"working/typing.svg","working-ultrathink":"working/ultrathink.svg","working-wizard":"working/wizard.svg","mini-alert":"mini/alert.svg","mini-crabwalk":"mini/crabwalk.svg","mini-enter":"mini/enter.svg","mini-enter-sleep":"mini/enter-sleep.svg","mini-happy":"mini/happy.svg","mini-idle":"mini/idle.svg","mini-peek":"mini/peek.svg","mini-sleep":"mini/sleep.svg","react-double":"react/double.svg","react-drag":"react/drag.svg","react-left":"react/left.svg","react-right":"react/right.svg","collapse-sleep":"sleep/collapse-sleep.svg",sleeping:"sleep/sleeping.svg",wake:"sleep/wake.svg",disconnected:"status/disconnected.svg",error:"status/error.svg",notification:"status/notification.svg",happy:"happy.svg","static-base":"static-base.svg"},p=new Map;async function q(e){if(p.has(e))return p.get(e);if(typeof fetch!="function")return null;let n;try{n=await fetch(`/clawd/${e}`)}catch{return null}if(!n.ok)return null;const t=(await n.text()).replace(/<svg([^>]*)>/,(o,c)=>`<svg${c.replace(/\s+width="[^"]*"/g,"").replace(/\s+height="[^"]*"/g,"")} width="100%" height="100%">`);return p.set(e,t),t}function F({state:e="idle-living",size:n=48,className:i=""}){const[t,o]=r.useState(""),c=r.useRef(null),d=D()?"static-base":e,u=_[d]||_["static-base"];return r.useEffect(()=>{let a=!1;return q(u).then(s=>{!a&&s&&o(s)}),()=>{a=!0}},[u]),r.useEffect(()=>{const a=c.current?.querySelector("svg");if(a)try{const s=a.getBBox();s.width>0&&s.height>0&&a.setAttribute("viewBox",`${s.x-2} ${s.y-2} ${s.width+4} ${s.height+4}`)}catch{}},[t]),l.jsx("div",{ref:c,"aria-hidden":"true",className:`clawd-animated ${i}`,style:{width:n,height:n,display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},dangerouslySetInnerHTML:{__html:t}})}function G({state:e="idle-living",size:n=48,className:i="",character:t="clawd",pet:o=null,lookDirectionIndex:c=null,botColor:g="auto"}){const d=v(t),u=T(d);return u==="vector"?l.jsx(r.Suspense,{fallback:l.jsx("span",{"aria-hidden":"true",style:{width:n,height:n,display:"inline-block"}}),children:l.jsx(U,{state:e,size:n*M(d),className:i,color:g})}):u==="atlas"?l.jsx(N,{character:d,pet:o,state:e,size:n,className:i,lookDirectionIndex:c}):l.jsx(F,{state:e,size:n*M(d),className:i})}function D(){const[e,n]=r.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return r.useEffect(()=>{if(typeof window.matchMedia!="function")return;const i=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>n(o.matches);return i.addEventListener("change",t),()=>i.removeEventListener("change",t)},[]),e}export{G as C,v as n,T as p};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BotAnimated-By9J3-dn.js","assets/__vite-browser-external-BFNWaGsk.js","assets/__vite-browser-external-Bg0J-a5P.css","assets/skins-C8EyB85e.js"])))=>i.map(i=>d[i]);
2
+ import{r,j as l,_ as $}from"./__vite-browser-external-BFNWaGsk.js";const C=Object.assign(Object.create(null),{clawd:"clawd",bot:"vector"});function T(e){return C[v(e)]||"atlas"}function v(e){const n=String(e||"").trim().toLowerCase();return/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/.test(n)?n:"clawd"}const V=.84,I=1.35,O=Object.assign(Object.create(null),{clawd:V,bot:I});function M(e){return O[v(e)]??1}const z={idle:{row:0,durations:[280,110,110,140,140,320]},"running-right":{row:1,durations:[120,120,120,120,120,120,120,220]},"running-left":{row:2,durations:[120,120,120,120,120,120,120,220]},waving:{row:3,durations:[140,140,140,280]},jumping:{row:4,durations:[140,140,140,140,280]},failed:{row:5,durations:[140,140,140,140,140,140,140,240]},waiting:{row:6,durations:[150,150,150,150,150,260]},running:{row:7,durations:[120,120,120,120,120,220]},review:{row:8,durations:[150,150,150,150,150,280]}};function P(e){return["error","disconnected","working-overheated"].includes(e)?"failed":["happy","waking","mini-happy","jumping"].includes(e)?"jumping":["working-typing","working-ultrathink","working-juggling","running"].includes(e)?"running":["working-thinking","working-wizard","review"].includes(e)?"review":["sleeping","idle-doze","mini-sleep","waiting"].includes(e)?"waiting":["mini-peek","waving"].includes(e)?"waving":e==="running-left"||e==="running-right"?e:"idle"}function B(){const[e,n]=r.useState(()=>typeof document>"u"?!0:document.visibilityState!=="hidden");return r.useEffect(()=>{if(typeof document>"u")return;const i=()=>n(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",i),()=>document.removeEventListener("visibilitychange",i)},[]),e}function H(){const[e,n]=r.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return r.useEffect(()=>{if(typeof window.matchMedia!="function")return;const i=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>n(o.matches);return i.addEventListener("change",t),()=>i.removeEventListener("change",t)},[]),e}function N({character:e,pet:n=null,state:i="idle-living",dragState:t=null,size:o=48,className:c="",lookDirectionIndex:g=null}){const d=v(e),u=t==="running-left"||t==="running-right"?t:P(i),a=z[u],s=n?.spriteVersionNumber===2?2:1,f=s===2?11:9,w=s===2&&u==="idle"&&Number.isInteger(g)?(g%16+16)%16:null,h=w==null?a.row:9+Math.floor(w/8),m=w==null?null:w%8,k=H(),y=B(),[b,S]=r.useState(0);r.useEffect(()=>{if(S(0),k||!y||w!=null)return;let E=!1,j=0;const x=R=>{j=window.setTimeout(()=>{if(E)return;const A=(R+1)%a.durations.length;S(A),x(A)},a.durations[R])};return x(0),()=>{E=!0,window.clearTimeout(j)}},[w,k,y,a]);const L=r.useMemo(()=>({width:o*(192/208),height:o,backgroundImage:`url(${n?.assetUrl||`/pets/${d}/spritesheet.webp`})`,backgroundRepeat:"no-repeat",backgroundSize:`800% ${f*100}%`,backgroundPosition:`${(m??b)/7*100}% ${h/(f-1)*100}%`,imageRendering:"pixelated"}),[f,m,h,b,d,n?.assetUrl,o]);return l.jsx("div",{"aria-hidden":"true",className:`pet-atlas-animated ${c}`,style:L})}const U=r.lazy(()=>$(()=>import("./BotAnimated-By9J3-dn.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.BotAnimated}))),_={"idle-living":"idle/living.svg","idle-doze":"idle/doze.svg","idle-follow":"idle/follow.svg","idle-look":"idle/look.svg","idle-yawn":"idle/yawn.svg","idle-collapse":"idle/collapse.svg","working-building":"working/building.svg","working-carrying":"working/carrying.svg","working-conducting":"working/conducting.svg","working-confused":"working/confused.svg","working-debugger":"working/debugger.svg","working-juggling":"working/juggling.svg","working-overheated":"working/overheated.svg","working-pushing":"working/pushing.svg","working-sweeping":"working/sweeping.svg","working-thinking":"working/thinking.svg","working-typing":"working/typing.svg","working-ultrathink":"working/ultrathink.svg","working-wizard":"working/wizard.svg","mini-alert":"mini/alert.svg","mini-crabwalk":"mini/crabwalk.svg","mini-enter":"mini/enter.svg","mini-enter-sleep":"mini/enter-sleep.svg","mini-happy":"mini/happy.svg","mini-idle":"mini/idle.svg","mini-peek":"mini/peek.svg","mini-sleep":"mini/sleep.svg","react-double":"react/double.svg","react-drag":"react/drag.svg","react-left":"react/left.svg","react-right":"react/right.svg","collapse-sleep":"sleep/collapse-sleep.svg",sleeping:"sleep/sleeping.svg",wake:"sleep/wake.svg",disconnected:"status/disconnected.svg",error:"status/error.svg",notification:"status/notification.svg",happy:"happy.svg","static-base":"static-base.svg"},p=new Map;async function q(e){if(p.has(e))return p.get(e);if(typeof fetch!="function")return null;let n;try{n=await fetch(`/clawd/${e}`)}catch{return null}if(!n.ok)return null;const t=(await n.text()).replace(/<svg([^>]*)>/,(o,c)=>`<svg${c.replace(/\s+width="[^"]*"/g,"").replace(/\s+height="[^"]*"/g,"")} width="100%" height="100%">`);return p.set(e,t),t}function F({state:e="idle-living",size:n=48,className:i=""}){const[t,o]=r.useState(""),c=r.useRef(null),d=D()?"static-base":e,u=_[d]||_["static-base"];return r.useEffect(()=>{let a=!1;return q(u).then(s=>{!a&&s&&o(s)}),()=>{a=!0}},[u]),r.useEffect(()=>{const a=c.current?.querySelector("svg");if(a)try{const s=a.getBBox();s.width>0&&s.height>0&&a.setAttribute("viewBox",`${s.x-2} ${s.y-2} ${s.width+4} ${s.height+4}`)}catch{}},[t]),l.jsx("div",{ref:c,"aria-hidden":"true",className:`clawd-animated ${i}`,style:{width:n,height:n,display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},dangerouslySetInnerHTML:{__html:t}})}function G({state:e="idle-living",size:n=48,className:i="",character:t="clawd",pet:o=null,lookDirectionIndex:c=null,botColor:g="auto"}){const d=v(t),u=T(d);return u==="vector"?l.jsx(r.Suspense,{fallback:l.jsx("span",{"aria-hidden":"true",style:{width:n,height:n,display:"inline-block"}}),children:l.jsx(U,{state:e,size:n*M(d),className:i,color:g})}):u==="atlas"?l.jsx(N,{character:d,pet:o,state:e,size:n,className:i,lookDirectionIndex:c}):l.jsx(F,{state:e,size:n*M(d),className:i})}function D(){const[e,n]=r.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return r.useEffect(()=>{if(typeof window.matchMedia!="function")return;const i=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>n(o.matches);return i.addEventListener("change",t),()=>i.removeEventListener("change",t)},[]),e}export{G as C,v as n,T as p};
@@ -1 +1 @@
1
- import{m as M,f as E,r,y as I,c as i,j as o,e as L}from"./__vite-browser-external-BDugA6I0.js";import{m as j}from"./react-Ctoe8iLl.js";import{P as A}from"./ProviderIcon-rwyfcNlT.js";import{g as $}from"./skills-api-DKQyM8h7.js";import{S as R}from"./search-BTSQrlW-.js";import{u as K}from"./use-reduced-motion-CNpG-Yoi.js";import{A as q}from"./index-BejnmdPe.js";const N={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};N.node;const O=M(N),T=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function Q(){const f=E(),d=K(),[u,g]=r.useState(!1),[x,h]=r.useState(""),[n,l]=r.useState(0),[m,k]=r.useState([]),b=r.useRef(null),w=r.useRef(null);r.useEffect(()=>{const e=t=>{(t.metaKey||t.ctrlKey)&&(t.key==="k"||t.key==="K")&&(t.preventDefault(),g(c=>!c))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),r.useEffect(()=>{if(!u)return;h(""),l(0);const e=requestAnimationFrame(()=>b.current?.focus());return T&&!m.length&&$().then(t=>k(t?.skills||[])).catch(()=>k([])),()=>cancelAnimationFrame(e)},[u,m.length]);const y=r.useMemo(()=>{const e=I().flatMap(a=>a.items.map(c=>({kind:"page",id:`page:${c.id}`,label:c.label,sub:i("cmdk.group.pages"),Icon:c.icon,run:()=>f(c.to)}))),t=(m||[]).map(a=>({kind:"skill",id:`skill:${a.id||a.directory}`,label:a.name||a.directory,sub:a.repoOwner&&a.repoName?`${a.repoOwner}/${a.repoName}`:i("cmdk.group.skills"),provider:(a.targets||[])[0]||"claude",run:()=>f(`/skills?skill=${encodeURIComponent(a.directory||a.id)}`)}));return[...e,...t]},[f,m]),s=r.useMemo(()=>{const e=x.trim().toLowerCase();return e?y.filter(t=>t.label.toLowerCase().includes(e)||String(t.sub||"").toLowerCase().includes(e)):y},[y,x]);r.useEffect(()=>{n>=s.length&&l(s.length?s.length-1:0)},[n,s.length]),r.useEffect(()=>{if(!u)return;w.current?.querySelector(`[data-cmdk-index="${n}"]`)?.scrollIntoView({block:"nearest"})},[n,u]);const p=r.useCallback(()=>g(!1),[]),v=r.useCallback(e=>{e&&(p(),e.run())},[p]),C=e=>{e.key==="ArrowDown"?(e.preventDefault(),l(t=>Math.min(t+1,Math.max(0,s.length-1)))):e.key==="ArrowUp"?(e.preventDefault(),l(t=>Math.max(t-1,0))):e.key==="Enter"?(e.preventDefault(),v(s[n])):e.key==="Escape"&&(e.preventDefault(),p())},S={duration:d?0:.12},D=d?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return o.jsx(q,{children:u?o.jsxs(j.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:d?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:S,children:[o.jsx("button",{type:"button","aria-label":i("cmdk.close"),onClick:p,className:"absolute inset-0 cursor-default bg-oai-black/40"}),o.jsxs(j.div,{role:"dialog","aria-modal":"true","aria-label":i("cmdk.open_aria"),initial:d?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:d?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:D,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[o.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[o.jsx(R,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),o.jsx("input",{ref:b,type:"text",value:x,onChange:e=>{h(e.target.value),l(0)},onKeyDown:C,"aria-label":i("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":s[n]?`cmdk-opt-${n}`:void 0,role:"combobox","aria-expanded":"true",placeholder:i("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),o.jsx("div",{ref:w,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:s.length===0?o.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:i("cmdk.empty")}):s.map((e,t)=>{const a=t===n;return o.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${t}`,"data-cmdk-index":t,"aria-selected":a,onMouseMove:()=>l(t),onClick:()=>v(e),className:L("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",a?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[o.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:e.kind==="skill"?o.jsx(A,{provider:e.provider,size:16}):o.jsx(e.Icon,{className:"h-4 w-4","aria-hidden":!0})}),o.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:e.label}),o.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:e.sub}),a?o.jsx(O,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},e.id)})})]})]}):null})}export{Q as CommandPalette};
1
+ import{m as M,f as E,r,y as I,c as i,j as o,e as L}from"./__vite-browser-external-BFNWaGsk.js";import{m as j}from"./react-Djb4VGKb.js";import{P as A}from"./ProviderIcon-BTkdx9o2.js";import{g as $}from"./skills-api-BnGI2gEp.js";import{S as R}from"./search-Ct6LY9Ke.js";import{u as K}from"./use-reduced-motion-DrlJ9X6p.js";import{A as q}from"./index-Brd2evyz.js";const N={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};N.node;const O=M(N),T=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function Q(){const f=E(),d=K(),[u,g]=r.useState(!1),[x,h]=r.useState(""),[n,l]=r.useState(0),[m,k]=r.useState([]),b=r.useRef(null),w=r.useRef(null);r.useEffect(()=>{const e=t=>{(t.metaKey||t.ctrlKey)&&(t.key==="k"||t.key==="K")&&(t.preventDefault(),g(c=>!c))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),r.useEffect(()=>{if(!u)return;h(""),l(0);const e=requestAnimationFrame(()=>b.current?.focus());return T&&!m.length&&$().then(t=>k(t?.skills||[])).catch(()=>k([])),()=>cancelAnimationFrame(e)},[u,m.length]);const y=r.useMemo(()=>{const e=I().flatMap(a=>a.items.map(c=>({kind:"page",id:`page:${c.id}`,label:c.label,sub:i("cmdk.group.pages"),Icon:c.icon,run:()=>f(c.to)}))),t=(m||[]).map(a=>({kind:"skill",id:`skill:${a.id||a.directory}`,label:a.name||a.directory,sub:a.repoOwner&&a.repoName?`${a.repoOwner}/${a.repoName}`:i("cmdk.group.skills"),provider:(a.targets||[])[0]||"claude",run:()=>f(`/skills?skill=${encodeURIComponent(a.directory||a.id)}`)}));return[...e,...t]},[f,m]),s=r.useMemo(()=>{const e=x.trim().toLowerCase();return e?y.filter(t=>t.label.toLowerCase().includes(e)||String(t.sub||"").toLowerCase().includes(e)):y},[y,x]);r.useEffect(()=>{n>=s.length&&l(s.length?s.length-1:0)},[n,s.length]),r.useEffect(()=>{if(!u)return;w.current?.querySelector(`[data-cmdk-index="${n}"]`)?.scrollIntoView({block:"nearest"})},[n,u]);const p=r.useCallback(()=>g(!1),[]),v=r.useCallback(e=>{e&&(p(),e.run())},[p]),C=e=>{e.key==="ArrowDown"?(e.preventDefault(),l(t=>Math.min(t+1,Math.max(0,s.length-1)))):e.key==="ArrowUp"?(e.preventDefault(),l(t=>Math.max(t-1,0))):e.key==="Enter"?(e.preventDefault(),v(s[n])):e.key==="Escape"&&(e.preventDefault(),p())},S={duration:d?0:.12},D=d?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return o.jsx(q,{children:u?o.jsxs(j.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:d?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:S,children:[o.jsx("button",{type:"button","aria-label":i("cmdk.close"),onClick:p,className:"absolute inset-0 cursor-default bg-oai-black/40"}),o.jsxs(j.div,{role:"dialog","aria-modal":"true","aria-label":i("cmdk.open_aria"),initial:d?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:d?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:D,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[o.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[o.jsx(R,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),o.jsx("input",{ref:b,type:"text",value:x,onChange:e=>{h(e.target.value),l(0)},onKeyDown:C,"aria-label":i("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":s[n]?`cmdk-opt-${n}`:void 0,role:"combobox","aria-expanded":"true",placeholder:i("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),o.jsx("div",{ref:w,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:s.length===0?o.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:i("cmdk.empty")}):s.map((e,t)=>{const a=t===n;return o.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${t}`,"data-cmdk-index":t,"aria-selected":a,onMouseMove:()=>l(t),onClick:()=>v(e),className:L("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",a?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[o.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:e.kind==="skill"?o.jsx(A,{provider:e.provider,size:16}):o.jsx(e.Icon,{className:"h-4 w-4","aria-hidden":!0})}),o.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:e.label}),o.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:e.sub}),a?o.jsx(O,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},e.id)})})]})]}):null})}export{Q as CommandPalette};
@@ -1 +1 @@
1
- import{m as R,j as e,Z as P,n as z,r as D,c as n,X as S,l as K}from"./__vite-browser-external-BDugA6I0.js";import{m as M}from"./react-Ctoe8iLl.js";import{A as U,W as B}from"./icons-I615W2IU.js";import{u as F}from"./useTokenFormat-CEOwvzMt.js";import{P as G}from"./ProviderIcon-rwyfcNlT.js";import{T as W}from"./TrendMonitor-D1evFHRM.js";import{T as V}from"./AchievementBadge-dt_UDU_h.js";import{T as X}from"./terminal-BH_6_EW_.js";import{D as Z,a as Y,b as H,c as q,d as J,e as Q}from"./DialogTitle-BJxpp2t-.js";import{D as ee}from"./DialogDescription-haPz7CX9.js";import{D as ae}from"./DialogClose-DMl8tAoX.js";import"./useCurrency-V2FE4TMo.js";import"./use-latest-request-guard-DMuPfZQI.js";import"./PopoverPopup-aPnmKopO.js";import"./store-B2RplzvW.js";import"./composite--JllTpIX.js";import"./ToolbarRootContext-ClGAIYoa.js";import"./maximize-2-kIoSq57I.js";import"./use-reduced-motion-CNpG-Yoi.js";import"./zap-BS7ZU76I.js";import"./flame-BMJTxjVg.js";const C={name:"trending-down",size:24,node:[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]};C.node;const te=R(C),O=10,_={input:"var(--community-token-input)",cache_read:"var(--community-token-cache-read)",cache_write:"var(--community-token-cache-write)",output:"var(--community-token-output)",reasoning:"var(--community-token-reasoning)"},re={CLAUDE:"var(--community-claude)",CODEX:"var(--community-codex)",GEMINI:"var(--community-gemini)",CURSOR:"var(--community-cursor)",OPENCODE:"var(--community-opencode)",HERMES:"var(--community-hermes)",KIMI:"var(--community-kimi)",MIMO:"var(--community-mimo)",COPILOT:"var(--community-copilot)",KIRO:"var(--community-kiro)",GROK:"var(--community-grok)",DEEPSEEK:"var(--community-deepseek)",ZCODE:"var(--community-zcode)",WORKBUDDY:"var(--community-workbuddy)",MINIMAX:"var(--community-minimax)",DROID:"var(--community-droid)"};function ie(t){return re[String(t||"").toUpperCase()]||"var(--community-muted)"}const se=[[/claude|fable|opus|sonnet|haiku/,"CLAUDE"],[/gpt|codex|o3|o4/,"CODEX"],[/gemini/,"GEMINI"],[/composer|cursor/,"CURSOR"],[/kimi/,"KIMI"],[/mimo/,"MIMO"],[/copilot/,"COPILOT"],[/kiro/,"KIRO"],[/grok/,"GROK"],[/deepseek/,"DEEPSEEK"],[/glm/,"ZCODE"],[/hy3/,"WORKBUDDY"],[/minimax/,"MINIMAX"]],g=["overview","providers","community","models"];function oe(t){const s=String(t||"").toLowerCase(),a=se.find(([i])=>i.test(s));return a?a[1]:""}function u(t){const s=Number(t);return Number.isFinite(s)?`${s.toFixed(1)}%`:"—"}function p(t){return K(Number(t)||0)}function ne(t){return t?new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"}):""}function k(){return e.jsx("div",{className:"flex h-full min-h-40 items-center justify-center text-xs text-oai-gray-400",children:n("leaderboard.community.modal.no_data")})}function b({children:t,detail:s}){return e.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-4",children:[e.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-oai-gray-500 dark:text-oai-gray-400",children:t}),s?e.jsx("span",{className:"text-xs text-oai-gray-400",children:s}):null]})}function I({value:t,label:s}){const a=Number(t);if(!Number.isFinite(a))return null;const i=Math.sign(a)!==-1,r=i?V:te;return e.jsxs("span",{className:`inline-flex items-center gap-1 text-xs font-medium tabular-nums ${i?"text-emerald-600 dark:text-emerald-400":"text-rose-600 dark:text-rose-400"}`,title:s,children:[e.jsx(r,{className:"size-3","aria-hidden":"true"}),i?"+":"",a.toFixed(1),"%"]})}function j({label:t,value:s,title:a,delta:i,deltaLabel:r}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-xs font-medium text-oai-gray-500 dark:text-oai-gray-400",children:t}),e.jsxs("div",{className:"mt-1 flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"truncate text-xl font-semibold leading-none tracking-tight text-oai-black tabular-nums dark:text-white",title:a,children:s}),e.jsx(I,{value:i,label:r})]})]})}function A({fillWidth:t,share:s,color:a="var(--oai-blue)",ariaLabel:i,dataAttrs:r,children:o}){return e.jsxs("div",{...r,className:"group relative grid min-h-11 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 overflow-hidden px-2.5 transition-colors hover:bg-oai-gray-50 dark:hover:bg-oai-gray-900/60",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 opacity-[0.15] transition-opacity group-hover:opacity-[0.22] dark:opacity-[0.24] dark:group-hover:opacity-[0.32]",style:{width:`${t}%`,backgroundColor:a},role:"progressbar","aria-label":i,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":Number(s)||0}),o]})}function T({rank:t,provider:s,name:a,fillWidth:i,share:r,tokens:o,tokensTitle:l,dataAttrs:c}){return e.jsxs(A,{fillWidth:i,share:r,color:ie(s),ariaLabel:`${a} ${u(r)}`,dataAttrs:c,children:[e.jsxs("div",{className:"relative flex min-w-0 items-center gap-2.5",children:[e.jsx("span",{className:`w-5 shrink-0 text-xs tabular-nums ${t<=3?"font-semibold text-oai-gray-700 dark:text-oai-gray-200":"text-oai-gray-400"}`,children:t}),e.jsx("span",{className:"grid size-6 shrink-0 place-items-center text-oai-gray-700 dark:text-oai-gray-200",children:e.jsx(G,{provider:s,size:15})}),e.jsx("span",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",title:a,children:a})]}),e.jsxs("div",{className:"relative min-w-[4.5rem] text-right",children:[e.jsx("div",{className:"text-xs font-semibold text-oai-black tabular-nums dark:text-white",title:l,children:o}),e.jsx("div",{className:"text-xs text-oai-gray-500 tabular-nums dark:text-oai-gray-400",children:u(r)})]})]})}function le({rows:t,formatTokensTooltip:s}){return t.length?e.jsxs("div",{className:"mt-7",children:[e.jsx(b,{children:n("leaderboard.community.modal.token_mix")}),e.jsx("div",{className:"flex h-1.5 overflow-hidden bg-oai-gray-100 dark:bg-oai-gray-800",children:t.map(a=>e.jsx("div",{style:{width:`${Math.max(Number(a.share)||0,0)}%`,backgroundColor:_[a.key]||"var(--community-muted)"},title:`${n(`leaderboard.community.modal.token_mix.${a.key}`)} · ${u(a.share)}`},a.key))}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-1.5",children:t.map(a=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",title:s(a.tokens),children:[e.jsx("span",{className:"size-2",style:{backgroundColor:_[a.key]||"var(--community-muted)"}}),n(`leaderboard.community.modal.token_mix.${a.key}`),e.jsx("span",{className:"tabular-nums text-oai-gray-700 dark:text-oai-gray-200",children:u(a.share)})]},a.key))})]}):null}function f({label:t,value:s,title:a,delta:i,deltaLabel:r,className:o=""}){return e.jsxs("div",{className:`min-w-0 ${o}`,children:[e.jsx("div",{className:"truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:t}),e.jsxs("div",{className:"mt-1 flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"truncate text-base font-semibold leading-none tracking-tight tabular-nums text-oai-black dark:text-white",title:a,children:s}),e.jsx(I,{value:i,label:r})]})]})}function de({trendRows:t,activeDevelopers30d:s,developerGrowthPct:a,formatTokens:i,formatTokensTooltip:r}){if(!t.length)return null;const o=t.reduce((m,h)=>m+h.value,0),l=t.reduce((m,h)=>m.value<h.value?h:m,t[0]),c=o/t.length;return e.jsxs("div",{className:"mt-5 grid grid-cols-3 divide-x divide-oai-gray-100 border-y border-oai-gray-100 py-3.5 dark:divide-oai-gray-800/80 dark:border-oai-gray-800/80",children:[e.jsx(f,{className:"pr-4",label:n("leaderboard.community.modal.daily_average"),value:i(c),title:r(c)}),e.jsx(f,{className:"px-4",label:`${n("leaderboard.community.modal.peak_day")} · ${l.day}`,value:i(l.value),title:r(l.value)}),e.jsx(f,{className:"pl-4",label:n("leaderboard.community.modal.active_30d"),value:p(s),title:Number(s).toLocaleString(),delta:a,deltaLabel:n("leaderboard.community.modal.vs_previous_week")})]})}function me({trendRows:t,mix:s,activeDevelopers30d:a,developerGrowthPct:i,formatTokens:r,formatTokensTooltip:o}){return!t.length&&!s.length?e.jsx(k,{}):e.jsxs("div",{children:[e.jsx(b,{detail:n("leaderboard.community.modal.utc_note"),children:n("leaderboard.community.modal.community_activity")}),e.jsx(W,{embedded:!0,rows:t,from:t[0]?.day,to:t.at(-1)?.day,chartHeightClass:"h-44"}),e.jsx(de,{trendRows:t,activeDevelopers30d:a,developerGrowthPct:i,formatTokens:r,formatTokensTooltip:o}),e.jsx(le,{rows:s,formatTokensTooltip:o})]})}function ce({rows:t,maxShare:s,formatTokens:a,formatTokensTooltip:i}){return t.length?e.jsx("div",{className:"space-y-0.5",children:t.map((r,o)=>e.jsx(T,{rank:o+1,dataAttrs:{"data-provider-rank":o+1,"data-provider-name":r.name},provider:String(r.name).toUpperCase(),name:r.name,fillWidth:Math.max((Number(r.share)||0)/s*100,2),share:r.share,tokens:a(r.tokens),tokensTitle:i(r.tokens)},r.name))}):e.jsx(k,{})}function xe({rows:t,maxShare:s,formatTokens:a,formatTokensTooltip:i}){return t.length?e.jsx("div",{className:"space-y-0.5",children:t.map((r,o)=>{const l=Number(r.share)||0;return e.jsx(T,{rank:o+1,dataAttrs:{"data-model-rank":o+1,"data-model-name":r.name},provider:oe(r.name),name:r.name,fillWidth:Math.max(l/s*100,2),share:l,tokens:a(r.tokens),tokensTitle:i(r.tokens)},r.name)})}):e.jsx(k,{})}function ue({name:t}){const s=String(t||"").toLowerCase();return s==="darwin"?e.jsx(U,{className:"size-3.5"}):s==="win32"?e.jsx(B,{className:"size-3.5"}):e.jsx(X,{className:"size-4","aria-hidden":"true"})}const he=.175,ye=.3;function ge({bands:t,formatTokensTooltip:s}){const a=t.reduce((r,o)=>Math.max(r,Number(o.developer_share)||0),0)||1,i=r=>`${n(`leaderboard.community.modal.band.${r.key}`)} · ${n("leaderboard.community.modal.developer_count",{count:p(r.developers)})} (${s(r.tokens)})`;return e.jsxs("div",{children:[e.jsx("div",{className:"flex gap-2 border-b border-oai-gray-200 dark:border-oai-gray-800",children:t.map((r,o)=>{const l=Number(r.developer_share)||0,c=Math.max(l/a*80,2);return e.jsxs("div",{className:"relative h-32 min-w-0 flex-1",title:i(r),children:[e.jsx("div",{role:"progressbar","aria-label":n("leaderboard.community.modal.developer_share_title",{share:u(l)}),"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":l,className:"absolute inset-x-0 bottom-0",style:{height:`${c}%`,backgroundColor:"var(--oai-blue)",opacity:ye+o*he}}),e.jsx("div",{className:"absolute inset-x-0 text-center text-xs font-medium tabular-nums text-oai-gray-700 dark:text-oai-gray-200",style:{bottom:`calc(${c}% + 4px)`},children:u(l)})]},r.key)})}),e.jsx("div",{className:"mt-2 flex gap-2",children:t.map(r=>e.jsxs("div",{className:"min-w-0 flex-1 text-center",title:i(r),children:[e.jsx("div",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",children:n(`leaderboard.community.modal.band.${r.key}`)}),e.jsx("div",{className:"truncate text-xs tabular-nums text-oai-gray-500 dark:text-oai-gray-400",children:p(r.developers)})]},r.key))})]})}function pe({bands:t,platforms:s,formatTokensTooltip:a}){return!t.length&&!s.length?e.jsx(k,{}):e.jsxs("div",{className:"space-y-8",children:[t.length?e.jsxs("div",{children:[e.jsx(b,{children:n("leaderboard.community.modal.usage_distribution")}),e.jsx(ge,{bands:t,formatTokensTooltip:a})]}):null,s.length?e.jsxs("div",{children:[e.jsx(b,{children:n("leaderboard.community.modal.platforms")}),e.jsx("div",{className:"space-y-0.5",children:s.map(i=>e.jsxs(A,{fillWidth:Math.max(Number(i.share)||0,1),share:i.share,ariaLabel:`${n(`leaderboard.community.modal.platform.${i.name}`)} ${u(i.share)}`,children:[e.jsxs("div",{className:"relative flex min-w-0 items-center gap-2.5",children:[e.jsx("span",{className:"grid size-6 shrink-0 place-items-center text-oai-gray-700 dark:text-oai-gray-200",children:e.jsx(ue,{name:i.name})}),e.jsx("span",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",children:n(`leaderboard.community.modal.platform.${i.name}`)})]}),e.jsxs("div",{className:"relative min-w-[4.5rem] text-right",children:[e.jsx("div",{className:"text-xs font-semibold text-oai-black tabular-nums dark:text-white",children:u(i.share)}),e.jsx("div",{className:"text-xs text-oai-gray-500 tabular-nums dark:text-oai-gray-400",title:Number(i.machines||0).toLocaleString(),children:n("leaderboard.community.modal.machine_count",{count:p(i.machines)})})]})]},i.name))})]}):null]})}function ve({isOpen:t,onClose:s,communityStats:a}){const{formatTokens:i,formatTokensTooltip:r}=F(),[o,l]=D.useState("overview"),c=a?.status==="ready",m=D.useMemo(()=>{if(!c)return null;const d=(Array.isArray(a.providers)?a.providers:[]).slice(0,O),x=(Array.isArray(a.topModels)?a.topModels:[]).slice(0,O),y=v=>v.reduce(($,L)=>Math.max($,Number(L.share)||0),0)||1;return{providers:d,models:x,providersMaxShare:y(d),modelsMaxShare:y(x),trendRows:(Array.isArray(a.dailyGrowth)?a.dailyGrowth:[]).map(v=>({day:ne(v.day),value:Number(v.tokens)||0})),mix:Array.isArray(a.tokenMix)?a.tokenMix:[],bands:Array.isArray(a.userDistribution)?a.userDistribution:[],platforms:Array.isArray(a.platforms)?a.platforms:[]}},[c,a]);if(!m)return null;const h=Number(a.tokenFloor)||0,N=Number(a.activeDevelopersTotal)||Number(a.totalEntries)||0,w=Number(a.tokens30d)||0,E=d=>{if(d.key!=="ArrowRight"&&d.key!=="ArrowLeft")return;d.preventDefault();const x=d.key==="ArrowRight"?1:-1,y=g[(g.indexOf(o)+x+g.length)%g.length];l(y),d.currentTarget.querySelector(`[data-tab-id="${y}"]`)?.focus()};return e.jsx(Z,{open:t,onOpenChange:d=>!d&&s(),children:e.jsxs(Y,{children:[e.jsx(H,{className:"fixed inset-0 z-[100] bg-black/50 backdrop-blur-[3px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),e.jsx(q,{className:"fixed inset-0 z-[101] flex items-center justify-center p-2 sm:p-5",children:e.jsxs(J,{className:"relative flex h-[min(42rem,92vh)] w-full max-w-xl flex-col overflow-hidden rounded-2xl bg-white shadow-2xl ring-1 ring-black/10 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-3 data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-3 data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:ring-white/10",children:[e.jsxs("header",{"data-testid":"community-metrics-header",className:"shrink-0 px-5 pt-5 sm:px-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Q,{className:"text-lg font-semibold tracking-[-0.02em] text-oai-black dark:text-white",children:n("leaderboard.community.modal.title")}),e.jsx(ee,{className:"sr-only",children:n("leaderboard.community.modal.description")})]}),e.jsx(ae,{className:"-mr-1 -mt-1 grid size-8 place-items-center rounded-full text-oai-gray-400 transition-colors hover:bg-black/5 hover:text-oai-black dark:hover:bg-white/10 dark:hover:text-white","aria-label":n("shared.dialog.close"),children:e.jsx(S,{className:"size-4"})})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-x-5",children:[e.jsx(j,{label:n("leaderboard.community.modal.total_tokens"),value:i(h),title:r(h)}),e.jsx(j,{label:n("leaderboard.community.modal.tokens_30d"),value:i(w),title:r(w),delta:a.tokenGrowthPct,deltaLabel:n("leaderboard.community.modal.vs_previous_week")}),e.jsx(j,{label:n("leaderboard.community.modal.contributors"),value:p(N),title:N.toLocaleString()})]}),e.jsx("div",{className:"mt-4 flex items-end overflow-x-auto border-b border-oai-gray-100 dark:border-oai-gray-900",role:"tablist","aria-label":n("leaderboard.community.modal.views"),onKeyDown:E,children:g.map(d=>{const x=o===d;return e.jsxs("button",{type:"button",role:"tab","data-tab-id":d,"aria-selected":x,tabIndex:x?0:-1,onClick:()=>l(d),className:`relative mr-5 h-10 shrink-0 text-sm font-medium transition-colors last:mr-0 ${x?"text-oai-black dark:text-white":"text-oai-gray-500 hover:text-oai-gray-700 dark:text-oai-gray-400 dark:hover:text-oai-gray-200"}`,children:[n(`leaderboard.community.modal.tab.${d}`),x?e.jsx(M.span,{layoutId:"community-metrics-tab-underline",className:"absolute inset-x-0 -bottom-px h-0.5 rounded-full bg-oai-black dark:bg-white",transition:{type:"spring",stiffness:420,damping:34}}):null]},d)})})]}),e.jsx("div",{"data-testid":"community-metrics-content",className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:e.jsxs(M.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.18,ease:[.16,1,.3,1]},className:"h-full",children:[o==="overview"?e.jsx(me,{trendRows:m.trendRows,mix:m.mix,activeDevelopers30d:Number(a.activeDevelopers30d)||0,developerGrowthPct:a.developerGrowthPct,formatTokens:i,formatTokensTooltip:r}):null,o==="providers"?e.jsx(ce,{rows:m.providers,maxShare:m.providersMaxShare,formatTokens:i,formatTokensTooltip:r}):null,o==="community"?e.jsx(pe,{bands:m.bands,platforms:m.platforms,formatTokensTooltip:r}):null,o==="models"?e.jsx(xe,{rows:m.models,maxShare:m.modelsMaxShare,formatTokens:i,formatTokensTooltip:r}):null]},o)})]})})]})})}function Ke(t){return e.jsx(P,{mode:z.COMPACT,children:e.jsx(ve,{...t})})}export{Ke as CommunityStatsModal};
1
+ import{m as R,j as e,Z as P,n as z,r as D,c as n,X as S,l as K}from"./__vite-browser-external-BFNWaGsk.js";import{m as M}from"./react-Djb4VGKb.js";import{A as U,W as B}from"./icons-Ccf5W0AL.js";import{u as F}from"./useTokenFormat-BHjcMgm8.js";import{P as G}from"./ProviderIcon-BTkdx9o2.js";import{T as W}from"./TrendMonitor-CnIsuxV-.js";import{T as V}from"./AchievementBadge-BGA-HT_B.js";import{T as X}from"./terminal-Dlpdp5Az.js";import{D as Z,a as Y,b as H,c as q,d as J,e as Q}from"./DialogTitle-CVddcRPZ.js";import{D as ee}from"./DialogDescription-Cof52Icj.js";import{D as ae}from"./DialogClose-BltQpaJo.js";import"./useCurrency-DSc3A_Ih.js";import"./use-latest-request-guard-Cs44WPfL.js";import"./PopoverPopup-DHoK6UJZ.js";import"./store-CBxkOqRe.js";import"./composite-qxBzts0W.js";import"./ToolbarRootContext-BZkTiBJB.js";import"./maximize-2-CjMPt5kU.js";import"./use-reduced-motion-DrlJ9X6p.js";import"./zap-BE8i_wu2.js";import"./flame-CIvk0SP5.js";const C={name:"trending-down",size:24,node:[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]};C.node;const te=R(C),O=10,_={input:"var(--community-token-input)",cache_read:"var(--community-token-cache-read)",cache_write:"var(--community-token-cache-write)",output:"var(--community-token-output)",reasoning:"var(--community-token-reasoning)"},re={CLAUDE:"var(--community-claude)",CODEX:"var(--community-codex)",GEMINI:"var(--community-gemini)",CURSOR:"var(--community-cursor)",OPENCODE:"var(--community-opencode)",HERMES:"var(--community-hermes)",KIMI:"var(--community-kimi)",MIMO:"var(--community-mimo)",COPILOT:"var(--community-copilot)",KIRO:"var(--community-kiro)",GROK:"var(--community-grok)",DEEPSEEK:"var(--community-deepseek)",ZCODE:"var(--community-zcode)",WORKBUDDY:"var(--community-workbuddy)",MINIMAX:"var(--community-minimax)",DROID:"var(--community-droid)"};function ie(t){return re[String(t||"").toUpperCase()]||"var(--community-muted)"}const se=[[/claude|fable|opus|sonnet|haiku/,"CLAUDE"],[/gpt|codex|o3|o4/,"CODEX"],[/gemini/,"GEMINI"],[/composer|cursor/,"CURSOR"],[/kimi/,"KIMI"],[/mimo/,"MIMO"],[/copilot/,"COPILOT"],[/kiro/,"KIRO"],[/grok/,"GROK"],[/deepseek/,"DEEPSEEK"],[/glm/,"ZCODE"],[/hy3/,"WORKBUDDY"],[/minimax/,"MINIMAX"]],g=["overview","providers","community","models"];function oe(t){const s=String(t||"").toLowerCase(),a=se.find(([i])=>i.test(s));return a?a[1]:""}function u(t){const s=Number(t);return Number.isFinite(s)?`${s.toFixed(1)}%`:"—"}function p(t){return K(Number(t)||0)}function ne(t){return t?new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"}):""}function k(){return e.jsx("div",{className:"flex h-full min-h-40 items-center justify-center text-xs text-oai-gray-400",children:n("leaderboard.community.modal.no_data")})}function b({children:t,detail:s}){return e.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-4",children:[e.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-oai-gray-500 dark:text-oai-gray-400",children:t}),s?e.jsx("span",{className:"text-xs text-oai-gray-400",children:s}):null]})}function I({value:t,label:s}){const a=Number(t);if(!Number.isFinite(a))return null;const i=Math.sign(a)!==-1,r=i?V:te;return e.jsxs("span",{className:`inline-flex items-center gap-1 text-xs font-medium tabular-nums ${i?"text-emerald-600 dark:text-emerald-400":"text-rose-600 dark:text-rose-400"}`,title:s,children:[e.jsx(r,{className:"size-3","aria-hidden":"true"}),i?"+":"",a.toFixed(1),"%"]})}function j({label:t,value:s,title:a,delta:i,deltaLabel:r}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-xs font-medium text-oai-gray-500 dark:text-oai-gray-400",children:t}),e.jsxs("div",{className:"mt-1 flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"truncate text-xl font-semibold leading-none tracking-tight text-oai-black tabular-nums dark:text-white",title:a,children:s}),e.jsx(I,{value:i,label:r})]})]})}function A({fillWidth:t,share:s,color:a="var(--oai-blue)",ariaLabel:i,dataAttrs:r,children:o}){return e.jsxs("div",{...r,className:"group relative grid min-h-11 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 overflow-hidden px-2.5 transition-colors hover:bg-oai-gray-50 dark:hover:bg-oai-gray-900/60",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 opacity-[0.15] transition-opacity group-hover:opacity-[0.22] dark:opacity-[0.24] dark:group-hover:opacity-[0.32]",style:{width:`${t}%`,backgroundColor:a},role:"progressbar","aria-label":i,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":Number(s)||0}),o]})}function T({rank:t,provider:s,name:a,fillWidth:i,share:r,tokens:o,tokensTitle:l,dataAttrs:c}){return e.jsxs(A,{fillWidth:i,share:r,color:ie(s),ariaLabel:`${a} ${u(r)}`,dataAttrs:c,children:[e.jsxs("div",{className:"relative flex min-w-0 items-center gap-2.5",children:[e.jsx("span",{className:`w-5 shrink-0 text-xs tabular-nums ${t<=3?"font-semibold text-oai-gray-700 dark:text-oai-gray-200":"text-oai-gray-400"}`,children:t}),e.jsx("span",{className:"grid size-6 shrink-0 place-items-center text-oai-gray-700 dark:text-oai-gray-200",children:e.jsx(G,{provider:s,size:15})}),e.jsx("span",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",title:a,children:a})]}),e.jsxs("div",{className:"relative min-w-[4.5rem] text-right",children:[e.jsx("div",{className:"text-xs font-semibold text-oai-black tabular-nums dark:text-white",title:l,children:o}),e.jsx("div",{className:"text-xs text-oai-gray-500 tabular-nums dark:text-oai-gray-400",children:u(r)})]})]})}function le({rows:t,formatTokensTooltip:s}){return t.length?e.jsxs("div",{className:"mt-7",children:[e.jsx(b,{children:n("leaderboard.community.modal.token_mix")}),e.jsx("div",{className:"flex h-1.5 overflow-hidden bg-oai-gray-100 dark:bg-oai-gray-800",children:t.map(a=>e.jsx("div",{style:{width:`${Math.max(Number(a.share)||0,0)}%`,backgroundColor:_[a.key]||"var(--community-muted)"},title:`${n(`leaderboard.community.modal.token_mix.${a.key}`)} · ${u(a.share)}`},a.key))}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-1.5",children:t.map(a=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",title:s(a.tokens),children:[e.jsx("span",{className:"size-2",style:{backgroundColor:_[a.key]||"var(--community-muted)"}}),n(`leaderboard.community.modal.token_mix.${a.key}`),e.jsx("span",{className:"tabular-nums text-oai-gray-700 dark:text-oai-gray-200",children:u(a.share)})]},a.key))})]}):null}function f({label:t,value:s,title:a,delta:i,deltaLabel:r,className:o=""}){return e.jsxs("div",{className:`min-w-0 ${o}`,children:[e.jsx("div",{className:"truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:t}),e.jsxs("div",{className:"mt-1 flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"truncate text-base font-semibold leading-none tracking-tight tabular-nums text-oai-black dark:text-white",title:a,children:s}),e.jsx(I,{value:i,label:r})]})]})}function de({trendRows:t,activeDevelopers30d:s,developerGrowthPct:a,formatTokens:i,formatTokensTooltip:r}){if(!t.length)return null;const o=t.reduce((m,h)=>m+h.value,0),l=t.reduce((m,h)=>m.value<h.value?h:m,t[0]),c=o/t.length;return e.jsxs("div",{className:"mt-5 grid grid-cols-3 divide-x divide-oai-gray-100 border-y border-oai-gray-100 py-3.5 dark:divide-oai-gray-800/80 dark:border-oai-gray-800/80",children:[e.jsx(f,{className:"pr-4",label:n("leaderboard.community.modal.daily_average"),value:i(c),title:r(c)}),e.jsx(f,{className:"px-4",label:`${n("leaderboard.community.modal.peak_day")} · ${l.day}`,value:i(l.value),title:r(l.value)}),e.jsx(f,{className:"pl-4",label:n("leaderboard.community.modal.active_30d"),value:p(s),title:Number(s).toLocaleString(),delta:a,deltaLabel:n("leaderboard.community.modal.vs_previous_week")})]})}function me({trendRows:t,mix:s,activeDevelopers30d:a,developerGrowthPct:i,formatTokens:r,formatTokensTooltip:o}){return!t.length&&!s.length?e.jsx(k,{}):e.jsxs("div",{children:[e.jsx(b,{detail:n("leaderboard.community.modal.utc_note"),children:n("leaderboard.community.modal.community_activity")}),e.jsx(W,{embedded:!0,rows:t,from:t[0]?.day,to:t.at(-1)?.day,chartHeightClass:"h-44"}),e.jsx(de,{trendRows:t,activeDevelopers30d:a,developerGrowthPct:i,formatTokens:r,formatTokensTooltip:o}),e.jsx(le,{rows:s,formatTokensTooltip:o})]})}function ce({rows:t,maxShare:s,formatTokens:a,formatTokensTooltip:i}){return t.length?e.jsx("div",{className:"space-y-0.5",children:t.map((r,o)=>e.jsx(T,{rank:o+1,dataAttrs:{"data-provider-rank":o+1,"data-provider-name":r.name},provider:String(r.name).toUpperCase(),name:r.name,fillWidth:Math.max((Number(r.share)||0)/s*100,2),share:r.share,tokens:a(r.tokens),tokensTitle:i(r.tokens)},r.name))}):e.jsx(k,{})}function xe({rows:t,maxShare:s,formatTokens:a,formatTokensTooltip:i}){return t.length?e.jsx("div",{className:"space-y-0.5",children:t.map((r,o)=>{const l=Number(r.share)||0;return e.jsx(T,{rank:o+1,dataAttrs:{"data-model-rank":o+1,"data-model-name":r.name},provider:oe(r.name),name:r.name,fillWidth:Math.max(l/s*100,2),share:l,tokens:a(r.tokens),tokensTitle:i(r.tokens)},r.name)})}):e.jsx(k,{})}function ue({name:t}){const s=String(t||"").toLowerCase();return s==="darwin"?e.jsx(U,{className:"size-3.5"}):s==="win32"?e.jsx(B,{className:"size-3.5"}):e.jsx(X,{className:"size-4","aria-hidden":"true"})}const he=.175,ye=.3;function ge({bands:t,formatTokensTooltip:s}){const a=t.reduce((r,o)=>Math.max(r,Number(o.developer_share)||0),0)||1,i=r=>`${n(`leaderboard.community.modal.band.${r.key}`)} · ${n("leaderboard.community.modal.developer_count",{count:p(r.developers)})} (${s(r.tokens)})`;return e.jsxs("div",{children:[e.jsx("div",{className:"flex gap-2 border-b border-oai-gray-200 dark:border-oai-gray-800",children:t.map((r,o)=>{const l=Number(r.developer_share)||0,c=Math.max(l/a*80,2);return e.jsxs("div",{className:"relative h-32 min-w-0 flex-1",title:i(r),children:[e.jsx("div",{role:"progressbar","aria-label":n("leaderboard.community.modal.developer_share_title",{share:u(l)}),"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":l,className:"absolute inset-x-0 bottom-0",style:{height:`${c}%`,backgroundColor:"var(--oai-blue)",opacity:ye+o*he}}),e.jsx("div",{className:"absolute inset-x-0 text-center text-xs font-medium tabular-nums text-oai-gray-700 dark:text-oai-gray-200",style:{bottom:`calc(${c}% + 4px)`},children:u(l)})]},r.key)})}),e.jsx("div",{className:"mt-2 flex gap-2",children:t.map(r=>e.jsxs("div",{className:"min-w-0 flex-1 text-center",title:i(r),children:[e.jsx("div",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",children:n(`leaderboard.community.modal.band.${r.key}`)}),e.jsx("div",{className:"truncate text-xs tabular-nums text-oai-gray-500 dark:text-oai-gray-400",children:p(r.developers)})]},r.key))})]})}function pe({bands:t,platforms:s,formatTokensTooltip:a}){return!t.length&&!s.length?e.jsx(k,{}):e.jsxs("div",{className:"space-y-8",children:[t.length?e.jsxs("div",{children:[e.jsx(b,{children:n("leaderboard.community.modal.usage_distribution")}),e.jsx(ge,{bands:t,formatTokensTooltip:a})]}):null,s.length?e.jsxs("div",{children:[e.jsx(b,{children:n("leaderboard.community.modal.platforms")}),e.jsx("div",{className:"space-y-0.5",children:s.map(i=>e.jsxs(A,{fillWidth:Math.max(Number(i.share)||0,1),share:i.share,ariaLabel:`${n(`leaderboard.community.modal.platform.${i.name}`)} ${u(i.share)}`,children:[e.jsxs("div",{className:"relative flex min-w-0 items-center gap-2.5",children:[e.jsx("span",{className:"grid size-6 shrink-0 place-items-center text-oai-gray-700 dark:text-oai-gray-200",children:e.jsx(ue,{name:i.name})}),e.jsx("span",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",children:n(`leaderboard.community.modal.platform.${i.name}`)})]}),e.jsxs("div",{className:"relative min-w-[4.5rem] text-right",children:[e.jsx("div",{className:"text-xs font-semibold text-oai-black tabular-nums dark:text-white",children:u(i.share)}),e.jsx("div",{className:"text-xs text-oai-gray-500 tabular-nums dark:text-oai-gray-400",title:Number(i.machines||0).toLocaleString(),children:n("leaderboard.community.modal.machine_count",{count:p(i.machines)})})]})]},i.name))})]}):null]})}function ve({isOpen:t,onClose:s,communityStats:a}){const{formatTokens:i,formatTokensTooltip:r}=F(),[o,l]=D.useState("overview"),c=a?.status==="ready",m=D.useMemo(()=>{if(!c)return null;const d=(Array.isArray(a.providers)?a.providers:[]).slice(0,O),x=(Array.isArray(a.topModels)?a.topModels:[]).slice(0,O),y=v=>v.reduce(($,L)=>Math.max($,Number(L.share)||0),0)||1;return{providers:d,models:x,providersMaxShare:y(d),modelsMaxShare:y(x),trendRows:(Array.isArray(a.dailyGrowth)?a.dailyGrowth:[]).map(v=>({day:ne(v.day),value:Number(v.tokens)||0})),mix:Array.isArray(a.tokenMix)?a.tokenMix:[],bands:Array.isArray(a.userDistribution)?a.userDistribution:[],platforms:Array.isArray(a.platforms)?a.platforms:[]}},[c,a]);if(!m)return null;const h=Number(a.tokenFloor)||0,N=Number(a.activeDevelopersTotal)||Number(a.totalEntries)||0,w=Number(a.tokens30d)||0,E=d=>{if(d.key!=="ArrowRight"&&d.key!=="ArrowLeft")return;d.preventDefault();const x=d.key==="ArrowRight"?1:-1,y=g[(g.indexOf(o)+x+g.length)%g.length];l(y),d.currentTarget.querySelector(`[data-tab-id="${y}"]`)?.focus()};return e.jsx(Z,{open:t,onOpenChange:d=>!d&&s(),children:e.jsxs(Y,{children:[e.jsx(H,{className:"fixed inset-0 z-[100] bg-black/50 backdrop-blur-[3px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),e.jsx(q,{className:"fixed inset-0 z-[101] flex items-center justify-center p-2 sm:p-5",children:e.jsxs(J,{className:"relative flex h-[min(42rem,92vh)] w-full max-w-xl flex-col overflow-hidden rounded-2xl bg-white shadow-2xl ring-1 ring-black/10 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-3 data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-3 data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:ring-white/10",children:[e.jsxs("header",{"data-testid":"community-metrics-header",className:"shrink-0 px-5 pt-5 sm:px-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Q,{className:"text-lg font-semibold tracking-[-0.02em] text-oai-black dark:text-white",children:n("leaderboard.community.modal.title")}),e.jsx(ee,{className:"sr-only",children:n("leaderboard.community.modal.description")})]}),e.jsx(ae,{className:"-mr-1 -mt-1 grid size-8 place-items-center rounded-full text-oai-gray-400 transition-colors hover:bg-black/5 hover:text-oai-black dark:hover:bg-white/10 dark:hover:text-white","aria-label":n("shared.dialog.close"),children:e.jsx(S,{className:"size-4"})})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-x-5",children:[e.jsx(j,{label:n("leaderboard.community.modal.total_tokens"),value:i(h),title:r(h)}),e.jsx(j,{label:n("leaderboard.community.modal.tokens_30d"),value:i(w),title:r(w),delta:a.tokenGrowthPct,deltaLabel:n("leaderboard.community.modal.vs_previous_week")}),e.jsx(j,{label:n("leaderboard.community.modal.contributors"),value:p(N),title:N.toLocaleString()})]}),e.jsx("div",{className:"mt-4 flex items-end overflow-x-auto border-b border-oai-gray-100 dark:border-oai-gray-900",role:"tablist","aria-label":n("leaderboard.community.modal.views"),onKeyDown:E,children:g.map(d=>{const x=o===d;return e.jsxs("button",{type:"button",role:"tab","data-tab-id":d,"aria-selected":x,tabIndex:x?0:-1,onClick:()=>l(d),className:`relative mr-5 h-10 shrink-0 text-sm font-medium transition-colors last:mr-0 ${x?"text-oai-black dark:text-white":"text-oai-gray-500 hover:text-oai-gray-700 dark:text-oai-gray-400 dark:hover:text-oai-gray-200"}`,children:[n(`leaderboard.community.modal.tab.${d}`),x?e.jsx(M.span,{layoutId:"community-metrics-tab-underline",className:"absolute inset-x-0 -bottom-px h-0.5 rounded-full bg-oai-black dark:bg-white",transition:{type:"spring",stiffness:420,damping:34}}):null]},d)})})]}),e.jsx("div",{"data-testid":"community-metrics-content",className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:e.jsxs(M.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.18,ease:[.16,1,.3,1]},className:"h-full",children:[o==="overview"?e.jsx(me,{trendRows:m.trendRows,mix:m.mix,activeDevelopers30d:Number(a.activeDevelopers30d)||0,developerGrowthPct:a.developerGrowthPct,formatTokens:i,formatTokensTooltip:r}):null,o==="providers"?e.jsx(ce,{rows:m.providers,maxShare:m.providersMaxShare,formatTokens:i,formatTokensTooltip:r}):null,o==="community"?e.jsx(pe,{bands:m.bands,platforms:m.platforms,formatTokensTooltip:r}):null,o==="models"?e.jsx(xe,{rows:m.models,maxShare:m.modelsMaxShare,formatTokens:i,formatTokensTooltip:r}):null]},o)})]})})]})})}function Ke(t){return e.jsx(P,{mode:z.COMPACT,children:e.jsx(ve,{...t})})}export{Ke as CommunityStatsModal};
@@ -1 +1 @@
1
- import{j as a,B as r,e as p}from"./__vite-browser-external-BDugA6I0.js";import{D as m,a as y,b,c as u,d as f,e as h}from"./DialogTitle-BJxpp2t-.js";import{D as j}from"./DialogDescription-haPz7CX9.js";function _({open:l,title:n,description:t,error:s=null,confirmLabel:d,cancelLabel:o,destructive:c=!1,busy:e=!1,onConfirm:g,onCancel:i}){return a.jsx(m,{open:l,onOpenChange:x=>{!x&&!e&&i?.()},children:a.jsxs(y,{children:[a.jsx(b,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(u,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(f,{className:"relative w-full max-w-md rounded-2xl bg-white p-6 shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)] dark:ring-oai-gray-800",children:[a.jsx(h,{className:"text-base font-semibold text-oai-black dark:text-white",children:n}),t?a.jsx(j,{className:"mt-2 text-sm leading-6 text-oai-gray-600 dark:text-oai-gray-300",children:t}):null,s?a.jsx("p",{className:"mt-2 text-sm leading-6 text-red-600 dark:text-red-400",role:"alert",children:s}):null,a.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[a.jsx(r,{type:"button",variant:"secondary",size:"sm",disabled:e,onClick:()=>i?.(),children:o}),a.jsx(r,{type:"button",size:"sm",disabled:e,onClick:()=>g?.(),className:p(c&&"!bg-red-600 hover:!bg-red-700 focus-visible:!outline-red-600 dark:!bg-red-600 dark:hover:!bg-red-500"),children:d})]})]})})]})})}export{_ as C};
1
+ import{j as a,B as r,e as p}from"./__vite-browser-external-BFNWaGsk.js";import{D as m,a as y,b,c as u,d as f,e as h}from"./DialogTitle-CVddcRPZ.js";import{D as j}from"./DialogDescription-Cof52Icj.js";function _({open:l,title:n,description:t,error:s=null,confirmLabel:d,cancelLabel:o,destructive:c=!1,busy:e=!1,onConfirm:g,onCancel:i}){return a.jsx(m,{open:l,onOpenChange:x=>{!x&&!e&&i?.()},children:a.jsxs(y,{children:[a.jsx(b,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(u,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(f,{className:"relative w-full max-w-md rounded-2xl bg-white p-6 shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)] dark:ring-oai-gray-800",children:[a.jsx(h,{className:"text-base font-semibold text-oai-black dark:text-white",children:n}),t?a.jsx(j,{className:"mt-2 text-sm leading-6 text-oai-gray-600 dark:text-oai-gray-300",children:t}):null,s?a.jsx("p",{className:"mt-2 text-sm leading-6 text-red-600 dark:text-red-400",role:"alert",children:s}):null,a.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[a.jsx(r,{type:"button",variant:"secondary",size:"sm",disabled:e,onClick:()=>i?.(),children:o}),a.jsx(r,{type:"button",size:"sm",disabled:e,onClick:()=>g?.(),className:p(c&&"!bg-red-600 hover:!bg-red-700 focus-visible:!outline-red-600 dark:!bg-red-600 dark:hover:!bg-red-500"),children:d})]})]})})]})})}export{_ as C};
@@ -1 +1 @@
1
- import{r as o,W as m,Y as g,M as b,N as u,K as f,U as h,j as a,e as x}from"./__vite-browser-external-BDugA6I0.js";import{C as y}from"./Card-C8IdDvlg.js";function N(){const[t,s]=o.useState(null),e=m()&&g();o.useEffect(()=>{if(!e)return;const i=b(n=>s(n));return u(),i},[e]);const r=o.useCallback((i,n)=>{e&&(s(c=>c&&{...c,[i]:n}),f(i,n))},[e]),l=o.useCallback(i=>{e&&h(i)},[e]),d=o.useCallback(()=>{e&&u()},[e]);return{available:e,settings:t,setSetting:r,runAction:l,refresh:d}}function j({checked:t,onChange:s,disabled:e,ariaLabel:r}){return a.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":r,onClick:s,disabled:e,className:x("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50 disabled:cursor-not-allowed",t?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:a.jsx("span",{className:x("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",t?"translate-x-[18px]":"translate-x-[3px]")})})}function k({label:t,hint:s,control:e}){return a.jsxs("div",{className:"flex flex-col gap-2 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:t}),s?a.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),a.jsx("div",{className:"self-end sm:shrink-0 sm:self-auto",children:e})]})}function w({title:t,subtitle:s,action:e,children:r}){return a.jsxs(y,{className:"rounded-lg",children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:t}),s?a.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),e?a.jsx("div",{className:"shrink-0",children:e}):null]}),a.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:r})]})}function S({options:t,value:s,onChange:e,disabled:r=!1}){return a.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:t.map(({value:l,label:d,Icon:i})=>{const n=s===l;return a.jsxs("button",{type:"button",onClick:()=>e(l),"aria-pressed":n,disabled:r,className:x("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",n?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[i?a.jsx(i,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,a.jsx("span",{children:d})]},l)})})}export{S,j as T,w as a,k as b,N as u};
1
+ import{r as o,W as m,Y as g,M as b,N as u,K as f,U as h,j as a,e as x}from"./__vite-browser-external-BFNWaGsk.js";import{C as y}from"./Card-CIoJYi2j.js";function N(){const[t,s]=o.useState(null),e=m()&&g();o.useEffect(()=>{if(!e)return;const i=b(n=>s(n));return u(),i},[e]);const r=o.useCallback((i,n)=>{e&&(s(c=>c&&{...c,[i]:n}),f(i,n))},[e]),l=o.useCallback(i=>{e&&h(i)},[e]),d=o.useCallback(()=>{e&&u()},[e]);return{available:e,settings:t,setSetting:r,runAction:l,refresh:d}}function j({checked:t,onChange:s,disabled:e,ariaLabel:r}){return a.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":r,onClick:s,disabled:e,className:x("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50 disabled:cursor-not-allowed",t?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:a.jsx("span",{className:x("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",t?"translate-x-[18px]":"translate-x-[3px]")})})}function k({label:t,hint:s,control:e}){return a.jsxs("div",{className:"flex flex-col gap-2 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:t}),s?a.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),a.jsx("div",{className:"self-end sm:shrink-0 sm:self-auto",children:e})]})}function w({title:t,subtitle:s,action:e,children:r}){return a.jsxs(y,{className:"rounded-lg",children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:t}),s?a.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),e?a.jsx("div",{className:"shrink-0",children:e}):null]}),a.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:r})]})}function S({options:t,value:s,onChange:e,disabled:r=!1}){return a.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:t.map(({value:l,label:d,Icon:i})=>{const n=s===l;return a.jsxs("button",{type:"button",onClick:()=>e(l),"aria-pressed":n,disabled:r,className:x("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",n?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[i?a.jsx(i,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,a.jsx("span",{children:d})]},l)})})}export{S,j as T,w as a,k as b,N as u};