tokentracker-cli 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dashboard/dist/assets/{AchievementBadge-3IYidbrI.js → AchievementBadge-slL-XBCu.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-DmZ_ojyM.js → AchievementsPage-BeFkGc5M.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-DIYrrzhw.js → AchievementsSection-BrGUIipD.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-DMMExCe4.js → BadgeDetailModal-avmK1ODc.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-y6vZNRvC.js → BotAnimated-DaEPdEZi.js} +1 -1
- package/dashboard/dist/assets/{Card-LJX3G3zo.js → Card-CIZCccTA.js} +1 -1
- package/dashboard/dist/assets/{CloudCheckoutPage-BGBgSXNE.js → CloudCheckoutPage-BhRj0SYO.js} +1 -1
- package/dashboard/dist/assets/{CloudPage-Dij2GTXi.js → CloudPage-CvaN8a54.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-BIky6Fk0.js → CommandPalette-BUNuXmYF.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-DbM99i0s.js → CommunityStatsModal-BCI0WHPr.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-C_NH8vgO.js → ConfirmModal-CT7IwtLR.js} +1 -1
- package/dashboard/dist/assets/{Controls-BEAj_kvr.js → Controls-CtnMyxNH.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-DO7h2dfu.js → DashboardPage-BuzyITeL.js} +1 -1
- package/dashboard/dist/assets/{DateRangePopover-PQXB8v0k.js → DateRangePopover-1Ps1-1dw.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-0JZ3OIWZ.js → DevicePage-Dt-dVQAG.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-BpWoD5h9.js → DialogClose-D-DRTF1u.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-BOYDS1mM.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-DoQgdh5w.js → DialogTitle-CiiRTn3_.js} +1 -1
- package/dashboard/dist/assets/{ElectricLogo-0O87VjKv.js → ElectricLogo-k6RFJ2qC.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-9ph1h_AG.js → FadeIn-CNHg83aK.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-DCZ92xbH.js → HeaderGithubStar-CIYW5dc3.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-CCKdmuOP.js → HoverTooltip-Dn80DyPM.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-CpyhpmdS.js → IpCheckPage-B29dYfoI.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-spvsPkYy.js → LandingPage-Dzc8_QyW.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardPage-2nJ08ohw.js → LeaderboardPage-DXPcIhyQ.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProBadge-D6FSL3Qy.js → LeaderboardProBadge-DxEdj2Zq.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfileModal-DD1jX-rD.js → LeaderboardProfileModal-DnKY2223.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-DYqRrntL.js → LeaderboardProfilePage-CY94ngqy.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-DXHikunk.js → LimitsPage-AlvnAPCD.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-BURiQAtP.js → LocalOnlyNotice-EHw7BeYS.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-Cv2ijoJx.js → LoginCard-E5E3i2kj.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-DyOideDA.js → LoginModal-DxhQI9kh.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-BKNvqvYi.js → LoginPage-DRwJn-Fw.js} +1 -1
- package/dashboard/dist/assets/{PetPage-BBmozE0L.js → PetPage-DIpVTdiC.js} +2 -2
- package/dashboard/dist/assets/{PopoverPopup-DDnISLKM.js → PopoverPopup-Bjs7E91g.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-Da90GDcM.js → ProviderIcon-DqXIjym-.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-DsETr50j.js → ResetPasswordPage-DxSRYQgP.js} +1 -1
- package/dashboard/dist/assets/{Select-pZDawyxt.js → Select-BfjrcaiM.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-D5wuuN7G.js → SelectItemText-Dpdlb0cU.js} +1 -1
- package/dashboard/dist/assets/{SelfHostPage-sm-PARYj.js → SelfHostPage-Cnp_PMaD.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-D4f8h0sL.js → ServiceStatusPage-fBwG-qXq.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-xVLsTN4m.js → SessionsPage-BEk7AHdq.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-Dt9iFheY.js → SettingsPage-BgML2jQR.js} +3 -3
- package/dashboard/dist/assets/{SkillsPage-BdWalPpd.js → SkillsPage-DcvVZ3Wn.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-d2_ml0tE.js → TokenGalaxy-D29yX2Hb.js} +1 -1
- package/dashboard/dist/assets/{TooltipPopup-B4masxDW.js → TooltipPopup-CjzmNK2l.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-CceYpa2O.js → TrendMonitor-DfnQrsrx.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-CSN0829H.js → WidgetsPage-CRYomYfk.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-gP4WfO_m.js → WrappedPage-CvQI5zUw.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-BtJVmciH.js → __vite-browser-external-BZ-i40Kf.js} +2 -2
- package/dashboard/dist/assets/{agent-logos-wxccxfWz.js → agent-logos-CvOX7WXW.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-Bd5C77R2.js → arrow-left-BrQrZJtW.js} +1 -1
- package/dashboard/dist/assets/{arrow-right-C1RqrK4A.js → arrow-right-fC11gmFY.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-B_b2i8hn.js → arrow-up-right-CCMEqQQp.js} +1 -1
- package/dashboard/dist/assets/{calendar-days-C8eYygme.js → calendar-days-OaIQ06qD.js} +1 -1
- package/dashboard/dist/assets/{check-BlBHefQ7.js → check-D888uFpx.js} +1 -1
- package/dashboard/dist/assets/{chevron-down-mjUspqZv.js → chevron-down-BJ0BpS_w.js} +1 -1
- package/dashboard/dist/assets/{cloud-checkout-CEkMnWXf.js → cloud-checkout-BeOpEJTZ.js} +1 -1
- package/dashboard/dist/assets/{composite-CzXFY9IC.js → composite-CUuXvKos.js} +1 -1
- package/dashboard/dist/assets/{download-CQvg59w1.js → download-BJ7CKwx5.js} +1 -1
- package/dashboard/dist/assets/{external-link-CDYfIZ3Z.js → external-link-CDaZwJVN.js} +1 -1
- package/dashboard/dist/assets/{flame-C9NXQRil.js → flame-ChyUKs-9.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-fKy_3qpW.js → format-tokens-B6WX7zcH.js} +1 -1
- package/dashboard/dist/assets/{gift-WmV4SBGR.js → gift-CQlAZUJ5.js} +1 -1
- package/dashboard/dist/assets/{host-mode-C5MvZ7SV.js → host-mode-Gw6KD5OJ.js} +1 -1
- package/dashboard/dist/assets/{icons-B1EtsaZs.js → icons-C7gGTMuQ.js} +1 -1
- package/dashboard/dist/assets/{index-9EZ3o2RV.js → index-Bm2dDAVL.js} +1 -1
- package/dashboard/dist/assets/{index-DXNwBFNi.js → index-C0pbymQa.js} +1 -1
- package/dashboard/dist/assets/{index-BEecBW06.js → index-CLb64Tlj.js} +1 -1
- package/dashboard/dist/assets/{info-CWDhggIW.js → info-CvOmd88O.js} +1 -1
- package/dashboard/dist/assets/{link-2-DEWNkK7s.js → link-2-BNEPxvlF.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-DotT5gVp.js → loader-circle-bRHxCgY3.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-qZnGgJAz.js → modifiers.esm-D-X0-uvt.js} +1 -1
- package/dashboard/dist/assets/{monitor-smartphone-DOP5eqBD.js → monitor-smartphone-Bo7d-q73.js} +1 -1
- package/dashboard/dist/assets/{play-BUsybi9m.js → play-DqpGELN5.js} +1 -1
- package/dashboard/dist/assets/{plus-DAjojh_m.js → plus-2fA1tz7S.js} +1 -1
- package/dashboard/dist/assets/{provider-display-BCQQYPWD.js → provider-display-B1KigDYZ.js} +1 -1
- package/dashboard/dist/assets/{react-BgpqhoCj.js → react-DYja9tZG.js} +1 -1
- package/dashboard/dist/assets/{safePolygon-C-PFpZSA.js → safePolygon-BerB8y-A.js} +1 -1
- package/dashboard/dist/assets/{search-W1A-6ugo.js → search-CU6UVI1L.js} +1 -1
- package/dashboard/dist/assets/{server-CE7pFjDr.js → server-CZR4PTdb.js} +1 -1
- package/dashboard/dist/assets/{shield-check-KL5xc2FR.js → shield-check-BGbNmrMP.js} +1 -1
- package/dashboard/dist/assets/{skills-api-DL_zLjKA.js → skills-api-CJLEzxDf.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-CehJQvFH.js → sortable.esm-CJ1NZWER.js} +1 -1
- package/dashboard/dist/assets/{store-BHAXkHPR.js → store-CJFdru_6.js} +1 -1
- package/dashboard/dist/assets/{terminal-Br5vyD6Q.js → terminal-ClyQ8tvQ.js} +1 -1
- package/dashboard/dist/assets/{trash-CzaCJP6G.js → trash-Dg2PWl5-.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-DbJrecQw.js → use-community-stats-Ca995kap.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-DGhwmlX8.js → use-latest-request-guard-BKbMGVji.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-T7KWAWZ6.js → use-limits-display-prefs-CGyd8lvc.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-MZJhS328.js → use-native-settings-Dqeuqm9O.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-BDN24weA.js → use-ordered-list-Nj7R1iUu.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-CGMbDpHQ.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-DUu16y8Z.js → use-session-efficiency-pref-C_H5BaGV.js} +1 -1
- package/dashboard/dist/assets/{use-transform-BczE46xm.js → use-transform-CC90hurD.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-CjyDfH-M.js → use-usage-limits-DtaaE7D8.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-BgZmWbkx.js → useCurrency-CMHIL39_.js} +1 -1
- package/dashboard/dist/assets/{usePositioner-dWENyY8z.js → usePositioner-CRSfrGQq.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-D7s1-Zuk.js → useTokenFormat-B5jhM_Kb.js} +1 -1
- package/dashboard/dist/assets/{zap-Dr__bKlq.js → zap-CKx8ySZs.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/commands/sync.js +25 -3
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +334 -52
- package/dashboard/dist/assets/DialogDescription-ne_rYSD7.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-CfCY-K-a.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as J,aW as we,aX as De,aY as Fe,aZ as Le,a_ as le,a$ as He,b0 as ee,b1 as ve,b2 as x,b3 as ue,b4 as Te,b5 as ae,b6 as z,N as j,b7 as Z,b8 as ge,b9 as Xe,ba as Ce,bb as N,ar as Ye}from"./__vite-browser-external-BtJVmciH.js";import{i as fe,a as Re,b as _e,g as de,c as ne}from"./composite-CzXFY9IC.js";function Ne(e,r){return r!=null&&!fe(r)?0:typeof e=="function"?e():e}function me(e,r,o){const g=Ne(e,o);return typeof g=="number"?g:g?.[r]}function be(e){return typeof e=="function"?e():e}function Pe(e,r){return r||e==="click"||e==="mousedown"}function Be(e){return e?.includes("mouse")&&e!=="mousedown"}function qe(e){const r=J.useCallback(g=>e===void 0?we:e.subscribeStore(g),[e]),o=J.useCallback(()=>e===void 0?void 0:e.store,[e]);return De.useSyncExternalStore(r,o,()=>e?.serverStore)}class pe{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new le;restTimeout=new le;handleCloseOptions=void 0;static create(){return new pe}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const ie=new WeakMap;function ce(e){if(!e.performedPointerEventsMutation)return;const r=e.pointerEventsScopeElement;r&&ie.get(r)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ie.delete(r)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Me(e,r){const{scopeElement:o,referenceElement:g,floatingElement:c}=r,s=ie.get(o);s&&s!==e&&ce(s),ce(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=g,e.pointerEventsFloatingElement=c,ie.set(o,e),o.style.pointerEvents="none",g.style.pointerEvents="auto",c.style.pointerEvents="auto"}function Se(e){const r=e.context.dataRef.current,o=Fe(()=>r.hoverInteractionState??pe.create()).current;return r.hoverInteractionState||(r.hoverInteractionState=o),Le(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function xe(e,r={}){const{enabled:o=!0,closeDelay:g=0,nodeId:c}=r,s=e.useState("open"),S=e.useState("floatingElement"),L=e.useState("domReferenceElement"),{dataRef:I}=e.context,p=Re(),E=_e(),l=Se(e),B=He(),G=ee(()=>Pe(I.current.openEvent?.type,l.interactedInside)),Y=ee(()=>Be(I.current.openEvent?.type)),R=ee(()=>{ce(l)});ve(()=>{s||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,R())},[s,l,R]),J.useEffect(()=>R,[R]),ve(()=>{if(o&&s&&l.handleCloseOptions?.blockPointerEvents&&Y()&&x(L)&&S){const A=L,_=S,n=ue(S),v=p?.nodesRef.current.find(u=>u.id===E)?.context?.elements.floating;v&&(v.style.pointerEvents="");const y=l.pointerEventsScopeElement!==_?l.pointerEventsScopeElement:null,T=v!==_?v:null,m=l.handleCloseOptions?.getScope?.()??y??T??Te(A,"[data-rootownerid]")??n.body;return Me(l,{scopeElement:m,referenceElement:A,floatingElement:_}),()=>{R()}}},[o,s,L,S,l,Y,p,E,R]),J.useEffect(()=>{if(!o)return;function A(){return!!(p&&E&&de(p.nodesRef.current,E).length>0)}function _(u){const k=me(g,"close",l.pointerType),w=()=>{e.setOpen(!1,j(Z,u)),p?.events.emit("floating.closed",u)};k?l.openChangeTimeout.start(k,w):(l.openChangeTimeout.clear(),w())}function n(u){const k=ge(u);if(!Xe(k)){l.interactedInside=!1;return}l.interactedInside=Te(k,"[aria-haspopup]")!=null}function v(){l.openChangeTimeout.clear(),B.clear(),p?.events.off("floating.closed",T),R()}function y(u){if(A()&&p){p.events.on("floating.closed",T);return}if(Ce(u.relatedTarget,e.context.triggerElements))return;const k=I.current.floatingContext?.nodeId??c,w=u.relatedTarget;if(!(p&&k&&x(w)&&de(p.nodesRef.current,k,!1).some($=>N($.context?.elements.floating,w)))){if(l.handler){l.handler(u);return}R(),Y()&&!G()&&_(u)}}function T(u){!p||!E||A()||B.start(0,()=>{p.events.off("floating.closed",T),e.setOpen(!1,j(Z,u)),p.events.emit("floating.closed",u)})}const m=S;return ae(m&&z(m,"mouseenter",v),m&&z(m,"mouseleave",y),m&&z(m,"pointerdown",n,!0),()=>{p?.events.off("floating.closed",T)})},[o,S,e,I,g,c,Y,G,R,l,p,E,B])}const Ae={current:null};function Ge(e,r={}){const{enabled:o=!0,delay:g=0,handleClose:c=null,mouseOnly:s=!1,restMs:S=0,move:L=!0,triggerElementRef:I=Ae,externalTree:p,isActiveTrigger:E=!0,getHandleCloseContext:l,isClosing:B,shouldOpen:G,guardStaleOpen:Y=!1}=r,{dataRef:R,events:A}=e.context,_=Re(p),n=Se(e),v=J.useRef(!1),y=ne(c),T=ne(g),m=ne(S),u=ne(o),k=ne(G),w=ne(B),K=ee(()=>Pe(R.current.openEvent?.type,n.interactedInside)),$=ee(()=>k.current?.()!==!1),te=ee((t,a,P)=>{const h=e.context.triggerElements;if(h.hasElement(a))return!t||!N(t,a);if(!x(P))return!1;const O=P;return h.hasMatchingElement(W=>N(W,O))&&(!t||!N(t,O))}),H=ee(()=>{if(!n.handler)return;ue(e.select("domReferenceElement")).removeEventListener("mousemove",n.handler),n.handler=void 0}),b=ee(()=>{ce(n)});return E&&(n.handleCloseOptions=c?.__options),J.useEffect(()=>H,[H]),J.useEffect(()=>{if(!o)return;function t(a){a.open?v.current=!1:(v.current=a.reason===Z,H(),n.openChangeTimeout.clear(),n.restTimeout.clear(),n.blockMouseMove=!0,n.restTimeoutPending=!1)}return A.on("openchange",t),()=>{A.off("openchange",t)}},[o,A,n,H]),J.useEffect(()=>{if(!o)return;function t(f,V=!0){const D=me(T.current,"close",n.pointerType);D?n.openChangeTimeout.start(D,()=>{e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f)}):V&&(n.openChangeTimeout.clear(),e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f))}const a=I.current??(E?e.select("domReferenceElement"):null);if(!x(a))return;function P(f){if(n.openChangeTimeout.clear(),n.blockMouseMove=!1,s&&!fe(n.pointerType))return;const V=be(m.current),D=me(T.current,"open",n.pointerType),C=ge(f),X=f.currentTarget??null,i=e.select("domReferenceElement");let M=X;if(x(C)&&!e.context.triggerElements.hasElement(C)){for(const he of e.context.triggerElements.elements())if(N(he,C)){M=he;break}}x(X)&&x(i)&&!e.context.triggerElements.hasElement(X)&&N(X,i)&&(M=i);const U=M==null?!1:te(i,M,C),F=e.select("open"),Q=w.current?.()??e.select("transitionStatus")==="ending",q=!F&&Q&&v.current,Ie=!U&&x(M)&&x(i)&&N(i,M)&&q,ye=V>0&&!D,ke=U&&(F||q)||Ie,Ee=!F||U;if(ke){$()&&e.setOpen(!0,j(Z,f,M));return}ye||(D?n.openChangeTimeout.start(D,()=>{Ee&&$()&&e.setOpen(!0,j(Z,f,M))}):Ee&&$()&&e.setOpen(!0,j(Z,f,M)))}function h(f){if(K()){b();return}H();const V=e.select("domReferenceElement"),D=ue(V);n.restTimeout.clear(),n.restTimeoutPending=!1;const C=R.current.floatingContext??l?.();if(Ce(f.relatedTarget,e.context.triggerElements))return;if(y.current&&C){e.select("open")||n.openChangeTimeout.clear();const i=I.current;n.handler=y.current({...C,tree:_,x:f.clientX,y:f.clientY,onClose(){b(),H(),u.current&&!K()&&i===e.select("domReferenceElement")&&t(f,!0)}}),D.addEventListener("mousemove",n.handler),n.handler(f);return}(n.pointerType!=="touch"||!N(e.select("floatingElement"),f.relatedTarget))&&t(f)}function O(f){N(a,f.relatedTarget)||(n.openChangeTimeout.clear(),n.restTimeout.clear(),n.restTimeoutPending=!1)}const W=Y?z(a,"mouseout",O):void 0;return L?ae(z(a,"mousemove",P,{once:!0}),z(a,"mouseenter",P),z(a,"mouseleave",h),W):ae(z(a,"mouseenter",P),z(a,"mouseleave",h),W)},[H,b,R,T,e,o,y,n,E,te,K,s,L,m,I,_,u,l,w,$,Y]),J.useMemo(()=>{if(!o)return;function t(a){n.pointerType=a.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(a){const{nativeEvent:P}=a,h=a.currentTarget,O=e.select("domReferenceElement"),W=e.select("open"),f=te(O,h,a.target);if(s&&!fe(n.pointerType))return;if(W&&f&&n.handleCloseOptions?.blockPointerEvents){const C=e.select("floatingElement");if(C){const X=n.handleCloseOptions?.getScope?.()??h.ownerDocument.body;Me(n,{scopeElement:X,referenceElement:h,floatingElement:C})}}const V=be(m.current);if(W&&!f||V===0||!f&&n.restTimeoutPending&&a.movementX**2+a.movementY**2<2)return;n.restTimeout.clear();function D(){if(n.restTimeoutPending=!1,K())return;const C=e.select("open");!n.blockMouseMove&&(!C||f)&&$()&&e.setOpen(!0,j(Z,P,h))}n.pointerType==="touch"?Ye.flushSync(()=>{D()}):f&&W?D():(n.restTimeoutPending=!0,n.restTimeout.start(V,D))}}},[o,n,K,te,s,e,m,$])}const Oe=.1,We=Oe*Oe,d=.5;function oe(e,r,o,g,c,s){return g>=r!=s>=r&&e<=(c-o)*(r-g)/(s-g)+o}function re(e,r,o,g,c,s,S,L,I,p){let E=!1;return oe(e,r,o,g,c,s)&&(E=!E),oe(e,r,c,s,S,L)&&(E=!E),oe(e,r,S,L,I,p)&&(E=!E),oe(e,r,I,p,o,g)&&(E=!E),E}function Ve(e,r,o){return e>=o.x&&e<=o.x+o.width&&r>=o.y&&r<=o.y+o.height}function se(e,r,o,g,c,s){const S=Math.min(o,c),L=Math.max(o,c),I=Math.min(g,s),p=Math.max(g,s);return e>=S&&e<=L&&r>=I&&r<=p}function Qe(e={}){const{blockPointerEvents:r=!1}=e,o=new le,g=({x:c,y:s,placement:S,elements:L,onClose:I,nodeId:p,tree:E})=>{const l=S?.split("-")[0];let B=!1,G=null,Y=null,R=typeof performance<"u"?performance.now():0;function A(n,v){const y=performance.now(),T=y-R;if(G===null||Y===null||T===0)return G=n,Y=v,R=y,!1;const m=n-G,u=v-Y,k=m*m+u*u,w=T*T*We;return G=n,Y=v,R=y,k<w}function _(){o.clear(),I()}return function(v){o.clear();const y=L.domReference,T=L.floating;if(!y||!T||l==null||c==null||s==null)return;const{clientX:m,clientY:u}=v,k=ge(v),w=v.type==="mouseleave",K=N(T,k),$=N(y,k);if(K&&(B=!0,!w))return;if($&&(B=!1,!w)){B=!0;return}if(w&&x(v.relatedTarget)&&N(T,v.relatedTarget))return;function te(){return!!(E&&de(E.nodesRef.current,p).length>0)}function H(){te()||_()}if(te())return;const b=y.getBoundingClientRect(),t=T.getBoundingClientRect(),a=c>t.right-t.width/2,P=s>t.bottom-t.height/2,h=t.width>b.width,O=t.height>b.height,W=(h?b:t).left,f=(h?b:t).right,V=(O?b:t).top,D=(O?b:t).bottom;if(l==="top"&&s>=b.bottom-1||l==="bottom"&&s<=b.top+1||l==="left"&&c>=b.right-1||l==="right"&&c<=b.left+1){H();return}let C=!1;switch(l){case"top":C=se(m,u,W,b.top+1,f,t.bottom-1);break;case"bottom":C=se(m,u,W,t.top+1,f,b.bottom-1);break;case"left":C=se(m,u,t.right-1,D,b.left+1,V);break;case"right":C=se(m,u,b.right-1,D,t.left+1,V);break}if(C)return;if(B&&!Ve(m,u,b)){H();return}if(!w&&A(m,u)){H();return}let X=!1;switch(l){case"top":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s+d+1,Q=a||h?t.bottom-d:t.top,q=a?h?t.bottom-d:t.top:t.bottom-d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"bottom":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s-d,Q=a||h?t.top+d:t.bottom,q=a?h?t.top+d:t.bottom:t.top+d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"left":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c+d+1,Q=P||O?t.right-d:t.left,q=P?O?t.right-d:t.left:t.right-d;X=re(m,u,Q,t.top,q,t.bottom,F,M,F,U);break}case"right":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c-d,Q=P||O?t.left+d:t.right,q=P?O?t.left+d:t.right:t.left+d;X=re(m,u,F,M,F,U,Q,t.top,q,t.bottom);break}}X?B||o.start(40,H):H()}};return g.__options={...e,blockPointerEvents:r},g}export{Ge as a,xe as b,Se as c,me as g,Qe as s,qe as u};
|
|
1
|
+
import{r as J,aW as we,aX as De,aY as Fe,aZ as Le,a_ as le,a$ as He,b0 as ee,b1 as ve,b2 as x,b3 as ue,b4 as Te,b5 as ae,b6 as z,N as j,b7 as Z,b8 as ge,b9 as Xe,ba as Ce,bb as N,ar as Ye}from"./__vite-browser-external-BZ-i40Kf.js";import{i as fe,a as Re,b as _e,g as de,c as ne}from"./composite-CUuXvKos.js";function Ne(e,r){return r!=null&&!fe(r)?0:typeof e=="function"?e():e}function me(e,r,o){const g=Ne(e,o);return typeof g=="number"?g:g?.[r]}function be(e){return typeof e=="function"?e():e}function Pe(e,r){return r||e==="click"||e==="mousedown"}function Be(e){return e?.includes("mouse")&&e!=="mousedown"}function qe(e){const r=J.useCallback(g=>e===void 0?we:e.subscribeStore(g),[e]),o=J.useCallback(()=>e===void 0?void 0:e.store,[e]);return De.useSyncExternalStore(r,o,()=>e?.serverStore)}class pe{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new le;restTimeout=new le;handleCloseOptions=void 0;static create(){return new pe}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const ie=new WeakMap;function ce(e){if(!e.performedPointerEventsMutation)return;const r=e.pointerEventsScopeElement;r&&ie.get(r)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ie.delete(r)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Me(e,r){const{scopeElement:o,referenceElement:g,floatingElement:c}=r,s=ie.get(o);s&&s!==e&&ce(s),ce(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=g,e.pointerEventsFloatingElement=c,ie.set(o,e),o.style.pointerEvents="none",g.style.pointerEvents="auto",c.style.pointerEvents="auto"}function Se(e){const r=e.context.dataRef.current,o=Fe(()=>r.hoverInteractionState??pe.create()).current;return r.hoverInteractionState||(r.hoverInteractionState=o),Le(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function xe(e,r={}){const{enabled:o=!0,closeDelay:g=0,nodeId:c}=r,s=e.useState("open"),S=e.useState("floatingElement"),L=e.useState("domReferenceElement"),{dataRef:I}=e.context,p=Re(),E=_e(),l=Se(e),B=He(),G=ee(()=>Pe(I.current.openEvent?.type,l.interactedInside)),Y=ee(()=>Be(I.current.openEvent?.type)),R=ee(()=>{ce(l)});ve(()=>{s||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,R())},[s,l,R]),J.useEffect(()=>R,[R]),ve(()=>{if(o&&s&&l.handleCloseOptions?.blockPointerEvents&&Y()&&x(L)&&S){const A=L,_=S,n=ue(S),v=p?.nodesRef.current.find(u=>u.id===E)?.context?.elements.floating;v&&(v.style.pointerEvents="");const y=l.pointerEventsScopeElement!==_?l.pointerEventsScopeElement:null,T=v!==_?v:null,m=l.handleCloseOptions?.getScope?.()??y??T??Te(A,"[data-rootownerid]")??n.body;return Me(l,{scopeElement:m,referenceElement:A,floatingElement:_}),()=>{R()}}},[o,s,L,S,l,Y,p,E,R]),J.useEffect(()=>{if(!o)return;function A(){return!!(p&&E&&de(p.nodesRef.current,E).length>0)}function _(u){const k=me(g,"close",l.pointerType),w=()=>{e.setOpen(!1,j(Z,u)),p?.events.emit("floating.closed",u)};k?l.openChangeTimeout.start(k,w):(l.openChangeTimeout.clear(),w())}function n(u){const k=ge(u);if(!Xe(k)){l.interactedInside=!1;return}l.interactedInside=Te(k,"[aria-haspopup]")!=null}function v(){l.openChangeTimeout.clear(),B.clear(),p?.events.off("floating.closed",T),R()}function y(u){if(A()&&p){p.events.on("floating.closed",T);return}if(Ce(u.relatedTarget,e.context.triggerElements))return;const k=I.current.floatingContext?.nodeId??c,w=u.relatedTarget;if(!(p&&k&&x(w)&&de(p.nodesRef.current,k,!1).some($=>N($.context?.elements.floating,w)))){if(l.handler){l.handler(u);return}R(),Y()&&!G()&&_(u)}}function T(u){!p||!E||A()||B.start(0,()=>{p.events.off("floating.closed",T),e.setOpen(!1,j(Z,u)),p.events.emit("floating.closed",u)})}const m=S;return ae(m&&z(m,"mouseenter",v),m&&z(m,"mouseleave",y),m&&z(m,"pointerdown",n,!0),()=>{p?.events.off("floating.closed",T)})},[o,S,e,I,g,c,Y,G,R,l,p,E,B])}const Ae={current:null};function Ge(e,r={}){const{enabled:o=!0,delay:g=0,handleClose:c=null,mouseOnly:s=!1,restMs:S=0,move:L=!0,triggerElementRef:I=Ae,externalTree:p,isActiveTrigger:E=!0,getHandleCloseContext:l,isClosing:B,shouldOpen:G,guardStaleOpen:Y=!1}=r,{dataRef:R,events:A}=e.context,_=Re(p),n=Se(e),v=J.useRef(!1),y=ne(c),T=ne(g),m=ne(S),u=ne(o),k=ne(G),w=ne(B),K=ee(()=>Pe(R.current.openEvent?.type,n.interactedInside)),$=ee(()=>k.current?.()!==!1),te=ee((t,a,P)=>{const h=e.context.triggerElements;if(h.hasElement(a))return!t||!N(t,a);if(!x(P))return!1;const O=P;return h.hasMatchingElement(W=>N(W,O))&&(!t||!N(t,O))}),H=ee(()=>{if(!n.handler)return;ue(e.select("domReferenceElement")).removeEventListener("mousemove",n.handler),n.handler=void 0}),b=ee(()=>{ce(n)});return E&&(n.handleCloseOptions=c?.__options),J.useEffect(()=>H,[H]),J.useEffect(()=>{if(!o)return;function t(a){a.open?v.current=!1:(v.current=a.reason===Z,H(),n.openChangeTimeout.clear(),n.restTimeout.clear(),n.blockMouseMove=!0,n.restTimeoutPending=!1)}return A.on("openchange",t),()=>{A.off("openchange",t)}},[o,A,n,H]),J.useEffect(()=>{if(!o)return;function t(f,V=!0){const D=me(T.current,"close",n.pointerType);D?n.openChangeTimeout.start(D,()=>{e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f)}):V&&(n.openChangeTimeout.clear(),e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f))}const a=I.current??(E?e.select("domReferenceElement"):null);if(!x(a))return;function P(f){if(n.openChangeTimeout.clear(),n.blockMouseMove=!1,s&&!fe(n.pointerType))return;const V=be(m.current),D=me(T.current,"open",n.pointerType),C=ge(f),X=f.currentTarget??null,i=e.select("domReferenceElement");let M=X;if(x(C)&&!e.context.triggerElements.hasElement(C)){for(const he of e.context.triggerElements.elements())if(N(he,C)){M=he;break}}x(X)&&x(i)&&!e.context.triggerElements.hasElement(X)&&N(X,i)&&(M=i);const U=M==null?!1:te(i,M,C),F=e.select("open"),Q=w.current?.()??e.select("transitionStatus")==="ending",q=!F&&Q&&v.current,Ie=!U&&x(M)&&x(i)&&N(i,M)&&q,ye=V>0&&!D,ke=U&&(F||q)||Ie,Ee=!F||U;if(ke){$()&&e.setOpen(!0,j(Z,f,M));return}ye||(D?n.openChangeTimeout.start(D,()=>{Ee&&$()&&e.setOpen(!0,j(Z,f,M))}):Ee&&$()&&e.setOpen(!0,j(Z,f,M)))}function h(f){if(K()){b();return}H();const V=e.select("domReferenceElement"),D=ue(V);n.restTimeout.clear(),n.restTimeoutPending=!1;const C=R.current.floatingContext??l?.();if(Ce(f.relatedTarget,e.context.triggerElements))return;if(y.current&&C){e.select("open")||n.openChangeTimeout.clear();const i=I.current;n.handler=y.current({...C,tree:_,x:f.clientX,y:f.clientY,onClose(){b(),H(),u.current&&!K()&&i===e.select("domReferenceElement")&&t(f,!0)}}),D.addEventListener("mousemove",n.handler),n.handler(f);return}(n.pointerType!=="touch"||!N(e.select("floatingElement"),f.relatedTarget))&&t(f)}function O(f){N(a,f.relatedTarget)||(n.openChangeTimeout.clear(),n.restTimeout.clear(),n.restTimeoutPending=!1)}const W=Y?z(a,"mouseout",O):void 0;return L?ae(z(a,"mousemove",P,{once:!0}),z(a,"mouseenter",P),z(a,"mouseleave",h),W):ae(z(a,"mouseenter",P),z(a,"mouseleave",h),W)},[H,b,R,T,e,o,y,n,E,te,K,s,L,m,I,_,u,l,w,$,Y]),J.useMemo(()=>{if(!o)return;function t(a){n.pointerType=a.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(a){const{nativeEvent:P}=a,h=a.currentTarget,O=e.select("domReferenceElement"),W=e.select("open"),f=te(O,h,a.target);if(s&&!fe(n.pointerType))return;if(W&&f&&n.handleCloseOptions?.blockPointerEvents){const C=e.select("floatingElement");if(C){const X=n.handleCloseOptions?.getScope?.()??h.ownerDocument.body;Me(n,{scopeElement:X,referenceElement:h,floatingElement:C})}}const V=be(m.current);if(W&&!f||V===0||!f&&n.restTimeoutPending&&a.movementX**2+a.movementY**2<2)return;n.restTimeout.clear();function D(){if(n.restTimeoutPending=!1,K())return;const C=e.select("open");!n.blockMouseMove&&(!C||f)&&$()&&e.setOpen(!0,j(Z,P,h))}n.pointerType==="touch"?Ye.flushSync(()=>{D()}):f&&W?D():(n.restTimeoutPending=!0,n.restTimeout.start(V,D))}}},[o,n,K,te,s,e,m,$])}const Oe=.1,We=Oe*Oe,d=.5;function oe(e,r,o,g,c,s){return g>=r!=s>=r&&e<=(c-o)*(r-g)/(s-g)+o}function re(e,r,o,g,c,s,S,L,I,p){let E=!1;return oe(e,r,o,g,c,s)&&(E=!E),oe(e,r,c,s,S,L)&&(E=!E),oe(e,r,S,L,I,p)&&(E=!E),oe(e,r,I,p,o,g)&&(E=!E),E}function Ve(e,r,o){return e>=o.x&&e<=o.x+o.width&&r>=o.y&&r<=o.y+o.height}function se(e,r,o,g,c,s){const S=Math.min(o,c),L=Math.max(o,c),I=Math.min(g,s),p=Math.max(g,s);return e>=S&&e<=L&&r>=I&&r<=p}function Qe(e={}){const{blockPointerEvents:r=!1}=e,o=new le,g=({x:c,y:s,placement:S,elements:L,onClose:I,nodeId:p,tree:E})=>{const l=S?.split("-")[0];let B=!1,G=null,Y=null,R=typeof performance<"u"?performance.now():0;function A(n,v){const y=performance.now(),T=y-R;if(G===null||Y===null||T===0)return G=n,Y=v,R=y,!1;const m=n-G,u=v-Y,k=m*m+u*u,w=T*T*We;return G=n,Y=v,R=y,k<w}function _(){o.clear(),I()}return function(v){o.clear();const y=L.domReference,T=L.floating;if(!y||!T||l==null||c==null||s==null)return;const{clientX:m,clientY:u}=v,k=ge(v),w=v.type==="mouseleave",K=N(T,k),$=N(y,k);if(K&&(B=!0,!w))return;if($&&(B=!1,!w)){B=!0;return}if(w&&x(v.relatedTarget)&&N(T,v.relatedTarget))return;function te(){return!!(E&&de(E.nodesRef.current,p).length>0)}function H(){te()||_()}if(te())return;const b=y.getBoundingClientRect(),t=T.getBoundingClientRect(),a=c>t.right-t.width/2,P=s>t.bottom-t.height/2,h=t.width>b.width,O=t.height>b.height,W=(h?b:t).left,f=(h?b:t).right,V=(O?b:t).top,D=(O?b:t).bottom;if(l==="top"&&s>=b.bottom-1||l==="bottom"&&s<=b.top+1||l==="left"&&c>=b.right-1||l==="right"&&c<=b.left+1){H();return}let C=!1;switch(l){case"top":C=se(m,u,W,b.top+1,f,t.bottom-1);break;case"bottom":C=se(m,u,W,t.top+1,f,b.bottom-1);break;case"left":C=se(m,u,t.right-1,D,b.left+1,V);break;case"right":C=se(m,u,b.right-1,D,t.left+1,V);break}if(C)return;if(B&&!Ve(m,u,b)){H();return}if(!w&&A(m,u)){H();return}let X=!1;switch(l){case"top":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s+d+1,Q=a||h?t.bottom-d:t.top,q=a?h?t.bottom-d:t.top:t.bottom-d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"bottom":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s-d,Q=a||h?t.top+d:t.bottom,q=a?h?t.top+d:t.bottom:t.top+d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"left":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c+d+1,Q=P||O?t.right-d:t.left,q=P?O?t.right-d:t.left:t.right-d;X=re(m,u,Q,t.top,q,t.bottom,F,M,F,U);break}case"right":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c-d,Q=P||O?t.left+d:t.right,q=P?O?t.left+d:t.right:t.left+d;X=re(m,u,F,M,F,U,Q,t.top,q,t.bottom);break}}X?B||o.start(40,H):H()}};return g.__options={...e,blockPointerEvents:r},g}export{Ge as a,xe as b,Se as c,me as g,Qe as s,qe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as c}from"./__vite-browser-external-
|
|
1
|
+
import{o as c}from"./__vite-browser-external-BZ-i40Kf.js";const e={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};e.node;const a=c(e);export{a as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as r}from"./__vite-browser-external-
|
|
1
|
+
import{o as r}from"./__vite-browser-external-BZ-i40Kf.js";const e={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};e.node;const i=r(e);export{i as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as a}from"./__vite-browser-external-
|
|
1
|
+
import{o as a}from"./__vite-browser-external-BZ-i40Kf.js";const e={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};e.node;const o=a(e);export{o as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ah as R,x as E,ai as I,aj as C,ak as L,al as $}from"./__vite-browser-external-
|
|
1
|
+
import{ah as R,x as E,ai as I,aj as C,ak as L,al as $}from"./__vite-browser-external-BZ-i40Kf.js";function a(e){return typeof e=="string"?e.trim():""}function g(e){return Array.isArray(e)?[...new Set(e.map(a).filter(Boolean))]:[]}function v(e){const t=a(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 N(e){const t=a(e).replace(/\\/g,"/");return!t||t.startsWith("/")||t.includes(":/")||/[A-Za-z]:\//.test(t)?"":t}function S(e){return a(e?.key)||a(e?.id)||`local:${a(e?.directory)}`}function P(e){return(Array.isArray(e)?e:[]).filter(t=>t?.scope!=="system").map(t=>{const n=v(t?.directory),r=N(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:a(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 x(e){return{id:a(e?.id),name:a(e?.device_name)||a(e?.id),platform:a(e?.platform)||null,scannedAt:a(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 H(e,t,n){const r=(Array.isArray(e)?e:[]).filter(o=>o?.scope!=="system").map(o=>({...o})),i=new Map;r.forEach((o,s)=>i.set(S(o).toLowerCase(),s));for(const o of Array.isArray(t?.devices)?t.devices:[]){const s=x(o);if(!(!s.id||s.id===n))for(const c of Array.isArray(o?.skills)?o.skills:[]){if(c?.scope==="system")continue;const u=S(c),p=a(c?.directory);if(!u||!p)continue;const h=u.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])],_=Object.fromEntries(A.map(b=>[b,"synced"]));r[y]=m({...f,targets:A,targetStates:_},s)}else r[y]=m(f,s);continue}const w=k,j=Object.fromEntries(w.map(f=>[f,"synced"])),U=m({id:`remote:${encodeURIComponent(u)}`,key:u,name:a(c.name)||p.split(/[\\/]/).pop()||"Skill",directory:p,description:"",targets:w,targetStates:j,managed:!1,readOnly:!0,inventoryOnly:!0,remote:!0,scope:a(c.scope)||"local",sourceName:a(c.sourceName)||null},s);i.set(h,r.length),r.push(U)}}return r.sort((o,s)=>String(o.name||o.directory).localeCompare(String(s.name||s.directory))||String(o.id||o.key).localeCompare(String(s.id||s.key)))}const T="tokentracker-skills",J="tokentracker-account-skills",K=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 l(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 z(){return d({mode:"installed"})}function B(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 D(){return d({mode:"repos"})}function F(e,t){return l({action:"install",skill:e,targets:t})}function G(e){return l({action:"update_all",ids:e})}function W(e){return l({action:"uninstall",id:e})}function Z(e){return l({action:"restore",id:e})}function Q(e,t){return l({action:"set_targets",id:e,targets:t})}function V(e,t){return l({action:"import_local",directory:e,targets:t})}function X(e,t){return l({action:"delete_local",directory:e,targets:t||[]})}function Y(e){return l({action:"add_repo",repo:e})}function ee(e,t){return l({action:"remove_repo",owner:e,name:t})}function te(e={}){return d({mode:"popular",...e.force?{force:1}:{}})}function ne(e={}){return d({mode:"updates",...e.force?{force:1}:{}})}function re(e={}){return d({mode:"skill_usage",...e.force?{force:1}:{}})}async function O({accessToken:e,method:t="GET",body:n}){if(!e||!R(e))throw new Error("Skills sync requires sign-in");const r=E();if(!r)throw new Error("InsForge base URL not configured");const i={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`},o=I();o&&(i.apikey=o);const s=new AbortController,c=setTimeout(()=>s.abort(),K);try{const u=await C(L(r,J),{method:t,headers:i,cache:"no-store",signal:s.signal,...n==null?{}:{body:JSON.stringify(n)}}),p=await u.json().catch(()=>null);if(!u.ok)throw new Error(p?.error||`Request failed with HTTP ${u.status}`);return p}finally{clearTimeout(c)}}function oe(e){return O({accessToken:e})}function ae({accessToken:e,deviceId:t,skills:n}){return O({accessToken:e,method:"POST",body:{device_id:t,skills:P(n)}})}export{oe as a,D as b,te as c,B as d,ne as e,re as f,z as g,X as h,F as i,Q as j,V as k,G as l,H as m,ee as n,Y as o,ae as p,Z as r,M as s,W as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,V as P,ar as Oe}from"./__vite-browser-external-
|
|
1
|
+
import{r as c,V as P,ar as Oe}from"./__vite-browser-external-BZ-i40Kf.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{J as t}from"./__vite-browser-external-
|
|
1
|
+
import{J as t}from"./__vite-browser-external-BZ-i40Kf.js";import{F as g}from"./composite-CUuXvKos.js";function a(e,n,u=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new g({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:u,onOpenChange:void 0}),floatingId:n,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:t,inactiveTriggerProps:t,popupProps:t}}const o=e=>e.triggerIdProp??e.activeTriggerId,r=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function p(e,n){return n!==void 0&&r(e)&&o(e)===n}function l(e,n){return p(e,n)?!0:n!==void 0&&r(e)&&o(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const f={open:r,mounted:e=>e.mounted,transitionStatus:e=>r(e)&&!e.mounted?"starting":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)=>p(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&o(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>l(e,n)?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};export{a as c,f as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as a}from"./__vite-browser-external-
|
|
1
|
+
import{o as a}from"./__vite-browser-external-BZ-i40Kf.js";const e={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};e.node;const o=a(e);const t={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};t.node;const i=a(t);export{o as M,i as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./__vite-browser-external-
|
|
1
|
+
import{o as e}from"./__vite-browser-external-BZ-i40Kf.js";const a={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};a.node;const o=e(a);export{o as T};
|
package/dashboard/dist/assets/{use-community-stats-DbJrecQw.js → use-community-stats-Ca995kap.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-BZ-i40Kf.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 u}from"./__vite-browser-external-
|
|
1
|
+
import{r as u}from"./__vite-browser-external-BZ-i40Kf.js";function f(r,e){return r.length===e.length&&r.every((t,n)=>Object.is(t,e[n]))}function a(r){const e=u.useRef(r),t=u.useRef(0),n=u.useRef(!0);return u.useLayoutEffect(()=>{f(e.current,r)||(e.current=r,t.current+=1)}),u.useEffect(()=>(n.current=!0,()=>{n.current=!1,t.current+=1}),[]),u.useCallback(()=>{const c=++t.current,s=e.current;return()=>n.current&&t.current===c&&e.current===s},[])}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,r as c,t as C,H as F,F as H,G as Q}from"./__vite-browser-external-
|
|
1
|
+
import{c as a,r as c,t as C,H as F,F as H,G as Q}from"./__vite-browser-external-BZ-i40Kf.js";const W=["claude","codex","cursor","gemini","kimi","kiro","grok","copilot","antigravity","zcode","opencodeGo","commandCode","qoder","qoderCn","codingPlan","agentPlan","devin"],X={claude:"CLAUDE",codex:"CODEX",cursor:"CURSOR",gemini:"GEMINI",kimi:"KIMI",kiro:"KIRO",grok:"GROK",copilot:"COPILOT",antigravity:"ANTIGRAVITY",zcode:"ZCODE",opencodeGo:"OPENCODE",commandCode:"COMMAND-CODE",qoder:"QODER",qoderCn:"QODER-CN",codingPlan:"VOLCANO-ARK",agentPlan:"VOLCANO-ARK",devin:"DEVIN"};function me(e){return X[e]||null}function Se(e){switch(e){case"claude":return a("limits.provider.claude");case"codex":return a("limits.provider.codex");case"cursor":return a("limits.provider.cursor");case"gemini":return a("limits.provider.gemini");case"kimi":return a("limits.provider.kimi");case"kiro":return a("limits.provider.kiro");case"grok":return a("limits.provider.grok");case"copilot":return a("limits.provider.copilot");case"antigravity":return a("limits.provider.antigravity");case"zcode":return a("limits.provider.zcode");case"opencodeGo":return a("limits.provider.opencode_go");case"commandCode":return a("limits.provider.command_code");case"qoder":return a("limits.provider.qoder");case"qoderCn":return a("limits.provider.qoder_cn");case"codingPlan":return a("limits.provider.ark_coding_plan");case"agentPlan":return a("limits.provider.ark_agent_plan");case"devin":return a("limits.provider.devin");default:return String(e||"")}}const f=W,h="tt.limits.providerOrder",I="tt.limits.providerVisibility",A="tt.limits.displayMode",D="tt.limits.showSubscriptions",O="tt.limits.updatedAt",M="limitsPreferences",Z="limitsDisplayMode",$="tt:limits-prefs-changed",w=Object.freeze({USED:"used",REMAINING:"remaining"}),b=new Set(Object.values(w)),_=new Set([h,I,A,D,O]);function E(){return[...f]}const ee=new Set(["devin"]);function g(){return Object.fromEntries(f.map(e=>[e,!ee.has(e)]))}function L(e){const r=[];if(Array.isArray(e))for(const o of e)f.includes(o)&&!r.includes(o)&&r.push(o);for(const o of f)r.includes(o)||r.push(o);return r}function k(e){const r=g();if(!e||typeof e!="object"||Array.isArray(e))return r;for(const o of f)typeof e[o]=="boolean"&&(r[o]=e[o]);return r}function re(e){return b.has(e)?e:w.USED}function P(e){return typeof e=="boolean"?e:!0}function S(e){if(e!=null){if(typeof e=="number")return Number.isSafeInteger(e)?e:void 0;if(typeof e=="string"){const r=e.trim();if(r==="")return;const o=Number(r);return Number.isSafeInteger(o)?o:void 0}}}function y(e={}){const r=e&&typeof e=="object"?e:{};return{displayMode:re(r.displayMode),providerOrder:L(r.providerOrder),providerVisibility:k(r.providerVisibility),showSubscriptions:P(r.showSubscriptions),updatedAt:S(r.updatedAt)}}function te(){if(typeof window>"u")return E();try{const e=window.localStorage.getItem(h);return L(e?JSON.parse(e):void 0)}catch{return E()}}function R(){if(typeof window>"u")return g();try{const e=window.localStorage.getItem(I);return k(e?JSON.parse(e):void 0)}catch{return g()}}function we(e){return e===null||_.has(e)}function ye(){return R().devin===!0}function ie(){if(typeof window>"u")return w.USED;try{const e=window.localStorage.getItem(A);return b.has(e)?e:w.USED}catch{return w.USED}}function ne(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(D);return e===null?!0:P(JSON.parse(e))}catch{return!0}}function oe(){if(!(typeof window>"u"))try{return S(window.localStorage.getItem(O))}catch{return}}function se(){if(typeof window>"u")return!1;try{for(const e of _)if(window.localStorage.getItem(e)!==null)return!0}catch{return!1}return!1}function v(){return y({displayMode:ie(),providerOrder:te(),providerVisibility:R(),showSubscriptions:ne(),updatedAt:oe()})}function de(e){if(typeof window>"u")return;const r=y(e);try{window.localStorage.setItem(h,JSON.stringify(r.providerOrder)),window.localStorage.setItem(I,JSON.stringify(r.providerVisibility)),window.localStorage.setItem(A,r.displayMode),window.localStorage.setItem(D,JSON.stringify(r.showSubscriptions)),r.updatedAt===void 0?window.localStorage.removeItem(O):window.localStorage.setItem(O,String(r.updatedAt))}catch(o){console.warn("[tokentracker] limits preferences localStorage write failed:",o)}}function ae(e){const r=y(e);return{displayMode:r.displayMode,providerOrder:[...r.providerOrder],providerVisibility:{...r.providerVisibility},showSubscriptions:r.showSubscriptions,updatedAt:r.updatedAt??null}}function ce(...e){let r;for(const d of e){const l=S(d);l!==void 0&&(r=r===void 0?l:Math.max(r,l))}const o=Date.now();return r!==void 0&&o<=r?r+1:o}function ue(e,r){return e.length===r.length&&e.every((o,d)=>o===r[d])}function le(e,r){return f.every(o=>e[o]===r[o])}function T(e,r){return e.displayMode===r.displayMode&&ue(e.providerOrder,r.providerOrder)&&le(e.providerVisibility,r.providerVisibility)&&e.showSubscriptions===r.showSubscriptions}function pe(e,r){return T(e,r)&&S(e.updatedAt)===S(r.updatedAt)}function N(e,r){const o=S(e.updatedAt),d=S(r.updatedAt);return o!==void 0&&(d===void 0||o>d)}function ve(){const[e,r]=c.useState(v),o=c.useRef(e),d=c.useCallback((i,t={})=>{const n=y(i);return o.current=n,r(n),t.writeLocal&&de(n),typeof window<"u"&&window.dispatchEvent(new CustomEvent($)),n},[]),l=c.useCallback(i=>{C()&&F(M,ae(i))},[]),u=c.useCallback(i=>{const t=v(),n=N(t,o.current)?d(t):o.current,s=y(i(n));if(T(n,s))return;const p=ce(t.updatedAt,n.updatedAt),m=d({...s,updatedAt:p},{writeLocal:!0});l(m)},[d,l]),x=c.useCallback(i=>{b.has(i)&&u(t=>({...t,displayMode:i}))},[u]),K=c.useCallback(i=>{u(t=>({...t,showSubscriptions:!!i}))},[u]),V=c.useCallback(i=>{if(!b.has(i))return;const t=v();if(t.updatedAt!==void 0){d(t);return}d({...t,displayMode:i,updatedAt:void 0},{writeLocal:!0})},[d]);c.useEffect(()=>{if(!C())return;const i=H(t=>{const n=t?.[M];if(n&&typeof n=="object"){const s=y(n);if(!se()){d(s,{writeLocal:!0});return}const p=v();if(N(s,p))d(s,{writeLocal:!0});else{const m=d(p);pe(s,p)||l(m)}return}V(t?.[Z])});return Q(),i},[V,d,l]),c.useEffect(()=>{if(typeof window>"u")return;const i=t=>{(t.key===null||_.has(t.key))&&d(v())};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[d]);const U=c.useCallback(i=>{f.includes(i)&&u(t=>({...t,providerVisibility:{...t.providerVisibility,[i]:!t.providerVisibility[i]}}))},[u]),Y=c.useCallback(i=>{u(t=>({...t,providerVisibility:Object.fromEntries(f.map(n=>[n,!!i]))}))},[u]),z=c.useCallback(i=>{u(t=>{const n=t.providerOrder.indexOf(i);if(n<=0)return t;const s=[...t.providerOrder];return[s[n-1],s[n]]=[s[n],s[n-1]],{...t,providerOrder:s}})},[u]),G=c.useCallback(i=>{u(t=>{const n=t.providerOrder.indexOf(i);if(n<0||n>=t.providerOrder.length-1)return t;const s=[...t.providerOrder];return[s[n],s[n+1]]=[s[n+1],s[n]],{...t,providerOrder:s}})},[u]),q=c.useCallback((i,t)=>{i!==t&&u(n=>{const s=n.providerOrder.indexOf(i),p=n.providerOrder.indexOf(t);if(s<0||p<0)return n;const m=[...n.providerOrder],[B]=m.splice(s,1);return m.splice(p,0,B),{...n,providerOrder:m}})},[u]),j=c.useCallback(()=>{u(()=>({displayMode:w.USED,providerOrder:E(),providerVisibility:g(),showSubscriptions:!0}))},[u]),J=c.useMemo(()=>e.providerOrder.filter(i=>e.providerVisibility[i]!==!1),[e.providerOrder,e.providerVisibility]);return{order:e.providerOrder,visibility:e.providerVisibility,displayMode:e.displayMode,showSubscriptions:e.showSubscriptions,setDisplayMode:x,setShowSubscriptions:K,visibleOrdered:J,toggle:U,setAllVisible:Y,moveUp:z,moveDown:G,moveToward:q,reset:j}}export{$ as L,we as a,w as b,W as c,me as d,ye as i,Se as l,ve as u};
|
package/dashboard/dist/assets/{use-native-settings-MZJhS328.js → use-native-settings-Dqeuqm9O.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,A as f,E as g,F as b,G as r,H as S,I as v}from"./__vite-browser-external-
|
|
1
|
+
import{r as s,A as f,E as g,F as b,G as r,H as S,I as v}from"./__vite-browser-external-BZ-i40Kf.js";function N(){const[u,a]=s.useState(null),t=f()&&g();s.useEffect(()=>{if(!t)return;const e=b(n=>a(n));return r(),e},[t]);const c=s.useCallback((e,n)=>{t&&(a(i=>i&&{...i,[e]:n}),S(e,n))},[t]),o=s.useCallback(e=>{t&&v(e)},[t]),l=s.useCallback(()=>{t&&r()},[t]);return{available:t,settings:u,setSetting:c,runAction:o,refresh:l}}export{N as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./__vite-browser-external-
|
|
1
|
+
import{r as f}from"./__vite-browser-external-BZ-i40Kf.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-BZ-i40Kf.js";import{h as r,i as t,p as s}from"./react-DYja9tZG.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as f,r as n}from"./__vite-browser-external-
|
|
1
|
+
import{o as f,r as n}from"./__vite-browser-external-BZ-i40Kf.js";const u={name:"pencil",size:24,node:[["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"}]]};u.node;const E=f(u),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-DYja9tZG.js";import{r as f}from"./__vite-browser-external-BZ-i40Kf.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{t as v,w as M,r as w,c as P,aS as O,aT as R,aU as S,aV as q}from"./__vite-browser-external-BtJVmciH.js";import{l as z,i as _,L as F,a as T}from"./use-limits-display-prefs-T7KWAWZ6.js";import{u as j}from"./use-latest-request-guard-DGhwmlX8.js";const x="native:notificationPermission";let D=null;function I(){return typeof window<"u"&&!!window.chrome?.webview}function L(){return v()?D||"unknown":I()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function $(e){if(typeof window>"u")return()=>{};const i=n=>{const s=n?.detail?.status;typeof s=="string"&&(D=s),e(L())};return window.addEventListener(x,i),e(L()),v()&&M({type:"getNotificationStatus"}),()=>window.removeEventListener(x,i)}async function B(){if(v()){M({type:"requestNotificationPermission"});return}I()||typeof Notification<"u"&&Notification.permission==="default"&&await Notification.requestPermission().catch(()=>"denied")}const K="tt.limitAlerts.enabled";function V(){try{return window.localStorage.getItem(K)==="1"}catch{return!1}}function le(){const[e,i]=w.useState(V),[n,s]=w.useState("unknown");w.useEffect(()=>$(s),[]);const y=w.useCallback(async o=>{const l=!!o;l&&await B();try{window.localStorage.setItem(K,l?"1":"0")}catch{}i(l)},[]);return{enabled:e,setEnabled:y,permissionBlocked:n==="denied"}}function G(e,i){if(!(e>0))return null;const n=(e-i)/e;return Number.isFinite(n)?Math.min(Math.max(n,0),1):null}function U(e,i,n=.03){return e>i+n}function H(e){const i=Math.max(0,Math.floor(e)),n=Math.floor(i/3600);return n>24?`${Math.floor(n/24)}d`:n>0?`${n}h`:`${Math.floor(i/60)}m`}function J(e,i){if(typeof e.windowSeconds=="number")return e.windowSeconds;if(e.windowSecondsField&&i){const n=i[e.windowSecondsField];return typeof n=="number"&&n>0?n:null}return null}function W(e){return e==null?NaN:typeof e=="number"?e*1e3:Date.parse(e)}function Y({usedPercent:e,windowSeconds:i,resetMs:n,mode:s,now:y=Date.now()}){const o=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(n)||n<=y)return l;const a=Math.max(0,(n-y)/1e3),r=G(i,a);if(r==null)return l;if(l.expectedPercent=Math.round(r*100),l.paceOver=U(o,r),o>0){const m=s==="remaining"?1-r:r;l.pacePercent=m*100}if(r>.02&&o>0){const m=i*r,c=o/m,f=o/r;f>=1&&c>0?l.runsOutEta=H((1-o)/c):l.projectedEnd=Math.round(Math.min(f,1)*100)}return l}const Q={claude:{windows(e){const i=Array.isArray(e.weekly_scoped)?e.weekly_scoped.map(n=>({key:`scoped-${n.label}`,label:n.label,window:n,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"},{key:"grok-bot",labelKey:"limits.label.cursor_grok_bot",window:e.quaternary_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,n=i==="weekly"?"limits.label.grok_week":i==="daily"?"limits.label.grok_day":"limits.label.grok_month",s=i==="weekly"?7*86400:i==="daily"?86400:void 0;return[{key:i==="weekly"?"week":i==="daily"?"day":"month",labelKey:n,window:e.primary_window,windowSeconds:s},{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:{extra:"zcode_reset_bank",windows(e){if(e.plan_kind==="coding-plan")return[{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}];const i=Array.isArray(e.buckets)?e.buckets.filter(n=>n?.label&&n.window):[];return i.length?i.map((n,s)=>({key:`bucket-${n.entitlement_id||s}`,label:n.label,window:n.window,...n.period==="one_time"?{timeKind:"expiry"}:{}})):[{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:"addon",labelKey:"limits.label.qoder_cn_addon_credits",window:e.tertiary_window},{key:"ultimate",labelKey:"limits.label.qoder_cn_ultimate",window:e.secondary_window,timeKind:"expiry"}]}},codingPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_coding_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_coding_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_coding_plan_monthly",window:e.tertiary_window}]}},commandCode:{windows(e){return[{key:"5h",labelKey:"limits.label.command_code_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.command_code_weekly",window:e.secondary_window}]}},agentPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_agent_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_agent_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_agent_plan_monthly",window:e.tertiary_window}]}},devin:{windows(e){return[{key:"daily",labelKey:"limits.label.devin_daily",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"weekly",labelKey:"limits.label.devin_weekly",window:e.secondary_window,windowSecondsField:"limit_window_seconds"}]}}},A="tt.limitAlerts.cycles.v1";function X(){try{return JSON.parse(window.localStorage.getItem(A)||"{}")}catch{return{}}}function Z(e){try{window.localStorage.setItem(A,JSON.stringify(e))}catch{}}function ee(e,{now:i=Date.now()}={}){const n=[],s=Q;for(const[y,o]of Object.entries(e||{})){const l=s[y];if(!(!o?.configured||o.error||!l))for(const a of l.windows(o)){if(!a.window)continue;const r=Number(a.pctField==="utilization"?a.window.utilization:a.window.used_percent),m=a.resetField==="resets_at"?a.window.resets_at:a.window.reset_at,c=W(m),f=Y({usedPercent:r,windowSeconds:J(a,a.window),resetMs:c,mode:"used",now:i});!f.runsOutEta||!f.paceOver||r<20||!(c>i)||n.push({id:`${y}:${a.key}:${c}`,providerId:y,windowKey:a.key,resetMs:c,usedPercent:r,runsOutEta:f.runsOutEta})}}return n}function ie(e){const i=X(),n=ee(e);for(const o of n){if(i[o.id])continue;const l=z(o.providerId),a=P("limits.alert.title",{provider:l}),r=P("limits.alert.body",{eta:o.runsOutEta,percent:Math.round(o.usedPercent)});let m=O({title:a,body:r,id:o.id});!m&&typeof Notification<"u"&&Notification.permission==="granted"&&(new Notification(a,{body:r,tag:o.id}),m=!0),m&&(i[o.id]=Date.now())}const s=Date.now()-864e5,y=Object.fromEntries(Object.entries(i).filter(([o,l])=>{const a=Number(o.split(":").at(-1));return Number.isFinite(a)?a>=s:Number(l)>=s}).slice(-100));return Z(y),n.length}function h(e,i){return!e||i||!e.devin||e.devin.configured===!1&&Object.keys(e.devin).length===1?e:{...e,devin:{configured:!1}}}function re(e){const i=q(),n=i&&!!e?.initialState,[s,y]=w.useState(_),[o,l]=w.useState(()=>n?h(e?.initialState?.data??null,_()):null),[a,r]=w.useState(()=>n?e?.initialState?.error??null:null),[m,c]=w.useState(i&&!n),f=!!e?.initialRefresh,E=!!e?.publishToPreloadCache,b=j([s,i]);w.useEffect(()=>{if(typeof window>"u")return;const d=()=>y(_()),t=u=>{T(u.key)&&d()};return window.addEventListener(F,d),window.addEventListener("storage",t),()=>{window.removeEventListener(F,d),window.removeEventListener("storage",t)}},[]),w.useEffect(()=>{if(!(!i||!o||typeof window>"u"))try{window.localStorage.getItem(K)==="1"&&ie(o)}catch{}},[o,i]);const p=w.useCallback((d,t)=>{!i||!E||!d||typeof d!="object"||R(h(d,_()),{source:t})},[i,E]),C=w.useCallback(async()=>{if(!i)return null;const d=b();try{const t=await S({refresh:!0,devinEnabled:_()});if(!d())return null;const k=h(t&&typeof t=="object"?t:null,_());return l(k),r(null),c(!1),p(k,"manual-refresh"),k}catch(t){return d()&&(r(t?.message||String(t)),c(!1)),null}},[b,i,p]),g=w.useCallback(async()=>{if(!i)return;const d=b();try{const t=await S({devinEnabled:_()});if(!d())return;const u=t&&typeof t=="object"?t:null;l(h(u,_())),r(null),c(!1),p(u,"page-load")}catch(t){if(!d())return;r(t?.message||String(t)),c(!1)}},[b,i,p]);w.useEffect(()=>{if(!i||typeof window>"u"||typeof document>"u")return;const d=15e3;let t=Date.now();const u=()=>{if(document.visibilityState!=="visible")return;const k=Date.now();k-t<d||(t=k,g())};return window.addEventListener("focus",u),document.addEventListener("visibilitychange",u),()=>{window.removeEventListener("focus",u),document.removeEventListener("visibilitychange",u)}},[i,g]);const N=w.useRef(s);return w.useEffect(()=>{N.current!==s&&(N.current=s,i&&(s||l(d=>h(d,!1)),g()))},[s,i,g]),w.useEffect(()=>{if(!i){l(null),r(null),c(!1);return}if(n&&!f)return;const d=b();(async()=>{try{const t=await S({devinEnabled:_()});if(!d())return;const u=t&&typeof t=="object"?t:null;l(h(u,_())),r(null),p(u,"page-load")}catch(t){if(!d())return;r(t?.message||String(t))}finally{d()&&c(!1)}})()},[b,n,f,i,p]),{data:o,error:a,isLoading:m,refresh:C}}export{Q as P,J as a,le as b,Y as c,W as r,ie as s,re as u};
|
|
1
|
+
import{t as v,w as M,r as w,c as P,aS as O,aT as R,aU as S,aV as q}from"./__vite-browser-external-BZ-i40Kf.js";import{l as z,i as _,L as F,a as T}from"./use-limits-display-prefs-CGyd8lvc.js";import{u as j}from"./use-latest-request-guard-BKbMGVji.js";const x="native:notificationPermission";let D=null;function I(){return typeof window<"u"&&!!window.chrome?.webview}function L(){return v()?D||"unknown":I()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function $(e){if(typeof window>"u")return()=>{};const i=n=>{const s=n?.detail?.status;typeof s=="string"&&(D=s),e(L())};return window.addEventListener(x,i),e(L()),v()&&M({type:"getNotificationStatus"}),()=>window.removeEventListener(x,i)}async function B(){if(v()){M({type:"requestNotificationPermission"});return}I()||typeof Notification<"u"&&Notification.permission==="default"&&await Notification.requestPermission().catch(()=>"denied")}const K="tt.limitAlerts.enabled";function V(){try{return window.localStorage.getItem(K)==="1"}catch{return!1}}function le(){const[e,i]=w.useState(V),[n,s]=w.useState("unknown");w.useEffect(()=>$(s),[]);const y=w.useCallback(async o=>{const l=!!o;l&&await B();try{window.localStorage.setItem(K,l?"1":"0")}catch{}i(l)},[]);return{enabled:e,setEnabled:y,permissionBlocked:n==="denied"}}function G(e,i){if(!(e>0))return null;const n=(e-i)/e;return Number.isFinite(n)?Math.min(Math.max(n,0),1):null}function U(e,i,n=.03){return e>i+n}function H(e){const i=Math.max(0,Math.floor(e)),n=Math.floor(i/3600);return n>24?`${Math.floor(n/24)}d`:n>0?`${n}h`:`${Math.floor(i/60)}m`}function J(e,i){if(typeof e.windowSeconds=="number")return e.windowSeconds;if(e.windowSecondsField&&i){const n=i[e.windowSecondsField];return typeof n=="number"&&n>0?n:null}return null}function W(e){return e==null?NaN:typeof e=="number"?e*1e3:Date.parse(e)}function Y({usedPercent:e,windowSeconds:i,resetMs:n,mode:s,now:y=Date.now()}){const o=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(n)||n<=y)return l;const a=Math.max(0,(n-y)/1e3),r=G(i,a);if(r==null)return l;if(l.expectedPercent=Math.round(r*100),l.paceOver=U(o,r),o>0){const m=s==="remaining"?1-r:r;l.pacePercent=m*100}if(r>.02&&o>0){const m=i*r,c=o/m,f=o/r;f>=1&&c>0?l.runsOutEta=H((1-o)/c):l.projectedEnd=Math.round(Math.min(f,1)*100)}return l}const Q={claude:{windows(e){const i=Array.isArray(e.weekly_scoped)?e.weekly_scoped.map(n=>({key:`scoped-${n.label}`,label:n.label,window:n,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"},{key:"grok-bot",labelKey:"limits.label.cursor_grok_bot",window:e.quaternary_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,n=i==="weekly"?"limits.label.grok_week":i==="daily"?"limits.label.grok_day":"limits.label.grok_month",s=i==="weekly"?7*86400:i==="daily"?86400:void 0;return[{key:i==="weekly"?"week":i==="daily"?"day":"month",labelKey:n,window:e.primary_window,windowSeconds:s},{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:{extra:"zcode_reset_bank",windows(e){if(e.plan_kind==="coding-plan")return[{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}];const i=Array.isArray(e.buckets)?e.buckets.filter(n=>n?.label&&n.window):[];return i.length?i.map((n,s)=>({key:`bucket-${n.entitlement_id||s}`,label:n.label,window:n.window,...n.period==="one_time"?{timeKind:"expiry"}:{}})):[{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:"addon",labelKey:"limits.label.qoder_cn_addon_credits",window:e.tertiary_window},{key:"ultimate",labelKey:"limits.label.qoder_cn_ultimate",window:e.secondary_window,timeKind:"expiry"}]}},codingPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_coding_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_coding_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_coding_plan_monthly",window:e.tertiary_window}]}},commandCode:{windows(e){return[{key:"5h",labelKey:"limits.label.command_code_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.command_code_weekly",window:e.secondary_window}]}},agentPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_agent_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_agent_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_agent_plan_monthly",window:e.tertiary_window}]}},devin:{windows(e){return[{key:"daily",labelKey:"limits.label.devin_daily",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"weekly",labelKey:"limits.label.devin_weekly",window:e.secondary_window,windowSecondsField:"limit_window_seconds"}]}}},A="tt.limitAlerts.cycles.v1";function X(){try{return JSON.parse(window.localStorage.getItem(A)||"{}")}catch{return{}}}function Z(e){try{window.localStorage.setItem(A,JSON.stringify(e))}catch{}}function ee(e,{now:i=Date.now()}={}){const n=[],s=Q;for(const[y,o]of Object.entries(e||{})){const l=s[y];if(!(!o?.configured||o.error||!l))for(const a of l.windows(o)){if(!a.window)continue;const r=Number(a.pctField==="utilization"?a.window.utilization:a.window.used_percent),m=a.resetField==="resets_at"?a.window.resets_at:a.window.reset_at,c=W(m),f=Y({usedPercent:r,windowSeconds:J(a,a.window),resetMs:c,mode:"used",now:i});!f.runsOutEta||!f.paceOver||r<20||!(c>i)||n.push({id:`${y}:${a.key}:${c}`,providerId:y,windowKey:a.key,resetMs:c,usedPercent:r,runsOutEta:f.runsOutEta})}}return n}function ie(e){const i=X(),n=ee(e);for(const o of n){if(i[o.id])continue;const l=z(o.providerId),a=P("limits.alert.title",{provider:l}),r=P("limits.alert.body",{eta:o.runsOutEta,percent:Math.round(o.usedPercent)});let m=O({title:a,body:r,id:o.id});!m&&typeof Notification<"u"&&Notification.permission==="granted"&&(new Notification(a,{body:r,tag:o.id}),m=!0),m&&(i[o.id]=Date.now())}const s=Date.now()-864e5,y=Object.fromEntries(Object.entries(i).filter(([o,l])=>{const a=Number(o.split(":").at(-1));return Number.isFinite(a)?a>=s:Number(l)>=s}).slice(-100));return Z(y),n.length}function h(e,i){return!e||i||!e.devin||e.devin.configured===!1&&Object.keys(e.devin).length===1?e:{...e,devin:{configured:!1}}}function re(e){const i=q(),n=i&&!!e?.initialState,[s,y]=w.useState(_),[o,l]=w.useState(()=>n?h(e?.initialState?.data??null,_()):null),[a,r]=w.useState(()=>n?e?.initialState?.error??null:null),[m,c]=w.useState(i&&!n),f=!!e?.initialRefresh,E=!!e?.publishToPreloadCache,b=j([s,i]);w.useEffect(()=>{if(typeof window>"u")return;const d=()=>y(_()),t=u=>{T(u.key)&&d()};return window.addEventListener(F,d),window.addEventListener("storage",t),()=>{window.removeEventListener(F,d),window.removeEventListener("storage",t)}},[]),w.useEffect(()=>{if(!(!i||!o||typeof window>"u"))try{window.localStorage.getItem(K)==="1"&&ie(o)}catch{}},[o,i]);const p=w.useCallback((d,t)=>{!i||!E||!d||typeof d!="object"||R(h(d,_()),{source:t})},[i,E]),C=w.useCallback(async()=>{if(!i)return null;const d=b();try{const t=await S({refresh:!0,devinEnabled:_()});if(!d())return null;const k=h(t&&typeof t=="object"?t:null,_());return l(k),r(null),c(!1),p(k,"manual-refresh"),k}catch(t){return d()&&(r(t?.message||String(t)),c(!1)),null}},[b,i,p]),g=w.useCallback(async()=>{if(!i)return;const d=b();try{const t=await S({devinEnabled:_()});if(!d())return;const u=t&&typeof t=="object"?t:null;l(h(u,_())),r(null),c(!1),p(u,"page-load")}catch(t){if(!d())return;r(t?.message||String(t)),c(!1)}},[b,i,p]);w.useEffect(()=>{if(!i||typeof window>"u"||typeof document>"u")return;const d=15e3;let t=Date.now();const u=()=>{if(document.visibilityState!=="visible")return;const k=Date.now();k-t<d||(t=k,g())};return window.addEventListener("focus",u),document.addEventListener("visibilitychange",u),()=>{window.removeEventListener("focus",u),document.removeEventListener("visibilitychange",u)}},[i,g]);const N=w.useRef(s);return w.useEffect(()=>{N.current!==s&&(N.current=s,i&&(s||l(d=>h(d,!1)),g()))},[s,i,g]),w.useEffect(()=>{if(!i){l(null),r(null),c(!1);return}if(n&&!f)return;const d=b();(async()=>{try{const t=await S({devinEnabled:_()});if(!d())return;const u=t&&typeof t=="object"?t:null;l(h(u,_())),r(null),p(u,"page-load")}catch(t){if(!d())return;r(t?.message||String(t))}finally{d()&&c(!1)}})()},[b,n,f,i,p]),{data:o,error:a,isLoading:m,refresh:C}}export{Q as P,J as a,le as b,Y as c,W as r,ie as s,re as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,C as t,D as r,z as c}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,C as t,D as r,z as c}from"./__vite-browser-external-BZ-i40Kf.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{b2 as G,bn as ot,bo as dt,bp as et,bq as U,br as Kt,bs as Tt,bt as Yt,bu as Qe,bv as Pe,bw as Ze,bx as Gt,by as Me,bz as Bt,bA as Ut,bB as pe,bC as Le,r as R,ar as tn,b1 as wt,b0 as en,b3 as nn,bD as on,J as sn,K as rn}from"./__vite-browser-external-BtJVmciH.js";import{a as cn,c as Mt,p as ln}from"./composite-CzXFY9IC.js";const ut=Math.min,q=Math.max,$t=Math.round,Lt=Math.floor,K=t=>({x:t,y:t}),fn={left:"right",right:"left",bottom:"top",top:"bottom"};function De(t,e,n){return q(t,ut(e,n))}function nt(t,e){return typeof t=="function"?t(e):t}function V(t){return t.split("-")[0]}function Y(t){return t.split("-")[1]}function Jt(t){return t==="x"?"y":"x"}function Qt(t){return t==="y"?"height":"width"}function I(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Zt(t){return Jt(I(t))}function an(t,e,n){n===void 0&&(n=!1);const o=Y(t),i=Zt(t),s=Qt(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=Ft(r)),[r,Ft(r)]}function un(t){const e=Ft(t);return[qt(t),e,qt(e)]}function qt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const xe=["left","right"],we=["right","left"],dn=["top","bottom"],mn=["bottom","top"];function gn(t,e,n){switch(t){case"top":case"bottom":return n?e?we:xe:e?xe:we;case"left":case"right":return e?dn:mn;default:return[]}}function hn(t,e,n,o){const i=Y(t);let s=gn(V(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(qt)))),s}function Ft(t){const e=V(t);return fn[e]+t.slice(e.length)}function pn(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Te(t){return typeof t!="number"?pn(t):{top:t,right:t,bottom:t,left:t}}function kt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function ye(t,e,n){let{reference:o,floating:i}=t;const s=I(e),r=Zt(e),c=Qt(r),l=V(e),u=s==="y",d=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:g};break;case"left":f={x:o.x-i.width,y:g};break;default:f={x:o.x,y:o.y}}const a=Y(e);return a&&(f[r]+=m*(a==="end"?1:-1)*(n&&u?-1:1)),f}async function xn(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:f=0}=nt(e,t),a=Te(f),h=c[m?g==="floating"?"reference":"floating":g],x=kt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=g==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},O=kt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:l}):w);return{top:(x.top-O.top+a.top)/y.y,bottom:(O.bottom-x.bottom+a.bottom)/y.y,left:(x.left-O.left+a.left)/y.x,right:(O.right-x.right+a.right)/y.x}}const wn=50,yn=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:xn},l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:g}=ye(u,o,l),m=o,f=0;const a={};for(let p=0;p<s.length;p++){const h=s[p];if(!h)continue;const{name:x,fn:w}=h,{x:b,y,data:O,reset:v}=await w({x:d,y:g,initialPlacement:o,placement:m,strategy:i,middlewareData:a,rects:u,platform:c,elements:{reference:t,floating:e}});d=b??d,g=y??g,a[x]={...a[x],...O},v&&f<wn&&(f++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(u=v.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:g}=ye(u,m,l)),p=-1)}return{x:d,y:g,placement:m,strategy:i,middlewareData:a}},bn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:a="none",flipAlignment:p=!0,...h}=nt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=V(i),w=I(c),b=V(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=m||(b||!p?[Ft(c)]:un(c)),v=a!=="none";!m&&v&&O.push(...hn(c,p,a,y));const C=[c,...O],E=await l.detectOverflow(e,h),k=[];let P=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&k.push(E[x]),g){const $=an(i,r,y);k.push(E[$[0]],E[$[1]])}if(P=[...P,{placement:i,overflows:k}],!k.every($=>$<=0)){var W,z;const $=(((W=s.flip)==null?void 0:W.index)||0)+1,F=C[$];if(F&&(!(g==="alignment"?w!==I(F):!1)||P.every(A=>I(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:$,overflows:P},reset:{placement:F}};let L=(z=P.filter(N=>N.overflows[0]<=0).sort((N,A)=>N.overflows[1]-A.overflows[1])[0])==null?void 0:z.placement;if(!L)switch(f){case"bestFit":{var T;const N=(T=P.filter(A=>{if(v){const D=I(A.placement);return D===w||D==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(D=>D>0).reduce((D,X)=>D+X,0)]).sort((A,D)=>A[1]-D[1])[0])==null?void 0:T[0];N&&(L=N);break}case"initialPlacement":L=c;break}if(i!==L)return{reset:{placement:L}}}return{}}}},$e=new Set(["left","top"]);async function vn(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=V(n),c=Y(n),l=I(n)==="y",u=$e.has(r)?-1:1,d=s&&l?-1:1,g=nt(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:a}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof a=="number"&&(f=c==="end"?a*-1:a),l?{x:f*d,y:m*u}:{x:m*u,y:f*d}}const Rn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await vn(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},An=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x:b,y}=w;return{x:b,y}}},...u}=nt(t,e),d={x:n,y:o},g=await s.detectOverflow(e,u),m=I(i),f=Jt(m);let a=d[f],p=d[m];const h=(w,b)=>De(b+g[w==="y"?"top":"left"],b,b-g[w==="y"?"bottom":"right"]);r&&(a=h(f,a)),c&&(p=h(m,p));const x=l.fn({...e,[f]:a,[m]:p});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[f]:r,[m]:c}}}}}},On=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:i,y:s,placement:r,rects:c,middlewareData:l}=e,{offset:u=0,mainAxis:d=!0,crossAxis:g=!0}=nt(t,e),m={x:i,y:s},f=I(r),a=Jt(f);let p=m[a],h=m[f];const x=nt(u,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(d){const O=a==="y"?"height":"width",v=c.reference[a]-c.floating[O]+w.mainAxis,C=c.reference[a]+c.reference[O]-w.mainAxis;p<v?p=v:p>C&&(p=C)}if(g){var b,y;const O=a==="y"?"width":"height",v=$e.has(V(r)),C=c.reference[f]-c.floating[O]+(v&&((b=l.offset)==null?void 0:b[f])||0)+(v?0:w.crossAxis),E=c.reference[f]+c.reference[O]+(v?0:((y=l.offset)==null?void 0:y[f])||0)-(v?w.crossAxis:0);h<C?h=C:h>E&&(h=E)}return{[a]:p,[f]:h}}}},Sn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:r=()=>{},...c}=nt(t,e),l=await i.detectOverflow(e,c),u=V(n),d=Y(n),g=I(n)==="y",{width:m,height:f}=o.floating;let a,p;u==="top"||u==="bottom"?(a=u,p=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=u,a=d==="end"?"top":"bottom");const h=f-l.top-l.bottom,x=m-l.left-l.right,w=ut(f-l[a],h),b=ut(m-l[p],x),y=e.middlewareData.shift,O=!y;let v=w,C=b;y!=null&&y.enabled.x&&(C=x),y!=null&&y.enabled.y&&(v=h),O&&!d&&(g?C=m-2*q(l.left,l.right):v=f-2*q(l.top,l.bottom)),await r({...e,availableWidth:C,availableHeight:v});const E=await i.getDimensions(s.floating);return m!==E.width||f!==E.height?{reset:{rects:!0}}:{}}}};function Fe(t){const e=et(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=dt(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=$t(n)!==s||$t(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function te(t){return G(t)?t:t.contextElement}function at(t){const e=te(t);if(!dt(e))return K(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Fe(e);let r=(s?$t(n.width):n.width)/o,c=(s?$t(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Cn=K(0);function ke(t){const e=U(t);return!Le()||!e.visualViewport?Cn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function En(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===U(t)}function st(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=te(t);let r=K(1);e&&(o?G(o)&&(r=at(o)):r=at(t));const c=En(s,n,o)?ke(s):K(0);let l=(i.left+c.x)/r.x,u=(i.top+c.y)/r.y,d=i.width/r.x,g=i.height/r.y;if(s&&o){const m=U(s),f=G(o)?U(o):o;let a=m,p=pe(a);for(;p&&f!==a;){const h=at(p),x=p.getBoundingClientRect(),w=et(p),b=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,y=x.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,g*=h.y,l+=b,u+=y,a=U(p),p=pe(a)}}return kt({width:d,height:g,x:l,y:u})}function Ht(t,e){const n=Bt(t).scrollLeft;return e?e.left+n:st(ot(t)).left+n}function We(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Ht(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Pn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=ot(o),c=e?Kt(e.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=K(1);const d=K(0),g=dt(o);if((g||!s)&&((Gt(o)!=="body"||Me(r))&&(l=Bt(o)),g)){const f=st(o);u=at(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=r&&!g&&!s?We(r,l):K(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function Mn(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Ln(t){const e=Bt(t),n=t.ownerDocument.body,o=q(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=q(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+Ht(t);const r=-e.scrollTop;return et(n).direction==="rtl"&&(s+=q(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const Dn=25;function Tn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=U(t),s=ot(t),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,u=0,d=0;if(r){const m=!Le()||e==="fixed";o?m||(u=-r.offsetLeft,d=-r.offsetTop):(c=r.width,l=r.height,m&&(u=r.offsetLeft,d=r.offsetTop))}if(Ht(s)<=0){const m=s.ownerDocument,f=m.body,a=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,h=Math.abs(s.clientWidth-f.clientWidth-p),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?h/2:h;x<=Dn&&(c-=x)}return{width:c,height:l,x:u,y:d}}function $n(t,e){const n=st(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=at(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,u=o*s.y;return{width:r,height:c,x:l,y:u}}function be(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=Tn(t,n,e);else if(e==="document")o=Ln(ot(t));else if(G(e))o=$n(e,n);else{const i=ke(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return kt(o)}function Fn(t,e){const n=e.get(t);if(n)return n;let o=Ut(t,[],!1).filter(c=>G(c)&&Gt(c)!=="body"),i=null;const s=et(t).position==="fixed";let r=s?Tt(t):t;for(;G(r)&&!Yt(r);){const c=et(r),l=Pe(r),u=i?i.position:s?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&c.position==="static")?o=o.filter(g=>g!==r):i=c,r=Tt(r)}return e.set(t,o),o}function kn(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?Kt(e)?[]:Fn(e,this._c):[].concat(n),o],c=be(e,r[0],i);let l=c.top,u=c.right,d=c.bottom,g=c.left;for(let m=1;m<r.length;m++){const f=be(e,r[m],i);l=q(f.top,l),u=ut(f.right,u),d=ut(f.bottom,d),g=q(f.left,g)}return{width:u-g,height:d-l,x:g,y:l}}function Wn(t){const{width:e,height:n}=Fe(t);return{width:e,height:n}}function Bn(t,e,n){const o=dt(e),i=ot(e),s=n==="fixed",r=st(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=K(0);if((o||!s)&&((Gt(e)!=="body"||Me(i))&&(c=Bt(e)),o)){const m=st(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&i&&(l.x=Ht(i));const u=i&&!o&&!s?We(i,c):K(0),d=r.left+c.scrollLeft-l.x-u.x,g=r.top+c.scrollTop-l.y-u.y;return{x:d,y:g,width:r.width,height:r.height}}function Xt(t){return et(t).position==="static"}function ve(t,e){if(!dt(t)||et(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ot(t)===n&&(n=n.ownerDocument.body),n}function Be(t,e){const n=U(t);if(Kt(t))return n;if(!dt(t)){let i=Tt(t);for(;i&&!Yt(i);){if(G(i)&&!Xt(i))return i;i=Tt(i)}return n}let o=ve(t,e);for(;o&&Qe(o)&&Xt(o);)o=ve(o,e);return o&&Yt(o)&&Xt(o)&&!Pe(o)?n:o||Ze(t)||n}const Hn=async function(t){const e=this.getOffsetParent||Be,n=this.getDimensions,o=await n(t.floating);return{reference:Bn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Vn(t){return et(t).direction==="rtl"}const _n={convertOffsetParentRelativeRectToViewportRelativeRect:Pn,getDocumentElement:ot,getClippingRect:kn,getOffsetParent:Be,getElementRects:Hn,getClientRects:Mn,getDimensions:Wn,getScale:at,isElement:G,isRTL:Vn};function He(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function In(t,e,n){let o=null,i;const s=ot(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,g){d===void 0&&(d=!1),g===void 0&&(g=1),r();const m=t.getBoundingClientRect(),{left:f,top:a,width:p,height:h}=m;if(d||e(),!p||!h)return;const x=Lt(a),w=Lt(s.clientWidth-(f+p)),b=Lt(s.clientHeight-(a+h)),y=Lt(f),v={rootMargin:-x+"px "+-w+"px "+-b+"px "+-y+"px",threshold:q(0,ut(1,g))||1};let C=!0;function E(k){const P=k[0].intersectionRatio;if(!He(m,t.getBoundingClientRect()))return c();if(P!==g){if(!C)return c();P?c(!1,P):i=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{o=new IntersectionObserver(E,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(E,v)}o.observe(t)}const l=U(t),u=()=>c(n);return l.addEventListener("resize",u),c(!0),()=>{l.removeEventListener("resize",u),r()}}function Re(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=te(t),d=i||s?[...u?Ut(u):[],...e?Ut(e):[]]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n),s&&x.addEventListener("resize",n)});const g=u&&c?In(u,n,s):null;let m=-1,f=null;r&&(f=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),u&&!l&&f.observe(u),e&&f.observe(e));let a,p=l?st(t):null;l&&h();function h(){const x=st(t);p&&!He(p,x)&&n(),p=x,a=requestAnimationFrame(h)}return n(),()=>{var x;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),g?.(),(x=f)==null||x.disconnect(),f=null,l&&cancelAnimationFrame(a)}}const zn=Rn,Nn=An,Xn=bn,jn=Sn,Yn=On,Un=(t,e,n)=>{const o=new Map,i=n??{},s={..._n,...i.platform,_c:o};return yn(t,e,{...i,platform:s})};var qn=typeof document<"u",Kn=function(){},Dt=qn?R.useLayoutEffect:Kn;function Wt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Wt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&t.$$typeof)&&!Wt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Ve(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ae(t,e){const n=Ve(t);return Math.round(e*n)/n}function jt(t){const e=R.useRef(t);return Dt(()=>{e.current=t}),e}function Gn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:u}=t,[d,g]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=R.useState(o);Wt(m,o)||f(o);const[a,p]=R.useState(null),[h,x]=R.useState(null),w=R.useCallback(A=>{A!==v.current&&(v.current=A,p(A))},[]),b=R.useCallback(A=>{A!==C.current&&(C.current=A,x(A))},[]),y=s||a,O=r||h,v=R.useRef(null),C=R.useRef(null),E=R.useRef(d),k=l!=null,P=jt(l),W=jt(i),z=jt(u),T=R.useCallback(()=>{if(!v.current||!C.current)return;const A={placement:e,strategy:n,middleware:m};W.current&&(A.platform=W.current),Un(v.current,C.current,A).then(D=>{const X={...D,isPositioned:z.current!==!1};$.current&&!Wt(E.current,X)&&(E.current=X,tn.flushSync(()=>{g(X)}))})},[m,e,n,W,z]);Dt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,g(A=>({...A,isPositioned:!1})))},[u]);const $=R.useRef(!1);Dt(()=>($.current=!0,()=>{$.current=!1}),[]),Dt(()=>{if(y&&(v.current=y),O&&(C.current=O),y&&O){if(P.current)return P.current(y,O,T);T()}},[y,O,T,P,k]);const F=R.useMemo(()=>({reference:v,floating:C,setReference:w,setFloating:b}),[w,b]),L=R.useMemo(()=>({reference:y,floating:O}),[y,O]),N=R.useMemo(()=>{const A={position:n,left:0,top:0};if(!L.floating)return A;const D=Ae(L.floating,d.x),X=Ae(L.floating,d.y);return c?{...A,transform:"translate("+D+"px, "+X+"px)",...Ve(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:X}},[n,c,L.floating,d.x,d.y]);return R.useMemo(()=>({...d,update:T,refs:F,elements:L,floatingStyles:N}),[d,T,F,L,N])}const Jn=(t,e)=>{const n=zn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Qn=(t,e)=>{const n=Nn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Zn=(t,e)=>({fn:Yn(t).fn,options:[t,e]}),to=(t,e)=>{const n=Xn(t);return{name:n.name,fn:n.fn,options:[t,e]}},eo=(t,e)=>{const n=jn(t);return{name:n.name,fn:n.fn,options:[t,e]}};function no(t){const{nodeId:e,externalTree:n,rootContext:o}=t,i=o.useState("referenceElement"),s=o.useState("floatingElement"),r=o.useState("domReferenceElement"),c=o.useState("open"),l=o.useState("floatingId"),[u,d]=R.useState(null),g=R.useRef(null),m=cn(n),f=R.useMemo(()=>({reference:i,floating:s,domReference:r}),[i,s,r]),a=Gn({...t,elements:{...f,...u&&{reference:u}}}),p=R.useCallback(b=>{const y=G(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;d(y),a.refs.setReference(y)},[a.refs]),h=R.useMemo(()=>({...a.refs,setPositionReference:p,domReference:g}),[a.refs,p]),x=R.useMemo(()=>({...a.elements,domReference:r}),[a.elements,r]),w=R.useMemo(()=>({...a,dataRef:o.context.dataRef,open:c,onOpenChange:o.setOpen,events:o.context.events,floatingId:l,refs:h,elements:x,nodeId:e,rootStore:o}),[a,h,x,e,o,c,l]);return wt(()=>{r&&(g.current=r)},[r]),wt(()=>{o.context.dataRef.current.floatingContext=w;const b=m?.nodesRef.current.find(y=>y.id===e);b&&(b.context=w)}),R.useMemo(()=>({...a,context:w,refs:h,elements:x,rootStore:o}),[a,h,x,w,o])}const oo=R.createContext(void 0);function io(){return R.useContext(oo)?.direction??"ltr"}const so=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=e,{element:u,padding:d=0}=nt(t,e)||{};if(u==null)return{};const g=Te(d),m={x:n,y:o},f=Zt(i),a=Qt(f),p=await r.getDimensions(u),h=f==="y",x=h?"top":"left",w=h?"bottom":"right",b=h?"clientHeight":"clientWidth",y=s.reference[a]+s.reference[f]-m[f]-s.floating[a],O=m[f]-s.reference[f],v=c.floating[b]||s.floating[a],C=y/2-O/2,E=v/2-p[a]/2-1,k=Math.min(g[x],E),P=Math.min(g[w],E),W=k,z=v-p[a]-P,T=v/2-p[a]/2+C,$=De(W,T,z),F=!l.arrow&&Y(i)!=null&&T!==$&&s.reference[a]/2-(T<W?k:P)-p[a]/2<0,L=F?T<W?T-W:T-z:0;return{[f]:m[f]+L,data:{[f]:$,centerOffset:T-$-L,...F&&{alignmentOffset:L}},reset:F}}}),ro=(t,e)=>{const{name:n,fn:o}=so(t);return{name:n,fn:o,options:[t,e]}},co={name:"hide",async fn(t){const{width:e,height:n,x:o,y:i}=t.rects.reference,s=e===0&&n===0&&o===0&&i===0,r=await t.platform.detectOverflow(t,{elementContext:"reference"});return{data:{referenceHidden:r.top-n>=0||r.right-e>=0||r.bottom-n>=0||r.left-e>=0||s}}}},lo={sideX:"left",sideY:"top"},fo="--available-width",ao="--available-height",uo="--anchor-width",mo="--anchor-height",go="--transform-origin",Oe=fo,Se=ao;function _e(t,e,n){const o=t==="inline-start"||t==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[e]}function Ce(t,e,n){const{rects:o,placement:i}=t;return{side:_e(e,V(i),n),align:Y(i)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function yo(t){return ho(t,no)}function ho(t,e){const{anchor:n,positionMethod:o="absolute",side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:u=5,sticky:d=!1,arrowPadding:g=5,disableAnchorTracking:m=!1,inline:f,keepMounted:a=!1,floatingRootContext:p,mounted:h,collisionAvoidance:x,shift:w,nodeId:b,adaptiveOrigin:y,lazyFlip:O=!1,externalTree:v}=t,C=x.side||"flip",E=x.align||"flip",k=x.fallbackAxisSide||"end",P=w?.crossAxis??!1,W=w?.rootBoundary,z=typeof n=="function"?n:void 0,T=en(z),$=z?T:n,F=Mt(n),L=Mt(h),A=io()==="rtl",[D,X]=R.useState(null);!h&&D!==null&&X(null);const Vt=O==="placement",Ie=D?V(D):null,ze=D&&Vt?Y(D)||"center":null,yt=Ie||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":A?"left":"right","inline-start":A?"right":"left"}[i],mt=ze||r,Ne=mt==="center"?yt:`${yt}-${mt}`;let M=u;typeof M=="number"?M={top:M,right:M,bottom:M,left:M}:M&&(M={top:M.top||0,right:M.right||0,bottom:M.bottom||0,left:M.left||0});const J=1,Xe=i==="bottom"?J:0,je=i==="top"?J:0,Ye=i==="right"?J:0,Ue=i==="left"?J:0,bt={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:M},it=R.useRef(null),_t=Mt(s),It=Mt(c),qe=typeof s!="function"?s:0,Ke=typeof c!="function"?c:0,rt=[];f&&rt.push(f),rt.push(Jn(S=>{const H=Ce(S,i,A),_=typeof _t.current=="function"?_t.current(H):_t.current,B=typeof It.current=="function"?It.current(H):It.current;return{mainAxis:_,crossAxis:B,alignmentAxis:B}},[qe,Ke,A,i]));const ee=E==="none"&&C!=="shift",ne=!ee&&(d||P||C==="shift"),oe=C==="none"?null:to({...bt,padding:{top:M.top+J+Xe,right:M.right+J+Ue,bottom:M.bottom+J+je,left:M.left+J+Ye},mainAxis:!P&&C==="flip",crossAxis:E==="flip"?"alignment":!1,fallbackAxisSideDirection:k}),ie=ee?null:Qn({...bt,rootBoundary:W,mainAxis:E!=="none",crossAxis:ne,limiter:d||P?void 0:Zn(S=>{if(!it.current)return{};const{width:H,height:_}=it.current.getBoundingClientRect(),B=I(V(S.placement)),Z=B==="y"?H:_,j=B==="y"?M.left+M.right:M.top+M.bottom;return{offset:Z/2+j/2}})},[bt,d,P,W,M,E]);C==="shift"||E==="shift"||mt==="center"?rt.push(ie,oe):rt.push(oe,ie),rt.push(eo({...bt,apply({elements:{floating:S},availableWidth:H,availableHeight:_,rects:B}){if(!L.current)return;const Z=S.style;Z.setProperty(Oe,`${H}px`),Z.setProperty(Se,`${_}px`);const j=U(S).devicePixelRatio||1,{x:Ct,y:ft,width:Et,height:tt}=B.reference,pt=(Math.round((Ct+Et)*j)-Math.round(Ct*j))/j,xt=(Math.round((ft+tt)*j)-Math.round(ft*j))/j;Z.setProperty(uo,`${pt}px`),Z.setProperty(mo,`${xt}px`)}}),ro(S=>({element:it.current||nn(S.elements.floating).createElement("div"),padding:it.current?g:0}),[g]),{name:"transformOrigin",fn(S){const{elements:{floating:H},middlewareData:_,placement:B,platform:Z,rects:j,y:Ct}=S,ft=V(B),Et=Y(B),tt=I(ft)==="y",pt=it.current,xt=typeof s=="function"?s(Ce(S,i,A)):s;let Pt;if(!pt&&Et&&Math.abs(tt?_.shift?.x||0:_.shift?.y||0)<=1)Pt=Et==="start"===(tt&&Z.isRTL?.(H)===!0)?"100%":"0%";else{const Ge=tt?_.arrow?.x||0:_.arrow?.y||0,Je=tt?pt?.clientWidth||0:pt?.clientHeight||0;Pt=`${Ge+Je/2}px`}let Nt=ft==="top"||ft==="left"?`calc(100% + ${xt}px)`:`${-xt}px`;return ne&&tt&&Math.abs(_.shift?.y||0)>xt&&(Nt=`${j.reference.y+j.reference.height/2-Ct}px`),H.style.setProperty(go,tt?`${Pt} ${Nt}`:`${Nt} ${Pt}`),{}}},co,y),wt(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,p]);const zt=R.useMemo(()=>({ancestorScroll:!m,elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:ct,elements:gt,x:se,y:re,middlewareData:lt,update:vt,placement:Rt,context:ce,isPositioned:Q,floatingStyles:le}=e({rootContext:p,open:a?h:void 0,placement:Ne,middleware:rt,strategy:o,whileElementsMounted:a?void 0:(...S)=>Re(...S,zt),nodeId:b,externalTree:v}),{sideX:fe,sideY:ae}=lt.adaptiveOrigin||lo,At=Q?o:"fixed",ue=R.useMemo(()=>{let S;return Q?y?S={position:At,[fe]:se,[ae]:re}:S={...le,position:At}:S={position:At,top:0,left:0},S[Oe]="100vw",S[Se]="100vh",Q||(S.opacity=0),S},[y,At,fe,se,ae,re,le,Q]),Ot=R.useRef(null);wt(()=>{if(!h)return;const S=F.current,H=typeof S=="function"?S():S,B=(Ee(H)?H.current:H)||null||null;B!==Ot.current&&(ct.setPositionReference(B),Ot.current=B)},[h,ct,$,F]),R.useEffect(()=>{if(!h)return;const S=F.current;typeof S!="function"&&Ee(S)&&S.current!==Ot.current&&(ct.setPositionReference(S.current),Ot.current=S.current)},[h,ct,$,F]),R.useEffect(()=>{if(a&&h&>.reference&>.floating)return Re(gt.reference,gt.floating,vt,zt)},[a,h,gt,vt,zt]);const ht=V(Rt),de=_e(i,ht,A),St=Y(Rt)||"center",me=!!lt.hide?.referenceHidden;wt(()=>{O&&h&&Q&&(ht!==yt||Vt&&St!==mt)&&X(Rt)},[O,Vt,h,Q,Rt,ht,St,yt,mt]);const ge=R.useMemo(()=>({position:"absolute",top:lt.arrow?.y,left:lt.arrow?.x}),[lt.arrow]),he=lt.arrow?.centerOffset!==0;return R.useMemo(()=>({positionerStyles:ue,arrowStyles:ge,arrowRef:it,arrowUncentered:he,side:de,align:St,physicalSide:ht,anchorHidden:me,refs:ct,context:ce,isPositioned:Q,update:vt}),[ue,ge,it,he,de,St,ht,me,ct,ce,Q,vt])}function Ee(t){return t!=null&&"current"in t}function po(t){return t==="starting"?on:sn}function bo(t,e,{styles:n,transitionStatus:o,props:i,refs:s,hidden:r,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),rn("div",t,{state:e,ref:s,props:[{role:"presentation",hidden:r,style:l},po(o),i],stateAttributesMapping:ln})}export{bo as a,io as b,po as g,_n as p,kt as r,yo as u};
|
|
1
|
+
import{b2 as G,bn as ot,bo as dt,bp as et,bq as U,br as Kt,bs as Tt,bt as Yt,bu as Qe,bv as Pe,bw as Ze,bx as Gt,by as Me,bz as Bt,bA as Ut,bB as pe,bC as Le,r as R,ar as tn,b1 as wt,b0 as en,b3 as nn,bD as on,J as sn,K as rn}from"./__vite-browser-external-BZ-i40Kf.js";import{a as cn,c as Mt,p as ln}from"./composite-CUuXvKos.js";const ut=Math.min,q=Math.max,$t=Math.round,Lt=Math.floor,K=t=>({x:t,y:t}),fn={left:"right",right:"left",bottom:"top",top:"bottom"};function De(t,e,n){return q(t,ut(e,n))}function nt(t,e){return typeof t=="function"?t(e):t}function V(t){return t.split("-")[0]}function Y(t){return t.split("-")[1]}function Jt(t){return t==="x"?"y":"x"}function Qt(t){return t==="y"?"height":"width"}function I(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Zt(t){return Jt(I(t))}function an(t,e,n){n===void 0&&(n=!1);const o=Y(t),i=Zt(t),s=Qt(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=Ft(r)),[r,Ft(r)]}function un(t){const e=Ft(t);return[qt(t),e,qt(e)]}function qt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const xe=["left","right"],we=["right","left"],dn=["top","bottom"],mn=["bottom","top"];function gn(t,e,n){switch(t){case"top":case"bottom":return n?e?we:xe:e?xe:we;case"left":case"right":return e?dn:mn;default:return[]}}function hn(t,e,n,o){const i=Y(t);let s=gn(V(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(qt)))),s}function Ft(t){const e=V(t);return fn[e]+t.slice(e.length)}function pn(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Te(t){return typeof t!="number"?pn(t):{top:t,right:t,bottom:t,left:t}}function kt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function ye(t,e,n){let{reference:o,floating:i}=t;const s=I(e),r=Zt(e),c=Qt(r),l=V(e),u=s==="y",d=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:g};break;case"left":f={x:o.x-i.width,y:g};break;default:f={x:o.x,y:o.y}}const a=Y(e);return a&&(f[r]+=m*(a==="end"?1:-1)*(n&&u?-1:1)),f}async function xn(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:f=0}=nt(e,t),a=Te(f),h=c[m?g==="floating"?"reference":"floating":g],x=kt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=g==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},O=kt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:l}):w);return{top:(x.top-O.top+a.top)/y.y,bottom:(O.bottom-x.bottom+a.bottom)/y.y,left:(x.left-O.left+a.left)/y.x,right:(O.right-x.right+a.right)/y.x}}const wn=50,yn=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:xn},l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:g}=ye(u,o,l),m=o,f=0;const a={};for(let p=0;p<s.length;p++){const h=s[p];if(!h)continue;const{name:x,fn:w}=h,{x:b,y,data:O,reset:v}=await w({x:d,y:g,initialPlacement:o,placement:m,strategy:i,middlewareData:a,rects:u,platform:c,elements:{reference:t,floating:e}});d=b??d,g=y??g,a[x]={...a[x],...O},v&&f<wn&&(f++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(u=v.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:g}=ye(u,m,l)),p=-1)}return{x:d,y:g,placement:m,strategy:i,middlewareData:a}},bn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:a="none",flipAlignment:p=!0,...h}=nt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=V(i),w=I(c),b=V(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=m||(b||!p?[Ft(c)]:un(c)),v=a!=="none";!m&&v&&O.push(...hn(c,p,a,y));const C=[c,...O],E=await l.detectOverflow(e,h),k=[];let P=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&k.push(E[x]),g){const $=an(i,r,y);k.push(E[$[0]],E[$[1]])}if(P=[...P,{placement:i,overflows:k}],!k.every($=>$<=0)){var W,z;const $=(((W=s.flip)==null?void 0:W.index)||0)+1,F=C[$];if(F&&(!(g==="alignment"?w!==I(F):!1)||P.every(A=>I(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:$,overflows:P},reset:{placement:F}};let L=(z=P.filter(N=>N.overflows[0]<=0).sort((N,A)=>N.overflows[1]-A.overflows[1])[0])==null?void 0:z.placement;if(!L)switch(f){case"bestFit":{var T;const N=(T=P.filter(A=>{if(v){const D=I(A.placement);return D===w||D==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(D=>D>0).reduce((D,X)=>D+X,0)]).sort((A,D)=>A[1]-D[1])[0])==null?void 0:T[0];N&&(L=N);break}case"initialPlacement":L=c;break}if(i!==L)return{reset:{placement:L}}}return{}}}},$e=new Set(["left","top"]);async function vn(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=V(n),c=Y(n),l=I(n)==="y",u=$e.has(r)?-1:1,d=s&&l?-1:1,g=nt(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:a}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof a=="number"&&(f=c==="end"?a*-1:a),l?{x:f*d,y:m*u}:{x:m*u,y:f*d}}const Rn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await vn(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},An=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x:b,y}=w;return{x:b,y}}},...u}=nt(t,e),d={x:n,y:o},g=await s.detectOverflow(e,u),m=I(i),f=Jt(m);let a=d[f],p=d[m];const h=(w,b)=>De(b+g[w==="y"?"top":"left"],b,b-g[w==="y"?"bottom":"right"]);r&&(a=h(f,a)),c&&(p=h(m,p));const x=l.fn({...e,[f]:a,[m]:p});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[f]:r,[m]:c}}}}}},On=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:i,y:s,placement:r,rects:c,middlewareData:l}=e,{offset:u=0,mainAxis:d=!0,crossAxis:g=!0}=nt(t,e),m={x:i,y:s},f=I(r),a=Jt(f);let p=m[a],h=m[f];const x=nt(u,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(d){const O=a==="y"?"height":"width",v=c.reference[a]-c.floating[O]+w.mainAxis,C=c.reference[a]+c.reference[O]-w.mainAxis;p<v?p=v:p>C&&(p=C)}if(g){var b,y;const O=a==="y"?"width":"height",v=$e.has(V(r)),C=c.reference[f]-c.floating[O]+(v&&((b=l.offset)==null?void 0:b[f])||0)+(v?0:w.crossAxis),E=c.reference[f]+c.reference[O]+(v?0:((y=l.offset)==null?void 0:y[f])||0)-(v?w.crossAxis:0);h<C?h=C:h>E&&(h=E)}return{[a]:p,[f]:h}}}},Sn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:r=()=>{},...c}=nt(t,e),l=await i.detectOverflow(e,c),u=V(n),d=Y(n),g=I(n)==="y",{width:m,height:f}=o.floating;let a,p;u==="top"||u==="bottom"?(a=u,p=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=u,a=d==="end"?"top":"bottom");const h=f-l.top-l.bottom,x=m-l.left-l.right,w=ut(f-l[a],h),b=ut(m-l[p],x),y=e.middlewareData.shift,O=!y;let v=w,C=b;y!=null&&y.enabled.x&&(C=x),y!=null&&y.enabled.y&&(v=h),O&&!d&&(g?C=m-2*q(l.left,l.right):v=f-2*q(l.top,l.bottom)),await r({...e,availableWidth:C,availableHeight:v});const E=await i.getDimensions(s.floating);return m!==E.width||f!==E.height?{reset:{rects:!0}}:{}}}};function Fe(t){const e=et(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=dt(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=$t(n)!==s||$t(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function te(t){return G(t)?t:t.contextElement}function at(t){const e=te(t);if(!dt(e))return K(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Fe(e);let r=(s?$t(n.width):n.width)/o,c=(s?$t(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Cn=K(0);function ke(t){const e=U(t);return!Le()||!e.visualViewport?Cn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function En(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===U(t)}function st(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=te(t);let r=K(1);e&&(o?G(o)&&(r=at(o)):r=at(t));const c=En(s,n,o)?ke(s):K(0);let l=(i.left+c.x)/r.x,u=(i.top+c.y)/r.y,d=i.width/r.x,g=i.height/r.y;if(s&&o){const m=U(s),f=G(o)?U(o):o;let a=m,p=pe(a);for(;p&&f!==a;){const h=at(p),x=p.getBoundingClientRect(),w=et(p),b=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,y=x.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,g*=h.y,l+=b,u+=y,a=U(p),p=pe(a)}}return kt({width:d,height:g,x:l,y:u})}function Ht(t,e){const n=Bt(t).scrollLeft;return e?e.left+n:st(ot(t)).left+n}function We(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Ht(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Pn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=ot(o),c=e?Kt(e.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=K(1);const d=K(0),g=dt(o);if((g||!s)&&((Gt(o)!=="body"||Me(r))&&(l=Bt(o)),g)){const f=st(o);u=at(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=r&&!g&&!s?We(r,l):K(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function Mn(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Ln(t){const e=Bt(t),n=t.ownerDocument.body,o=q(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=q(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+Ht(t);const r=-e.scrollTop;return et(n).direction==="rtl"&&(s+=q(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const Dn=25;function Tn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=U(t),s=ot(t),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,u=0,d=0;if(r){const m=!Le()||e==="fixed";o?m||(u=-r.offsetLeft,d=-r.offsetTop):(c=r.width,l=r.height,m&&(u=r.offsetLeft,d=r.offsetTop))}if(Ht(s)<=0){const m=s.ownerDocument,f=m.body,a=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,h=Math.abs(s.clientWidth-f.clientWidth-p),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?h/2:h;x<=Dn&&(c-=x)}return{width:c,height:l,x:u,y:d}}function $n(t,e){const n=st(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=at(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,u=o*s.y;return{width:r,height:c,x:l,y:u}}function be(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=Tn(t,n,e);else if(e==="document")o=Ln(ot(t));else if(G(e))o=$n(e,n);else{const i=ke(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return kt(o)}function Fn(t,e){const n=e.get(t);if(n)return n;let o=Ut(t,[],!1).filter(c=>G(c)&&Gt(c)!=="body"),i=null;const s=et(t).position==="fixed";let r=s?Tt(t):t;for(;G(r)&&!Yt(r);){const c=et(r),l=Pe(r),u=i?i.position:s?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&c.position==="static")?o=o.filter(g=>g!==r):i=c,r=Tt(r)}return e.set(t,o),o}function kn(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?Kt(e)?[]:Fn(e,this._c):[].concat(n),o],c=be(e,r[0],i);let l=c.top,u=c.right,d=c.bottom,g=c.left;for(let m=1;m<r.length;m++){const f=be(e,r[m],i);l=q(f.top,l),u=ut(f.right,u),d=ut(f.bottom,d),g=q(f.left,g)}return{width:u-g,height:d-l,x:g,y:l}}function Wn(t){const{width:e,height:n}=Fe(t);return{width:e,height:n}}function Bn(t,e,n){const o=dt(e),i=ot(e),s=n==="fixed",r=st(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=K(0);if((o||!s)&&((Gt(e)!=="body"||Me(i))&&(c=Bt(e)),o)){const m=st(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&i&&(l.x=Ht(i));const u=i&&!o&&!s?We(i,c):K(0),d=r.left+c.scrollLeft-l.x-u.x,g=r.top+c.scrollTop-l.y-u.y;return{x:d,y:g,width:r.width,height:r.height}}function Xt(t){return et(t).position==="static"}function ve(t,e){if(!dt(t)||et(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ot(t)===n&&(n=n.ownerDocument.body),n}function Be(t,e){const n=U(t);if(Kt(t))return n;if(!dt(t)){let i=Tt(t);for(;i&&!Yt(i);){if(G(i)&&!Xt(i))return i;i=Tt(i)}return n}let o=ve(t,e);for(;o&&Qe(o)&&Xt(o);)o=ve(o,e);return o&&Yt(o)&&Xt(o)&&!Pe(o)?n:o||Ze(t)||n}const Hn=async function(t){const e=this.getOffsetParent||Be,n=this.getDimensions,o=await n(t.floating);return{reference:Bn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Vn(t){return et(t).direction==="rtl"}const _n={convertOffsetParentRelativeRectToViewportRelativeRect:Pn,getDocumentElement:ot,getClippingRect:kn,getOffsetParent:Be,getElementRects:Hn,getClientRects:Mn,getDimensions:Wn,getScale:at,isElement:G,isRTL:Vn};function He(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function In(t,e,n){let o=null,i;const s=ot(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,g){d===void 0&&(d=!1),g===void 0&&(g=1),r();const m=t.getBoundingClientRect(),{left:f,top:a,width:p,height:h}=m;if(d||e(),!p||!h)return;const x=Lt(a),w=Lt(s.clientWidth-(f+p)),b=Lt(s.clientHeight-(a+h)),y=Lt(f),v={rootMargin:-x+"px "+-w+"px "+-b+"px "+-y+"px",threshold:q(0,ut(1,g))||1};let C=!0;function E(k){const P=k[0].intersectionRatio;if(!He(m,t.getBoundingClientRect()))return c();if(P!==g){if(!C)return c();P?c(!1,P):i=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{o=new IntersectionObserver(E,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(E,v)}o.observe(t)}const l=U(t),u=()=>c(n);return l.addEventListener("resize",u),c(!0),()=>{l.removeEventListener("resize",u),r()}}function Re(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=te(t),d=i||s?[...u?Ut(u):[],...e?Ut(e):[]]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n),s&&x.addEventListener("resize",n)});const g=u&&c?In(u,n,s):null;let m=-1,f=null;r&&(f=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),u&&!l&&f.observe(u),e&&f.observe(e));let a,p=l?st(t):null;l&&h();function h(){const x=st(t);p&&!He(p,x)&&n(),p=x,a=requestAnimationFrame(h)}return n(),()=>{var x;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),g?.(),(x=f)==null||x.disconnect(),f=null,l&&cancelAnimationFrame(a)}}const zn=Rn,Nn=An,Xn=bn,jn=Sn,Yn=On,Un=(t,e,n)=>{const o=new Map,i=n??{},s={..._n,...i.platform,_c:o};return yn(t,e,{...i,platform:s})};var qn=typeof document<"u",Kn=function(){},Dt=qn?R.useLayoutEffect:Kn;function Wt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Wt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&t.$$typeof)&&!Wt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Ve(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ae(t,e){const n=Ve(t);return Math.round(e*n)/n}function jt(t){const e=R.useRef(t);return Dt(()=>{e.current=t}),e}function Gn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:u}=t,[d,g]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=R.useState(o);Wt(m,o)||f(o);const[a,p]=R.useState(null),[h,x]=R.useState(null),w=R.useCallback(A=>{A!==v.current&&(v.current=A,p(A))},[]),b=R.useCallback(A=>{A!==C.current&&(C.current=A,x(A))},[]),y=s||a,O=r||h,v=R.useRef(null),C=R.useRef(null),E=R.useRef(d),k=l!=null,P=jt(l),W=jt(i),z=jt(u),T=R.useCallback(()=>{if(!v.current||!C.current)return;const A={placement:e,strategy:n,middleware:m};W.current&&(A.platform=W.current),Un(v.current,C.current,A).then(D=>{const X={...D,isPositioned:z.current!==!1};$.current&&!Wt(E.current,X)&&(E.current=X,tn.flushSync(()=>{g(X)}))})},[m,e,n,W,z]);Dt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,g(A=>({...A,isPositioned:!1})))},[u]);const $=R.useRef(!1);Dt(()=>($.current=!0,()=>{$.current=!1}),[]),Dt(()=>{if(y&&(v.current=y),O&&(C.current=O),y&&O){if(P.current)return P.current(y,O,T);T()}},[y,O,T,P,k]);const F=R.useMemo(()=>({reference:v,floating:C,setReference:w,setFloating:b}),[w,b]),L=R.useMemo(()=>({reference:y,floating:O}),[y,O]),N=R.useMemo(()=>{const A={position:n,left:0,top:0};if(!L.floating)return A;const D=Ae(L.floating,d.x),X=Ae(L.floating,d.y);return c?{...A,transform:"translate("+D+"px, "+X+"px)",...Ve(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:X}},[n,c,L.floating,d.x,d.y]);return R.useMemo(()=>({...d,update:T,refs:F,elements:L,floatingStyles:N}),[d,T,F,L,N])}const Jn=(t,e)=>{const n=zn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Qn=(t,e)=>{const n=Nn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Zn=(t,e)=>({fn:Yn(t).fn,options:[t,e]}),to=(t,e)=>{const n=Xn(t);return{name:n.name,fn:n.fn,options:[t,e]}},eo=(t,e)=>{const n=jn(t);return{name:n.name,fn:n.fn,options:[t,e]}};function no(t){const{nodeId:e,externalTree:n,rootContext:o}=t,i=o.useState("referenceElement"),s=o.useState("floatingElement"),r=o.useState("domReferenceElement"),c=o.useState("open"),l=o.useState("floatingId"),[u,d]=R.useState(null),g=R.useRef(null),m=cn(n),f=R.useMemo(()=>({reference:i,floating:s,domReference:r}),[i,s,r]),a=Gn({...t,elements:{...f,...u&&{reference:u}}}),p=R.useCallback(b=>{const y=G(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;d(y),a.refs.setReference(y)},[a.refs]),h=R.useMemo(()=>({...a.refs,setPositionReference:p,domReference:g}),[a.refs,p]),x=R.useMemo(()=>({...a.elements,domReference:r}),[a.elements,r]),w=R.useMemo(()=>({...a,dataRef:o.context.dataRef,open:c,onOpenChange:o.setOpen,events:o.context.events,floatingId:l,refs:h,elements:x,nodeId:e,rootStore:o}),[a,h,x,e,o,c,l]);return wt(()=>{r&&(g.current=r)},[r]),wt(()=>{o.context.dataRef.current.floatingContext=w;const b=m?.nodesRef.current.find(y=>y.id===e);b&&(b.context=w)}),R.useMemo(()=>({...a,context:w,refs:h,elements:x,rootStore:o}),[a,h,x,w,o])}const oo=R.createContext(void 0);function io(){return R.useContext(oo)?.direction??"ltr"}const so=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=e,{element:u,padding:d=0}=nt(t,e)||{};if(u==null)return{};const g=Te(d),m={x:n,y:o},f=Zt(i),a=Qt(f),p=await r.getDimensions(u),h=f==="y",x=h?"top":"left",w=h?"bottom":"right",b=h?"clientHeight":"clientWidth",y=s.reference[a]+s.reference[f]-m[f]-s.floating[a],O=m[f]-s.reference[f],v=c.floating[b]||s.floating[a],C=y/2-O/2,E=v/2-p[a]/2-1,k=Math.min(g[x],E),P=Math.min(g[w],E),W=k,z=v-p[a]-P,T=v/2-p[a]/2+C,$=De(W,T,z),F=!l.arrow&&Y(i)!=null&&T!==$&&s.reference[a]/2-(T<W?k:P)-p[a]/2<0,L=F?T<W?T-W:T-z:0;return{[f]:m[f]+L,data:{[f]:$,centerOffset:T-$-L,...F&&{alignmentOffset:L}},reset:F}}}),ro=(t,e)=>{const{name:n,fn:o}=so(t);return{name:n,fn:o,options:[t,e]}},co={name:"hide",async fn(t){const{width:e,height:n,x:o,y:i}=t.rects.reference,s=e===0&&n===0&&o===0&&i===0,r=await t.platform.detectOverflow(t,{elementContext:"reference"});return{data:{referenceHidden:r.top-n>=0||r.right-e>=0||r.bottom-n>=0||r.left-e>=0||s}}}},lo={sideX:"left",sideY:"top"},fo="--available-width",ao="--available-height",uo="--anchor-width",mo="--anchor-height",go="--transform-origin",Oe=fo,Se=ao;function _e(t,e,n){const o=t==="inline-start"||t==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[e]}function Ce(t,e,n){const{rects:o,placement:i}=t;return{side:_e(e,V(i),n),align:Y(i)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function yo(t){return ho(t,no)}function ho(t,e){const{anchor:n,positionMethod:o="absolute",side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:u=5,sticky:d=!1,arrowPadding:g=5,disableAnchorTracking:m=!1,inline:f,keepMounted:a=!1,floatingRootContext:p,mounted:h,collisionAvoidance:x,shift:w,nodeId:b,adaptiveOrigin:y,lazyFlip:O=!1,externalTree:v}=t,C=x.side||"flip",E=x.align||"flip",k=x.fallbackAxisSide||"end",P=w?.crossAxis??!1,W=w?.rootBoundary,z=typeof n=="function"?n:void 0,T=en(z),$=z?T:n,F=Mt(n),L=Mt(h),A=io()==="rtl",[D,X]=R.useState(null);!h&&D!==null&&X(null);const Vt=O==="placement",Ie=D?V(D):null,ze=D&&Vt?Y(D)||"center":null,yt=Ie||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":A?"left":"right","inline-start":A?"right":"left"}[i],mt=ze||r,Ne=mt==="center"?yt:`${yt}-${mt}`;let M=u;typeof M=="number"?M={top:M,right:M,bottom:M,left:M}:M&&(M={top:M.top||0,right:M.right||0,bottom:M.bottom||0,left:M.left||0});const J=1,Xe=i==="bottom"?J:0,je=i==="top"?J:0,Ye=i==="right"?J:0,Ue=i==="left"?J:0,bt={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:M},it=R.useRef(null),_t=Mt(s),It=Mt(c),qe=typeof s!="function"?s:0,Ke=typeof c!="function"?c:0,rt=[];f&&rt.push(f),rt.push(Jn(S=>{const H=Ce(S,i,A),_=typeof _t.current=="function"?_t.current(H):_t.current,B=typeof It.current=="function"?It.current(H):It.current;return{mainAxis:_,crossAxis:B,alignmentAxis:B}},[qe,Ke,A,i]));const ee=E==="none"&&C!=="shift",ne=!ee&&(d||P||C==="shift"),oe=C==="none"?null:to({...bt,padding:{top:M.top+J+Xe,right:M.right+J+Ue,bottom:M.bottom+J+je,left:M.left+J+Ye},mainAxis:!P&&C==="flip",crossAxis:E==="flip"?"alignment":!1,fallbackAxisSideDirection:k}),ie=ee?null:Qn({...bt,rootBoundary:W,mainAxis:E!=="none",crossAxis:ne,limiter:d||P?void 0:Zn(S=>{if(!it.current)return{};const{width:H,height:_}=it.current.getBoundingClientRect(),B=I(V(S.placement)),Z=B==="y"?H:_,j=B==="y"?M.left+M.right:M.top+M.bottom;return{offset:Z/2+j/2}})},[bt,d,P,W,M,E]);C==="shift"||E==="shift"||mt==="center"?rt.push(ie,oe):rt.push(oe,ie),rt.push(eo({...bt,apply({elements:{floating:S},availableWidth:H,availableHeight:_,rects:B}){if(!L.current)return;const Z=S.style;Z.setProperty(Oe,`${H}px`),Z.setProperty(Se,`${_}px`);const j=U(S).devicePixelRatio||1,{x:Ct,y:ft,width:Et,height:tt}=B.reference,pt=(Math.round((Ct+Et)*j)-Math.round(Ct*j))/j,xt=(Math.round((ft+tt)*j)-Math.round(ft*j))/j;Z.setProperty(uo,`${pt}px`),Z.setProperty(mo,`${xt}px`)}}),ro(S=>({element:it.current||nn(S.elements.floating).createElement("div"),padding:it.current?g:0}),[g]),{name:"transformOrigin",fn(S){const{elements:{floating:H},middlewareData:_,placement:B,platform:Z,rects:j,y:Ct}=S,ft=V(B),Et=Y(B),tt=I(ft)==="y",pt=it.current,xt=typeof s=="function"?s(Ce(S,i,A)):s;let Pt;if(!pt&&Et&&Math.abs(tt?_.shift?.x||0:_.shift?.y||0)<=1)Pt=Et==="start"===(tt&&Z.isRTL?.(H)===!0)?"100%":"0%";else{const Ge=tt?_.arrow?.x||0:_.arrow?.y||0,Je=tt?pt?.clientWidth||0:pt?.clientHeight||0;Pt=`${Ge+Je/2}px`}let Nt=ft==="top"||ft==="left"?`calc(100% + ${xt}px)`:`${-xt}px`;return ne&&tt&&Math.abs(_.shift?.y||0)>xt&&(Nt=`${j.reference.y+j.reference.height/2-Ct}px`),H.style.setProperty(go,tt?`${Pt} ${Nt}`:`${Nt} ${Pt}`),{}}},co,y),wt(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,p]);const zt=R.useMemo(()=>({ancestorScroll:!m,elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:ct,elements:gt,x:se,y:re,middlewareData:lt,update:vt,placement:Rt,context:ce,isPositioned:Q,floatingStyles:le}=e({rootContext:p,open:a?h:void 0,placement:Ne,middleware:rt,strategy:o,whileElementsMounted:a?void 0:(...S)=>Re(...S,zt),nodeId:b,externalTree:v}),{sideX:fe,sideY:ae}=lt.adaptiveOrigin||lo,At=Q?o:"fixed",ue=R.useMemo(()=>{let S;return Q?y?S={position:At,[fe]:se,[ae]:re}:S={...le,position:At}:S={position:At,top:0,left:0},S[Oe]="100vw",S[Se]="100vh",Q||(S.opacity=0),S},[y,At,fe,se,ae,re,le,Q]),Ot=R.useRef(null);wt(()=>{if(!h)return;const S=F.current,H=typeof S=="function"?S():S,B=(Ee(H)?H.current:H)||null||null;B!==Ot.current&&(ct.setPositionReference(B),Ot.current=B)},[h,ct,$,F]),R.useEffect(()=>{if(!h)return;const S=F.current;typeof S!="function"&&Ee(S)&&S.current!==Ot.current&&(ct.setPositionReference(S.current),Ot.current=S.current)},[h,ct,$,F]),R.useEffect(()=>{if(a&&h&>.reference&>.floating)return Re(gt.reference,gt.floating,vt,zt)},[a,h,gt,vt,zt]);const ht=V(Rt),de=_e(i,ht,A),St=Y(Rt)||"center",me=!!lt.hide?.referenceHidden;wt(()=>{O&&h&&Q&&(ht!==yt||Vt&&St!==mt)&&X(Rt)},[O,Vt,h,Q,Rt,ht,St,yt,mt]);const ge=R.useMemo(()=>({position:"absolute",top:lt.arrow?.y,left:lt.arrow?.x}),[lt.arrow]),he=lt.arrow?.centerOffset!==0;return R.useMemo(()=>({positionerStyles:ue,arrowStyles:ge,arrowRef:it,arrowUncentered:he,side:de,align:St,physicalSide:ht,anchorHidden:me,refs:ct,context:ce,isPositioned:Q,update:vt}),[ue,ge,it,he,de,St,ht,me,ct,ce,Q,vt])}function Ee(t){return t!=null&&"current"in t}function po(t){return t==="starting"?on:sn}function bo(t,e,{styles:n,transitionStatus:o,props:i,refs:s,hidden:r,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),rn("div",t,{state:e,ref:s,props:[{role:"presentation",hidden:r,style:l},po(o),i],stateAttributesMapping:ln})}export{bo as a,io as b,po as g,_n as p,kt as r,yo as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,T as r,k as n,l as s,m as a,n as T}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,T as r,k as n,l as s,m as a,n as T}from"./__vite-browser-external-BZ-i40Kf.js";const m=Object.freeze({mode:s.COMPACT,setMode:()=>{},grouping:n.THOUSAND,setGrouping:()=>{},formatTokens:(o,t={})=>T(o,t),formatTokensTooltip:(o,t={})=>a(o,t)});function O(){return e.useContext(r)??m}export{O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o}from"./__vite-browser-external-
|
|
1
|
+
import{o}from"./__vite-browser-external-BZ-i40Kf.js";const a={name:"zap",size:24,node:[["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"}]]};a.node;const n=o(a);export{n as Z};
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
]
|
|
276
276
|
}
|
|
277
277
|
</script>
|
|
278
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
278
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-BZ-i40Kf.js"></script>
|
|
279
279
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-B0m8a6Te.css">
|
|
280
280
|
</head>
|
|
281
281
|
<body>
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
]
|
|
165
165
|
}
|
|
166
166
|
</script>
|
|
167
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
167
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-BZ-i40Kf.js"></script>
|
|
168
168
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-B0m8a6Te.css">
|
|
169
169
|
</head>
|
|
170
170
|
<body>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
</script>
|
|
138
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
138
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-BZ-i40Kf.js"></script>
|
|
139
139
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-B0m8a6Te.css">
|
|
140
140
|
</head>
|
|
141
141
|
<body>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"description": "Shareable Token Tracker dashboard snapshot."
|
|
76
76
|
}
|
|
77
77
|
</script>
|
|
78
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
78
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-BZ-i40Kf.js"></script>
|
|
79
79
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-B0m8a6Te.css">
|
|
80
80
|
</head>
|
|
81
81
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokentracker-cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "Local-first AI coding token usage and cost tracker for 46 tools, with a dashboard, desktop pet, widgets, achievements, and native macOS/Windows apps.",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|