tokentracker-cli 0.88.8 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +4 -4
- package/README.ja.md +3 -3
- package/README.ko.md +3 -3
- package/README.md +6 -5
- package/README.zh-CN.md +5 -4
- package/dashboard/dist/assets/{AchievementBadge-CzfK_8kl.js → AchievementBadge-BpDy2XSt.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-PVft5lyI.js → AchievementsPage-Z3rNbZAL.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-DyzHGzys.js → AchievementsSection-Cawmrzgp.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-CFsRpXG1.js → BadgeDetailModal-D8IPOyzs.js} +1 -1
- package/dashboard/dist/assets/{Card-Bi9dmQTP.js → Card-Bco5i8Fn.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-BxcZjV9b.js → ClawdAnimated-RQvg50Wr.js} +1 -1
- package/dashboard/dist/assets/{CommandPalette-DHVK5yTu.js → CommandPalette-DWLyd7P_.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-BmMh7Avp.js → CommunityStatsModal-DfjsjuRG.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-BjTQXMg4.js → ConfirmModal-DNuSWkt3.js} +1 -1
- package/dashboard/dist/assets/{Controls-CZUbEggT.js → Controls-DdLHdkEz.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-C3x4Hew6.js → DashboardPage-DN54xqEE.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-1qf6aiEH.js → DevicePage-ydAtX5oZ.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-CRrlkVf0.js → DialogClose-C40Az_dd.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-CNfc42U-.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-DhGyZ0Ue.js → DialogTitle-CCg6RvL8.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-M8ECNbPG.js → FadeIn-a7dOxD0I.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-BKtQc1Si.js → HeaderGithubStar-DmH6JYQF.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-Bo1zVtke.js → HoverTooltip-D3yTRqfx.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-B78HcgA1.js → IpCheckPage-DH4av7RV.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DSlanH3Y.js → LandingPage-B1fuvkPh.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-Cs4IYwTC.js → LeaderboardAvatar-C-tKTfIs.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-DXlo-PNE.js → LeaderboardPage-CL7Cre5j.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-CVM6FjLt.js → LeaderboardProfileModal-CqRvLdEB.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-BO-MTMcH.js → LeaderboardProfilePage-BDjW5z87.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BohIYn9J.js → LimitsPage-D533J_we.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-BQ7eYwB8.js → LocalOnlyNotice-CQDKfXwB.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-DhOJyCcc.js → LoginCard-CptsVdtq.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-Dfo2DSA9.js → LoginModal-8V4Vsgpr.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-CN-cXdsD.js → LoginPage-DIwzC_95.js} +1 -1
- package/dashboard/dist/assets/{PetPage-CQY2YUNm.js → PetPage-CXSq_C6b.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-D0bYgqkq.js → PopoverPopup-C_6kkB4_.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-BfiriW8d.js → ProviderIcon-BKGMzdEg.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-CQyX1BF6.js → ResetPasswordPage-BThSQVj7.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-DWhf_XGR.js → SegmentedControl-DdIw-7OY.js} +1 -1
- package/dashboard/dist/assets/{Select-Dy6krqIZ.js → Select-BuxVjVTV.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-D1296h92.js → SelectItemText-B7AP9a2t.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-BgC3i1y-.js → ServiceStatusPage-Db6XpKGJ.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-Dyq0Q8tm.js → SessionsPage-CIvvinQm.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-QCZksfny.js → SettingsPage-DZo5FGJE.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-BUWMr2_o.js → SkillsPage-2rr2nzvc.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-BHauFZfa.js → TokenGalaxy-WS2JBmzs.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-1sViYfay.js → ToolbarRootContext-B5s-ucZR.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-DM26Zn7d.js → TrendMonitor-DfgZi0b3.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-DhjPczRN.js → WidgetsPage-WWaK3S0S.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-BsEFzfrx.js → WrappedPage-C3C85NLm.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-BW4ueyBB.js → __vite-browser-external-B-CAZ5HB.js} +2 -2
- package/dashboard/dist/assets/{agent-logos-IRTgTlkV.js → agent-logos-Do1kFgsi.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-BapNuXPQ.js → arrow-up-right-DbomORWZ.js} +1 -1
- package/dashboard/dist/assets/{check-lpIv67Hh.js → check-DzEvx9pJ.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-jYAPg2OX.js → chevron-right-DZTnF2NM.js} +1 -1
- package/dashboard/dist/assets/{copy-CEdsXYF2.js → copy-BS7rQ_jR.js} +1 -1
- package/dashboard/dist/assets/{download-CGJA0mZj.js → download-DlWVR14_.js} +1 -1
- package/dashboard/dist/assets/{external-link-DTmmieCB.js → external-link-CtVBRLbf.js} +1 -1
- package/dashboard/dist/assets/{flame-C-orSEmd.js → flame-Bd3FUTdZ.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-BQuK3UBV.js → format-tokens--QLNTkZB.js} +1 -1
- package/dashboard/dist/assets/{icons-DuVOMXCd.js → icons-Cs8SXqmU.js} +1 -1
- package/dashboard/dist/assets/{index-CKG-dDk-.js → index-CfS3tuU1.js} +1 -1
- package/dashboard/dist/assets/{index-5hluBV6Y.js → index-Cj7qHXa4.js} +1 -1
- package/dashboard/dist/assets/{index-DvLGX2GN.js → index-DoTYGePn.js} +1 -1
- package/dashboard/dist/assets/{info-EKHZ3tlo.js → info-CsAt6S8y.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-DgnwvabV.js → limits-providers-Czh_yu22.js} +1 -1
- package/dashboard/dist/assets/{link-2-A2f7492I.js → link-2-CjC85wrH.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-DiBM_0cy.js → loader-circle-Cf0h8jN7.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-CmJrrSbJ.js → maximize-2-DSLJns7Q.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-v5P5znue.js → modifiers.esm-2DRBUt-i.js} +1 -1
- package/dashboard/dist/assets/{monitor-smartphone-jmB0EaLx.js → monitor-smartphone-DitUxFt7.js} +1 -1
- package/dashboard/dist/assets/{provider-display-BJXN_8Ft.js → provider-display-Dm_uiVV1.js} +1 -1
- package/dashboard/dist/assets/{react-DRhZt4b6.js → react-CExpcnBO.js} +1 -1
- package/dashboard/dist/assets/{search-D9j_51N0.js → search-S2Q8oj2Y.js} +1 -1
- package/dashboard/dist/assets/{skills-api-Dywy4E7M.js → skills-api-C3mlKc8x.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-BYYlH2M3.js → sortable.esm-22qRLWIc.js} +1 -1
- package/dashboard/dist/assets/{store-Dt6GNo2E.js → store-DktMCl4T.js} +1 -1
- package/dashboard/dist/assets/{terminal-BfWjr1gW.js → terminal-DS6Tqgok.js} +1 -1
- package/dashboard/dist/assets/{trash-2-Ceal5Y6z.js → trash-2-BHgzn2Bd.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-2G4i1ZwJ.js → use-community-stats-DqQQKHPK.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs--qpfQM72.js → use-limits-display-prefs-C2fbOm_s.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-BRg8W35v.js → use-ordered-list-BnIpnofG.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-oDsUC_PJ.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-DHwJtj_8.js → use-session-efficiency-pref-B78vQ2pp.js} +1 -1
- package/dashboard/dist/assets/{use-transform-DaIhV0Zy.js → use-transform-DJeSBZmb.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-COggDJdz.js → use-usage-limits-BkSQGzCV.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-0g-kQuZf.js → useCurrency-BY7ZJ-XD.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-CMMjcyJf.js → useScrollLock-CHsj-WN5.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-BuVZXkVC.js → useTokenFormat-CVJJAs3R.js} +1 -1
- package/dashboard/dist/assets/{zap-BhYCdFZP.js → zap-Dtudxu92.js} +1 -1
- package/dashboard/dist/index.html +28 -25
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/llms.txt +3 -2
- package/dashboard/dist/share.html +1 -1
- package/package.json +2 -2
- package/src/commands/init.js +1 -0
- package/src/commands/sync.js +3 -1
- package/src/lib/local-api.js +3 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +23 -10
- package/dashboard/dist/assets/DialogDescription-tD0gEESM.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-BDYfqZDy.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as c}from"./__vite-browser-external-
|
|
1
|
+
import{m as c}from"./__vite-browser-external-B-CAZ5HB.js";const e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o=c("search",e);export{o as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as E,N as I,O as R,P as $}from"./__vite-browser-external-
|
|
1
|
+
import{M as E,N as I,O as R,P as $}from"./__vite-browser-external-B-CAZ5HB.js";function s(e){return typeof e=="string"?e.trim():""}function g(e){return Array.isArray(e)?[...new Set(e.map(s).filter(Boolean))]:[]}function v(e){const t=s(e).replace(/\\/g,"/");if(!t||t.startsWith("/")||/^[A-Za-z]:\//.test(t))return"";const n=t.replace(/\/+$/g,"").split("/").filter(Boolean);return!n.length||n.some(r=>r==="."||r==="..")?"":n.join("/")}function C(e){const t=s(e).replace(/\\/g,"/");return!t||t.startsWith("/")||t.includes(":/")||/[A-Za-z]:\//.test(t)?"":t}function S(e){return s(e?.key)||s(e?.id)||`local:${s(e?.directory)}`}function L(e){return(Array.isArray(e)?e:[]).filter(t=>t?.scope!=="system").map(t=>{const n=v(t?.directory),r=C(S(t));if(!r||!n)return null;const i=t?.scope==="plugin"?"plugin":t?.managed?"managed":"local",o=v(t?.sourceName);return{key:r,name:s(t?.name)||n.split("/").pop()||"Skill",directory:n,targets:g(t?.targets),managed:t?.managed===!0,readOnly:t?.readOnly===!0,scope:i,...o?{sourceName:o}:{}}}).filter(t=>!!t)}function N(e){return{id:s(e?.id),name:s(e?.device_name)||s(e?.id),platform:s(e?.platform)||null,scannedAt:s(e?.scanned_at)||null}}function m(e,t){const n=Array.isArray(e.deviceSources)?e.deviceSources:[];return n.some(r=>r.id===t.id)?e:{...e,deviceSources:[...n,t]}}function q(e,t,n){const r=(Array.isArray(e)?e:[]).filter(o=>o?.scope!=="system").map(o=>({...o})),i=new Map;r.forEach((o,a)=>i.set(S(o).toLowerCase(),a));for(const o of Array.isArray(t?.devices)?t.devices:[]){const a=N(o);if(!(!a.id||a.id===n))for(const c of Array.isArray(o?.skills)?o.skills:[]){if(c?.scope==="system")continue;const l=S(c),p=s(c?.directory);if(!l||!p)continue;const h=l.toLowerCase(),k=g(c.targets),y=i.get(h);if(y!=null){const f=r[y];if(f.remote===!0&&f.inventoryOnly===!0){const A=[...new Set([...g(f.targets),...k])],U=Object.fromEntries(A.map(_=>[_,"synced"]));r[y]=m({...f,targets:A,targetStates:U},a)}else r[y]=m(f,a);continue}const w=k,b=Object.fromEntries(w.map(f=>[f,"synced"])),j=m({id:`remote:${encodeURIComponent(l)}`,key:l,name:s(c.name)||p.split(/[\\/]/).pop()||"Skill",directory:p,description:"",targets:w,targetStates:b,managed:!1,readOnly:!0,inventoryOnly:!0,remote:!0,scope:s(c.scope)||"local",sourceName:s(c.sourceName)||null},a);i.set(h,r.length),r.push(j)}}return r.sort((o,a)=>String(o.name||o.directory).localeCompare(String(a.name||a.directory))||String(o.id||o.key).localeCompare(String(a.id||a.key)))}const T="tokentracker-skills",P="tokentracker-account-skills",J=15e3;async function d(e){const t=new URL(`/functions/${T}`,window.location.origin);if(e)for(const[i,o]of Object.entries(e))o!=null&&o!==""&&t.searchParams.set(i,String(o));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),r=await n.json().catch(()=>null);if(!n.ok)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}async function u(e){const t=await $(),n=await fetch(`/functions/${T}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),r=await n.json().catch(()=>null);if(!n.ok||r?.ok===!1)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}function x(){return d({mode:"installed"})}function H(e={}){return d({mode:"discover",...e.force?{force:1}:{}})}function M(e,t=0,n=20){return d({mode:"search",q:e,offset:t,limit:n})}function z(){return d({mode:"repos"})}function B(e,t){return u({action:"install",skill:e,targets:t})}function D(e){return u({action:"uninstall",id:e})}function G(e){return u({action:"restore",id:e})}function W(e,t){return u({action:"set_targets",id:e,targets:t})}function Z(e,t){return u({action:"import_local",directory:e,targets:t})}function F(e,t){return u({action:"delete_local",directory:e,targets:t||[]})}function Q(e){return u({action:"add_repo",repo:e})}function V(e,t){return u({action:"remove_repo",owner:e,name:t})}function X(e={}){return d({mode:"popular",...e.force?{force:1}:{}})}function Y(e={}){return d({mode:"updates",...e.force?{force:1}:{}})}function ee(e={}){return d({mode:"skill_usage",...e.force?{force:1}:{}})}async function O({accessToken:e,method:t="GET",body:n}){if(!e||!E(e))throw new Error("Skills sync requires sign-in");const r=I();if(!r)throw new Error("InsForge base URL not configured");const i={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`},o=R();o&&(i.apikey=o);const a=new AbortController,c=setTimeout(()=>a.abort(),J);try{const l=await fetch(`${r.replace(/\/$/,"")}/functions/${P}`,{method:t,headers:i,cache:"no-store",signal:a.signal,...n==null?{}:{body:JSON.stringify(n)}}),p=await l.json().catch(()=>null);if(!l.ok)throw new Error(p?.error||`Request failed with HTTP ${l.status}`);return p}finally{clearTimeout(c)}}function te(e){return O({accessToken:e})}function ne({accessToken:e,deviceId:t,skills:n}){return O({accessToken:e,method:"POST",body:{device_id:t,skills:L(n)}})}export{te as a,z as b,X as c,H as d,Y as e,ee as f,x as g,F as h,B as i,W as j,Z as k,V as l,q as m,Q as n,ne as p,G as r,M as s,D as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,d as P,a3 as Oe}from"./__vite-browser-external-
|
|
1
|
+
import{r as c,d as P,a3 as Oe}from"./__vite-browser-external-B-CAZ5HB.js";function Sn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Wt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:bt(e)?wt(e)?e:Be(e)||Wt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function mt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function En(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=mt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Ht(1),ze=Ht(-1);function In(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return In(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function An(e){return e.matches(Tt)?e:e.querySelector(Tt)}const On={display:"none"};function Tn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:On},n)}function Nn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Ln(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Kt=c.createContext(null);function kn(e){const t=c.useContext(Kt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function zn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Pn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as t}from"./__vite-browser-external-
|
|
1
|
+
import{Z as t}from"./__vite-browser-external-B-CAZ5HB.js";import{F as p,P as g}from"./useScrollLock-CHsj-WN5.js";function d(){return new p({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new g,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function c(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:d(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:t,inactiveTriggerProps:t,popupProps:t}}function m(e,n,l=!1){return new p({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:l,onOpenChange:void 0})}const o=e=>e.triggerIdProp??e.activeTriggerId,r=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function u(e,n){return n!==void 0&&r(e)&&o(e)===n}function a(e,n){return u(e,n)?!0:n!==void 0&&r(e)&&o(e)==null&&e.triggerCount===1}const P={open:r,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:o,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:i,isTriggerActive:(e,n)=>n!==void 0&&o(e)===n,isOpenedByTrigger:(e,n)=>u(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&o(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>a(e,n)?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};export{m as a,c,P as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./__vite-browser-external-
|
|
1
|
+
import{m as e}from"./__vite-browser-external-B-CAZ5HB.js";const o=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a=e("terminal",o);export{a as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as a}from"./__vite-browser-external-
|
|
1
|
+
import{m as a}from"./__vite-browser-external-B-CAZ5HB.js";const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],o=a("trash-2",t);export{o as T};
|
package/dashboard/dist/assets/{use-community-stats-2G4i1ZwJ.js → use-community-stats-DqQQKHPK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,g as N,b as M}from"./__vite-browser-external-
|
|
1
|
+
import{r as p,g as N,b as M}from"./__vite-browser-external-B-CAZ5HB.js";const D=6e3,S=2500,E=100;function h(t,r){let o;const n=new Promise((a,i)=>{o=setTimeout(()=>i(new Error("landing stats timeout")),r)});return Promise.race([t,n]).finally(()=>{o!=null&&clearTimeout(o)})}const A=5*6e4,P=1440*6e4,k="tokentracker:community-stats:v2";let s=null;function C(t){const r=Number(t?.tokenFloor)||0,o=Number(t?.totalEntries)||0;return!(r>0)||!(o>0)?null:{tokenFloor:r,totalEntries:o,top:Array.isArray(t?.top)?t.top:[],topModels:Array.isArray(t?.topModels)?t.topModels:[],providers:Array.isArray(t?.providers)?t.providers:[],dailyGrowth:Array.isArray(t?.dailyGrowth)?t.dailyGrowth:[],tokenMix:Array.isArray(t?.tokenMix)?t.tokenMix:[],userDistribution:Array.isArray(t?.userDistribution)?t.userDistribution:[],platforms:Array.isArray(t?.platforms)?t.platforms:[],activeDevelopersTotal:Number(t?.activeDevelopersTotal)||0,activeDevelopers30d:Number(t?.activeDevelopers30d)||0,tokens30d:Number(t?.tokens30d)||0,tokenGrowthPct:t?.tokenGrowthPct!=null&&Number.isFinite(Number(t.tokenGrowthPct))?Number(t.tokenGrowthPct):null,developerGrowthPct:t?.developerGrowthPct!=null&&Number.isFinite(Number(t.developerGrowthPct))?Number(t.developerGrowthPct):null,generatedAt:typeof t?.generatedAt=="string"?t.generatedAt:null}}function G(){if(typeof window>"u"||!window.localStorage)return null;try{const t=JSON.parse(window.localStorage.getItem(k)||"null"),r=Number(t?.cachedAt)||0,o=C(t?.data),n=Date.now()-r;return!o||n<0||n>P?null:{data:o,isFresh:n<A}}catch{return null}}function I(t){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(k,JSON.stringify({cachedAt:Date.now(),data:t}))}catch{}}function F(){if(s&&Date.now()-s.at<A)return s.promise;const t=Promise.all([h(N({period:"total",limit:E,offset:0}),D),h(M(),S).catch(()=>null)]);return s={at:Date.now(),promise:t},t.catch(()=>{s?.promise===t&&(s=null)}),t}function O({enabled:t=!0}={}){const[r]=p.useState(()=>G()),[o,n]=p.useState(()=>r?{status:"ready",...r.data}:{status:"loading",tokenFloor:null,totalEntries:null,top:[]});return p.useEffect(()=>{if(!t||r?.isFresh)return;let a=!1,i=null,u=null;const y=async()=>{try{const[l,e]=await F();if(a)return;const c=Array.isArray(l?.entries)?l.entries:[],b=c.reduce((m,T)=>m+(Number(T?.total_tokens)||0),0),d=Number(e?.total_tokens)||0;d>0||(s=null);const w=Number(r?.data?.tokenFloor)||0,f=d>0?d:w>0?w:b;if(!c.length||!(f>0)){n(m=>({...m,status:"error"}));return}const g=Array.isArray(e?.top_models)?e.top_models:r?.data?.topModels||[],_={tokenFloor:f,totalEntries:Number(l?.total_entries)||c.length,top:c.slice(0,3),topModels:g,providers:Array.isArray(e?.providers)?e.providers:[],dailyGrowth:Array.isArray(e?.daily_growth)?e.daily_growth:[],tokenMix:Array.isArray(e?.token_mix)?e.token_mix:[],userDistribution:Array.isArray(e?.user_distribution)?e.user_distribution:[],platforms:Array.isArray(e?.platforms)?e.platforms:[],activeDevelopersTotal:Number(e?.active_developers_total)||0,activeDevelopers30d:Number(e?.active_developers_30d)||0,tokens30d:Number(e?.tokens_30d)||0,tokenGrowthPct:e?.token_growth_pct==null?null:Number(e.token_growth_pct),developerGrowthPct:e?.developer_growth_pct==null?null:Number(e.developer_growth_pct),generatedAt:typeof e?.generated_at=="string"?e.generated_at:null};n({status:"ready",..._}),d>0&&I(_)}catch{a||n(e=>e.status==="ready"?e:{...e,status:"error"})}};return typeof window<"u"&&"requestIdleCallback"in window?i=window.requestIdleCallback(y,{timeout:1500}):u=setTimeout(y,400),()=>{a=!0,i!=null&&typeof window.cancelIdleCallback=="function"&&window.cancelIdleCallback(i),u!=null&&clearTimeout(u)}},[t,r]),o}export{O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,q as D,t as K,v as j,w as J}from"./__vite-browser-external-
|
|
1
|
+
import{r as a,q as D,t as K,v as j,w as J}from"./__vite-browser-external-B-CAZ5HB.js";import{L as q}from"./limits-providers-Czh_yu22.js";const p=q,g="tt.limits.providerOrder",E="tt.limits.providerVisibility",h="tt.limits.displayMode",O="tt.limits.updatedAt",M="limitsPreferences",B="limitsDisplayMode",w=Object.freeze({USED:"used",REMAINING:"remaining"}),v=new Set(Object.values(w)),L=new Set([g,E,h,O]);function A(){return[...p]}function b(){return Object.fromEntries(p.map(e=>[e,!0]))}function _(e){const t=[];if(Array.isArray(e))for(const n of e)p.includes(n)&&!t.includes(n)&&t.push(n);for(const n of p)t.includes(n)||t.push(n);return t}function N(e){const t=b();if(!e||typeof e!="object"||Array.isArray(e))return t;for(const n of p)typeof e[n]=="boolean"&&(t[n]=e[n]);return t}function G(e){return v.has(e)?e:w.USED}function y(e){if(e!=null){if(typeof e=="number")return Number.isSafeInteger(e)?e:void 0;if(typeof e=="string"){const t=e.trim();if(t==="")return;const n=Number(t);return Number.isSafeInteger(n)?n:void 0}}}function m(e={}){const t=e&&typeof e=="object"?e:{};return{displayMode:G(t.displayMode),providerOrder:_(t.providerOrder),providerVisibility:N(t.providerVisibility),updatedAt:y(t.updatedAt)}}function F(){if(typeof window>"u")return A();try{const e=window.localStorage.getItem(g);return _(e?JSON.parse(e):void 0)}catch{return A()}}function H(){if(typeof window>"u")return b();try{const e=window.localStorage.getItem(E);return N(e?JSON.parse(e):void 0)}catch{return b()}}function Q(){if(typeof window>"u")return w.USED;try{const e=window.localStorage.getItem(h);return v.has(e)?e:w.USED}catch{return w.USED}}function W(){if(!(typeof window>"u"))try{return y(window.localStorage.getItem(O))}catch{return}}function X(){if(typeof window>"u")return!1;try{for(const e of L)if(window.localStorage.getItem(e)!==null)return!0}catch{return!1}return!1}function S(){return m({displayMode:Q(),providerOrder:F(),providerVisibility:H(),updatedAt:W()})}function Z(e){if(typeof window>"u")return;const t=m(e);try{window.localStorage.setItem(g,JSON.stringify(t.providerOrder)),window.localStorage.setItem(E,JSON.stringify(t.providerVisibility)),window.localStorage.setItem(h,t.displayMode),t.updatedAt===void 0?window.localStorage.removeItem(O):window.localStorage.setItem(O,String(t.updatedAt))}catch(n){console.warn("[tokentracker] limits preferences localStorage write failed:",n)}}function $(e){const t=m(e);return{displayMode:t.displayMode,providerOrder:[...t.providerOrder],providerVisibility:{...t.providerVisibility},updatedAt:t.updatedAt??null}}function ee(...e){let t;for(const s of e){const c=y(s);c!==void 0&&(t=t===void 0?c:Math.max(t,c))}const n=Date.now();return t!==void 0&&n<=t?t+1:n}function te(e,t){return e.length===t.length&&e.every((n,s)=>n===t[s])}function re(e,t){return p.every(n=>e[n]===t[n])}function k(e,t){return e.displayMode===t.displayMode&&te(e.providerOrder,t.providerOrder)&&re(e.providerVisibility,t.providerVisibility)}function ie(e,t){return k(e,t)&&y(e.updatedAt)===y(t.updatedAt)}function V(e,t){const n=y(e.updatedAt),s=y(t.updatedAt);return n!==void 0&&(s===void 0||n>s)}function de(){const[e,t]=a.useState(S),n=a.useRef(e),s=a.useCallback((o,r={})=>{const i=m(o);return n.current=i,t(i),r.writeLocal&&Z(i),i},[]),c=a.useCallback(o=>{D()&&K(M,$(o))},[]),u=a.useCallback(o=>{const r=S(),i=V(r,n.current)?s(r):n.current,d=m(o(i));if(k(i,d))return;const f=ee(r.updatedAt,i.updatedAt),l=s({...d,updatedAt:f},{writeLocal:!0});c(l)},[s,c]),P=a.useCallback(o=>{v.has(o)&&u(r=>({...r,displayMode:o}))},[u]),I=a.useCallback(o=>{if(!v.has(o))return;const r=S();if(r.updatedAt!==void 0){s(r);return}s({...r,displayMode:o,updatedAt:void 0},{writeLocal:!0})},[s]);a.useEffect(()=>{if(!D())return;const o=j(r=>{const i=r?.[M];if(i&&typeof i=="object"){const d=m(i);if(!X()){s(d,{writeLocal:!0});return}const f=S();if(V(d,f))s(d,{writeLocal:!0});else{const l=s(f);ie(d,f)||c(l)}return}I(r?.[B])});return J(),o},[I,s,c]),a.useEffect(()=>{if(typeof window>"u")return;const o=r=>{(r.key===null||L.has(r.key))&&s(S())};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[s]);const U=a.useCallback(o=>{p.includes(o)&&u(r=>({...r,providerVisibility:{...r.providerVisibility,[o]:!r.providerVisibility[o]}}))},[u]),x=a.useCallback(o=>{u(r=>{const i=r.providerOrder.indexOf(o);if(i<=0)return r;const d=[...r.providerOrder];return[d[i-1],d[i]]=[d[i],d[i-1]],{...r,providerOrder:d}})},[u]),C=a.useCallback(o=>{u(r=>{const i=r.providerOrder.indexOf(o);if(i<0||i>=r.providerOrder.length-1)return r;const d=[...r.providerOrder];return[d[i],d[i+1]]=[d[i+1],d[i]],{...r,providerOrder:d}})},[u]),R=a.useCallback((o,r)=>{o!==r&&u(i=>{const d=i.providerOrder.indexOf(o),f=i.providerOrder.indexOf(r);if(d<0||f<0)return i;const l=[...i.providerOrder],[z]=l.splice(d,1);return l.splice(f,0,z),{...i,providerOrder:l}})},[u]),Y=a.useCallback(()=>{u(()=>({displayMode:w.USED,providerOrder:A(),providerVisibility:b()}))},[u]),T=a.useMemo(()=>e.providerOrder.filter(o=>e.providerVisibility[o]!==!1),[e.providerOrder,e.providerVisibility]);return{order:e.providerOrder,visibility:e.providerVisibility,displayMode:e.displayMode,setDisplayMode:P,visibleOrdered:T,toggle:U,moveUp:x,moveDown:C,moveToward:R,reset:Y}}export{w as L,de as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./__vite-browser-external-
|
|
1
|
+
import{r as f}from"./__vite-browser-external-B-CAZ5HB.js";function O(t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(t);if(!n)return null;const i=JSON.parse(n);return Array.isArray(i)?i.filter(o=>typeof o=="string"):null}catch{return null}}function m(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(t,JSON.stringify(n))}catch{}}function S(t,n){if(!t)return n;const i=new Set(n),o=t.filter(u=>i.has(u)),c=n.filter(u=>!o.includes(u));return[...o,...c]}function p(t,n){const i=f.useMemo(()=>n.join("|"),[n]),[o,c]=f.useState(()=>S(O(t),n));f.useEffect(()=>{c(r=>{const e=S(r,n);return e.length===r.length&&e.every((l,d)=>l===r[d])?r:(m(t,e),e)})},[i,n,t]);const u=f.useCallback((r,e)=>{!r||!e||r===e||c(s=>{const l=s.indexOf(r),d=s.indexOf(e);if(l===-1||d===-1)return s;const w=s.slice(),[h]=w.splice(l,1);return w.splice(d,0,h),m(t,w),w})},[t]),a=f.useCallback(()=>{m(t,n),c(n)},[t,n]);return{order:o,reorder:u,reset:a}}export{p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o}from"./__vite-browser-external-B-CAZ5HB.js";import{h as r,i as t,p as s}from"./react-CExpcnBO.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as u,r as n}from"./__vite-browser-external-
|
|
1
|
+
import{m as u,r as n}from"./__vite-browser-external-B-CAZ5HB.js";const f=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],E=u("pencil",f),i="tt.qualityPerDollar.enabled";function l(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(i)==="1"}catch{return!1}}function y(){const[r,o]=n.useState(l);n.useEffect(()=>{if(typeof window>"u")return;const t=e=>{(e.key===null||e.key===i)&&o(l())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[]);const a=n.useCallback(t=>{const e=!!t;o(e);try{window.localStorage.setItem(i,e?"1":"0")}catch{}},[]),s=n.useCallback(()=>a(!l()),[a]);return{enabled:r,setEnabled:a,toggle:s}}const d="tt.sessionEfficiency.enabled";function c(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(d)==="1"}catch{return!1}}function g(){const[r,o]=n.useState(c);n.useEffect(()=>{if(typeof window>"u")return;const t=e=>{(e.key===null||e.key===d)&&o(c())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[]);const a=n.useCallback(t=>{const e=!!t;o(e);try{window.localStorage.setItem(d,e?"1":"0")}catch{}},[]),s=n.useCallback(()=>a(!c()),[a]);return{enabled:r,setEnabled:a,toggle:s}}export{E as P,g as a,y as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-
|
|
1
|
+
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-CExpcnBO.js";import{r as f}from"./__vite-browser-external-B-CAZ5HB.js";function x(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],s=t[1+n],c=t[2+n],r=t[3+n],a=y(s,c,r);return e?a(o):a}function E(t){const e=l(()=>A(t)),{isStatic:n}=f.useContext(p);if(n){const[,o]=f.useState(t);f.useEffect(()=>e.on("change",o),[])}return e}function m(t,e){const n=E(e()),o=()=>n.set(e());return o(),h(()=>{const s=()=>V.preRender(o,!1,!0),c=t.map(r=>r.on("change",s));return()=>{c.forEach(r=>r()),C(o)}}),n}function L(t){u.current=[],t();const e=m(u.current,t);return u.current=void 0,e}function g(t,e,n,o){if(typeof t=="function")return L(t);const c=typeof e=="function"?e:x(e,n,o),r=Array.isArray(t)?i(t,c):i([t],([d])=>c(d)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&o?.clamp!==!1&&(r.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),r}function i(t,e){const n=l(()=>[]);return m(t,()=>{n.length=0;const o=t.length;for(let s=0;s<o;s++)n[s]=t[s].get();return e(n)})}export{g as a,E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as b,ae as v,r as c,c as g,af as F,ag as x,ah as _}from"./__vite-browser-external-
|
|
1
|
+
import{q as b,ae as v,r as c,c as g,af as F,ag as x,ah as _}from"./__vite-browser-external-B-CAZ5HB.js";import{l as M}from"./limits-providers-Czh_yu22.js";const S="native:notificationPermission";let E=null;function N(){return typeof window<"u"&&!!window.chrome?.webview}function K(){return b()?E||"unknown":N()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function L(e){if(typeof window>"u")return()=>{};const i=t=>{const a=t?.detail?.status;typeof a=="string"&&(E=a),e(K())};return window.addEventListener(S,i),e(K()),b()&&v({type:"getNotificationStatus"}),()=>window.removeEventListener(S,i)}async function I(){if(b()){v({type:"requestNotificationPermission"});return}N()||typeof Notification<"u"&&Notification.permission==="default"&&await Notification.requestPermission().catch(()=>"denied")}const p="tt.limitAlerts.enabled";function O(){try{return window.localStorage.getItem(p)==="1"}catch{return!1}}function U(){const[e,i]=c.useState(O),[t,a]=c.useState("unknown");c.useEffect(()=>L(a),[]);const y=c.useCallback(async n=>{const l=!!n;l&&await I();try{window.localStorage.setItem(p,l?"1":"0")}catch{}i(l)},[]);return{enabled:e,setEnabled:y,permissionBlocked:t==="denied"}}function A(e,i){if(!(e>0))return null;const t=(e-i)/e;return Number.isFinite(t)?Math.min(Math.max(t,0),1):null}function z(e,i,t=.03){return e>i+t}function D(e){const i=Math.max(0,Math.floor(e)),t=Math.floor(i/3600);return t>24?`${Math.floor(t/24)}d`:t>0?`${t}h`:`${Math.floor(i/60)}m`}function j(e,i){if(typeof e.windowSeconds=="number")return e.windowSeconds;if(e.windowSecondsField&&i){const t=i[e.windowSecondsField];return typeof t=="number"&&t>0?t:null}return null}function q(e){return e==null?NaN:typeof e=="number"?e*1e3:Date.parse(e)}function C({usedPercent:e,windowSeconds:i,resetMs:t,mode:a,now:y=Date.now()}){const n=Math.min(Math.max(Number(e)||0,0),100)/100,l={pacePercent:null,paceOver:!1,expectedPercent:null,runsOutEta:null,projectedEnd:null};if(!(i>0)||!Number.isFinite(t))return l;const r=Math.max(0,(t-y)/1e3),s=A(i,r);if(s==null)return l;if(l.expectedPercent=Math.round(s*100),l.paceOver=z(n,s),n>=.05){const u=a==="remaining"?1-s:s;l.pacePercent=u*100}if(s>.02&&n>0){const u=i*s,w=n/u,m=n/s;m>=1&&w>0?l.runsOutEta=D((1-n)/w):l.projectedEnd=Math.round(Math.min(m,1)*100)}return l}const R={claude:{windows(e){const i=Array.isArray(e.weekly_scoped)?e.weekly_scoped.map(t=>({key:`scoped-${t.label}`,label:t.label,window:t,pctField:"utilization",resetField:"resets_at",windowSeconds:604800})):[];return[{key:"5h",labelKey:"limits.label.claude_5h",window:e.five_hour,pctField:"utilization",resetField:"resets_at",windowSeconds:5*3600},{key:"7d",labelKey:"limits.label.claude_7d",window:e.seven_day,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},{key:"opus",labelKey:"limits.label.claude_opus",window:e.seven_day_opus,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},...i]}},codex:{extra:"codex_meta",windows(e){return[{key:"5h",labelKey:"limits.label.codex_5h",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"7d",labelKey:"limits.label.codex_7d",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"credits",labelKey:"limits.label.codex_credits",window:e.credit_window},{key:"spark-5h",labelKey:"limits.label.codex_spark_5h",window:e.spark_primary_window,windowSecondsField:"limit_window_seconds"},{key:"spark-7d",labelKey:"limits.label.codex_spark_7d",window:e.spark_secondary_window,windowSecondsField:"limit_window_seconds"}]}},cursor:{windows(e){return[{key:"plan",labelKey:"limits.label.cursor_plan",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"auto",labelKey:"limits.label.cursor_auto",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"api",labelKey:"limits.label.cursor_api",window:e.tertiary_window,windowSecondsField:"limit_window_seconds"}]}},gemini:{windows(e){return[{key:"pro",labelKey:"limits.label.gemini_pro",window:e.primary_window},{key:"flash",labelKey:"limits.label.gemini_flash",window:e.secondary_window},{key:"lite",labelKey:"limits.label.gemini_lite",window:e.tertiary_window}]}},kimi:{extra:"kimi_parallel",windows(e){return[{key:"weekly",labelKey:"limits.label.kimi_weekly",window:e.primary_window,windowSeconds:7*86400},{key:"5h",labelKey:"limits.label.kimi_5h",window:e.secondary_window,windowSeconds:5*3600},{key:"total",labelKey:"limits.label.kimi_total",window:e.tertiary_window}]}},kiro:{extra:"kiro_credits",windows(e){return[{key:"month",labelKey:"limits.label.kiro_month",window:e.primary_window},{key:"bonus",labelKey:"limits.label.kiro_bonus",window:e.secondary_window}]}},grok:{windows(e){const i=typeof e.period_type=="string"?e.period_type:null,t=i==="weekly"?"limits.label.grok_week":i==="daily"?"limits.label.grok_day":"limits.label.grok_month",a=i==="weekly"?7*86400:i==="daily"?86400:void 0;return[{key:i==="weekly"?"week":i==="daily"?"day":"month",labelKey:t,window:e.primary_window,windowSeconds:a},{key:"ondemand",labelKey:"limits.label.grok_ondemand",window:e.secondary_window}]}},antigravity:{windows(e){return[{key:"claude-weekly",labelKey:"limits.label.antigravity_claude_weekly",window:e.primary_window},{key:"claude-5h",labelKey:"limits.label.antigravity_claude_5h",window:e.secondary_window},{key:"gemini-weekly",labelKey:"limits.label.antigravity_gemini_weekly",window:e.tertiary_window},{key:"gemini-5h",labelKey:"limits.label.antigravity_gemini_5h",window:e.quaternary_window}]}},copilot:{extra:"copilot_otel",windows(e){return[{key:"premium",labelKey:"limits.label.copilot_premium",window:e.primary_window},{key:"chat",labelKey:"limits.label.copilot_chat",window:e.secondary_window}]}},zcode:{windows(e){return e.plan_kind==="coding-plan"?[{key:"5h",labelKey:"limits.label.zcode_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.zcode_weekly",window:e.secondary_window},{key:"tools",labelKey:"limits.label.zcode_tools",window:e.tertiary_window}]:[{key:"glm52",labelKey:"limits.label.zcode_glm52",window:e.primary_window},{key:"glm5t",labelKey:"limits.label.zcode_glm5t",window:e.secondary_window}]}},opencodeGo:{windows(e){return[{key:"5h",labelKey:"limits.label.opencode_go_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.opencode_go_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.opencode_go_monthly",window:e.tertiary_window}]}},qoder:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_credits",window:e.primary_window},{key:"ultimate",labelKey:"limits.label.qoder_ultimate",window:e.secondary_window,timeKind:"expiry"}]}},qoderCn:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_cn_credits",window:e.primary_window},{key:"ultimate",labelKey:"limits.label.qoder_cn_ultimate",window:e.secondary_window,timeKind:"expiry"}]}}},P="tt.limitAlerts.cycles.v1";function T(){try{return JSON.parse(window.localStorage.getItem(P)||"{}")}catch{return{}}}function $(e){try{window.localStorage.setItem(P,JSON.stringify(e))}catch{}}function B(e,{now:i=Date.now()}={}){const t=[],a=R;for(const[y,n]of Object.entries(e||{})){const l=a[y];if(!(!n?.configured||n.error||!l))for(const r of l.windows(n)){if(!r.window)continue;const s=Number(r.pctField==="utilization"?r.window.utilization:r.window.used_percent),u=r.resetField==="resets_at"?r.window.resets_at:r.window.reset_at,w=q(u),m=C({usedPercent:s,windowSeconds:j(r,r.window),resetMs:w,mode:"used",now:i});!m.runsOutEta||!m.paceOver||s<20||!(w>i)||t.push({id:`${y}:${r.key}:${w}`,providerId:y,windowKey:r.key,resetMs:w,usedPercent:s,runsOutEta:m.runsOutEta})}}return t}function V(e){const i=T(),t=B(e);for(const n of t){if(i[n.id])continue;const l=M(n.providerId),r=g("limits.alert.title",{provider:l}),s=g("limits.alert.body",{eta:n.runsOutEta,percent:Math.round(n.usedPercent)});let u=F({title:r,body:s,id:n.id});!u&&typeof Notification<"u"&&Notification.permission==="granted"&&(new Notification(r,{body:s,tag:n.id}),u=!0),u&&(i[n.id]=Date.now())}const a=Date.now()-864e5,y=Object.fromEntries(Object.entries(i).filter(([n,l])=>{const r=Number(n.split(":").at(-1));return Number.isFinite(r)?r>=a:Number(l)>=a}).slice(-100));return $(y),t.length}function W(e){const i=!!e?.initialState,[t,a]=c.useState(()=>i?e?.initialState?.data??null:null),[y,n]=c.useState(()=>i?e?.initialState?.error??null:null),[l,r]=c.useState(!i),s=!!e?.initialRefresh,u=!!e?.publishToPreloadCache;c.useEffect(()=>{if(!(!t||typeof window>"u"))try{window.localStorage.getItem(p)==="1"&&V(t)}catch{}},[t]);const w=c.useCallback((o,d)=>{!u||!o||typeof o!="object"||x(o,{source:d})},[u]),m=c.useCallback(async()=>{try{const o=await _({refresh:!0}),d=o&&typeof o=="object"?o:null;a(d),n(null),w(d,"manual-refresh")}catch(o){n(o?.message||String(o))}},[w]),k=c.useCallback(async()=>{try{const o=await _(),d=o&&typeof o=="object"?o:null;a(d),n(null),w(d,"page-load")}catch(o){n(o?.message||String(o))}},[w]);return c.useEffect(()=>{if(typeof window>"u"||typeof document>"u")return;const o=15e3;let d=Date.now();const f=()=>{if(document.visibilityState!=="visible")return;const h=Date.now();h-d<o||(d=h,k())};return window.addEventListener("focus",f),document.addEventListener("visibilitychange",f),()=>{window.removeEventListener("focus",f),document.removeEventListener("visibilitychange",f)}},[k]),c.useEffect(()=>{if(i&&!s)return;let o=!1;return(async()=>{try{const d=await _();if(o)return;const f=d&&typeof d=="object"?d:null;a(f),n(null),w(f,"page-load")}catch(d){if(o)return;n(d?.message||String(d))}finally{o||r(!1)}})(),()=>{o=!0}},[i,s,w]),{data:t,error:y,isLoading:l,refresh:m}}export{R as P,j as a,U as b,C as c,q as r,V as s,W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,C as t,D as r,x as c}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,C as t,D as r,x as c}from"./__vite-browser-external-B-CAZ5HB.js";const s=Object.freeze({currency:c,rate:1,symbol:"$",rates:{...r},rateSource:"default",rateFetchedAt:null,setCurrency:()=>{}});function a(){return e.useContext(t)??s}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bP as Lt,bQ as Ve,aI as $e,aF as H,aJ as Ht,bd as U,bR as St,bG as je,j as Re,bS as ze,r as m,bb as K,bT as rt,bU as Yt,aK as st,ba as Ne,bw as Dt,bV as ot,bW as Ot,bf as I,be as Ie,bv as be,bX as Ke,bY as fe,bZ as de,aE as w,bi as Gt,b_ as wt,b$ as Je,bx as _t,bs as it,bn as ct,bp as Ut,c0 as Xt,aD as Ee,br as Vt,c1 as Kt,A as ke,bm as qt,c2 as Qe,aN as Be,c3 as $t,c4 as Ye,bj as jt,b9 as We,bk as zt,bc as xe,bC as De,bB as Jt,c5 as Qt,bz as Zt,aG as en,c6 as ye,aQ as tn,aA as nn,Z as Ge,c7 as rn,c8 as ut,az as sn,bN as on,bH as cn}from"./__vite-browser-external-BW4ueyBB.js";function Pe(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Pe(e,s.id,n)])}function lt(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(o=>o.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function un(e){e.preventDefault(),e.stopPropagation()}function ln(e){return"nativeEvent"in e}function an(e){return e.pointerType===""&&e.isTrusted?!0:Ve&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fn(e){return Lt?!1:!Ve&&e.width===0&&e.height===0||Ve&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Vn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function dn(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Me(e){const t=$e(pn,e).current;return t.next=e,H(t.effect),t}function pn(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let Ae=0;function _e(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Ae);function o(){s&&!s()||e?.focus({preventScroll:n})}if(r)return o(),Ht;const i=requestAnimationFrame(o);return Ae=i,()=>{Ae===i&&(cancelAnimationFrame(i),Ae=0)}}const Ue={inert:new WeakMap,"aria-hidden":new WeakMap},at="data-base-ui-inert",qe={inert:new WeakSet,"aria-hidden":new WeakSet};let Ce=new WeakMap,Xe=0;function gn(e){return qe[e]}function Ct(e){return e?St(e)?e.host:Ct(e.parentNode):null}const ft=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ct(n);return e.contains(r)?r:null}).filter(n=>n!=null),dt=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},pt=(e,t,n)=>{const r=[],s=o=>{!o||n.has(o)||Array.from(o.children).forEach(i=>{je(i)!=="script"&&(t.has(i)?s(i):r.push(i))})};return s(e),r};function hn(e,t,n,r,{mark:s=!0}){let o=null;r?o="inert":n&&(o="aria-hidden");let i=null,l=null;const d=ft(t,e),f=s?pt(t,dt(d),new Set(d)):[],v=[],P=[];if(o){const a=Ue[o],y=gn(o);l=y,i=a;const C=ft(t,Array.from(t.querySelectorAll("[aria-live]"))),N=d.concat(C);pt(t,dt(N),new Set(N)).forEach(T=>{const E=T.getAttribute(o),Z=E!==null&&E!=="false",Y=(a.get(T)||0)+1;a.set(T,Y),v.push(T),Y===1&&Z&&y.add(T),Z||T.setAttribute(o,o==="inert"?"":"true")})}return s&&f.forEach(a=>{const y=(Ce.get(a)||0)+1;Ce.set(a,y),P.push(a),y===1&&a.setAttribute(at,"")}),Xe+=1,()=>{i&&v.forEach(a=>{const C=(i.get(a)||0)-1;i.set(a,C),C||(!l?.has(a)&&o&&a.removeAttribute(o),l?.delete(a))}),s&&P.forEach(a=>{const y=(Ce.get(a)||0)-1;Ce.set(a,y),y||a.removeAttribute(at)}),Xe-=1,Xe||(Ue.inert=new WeakMap,Ue["aria-hidden"]=new WeakMap,qe.inert=new WeakSet,qe["aria-hidden"]=new WeakSet,Ce=new WeakMap)}}function gt(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,o=U(e[0]).body;return hn(e,o,n,r,{mark:s})}function xt(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class mn{nodesRef={current:[]};events=xt();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const It=m.createContext(null),kt=m.createContext(null),Ze=()=>m.useContext(It)?.id||null,et=e=>{const t=m.useContext(kt);return e??t};function Kn(e){const t=ze(),n=et(e),r=Ze();return H(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function qn(e){const{children:t,id:n}=e,r=Ze();return Re.jsx(It.Provider,{value:m.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $n(e){const{children:t,externalTree:n}=e,r=$e(()=>n??new mn).current;return Re.jsx(kt.Provider,{value:r,children:t})}function bn(e,t){const n=Be(Ee(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const ht=20;let pe=[];function tt(){pe=pe.filter(e=>e.deref()?.isConnected)}function mt(e){tt(),e&&je(e)!=="body"&&(pe.push(new WeakRef(e)),pe.length>ht&&(pe=pe.slice(-ht)))}function bt(){return tt(),pe[pe.length-1]?.deref()}function yn(e){return e?Qe(e)?e:Ot(e)[0]||e:null}function yt(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=$t(e).filter(s=>{const o=s.getAttribute("data-tabindex")||"";return Qe(s)||s.hasAttribute("data-tabindex")&&!o.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function jn(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:o=!0,restoreFocus:i=!1,modal:l=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:v,previousFocusableElement:P,beforeContentFocusGuardRef:a,externalTree:y,getInsideElements:C}=e,N="rootStore"in t?t.rootStore:t,D=N.useState("open"),T=N.useState("domReferenceElement"),E=N.useState("floatingElement"),{events:Z,dataRef:Y}=N.context,q=K(()=>Y.current.floatingContext?.nodeId),J=s===!1,G=rt(T)&&J,oe=Me(s),M=Me(o),$=Me(f),ve=Me(D),W=et(y),R=Yt(),L=m.useRef(!1),ie=m.useRef(!1),te=m.useRef(!1),ne=m.useRef(null),ge=m.useRef(""),ae=m.useRef(""),he=m.useRef(null),Te=m.useRef(null),S=st(he,a,R?.beforeInsideRef),j=st(Te,R?.afterInsideRef),ce=Ne(),ue=Ne(),Se=Dt(),Fe=R!=null,h=ot(E),re=K((b=h)=>b?Ot(b):[]),ee=K(()=>C?.().filter(b=>b!=null)??[]);m.useEffect(()=>{if(r||!l)return;function b(B){B.key==="Tab"&&w(h,de(U(h)))&&re().length===0&&!G&&un(B)}const F=U(h);return I(F,"keydown",b)},[r,h,l,G,re]),m.useEffect(()=>{if(r||!D)return;const b=U(h);function F(){te.current=!1}function B(z){const g=Ee(z),x=ee(),p=w(E,g)||w(T,g)||w(R?.portalNode,g)||x.some(A=>A===g||w(A,g));te.current=!p,ae.current=z.pointerType||"keyboard",g?.closest(`[${Vt}]`)&&(ie.current=!0,ue.start(0,()=>{ie.current=!1}))}function _(){ae.current="keyboard"}return Ie(I(b,"pointerdown",B,!0),I(b,"pointerup",F,!0),I(b,"pointercancel",F,!0),I(b,"keydown",_,!0),F)},[r,E,T,h,D,R,ue,ee]),m.useEffect(()=>{if(r||!d)return;const b=U(h);function F(){ie.current=!0,ue.start(0,()=>{ie.current=!1})}function B(x){const p=Ee(x);Qe(p)&&(ne.current=p)}function _(x){const p=x.relatedTarget,A=x.currentTarget,X=Ee(x);l&&p==null&&X!=null&&w(E,X)&&mt(X),queueMicrotask(()=>{const k=q(),Q=N.context.triggerElements,c=ee(),u=p?.hasAttribute(Ke("focus-guard"))&&[he.current,Te.current,R?.beforeInsideRef.current,R?.afterInsideRef.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,fe(P),fe(v)].includes(p),V=!(w(T,p)||w(E,p)||w(p,E)||w(R?.portalNode,p)||c.some(O=>O===p||w(O,p))||Q.hasMatchingElement(O=>w(O,p))||u||W&&(Pe(W.nodesRef.current,k).find(O=>w(O.context?.elements.floating,p)||w(O.context?.elements.domReference,p))||lt(W.nodesRef.current,k).find(O=>[O.context?.elements.floating,ot(O.context?.elements.floating)].includes(p)||O.context?.elements.domReference===p)));if(A===T&&h&&yt(h),i&&A!==T&&!Kt(X)&&de(b)===b.body){if(be(h)&&(h.focus(),i==="popup")){Se.request(()=>{h.focus()});return}const O=re(),le=ne.current,Oe=(le&&O.includes(le)?le:null)||O[O.length-1]||h;be(Oe)&&Oe.focus()}if(Y.current.insideReactTree){Y.current.insideReactTree=!1;return}(G||!l)&&p&&V&&!ie.current&&(G||p!==bt())&&(L.current=!0,N.setOpen(!1,ke(qt,x)))})}function z(){te.current||(Y.current.insideReactTree=!0,ce.start(0,()=>{Y.current.insideReactTree=!1}))}const g=be(T)?T:null;if(!(!E&&!g))return Ie(g&&I(g,"focusout",_),g&&I(g,"pointerdown",F),E&&I(E,"focusin",B),E&&I(E,"focusout",_),E&&R&&I(E,"focusout",z,!0))},[r,T,E,h,l,W,R,N,d,i,re,G,q,Y,ce,ue,Se,v,P,ee]),m.useEffect(()=>{if(r||!E||!D)return;const b=Array.from(R?.portalNode?.querySelectorAll(`[${Ke("portal")}]`)||[]),B=(W?lt(W.nodesRef.current,q()):[]).find(A=>rt(A.context?.elements.domReference||null))?.context?.elements.domReference,z=[...[E,...b,he.current,Te.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,...ee()],B,fe(P),fe(v),G?T:null].filter(A=>A!=null),g=gt(z,{ariaHidden:l||G,mark:!1}),x=[E,...b].filter(A=>A!=null),p=gt(x);return()=>{p(),g()}},[D,r,T,E,l,R,G,W,q,v,P,ee]),H(()=>{if(!D||r||!be(h))return;ge.current="",ae.current="";const b=U(h),F=de(b);queueMicrotask(()=>{const B=oe.current,_=typeof B=="function"?B($.current||""):B;if(_===void 0||_===!1||w(h,F))return;let g=null;const x=()=>(g==null&&(g=re(h)),g[0]||h);let p;_===!0||_===null?p=x():p=fe(_),p=p||x();const A=w(h,de(b));_e(p,{preventScroll:p===h,shouldFocus(){if(!ve.current)return!1;if(A)return!0;const X=de(b);return!(X!==p&&w(h,X))}})})},[r,D,h,re,oe,$,ve]),H(()=>{if(r||!h)return;const b=U(h),F=de(b),B=$.current==null;mt(F);function _(g){if(g.open||(ge.current=bn(g.nativeEvent,ae.current)),g.reason===Gt&&g.nativeEvent.type==="mouseleave"&&(L.current=!0),g.reason===wt)if(g.nested)L.current=!1;else if(an(g.nativeEvent)||fn(g.nativeEvent))L.current=!1;else{let x=!1;U(h).createElement("div").focus({get preventScroll(){return x=!0,!1}}),x?L.current=!1:L.current=!0}}Z.on("openchange",_);function z(g){const x=M.current;let p=typeof x=="function"?x(g):x;if(p===void 0||p===!1)return null;p===null&&(p=!0);const A=T?.isConnected?T:null,X=F?.isConnected&&je(F)!=="body"?F:null;let k=B?X||A:A||X;return k||(k=bt()||null),typeof p=="boolean"?k:fe(p)||k||null}return()=>{Z.off("openchange",_);const g=de(b),x=ee(),p=w(E,g)||x.some(Q=>Q===g||w(Q,g))||W&&Pe(W.nodesRef.current,q(),!1).some(Q=>w(Q.context?.elements.floating,g)),A=M.current,X=ge.current,k=z(X);queueMicrotask(()=>{const Q=yn(k),c=typeof A!="boolean";if(A&&!L.current&&be(Q)&&(!(!c&&Q!==g&&g!==b.body)||p)){const u={preventScroll:!0};X==="keyboard"&&(u.focusVisible=!0),Q.focus(u)}L.current=!1})}},[r,E,h,M,$,Z,W,T,q,ee]),H(()=>{if(!Je||D||!E)return;const b=de(U(E));!be(b)||!_t(b)||w(E,b)&&b.blur()},[D,E]),H(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:d,open:D,onOpenChange:N.setOpen,domReference:T}),()=>{R.setFocusManagerState(null)}},[r,R,l,D,N,d,T]),H(()=>{if(!(r||!h))return yt(h),()=>{queueMicrotask(tt)}},[r,h]);const me=!r&&(l?!G:!0)&&(Fe||l);return Re.jsxs(m.Fragment,{children:[me&&Re.jsx(it,{"data-type":"inside",ref:S,onFocus:b=>{if(l){const F=re();_e(F[F.length-1])}else R?.portalNode&&(L.current=!1,ct(b,R.portalNode)?Ut(T)?.focus():fe(P??R.beforeOutsideRef)?.focus())}}),n,me&&Re.jsx(it,{"data-type":"inside",ref:j,onFocus:b=>{l?_e(re()[0]):R?.portalNode&&(d&&(L.current=!0),ct(b,R.portalNode)?Xt(T)?.focus():fe(v??R.afterOutsideRef)?.focus())}})]})}function En(){return!1}function Tn(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function zn(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:o="sloppy",referencePress:i=En,bubbles:l,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,v=f.useState("open"),P=f.useState("floatingElement"),{dataRef:a}=f.context,y=et(d),C=K(typeof s=="function"?s:()=>!1),N=typeof s=="function"?C:s,D=N!==!1,T=K(()=>o),{escapeKey:E,outsidePress:Z}=Tn(l),Y=m.useRef(!1),q=m.useRef(!1),J=m.useRef(!1),G=m.useRef(!1),oe=m.useRef(""),M=m.useRef(null),$=Ne(),ve=Ne(),W=K(()=>{ve.clear(),a.current.insideReactTree=!1}),R=K(S=>{const j=a.current.floatingContext?.nodeId;return(y?Pe(y.nodesRef.current,j):[]).some(ue=>ue.context?.open&&!ue.context.dataRef.current[S])}),L=K(S=>Ye(S,f.select("floatingElement"))||Ye(S,f.select("domReferenceElement"))),ie=K(S=>{i()&&f.setOpen(!1,ke(jt,S.nativeEvent))}),te=K(S=>{if(!v||!n||!r||S.key!=="Escape"||G.current||!E&&R("__escapeKeyBubbles"))return;const j=ln(S)?S.nativeEvent:S,ce=ke(zt,j);f.setOpen(!1,ce),ce.isCanceled||S.preventDefault(),!E&&!ce.isPropagationAllowed&&S.stopPropagation()}),ne=K(()=>{a.current.insideReactTree=!0,ve.start(0,W)}),ge=K(S=>{if(!v||!n||S.button!==0)return;const j=Ee(S.nativeEvent);w(f.select("floatingElement"),j)&&(Y.current||(Y.current=!0,q.current=!1))}),ae=K(S=>{!v||!n||(S.defaultPrevented||S.nativeEvent.defaultPrevented)&&Y.current&&(q.current=!0)});m.useEffect(()=>{if(!v||!n)return W;a.current.__escapeKeyBubbles=E,a.current.__outsidePressBubbles=Z;const S=new We,j=new We;function ce(){S.clear(),G.current=!0}function ue(){S.start(Je?5:0,()=>{G.current=!1})}function Se(){J.current=!0,j.start(0,()=>{J.current=!1})}function Fe(){Y.current=!1,q.current=!1}function h(){const c=oe.current,u=c==="pen"||!c?"mouse":c,V=T(),O=typeof V=="function"?V():V;return typeof O=="string"?O:O[u]}function re(c){const u=h();return u==="intentional"&&c.type!=="click"||u==="sloppy"&&c.type==="click"}function ee(c){const u=a.current.floatingContext?.nodeId,V=y&&Pe(y.nodesRef.current,u).some(O=>Ye(c,O.context?.elements.floating));return L(c)||V}function me(c){if(re(c)){c.type!=="click"&&!L(c)&&(j.clear(),J.current=!1),W();return}if(a.current.insideReactTree){W();return}const u=Ee(c),V=`[${Ke("inert")}]`,O=xe(u)?u.getRootNode():null,le=Array.from((St(O)?O:U(f.select("floatingElement"))).querySelectorAll(V)),Oe=f.context.triggerElements;if(u&&(Oe.hasElement(u)||Oe.hasMatchingElement(se=>w(se,u))))return;let we=xe(u)?u:null;for(;we&&!De(we);){const se=Jt(we);if(De(se)||!xe(se))break;we=se}if(!(le.length&&xe(u)&&!Qt(u)&&!w(u,f.select("floatingElement"))&&le.every(se=>!w(we,se)))){if(be(u)&&!("touches"in c)){const se=De(u),He=Zt(u),nt=/auto|scroll/,Pt=se||nt.test(He.overflowX),Ft=se||nt.test(He.overflowY),Mt=Pt&&u.clientWidth>0&&u.scrollWidth>u.clientWidth,At=Ft&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,Nt=He.direction==="rtl",Wt=At&&(Nt?c.offsetX<=u.offsetWidth-u.clientWidth:c.offsetX>u.clientWidth),Bt=Mt&&c.offsetY>u.clientHeight;if(Wt||Bt)return}if(!ee(c)){if(h()==="intentional"&&J.current){j.clear(),J.current=!1;return}typeof N=="function"&&!N(c)||R("__outsidePressBubbles")||(f.setOpen(!1,ke(wt,c)),W())}}}function b(c){h()!=="sloppy"||c.pointerType==="touch"||!f.select("open")||!n||L(c)||me(c)}function F(c){if(h()!=="sloppy"||!f.select("open")||!n||L(c))return;const u=c.touches[0];u&&(M.current={startTime:Date.now(),startX:u.clientX,startY:u.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}function B(c,u){const V=Ee(c);if(!V)return;const O=I(V,c.type,()=>{u(c),O()})}function _(c){oe.current="touch",B(c,F)}function z(c){$.clear(),c.type==="pointerdown"&&(oe.current=c.pointerType),!(c.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)&&B(c,u=>{u.type==="pointerdown"?b(u):me(u)})}function g(c){if(!Y.current)return;const u=q.current;if(Fe(),h()==="intentional"){if(c.type==="pointercancel"){u&&Se();return}if(!ee(c)){if(u){Se();return}typeof N=="function"&&!N(c)||(j.clear(),J.current=!0,W())}}}function x(c){if(h()!=="sloppy"||!M.current||L(c))return;const u=c.touches[0];if(!u)return;const V=Math.abs(u.clientX-M.current.startX),O=Math.abs(u.clientY-M.current.startY),le=Math.sqrt(V*V+O*O);le>5&&(M.current.dismissOnTouchEnd=!0),le>10&&(me(c),$.clear(),M.current=null)}function p(c){B(c,x)}function A(c){h()!=="sloppy"||!M.current||L(c)||(M.current.dismissOnTouchEnd&&me(c),$.clear(),M.current=null)}function X(c){B(c,A)}const k=U(P),Q=Ie(r&&Ie(I(k,"keydown",te),I(k,"compositionstart",ce),I(k,"compositionend",ue)),D&&Ie(I(k,"click",z,!0),I(k,"pointerdown",z,!0),I(k,"pointerup",g,!0),I(k,"pointercancel",g,!0),I(k,"mousedown",z,!0),I(k,"mouseup",g,!0),I(k,"touchstart",_,!0),I(k,"touchmove",p,!0),I(k,"touchend",X,!0)));return()=>{Q(),S.clear(),j.clear(),Fe(),J.current=!1,W()}},[a,P,r,D,N,v,n,E,Z,te,W,T,R,L,y,f,$]);const he=m.useMemo(()=>({onKeyDown:te,onPointerDown:ie,onClick:ie}),[te,ie]),Te=m.useMemo(()=>({onKeyDown:te,onPointerDown:ae,onMouseDown:ae,onClickCapture:ne,onMouseDownCapture(S){ne(),ge(S)},onPointerDownCapture(S){ne(),ge(S)},onMouseUpCapture:ne,onTouchEndCapture:ne,onTouchMoveCapture:ne}),[te,ne,ge,ae]);return m.useMemo(()=>n?{reference:he,floating:Te,trigger:he}:{},[n,he,Te])}const Rn={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class vn extends en{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:o,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:xt(),nested:r,triggerElements:o},Rn),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&dn(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function Sn(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:o,onOpenChange:i}=e,l=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),v=t.context.triggerElements,P=i,a=m.useRef(null);r===void 0&&a.current===null&&(a.current=new vn({open:l,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:v,onOpenChange:P,floatingId:s,syncOnly:!0,nested:o}));const y=r??a.current;return t.useSyncedValue("floatingId",s),H(()=>{const C={open:l,floatingId:s,referenceElement:d,floatingElement:f};xe(d)&&(C.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(C.positionReference=d),y.update(C)},[l,s,d,f,y]),y.context.onOpenChange=P,y.context.nested=o,y}function On(e,t=!1,n=!1){const[r,s]=m.useState(e&&t?"idle":void 0),[o,i]=m.useState(e);return e&&!o&&(i(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),H(()=>{if(!e&&o&&r!=="ending"&&n){const l=ye.request(()=>{s("ending")});return()=>{ye.cancel(l)}}},[e,o,r,n]),H(()=>{if(!e||t)return;const l=ye.request(()=>{s(void 0)});return()=>{ye.cancel(l)}},[t,e]),H(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const l=ye.request(()=>{s("idle")});return()=>{ye.cancel(l)}},[t,e,o,r]),{mounted:o,setMounted:i,transitionStatus:r}}const Jn={tabIndex:-1,[rn]:""};function Qn(e){return t=>t==="touch"?e.current:!0}function Zn(e,t=!1){const n=ze(),r=Ze()!=null,s=$e(()=>e(n,r)).current;return Sn({popupStore:s,treatPopupAsFloatingElement:t,floatingRootContext:s.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:s.setOpen}),s}function er({handle:e,store:t}){return H(()=>e.attachStore(t),[e,t]),null}function wn(e,t){const n=m.useRef(null),r=m.useRef(null);return m.useCallback(s=>{if(e===void 0)return;let o=!1;if(n.current!==null){const i=n.current,l=r.current,d=t.context.triggerElements.getById(i);l&&d===l&&(t.context.triggerElements.delete(i),o=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),o=!0),o){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function tr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function nr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function rr(e,t,n,r){const s=n.useState("isMountedByTrigger",e),o=wn(e,n),i=K(d=>{const f=n.select("open"),v=n.select("activeTriggerId");if(v===e){n.update({activeTriggerElement:d,...f?r:null});return}v==null&&f&&n.update({activeTriggerId:e,activeTriggerElement:d,...r})}),l=m.useCallback(d=>{o(d),d&&i(d)},[o,i]);return H(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function sr(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=m.useRef(null),s=e.useState("open"),o=e.useState("triggerCount"),i=e.useState("activeTriggerId"),l=e.useState("activeTriggerElement");H(()=>{if(!s){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const d=e.context.triggerElements.size,f={};e.state.triggerCount!==d&&(f.triggerCount=d);const v=e.select("activeTriggerId");let P=null;if(v){const a=e.context.triggerElements.getById(v);if(a)r.current=v,a!==e.state.activeTriggerElement&&(f.activeTriggerElement=a);else{for(const[y,C]of e.context.triggerElements.entries())if(C===e.state.activeTriggerElement){f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y;break}f.activeTriggerId===void 0&&(r.current===v?P=v:r.current=null)}}else r.current=null;if(!P&&!v&&d===1){const a=e.context.triggerElements.entries().next();if(!a.done){const[y,C]=a.value;f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y}}(f.triggerCount!==void 0||f.activeTriggerId!==void 0||f.activeTriggerElement!==void 0)&&e.update(f),P&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===P&&!e.context.triggerElements.getById(P)){const a=ke(tn);e.setOpen(!1,a),a.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,o,i,l,n])}function or(e,t,n){const{mounted:r,setMounted:s,transitionStatus:o}=On(e),i=t.useState("preventUnmountingOnClose"),l=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:o,preventUnmountingOnClose:l});const d=K(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return nn({enabled:r&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:o}}function ir(e,t){e.useSyncedValues(t),H(()=>()=>{e.update({activeTriggerProps:Ge,inactiveTriggerProps:Ge,popupProps:Ge})},[e])}function cr(e,t){H(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),H(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class ur{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ut.startingStyle]="startingStyle",e[e.endingStyle=ut.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({});const Cn={"data-popup-open":""},xn={"data-popup-open":"","data-pressed":""},In={"data-open":""},kn={"data-closed":""},Pn={"data-anchor-hidden":""},lr={open(e){return e?Cn:null}},ar={open(e){return e?xn:null}},Fn={open(e){return e?In:kn},anchorHidden(e){return e?Pn:null}},fr={...Fn,...sn};function dr(e){return ze(e,"base-ui")}const Mn="ArrowUp",An="ArrowDown",Nn="ArrowLeft",Wn="ArrowRight",Bn="Home",Ln="End",pr=new Set([Mn,An,Nn,Wn,Bn,Ln]),gr=m.forwardRef(function(t,n){const{cutout:r,...s}=t;let o;if(r){const i=r.getBoundingClientRect();o=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return Re.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});let Et={},Tt={},Rt="";function Le(e,t){return cn(e)?e:t}function vt(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Le(t,n)).overflowY)}function Hn(e){if(typeof document>"u")return!1;const t=U(e);return Be(t).innerWidth-t.documentElement.clientWidth>0}function Yn(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=U(e),r=n.documentElement,s=n.body,o=Le(r,s),i=o.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const d=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=i,r.style.scrollbarGutter=l,d===f}function Dn(e){const t=U(e),n=t.documentElement,r=t.body,s=Le(n,r),o={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,o)}}function Gn(e){const t=U(e),n=t.documentElement,r=t.body,s=Be(n);let o=0,i=0,l=!1;const d=ye.create();if(Je&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=s.getComputedStyle(n),C=s.getComputedStyle(r),T=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,i=n.scrollLeft,Et={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Rt=n.style.scrollBehavior,Tt={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const E=n.scrollHeight>n.clientHeight,Z=n.scrollWidth>n.clientWidth,Y=y.overflowY==="scroll"||C.overflowY==="scroll",q=y.overflowX==="scroll"||C.overflowX==="scroll",J=Math.max(0,s.innerWidth-r.clientWidth),G=Math.max(0,s.innerHeight-r.clientHeight),oe=parseFloat(C.marginTop)+parseFloat(C.marginBottom),M=parseFloat(C.marginLeft)+parseFloat(C.marginRight),$=Le(n,r);if(l=Yn(e),l){n.style.scrollbarGutter=T,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(E||Y)&&(n.style.overflowY="scroll"),(Z||q)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:oe||G?`calc(100dvh - ${oe+G}px)`:"100dvh",width:M||J?`calc(100vw - ${M+J}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function v(){Object.assign(n.style,Et),Object.assign(r.style,Tt),l||(n.scrollTop=o,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Rt)}function P(){v(),d.request(f)}f();const a=I(s,"resize",P);return()=>{d.cancel(),v(),typeof s.removeEventListener=="function"&&a()}}class _n{lockCount=0;restore=null;timeoutLock=We.create();timeoutUnlock=We.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const n=U(t),r=n.documentElement,s=n.body,o=Be(r);if(vt(o,r,s)){const l=new o.MutationObserver(()=>{vt(o,r,s)||(l.disconnect(),this.restore=null,this.lock(t))}),d={attributes:!0};l.observe(r,d),l.observe(s,d),this.restore=()=>l.disconnect();return}const i=on||!Hn(t);this.restore=i?Dn(t):Gn(t)}}const Un=new _n;function hr(e=!0,t=null){H(()=>{if(e)return Un.acquire(t)},[e,t])}export{Kn as A,qn as B,pr as C,fn as D,_e as E,vn as F,un as G,an as H,gr as I,ur as P,Fn as a,jn as b,Qn as c,Jn as d,zn as e,hr as f,ir as g,Zn as h,cr as i,sr as j,or as k,er as l,On as m,Vn as n,et as o,fr as p,Ze as q,Pe as r,tr as s,lr as t,dr as u,Me as v,nr as w,$n as x,rr as y,ar as z};
|
|
1
|
+
import{bP as Lt,bQ as Ve,aI as $e,aF as H,aJ as Ht,bd as U,bR as St,bG as je,j as Re,bS as ze,r as m,bb as K,bT as rt,bU as Yt,aK as st,ba as Ne,bw as Dt,bV as ot,bW as Ot,bf as I,be as Ie,bv as be,bX as Ke,bY as fe,bZ as de,aE as w,bi as Gt,b_ as wt,b$ as Je,bx as _t,bs as it,bn as ct,bp as Ut,c0 as Xt,aD as Ee,br as Vt,c1 as Kt,A as ke,bm as qt,c2 as Qe,aN as Be,c3 as $t,c4 as Ye,bj as jt,b9 as We,bk as zt,bc as xe,bC as De,bB as Jt,c5 as Qt,bz as Zt,aG as en,c6 as ye,aQ as tn,aA as nn,Z as Ge,c7 as rn,c8 as ut,az as sn,bN as on,bH as cn}from"./__vite-browser-external-B-CAZ5HB.js";function Pe(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Pe(e,s.id,n)])}function lt(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(o=>o.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function un(e){e.preventDefault(),e.stopPropagation()}function ln(e){return"nativeEvent"in e}function an(e){return e.pointerType===""&&e.isTrusted?!0:Ve&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fn(e){return Lt?!1:!Ve&&e.width===0&&e.height===0||Ve&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Vn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function dn(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Me(e){const t=$e(pn,e).current;return t.next=e,H(t.effect),t}function pn(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let Ae=0;function _e(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Ae);function o(){s&&!s()||e?.focus({preventScroll:n})}if(r)return o(),Ht;const i=requestAnimationFrame(o);return Ae=i,()=>{Ae===i&&(cancelAnimationFrame(i),Ae=0)}}const Ue={inert:new WeakMap,"aria-hidden":new WeakMap},at="data-base-ui-inert",qe={inert:new WeakSet,"aria-hidden":new WeakSet};let Ce=new WeakMap,Xe=0;function gn(e){return qe[e]}function Ct(e){return e?St(e)?e.host:Ct(e.parentNode):null}const ft=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ct(n);return e.contains(r)?r:null}).filter(n=>n!=null),dt=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},pt=(e,t,n)=>{const r=[],s=o=>{!o||n.has(o)||Array.from(o.children).forEach(i=>{je(i)!=="script"&&(t.has(i)?s(i):r.push(i))})};return s(e),r};function hn(e,t,n,r,{mark:s=!0}){let o=null;r?o="inert":n&&(o="aria-hidden");let i=null,l=null;const d=ft(t,e),f=s?pt(t,dt(d),new Set(d)):[],v=[],P=[];if(o){const a=Ue[o],y=gn(o);l=y,i=a;const C=ft(t,Array.from(t.querySelectorAll("[aria-live]"))),N=d.concat(C);pt(t,dt(N),new Set(N)).forEach(T=>{const E=T.getAttribute(o),Z=E!==null&&E!=="false",Y=(a.get(T)||0)+1;a.set(T,Y),v.push(T),Y===1&&Z&&y.add(T),Z||T.setAttribute(o,o==="inert"?"":"true")})}return s&&f.forEach(a=>{const y=(Ce.get(a)||0)+1;Ce.set(a,y),P.push(a),y===1&&a.setAttribute(at,"")}),Xe+=1,()=>{i&&v.forEach(a=>{const C=(i.get(a)||0)-1;i.set(a,C),C||(!l?.has(a)&&o&&a.removeAttribute(o),l?.delete(a))}),s&&P.forEach(a=>{const y=(Ce.get(a)||0)-1;Ce.set(a,y),y||a.removeAttribute(at)}),Xe-=1,Xe||(Ue.inert=new WeakMap,Ue["aria-hidden"]=new WeakMap,qe.inert=new WeakSet,qe["aria-hidden"]=new WeakSet,Ce=new WeakMap)}}function gt(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,o=U(e[0]).body;return hn(e,o,n,r,{mark:s})}function xt(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class mn{nodesRef={current:[]};events=xt();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const It=m.createContext(null),kt=m.createContext(null),Ze=()=>m.useContext(It)?.id||null,et=e=>{const t=m.useContext(kt);return e??t};function Kn(e){const t=ze(),n=et(e),r=Ze();return H(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function qn(e){const{children:t,id:n}=e,r=Ze();return Re.jsx(It.Provider,{value:m.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $n(e){const{children:t,externalTree:n}=e,r=$e(()=>n??new mn).current;return Re.jsx(kt.Provider,{value:r,children:t})}function bn(e,t){const n=Be(Ee(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const ht=20;let pe=[];function tt(){pe=pe.filter(e=>e.deref()?.isConnected)}function mt(e){tt(),e&&je(e)!=="body"&&(pe.push(new WeakRef(e)),pe.length>ht&&(pe=pe.slice(-ht)))}function bt(){return tt(),pe[pe.length-1]?.deref()}function yn(e){return e?Qe(e)?e:Ot(e)[0]||e:null}function yt(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=$t(e).filter(s=>{const o=s.getAttribute("data-tabindex")||"";return Qe(s)||s.hasAttribute("data-tabindex")&&!o.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function jn(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:o=!0,restoreFocus:i=!1,modal:l=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:v,previousFocusableElement:P,beforeContentFocusGuardRef:a,externalTree:y,getInsideElements:C}=e,N="rootStore"in t?t.rootStore:t,D=N.useState("open"),T=N.useState("domReferenceElement"),E=N.useState("floatingElement"),{events:Z,dataRef:Y}=N.context,q=K(()=>Y.current.floatingContext?.nodeId),J=s===!1,G=rt(T)&&J,oe=Me(s),M=Me(o),$=Me(f),ve=Me(D),W=et(y),R=Yt(),L=m.useRef(!1),ie=m.useRef(!1),te=m.useRef(!1),ne=m.useRef(null),ge=m.useRef(""),ae=m.useRef(""),he=m.useRef(null),Te=m.useRef(null),S=st(he,a,R?.beforeInsideRef),j=st(Te,R?.afterInsideRef),ce=Ne(),ue=Ne(),Se=Dt(),Fe=R!=null,h=ot(E),re=K((b=h)=>b?Ot(b):[]),ee=K(()=>C?.().filter(b=>b!=null)??[]);m.useEffect(()=>{if(r||!l)return;function b(B){B.key==="Tab"&&w(h,de(U(h)))&&re().length===0&&!G&&un(B)}const F=U(h);return I(F,"keydown",b)},[r,h,l,G,re]),m.useEffect(()=>{if(r||!D)return;const b=U(h);function F(){te.current=!1}function B(z){const g=Ee(z),x=ee(),p=w(E,g)||w(T,g)||w(R?.portalNode,g)||x.some(A=>A===g||w(A,g));te.current=!p,ae.current=z.pointerType||"keyboard",g?.closest(`[${Vt}]`)&&(ie.current=!0,ue.start(0,()=>{ie.current=!1}))}function _(){ae.current="keyboard"}return Ie(I(b,"pointerdown",B,!0),I(b,"pointerup",F,!0),I(b,"pointercancel",F,!0),I(b,"keydown",_,!0),F)},[r,E,T,h,D,R,ue,ee]),m.useEffect(()=>{if(r||!d)return;const b=U(h);function F(){ie.current=!0,ue.start(0,()=>{ie.current=!1})}function B(x){const p=Ee(x);Qe(p)&&(ne.current=p)}function _(x){const p=x.relatedTarget,A=x.currentTarget,X=Ee(x);l&&p==null&&X!=null&&w(E,X)&&mt(X),queueMicrotask(()=>{const k=q(),Q=N.context.triggerElements,c=ee(),u=p?.hasAttribute(Ke("focus-guard"))&&[he.current,Te.current,R?.beforeInsideRef.current,R?.afterInsideRef.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,fe(P),fe(v)].includes(p),V=!(w(T,p)||w(E,p)||w(p,E)||w(R?.portalNode,p)||c.some(O=>O===p||w(O,p))||Q.hasMatchingElement(O=>w(O,p))||u||W&&(Pe(W.nodesRef.current,k).find(O=>w(O.context?.elements.floating,p)||w(O.context?.elements.domReference,p))||lt(W.nodesRef.current,k).find(O=>[O.context?.elements.floating,ot(O.context?.elements.floating)].includes(p)||O.context?.elements.domReference===p)));if(A===T&&h&&yt(h),i&&A!==T&&!Kt(X)&&de(b)===b.body){if(be(h)&&(h.focus(),i==="popup")){Se.request(()=>{h.focus()});return}const O=re(),le=ne.current,Oe=(le&&O.includes(le)?le:null)||O[O.length-1]||h;be(Oe)&&Oe.focus()}if(Y.current.insideReactTree){Y.current.insideReactTree=!1;return}(G||!l)&&p&&V&&!ie.current&&(G||p!==bt())&&(L.current=!0,N.setOpen(!1,ke(qt,x)))})}function z(){te.current||(Y.current.insideReactTree=!0,ce.start(0,()=>{Y.current.insideReactTree=!1}))}const g=be(T)?T:null;if(!(!E&&!g))return Ie(g&&I(g,"focusout",_),g&&I(g,"pointerdown",F),E&&I(E,"focusin",B),E&&I(E,"focusout",_),E&&R&&I(E,"focusout",z,!0))},[r,T,E,h,l,W,R,N,d,i,re,G,q,Y,ce,ue,Se,v,P,ee]),m.useEffect(()=>{if(r||!E||!D)return;const b=Array.from(R?.portalNode?.querySelectorAll(`[${Ke("portal")}]`)||[]),B=(W?lt(W.nodesRef.current,q()):[]).find(A=>rt(A.context?.elements.domReference||null))?.context?.elements.domReference,z=[...[E,...b,he.current,Te.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,...ee()],B,fe(P),fe(v),G?T:null].filter(A=>A!=null),g=gt(z,{ariaHidden:l||G,mark:!1}),x=[E,...b].filter(A=>A!=null),p=gt(x);return()=>{p(),g()}},[D,r,T,E,l,R,G,W,q,v,P,ee]),H(()=>{if(!D||r||!be(h))return;ge.current="",ae.current="";const b=U(h),F=de(b);queueMicrotask(()=>{const B=oe.current,_=typeof B=="function"?B($.current||""):B;if(_===void 0||_===!1||w(h,F))return;let g=null;const x=()=>(g==null&&(g=re(h)),g[0]||h);let p;_===!0||_===null?p=x():p=fe(_),p=p||x();const A=w(h,de(b));_e(p,{preventScroll:p===h,shouldFocus(){if(!ve.current)return!1;if(A)return!0;const X=de(b);return!(X!==p&&w(h,X))}})})},[r,D,h,re,oe,$,ve]),H(()=>{if(r||!h)return;const b=U(h),F=de(b),B=$.current==null;mt(F);function _(g){if(g.open||(ge.current=bn(g.nativeEvent,ae.current)),g.reason===Gt&&g.nativeEvent.type==="mouseleave"&&(L.current=!0),g.reason===wt)if(g.nested)L.current=!1;else if(an(g.nativeEvent)||fn(g.nativeEvent))L.current=!1;else{let x=!1;U(h).createElement("div").focus({get preventScroll(){return x=!0,!1}}),x?L.current=!1:L.current=!0}}Z.on("openchange",_);function z(g){const x=M.current;let p=typeof x=="function"?x(g):x;if(p===void 0||p===!1)return null;p===null&&(p=!0);const A=T?.isConnected?T:null,X=F?.isConnected&&je(F)!=="body"?F:null;let k=B?X||A:A||X;return k||(k=bt()||null),typeof p=="boolean"?k:fe(p)||k||null}return()=>{Z.off("openchange",_);const g=de(b),x=ee(),p=w(E,g)||x.some(Q=>Q===g||w(Q,g))||W&&Pe(W.nodesRef.current,q(),!1).some(Q=>w(Q.context?.elements.floating,g)),A=M.current,X=ge.current,k=z(X);queueMicrotask(()=>{const Q=yn(k),c=typeof A!="boolean";if(A&&!L.current&&be(Q)&&(!(!c&&Q!==g&&g!==b.body)||p)){const u={preventScroll:!0};X==="keyboard"&&(u.focusVisible=!0),Q.focus(u)}L.current=!1})}},[r,E,h,M,$,Z,W,T,q,ee]),H(()=>{if(!Je||D||!E)return;const b=de(U(E));!be(b)||!_t(b)||w(E,b)&&b.blur()},[D,E]),H(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:d,open:D,onOpenChange:N.setOpen,domReference:T}),()=>{R.setFocusManagerState(null)}},[r,R,l,D,N,d,T]),H(()=>{if(!(r||!h))return yt(h),()=>{queueMicrotask(tt)}},[r,h]);const me=!r&&(l?!G:!0)&&(Fe||l);return Re.jsxs(m.Fragment,{children:[me&&Re.jsx(it,{"data-type":"inside",ref:S,onFocus:b=>{if(l){const F=re();_e(F[F.length-1])}else R?.portalNode&&(L.current=!1,ct(b,R.portalNode)?Ut(T)?.focus():fe(P??R.beforeOutsideRef)?.focus())}}),n,me&&Re.jsx(it,{"data-type":"inside",ref:j,onFocus:b=>{l?_e(re()[0]):R?.portalNode&&(d&&(L.current=!0),ct(b,R.portalNode)?Xt(T)?.focus():fe(v??R.afterOutsideRef)?.focus())}})]})}function En(){return!1}function Tn(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function zn(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:o="sloppy",referencePress:i=En,bubbles:l,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,v=f.useState("open"),P=f.useState("floatingElement"),{dataRef:a}=f.context,y=et(d),C=K(typeof s=="function"?s:()=>!1),N=typeof s=="function"?C:s,D=N!==!1,T=K(()=>o),{escapeKey:E,outsidePress:Z}=Tn(l),Y=m.useRef(!1),q=m.useRef(!1),J=m.useRef(!1),G=m.useRef(!1),oe=m.useRef(""),M=m.useRef(null),$=Ne(),ve=Ne(),W=K(()=>{ve.clear(),a.current.insideReactTree=!1}),R=K(S=>{const j=a.current.floatingContext?.nodeId;return(y?Pe(y.nodesRef.current,j):[]).some(ue=>ue.context?.open&&!ue.context.dataRef.current[S])}),L=K(S=>Ye(S,f.select("floatingElement"))||Ye(S,f.select("domReferenceElement"))),ie=K(S=>{i()&&f.setOpen(!1,ke(jt,S.nativeEvent))}),te=K(S=>{if(!v||!n||!r||S.key!=="Escape"||G.current||!E&&R("__escapeKeyBubbles"))return;const j=ln(S)?S.nativeEvent:S,ce=ke(zt,j);f.setOpen(!1,ce),ce.isCanceled||S.preventDefault(),!E&&!ce.isPropagationAllowed&&S.stopPropagation()}),ne=K(()=>{a.current.insideReactTree=!0,ve.start(0,W)}),ge=K(S=>{if(!v||!n||S.button!==0)return;const j=Ee(S.nativeEvent);w(f.select("floatingElement"),j)&&(Y.current||(Y.current=!0,q.current=!1))}),ae=K(S=>{!v||!n||(S.defaultPrevented||S.nativeEvent.defaultPrevented)&&Y.current&&(q.current=!0)});m.useEffect(()=>{if(!v||!n)return W;a.current.__escapeKeyBubbles=E,a.current.__outsidePressBubbles=Z;const S=new We,j=new We;function ce(){S.clear(),G.current=!0}function ue(){S.start(Je?5:0,()=>{G.current=!1})}function Se(){J.current=!0,j.start(0,()=>{J.current=!1})}function Fe(){Y.current=!1,q.current=!1}function h(){const c=oe.current,u=c==="pen"||!c?"mouse":c,V=T(),O=typeof V=="function"?V():V;return typeof O=="string"?O:O[u]}function re(c){const u=h();return u==="intentional"&&c.type!=="click"||u==="sloppy"&&c.type==="click"}function ee(c){const u=a.current.floatingContext?.nodeId,V=y&&Pe(y.nodesRef.current,u).some(O=>Ye(c,O.context?.elements.floating));return L(c)||V}function me(c){if(re(c)){c.type!=="click"&&!L(c)&&(j.clear(),J.current=!1),W();return}if(a.current.insideReactTree){W();return}const u=Ee(c),V=`[${Ke("inert")}]`,O=xe(u)?u.getRootNode():null,le=Array.from((St(O)?O:U(f.select("floatingElement"))).querySelectorAll(V)),Oe=f.context.triggerElements;if(u&&(Oe.hasElement(u)||Oe.hasMatchingElement(se=>w(se,u))))return;let we=xe(u)?u:null;for(;we&&!De(we);){const se=Jt(we);if(De(se)||!xe(se))break;we=se}if(!(le.length&&xe(u)&&!Qt(u)&&!w(u,f.select("floatingElement"))&&le.every(se=>!w(we,se)))){if(be(u)&&!("touches"in c)){const se=De(u),He=Zt(u),nt=/auto|scroll/,Pt=se||nt.test(He.overflowX),Ft=se||nt.test(He.overflowY),Mt=Pt&&u.clientWidth>0&&u.scrollWidth>u.clientWidth,At=Ft&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,Nt=He.direction==="rtl",Wt=At&&(Nt?c.offsetX<=u.offsetWidth-u.clientWidth:c.offsetX>u.clientWidth),Bt=Mt&&c.offsetY>u.clientHeight;if(Wt||Bt)return}if(!ee(c)){if(h()==="intentional"&&J.current){j.clear(),J.current=!1;return}typeof N=="function"&&!N(c)||R("__outsidePressBubbles")||(f.setOpen(!1,ke(wt,c)),W())}}}function b(c){h()!=="sloppy"||c.pointerType==="touch"||!f.select("open")||!n||L(c)||me(c)}function F(c){if(h()!=="sloppy"||!f.select("open")||!n||L(c))return;const u=c.touches[0];u&&(M.current={startTime:Date.now(),startX:u.clientX,startY:u.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}function B(c,u){const V=Ee(c);if(!V)return;const O=I(V,c.type,()=>{u(c),O()})}function _(c){oe.current="touch",B(c,F)}function z(c){$.clear(),c.type==="pointerdown"&&(oe.current=c.pointerType),!(c.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)&&B(c,u=>{u.type==="pointerdown"?b(u):me(u)})}function g(c){if(!Y.current)return;const u=q.current;if(Fe(),h()==="intentional"){if(c.type==="pointercancel"){u&&Se();return}if(!ee(c)){if(u){Se();return}typeof N=="function"&&!N(c)||(j.clear(),J.current=!0,W())}}}function x(c){if(h()!=="sloppy"||!M.current||L(c))return;const u=c.touches[0];if(!u)return;const V=Math.abs(u.clientX-M.current.startX),O=Math.abs(u.clientY-M.current.startY),le=Math.sqrt(V*V+O*O);le>5&&(M.current.dismissOnTouchEnd=!0),le>10&&(me(c),$.clear(),M.current=null)}function p(c){B(c,x)}function A(c){h()!=="sloppy"||!M.current||L(c)||(M.current.dismissOnTouchEnd&&me(c),$.clear(),M.current=null)}function X(c){B(c,A)}const k=U(P),Q=Ie(r&&Ie(I(k,"keydown",te),I(k,"compositionstart",ce),I(k,"compositionend",ue)),D&&Ie(I(k,"click",z,!0),I(k,"pointerdown",z,!0),I(k,"pointerup",g,!0),I(k,"pointercancel",g,!0),I(k,"mousedown",z,!0),I(k,"mouseup",g,!0),I(k,"touchstart",_,!0),I(k,"touchmove",p,!0),I(k,"touchend",X,!0)));return()=>{Q(),S.clear(),j.clear(),Fe(),J.current=!1,W()}},[a,P,r,D,N,v,n,E,Z,te,W,T,R,L,y,f,$]);const he=m.useMemo(()=>({onKeyDown:te,onPointerDown:ie,onClick:ie}),[te,ie]),Te=m.useMemo(()=>({onKeyDown:te,onPointerDown:ae,onMouseDown:ae,onClickCapture:ne,onMouseDownCapture(S){ne(),ge(S)},onPointerDownCapture(S){ne(),ge(S)},onMouseUpCapture:ne,onTouchEndCapture:ne,onTouchMoveCapture:ne}),[te,ne,ge,ae]);return m.useMemo(()=>n?{reference:he,floating:Te,trigger:he}:{},[n,he,Te])}const Rn={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class vn extends en{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:o,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:xt(),nested:r,triggerElements:o},Rn),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&dn(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function Sn(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:o,onOpenChange:i}=e,l=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),v=t.context.triggerElements,P=i,a=m.useRef(null);r===void 0&&a.current===null&&(a.current=new vn({open:l,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:v,onOpenChange:P,floatingId:s,syncOnly:!0,nested:o}));const y=r??a.current;return t.useSyncedValue("floatingId",s),H(()=>{const C={open:l,floatingId:s,referenceElement:d,floatingElement:f};xe(d)&&(C.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(C.positionReference=d),y.update(C)},[l,s,d,f,y]),y.context.onOpenChange=P,y.context.nested=o,y}function On(e,t=!1,n=!1){const[r,s]=m.useState(e&&t?"idle":void 0),[o,i]=m.useState(e);return e&&!o&&(i(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),H(()=>{if(!e&&o&&r!=="ending"&&n){const l=ye.request(()=>{s("ending")});return()=>{ye.cancel(l)}}},[e,o,r,n]),H(()=>{if(!e||t)return;const l=ye.request(()=>{s(void 0)});return()=>{ye.cancel(l)}},[t,e]),H(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const l=ye.request(()=>{s("idle")});return()=>{ye.cancel(l)}},[t,e,o,r]),{mounted:o,setMounted:i,transitionStatus:r}}const Jn={tabIndex:-1,[rn]:""};function Qn(e){return t=>t==="touch"?e.current:!0}function Zn(e,t=!1){const n=ze(),r=Ze()!=null,s=$e(()=>e(n,r)).current;return Sn({popupStore:s,treatPopupAsFloatingElement:t,floatingRootContext:s.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:s.setOpen}),s}function er({handle:e,store:t}){return H(()=>e.attachStore(t),[e,t]),null}function wn(e,t){const n=m.useRef(null),r=m.useRef(null);return m.useCallback(s=>{if(e===void 0)return;let o=!1;if(n.current!==null){const i=n.current,l=r.current,d=t.context.triggerElements.getById(i);l&&d===l&&(t.context.triggerElements.delete(i),o=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),o=!0),o){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function tr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function nr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function rr(e,t,n,r){const s=n.useState("isMountedByTrigger",e),o=wn(e,n),i=K(d=>{const f=n.select("open"),v=n.select("activeTriggerId");if(v===e){n.update({activeTriggerElement:d,...f?r:null});return}v==null&&f&&n.update({activeTriggerId:e,activeTriggerElement:d,...r})}),l=m.useCallback(d=>{o(d),d&&i(d)},[o,i]);return H(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function sr(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=m.useRef(null),s=e.useState("open"),o=e.useState("triggerCount"),i=e.useState("activeTriggerId"),l=e.useState("activeTriggerElement");H(()=>{if(!s){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const d=e.context.triggerElements.size,f={};e.state.triggerCount!==d&&(f.triggerCount=d);const v=e.select("activeTriggerId");let P=null;if(v){const a=e.context.triggerElements.getById(v);if(a)r.current=v,a!==e.state.activeTriggerElement&&(f.activeTriggerElement=a);else{for(const[y,C]of e.context.triggerElements.entries())if(C===e.state.activeTriggerElement){f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y;break}f.activeTriggerId===void 0&&(r.current===v?P=v:r.current=null)}}else r.current=null;if(!P&&!v&&d===1){const a=e.context.triggerElements.entries().next();if(!a.done){const[y,C]=a.value;f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y}}(f.triggerCount!==void 0||f.activeTriggerId!==void 0||f.activeTriggerElement!==void 0)&&e.update(f),P&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===P&&!e.context.triggerElements.getById(P)){const a=ke(tn);e.setOpen(!1,a),a.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,o,i,l,n])}function or(e,t,n){const{mounted:r,setMounted:s,transitionStatus:o}=On(e),i=t.useState("preventUnmountingOnClose"),l=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:o,preventUnmountingOnClose:l});const d=K(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return nn({enabled:r&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:o}}function ir(e,t){e.useSyncedValues(t),H(()=>()=>{e.update({activeTriggerProps:Ge,inactiveTriggerProps:Ge,popupProps:Ge})},[e])}function cr(e,t){H(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),H(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class ur{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ut.startingStyle]="startingStyle",e[e.endingStyle=ut.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({});const Cn={"data-popup-open":""},xn={"data-popup-open":"","data-pressed":""},In={"data-open":""},kn={"data-closed":""},Pn={"data-anchor-hidden":""},lr={open(e){return e?Cn:null}},ar={open(e){return e?xn:null}},Fn={open(e){return e?In:kn},anchorHidden(e){return e?Pn:null}},fr={...Fn,...sn};function dr(e){return ze(e,"base-ui")}const Mn="ArrowUp",An="ArrowDown",Nn="ArrowLeft",Wn="ArrowRight",Bn="Home",Ln="End",pr=new Set([Mn,An,Nn,Wn,Bn,Ln]),gr=m.forwardRef(function(t,n){const{cutout:r,...s}=t;let o;if(r){const i=r.getBoundingClientRect();o=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return Re.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});let Et={},Tt={},Rt="";function Le(e,t){return cn(e)?e:t}function vt(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Le(t,n)).overflowY)}function Hn(e){if(typeof document>"u")return!1;const t=U(e);return Be(t).innerWidth-t.documentElement.clientWidth>0}function Yn(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=U(e),r=n.documentElement,s=n.body,o=Le(r,s),i=o.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const d=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=i,r.style.scrollbarGutter=l,d===f}function Dn(e){const t=U(e),n=t.documentElement,r=t.body,s=Le(n,r),o={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,o)}}function Gn(e){const t=U(e),n=t.documentElement,r=t.body,s=Be(n);let o=0,i=0,l=!1;const d=ye.create();if(Je&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=s.getComputedStyle(n),C=s.getComputedStyle(r),T=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,i=n.scrollLeft,Et={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Rt=n.style.scrollBehavior,Tt={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const E=n.scrollHeight>n.clientHeight,Z=n.scrollWidth>n.clientWidth,Y=y.overflowY==="scroll"||C.overflowY==="scroll",q=y.overflowX==="scroll"||C.overflowX==="scroll",J=Math.max(0,s.innerWidth-r.clientWidth),G=Math.max(0,s.innerHeight-r.clientHeight),oe=parseFloat(C.marginTop)+parseFloat(C.marginBottom),M=parseFloat(C.marginLeft)+parseFloat(C.marginRight),$=Le(n,r);if(l=Yn(e),l){n.style.scrollbarGutter=T,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(E||Y)&&(n.style.overflowY="scroll"),(Z||q)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:oe||G?`calc(100dvh - ${oe+G}px)`:"100dvh",width:M||J?`calc(100vw - ${M+J}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function v(){Object.assign(n.style,Et),Object.assign(r.style,Tt),l||(n.scrollTop=o,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Rt)}function P(){v(),d.request(f)}f();const a=I(s,"resize",P);return()=>{d.cancel(),v(),typeof s.removeEventListener=="function"&&a()}}class _n{lockCount=0;restore=null;timeoutLock=We.create();timeoutUnlock=We.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const n=U(t),r=n.documentElement,s=n.body,o=Be(r);if(vt(o,r,s)){const l=new o.MutationObserver(()=>{vt(o,r,s)||(l.disconnect(),this.restore=null,this.lock(t))}),d={attributes:!0};l.observe(r,d),l.observe(s,d),this.restore=()=>l.disconnect();return}const i=on||!Hn(t);this.restore=i?Dn(t):Gn(t)}}const Un=new _n;function hr(e=!0,t=null){H(()=>{if(e)return Un.acquire(t)},[e,t])}export{Kn as A,qn as B,pr as C,fn as D,_e as E,vn as F,un as G,an as H,gr as I,ur as P,Fn as a,jn as b,Qn as c,Jn as d,zn as e,hr as f,ir as g,Zn as h,cr as i,sr as j,or as k,er as l,On as m,Vn as n,et as o,fr as p,Ze as q,Pe as r,tr as s,lr as t,dr as u,Me as v,nr as w,$n as x,rr as y,ar as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,T as r,n,o as a,p as s}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,T as r,n,o as a,p as s}from"./__vite-browser-external-B-CAZ5HB.js";const T=Object.freeze({mode:n.COMPACT,setMode:()=>{},formatTokens:(o,t={})=>s(o,t),formatTokensTooltip:(o,t={})=>a(o,t)});function f(){return e.useContext(r)??T}export{f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as a}from"./__vite-browser-external-
|
|
1
|
+
import{m as a}from"./__vite-browser-external-B-CAZ5HB.js";const o=[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]],e=a("zap",o);export{e as Z};
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"price": "0",
|
|
124
124
|
"priceCurrency": "USD"
|
|
125
125
|
},
|
|
126
|
-
"description": "Local-first AI coding usage tracker for
|
|
126
|
+
"description": "Local-first AI coding usage tracker for 31 tools, with a desktop pet, four widgets, achievements, native macOS and Windows apps, accurate cross-provider deduplication, and no prompt collection."
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"@type": "WebSite",
|
|
@@ -182,17 +182,19 @@
|
|
|
182
182
|
{ "@type": "ListItem", "position": 16, "name": "oh-my-pi" },
|
|
183
183
|
{ "@type": "ListItem", "position": 17, "name": "pi" },
|
|
184
184
|
{ "@type": "ListItem", "position": 18, "name": "Craft Agents" },
|
|
185
|
-
{ "@type": "ListItem", "position": 19, "name": "
|
|
186
|
-
{ "@type": "ListItem", "position": 20, "name": "Kilo
|
|
187
|
-
{ "@type": "ListItem", "position": 21, "name": "
|
|
188
|
-
{ "@type": "ListItem", "position": 22, "name": "
|
|
189
|
-
{ "@type": "ListItem", "position": 23, "name": "
|
|
190
|
-
{ "@type": "ListItem", "position": 24, "name": "
|
|
191
|
-
{ "@type": "ListItem", "position": 25, "name": "
|
|
192
|
-
{ "@type": "ListItem", "position": 26, "name": "
|
|
193
|
-
{ "@type": "ListItem", "position": 27, "name": "
|
|
194
|
-
{ "@type": "ListItem", "position": 28, "name": "
|
|
195
|
-
{ "@type": "ListItem", "position": 29, "name": "
|
|
185
|
+
{ "@type": "ListItem", "position": 19, "name": "Reasonix" },
|
|
186
|
+
{ "@type": "ListItem", "position": 20, "name": "Kilo CLI" },
|
|
187
|
+
{ "@type": "ListItem", "position": 21, "name": "Kilo Code" },
|
|
188
|
+
{ "@type": "ListItem", "position": 22, "name": "Roo Code" },
|
|
189
|
+
{ "@type": "ListItem", "position": 23, "name": "Zed Agent" },
|
|
190
|
+
{ "@type": "ListItem", "position": 24, "name": "Goose" },
|
|
191
|
+
{ "@type": "ListItem", "position": 25, "name": "Droid" },
|
|
192
|
+
{ "@type": "ListItem", "position": 26, "name": "Mimo Code" },
|
|
193
|
+
{ "@type": "ListItem", "position": 27, "name": "ZCode" },
|
|
194
|
+
{ "@type": "ListItem", "position": 28, "name": "Qoder" },
|
|
195
|
+
{ "@type": "ListItem", "position": 29, "name": "AnythingLLM Desktop" },
|
|
196
|
+
{ "@type": "ListItem", "position": 30, "name": "Claude Science" },
|
|
197
|
+
{ "@type": "ListItem", "position": 31, "name": "DeepSeek Harness" }
|
|
196
198
|
]
|
|
197
199
|
},
|
|
198
200
|
{
|
|
@@ -207,11 +209,10 @@
|
|
|
207
209
|
}
|
|
208
210
|
},
|
|
209
211
|
{
|
|
210
|
-
"@type": "
|
|
211
|
-
"name": "Which AI coding CLIs does Token Tracker support?",
|
|
212
|
+
"@type": "Quest "name": "Which AI coding CLIs does Token Tracker support?",
|
|
212
213
|
"acceptedAnswer": {
|
|
213
214
|
"@type": "Answer",
|
|
214
|
-
"text": "Token Tracker supports
|
|
215
|
+
"text": "Token Tracker supports 31 AI coding tools, including Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, Grok Build, oh-my-pi, pi, Craft Agents, Reasonix, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, Qoder, AnythingLLM Desktop, Claude Science, and DeepSeek Harness."
|
|
215
216
|
}
|
|
216
217
|
},
|
|
217
218
|
{
|
|
@@ -243,7 +244,7 @@
|
|
|
243
244
|
"name": "How do I monitor AI token usage and cost across tools?",
|
|
244
245
|
"acceptedAnswer": {
|
|
245
246
|
"@type": "Answer",
|
|
246
|
-
"text": "Install Token Tracker with npx tokentracker-cli. It is an AI token usage and cost tracker that monitors token consumption and spend across all
|
|
247
|
+
"text": "Install Token Tracker with npx tokentracker-cli. It is an AI token usage and cost tracker that monitors token consumption and spend across all 31 supported tools in one dashboard, with per-model pricing across 2,200+ models so you can see cost by model, project, and time window without manual tracking."
|
|
247
248
|
}
|
|
248
249
|
},
|
|
249
250
|
{
|
|
@@ -251,7 +252,7 @@
|
|
|
251
252
|
"name": "Does Token Tracker work offline?",
|
|
252
253
|
"acceptedAnswer": {
|
|
253
254
|
"@type": "Answer",
|
|
254
|
-
"text": "Yes. Token Tracker is local-first. All parsing, aggregation, and dashboard rendering happens on your machine. Cloud sync is optional and
|
|
255
|
+
"text": "Yes. Token Tracker is local-first. All parsing, aggregation, and dashboard rendering happens on your machine. Cloud sync is optional and powers only the public leaderboard."
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
258
|
]
|
|
@@ -259,7 +260,7 @@
|
|
|
259
260
|
]
|
|
260
261
|
}
|
|
261
262
|
</script>
|
|
262
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
263
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-B-CAZ5HB.js"></script>
|
|
263
264
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CRYifSM4.css">
|
|
264
265
|
</head>
|
|
265
266
|
<body>
|
|
@@ -267,7 +268,7 @@
|
|
|
267
268
|
<h1>Token Tracker: monitor AI token usage and cost with a local dashboard and desktop companion</h1>
|
|
268
269
|
<p>
|
|
269
270
|
Token Tracker is a free, open-source, local-first dashboard that automatically tracks and monitors token usage
|
|
270
|
-
and cost across
|
|
271
|
+
and cost across 31 AI coding tools — including Claude Code, OpenAI Codex, Cursor, Gemini CLI, and DeepSeek Harness. A desktop pet
|
|
271
272
|
reacts to real token activity, four desktop widgets
|
|
272
273
|
keep usage visible, and achievements turn coding history into progress. Native macOS and Windows apps
|
|
273
274
|
sit on top of accurate cross-provider deduplication. Token counts only — never prompts or conversations.
|
|
@@ -292,7 +293,7 @@
|
|
|
292
293
|
<li><strong>Desktop pet</strong> — a pixel companion that reacts to real token burn, streaks, and rest.</li>
|
|
293
294
|
<li><strong>Four desktop widgets</strong> — usage, activity heatmap, top models, and limits at a glance.</li>
|
|
294
295
|
<li><strong>Achievements</strong> — unlock milestones from local and optional account-wide activity.</li>
|
|
295
|
-
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across
|
|
296
|
+
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across 31 AI coding tools.</li>
|
|
296
297
|
<li><strong>Cost analysis</strong> — per-model pricing across 2,200+ models with an offline snapshot.</li>
|
|
297
298
|
<li><strong>Usage limits view</strong> — live quota and subscription status for 13 providers, with last-good caching for local providers such as Antigravity and Qoder.</li>
|
|
298
299
|
<li><strong>Service Status page</strong> — live operational and incident status from eight official provider status pages.</li>
|
|
@@ -303,11 +304,11 @@
|
|
|
303
304
|
</ul>
|
|
304
305
|
<p><em>Privacy by design</em>: token counts only, never prompts or conversation content. Local-first; cloud sync is optional and powers only the public leaderboard.</p>
|
|
305
306
|
|
|
306
|
-
<h2>Supported AI coding tools (
|
|
307
|
+
<h2>Supported AI coding tools (31)</h2>
|
|
307
308
|
<p>
|
|
308
309
|
Use Token Tracker as a Claude Code token tracker, Codex token tracker, Cursor token tracker,
|
|
309
|
-
Gemini token tracker, OpenCode token tracker,
|
|
310
|
-
covers all
|
|
310
|
+
Gemini token tracker, OpenCode token tracker, GitHub Copilot token tracker, or DeepSeek Harness token tracker — one dashboard
|
|
311
|
+
covers all 31 tools below.
|
|
311
312
|
</p>
|
|
312
313
|
<ul>
|
|
313
314
|
<li><strong>Claude Code</strong> — Anthropic's official coding agent CLI; integrated via SessionEnd hook.</li>
|
|
@@ -328,6 +329,7 @@
|
|
|
328
329
|
<li><strong>oh-my-pi</strong> — passive JSONL session reader.</li>
|
|
329
330
|
<li><strong>pi</strong> — passive JSONL session reader.</li>
|
|
330
331
|
<li><strong>Craft Agents</strong> — passive session reader.</li>
|
|
332
|
+
<li><strong>Reasonix</strong> — passive telemetry reader.</li>
|
|
331
333
|
<li><strong>Kilo CLI</strong> — passive SQLite reader.</li>
|
|
332
334
|
<li><strong>Kilo Code</strong> — passive editor task reader.</li>
|
|
333
335
|
<li><strong>Roo Code</strong> — passive editor task reader.</li>
|
|
@@ -339,6 +341,7 @@
|
|
|
339
341
|
<li><strong>Qoder</strong> — passive SQLite reader with exact prompt, cached-input, and completion token counters.</li>
|
|
340
342
|
<li><strong>AnythingLLM Desktop</strong> — passive per-message token metrics reader.</li>
|
|
341
343
|
<li><strong>Claude Science</strong> — passive reader for the <code>frames</code> table of <code>operon-cli.db</code>.</li>
|
|
344
|
+
<li><strong>DeepSeek Harness</strong> — passive session reader (<code>~/.dsh/sessions/**/session.jsonl[.zstd]</code>).</li>
|
|
342
345
|
</ul>
|
|
343
346
|
|
|
344
347
|
<h2>Who should use Token Tracker</h2>
|
|
@@ -369,7 +372,7 @@
|
|
|
369
372
|
<p>Run <code>npx tokentracker-cli</code>. The CLI auto-detects your AI coding tools, installs hooks, and opens the dashboard.</p>
|
|
370
373
|
|
|
371
374
|
<h3>Which AI coding tools does Token Tracker support?</h3>
|
|
372
|
-
<p>Token Tracker supports
|
|
375
|
+
<p>Token Tracker supports 31 tools: Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, Grok Build, oh-my-pi, pi, Craft Agents, Reasonix, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, Qoder, AnythingLLM Desktop, Claude Science, and DeepSeek Harness.</p>
|
|
373
376
|
|
|
374
377
|
<h3>Is Token Tracker free and open source?</h3>
|
|
375
378
|
<p>Yes. Source on GitHub at <a href="https://github.com/xiufengsun/TokenTracker">github.com/xiufengsun/TokenTracker</a>; npm package <code>tokentracker-cli</code>.</p>
|
|
@@ -381,7 +384,7 @@
|
|
|
381
384
|
<p>Input, output, cached, and cache-creation tokens per model, project, and time window. It also surfaces usage limits for 13 providers, including Claude, Codex, Cursor, Gemini, Antigravity, Qoder, and Qoder CN.</p>
|
|
382
385
|
|
|
383
386
|
<h3>How do I monitor AI token usage and cost across tools?</h3>
|
|
384
|
-
<p>Token Tracker is an AI token usage and cost tracker: install it with <code>npx tokentracker-cli</code>, and it monitors token consumption and spend across all
|
|
387
|
+
<p>Token Tracker is an AI token usage and cost tracker: install it with <code>npx tokentracker-cli</code>, and it monitors token consumption and spend across all 31 tools in one dashboard, with per-model pricing across 2,200+ models so you can see cost by model, project, and time window without manual tracking.</p>00+ models so you can see cost by model, project, and time window without manual tracking.</p>
|
|
385
388
|
|
|
386
389
|
<h3>Does Token Tracker work offline?</h3>
|
|
387
390
|
<p>Yes. Token Tracker is local-first. All parsing, aggregation, and dashboard rendering happen on your machine. Cloud sync is optional and powers only the public leaderboard.</p>
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
</script>
|
|
168
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
168
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-B-CAZ5HB.js"></script>
|
|
169
169
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CRYifSM4.css">
|
|
170
170
|
</head>
|
|
171
171
|
<body>
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
</script>
|
|
139
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
139
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-B-CAZ5HB.js"></script>
|
|
140
140
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CRYifSM4.css">
|
|
141
141
|
</head>
|
|
142
142
|
<body>
|